/* =========================================================================
   BuildForPeople: the Fusion style (direction D on the redesign canvas).
   Workbench structure on a Bento grid: every section is a rounded tile,
   tiles sit edge to edge with a small gap, and nothing leaves a wide
   empty band. Three themes: light, dark and black.

   Loaded after site.css. It redefines site.css's tokens, so every page
   and component picks up the new colours without template changes, then
   restyles the shared components (header, tiles, cards, buttons, chips).
   Self-hosted fonts, no inline styles, so CSP style-src 'self' holds.
   docs/fusion/HANDOFF.md explains the tokens and how to apply them.
   ========================================================================= */

@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---------------------------------------------------------------
   --f-* are the Fusion tokens. The block under them maps site.css's own
   tokens onto them, so old components follow the theme too.
   Theme choice: <html data-theme="light|dark|black">, set by theme-init.js
   from the visitor's saved choice. With no choice the system setting wins. */
:root {
  --f-bg:        #F3F4F8;
  --f-surface:   #FFFFFF;
  --f-surface2:  #ECEEF5;
  --f-line:      #DADDE8;
  --f-ink:       #12141C;
  --f-sub:       #4F5568;
  --f-glass:     rgba(243, 244, 248, .82);
  --f-violet:    #5B4BDB;
  --f-cyan:      #087A96;
  --f-lime:      #3F7A00;
  --f-coral:     #C9431C;
  --f-amber:     #9A6700;
  --f-magenta:   #A82F82;
  --f-on-accent: #FFFFFF;
  --f-ok:        #1F7A3D;
  --f-bad:       #B42318;
  --f-mru:       #2A78D6;
  --f-ocm:       #A85A00;
  --f-leda:      #A8409F;
  --f-shadow:    0 1px 2px rgba(18, 20, 28, .06), 0 14px 34px -22px rgba(18, 20, 28, .30);
  --f-tint:      12%;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --f-bg:        #0B0D12;
    --f-surface:   #141821;
    --f-surface2:  #1B202B;
    --f-line:      #2A3040;
    --f-ink:       #EEF0F6;
    --f-sub:       #A3AAC0;
    --f-glass:     rgba(11, 13, 18, .78);
    --f-violet:    #8B7CFF;
    --f-cyan:      #3DD6F5;
    --f-lime:      #B8F15A;
    --f-coral:     #FF7A59;
    --f-amber:     #FFC24B;
    --f-magenta:   #F062C0;
    --f-on-accent: #0B0D12;
    --f-ok:        #5EE08A;
    --f-bad:       #FF7A6E;
    --f-mru:       #3987E5;
    --f-ocm:       #F59A2E;
    --f-leda:      #E77FDF;
    --f-shadow:    0 1px 2px rgba(0, 0, 0, .35), 0 18px 40px -24px rgba(0, 0, 0, .8);
    --f-tint:      16%;
    color-scheme: dark;
  }
}

:root[data-theme="dark"],
:root[data-theme="black"] {
  --f-bg:        #0B0D12;
  --f-surface:   #141821;
  --f-surface2:  #1B202B;
  --f-line:      #2A3040;
  --f-ink:       #EEF0F6;
  --f-sub:       #A3AAC0;
  --f-glass:     rgba(11, 13, 18, .78);
  --f-violet:    #8B7CFF;
  --f-cyan:      #3DD6F5;
  --f-lime:      #B8F15A;
  --f-coral:     #FF7A59;
  --f-amber:     #FFC24B;
  --f-magenta:   #F062C0;
  --f-on-accent: #0B0D12;
  --f-ok:        #5EE08A;
  --f-bad:       #FF7A6E;
  --f-mru:       #3987E5;
  --f-ocm:       #F59A2E;
  --f-leda:      #E77FDF;
  --f-shadow:    0 1px 2px rgba(0, 0, 0, .35), 0 18px 40px -24px rgba(0, 0, 0, .8);
  --f-tint:      16%;
  color-scheme: dark;
}
/* Dark: a true black page, which also suits OLED screens. "black" is the
   old name for it, kept so saved choices still work. */
:root[data-theme="dark"],
:root[data-theme="black"] {
  --f-bg:       #000000;
  --f-surface:  #0D0D10;
  --f-surface2: #16161B;
  --f-line:     #24242C;
  --f-glass:    rgba(0, 0, 0, .8);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --f-bg:       #000000;
    --f-surface:  #0D0D10;
    --f-surface2: #16161B;
    --f-line:     #24242C;
    --f-glass:    rgba(0, 0, 0, .8);
  }
}

