/* Shared structural styles for both editions. Colors come entirely from the
   active theme file's token contract; this file never hard-codes brand colors. */

html { scroll-behavior: smooth; background: var(--bg); }

/* Themed scrollbars (desktop / precise pointers). Colors come from the token
   contract, so each edition + light/dark theme gets its own automatically:
   a muted thumb derived from --ink, brightening to the brand --accent on hover. */
@media (pointer: fine) {
  html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 26%, transparent) transparent; }
  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 7px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
  ::-webkit-scrollbar-corner { background: transparent; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; position: relative; }
.container { max-width: 1180px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
main { flex: 1; }

/* Opt-in vertical centering: a page wraps its content in `.page-center` to have
   it centered in the space between nav and footer. main already fills that space
   (flex:1 in the full-height .page); making it a column flex context lets the
   wrapper's auto block margins center it vertically. The wrapper itself stays a
   plain block, so its sections keep their normal full-width left-aligned flow. */
main:has(> .page-center) { display: flex; flex-direction: column; }
.page-center { margin-block: auto; }


h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.1; }
.eyebrow {
  font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--eyebrow);
}
.muted { color: var(--muted); }
.accent { color: var(--accent); }
/* --code, not --accent: the accent is tuned for links and fails 1.4.3 as body-size
   code on some themes, and --code exists precisely for this (10.5:1 both skins). */
code { color: var(--code); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-weight: 600; font-size: 16px; padding: 13px 24px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: filter .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent)); }
/* Two fixes here. --on-grad, not #fff: white over the terminal palette's green->cyan
   gradient is 1.78:1, so each theme states the colour its own gradient can carry.
   And --accent-fill for the first stop, not --accent: the accent is tuned to be
   legible AS text on the page background, which on flux means lightening it — the
   opposite of what a stop carrying white text needs. Fill tokens are the ones sized
   for text sitting on top. */
