:root {
  color-scheme: dark;
  --ink: #f8f4e8;
  --muted: #b8af9b;
  --soft: #817967;
  --gold: #f2bd57;
  --gold-2: #ffd98a;
  --gold-deep: #9f641f;
  --sun: #ff9d3e;
  --green: #63d19e;
  --red: #ff8479;
  --blue: #80adff;
  --bg: #090806;
  --bg-2: #100e0a;
  --panel: rgba(27, 23, 16, .82);
  --panel-solid: #19150e;
  --panel-2: #211b12;
  --line: rgba(255, 221, 153, .14);
  --line-strong: rgba(242, 189, 87, .34);
  --shadow: 0 32px 90px rgba(0, 0, 0, .42);
  --radius: 22px;
  --content: 820px;
  --wide: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 50% -180px, rgba(242, 189, 87, .18), transparent 70%),
    radial-gradient(760px 480px at 110% 12%, rgba(255, 126, 48, .07), transparent 70%),
    linear-gradient(180deg, #0c0a07 0, var(--bg) 34rem, #080706 100%);
  font: 16px/1.68 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  pointer-events: none;
}

a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: #fff0c7; }
button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(255, 217, 138, .82); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 10px;
  color: #171005;
  background: var(--gold-2);
  font-weight: 800;
}
.skip-link:focus { transform: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 6, .82);
  backdrop-filter: blur(18px) saturate(1.2);
}

.topbar-inner {
  width: min(calc(100% - 32px), var(--wide));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: .02em;
  white-space: nowrap;
}

.sunmark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 137, .24);
  border-radius: 11px;
  background: linear-gradient(160deg, #3a2710, #151008);
  box-shadow: inset 0 0 18px rgba(255, 181, 71, .12), 0 8px 24px rgba(0,0,0,.35);
}
.sunmark::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 7px;
  top: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fff6c7 0 10%, #ffd471 34%, #e7842f 74%);
  box-shadow: 0 0 22px rgba(255, 172, 61, .55);
}
.sunmark::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 6px;
  height: 9px;
  border-top: 1px solid rgba(255, 232, 173, .6);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(13,9,5,.1), #171006 80%);
}

.topnav { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.topnav a, .top-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.topnav a:hover { color: var(--ink); background: rgba(255,255,255,.045); }
.topnav .primary { color: #1a1105; background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 26px rgba(224, 148, 34, .14); }

.hero {
  width: min(calc(100% - 40px), var(--wide));
  margin: 0 auto;
  padding: clamp(72px, 11vw, 136px) 0 66px;
  text-align: center;
}
.hero-compact { padding-bottom: 48px; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 920px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(45px, 7.2vw, 90px);
  font-weight: 500;
  line-height: .99;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero-compact h1 { font-size: clamp(40px, 6vw, 72px); }
.glow-text {
  color: transparent;
  background: linear-gradient(105deg, #fff4cd 8%, #f7c86d 52%, #d7802b 98%);
  background-clip: text;
  -webkit-background-clip: text;
}
.lede {
  max-width: 680px;
  margin: 25px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.62;
  text-wrap: balance;
}
.hero-actions { margin-top: 32px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 19px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255,255,255,.035);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  text-decoration: none;
  font-size: 14px;
  font-weight: 780;
}
.button:hover { color: var(--ink); background: rgba(255,255,255,.075); text-decoration: none; transform: translateY(-1px); }
.button.primary { color: #1b1205; border-color: transparent; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.version-row { margin-top: 25px; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: 12px;
  font-weight: 690;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.shell { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; padding-bottom: 96px; }
.shell-wide { width: min(calc(100% - 40px), var(--wide)); }
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 820px); gap: 54px; align-items: start; }
.guide-main { min-width: 0; }

.toc-side {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.toc-toggle { width: 100%; margin: 0 0 13px; padding: 0; border: 0; color: var(--soft); background: transparent; text-align: left; font: inherit; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; cursor: default; }
.toc-toggle span { display: none; float: right; color: var(--gold); font-size: 18px; line-height: .6; }
.toc-side nav { display: grid; gap: 2px; }
.toc-side a {
  position: relative;
  display: block;
  padding: 7px 11px;
  border-left: 1px solid var(--line);
  color: var(--soft);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
}
.toc-side a:hover, .toc-side a.active { color: var(--gold-2); border-left-color: var(--gold); background: linear-gradient(90deg, rgba(242,189,87,.08), transparent); }
.toc-side a[hidden] { display: none !important; }

.search-wrap {
  position: relative;
  margin-bottom: 28px;
}
.search-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 48px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(25, 21, 14, .86);
  box-shadow: 0 14px 38px rgba(0,0,0,.2);
}
.search-wrap input::placeholder { color: var(--soft); }
.search-icon { position: absolute; top: 15px; left: 17px; color: var(--gold); font-size: 20px; line-height: 1; }
.search-key { position: absolute; top: 15px; right: 15px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--soft); font-size: 11px; }
.search-status { min-height: 23px; margin: -17px 0 17px; color: var(--soft); font-size: 12px; }

.quick-map, .card-grid { display: grid; gap: 14px; }
.quick-map { grid-template-columns: repeat(3, 1fr); margin: 4px 0 54px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.mini-card, .card, details.store {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(33, 28, 19, .9), rgba(20, 17, 12, .82));
  box-shadow: 0 20px 56px rgba(0,0,0,.16);
}
.mini-card { position: relative; padding: 21px; overflow: hidden; }
.mini-card::after { content: ""; position: absolute; right: -35px; bottom: -45px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(242,189,87,.13), transparent 68%); }
.mini-card .num { color: var(--gold); font-size: 11px; font-weight: 850; letter-spacing: .18em; }
.mini-card h3 { margin: 13px 0 5px; font-size: 16px; }
.mini-card p { margin: 0; color: var(--muted); font-size: 13px; }