/* site.css tokens, re-pointed at Fusion. */
:root, :root[data-theme] {
  --paper:       var(--f-bg);
  --paper-2:     var(--f-surface2);
  --panel:       var(--f-surface);
  --line:        var(--f-line);
  --line-soft:   color-mix(in srgb, var(--f-line) 60%, transparent);
  --ink:         var(--f-ink);
  --ink-2:       color-mix(in srgb, var(--f-ink) 78%, var(--f-sub));
  --muted:       var(--f-sub);
  --gold:        var(--f-amber);
  --accent:      var(--f-violet);
  --accent-deep: var(--f-violet);
  --accent-soft: color-mix(in srgb, var(--f-violet) var(--f-tint), transparent);
  --accent-hair: color-mix(in srgb, var(--f-violet) 40%, transparent);
  --accent-ink:  var(--f-on-accent);
  --ok:          var(--f-ok);
  --ok-soft:     color-mix(in srgb, var(--f-ok) var(--f-tint), transparent);
  --warn:        var(--f-amber);
  --warn-soft:   color-mix(in srgb, var(--f-amber) var(--f-tint), transparent);
  --bad:         var(--f-bad);
  --bad-soft:    color-mix(in srgb, var(--f-bad) var(--f-tint), transparent);
  --on-bad:      var(--f-on-accent);
  --dim-soft:    var(--f-surface2);
  --code-bg:     #0E1118;
  --code-text:   #E4E8F2;
  --code-dim:    #8A93A8;
  --serif: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius:    22px;
  --radius-sm: 12px;
  --max:       1240px;
  --shadow:    var(--f-shadow);
  --gap:       14px;
}

body { background: var(--f-bg); }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -0.02em; }
h1 { letter-spacing: -0.035em; }
.em { font-style: normal; color: var(--f-violet); }
code { background: var(--f-surface2); color: var(--f-ink); }

/* The real BuildForPeople mark: the cream version on every dark theme. */
:root[data-theme="dark"] .brand .mark,
:root[data-theme="black"] .brand .mark { background-image: url("mark-cream.svg"); }

/* ---- Header: glass bar, pill links, theme switch ------------------------ */
header.top { background: var(--f-glass); border-bottom: 1px solid var(--f-line); }
header.top .wrap { min-height: 64px; }
.brand { font-weight: 700; letter-spacing: -0.02em; }
nav.links a, .navbtn, details.navmenu > summary { border-radius: 999px; padding: 7px 13px; }
nav.links a[aria-current="page"], details.navmenu > summary.is-current {
  background: var(--f-ink); color: var(--f-bg);
}
.navmenu-list { border-radius: 18px; }

.theme-switch { display: none; }
.js .theme-switch {
  display: inline-flex; gap: 2px; padding: 3px; margin-left: 6px;
  border: 1px solid var(--f-line); border-radius: 999px; background: var(--f-surface);
}
.theme-switch button {
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px;
  background: transparent; color: var(--f-sub);
}
.theme-switch button:hover { color: var(--f-ink); }
.theme-switch button[aria-pressed="true"] { background: var(--f-violet); color: var(--f-on-accent); }
@media (max-width: 520px) { .js .theme-switch { margin: 4px 0 0; } }

/* ---- The bento page: sections become tiles -------------------------------
   Every top-level section's .wrap is a tile. Bands lose their full-width
   stripes and borders, and the gap between tiles is --gap. */
main { padding: var(--gap) 0 calc(var(--gap) * 2); }
main > .band, main > section, .pp > section:not(.pp-stage) {
  padding: 0; margin: 0 0 var(--gap); border-top: 0; background: transparent;
}
main > .band.tint { background: transparent; }
main > .band > .wrap,
main > section > .wrap,
.pp > section:not(.pp-stage):not(.stat-strip) > .wrap {
  background: var(--f-surface); border: 1px solid var(--f-line);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 38px);
  max-width: calc(var(--max) - 2 * clamp(16px, 4vw, 28px));
  margin-inline: auto; box-shadow: var(--f-shadow);
}
@media (max-width: 1300px) {
  main > .band > .wrap, main > section > .wrap,
  .pp > section:not(.pp-stage):not(.stat-strip) > .wrap { margin-inline: clamp(10px, 2.4vw, 28px); }
}
main > .band.tint > .wrap { background: var(--f-surface2); }
.rule { display: none; }