.btn-gradient { background: linear-gradient(100deg, var(--accent-fill, var(--accent)), var(--accent2)); background-origin: border-box; color: var(--on-grad, #fff); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: none; }
/* Hover: subtle in-place feedback — no translate, so buttons don't jump.
   Each variant re-asserts its own text color; the global `a:hover` (reset.css)
   would otherwise recolor the label to --accent and tank contrast. */
.btn-primary:hover { color: var(--on-accent-fill, var(--on-accent)); filter: brightness(1.06); }
.btn-gradient:hover { color: var(--on-grad, #fff); filter: brightness(1.08); }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn-sm { padding: 9px 16px; font-size: 14.5px; border-radius: 8px; }

/* ---- cross-ref ribbon ---- */
.ribbon {
  position: relative; z-index: 61;
  background: var(--surface2); border-bottom: 1px solid var(--line);
}
.ribbon .container { padding-top: 9px; padding-bottom: 9px; text-align: center; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.ribbon a { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* ---- nav ---- */
.nav {
  position: sticky; top: -1px; z-index: 60;
  background: var(--navbg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 74px; }
/* Brand lockup: square glyph left of a name(+optional slogan) text block.
   Common pattern across logo variants — the glyph is sized to the text block's
   height: name-only for the plain variant, name+slogan for the stacked variant.
   --mark holds that height per variant. */
.brand { --mark: 15px; display: inline-flex; align-items: center; gap: 16px; margin-right: auto; color: var(--accent); }
.brand--stacked { --mark: 35px; }
.brand--lg { --mark: 17px; }
.brand--lg.brand--stacked { --mark: 37px; }
.brand__mark { display: flex; align-items: center; flex: none; }
/* glyph viewBox is 42x28 (tight to the artwork) -> width = height * 1.5 */
.brand__mark svg { height: var(--mark); width: calc(var(--mark) * 1.5); display: block; }
.brand__text { display: flex; flex-direction: column; justify-content: center; }
/* Brand name always uses the Flux (.com) display face so the logo is identical
   across editions, regardless of each theme's --font-display. */
.brand__name { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 19px; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.brand__slogan { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.1; margin-top: 9px; white-space: nowrap; }
.brand--lg .brand__name { font-size: 21.5px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link {
  font-family: var(--font-mono); font-size: 16.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; color: var(--ink); white-space: nowrap;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-outline { border: 1px solid var(--line); padding: 8px 13px; border-radius: 8px; font-family: var(--font-mono); font-size: 16px; white-space: nowrap; }

.burger {
  display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
}

/* mobile nav drawer */
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--navbg); backdrop-filter: blur(14px); }
.mobile-nav.open { display: block; }
.mobile-nav .container { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 16px; }
.mobile-nav a { padding: 13px 6px; color: var(--ink); font-size: 17px; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: none; }

/* ---- theme toggle (segmented) ---- */
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.theme-toggle button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; color: var(--muted);
}
.theme-toggle button[aria-pressed="true"] { background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent)); }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
/* Card titles sit directly under the page H1, so they are <h2>; h3 kept for any
   card markup still using it. */
.card h2, .card h3 { font-size: 20.5px; margin-bottom: 8px; font-weight: 700; }
.card p { font-size: 16px; color: var(--muted); line-height: 1.6; }
/* Clickable cards get the same accent-border hover as .post-card (blog) and
   .api-ref-card (/api/) — same transition, same token, so all three match.
   Scoped to `a.card`: the plain <div class="card"> feature blocks on / and the
   principle blocks on /intro/ are not links, and hover feedback on something
   that cannot be clicked is misleading. */
a.card { transition: border-color .15s ease; }
a.card:hover { border-color: var(--accent); text-decoration: none; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.section { padding-top: 44px; padding-bottom: 44px; }
/* container-query context (kept for any component that opts into @container) */
.section-label { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .16em; color: var(--muted); margin-bottom: 20px; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); background: var(--surface2); margin-top: 40px; }
/* Five columns since Legal (privacy / terms / cookie settings) became its own,
   rather than a tail on Project and Commercial. The count is explicit, not
   auto-fit: a hardcoded `1.4fr 1fr 1fr 1fr` silently wrapped the fifth child onto
   a second row at the brand column's width. `repeat(4, minmax(0, 1fr))` keeps the
   four link columns equal and lets them shrink — plain `1fr` has a min-content
   floor, so "@imqueue/core" and "Cookie settings" would push the grid wider than
   the container instead of wrapping. Gap trimmed to 28px to pay for the column. */
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 48px; padding-bottom: 30px; }
.footer h4 { font-family: var(--font-mono); color: var(--muted); letter-spacing: .1em; font-size: 13.5px; margin-bottom: 12px; font-weight: 600; text-transform: uppercase; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.footer-links a:hover { color: var(--accent); }
.footer-brand-desc { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 260px; margin-top: 4px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 18px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 16.5px; color: var(--muted); }

/* ---- tutorial layout (chapter sidebar + content) ---- */
.tut-layout { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: start; }
.tut-side { position: sticky; top: 90px; font-family: var(--font-mono); font-size: 14.5px; }
.tut-side .lbl { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: 13.5px; margin-bottom: 14px; }
.tut-ch { display: block; padding: 10px 12px; border-radius: 8px; color: var(--muted); margin-bottom: 2px; }
.tut-ch:hover { color: var(--accent); }
.tut-ch.active { background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent)); font-weight: 600; }
.tut-nav { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 22px; }
.tut-nav a { font-family: var(--font-mono); font-size: 14.5px; border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; color: var(--ink); }
.tut-nav a:hover { border-color: var(--accent); color: var(--accent); }
.tut-nav .next { background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent)); border-color: transparent; font-weight: 600; }
.tut-nav .next:hover { color: var(--on-accent); }
@media (max-width: 860px) {
  .tut-layout { grid-template-columns: minmax(0, 1fr); }
  .tut-side { position: static; margin-bottom: 24px; }
}

/* ---- responsive (media queries) ---- */
/* Nav collapses to the burger *before* its items would run out of room and wrap.
   The com (Flux) nav carries more items than org (Terminal), so each edition
   switches at its own measured width. */
@media (max-width: 1000px) {
  [data-skin="flux"] .nav-links, [data-skin="flux"] .nav-actions { display: none; }
  [data-skin="flux"] .burger { display: inline-flex; }
}
@media (max-width: 1000px) {
  [data-skin="terminal"] .nav-links, [data-skin="terminal"] .nav-actions { display: none; }
  [data-skin="terminal"] .burger { display: inline-flex; }
}
/* Five footer columns need ~1000px. Below that they squeeze past the point the
   longest link survives: measured at 768px, five columns are 108px each and
   "@imqueue/core" clips — minmax(0, 1fr) lets a column go under its content's
   min-width, which is what stops the grid overflowing the container but also means
   nothing stops the text. Three columns is the honest intermediate; it must sit
   ABOVE the ≤760px rule below, or it would win there too and undo the 2-column
   mobile footer. */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* ≤760px = content mobile layout */
@media (max-width: 760px) {
  .nav-links, .nav-actions { display: none; }
  .burger { display: inline-flex; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Shrink headings whose size a template sets INLINE — post.html, docs.html,
     cli.html, mcp.html, tutorial.html, /intro/, the blog and topic hubs, the com
     heroes, 404 — at 34-46px they are far too big on a phone. `!important` is
     the only thing that beats a style attribute, which is why it is here.

     Everything in :not() owns its own size and must keep it. Three of them own an
     explicit MOBILE size that this rule was silently overriding — .prose h1/h2
     (prose.css:195-196), .hero h1 (org/index.html) and .fx-h2/.fx-thanks h2
     (flux.css:142,118) — so those media queries had no effect at all. The
     component ones were the visible damage: .aside-box h2 and .blog-archive h2
     are 13.5px uppercase mono labels and were rendering at 29.5px, so every blog
     post showed "Written by" and the sidebar headings at section-heading size,
     and .card/.post-card titles were as large as the sections containing them.

     .fx-h1 is deliberately NOT excluded: the com heroes carry an inline 44-46px
     that beats flux.css's own 38px mobile rule, so this is what shrinks them. */
  h1:not(.prose h1, .hero h1) { font-size: 38.5px !important; }
  h2:not(.prose h2, .card h2, .post-card h2, .aside-box h2, .blog-archive h2, .fx-h2, .fx-thanks h2) { font-size: 29.5px !important; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- image lightbox (click a screenshot to view it full size) ---- */
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  background: color-mix(in srgb, var(--bg) 82%, #000); backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.lightbox__img {
  max-width: min(92vw, 1100px); max-height: 86vh; width: auto; height: auto;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: default;
}
.lightbox__cap { font-family: var(--font-mono); font-size: 14.5px; color: var(--muted); text-align: center; }
.lightbox__cap[hidden] { display: none; }
.lightbox__close {
  position: fixed; top: 16px; right: 18px; width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 25px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Blog ------------------------------------------------------------- */
.blog-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 40px; align-items: start; }
/* minmax(0,…), not a bare 1fr: `1fr` floors at the content's min-content width,
   so a wide child (code block, table) stretches the track past the viewport. */
@media (max-width: 900px) { .blog-layout { grid-template-columns: minmax(0, 1fr); } }

.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-card { display: flex; flex-direction: column; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; text-decoration: none; color: inherit; transition: border-color .15s ease; }
.post-card:hover { border-color: var(--accent); }
.post-card-meta { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); margin: 0; }
.post-card-meta a { color: var(--accent); text-decoration: none; }
/* Card titles are <h2>: they are the page's top-level content under the H1, and
   as <h3> they made /blog/ and the author pages skip H1->H3. h3 kept in the
   selector for any card markup still using it. */
.post-card h2, .post-card h3 { font-size: 25px; margin: 0; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
.post-card-art { border-radius: 8px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); padding: 24px 0; display: flex; justify-content: center; }
.post-card-art .post-illu { width: 100%; max-width: 480px; height: auto; display: block; }
.post-hero { border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); margin-bottom: 24px; padding: 28px 0; display: flex; justify-content: center; }
.post-hero .post-illu { width: 100%; max-width: 560px; height: auto; display: block; }
.post-card p { font-size: 17px; color: var(--muted); line-height: 1.6; margin: 0; }
.post-card-more { font-family: var(--font-mono); font-size: 14.5px; color: var(--accent); }

.blog-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
/* Sidebar box headings are <h2>: they are page-level sections, and as <h4> they
   made every post's outline skip H2->H4. h4 kept in the selector so any
   not-yet-migrated markup keeps the same look. */
.aside-box h2, .aside-box h4 { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.aside-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.aside-links a { color: var(--ink); text-decoration: none; font-size: 16px; line-height: 1.4; }
.aside-links a:hover { color: var(--accent); }
.aside-links .meta { display: block; font-family: var(--font-mono); font-size: 12.5px; color: color-mix(in srgb, var(--muted) 68%, var(--bg)); margin-top: 3px; }

.blog-search input { width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); font-family: var(--font-mono); font-size: 16px; }
.blog-search input:focus { outline: none; border-color: var(--accent); }
.search-results { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.search-results:empty { display: none; }
.search-results a { display: block; color: var(--ink); text-decoration: none; font-size: 16px; line-height: 1.4; }
.search-results a:hover { color: var(--accent); }
.search-results .meta { display: block; font-family: var(--font-mono); font-size: 12.5px; color: color-mix(in srgb, var(--muted) 68%, var(--bg)); margin-top: 3px; }
.search-note { font-size: 14.5px; color: var(--muted); margin: 10px 0 0; }
.search-note[hidden] { display: none; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; font-family: var(--font-mono); font-size: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent)); border-color: transparent; }
.pagination .disabled { opacity: .4; pointer-events: none; }

.post-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 44px; align-items: start; }
/* See .blog-layout above: a bare `1fr` let long `pre` lines widen the whole page. */
@media (max-width: 900px) { .post-layout { grid-template-columns: minmax(0, 1fr); } }
.post-byline { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; }
.post-byline .avatar-svg { width: 42px; height: 42px; display: block; flex: 0 0 auto; }
.post-byline .who a { color: var(--accent); text-decoration: none; font-weight: 600; }
.post-byline .role { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); }
.post-aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
.post-aside .post-illu { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--line); }

