/* ── Seedcast Docs — shared styles ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #0e0e10;
  --card:    #1a1a1f;
  --border:  #2e2e38;
  --gold:    #c9a84c;
  --gold-lt: #e8d49c;
  --parch:   #f5f0e8;
  --parch-dk:#e8e0cf;
  --white:   #ffffff;
  --muted:   #6b6259;
  --text:    #1a1612;
  --accent-lt: #f5edd8;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;
  --ff-code:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --sidebar-w: 260px;
  --content-max: 780px;
  --nav-h: 56px;
  --radius: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--parch);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Top nav ── */
.docs-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--black);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
}
.docs-topnav__brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  text-decoration: none;
}
.docs-topnav__brand:hover { text-decoration: none; }
.brand-icon {
  width: 24px; height: 24px;
  background: var(--gold);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: var(--black);
  flex-shrink: 0;
}
.docs-topnav__badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gold);
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.25);
  padding: .15rem .5rem;
  border-radius: 999px;
  margin-left: .25rem;
}
.docs-topnav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.docs-topnav__links a {
  font-size: .8rem;
  color: #9a9ab0;
  text-decoration: none;
  transition: color .15s;
}
.docs-topnav__links a:hover { color: var(--white); text-decoration: none; }
.docs-topnav__links .btn {
  background: var(--gold);
  color: var(--black);
  padding: .35rem .85rem;
  border-radius: 5px;
  font-weight: 600;
  font-size: .78rem;
}
.docs-topnav__links .btn:hover { background: var(--gold-lt); }

/* ── Layout ── */
.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* ── Sidebar ── */
.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--nav-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--parch-dk);
  padding: 1.5rem 0 3rem;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--parch-dk); border-radius: 2px; }

.sidebar-section {
  margin-bottom: 1.5rem;
}
.sidebar-section__label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 0 1.25rem .4rem;
  display: block;
}
.sidebar-section__links {
  list-style: none;
}
.sidebar-section__links a {
  display: block;
  padding: .35rem 1.25rem;
  font-size: .85rem;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .1s, border-color .1s, color .1s;
  line-height: 1.4;
}
.sidebar-section__links a:hover {
  background: var(--accent-lt);
  color: var(--text);
  text-decoration: none;
}
.sidebar-section__links a.is-active {
  border-left-color: var(--gold);
  background: var(--accent-lt);
  color: var(--black);
  font-weight: 600;
}

/* ── Content ── */
.docs-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 3rem 2rem 6rem;
  max-width: calc(var(--sidebar-w) + var(--content-max) + 4rem);
}
.docs-content-inner {
  max-width: var(--content-max);
}

/* ── Page header ── */
.docs-page-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .6rem;
}
.docs-page-title {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: .6rem;
  letter-spacing: -.02em;
}
.docs-page-intro {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--parch-dk);
  max-width: 60ch;
}

/* ── Headings ── */
.docs-content h2 {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--black);
  margin: 2.5rem 0 .75rem;
  padding-top: .5rem;
  letter-spacing: -.01em;
}
.docs-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  margin: 1.75rem 0 .5rem;
}
.docs-content h2:first-child,
.docs-content h3:first-child { margin-top: 0; }

/* ── Body text ── */
.docs-content p {
  margin-bottom: 1rem;
  color: var(--text);
  max-width: 68ch;
}
.docs-content ul,
.docs-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  max-width: 68ch;
}
.docs-content li {
  margin-bottom: .35rem;
  color: var(--text);
}
.docs-content strong { color: var(--black); }

/* ── Steps ── */
.docs-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}
.docs-steps li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
  max-width: none;
}
.docs-steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .1rem;
}
.docs-steps li p { margin: 0; }

/* ── Callouts ── */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  max-width: 68ch;
}
.callout__icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.callout__body { flex: 1; }
.callout__body p { margin: 0; font-size: .9rem; max-width: none; }
.callout--tip    { background: #f0fdf4; border: 1px solid #bbf7d0; }
.callout--note   { background: #f5f0e8; border: 1px solid #d3b673; }
.callout--warn   { background: #fff7ed; border: 1px solid #fed7aa; }

/* ── Code / shortcodes ── */
code {
  font-family: var(--ff-code);
  font-size: .82em;
  background: var(--parch-dk);
  padding: .1rem .35rem;
  border-radius: 4px;
  color: #6b3e0a;
}
pre {
  background: var(--black);
  color: #e8d49c;
  font-family: var(--ff-code);
  font-size: .82rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* ── Field reference table ── */
.field-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: .875rem;
}
.field-table th {
  text-align: left;
  padding: .5rem .75rem;
  background: var(--parch-dk);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 2px solid var(--parch-dk);
}
.field-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--parch-dk);
  vertical-align: top;
  color: var(--text);
}
.field-table tr:last-child td { border-bottom: none; }
.field-table td:first-child { font-weight: 600; white-space: nowrap; }
.field-table .optional {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--parch-dk);
  padding: .1rem .35rem;
  border-radius: 3px;
  margin-left: .35rem;
}
.field-table .required {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #92400e;
  background: #fef3c7;
  padding: .1rem .35rem;
  border-radius: 3px;
  margin-left: .35rem;
}

/* ── Screenshot placeholder ── */
.screenshot {
  border: 1.5px solid var(--parch-dk);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.25rem 0;
  background: var(--white);
}
.screenshot__label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: .4rem .75rem;
  background: var(--parch-dk);
  border-bottom: 1px solid var(--parch-dk);
}
.screenshot__img {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 2rem;
  background: #faf8f4;
}

/* ── Next/Prev nav ── */
.docs-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--parch-dk);
  flex-wrap: wrap;
}
.docs-page-nav a {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem 1.1rem;
  border: 1.5px solid var(--parch-dk);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
  flex: 1;
  max-width: 48%;
}
.docs-page-nav a:hover { border-color: var(--gold); text-decoration: none; }
.docs-page-nav a.next { text-align: right; }
.docs-page-nav__dir {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.docs-page-nav__title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--black);
}

/* ── Mobile ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  padding: .25rem;
}
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform .25s;
    z-index: 99;
  }
  .docs-sidebar.is-open { transform: translateX(0); }
  .docs-content { margin-left: 0; padding: 2rem 1.25rem 4rem; }
  .docs-topnav__links { display: none; }
}