/* Hero tiles get the violet and cyan wash from the canvas. */
main > .band.hero > .wrap {
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--f-violet) 26%, transparent) 0, transparent 55%),
    radial-gradient(90% 90% at 100% 100%, color-mix(in srgb, var(--f-cyan) 20%, transparent) 0, transparent 60%),
    var(--f-surface);
}
.hero { padding-top: 0; padding-bottom: 0; }
.hero .eyebrow, .kicker { font-family: var(--mono); letter-spacing: .06em; color: var(--f-violet); }
.hero .eyebrow::before, .kicker::before { width: 18px; background: var(--f-violet); }

/* Home hero: the thesis tile beside the ledger tile, 7 and 5 of 12. */
main > .band.hero-split > .wrap { background: transparent; border: 0; box-shadow: none; padding: 0; }
.hero-grid { gap: var(--gap); align-items: stretch; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 4vw, 48px); border-radius: var(--radius); border: 1px solid var(--f-line);
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--f-violet) 30%, transparent) 0, transparent 55%),
    radial-gradient(90% 90% at 100% 100%, color-mix(in srgb, var(--f-cyan) 22%, transparent) 0, transparent 60%),
    var(--f-surface);
  box-shadow: var(--f-shadow);
}
.hero-copy .cta { margin-top: 22px; }
.ledger { border-radius: var(--radius); background: var(--f-surface); }
.ledger-name { font-weight: 650; }

/* ---- Cards are tiles inside tiles ---------------------------------------
   Each card takes a tone from a four-colour cycle, so a grid reads as a
   bento of colour instead of a wall of grey. */
.grid { gap: var(--gap); }
.card, .ref-card, .price-card, .support-card {
  --tone: var(--f-violet);
  border-radius: 18px; border: 1px solid var(--f-line);
  background: color-mix(in srgb, var(--tone) 7%, var(--f-surface2));
}
.grid > :nth-child(4n+2), .ref-grid > :nth-child(4n+2), .price-grid > :nth-child(4n+2) { --tone: var(--f-cyan); }
.grid > :nth-child(4n+3), .ref-grid > :nth-child(4n+3), .price-grid > :nth-child(4n+3) { --tone: var(--f-lime); }
.grid > :nth-child(4n+4), .ref-grid > :nth-child(4n+4), .price-grid > :nth-child(4n+4) { --tone: var(--f-coral); }
.card:has(a.stretch:hover), .project-card:hover { border-color: var(--tone); }
.card .kicker, .card .kicker::before { color: var(--tone); }
.card .kicker::before { background: var(--tone); }
.icon { border-radius: 16px; }
.icon.mono { background: var(--tone, var(--f-violet)); color: var(--f-on-accent); }

/* The featured rail: wide tiles that shuffle sideways. */
.spotlight {
  border-radius: var(--radius); border: 1px solid var(--f-line);
  background: color-mix(in srgb, var(--f-violet) 9%, var(--f-surface2));
}
.spotlight:nth-child(4n+2) { background: color-mix(in srgb, var(--f-mru) 12%, var(--f-surface2)); }
.spotlight:nth-child(4n+3) { background: var(--f-surface2); }
.spotlight:nth-child(4n+4) { background: color-mix(in srgb, var(--f-ocm) 10%, var(--f-surface2)); }
.spot-dot.is-on::after { background: var(--f-violet); }

/* Made here: the two products as bright tiles. */
.promo-grid { gap: var(--gap); }
.promo { border-radius: var(--radius); }
.promo-glassvgl { --pa: var(--f-cyan); --pb: var(--f-violet); }
.promo-liteeda { --pa: var(--f-leda); --pb: var(--f-magenta); }

/* ---- Buttons, chips and badges ------------------------------------------ */
.btn { border-radius: 999px; padding: 10px 18px; background: var(--f-surface); }
.btn.primary { background: var(--f-violet); border-color: var(--f-violet); color: var(--f-on-accent); }
.btn.primary:hover { background: var(--f-ink); border-color: var(--f-ink); color: var(--f-bg); }
.chip { border-radius: 999px; background: var(--f-surface); }
.chip.on { background: var(--f-violet); border-color: var(--f-violet); color: var(--f-on-accent); }
.badge { font-family: var(--mono); letter-spacing: .02em; text-transform: none; font-size: .72rem; }
.badge.status-live { color: var(--f-ok); }
.badge.status-beta { color: color-mix(in srgb, var(--f-amber) 82%, var(--f-ink)); }
input, select, textarea { border-radius: 12px; background: var(--f-surface); }
input:focus, select:focus, textarea:focus { border-color: var(--f-violet); }

