/* ============================================================================
   Third ARK · v3.css · the shared stylesheet for every v3 page
   Drawn from the home page the Chairman signed off on 24 October 2026.
   Page-specific styles stay in each page; everything shared lives here.
   ========================================================================== */

@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces-VF.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces-Italic-VF.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-VF.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --stone: #1A1917; --stone2: #201F1D; --well: #141312; --deep: #0F0E0D; --hair: #2E2B28; --hair2: #38352F;
  --ink: #E5E2E1; --soft: #CFC9C4; --body: #B8B0A8; --mute: #8E847A;
  --brass: #C09A6B; --brass-deep: #A0784A; --glow: #D6BD9F; --dead: #7B7B7B;
  --coral: #E08A72; --sage: #A3B58C; --sky: #8FB3CC; --gold: #D6B25E;
  --paper: #F9F8F5; --paper-ink: #211A14; --paper-ink2: #534438; --paper-rule: #C9C4BC; --bronze-paper: #7C6A38;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --edge: 24px; --gutter: 28px; --shell: 1280px;
  /* THE SPACING SCALE. Every gap on the site is one of these, nothing else.
     s1 a label to its value · s2 inside a module · s3 heading to text, text to text
     s4 block to block inside a section · s5 section to section (half above, half below the rule) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 48px; --s5: 96px; --gut: 28px;
  /* THE TYPE SCALE */
  --t-h1: clamp(44px, 4.7vw, 68px); --t-h2: clamp(36px, 3.7vw, 52px); --t-h3: 28px; --t-h4: 21px;
  --t-lead: clamp(21px, 1.75vw, 25px); --t-body: 18px; --t-small: 15.5px; --t-label: 11.5px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --expo: cubic-bezier(0.16, 1, 0.3, 1); --easy: cubic-bezier(.65, 0, .35, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--serif); font-optical-sizing: auto; font-size: 19px; line-height: 1.55; font-feature-settings: "kern", "liga", "onum"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.mono { font-family: var(--mono); font-feature-settings: normal; }
sup { font-size: 0.42em; vertical-align: 1.05em; line-height: 0; letter-spacing: 0; }

/* the two vertical rules of the grid */
.rules::before, .rules::after { content: ""; position: fixed; top: 0; bottom: 0; width: 1px; background: rgba(160, 120, 74, 0.2); pointer-events: none; z-index: 1; }
.rules::before { left: max(var(--edge), calc(50% - 616px)); }
.rules::after { right: max(var(--edge), calc(50% - 616px)); }
.wrap { max-width: var(--shell); margin: 0 auto; padding: 0 calc(var(--edge) + var(--gutter)); position: relative; z-index: 2; }

/* house ink: the app's glow and grain on Fraunces 20px and up */
.lit { --c: 229, 226, 225; color: transparent; padding-bottom: 0.12em; margin-bottom: -0.12em; background-image: url("../images/grain.png"), linear-gradient(rgb(var(--c)), rgb(var(--c))); background-size: 180px 180px, 100% 100%; -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 0.5px rgba(var(--c), 0.35)) drop-shadow(0 0 4.5px rgba(var(--c), 0.18)) drop-shadow(0 0 11px rgba(var(--c), 0.2)); }
.lit.brass { --c: 192, 154, 107; }
.lit.glow { --c: 214, 189, 159; }

