/* Build Until light / dark + section rhythm (Jesse, Nov 7 2026). Loaded after site.css on opted in pages (bu-theme-head.js).
   Every rule hangs off html[data-theme], so the speaker site and any page without the snippet never change.
   DARK MODE: the hero and every odd section stay black; every even section is warm paper (#F4F4EE) with near black ink, so long pages read in rhythm.
   LIGHT MODE: the page is paper, every even section a deeper paper; the top bar, the hero and the footer stay black (the brand frame).
   PAPER TOKENS: text passes 4.5:1 on #F4F4EE and #EAE6DB. Blue and rust go deeper for TEXT (#1F5F8B, #B3350F); FILLS stay sky blue with black text (brand rule). */

html[data-theme]{
  --ink3:#918d84;
  --sky:#7fb3d8;--sky-hi:#a8cdea;--sky-ink:#0a0a0a;
  --ghost:#ffffff44;--field:#0d0d0d;--field-line:#333;--panel:#151515;--wash:#ffffff08;--dim:#0d0d0dcc;--bar:#ffffff1a;
  --tint:#0e2132;--tint-end:#121212;--tint-rust:#1a0f0b;--rust-ink:#0a0a0a;--chipbg:#222;
  --shadow:0 40px 100px #000c;--prose:#dedbd3;--err:#ff8a70;--band:var(--bg2);
  color-scheme:dark
}

/* ---------- PAPER scope ---------- */
html[data-theme=light],
html[data-theme=dark] body>section:nth-of-type(even):not(.modal,.bu-keep),
html[data-theme=dark] body>article+section{
  --bg:#F4F4EE;--bg2:#EAE6DB;--bg3:#FBFAF6;--line:#D8D5C9;
  --ink:#141412;--ink2:#45433C;--ink3:#5E5B52;
  --gold:#1F5F8B;--gold2:#174B6E;--rust:#B3350F;--rust2:#B3350F;
  --sky-hi:#6aa6d0;--ghost:#14141459;--field:#FFFDF8;--field-line:#B4B1A5;--panel:#FBFAF6;--wash:#FBFAF6;--dim:#FBFAF6;--bar:#0000001a;
  --tint:#E2EDF5;--tint-end:#FBFAF6;--tint-rust:#FBEDE7;--rust-ink:#fff;--chipbg:#E7E3D8;
  --shadow:0 24px 60px #0000002e;--prose:#2A2925;--err:#B3350F;--band:#EAE6DB;
  color-scheme:light
}

/* paper sections in dark mode */
html[data-theme=dark] body>section:nth-of-type(even):not(.modal,.bu-keep),
html[data-theme=dark] body>article+section{background:var(--bg);color:var(--ink)}