/* ---- Project pages (OpenCarMind, mr-usage and every listing) ------------
   The body and the facts become two tiles, 8 and 4 of 12. */
main > .project-body > .wrap.project-layout {
  background: transparent; border: 0; box-shadow: none; padding: 0;
  grid-template-columns: minmax(0, 8fr) minmax(260px, 4fr); gap: var(--gap);
}
@media (max-width: 860px) { main > .project-body > .wrap.project-layout { grid-template-columns: minmax(0, 1fr); } }
.project-layout > .md {
  max-width: none; padding: clamp(20px, 3vw, 38px); border-radius: var(--radius);
  background: var(--f-surface); border: 1px solid var(--f-line); box-shadow: var(--f-shadow);
}
.facts { border-radius: var(--radius); background: var(--f-surface2); padding: 8px 22px; }
.facts dt { font-family: var(--mono); letter-spacing: .04em; text-transform: none; }

/* ---- About: the research list as coloured tiles ------------------------- */
.about-grid { padding-top: 0; padding-bottom: 0; }
main > .about-body > .wrap.about-grid { max-width: calc(var(--max) - 2 * clamp(16px, 4vw, 28px)); }
.research-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--gap); margin: 0 0 var(--gap); }
.research-list a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px;
  border-radius: 18px; border: 1px solid var(--f-line); color: var(--f-ink); text-decoration: none;
  background: color-mix(in srgb, var(--tone, var(--f-violet)) 9%, var(--f-surface2));
}
.research-list li:nth-child(4n+1) { --tone: var(--f-violet); }
.research-list li:nth-child(4n+2) { --tone: var(--f-cyan); }
.research-list li:nth-child(4n+3) { --tone: var(--f-lime); }
.research-list li:nth-child(4n+4) { --tone: var(--f-coral); }
.research-list a:hover { border-color: var(--tone); }
.research-list .venue { font-family: var(--mono); font-size: .78rem; color: color-mix(in srgb, var(--tone) 80%, var(--f-ink)); }
.research-list .topic { color: var(--f-sub); font-size: .88rem; }
.maker-card { max-width: none; }

/* ---- Articles: each topic cluster gets its own accent ------------------- */
.articles-cluster:nth-of-type(5n+2) .card { --tone: var(--f-violet); }
.articles-cluster:nth-of-type(5n+3) .card { --tone: var(--f-cyan); }
.articles-cluster:nth-of-type(5n+4) .card { --tone: var(--f-lime); }
.articles-cluster:nth-of-type(5n+5) .card { --tone: var(--f-coral); }
.articles-cluster:nth-of-type(5n+6) .card { --tone: var(--f-amber); }
.articles-cluster .section-head h2 { color: var(--tone, var(--f-ink)); }
.articles-cluster:nth-of-type(5n+2) { --tone: var(--f-violet); }
.articles-cluster:nth-of-type(5n+3) { --tone: var(--f-cyan); }
.articles-cluster:nth-of-type(5n+4) { --tone: var(--f-lime); }
.articles-cluster:nth-of-type(5n+5) { --tone: var(--f-coral); }
.articles-cluster:nth-of-type(5n+6) { --tone: var(--f-amber); }
.section-head h2 { letter-spacing: -0.025em; }

/* ---- Footer: one tile at the end of the page ---------------------------- */
footer { background: transparent; border-top: 0; padding: 0 0 calc(var(--gap) * 2); }
footer .wrap.foot {
  padding: clamp(18px, 3vw, 28px); border-radius: var(--radius);
  background: var(--f-surface); border: 1px solid var(--f-line);
  max-width: calc(var(--max) - 2 * clamp(16px, 4vw, 28px));
}
@media (max-width: 1300px) { footer .wrap.foot { margin-inline: clamp(10px, 2.4vw, 28px); } }
footer .foot-brand { font-weight: 700; }

/* ---- Phones: full-width tiles, smaller gap ------------------------------ */
@media (max-width: 640px) {
  :root, :root[data-theme] { --gap: 10px; --radius: 18px; }
  header.top { background: var(--f-bg); }
  main > .band > .wrap, main > section > .wrap,
  .pp > section:not(.pp-stage):not(.stat-strip) > .wrap { margin-inline: 10px; padding: 18px; }
  .hero-copy { padding: 22px; }
}

