:root {
  --gold: #c9921a;
  --gold-dark: #93690d;
  --ink: #1e232b;
  --muted: #657181;
  --line: #e8e1d4;
  --paper: #ffffff;
  --soft: #faf7f0;
  --shadow: 0 22px 60px rgba(31, 35, 43, .10);
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff 0%, #fff 52%, #fbf4e6 100%);
  line-height: 1.65;
}

a { color: var(--gold-dark); }
a:hover { color: var(--gold); }
.skip-link {
  position: absolute; top: -48px; left: 16px; z-index: 20;
  background: var(--ink); color: white; padding: .7rem 1rem; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.docs-mobile-header {
  display: none;
  position: sticky; top: 0; z-index: 10;
  align-items: center; justify-content: space-between;
  padding: .85rem 1rem; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 13px;
  background: var(--ink); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.nav-toggle, .button, .back-to-top {
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 800;
}
.nav-toggle { padding: .65rem 1rem; background: var(--gold); color: #211803; }

.docs-shell { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 100vh; }
.docs-sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(18px);
}
.sidebar-inner { padding: 1.5rem; }
.sidebar-brand { margin-bottom: 1.5rem; }
.search-label { display: block; margin: 1rem 0 .35rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.docs-search {
  width: 100%; border: 1px solid var(--line); border-radius: 15px; padding: .85rem 1rem; font: inherit;
  background: white; color: var(--ink); outline: none;
}
.docs-search:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,146,26,.16); }
.search-status { min-height: 1.4rem; color: var(--muted); font-size: .88rem; margin: .5rem 0 1rem; }
.section-nav { display: grid; gap: .18rem; }
.section-nav a {
  display: block; padding: .56rem .75rem; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.section-nav a:hover, .section-nav a.active { background: var(--soft); color: var(--ink); box-shadow: inset 4px 0 0 var(--gold); }

.docs-content { width: min(100%, 1120px); padding: 2rem clamp(1rem, 4vw, 4rem) 4rem; }
.section-card {
  margin-bottom: 1.25rem; padding: clamp(1.35rem, 3vw, 2.4rem); background: rgba(255,255,255,.94);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero { padding-top: clamp(2rem, 5vw, 4rem); }
.eyebrow { margin: 0 0 .5rem; color: var(--gold-dark); text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; font-weight: 900; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.04em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
p { margin-top: 0; }
.hero-copy { max-width: 780px; color: #343b47; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.5rem 0; }
.button { display: inline-flex; padding: .85rem 1.1rem; text-decoration: none; }
.button.primary { background: var(--gold); color: #211803; }
.button.secondary { background: var(--ink); color: white; }
.note-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; margin-top: 1.2rem; }
.note-grid div { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
.note-grid strong, .note-grid span { display: block; }
.note-grid span { color: var(--muted); font-size: .94rem; margin-top: .3rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .45rem; }
.steps li { padding-left: .2rem; }
.callout { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: #fff7e5; border: 1px solid #ecd197; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.screenshot-placeholder {
  display: grid; place-items: center; min-height: 180px; margin-top: 1.1rem; border: 2px dashed #d5b66c; border-radius: 20px;
  background: repeating-linear-gradient(135deg, #fffaf0, #fffaf0 12px, #fff4dc 12px, #fff4dc 24px);
  color: #6f520e; font-weight: 900; text-align: center;
}
.faq-list { display: grid; gap: .75rem; }
details { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: .9rem 1rem; }
summary { cursor: pointer; font-weight: 900; }
details p { margin: .65rem 0 0; color: var(--muted); }
mark.search-hit { background: #ffe5a3; color: inherit; padding: .05em .15em; border-radius: .25em; }
.search-hidden { display: none; }
.docs-footer { color: var(--muted); padding: 2rem .2rem 0; }
.back-to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; width: 46px; height: 46px; opacity: 0; pointer-events: none;
  background: var(--ink); color: white; box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

@media (max-width: 980px) {
  .docs-mobile-header { display: flex; }
  .docs-shell { display: block; }
  .docs-sidebar { position: fixed; inset: 61px 0 auto 0; z-index: 9; height: calc(100vh - 61px); transform: translateX(-105%); transition: transform .24s ease; box-shadow: var(--shadow); }
  .docs-sidebar.open { transform: translateX(0); }
  .sidebar-inner { width: min(86vw, 350px); }
  .sidebar-brand { display: none; }
  .docs-content { padding-top: 1rem; }
  .note-grid, .two-column { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .section-card { border-radius: 18px; }
  .hero-actions { display: grid; }
  .button { justify-content: center; }
}

@media print {
  html { scroll-padding-top: 0; }
  body { background: white; color: black; font-size: 11pt; }
  .docs-mobile-header, .docs-sidebar, .back-to-top, .hero-actions, .skip-link { display: none !important; }
  .docs-shell { display: block; }
  .docs-content { width: 100%; padding: 0; }
  .section-card { box-shadow: none; border: 0; border-radius: 0; break-inside: avoid; padding: 0 0 1rem; }
  a { color: black; text-decoration: none; }
  .screenshot-placeholder { border-color: #777; background: white; min-height: 110px; }
}
