/*
Theme Name: ONE Base Theme
Theme URI: https://one.yochai.net
Description: Minimal PHP base theme for ONE.
Author: ONE
Version: 1.1.0
Text Domain: one-base-theme
*/

:root{
  --text:#111;
  --bg:#fff;
  --line:#e6e6e6;
  --muted:#5f5f5f;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.65;
}

body{
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;text-underline-offset:2px}
a:hover{opacity:.86}

.site{
  width:min(100%,980px);
  margin:0 auto;
  padding:14px;
}

header,footer{
  padding:14px 0;
  border-bottom:1px solid var(--line);
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(6px);
}

.site-branding{
  margin:0;
  font-size:clamp(1.2rem,3.2vw,1.45rem);
  line-height:1.2;
}

.site-branding a{
  text-decoration:none;
}

footer{
  border-top:1px solid var(--line);
  border-bottom:0;
  margin-top:32px;
  color:var(--muted);
}

h1,h2,h3{
  margin:0 0 12px;
  line-height:1.25;
  letter-spacing:-0.01em;
}

h1{font-size:clamp(1.5rem,5.2vw,2.1rem)}
h2{font-size:clamp(1.28rem,3.8vw,1.6rem)}
h3{font-size:clamp(1.08rem,3.2vw,1.24rem)}

.one-entry{
  padding:18px 0;
  border-bottom:1px solid var(--line);
}

.one-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.one-title-row > :first-child{
  min-width:0;
  overflow-wrap:anywhere;
}

.one-title-actions{display:flex;gap:6px;flex:0 0 auto}

.one-copy-action{
  border:1px solid var(--line);
  background:#fff;
  border-radius:8px;
  padding:4px 9px;
  cursor:pointer;
  font-size:14px;
  line-height:1.2;
  flex:0 0 auto;
}

.one-copy-action:hover{background:#f7f7f7}
.one-copy-action.is-done{border-color:#0a7f36;color:#0a7f36}
.one-copy-action.is-failed{border-color:#a11a1a;color:#a11a1a}

.one-entry-meta{
  color:var(--muted);
  font-size:13px;
  margin:-4px 0 10px;
}

.one-entry-content{
  max-width:74ch;
  color:#181818;
  font-size:clamp(1rem,2.7vw,1.06rem);
}

.one-entry-content p{margin:0 0 14px}
.one-entry-content ul,
.one-entry-content ol{margin:0 0 14px 1.1rem; padding:0}
.one-entry-content li{margin:0 0 6px}
.one-entry-content h2,
.one-entry-content h3{margin-top:20px}
.one-entry-content img,
.one-entry-content iframe,
.one-entry-content video{max-width:100%; height:auto}

.one-quick-nav{margin-top:12px}
.one-quick-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.one-quick-nav a{
  display:inline-block;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  text-decoration:none;
  font-size:13px;
  line-height:1.2;
  background:#fff;
  white-space:nowrap;
  min-height:34px;
}
.one-quick-nav a:hover{border-color:#bcbcbc;background:#fafafa}
.one-quick-nav a:focus-visible,
.one-copy-action:focus-visible{
  outline:2px solid #111;
  outline-offset:2px;
}
.one-quick-nav a.is-current{
  border-color:#111;
  background:#111;
  color:#fff;
}

.one-quick-nav--inline-start,
.one-quick-nav--inline-end{
  position:fixed;
  top:16px;
  z-index:60;
  max-width:180px;
}
.one-quick-nav--inline-start{left:12px}
.one-quick-nav--inline-end{right:12px}
.one-quick-nav--inline-start ul,
.one-quick-nav--inline-end ul{display:grid;gap:6px}

p{margin:0 0 10px}
input,textarea,select,button{font:inherit}

.one-comments-wrap{margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}
.one-comments-wrap .comment-list{padding-inline-start:18px}
.one-comments-wrap .comment-body{border:1px solid var(--line);border-radius:10px;padding:10px;margin:8px 0;background:#fff}
.one-comments-wrap .comment-respond textarea,
.one-comments-wrap .comment-respond input[type="text"],
.one-comments-wrap .comment-respond input[type="email"]{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px}
.one-comments-wrap .form-submit input[type="submit"]{padding:8px 12px;border:1px solid #111;background:#111;color:#fff;border-radius:8px;cursor:pointer}

@media (max-width:900px){
  .one-quick-nav--inline-start,
  .one-quick-nav--inline-end{
    position:static;
    top:auto;
    left:auto;
    right:auto;
    max-width:none;
  }

  .one-quick-nav--inline-start ul,
  .one-quick-nav--inline-end ul{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:thin;
  }

  .one-title-row{align-items:center}
  .one-copy-action{padding:4px 8px;font-size:13px}
}

/* Dashboard page should use full-width layout */
body.page-slug-dashboard .site{
  width:100%;
  max-width:100%;
  padding-left:10px;
  padding-right:10px;
}

body.page-slug-dashboard .one-entry-content{
  max-width:none;
}

@media (min-width:760px){
  .site{padding:22px}
  .one-entry{padding:22px 0}

  body.page-slug-dashboard .site{
    padding-left:16px;
    padding-right:16px;
  }
}