/* ---- Logos follow the theme switch, not only the system setting -------- */
:root[data-theme="dark"] .logo-light, :root[data-theme="black"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark, :root[data-theme="black"] .logo-dark { display: inline-block; }

/* ---- Product pages on the Fusion tokens ---------------------------------
GlassVGL, LightEDA and OpenCarMind take their accents from the token set,
and the hero stage is a themed tile, so each page reads in light and dark. */
.pp { --pp-a: var(--f-cyan); --pp-b: var(--f-violet); --pp-c: var(--f-lime); --pp-ink: var(--f-on-accent); }
.pp-liteeda { --pp-a: var(--f-leda); --pp-b: var(--f-magenta); --pp-c: var(--f-amber); --pp-ink: var(--f-on-accent); }
.pp-ocm { --pp-a: var(--f-ocm); --pp-b: var(--f-amber); --pp-c: var(--f-violet); --pp-ink: var(--f-on-accent); }
.pp > .pp-stage {
  color: var(--f-ink); background: var(--f-surface); border: 1px solid var(--f-line);
  border-radius: var(--radius); box-shadow: var(--f-shadow);
  max-width: calc(var(--max) - 2 * clamp(16px, 4vw, 28px)); margin: 0 auto var(--gap);
}
@media (max-width: 1300px) { .pp > .pp-stage { margin-inline: clamp(10px, 2.4vw, 28px); } }
@media (max-width: 640px) { .pp > .pp-stage { margin-inline: 10px; } }
.pp-stage::before {
  background:
    radial-gradient(40% 50% at 15% 20%, color-mix(in srgb, var(--pp-a) 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 85% 30%, color-mix(in srgb, var(--pp-b) 18%, transparent), transparent 70%),
    radial-gradient(40% 40% at 60% 100%, color-mix(in srgb, var(--pp-c) 14%, transparent), transparent 70%);
}
.pp-hero h1, .pp-brand { color: var(--f-ink); }
.pp-lead, .pp-note, .code-note { color: var(--f-sub); }
.pp-badges li, .pp-stage .badge { color: var(--f-ink); background: var(--f-surface2); border: 1px solid var(--f-line); }
.pp .btn.pp-ghost { color: var(--f-ink); background: var(--f-surface); border-color: var(--f-line); }
.pp .btn.pp-ghost:hover { background: var(--f-surface2); border-color: var(--pp-a); }
.pp-hero-shot { background: var(--f-surface2); border: 1px solid var(--f-line); box-shadow: var(--f-shadow); }
.code-chip code { color: var(--f-ink); background: var(--f-surface2); border: 1px solid var(--f-line); }
.code-copy { color: var(--f-ink); background: var(--f-surface); border: 1px solid var(--f-line); }
.code-copy:hover { background: var(--f-surface2); }
pre { box-shadow: inset 0 0 0 1px var(--f-line); }

/* Home: the two product tiles, themed instead of always dark. */
.promo { color: var(--f-ink); background: var(--f-surface2); border: 1px solid var(--f-line); }
.promo::before { opacity: .34; }
.promo:hover { color: var(--f-ink); box-shadow: var(--f-shadow); }
.promo h3, .promo .promo-price { color: var(--f-ink); }
.promo p { color: var(--f-sub); }

/* Screenshot viewer and the before and after slider. */
dialog.lightbox { color: var(--f-ink); background: var(--f-surface); box-shadow: var(--f-shadow); }
dialog.lightbox::backdrop { background: color-mix(in srgb, var(--f-bg) 86%, transparent); }
.lightbox-cap, .lightbox-count { color: var(--f-sub); }
.lb-btn { color: var(--f-ink); background: var(--f-surface2); border: 1px solid var(--f-line); }
.lb-btn:hover { background: var(--f-line); }
.ba.ba-on::after { background: var(--f-surface); box-shadow: 0 0 0 1px var(--f-line); }
.ba.ba-on .ba-tag { background: color-mix(in srgb, var(--f-ink) 74%, transparent); color: var(--f-bg); }

/* ---- Footer: four link columns, as on board D --------------------------- */
footer .wrap.foot.foot-d { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 3fr); gap: 22px 36px; align-items: start; }
footer .foot-d .foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); color: var(--f-ink); text-decoration: none; }
footer .foot-d .foot-brand .mark { width: 28px; height: 28px; border-radius: 8px; flex: none; background: url("favicon.svg") center / contain no-repeat; }
:root[data-theme="dark"] footer .foot-d .foot-brand .mark, :root[data-theme="black"] footer .foot-d .foot-brand .mark { background-image: url("mark-cream.svg"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) footer .foot-d .foot-brand .mark { background-image: url("mark-cream.svg"); } }
footer .foot-about p { margin: 10px 0 0; max-width: 34ch; color: var(--f-sub); }
footer .foot-links.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; }
footer .foot-cols div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
footer .foot-h { margin: 0 0 4px; font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; }
footer .foot-cols div:nth-child(1) .foot-h { color: var(--f-violet); }
footer .foot-cols div:nth-child(2) .foot-h { color: var(--f-cyan); }
footer .foot-cols div:nth-child(3) .foot-h { color: var(--f-lime); }
footer .foot-cols div:nth-child(4) .foot-h { color: var(--f-coral); }
footer .foot-cols a { color: var(--f-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--f-line); }
footer .foot-cols a:hover { text-decoration-color: currentColor; }
footer .foot-legal { grid-column: 1 / -1; margin: 4px 0 0; font-family: var(--mono); font-size: .8rem; color: var(--f-sub); }
@media (max-width: 860px) {
  footer .wrap.foot.foot-d { grid-template-columns: minmax(0, 1fr); }
  footer .foot-links.foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: the faint floating product mark sits behind the heading, so it goes. */
@media (max-width: 640px) { .pp-float { display: none; } }

/* ---- Pointer light -------------------------------------------------------
motion.ts gives every tile and card a .glow-layer and tracks the pointer in
--gx and --gy. The light takes the card's own tone, a little stronger on the
dark themes where a faint wash would not show. */
:root { --f-glow: 13%; }
:root[data-theme="dark"] { --f-glow: 26%; }
:root[data-theme="black"] { --f-glow: 26%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --f-glow: 26%; } }
.glow-layer, .glass-card::after {
  background: radial-gradient(266px circle at var(--gx, 50%) var(--gy, 0%),
    color-mix(in srgb, var(--tone, var(--pp-a, var(--f-violet))) var(--f-glow), transparent), transparent 62%);
}
.glow-on { transition: border-color .25s ease; }
.glow-on:hover, .glass-card:hover { border-color: color-mix(in srgb, var(--tone, var(--pp-a, var(--f-violet))) 42%, var(--f-line)); }