.author-hero { display: grid; grid-template-columns: 120px 1fr; gap: 26px; align-items: center; margin-top: 22px; }
@media (max-width: 560px) { .author-hero { grid-template-columns: 1fr; } }
.author-hero-avatar svg, .author-hero-avatar img { width: 120px; height: 120px; display: block; }
.author-chip { display: inline-flex; align-items: center; gap: 8px; }
.author-chip svg, .author-chip img { width: 26px; height: 26px; }
.avatar-img { border-radius: 50%; object-fit: cover; display: block; }
.post-byline .avatar-img { width: 42px; height: 42px; flex: 0 0 auto; }
.aside-authors a { display: flex; align-items: center; gap: 11px; }
.aside-authors .avatar-img { width: 36px; height: 36px; flex: 0 0 auto; }
.aside-authors .who { min-width: 0; }

/* ---- breadcrumbs -------------------------------------------------------- */
/* Rendered trail matching the BreadcrumbList JSON-LD (see breadcrumbs.html). */
.crumbs { font-family: var(--font-mono); font-size: 13px; margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; line-height: 1.4; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--muted); }
.crumbs span[aria-current] { color: var(--muted); }

/* ---- blog topic taxonomy ----------------------------------------------- */
.topic-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.topic-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; white-space: nowrap; }
a.topic-chip:hover { border-color: var(--accent); color: var(--accent); }
.topic-chip > span { color: var(--muted); font-size: 11.5px; }
.topic-chip--flat { color: var(--muted); }