/* ================= NAV ================= */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(26, 25, 23, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--brass-deep); }
.nav-inner { max-width: var(--shell); margin: 0 auto; padding: 14px calc(var(--edge) + var(--gutter)); display: flex; align-items: center; gap: 1.6rem; position: relative; }
.nav-wordmark { display: flex; align-items: baseline; gap: .55rem; font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: .05em; white-space: nowrap; color: var(--ink); }
.nav-wordmark img { height: 17px; width: auto; transform: translateY(2px); }
.nav-wordmark .proto { color: var(--ink); }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.nav-links a { color: #9A8F84; padding: 6px 0; border-top: 2px solid transparent; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .12s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--brass); }
.btn-secondary { display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--ink); background: none; border: 1px solid var(--brass-deep); padding: 7px 17px; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.btn-secondary:hover { background: var(--brass); color: #0D0D0D; border-color: var(--brass); }
.nav .btn-secondary { margin-right: calc(-1 * var(--gutter)); }
.nav-toggle, .nav-burger { display: none; }

/* ================= BUTTONS ================= */
.btn-ink { display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .06em; background: var(--brass); color: #0D0D0D; padding: 17px 30px; border: 0; cursor: pointer; transition: background .12s, color .12s, box-shadow .12s; }
.btn-ink:hover { background: var(--stone); color: var(--brass); box-shadow: inset 0 0 0 2px var(--brass); }
.btn-line { display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .06em; color: var(--soft); padding: 16px 28px; border: 1px solid var(--hair2); background: none; cursor: pointer; transition: border-color .12s, color .12s; }
.btn-line:hover { border-color: var(--brass); color: var(--ink); }

/* ================= SECTIONS ================= */
.sec { padding: calc(var(--s5) / 2) 0; position: relative; }
/* THE STACK: blocks inside a section sit one s4 apart, whatever they are */
.sec > .wrap > * + *, .phero > .wrap > * + * { margin-top: var(--s4) !important; }
.sec > .wrap > .shead + * { margin-top: var(--s4) !important; }
.phero > .wrap > .crumb + * { margin-top: var(--s3) !important; }
.shead { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 14px; border-top: 1px solid rgba(160, 120, 74, 0.5); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.shead b { font-weight: 500; color: var(--brass); }
.shead b i { font-style: normal; color: var(--mute); padding: 0 .6em; }
.cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: center; }
/* THE SPLIT: every two-column layout breaks at the middle of the 12-column grid, so a
   right-hand column always starts on the same line as a right-hand box below it.
   The right column is centred on the left one; .stretch makes both the same height. */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gut); row-gap: var(--s4); align-items: center; }
.split.top { align-items: start; }
.split.stretch, .cols.stretch { align-items: stretch; }
.split.stretch > *, .cols.stretch > * { min-height: 100%; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gut); row-gap: var(--s4); }
.quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gut); row-gap: var(--s4); }
/* an aside: a short line and a link, hung from a hairline instead of boxed */
.aside { border-top: 1px solid var(--hair2); padding-top: var(--s4); }
.aside .lead { font-size: var(--t-lead); line-height: 1.42; font-weight: 500; color: var(--ink); max-width: 24em; }
.aside .go { justify-self: start; align-self: center; }
/* a caption under an object */
.cap { margin-top: var(--s2); font-family: var(--mono); font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
/* text inside a column: s3 between pieces */
.tx > * + * { margin-top: var(--s3) !important; }
.span7, .span6, .span5 { grid-column: 1 / span 6; } .span4 { grid-column: 1 / span 4; }
.r5, .r6, .r7 { grid-column: 7 / span 6; } .r4 { grid-column: 9 / span 4; }
.cols.mid { align-items: center; }
.h2 { margin-top: 0; font-weight: 500; font-size: var(--t-h2); line-height: 1.04; letter-spacing: -0.018em; word-spacing: 0.04em; font-variation-settings: "opsz" 144; }
.h2 .nw { white-space: nowrap; display: block; }
.lines { margin-top: var(--s3); font-size: var(--t-lead); line-height: 1.42; color: var(--ink); font-weight: 500; letter-spacing: -0.006em; }
.lines span { display: block; }
.h2 + .lines, .h2 + .body, .lines + .body { margin-top: var(--s3); }
.lines:first-child, .body:first-child, .h2:first-child { margin-top: 0; }
.h3 { font-weight: 600; font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.012em; }
.h4 { font-weight: 600; font-size: var(--t-h4); line-height: 1.25; }
.small { font-size: var(--t-small); line-height: 1.6; color: var(--body); }
.body { margin-top: var(--s3); font-size: var(--t-body); line-height: 1.7; color: var(--body); max-width: 31em; }
.body strong { font-weight: 500; color: var(--ink); }
.body a, .inline-link { color: var(--ink); border-bottom: 1px solid rgba(192, 154, 107, 0.55); transition: border-color .12s; }
.body a:hover, .inline-link:hover { border-color: var(--brass); }
.kick { font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }
.lab { font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; color: var(--mute); text-transform: uppercase; }

/* the inner page's own header (smaller than the home page's) */
.phero { padding: var(--s5) 0 calc(var(--s5) / 2); position: relative; overflow: clip; }
.crumb { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.crumb i { font-style: normal; color: var(--mute); padding: 0 .55em; }
.h1p { margin-top: var(--s3); font-weight: 500; font-size: var(--t-h1); line-height: 1.0; letter-spacing: -0.024em; word-spacing: 0.05em; font-variation-settings: "opsz" 144; }

/* reveal on reaching */
.rv { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1.1s var(--expo); }
.in .rv { opacity: 1; transform: none; }
.in .rv.d1 { transition-delay: .12s; } .in .rv.d2 { transition-delay: .24s; } .in .rv.d3 { transition-delay: .36s; } .in .rv.d4 { transition-delay: .48s; }

/* ================= SURFACES ================= */
.plate { margin: 72px calc(-1 * var(--gutter)) 0; padding: var(--gutter); background: #ECE9E3; position: relative; }
.plate::before { content: ""; position: absolute; inset: 0; background: url("../images/grain.png"); background-size: 180px; opacity: .35; mix-blend-mode: multiply; pointer-events: none; }
.pane { background: #22201E; border: 1px solid var(--brass); }
/* BOXES ARE FOR OBJECTS. Text never sits in a bordered box: a card is open, hung from a rule. */
.card { color: var(--ink); border-top: 1px solid var(--brass); padding-top: var(--s3); display: flex; flex-direction: column; }
.card .kicker { font-family: var(--mono); font-size: var(--t-label); letter-spacing: .2em; color: var(--brass); text-transform: uppercase; }
.card h3 { margin-top: var(--s2); font-weight: 600; font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.012em; color: var(--glow); }
.card p { margin-top: var(--s2); font-size: var(--t-body); line-height: 1.6; color: var(--body); max-width: 34em; }
.card p:last-of-type { margin-bottom: var(--s3); }
.golink { justify-self: start; }
.card a { margin-top: auto; align-self: flex-start; }
.card a, .golink { font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: var(--ink); padding: 4px 0; border-bottom: 1px solid var(--brass); transition: color .12s, border-color .12s; }
.card a:hover, .golink:hover { color: var(--brass); }
.card a::after, .golink::after { content: ""; display: inline-block; width: 18px; height: 1px; margin-left: 10px; vertical-align: middle; background: currentColor; transition: width .2s var(--ease); }
.card a:hover::after, .golink:hover::after { width: 30px; }

/* ================= FORMS ================= */
.field { width: 100%; min-height: 54px; background: transparent; border: 0; border-bottom: 1px solid #6D655D; color: var(--ink); padding: 0; font: inherit; font-size: 23px; font-weight: 300; outline: none; border-radius: 0; }
.field::placeholder { color: #5E5750; }
.field:focus { border-bottom-color: var(--brass); }
.chk { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 18px; color: var(--soft); cursor: pointer; }
.chk input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid #6D655D; display: grid; place-items: center; cursor: pointer; }
.chk input:checked { border-color: var(--brass); background: var(--brass); box-shadow: inset 0 0 0 3px var(--stone); }

/* ================= FOOTER ================= */
.foot { border-top: 1px solid var(--brass-deep); position: relative; z-index: 2; background: var(--stone); }
.foot-inner { max-width: var(--shell); margin: 0 auto; padding: 0 calc(var(--edge) + var(--gutter)) 22px; }
.foot-top { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 1.8rem; border-bottom: 1px solid var(--hair2); padding: 31.5px 0 30.5px; } /* the nav sits halfway between the footer's top rule and this rule, measured on the ink */
.foot-nav { display: flex; gap: 1.8rem; flex-wrap: wrap; justify-self: end; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.foot-nav a { color: #9A8F84; } .foot-nav a:hover { color: var(--brass); }
.foot-big { padding: 64px 0 66px; text-align: center; font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.012em; text-wrap: balance; }
.foot-seal { text-align: center; border-top: 1px solid var(--hair2); padding-top: 18px; font-family: var(--mono); font-size: 11px; color: #9A8F84; letter-spacing: .06em; line-height: 1.9; }
.foot-seal b { font-weight: 400; color: var(--brass); }

@keyframes breath { from { opacity: 0.25; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .play, .play * { animation: none !important; }
}
@media (max-width: 1140px) {
  .nav-inner { gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .nav .btn-secondary { margin-left: auto; margin-right: 0; font-size: 12px; padding: 7px 12px; }
  .nav-toggle { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
  .nav-burger { display: flex; order: 3; align-items: center; justify-content: flex-end; width: 44px; height: 36px; margin-right: calc(-1 * var(--gutter)); cursor: pointer; }
  .nav-burger i, .nav-burger i::before, .nav-burger i::after { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .2s; }
  .nav-burger i { position: relative; }
  .nav-burger i::before, .nav-burger i::after { content: ""; position: absolute; left: 0; }
  .nav-burger i::before { top: -7px; } .nav-burger i::after { top: 7px; }
  .nav-toggle:checked ~ .nav-burger i { background: transparent; }
  .nav-toggle:checked ~ .nav-burger i::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger i::after { top: 0; transform: rotate(-45deg); }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; margin: 0; padding: 0 calc(var(--edge) + var(--gutter)) 6px; background: var(--stone); border-bottom: 1px solid var(--brass-deep); letter-spacing: .08em; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links a { padding: 14px 0; border-top: 0; border-bottom: 1px solid var(--hair2); }
  .nav-links a:last-child { border-bottom: 0; }
}
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; row-gap: var(--s3); }
  .phero .cols { row-gap: var(--s4); }
  .span7, .span6, .span5, .span4, .r5, .r6, .r4, .r7 { grid-column: auto; }
  :root { --s4: 40px; --s5: 80px; }
  .cols, .split, .trio { grid-template-columns: 1fr; row-gap: var(--s4); }
  .quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --edge: 14px; --gutter: 18px; --gut: 18px; --s3: 20px; --s4: 32px; --s5: 64px; --t-h3: 24px; --t-h4: 19px; }
  /* on a phone the lines beside a headline run on as one sentence; the break is for wide screens */
  .lines span { display: inline; }
  .lines span + span::before { content: " "; }
  .quad { grid-template-columns: 1fr; }
  body { font-size: 18px; }
  .nav-wordmark { font-size: 14px; }

  .shead > span { display: none; }

  .h2 .nw { white-space: normal; }

  .body { font-size: 17px; }

  .chk { font-size: 16.5px; }
  .foot-top { grid-template-columns: 1fr; gap: 14px; }
  .foot-nav { justify-self: start; gap: .4rem 1.2rem; }
  .foot-big { padding: 44px 0 46px; }
}
@media (max-width: 360px) {
  .nav-inner { gap: 8px; }
  .nav-wordmark { font-size: 12.5px; gap: .4rem; }
  .nav-wordmark img { height: 14px; }
  .nav .btn-secondary { font-size: 11px; padding: 6px 9px; letter-spacing: .03em; }
  .nav-burger { width: 36px; }
}

/* ================= SHARED COMPONENTS (added for the full v3 build) ================= */
/* join forms: Ghost's own signup; messages by state */
.join-form .msg { display: none; margin-top: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.join-form.success .msg.ok { display: block; color: var(--brass); }
.join-form.error .msg.err { display: block; color: var(--coral); }
.join-form.preview .msg.pv { display: block; color: var(--soft); text-transform: none; letter-spacing: .02em; font-size: 12.5px; line-height: 1.6; }
.join-form.loading .btn-ink { opacity: .6; pointer-events: none; }
/* the join band that closes most pages */
/* the closing band: a change of tone across the full width, not another box */
.joinband-sec { background: var(--well); border-top: 1px solid var(--hair2); padding: var(--s4) 0; }
.joinband-sec + .foot { border-top-color: var(--hair2); }
.joinband { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gut); align-items: center; }
.joinband .h2 { margin-top: 0; }
.joinband .body { margin-top: var(--s3); }
.joinband form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.joinband .field { flex: 1 1 240px; }
.joinband .msg { flex-basis: 100%; }
/* ruled rows (ledger) */
.rows { border-top: 1px solid var(--hair2); }
.rows > * { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: var(--s3); align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--hair2); }
.rows .n { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--brass); }
.rows h4 { font-weight: 600; font-size: var(--t-h4); line-height: 1.25; }
.rows p { margin-top: var(--s1); font-size: var(--t-small); line-height: 1.55; color: var(--body); }
.rows .st { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.rows .st.now { color: var(--brass); }
/* a small switch */
.sw { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); background: none; border: 0; padding: 0; }
.sw .tr { width: 46px; height: 24px; border: 1px solid #6D655D; position: relative; transition: background .3s, border-color .3s; }
.sw .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #6D655D; transition: left .3s var(--ease), background .3s; }
.sw[aria-pressed="true"] .tr { border-color: var(--brass); background: rgba(192, 154, 107, 0.25); }
.sw[aria-pressed="true"] .tr::after { left: 25px; background: var(--brass); }
/* segmented choice */
.seg { display: inline-flex; border: 1px solid var(--hair2); }
.seg button { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 10px 16px; border: 0; background: none; color: var(--soft); cursor: pointer; transition: background .15s, color .15s; }
.seg button + button { border-left: 1px solid var(--hair2); }
.seg button[aria-pressed="true"] { background: var(--brass); color: #0D0D0D; }
.soon { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.now { color: var(--brass); }
.pullq { font-weight: 500; font-size: var(--t-h2); line-height: 1.12; letter-spacing: -0.016em; }
@media (max-width: 980px) { .joinband { grid-template-columns: 1fr; row-gap: var(--s3); } }
@media (max-width: 640px) { .rows > * { grid-template-columns: 1fr; gap: 6px; } }

/* ================= LIGHT MODE (the Library and its reading pages only) ================= */
html[data-theme="light"] { --stone: #F6F3EE; --stone2: #EFEBE4; --well: #ECE7DF; --deep: #EFEBE4; --hair: #DDD6CB; --hair2: #D2C9BB; --ink: #211A14; --soft: #3E332A; --body: #534438; --mute: #7E7062; --brass: #8A6A3E; --brass-deep: #7C6A38; --glow: #6E5238; }
html[data-theme="light"] body { background: var(--stone); }
html[data-theme="light"] .lit { --c: 33, 26, 20; filter: none; }
html[data-theme="light"] .lit.brass, html[data-theme="light"] .lit.glow { --c: 110, 82, 56; }
html[data-theme="light"] .nav { background: rgba(246, 243, 238, 0.94); }
html[data-theme="light"] .nav-links a { color: #6E6255; }
html[data-theme="light"] .nav-links a:hover, html[data-theme="light"] .nav-links a.active { color: var(--ink); }
html[data-theme="light"] .nav-burger i, html[data-theme="light"] .nav-burger i::before, html[data-theme="light"] .nav-burger i::after { background: var(--ink); }
html[data-theme="light"] .nav-toggle:checked ~ .nav-burger i { background: transparent; }
html[data-theme="light"] .nav-wordmark img, html[data-theme="light"] .ark-img { filter: brightness(0.45) sepia(0.6); }
html[data-theme="light"] .btn-ink { color: #F9F8F5; }
html[data-theme="light"] .btn-secondary:hover, html[data-theme="light"] .card a:hover, html[data-theme="light"] .seg button[aria-pressed="true"] { color: #F9F8F5; }
html[data-theme="light"] .pane, html[data-theme="light"] .card { background: #FBF9F5; }
html[data-theme="light"] .foot { background: var(--stone); }
html[data-theme="light"] .foot-nav a { color: #6E6255; }
html[data-theme="light"] .rules::before, html[data-theme="light"] .rules::after { background: rgba(124, 106, 56, 0.22); }
html[data-theme="light"] .field { color: var(--ink); border-bottom-color: #A99B8A; }
.themesw { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(26, 25, 23, 0.92); border: 1px solid var(--brass-deep); color: var(--soft); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.themesw i { width: 14px; height: 14px; border: 1px solid currentColor; display: block; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
html[data-theme="light"] .themesw { background: rgba(246, 243, 238, 0.95); color: var(--ink); }

/* ================= THE GRID CONNECTS =================
   The two vertical rules sit one gutter outside the text. A horizontal rule that runs the
   full width reaches out to meet them; its contents stay where they were. */
.sec > .wrap > :is(.shead, .aside, .leaves, .srcs, .tests, .terr),
.phero > .wrap > .joinstrip { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.sec > .wrap > :is(.rows, .never, .terms2, .rules4, .ents) { margin-inline: calc(-1 * var(--gutter)); }
.sec > .wrap > :is(.rows, .never, .terms2, .rules4, .ents) > * { padding-inline: var(--gutter); }
/* section rules and the closing band stop at the vertical rules too */
.joinband-sec { background: none; border-top: 0; }
.joinband-sec::before { content: ""; position: absolute; top: 0; bottom: 0; left: max(var(--edge), calc(50% - 616px)); right: max(var(--edge), calc(50% - 616px)); background: var(--well); border-top: 1px solid var(--hair2); pointer-events: none; }
.joinband-sec > .wrap { position: relative; z-index: 2; }
.phero > .wrap > .plate2, .shelfwrap > .plank { margin-inline: calc(-1 * var(--gutter)); }
.phero > .wrap > .plate2 { padding-inline: var(--gutter); }
/* on a phone or tablet every column runs the full width, so its rules reach the vertical rules too */
@media (max-width: 980px) {
  :is(.split, .trio, .quad, .cols, .tx) > :is(.card, .case2, .desk2, .tier, .stage, .daybox, .join2),
  .promise > div, .lists .item, .read4 > div { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  :is(.split, .trio, .cols, div) > :is(.rows, .specs, .three, .legend, .bin, .stages) { margin-inline: calc(-1 * var(--gutter)); }
  :is(.split, .trio, .cols, div) > :is(.rows, .specs, .three, .legend, .stages) > *, .bin > * { padding-inline: var(--gutter); }
  .sec > .wrap > :is(.tests, .srcs, .terr) { padding-inline: 0; }
  .sec > .wrap > :is(.tests, .srcs, .terr) > * { padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }
}