/* ---- Phones: a Menu button instead of three rows of links ---------------- */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 15px;
    border: 1px solid var(--f-line); border-radius: 999px; background: var(--f-surface); color: var(--f-ink);
    font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
  }
  .nav-toggle-bars { width: 16px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .js header.top.nav-open .nav-toggle-bars { box-shadow: none; }
  .js header.top nav.links { display: none; width: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 0 10px; }
  .js header.top.nav-open nav.links { display: flex; }
  .js header.top nav.links a, .js header.top .navbtn, .js header.top details.navmenu > summary { padding: 10px 14px; font-size: 1rem; text-align: left; }
  .js header.top details.navmenu, .js header.top form.inline { display: block; }
  .js header.top .navmenu-list { position: static; min-width: 0; margin: 6px 0 0; box-shadow: none; }
  .js header.top .theme-switch { align-self: flex-start; margin: 8px 0 0 6px; }
}

/* Product names on plan cards keep their own capitals: LightEDA, GlassVGL. */
.pack-brand { text-transform: none; letter-spacing: .01em; }
/* The two LightEDA layout figures (1440x590 and 1440x900): columns in
   proportion to the images, so both tiles end level with no gap. */
@media (min-width: 900px) { .layout-extra { grid-template-columns: 2.44fr 1.6fr; } }
/* Licenses such as "MIT OR Apache-2.0" are shown whole. */
.ledger-license { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.hero-trust { margin: 14px 0 0; color: var(--f-sub); font-size: .92rem; }
.promo-ocm { --pa: var(--f-ocm); --pb: var(--f-cyan); }
.promo-research { --pa: var(--f-violet); --pb: var(--f-coral); }
.promo-ref { --pa: var(--f-amber); --pb: var(--f-coral); }
.see-all { margin: 20px 0 0; }
.art-topics { margin-top: 18px; }
.ref-checked { margin: 0 0 12px; }
.ocm-sign { max-width: 64ch; }

/* Sign-up gate: the GitHub button waits until the form is filled in. */
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { transform: none; }

/* Sign-up form: the email typo fix and fields left invalid. */
.hint-fix { background: none; border: 0; padding: 0; font: inherit; color: var(--f-violet); text-decoration: underline; cursor: pointer; }
.field input[aria-invalid] { border-color: var(--f-bad); }