/* ---- blog archive ------------------------------------------------------ */
.blog-archive { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.blog-archive h2 { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; font-weight: 600; }
.blog-archive h3 { font-family: var(--font-mono); font-size: 15px; color: var(--muted); margin: 22px 0 8px; font-weight: 500; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px dashed color-mix(in srgb, var(--line) 60%, transparent); }
.archive-list a { color: var(--ink); text-decoration: none; font-size: 15.5px; }
.archive-list a:hover { color: var(--accent); }
.archive-list .meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ---- cookie-consent bar (_includes/consent.html, js/consent.js) ----
   Fixed to the bottom: the choice has to stay reachable however far the page is
   scrolled, and a bar cannot be scrolled past the way an in-flow notice can. z-index
   sits above the sticky nav (60/61). `.cc-open` pads the page so the bar cannot hide
   the footer's own links — including the one that brings it back — which is also what
   keeps WCAG 2.2's 2.4.11 (focus not obscured) satisfied when tabbing to something at
   the very bottom of a page.

   ONE ROW at rest. Two purposes' worth of checkboxes in the resting state made this
   ~150px tall, a sixth of a laptop viewport, for a notice most people dismiss in a
   second. The granular controls moved into .cc-panel, which opens on demand, so the
   default is a sentence and three buttons at ~64px.
   Only tokens both themes define are used, so terminal and flux each theme it. */
.cc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  /* --navbg, not --surface: this bar floats over scrolling content, which is the nav's
     problem exactly, and the nav already solved it. --surface is a 4.5%-white glass
     fill on the flux skin — fine in a card on the page background, see-through as a
     fixed bar with text sliding underneath. Same token and blur as .nav therefore. */
  background: var(--navbg); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
}
/* Without backdrop-filter an 82%-opaque bar over moving text is not good enough for a
   page asking someone to make a choice. */