/* ---------- light mode ---------- */
html[data-theme=light] body{background:var(--bg);color:var(--ink)}
html[data-theme=light] body>section:not(.modal,.bu-keep,.hero,.bu-hero,.tc-hero){background:var(--bg)}
html[data-theme=light] body>section:nth-of-type(even):not(.modal,.bu-keep,.hero,.bu-hero,.tc-hero){background:var(--band)}
/* the brand frame stays black */
html[data-theme=light] :is(.nav,.hero,.bu-hero,.tc-hero,body>footer){
  --bg:#0a0a0a;--bg2:#121212;--bg3:#1a1a1a;--line:#2a2a2a;
  --ink:#f5f3ee;--ink2:#b9b5ab;--ink3:#918d84;
  --gold:#7fb3d8;--gold2:#a8cdea;--rust:#e14a20;--rust2:#f2643a;
  --sky-hi:#a8cdea;--ghost:#ffffff44;--field:#0d0d0d;--field-line:#333;--panel:#151515;--wash:#ffffff08;--dim:#0d0d0dcc;--bar:#ffffff1a;
  --tint:#0e2132;--tint-end:#121212;--tint-rust:#1a0f0b;--rust-ink:#0a0a0a;--chipbg:#222;
  --shadow:0 40px 100px #000c;--prose:#dedbd3;--err:#ff8a70;
  color:var(--ink);color-scheme:dark
}
html[data-theme=light] body>footer{background:var(--bg)}
html[data-theme=light] :is(.hero,.bu-hero,.tc-hero){background-color:#0a0a0a}
html[data-theme=light] .nav{background:#0a0a0af2;border-color:#2a2a2a}

/* ---------- components on tokens (dark values = the old ones) ---------- */
html[data-theme] .btn{background:var(--sky);border-color:var(--sky);color:var(--sky-ink)}
html[data-theme] .btn:hover{background:var(--sky-hi);border-color:var(--sky-hi)}
html[data-theme] .btn.ghost{background:transparent;color:var(--ink);border-color:var(--ghost)}
html[data-theme] .btn.ghost:hover{background:transparent;border-color:var(--gold);color:var(--gold)}
html[data-theme] :is(.builder .ltr,.dm,.nextup b,.mm-steps li::before,.how li::before,.partner-list li::before){background:var(--sky);color:var(--sky-ink)}
html[data-theme] .builder li{background:var(--dim)}
html[data-theme] :is(input,select,textarea){background:var(--field);border-color:var(--field-line);color:var(--ink)}
html[data-theme] input:is([type=checkbox],[type=radio]){background:none}
html[data-theme] .checks label{background:var(--field);border-color:var(--field-line)}
html[data-theme] .chip{border-color:var(--field-line)}
html[data-theme] .copy{border-color:var(--ghost)}
html[data-theme] :is(.talk.feature,.event.feature,.mm,.partner,.pkg.hl){background:linear-gradient(135deg,var(--tint),var(--tint-end) 58%)}
html[data-theme] :is(.notice,.nextup){background:var(--tint)}
html[data-theme] .notice.err,html[data-theme] .proof{background:var(--tint-rust)}
html[data-theme] .proof .pk{color:var(--rust-ink)}
html[data-theme] .prose{color:var(--prose)}
html[data-theme] :is(.formerr,.err){color:var(--err)}
html[data-theme] .pill{background:var(--chipbg)}
html[data-theme] .dz .pill{background:color-mix(in srgb,var(--gold) 10%,transparent);border-color:color-mix(in srgb,var(--gold) 35%,transparent);white-space:normal;line-height:1.35}
html[data-theme] :is(.reply,.fopt){background:var(--field);border-color:var(--field-line)}
html[data-theme] :is(.shot,.bookimg){box-shadow:var(--shadow)}
html[data-theme] .tssb div{background:var(--wash)}
html[data-theme] .sheet{background:var(--panel)}

/* ---------- contrast fixes (4.5:1 in both modes) ---------- */
html[data-theme] .disclaimer{color:var(--ink3)}
/* rust fills carry white text: deepen the fill just enough (white on #C43C12 = 5.25:1) */
html[data-theme] :is(.btn.rust,.go.rust){background:#C43C12!important;border-color:#C43C12!important;color:#fff!important}
html[data-theme] .btn.rust:hover{background:#B3350F!important;border-color:#B3350F!important}
/* Directory buttons: sky fill with black text in every scope (on paper --gold is deep blue TEXT, not a fill) */
html[data-theme] .go:not(.ghost,.rust){background:var(--sky);color:var(--sky-ink)}
html[data-theme] .go.ghost{border-color:var(--ghost)}

/* ---------- the sun / moon button ---------- */
.bu-tt{display:none}
html[data-theme] .bu-tt{flex:none;display:inline-grid;place-items:center;width:40px;height:40px;padding:0;margin:0 0 0 14px;border:1px solid #ffffff2e;border-radius:999px;background:transparent;color:#f5f3ee;cursor:pointer;transition:border-color .15s,color .15s}
html[data-theme] .bu-tt:hover{border-color:#7fb3d8;color:#7fb3d8}
html[data-theme] .bu-tt:focus-visible{outline:2px solid #7fb3d8;outline-offset:2px}
.bu-tt svg{display:none;width:19px;height:19px}
html[data-theme=dark] .bu-tt svg:first-child,html[data-theme=light] .bu-tt svg:last-child{display:block}
html[data-theme] .bu-float{position:fixed;top:12px;right:12px;z-index:60;background:#0a0a0ad9;margin:0}
html[data-theme] .nav .brand{margin-right:auto}
html[data-theme] .nav .wrap>.links{order:2}
html[data-theme] .nav .bu-tt{order:3;margin:0 0 0 18px}
@media(max-width:900px){html[data-theme] .nav .bu-tt{margin:0 12px 0 0}html[data-theme] .nav .burger{order:4}}

/* print: always paper, no frame */
@media print{html[data-theme] :is(body,.nav,.hero,.bu-hero,section,body>footer){background:#fff!important;color:#141412!important}.bu-tt{display:none!important}}

/* "Also from Build Until" (alsofrom.js) on paper: its own tokens */
html[data-theme=dark] body>section.afbu:nth-of-type(even),html[data-theme=light] section.afbu,html[data-theme=light] .dz .afbu{
  --af-bg:var(--bg);--af-card:#FBFAF6;--af-line:#1414141f;--af-ink:#141412;--af-ink2:#45433C;--af-ink3:#5E5B52;--af-sky:#1F5F8B;--af-rust:#B3350F;border-top-color:transparent}
html[data-theme] :is(section.afbu,.dz .afbu) .afbu-go{background:#7fb3d8;color:#0a0a0a}
html[data-theme] :is(section.afbu,.dz .afbu) .iw .afbu-go{background:var(--af-rust);color:#fff}
html[data-theme] :is(section.afbu,.dz .afbu) .afbu-go.ghost{background:transparent;color:var(--af-ink);border-color:color-mix(in srgb,var(--af-ink) 30%,transparent)}
html[data-theme] :is(section.afbu,.dz .afbu) .afbu-pts li{border-bottom-color:color-mix(in srgb,var(--af-ink) 8%,transparent)}
html[data-theme] :is(section.afbu,.dz .afbu) .afbu-soon{border-color:color-mix(in srgb,var(--af-ink) 22%,transparent)}
html[data-theme] :is(section.afbu,.dz .afbu) .afbu-note{background:color-mix(in srgb,var(--af-ink) 3%,transparent)}
html[data-theme] :is(section.afbu,.dz .afbu) .afbu-form :is(input,select,textarea){background:color-mix(in srgb,var(--af-card) 60%,var(--af-bg))}