.section {
  margin: 0 0 72px;
  scroll-margin-top: 94px;
}
.section[hidden] { display: none; }
.kicker { margin: 0 0 9px; color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.section > h2 {
  margin: 0 0 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 43px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.section > h3, .card h3 { margin: 25px 0 8px; font-size: 18px; }
.section-intro { max-width: 730px; margin: 0 0 26px; color: var(--muted); font-size: 17px; }
.section p { color: var(--muted); }
.section strong, .section b { color: var(--ink); }

.card { padding: clamp(20px, 3vw, 28px); }
.card h3:first-child { margin-top: 0; }
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }
.card p { margin: 7px 0; }
.card .label { margin: 0 0 7px; color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }

.steps { display: grid; gap: 12px; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.022);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: #211303;
  background: linear-gradient(145deg, var(--gold-2), #d58c32);
  font-size: 12px;
  font-weight: 900;
}
.step h3 { margin: 1px 0 5px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.shot { margin: 27px 0; }
.shot-button {
  position: relative;
  width: 100%;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.shot-button img { width: 100%; height: auto; display: block; }
.shot-button::after {
  content: "Open image";
  position: absolute;
  right: 13px;
  bottom: 13px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: #1b1104;
  background: rgba(255, 217, 138, .94);
  box-shadow: 0 5px 18px rgba(0,0,0,.3);
  font-size: 11px;
  font-weight: 850;
}
figcaption { margin-top: 10px; color: var(--soft); text-align: center; font-size: 12px; }

.note {
  margin: 20px 0;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(242, 189, 87, .055);
  font-size: 14px;
}
.note.success { border-left-color: var(--green); background: rgba(99,209,158,.05); }
.note.warning { border-left-color: var(--sun); background: rgba(255,157,62,.055); }
.note.danger { border-left-color: var(--red); background: rgba(255,132,121,.055); }

ul.clean, ol.clean { margin: 13px 0; padding-left: 20px; color: var(--muted); }
ul.clean li, ol.clean li { margin: 8px 0; padding-left: 4px; }
ul.checks { list-style: none; margin: 14px 0; padding: 0; }
ul.checks li { position: relative; margin: 9px 0; padding-left: 27px; color: var(--muted); }
ul.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; color: var(--green); font-weight: 900; }

.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 580px; background: rgba(19,16,11,.55); }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--soft); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
td { color: var(--muted); font-size: 13px; }
td strong { color: var(--ink); }
tr:last-child td { border-bottom: 0; }

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #ffe4a7;
  background: #17130d;
  font: .88em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.code-list { display: grid; gap: 8px; margin: 14px 0; }
.code-list code { display: block; padding: 10px 12px; overflow-wrap: anywhere; }