@supports not (backdrop-filter: blur(12px)) {
  .cc { background: var(--bg); }
}
.cc[hidden] { display: none; }
.cc-inner { padding-top: 12px; padding-bottom: 12px; }
.cc-bar { display: flex; align-items: center; gap: 24px; }
.cc-copy { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); flex: 1; min-width: 0; }
.cc-title {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink); margin-right: 8px;
}
.cc-copy a { color: var(--accent); text-decoration: underline; white-space: nowrap; }
.cc-copy a:hover { text-decoration: none; }

.cc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cc-btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: 1;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.cc-btn:hover { border-color: var(--accent); color: var(--accent); }
/* --accent-fill, not --accent: white-on-accent is 4.2:1 on the flux purple, under
   WCAG 1.4.3's 4.5:1 at this size. The token is a darkened accent defined per theme
   and falls back to --accent, so a theme without one still renders. */
.cc-btn-accept { background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent)); border-color: transparent; }
.cc-btn-accept:hover { color: var(--on-accent-fill, var(--on-accent)); opacity: .92; }
.cc-btn:focus-visible, .cc-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* "Customise" is deliberately lighter than the two decisions: it opens a panel, it is
   not a third answer, and giving it button weight would dilute the pair that matter. */
.cc-link {
  background: none; border: none; cursor: pointer; padding: 6px 2px;
  font-family: var(--font-body); font-size: 13.5px; color: var(--muted);
  text-decoration: underline; white-space: nowrap;
}
.cc-link:hover { color: var(--ink); }

.cc-panel {
  display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.cc-panel[hidden] { display: none; }
/* Real labels wrapping real checkboxes: the whole block is a click target and screen
   readers get the association for free — no aria plumbing to keep in step. */
.cc-choice { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; max-width: 40ch; }
.cc-choice input { flex-shrink: 0; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent-fill, var(--accent)); cursor: pointer; }
.cc-choice span { display: block; font-size: 12.5px; line-height: 1.45; }
.cc-choice strong { display: block; color: var(--ink); font-size: 13px; }
.cc-choice em { display: block; color: var(--muted); font-style: normal; }
.cc-choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-panel .cc-btn { margin-left: auto; }
.cc-open body { padding-bottom: 96px; }

