
:root { --g: #b8782c; }
.site-header .brand-gm { background: var(--g); }
.eyebrow a { color: inherit; text-decoration: none; }
.g-hero h1 { max-width: 15ch; }
.g-sec { margin: 56px 0; }
.g-intro { color: var(--muted); max-width: 62ch; }
.model { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: m; }
.model li { counter-increment: m; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 16px; font-weight: 700; line-height: 1.35; }
.model li::before { content: counter(m); display: block; font-family: var(--pixel); color: var(--g); font-size: .8rem; margin-bottom: 8px; }
blockquote { margin: 22px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--g); font-size: 1.15rem; font-weight: 600; color: var(--cream); }
blockquote.big { font-size: 1.5rem; border: 0; padding: 0; text-align: center; margin-top: 32px; font-family: var(--serif, inherit); }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dcard { display: flex; flex-direction: column; gap: 6px; padding: 22px; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.dcard:hover { transform: translateY(-2px); border-color: var(--g); }
.dcard.lead { grid-row: span 2; }
.dcard h3 { margin: 2px 0 0; font-size: 1.3rem; }
.dcard p { margin: 0; color: var(--muted); }
.dk { font-family: var(--pixel); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--g); }
.go { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--g); }
.small { font-size: .9rem; }
.pillars { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pillars li { padding: 18px 16px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.pillars li + li { border-left: 1px solid var(--line); }
.pillars b { color: var(--g); font-size: 1.05rem; }
.pillars span { color: var(--muted); font-size: .95rem; }
.tiers { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.tiers li { display: grid; grid-template-columns: 34px 1fr auto 130px; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.tn { font-family: var(--pixel); color: var(--g); }
.tq { font-variant-numeric: tabular-nums; color: var(--muted); }
.tc { font-size: .8rem; font-weight: 700; color: var(--g); text-align: right; }
.fact-card { padding: 24px; }
.big-num { font-family: var(--pixel); font-size: clamp(1.6rem, 5vw, 2.6rem); color: var(--g); margin: 0; word-break: break-all; }
.policy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.policy code { background: var(--panel2); padding: 10px 12px; border-radius: 10px; word-break: break-all; font-size: .9rem; flex: 1 1 280px; }
code { font-size: .88em; }
/* document pages */
.doc { max-width: 1060px; margin: 0 auto; }
.doc-head { margin: 28px 0 30px; max-width: 760px; }
.doc-head h1 { margin: 6px 0 10px; }
.doc-head .lede { max-width: 60ch; }
.doc-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; color: var(--muted); }
.doc-meta span { margin-right: 6px; }
.doc-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.doc-grid:not(:has(.toc)) { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.toc { position: sticky; top: 16px; font-size: .92rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.toc ul { list-style: none; padding: 0; margin: 8px 0 0; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--g); }
.doc-body { max-width: 720px; font-size: 1.06rem; line-height: 1.7; }
.doc-body h2 { margin: 44px 0 12px; font-size: 1.55rem; scroll-margin-top: 16px; }
.doc-body h3 { margin: 30px 0 8px; font-size: 1.2rem; scroll-margin-top: 16px; }
.doc-body h2:first-child { margin-top: 0; }
.anchor { float: left; margin-left: -1em; width: 1em; color: var(--soft); text-decoration: none; opacity: 0; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
.term { margin: 16px 0; padding: 14px 16px; border-left: 3px solid var(--g); background: var(--panel); border-radius: 0 12px 12px 0; }
.term h4 { margin: 0 0 4px; font-size: 1.02rem; }
.term p { margin: 0; color: var(--muted); }
.tbl { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .96rem; line-height: 1.5; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--panel2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-weight: 700; }
.note { margin: 28px 0; padding: 16px 18px; border: 1px dashed var(--g); border-radius: 14px; background: var(--panel); }
.note b { color: var(--g); }
.note p { margin: 6px 0 0; color: var(--muted); font-size: .97rem; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 44px 0 10px; }
.pn a { padding: 16px 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.pn small { color: var(--muted); }
.pn-next { text-align: right; }
.doc-src { color: var(--soft); font-size: .88rem; margin: 18px 0 40px; }
@media (max-width: 900px) { .model, .pillars { grid-template-columns: 1fr 1fr; } .pillars li + li { border-left: 0; } .pillars li { border-top: 1px solid var(--line); }
  .doc-grid { grid-template-columns: 1fr; } .toc { position: static; } }
@media (max-width: 620px) { .model, .pillars, .dgrid, .pn { grid-template-columns: 1fr; } .dcard.lead { grid-row: auto; }
  .tiers li { grid-template-columns: 26px 1fr auto; } .tc { grid-column: 2 / 4; text-align: left; } .tc:empty { display: none; } .pn-next { text-align: left; } }

/* ---------- Day / night (theme.py) ---------- */
html[data-site="genesis"][data-theme="dark"] { color-scheme: dark;
  --bg: #17131d; --panel: #221c2b; --panel2: #2a2235; --line: #372e44; --cream: #efeaf6; --muted: #aaa0bb; --soft: #8b819c;
  --orange: #f2a582; --accent-ink: #2a1626; --gold: #b8bff0; --shadow: #6f78bf;
  --ok: #72d49a; --warn: #f5c967; --info: #8fb6ef; --purple: #9d6bcc; --green: #72d49a; --pink: #ef8faa; --sky: #8fb6ef;
  --glow1: color-mix(in srgb, var(--shadow) 18%, var(--bg)); --glow2: color-mix(in srgb, var(--orange) 8%, var(--bg));
  --spot1: color-mix(in srgb, var(--shadow) 40%, var(--panel)); --spot2: color-mix(in srgb, var(--shadow) 14%, var(--panel2));
  --footer: color-mix(in srgb, black 30%, var(--bg));
  --bg: #15121c; --panel: #1f1a28; --panel2: #262033; --line: #372e47; --cream: #f6eee0; --muted: #b6a9c4; --soft: #8f839e;
  --orange: #e7a75a; --accent-ink: #24170a; --gold: #f0c27a; --shadow: #6d4a1e; }
html.theme-anim body, html.theme-anim .card, html.theme-anim .faq, html.theme-anim .chip-btn, html.theme-anim .site-footer, html.theme-anim .policy,
html.theme-anim .btn, html.theme-anim .spot, html.theme-anim .tile, html.theme-anim .mood, html.theme-anim input, html.theme-anim select,
html.theme-anim .step, html.theme-anim .ill { transition: background-color .7s ease, color .7s ease, border-color .7s ease, background .7s ease; }

.site-header .theme-toggle { order: 3; }
.theme-toggle { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cream); background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 14px 5px 5px; cursor: pointer; box-shadow: 2px 2px 0 var(--shadow); }
.theme-toggle:hover { border-color: var(--orange); }
.theme-toggle:focus-visible, .sky-stage:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.tt-track { position: relative; width: 52px; height: 28px; border-radius: 99px; background: linear-gradient(180deg, #9fd6ff, #ffe7b0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cream) 15%, transparent); transition: background .6s ease; }
html[data-theme="dark"] .tt-track { background: linear-gradient(180deg, #1b2350, #3b2a5c); }
.tt-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fffaf0;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .55s cubic-bezier(.6,-0.4,.35,1.4), background .5s ease; overflow: hidden; }
html[data-theme="dark"] .tt-knob { transform: translateX(24px) rotate(360deg); background: #2b2440; }
.tt-knob svg { position: absolute; inset: 3px; width: 16px; height: 16px; transition: opacity .35s ease, transform .5s ease; }
.tt-knob .mini-moon { opacity: 0; transform: scale(.4) rotate(-90deg); }
html[data-theme="dark"] .tt-knob .mini-sun { opacity: 0; transform: scale(.4) rotate(90deg); }
html[data-theme="dark"] .tt-knob .mini-moon { opacity: 1; transform: none; }

.sky-stage { position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 24px;
  -webkit-tap-highlight-color: transparent; }
.sky-stage .cat { position: relative; z-index: 1; display: block; }
.sky { position: absolute; z-index: 0; left: 52%; top: 17%; width: 66%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.sky .sun, .sky .moon { position: absolute; inset: 0; width: 100%; height: 100%;
  transition: transform .9s cubic-bezier(.55,-0.25,.35,1.25), opacity .7s ease, filter .9s ease; }
.sky .sun { filter: drop-shadow(0 0 18px rgba(255, 196, 64, .65)); animation: sun-spin 40s linear infinite; }
.sky .moon { opacity: 0; transform: translateY(55%) rotate(-50deg) scale(.6); filter: drop-shadow(0 0 16px rgba(240, 232, 200, .45)); }
html[data-theme="dark"] .sky .sun { opacity: 0; transform: translateY(60%) rotate(140deg) scale(.5); animation: none; }
html[data-theme="dark"] .sky .moon { opacity: 1; transform: translate(9%, -4%); }
.stars i { position: absolute; width: 5%; aspect-ratio: 1; background: #fff7d6; opacity: 0; transform: scale(.2);
  transition: opacity .5s ease calc(.45s + var(--d)), transform .5s ease calc(.45s + var(--d)); box-shadow: 0 0 6px #fff1b8; }
html[data-theme="dark"] .stars i { opacity: 1; transform: scale(1); animation: twinkle 2.6s ease-in-out infinite var(--d); }
.cat.boop { animation: boop .6s ease; }
.sky-pair .duo { position: relative; z-index: 1; display: grid; place-items: center; }   /* both cats share one cell, so both get the same size rule (no stretched night cat) */
.sky-pair .duo .cat { grid-area: 1 / 1; transition: opacity .6s ease; }
.sky-pair .duo .cat-night { opacity: 0; }
html[data-theme="dark"] .sky-pair .duo .cat-day { opacity: 0; }
html[data-theme="dark"] .sky-pair .duo .cat-night { opacity: 1; }
html[data-theme="dark"] .hero-art .sky-pair img { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }   /* no pale halo around the night cat */
@keyframes boop { 0% { transform: translateY(0); } 30% { transform: translateY(-9px) rotate(-2deg); } 60% { transform: translateY(2px); } 100% { transform: none; } }
@keyframes sun-spin { to { rotate: 360deg; } }
@keyframes twinkle { 50% { opacity: .35; } }
@media (max-width: 760px) {
  .site-header .theme-toggle { order: 2; margin-left: auto; }
  .site-header .site-nav { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sky .sun, .sky .moon, .stars i, .tt-knob, .tt-knob svg, .tt-track { transition: none !important; animation: none !important; }
  .cat.boop { animation: none; }
}
