:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --panel: #fffefa;
  --ink: #1c2117;
  --muted: #52574b;
  --line: #dcded4;
  --accent: #cbff55;
  --link: #385321;
  --hover: #eaeee2;
  --selected: #eaf4d9;
  --header: 64px;
  --sticky-offset: calc(var(--header) + 18px);
  font: 16px/1.6 "Manrope", system-ui, -apple-system, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161815;
  --panel: #20231d;
  --ink: #f5f6ef;
  --muted: #c1c6b9;
  --line: #393e34;
  --link: #d4f6a2;
  --hover: #2a3024;
  --selected: #303e23;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.skip { position: fixed; z-index: 20; inset: 8px auto auto 8px; transform: translateY(-200%); background: var(--panel); padding: 8px 14px; }
.skip:focus { transform: none; }
.masthead {
  min-height: var(--header); padding: 0 clamp(16px, 4vw, 56px);
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 17px;
  background: #191d16; color: #f5f6ee; border-bottom: 1px solid #3b4532;
}
.masthead a { color: inherit; text-decoration: none; }
.masthead a:focus-visible, .masthead button:focus-visible, .hero a:focus-visible { outline-color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.035em; white-space: nowrap; }
.brand img { border-radius: 7px; }
.masthead-label { padding-left: 17px; border-left: 1px solid #52594c; color: #cfdbbf; font-size: .85rem; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme, .return { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 5px 12px; border: 1px solid #4b5541; border-radius: 8px; background: transparent; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.theme { min-width: 38px; padding: 0; font-size: 1.24rem; }
.theme:hover, .return:hover { background: #313a29; }
.return span { color: var(--accent); }
.layout {
  max-width: 1440px; min-height: calc(100vh - var(--header)); margin: auto;
  display: grid; grid-template-columns: 242px minmax(0, 1fr); align-items: start;
}
.sidebar {
  position: sticky; top: var(--header); max-height: calc(100vh - var(--header)); max-height: calc(100dvh - var(--header));
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 29px 17px 22px 20px; border-right: 1px solid var(--line); background: var(--bg);
}
.sidebar-head { padding: 0 10px; }
.eyebrow { font-size: .7rem; line-height: 1.4; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--link); }
.sidebar nav p { margin: 18px 10px 4px; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.sidebar nav a { display: block; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: .83rem; line-height: 1.35; text-decoration: none; }
.sidebar nav a:hover { background: var(--hover); color: var(--ink); }
.sidebar nav a[aria-current] { border-color: var(--line); background: var(--selected); color: var(--ink); font-weight: 750; }
.topic-toggle { border: 1px solid var(--line); border-radius: 7px; padding: 4px 11px; background: var(--panel); font-size: .83rem; font-weight: 700; }
.topic-toggle span { display: inline-block; margin-left: 4px; }
.topic-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
main { min-width: 0; width: 100%; max-width: 1170px; padding: clamp(22px, 3.5vw, 52px) clamp(18px, 4.4vw, 65px) 0; }
main [id] { scroll-margin-top: var(--sticky-offset); }
:target:is(h3, article) { outline: 2px solid var(--link); outline-offset: 5px; }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 370px; display: flex; align-items: center; border-radius: 17px;
  background: radial-gradient(ellipse at 92% 30%, #394e22, transparent 64%), #1c2517; color: #f7faef;
}
.hero-copy { position: relative; padding: clamp(25px, 5vw, 65px); width: 100%; }
.hero .eyebrow { margin: 0 0 21px; color: #cee6b8; }
.status-dot { width: 7px; height: 7px; background: var(--accent); display: inline-block; margin-right: 6px; border-radius: 50%; box-shadow: 0 0 12px #cbff5566; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.045em; }
h1 { margin: 0; font-size: clamp(2.65rem, 5.7vw, 5.8rem); font-weight: 780; }
.lead { max-width: 49ch; margin: 20px 0 24px; color: #deead2; font-size: clamp(.95rem, 1.6vw, 1.09rem); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.hero-actions a { font-size: .87rem; font-weight: 740; color: #f7faef; }
.hero-actions .primary { background: var(--accent); color: #213013; border-radius: 7px; padding: 9px 14px; text-decoration: none; }
.hero-actions .primary:hover { background: #e0ff9f; }
.hero-actions span { margin-left: 5px; }
.hero-design {
  position: absolute; z-index: -1; inset: 0 0 0 43%; overflow: hidden; pointer-events: none;
  background: radial-gradient(circle, #e6ffbe3b 1px, transparent 1.5px) 0 0 / 17px 17px;
  mask-image: linear-gradient(90deg, transparent, black 52%);
}
.hero-design span { display: block; position: absolute; width: 64%; aspect-ratio: 1; border: 1px solid #d8ff9c6b; border-radius: 17%; right: -8%; top: 12%; transform: rotate(-27deg); background: #a2da2a16; }
.hero-design span:nth-child(2) { top: 25%; right: 6%; border-color: #c3acff66; background: #aa91e528; transform: rotate(-13deg); }
.hero-design span:nth-child(3) { top: 11%; right: 15%; width: 48%; border-color: #d8ff9c66; background: #b2f33919; transform: rotate(19deg); }
.guide-search { margin: 23px 0 15px; }
.guide-search label { display: block; margin-bottom: 5px; font-size: .82rem; font-weight: 780; }
.search-input { display: flex; align-items: center; gap: 10px; padding-inline: 13px 5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.search-input input { width: 100%; min-height: 45px; padding: 6px 9px; border: 0; background: transparent; color: var(--ink); outline-offset: -3px; font-size: .94rem; }
.search-input svg { flex-shrink: 0; }
.search-input input::placeholder { color: var(--muted); opacity: .95; }
.search-status { margin: 6px 0; font-size: .82rem; color: var(--muted); }
#guide-results { margin: 8px 0 0; padding: 4px; list-style: none; max-height: 262px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
#guide-results a { display: block; padding: 7px 10px; border-radius: 4px; }
#guide-results a:hover { background: var(--hover); }
.start-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 19px 0 32px; }
.start-links a { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); text-decoration: none; }
.start-links a:hover { background: var(--hover); }
.start-links span { color: var(--link); font-size: .64rem; font-weight: 800; letter-spacing: .11em; }
.start-links strong { line-height: 1.25; }
.start-links small { color: var(--muted); line-height: 1.4; }
.start-links b { color: var(--link); }
.chapter { padding: 30px 0 31px; border-top: 1px solid var(--line); }
.chapter > .eyebrow { margin: 0 0 8px; }
h2 { margin: 0 0 17px; color: var(--ink); font-size: clamp(1.9rem, 3.6vw, 3.25rem); }
h3 { margin: 23px 0 8px; font-size: 1.19rem; letter-spacing: -.027em; }
.chapter > p:not(.eyebrow), .chapter > ol { max-width: 78ch; }
.chapter p, .chapter ol, .chapter dd { color: var(--muted); }
.chapter strong { color: var(--ink); }
.chapter p, .chapter ol { margin-top: 0; margin-bottom: 12px; }
.chapter ol { padding-left: 1.45em; }
.chapter li { padding-left: .23em; margin: 6px 0; }
.chapter li::marker { color: var(--link); font-weight: 760; }
.chapter .note { margin-top: 16px; padding: 10px 14px; border-inline-start: 3px solid var(--link); background: var(--selected); border-radius: 0 6px 6px 0; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 19px; }
.tool-grid article { padding: 15px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.tool-grid h3 { margin-top: 0; }
.tool-grid :is(ol, p):last-child { margin-bottom: 0; }
.table-wrap { max-width: 86ch; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; background: var(--panel); }
caption { text-align: left; padding: 8px 0; color: var(--ink); font-weight: 750; }
th, td { text-align: left; vertical-align: top; border: 1px solid var(--line); padding: 8px 11px; }
thead th { background: var(--selected); }
td { color: var(--muted); }
.data-list { display: grid; grid-template-columns: minmax(125px, 172px) minmax(0, 1fr); max-width: 85ch; margin: 16px 0; }
.data-list dt, .data-list dd { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.data-list dt { font-weight: 730; }
.data-list dd { margin: 0; }
code { overflow-wrap: anywhere; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: .82rem; }
@media (max-width: 810px) {
  :root { --header: 58px; --sticky-offset: 117px; }
  .layout { display: block; }
  .sidebar { position: static; z-index: 5; padding: 8px 17px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar:has(.topic-toggle:not([hidden])) { position: sticky; }
  .sidebar-head { min-height: 34px; padding: 0; display: flex; align-items: center; justify-content: space-between; }
  .sidebar nav { padding-bottom: 8px; max-height: min(56vh, 420px); overflow: auto; overscroll-behavior: contain; }
  .hero { min-height: 315px; }
  .hero-design { inset-inline-start: 48%; }
}
@media (max-width: 540px) {
  .masthead { gap: 10px; }
  .masthead-label { display: none; }
  .brand { font-size: .94rem; }
  .brand img { width: 25px; height: 25px; }
  .header-actions { gap: 6px; }
  .return { padding-inline: 8px; }
  .theme { min-width: 34px; }
  .hero { min-height: 0; }
  .hero-copy { padding: 22px; }
  .hero .eyebrow { margin-bottom: 14px; }
  .hero-design { inset-inline-start: 57%; }
  .start-links, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .start-links a { padding: 13px 15px; }
  .data-list { grid-template-columns: minmax(0, 1fr); }
  .data-list dt { border: 0; padding: 9px 0 0; }
  .data-list dd { padding: 0 0 9px; }
  th, td { padding: 7px 6px; overflow-wrap: anywhere; }
}