@media (max-width: 900px) {
  .cc-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .cc-actions { width: 100%; }
  .cc-actions .cc-btn { flex: 1; padding: 11px 12px; }
  .cc-link { order: 3; text-align: center; }
  .cc-panel { flex-direction: column; gap: 12px; }
  .cc-panel .cc-btn { margin-left: 0; width: 100%; }
  .cc-open body { padding-bottom: 190px; }
}

/* ---- contact form (_includes/contact-form.html, js/site.js) ----
   One markup source for both editions, so the fields and validation cannot drift
   between two copies of a form that posts to the same endpoint. Appearance is not
   shared: these are the terminal-skin defaults, built from tokens, and com/css/flux.css
   restyles the same classes to match its own forms. --field-bg does not exist on the
   terminal skin, so inputs sit on --surface here. */
.cf-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; max-width: 720px; }
.cf-form { display: flex; flex-direction: column; gap: 18px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.cf-opt { color: var(--muted); font-weight: 400; }
.cf-in {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-family: var(--font-body); font-size: 15px; padding: 11px 13px; outline: none;
}
.cf-in::placeholder { color: var(--muted); }
.cf-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.cf-textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.cf-file { padding: 9px 11px; font-size: 14px; cursor: pointer; }
.cf-file::file-selector-button {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; cursor: pointer;
  margin-right: 12px; padding: 7px 13px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.cf-hint { font-size: 12.5px; color: var(--muted); margin: 7px 0 0; }
.cf-filelist { list-style: none; margin: 9px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.cf-filelist li { display: flex; gap: 9px; padding: 3px 0; }
.cf-filelist .cf-size { margin-left: auto; font-family: var(--font-mono); font-size: 12px; }
.cf-filelist[hidden] { display: none; }
/* Errors are announced, not just coloured: colour alone would fail 1.4.1, and a
   screen reader has to hear a rejected submission. --danger falls back to the accent
   for a theme that has not defined one. */
.cf-error { font-size: 13.5px; color: var(--danger, var(--accent)); margin: 0; font-weight: 600; }
.cf-error[hidden] { display: none; }
.cf-submit {
  align-self: flex-start; background: var(--accent-fill, var(--accent)); color: var(--on-accent-fill, var(--on-accent));
  border: 1px solid transparent; padding: 13px 24px; border-radius: 8px;
  font-weight: 600; font-size: 15px; font-family: var(--font-body); cursor: pointer;
}
.cf-submit:hover { filter: brightness(1.06); }
.cf-submit:disabled { opacity: .6; cursor: default; }
.cf-submit:focus-visible, .cf-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-note { font-size: 13.5px; color: var(--muted); margin: 16px 0 0; }
.cf-note a { color: var(--accent); }

.cf-thanks { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 40px 28px; max-width: 720px; }
.cf-thanks[hidden] { display: none; }
.cf-thanks h2 { font-size: 22px; margin: 0 0 8px; }
.cf-thanks p { font-size: 15.5px; color: var(--muted); margin: 0 0 20px; }
.cf-thanks-again {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  padding: 10px 20px; border-radius: 8px; font-size: 14.5px; cursor: pointer; font-family: var(--font-body);
}
.cf-thanks-again:hover { border-color: var(--accent); color: var(--accent); }
/* The honeypot has to be reachable by a bot filling every input and invisible to a
   person — off-canvas rather than display:none, which some bots skip. */
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 620px) {
  .cf-row { grid-template-columns: 1fr; }
  .cf-card, .cf-thanks { padding: 22px 18px; }
  .cf-submit { align-self: stretch; text-align: center; }
}