.status-list { display: grid; gap: 8px; }
.status { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.status:last-child { border-bottom: 0; }
.status b { font-size: 12px; }
.status span { color: var(--muted); font-size: 13px; }

details.store { margin: 10px 0; overflow: clip; }
details.store summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 48px 17px 19px;
  cursor: pointer;
  list-style: none;
  font-weight: 780;
}
details.store summary::-webkit-details-marker { display: none; }
details.store summary::after { content: "+"; position: absolute; right: 20px; color: var(--gold); font-size: 21px; font-weight: 400; }
details.store[open] summary::after { content: "−"; }
details.store[open] summary { border-bottom: 1px solid var(--line); }
.store-body { padding: 18px 20px 22px; }
.store-body p { margin: 0 0 10px; }
.store-meta { margin-left: auto; color: var(--soft); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

.source-link { display: inline-flex; margin-top: 8px; font-size: 12px; font-weight: 750; }
.tiny { color: var(--soft); font-size: 12px; }
.muted { color: var(--muted); }
.divider { height: 1px; margin: 64px 0; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

.decision { display: grid; gap: 0; margin-top: 20px; }
.decision-row { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.decision-row:last-child { border-bottom: 0; }
.decision-row b { color: var(--gold-2); }
.decision-row p { margin: 0; font-size: 14px; }

.footer {
  width: min(calc(100% - 40px), var(--wide));
  margin: 0 auto;
  padding: 30px 0 45px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--soft);
  font-size: 12px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 28px 28px;
  background: rgba(3, 3, 2, .91);
  backdrop-filter: blur(15px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1500px, 96vw); max-height: 88vh; border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 35px 100px #000; }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); background: var(--panel-solid); cursor: pointer; font-size: 22px; }

.no-results { display: none; padding: 36px; border: 1px dashed var(--line-strong); border-radius: 18px; color: var(--muted); text-align: center; }
.no-results.show { display: block; }

@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; gap: 0; }
  .toc-side { position: relative; top: 0; max-height: none; margin: 0 0 30px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(25,21,14,.72); }
  .toc-side nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .toc-side a { border-left: 0; padding: 7px 8px; }
  .toc-side a:hover, .toc-side a.active { border-radius: 8px; background: rgba(242,189,87,.08); }
  .quick-map { grid-template-columns: 1fr; }
  .toc-toggle { min-height: 28px; margin: 0; cursor: pointer; }
  .toc-toggle span { display: inline; }
  .toc-side nav { display: none; margin-top: 12px; }
  .toc-side.open nav { display: grid; }
  .toc-side.open .toc-toggle span { transform: rotate(45deg); }
}

@media (max-width: 700px) {
  .topnav a:not(.primary) { display: none; }
  .topbar-inner { width: min(calc(100% - 20px), var(--wide)); }
  .hero, .shell, .shell-wide, .footer { width: min(calc(100% - 28px), var(--wide)); }
  .hero { padding-top: 70px; }
  .card-grid.two, .card-grid.three { grid-template-columns: 1fr; }
  .step { grid-template-columns: 38px 1fr; padding: 17px; gap: 12px; }
  .step::before { width: 36px; height: 36px; border-radius: 10px; }
  .toc-side nav { grid-template-columns: 1fr; }
  .decision-row { grid-template-columns: 1fr; gap: 5px; }
  .footer { flex-direction: column; }
  .shot-button::after { content: "Zoom"; }
}

@media print {
  :root { color-scheme: light; --ink: #18130d; --muted: #403a31; --soft: #6b6255; --gold: #7a4d11; --gold-2: #7a4d11; --bg: #fff; --panel: #fff; --panel-solid: #fff; --panel-2: #f7f3eb; --line: #ddd3c4; --line-strong: #b7a17e; }
  body { background: #fff; font-size: 11pt; }
  body::before, .topbar, .toc-side, .search-wrap, .search-status, .hero-actions, .lightbox, .shot-button::after { display: none !important; }
  .hero { padding: 28px 0 18px; }
  .hero h1 { font-size: 38pt; color: #17120c; }
  .glow-text { color: #7a4d11; -webkit-text-fill-color: #7a4d11; }
  .guide-layout { display: block; }
  .section { break-inside: avoid; margin-bottom: 34px; }
  .section > h2 { font-size: 25pt; }
  .card, .step, details.store, .table-wrap { break-inside: avoid; box-shadow: none; background: #fff; }
  details.store:not([open]) > .store-body { display: block; }
  .shot-button { box-shadow: none; }
  a { color: #513814; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; word-break: break-all; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
