/* ==========================================================================
   PoM - PieceOfMind
   Layout language borrowed from gabrielrocco.io/projetos/rubio (measured with
   computed styles): floating dark panel, huge tight two-colour title, numbered
   monospaced section labels, very round cards, pill buttons.
   Palette derived from the logo (assets/pom_logo_white.png): a single gradient
   that runs navy #134598 -> teal #14b8ae, left to right through the mark.
   ========================================================================== */

/* ------------------------------- tokens ---------------------------------- */
:root {
  color-scheme: light;

  /* brand, sampled from the logo */
  --blue:        #123f8f;   /* navy at the start of the logo gradient */
  --blue-bright: #4f9bff;
  --cyan:        #0d7297;   /* mid gradient, darkened for AA on off-white */
  --cyan-bright: #35c9f0;
  --teal:        #0b8279;   /* teal at the end of the gradient */
  --teal-bright: #2fdcc8;

  /* page */
  --bg:        #f8f6f7;
  --bg-2:      #fffefb;
  --ink:       #18151b;
  --ink-2:     #4a4551;
  --ink-3:     #6d6775;
  --line:      rgba(24, 21, 27, .12);
  --line-soft: rgba(24, 21, 27, .07);
  --card:      rgba(255, 255, 255, .78);
  --card-solid:#ffffff;
  --shadow:    0 18px 58px rgba(6, 30, 62, .10);
  --shadow-hi: 0 26px 72px rgba(6, 30, 62, .17);
  --shadow-lg: 0 45px 120px rgba(6, 30, 62, .22);

  --accent:      var(--blue);
  --accent-soft: rgba(18, 63, 143, .10);

  /* the floating dark panel: identical in both themes */
  --panel:       #080f18;
  --panel-2:     #0d1a2a;
  --panel-ink:   #ffffff;
  --panel-ink-2: rgba(255, 255, 255, .66);
  --panel-ink-3: rgba(255, 255, 255, .56);
  --panel-line:  rgba(255, 255, 255, .13);
  --panel-fill:  rgba(255, 255, 255, .055);

  /* cake animation: it sits on the hero panel, which is dark in both themes,
     so these are fixed and never redefined by the dark palette */
  --cake-line: rgba(255, 255, 255, .22);
  --cake-ink: #ffffff;
  --cake-muted: rgba(255, 255, 255, .7);
  --cake-accent: #6fd6f3;
  --cake-chat: rgba(255, 255, 255, .06);
  --cake-question: #2a64d6;
  --cake-answer: rgba(79, 155, 255, .16);
  --cake-answer-line: rgba(255, 255, 255, .14);
  --cake-screen: #3a4959;
  --cake-screen-inner: #0d1520;
  --cake-track: rgba(255, 255, 255, .18);
  --cake-on-accent: #04182b;
  --cake-plate: #2b3947;
  --cake-plate-highlight: #3b4b5b;
  --cake-frosting: #f3e7cf;
  --cake-frosting-detail: #b08a5a;
  --cake-knife: #cbd9e3;
  --cake-knife-edge: #a9bcca;
  --cake-packet-core: #eafbf9;
  --cake-network-card: rgba(255, 255, 255, .06);

  --shell: 1180px;
  --pad: clamp(18px, 4vw, 34px);
  --r-card: 26px;
  --r-big: 34px;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark palette. Declared twice on purpose: once behind the system preference
   (unless the reader forced light) and once behind the explicit toggle, so the
   toggle wins in both directions without JavaScript writing any colour. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --blue:        #4f9bff;
    --cyan:        #35c9f0;
    --teal:        #2fdcc8;

    --bg:        #0b0a0f;
    --bg-2:      #131119;
    --ink:       #f4f2f7;
    --ink-2:     #b6b1bf;
    --ink-3:     #8f8a99;
    --line:      rgba(255, 255, 255, .14);
    --line-soft: rgba(255, 255, 255, .08);
    --card:      rgba(255, 255, 255, .045);
    --card-solid:#16141d;
    --shadow:    0 18px 58px rgba(0, 0, 0, .5);
    --shadow-hi: 0 26px 72px rgba(0, 0, 0, .62);
    --shadow-lg: 0 45px 120px rgba(0, 0, 0, .65);

    --accent:      var(--blue);
    --accent-soft: rgba(79, 155, 255, .14);

    --panel:   #0b1421;
    --panel-2: #102338;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --blue:        #4f9bff;
  --cyan:        #35c9f0;
  --teal:        #2fdcc8;

  --bg:        #0b0a0f;
  --bg-2:      #131119;
  --ink:       #f4f2f7;
  --ink-2:     #b6b1bf;
  --ink-3:     #8f8a99;
  --line:      rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .08);
  --card:      rgba(255, 255, 255, .045);
  --card-solid:#16141d;
  --shadow:    0 18px 58px rgba(0, 0, 0, .5);
  --shadow-hi: 0 26px 72px rgba(0, 0, 0, .62);
  --shadow-lg: 0 45px 120px rgba(0, 0, 0, .65);

  --accent:      var(--blue);
  --accent-soft: rgba(79, 155, 255, .14);

  --panel:   #0b1421;
  --panel-2: #102338;
}

/* --------------------------------- base ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -.015em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

code, .mono, pre { font-family: var(--mono); }

code {
  font-size: .88em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .12em .4em;
  border-radius: 6px;
  word-break: break-word;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
/* A heading a script moves focus to (a form's "sent" state) is announced, not drawn around. */
[tabindex="-1"]:focus-visible { outline: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  font: 700 13px/1 var(--sans); text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* -------------------------------- topbar --------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px var(--pad);
  display: flex; align-items: center; gap: 18px;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; flex: 0 0 auto;
}
.brand .lockup { height: 26px; width: auto; }
.brand-sub {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  letter-spacing: .18em; color: var(--ink-3);
  border-left: 1px solid var(--line); padding-left: 11px; line-height: 1;
}

/* The lockup ships as two files - the gradient one for light grounds, the white
   one for dark grounds - and the swap is pure CSS, so the toggle wins in both
   directions and the page is still right with JavaScript off. Stacked in the
   same grid cell so neither reserves layout width when hidden. */
.mark-pair { display: grid; }
.mark-pair > .lockup { grid-area: 1 / 1; }
.lockup-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup-light { display: none; }
  :root:not([data-theme="light"]) .lockup-dark  { display: block; }
}
:root[data-theme="dark"] .lockup-light { display: none; }
:root[data-theme="dark"] .lockup-dark  { display: block; }

.nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
  min-width: 0;
}
.nav a {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; color: var(--ink-3);
  text-decoration: none; padding: 8px 10px; border-radius: 999px;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--ink); background: var(--accent-soft); }

/* The language switch itself is styled in i18n.css, shared with the holding
   page; only where it sits belongs here. */
.footer-prefs { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.footer-prefs ~ .footer-links { margin-left: 0; }
/* "true": the home page's section in view; "page": the page you are on. */
.nav a[aria-current], .nav-menu-panel a[aria-current] { color: var(--accent); background: var(--accent-soft); }

.theme-toggle {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 13px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--ink); }
.theme-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  flex: 0 0 auto;
}

.topbar-cta {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  color: #ffffff; text-decoration: none;
  background: linear-gradient(96deg, var(--blue), var(--teal));
  border-radius: 999px; padding: 9px 15px;
  transition: filter .15s ease, transform .15s ease;
}
.topbar-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nav + .topbar-cta { margin-left: 6px; }

.nav-sep { width: 1px; height: 16px; margin: 0 6px; background: var(--line); flex: 0 0 auto; }

/* Beside the menu at every width: contact as an envelope, and the flag of the language in use,
   a <details> that lists the languages. Its buttons are the same .lang ones i18n.js listens to. */
.topbar-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.topbar-icon, .lang-menu-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; min-width: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.topbar-icon:hover, .lang-menu-button:hover { border-color: var(--accent); color: var(--ink); }
.topbar-icon[aria-current], .lang-menu[open] .lang-menu-button { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.topbar-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar-icon svg.icon-fill { fill: currentColor; stroke: none; }
.lang-menu { position: relative; }
.lang-menu-button { list-style: none; }
.lang-menu-button::-webkit-details-marker { display: none; }
.lang-menu-button img { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-soft); }
.lang-menu-caret { width: 8px; height: 5px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.lang-menu[open] .lang-menu-caret { transform: rotate(180deg); }
.lang-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  display: grid; gap: 2px; min-width: 170px; padding: 8px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-hi);
}
.lang-menu-panel .lang { gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 11px; letter-spacing: .06em; color: var(--ink-2); text-align: left; }
.lang-menu-panel .lang span { display: inline; }
.lang-menu-panel .lang img { width: 20px; height: 14px; opacity: 1; }
.lang-menu-panel .lang:hover { background: var(--accent-soft); color: var(--ink); }
/* No JavaScript means no working switch, so do not advertise one. */
.no-js .lang-menu { display: none; }

/* DOCS in the top menu: a <details> that opens the documentation, PoM Academy and the articles. */
.nav-sub { position: relative; }
.nav-sub-button {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--ink-3);
  padding: 8px 10px; border-radius: 999px; white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.nav-sub-button::-webkit-details-marker { display: none; }
.nav-sub-button:hover, .nav-sub[open] .nav-sub-button { color: var(--ink); background: var(--accent-soft); }
.nav-sub:has([aria-current]) .nav-sub-button { color: var(--accent); background: var(--accent-soft); }
.nav-sub[open] .lang-menu-caret { transform: rotate(180deg); }
.nav-sub-panel {
  position: absolute; left: 50%; translate: -50% 0; top: calc(100% + 8px); z-index: 40;
  display: grid; gap: 2px; width: max-content; min-width: 220px; padding: 8px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-hi);
}
.nav .nav-sub-panel a {
  display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px;
  font-family: var(--sans); font-size: 14px; letter-spacing: -.01em; color: var(--ink);
}
.nav .nav-sub-panel a[hidden] { display: none; }
.nav-sub-panel a strong { font-weight: 700; }
.nav-sub-hint { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.nav-sub-panel a:hover { background: var(--accent-soft); }
.nav-sub-panel a[aria-current] .nav-sub-hint { color: var(--accent); }

/* Narrower screens: the same links behind a menu button, a <details> so it opens without script. */
.nav-menu { display: none; position: relative; margin-left: auto; }
.nav-menu-button {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
}
.nav-menu-button::-webkit-details-marker { display: none; }
.nav-menu-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-menu[open] .nav-menu-button { border-color: var(--accent); color: var(--accent); }
.nav-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  display: grid; gap: 2px; min-width: 220px; padding: 8px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-hi);
}
.nav-menu-panel a {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--ink-2);
  text-decoration: none; padding: 10px 12px; border-radius: 12px;
}
.nav-menu-panel a:hover { background: var(--accent-soft); color: var(--ink); }

/* Just above the menu button's width the full nav fits only with tighter links. */
@media (max-width: 1440px) {
  .nav { gap: 2px; }
  .nav a { padding-inline: 7px; }
}

@media (max-width: 1240px) {
  .nav { display: none; }
  .nav-menu { display: block; margin-left: 0; }
  /* the nav is gone at this width, so the tools take over pushing right */
  .topbar-tools { margin-left: auto; }
}

/* ------------------------------ typography ------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 20px;
}
.tick {
  display: inline-block; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  flex: 0 0 auto;
}
.eyebrow-hero { color: var(--panel-ink-3); }

.h2 {
  font-size: clamp(30px, 5vw, 45px);
  font-weight: 900;
  letter-spacing: -.067em;
  word-spacing: .12em;
  line-height: .96;
  margin: 0 0 20px;
  max-width: 20ch;
}
.h3 {
  font-size: clamp(19px, 2.2vw, 22px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.14;
  margin: 0 0 10px;
}
.lede {
  font-size: 17px; color: var(--ink-2);
  max-width: 62ch; margin: 0 0 42px;
}
.lede strong { color: var(--ink); font-weight: 700; }

.section { padding: clamp(64px, 9vw, 112px) 0 0; }
.h2 + .grid { margin-top: 34px; }
.section:last-of-type { padding-bottom: clamp(64px, 9vw, 112px); }

/* --------------------------------- hero ---------------------------------- */
.hero-wrap { padding-top: clamp(20px, 4vw, 40px); }

.hero {
  position: relative;
  isolation: isolate;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow-lg);
  padding: clamp(34px, 5.5vw, 76px) clamp(22px, 5vw, 72px) clamp(30px, 4vw, 52px);
  color: var(--panel-ink);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -30% -10% auto -10%; height: 130%;
  background:
    radial-gradient(52% 60% at 50% 8%, rgba(79, 155, 255, .30), transparent 68%),
    radial-gradient(44% 52% at 82% 40%, rgba(47, 220, 200, .22), transparent 70%),
    radial-gradient(38% 48% at 12% 62%, rgba(53, 201, 240, .14), transparent 72%);
  z-index: -1; pointer-events: none;
}

.hero-sub {
  font-size: clamp(15.5px, 1.6vw, 17.5px);
  color: var(--panel-ink-2);
  max-width: 60ch;
  margin: 0 0 32px;
}
.hero-sub strong { color: var(--panel-ink); font-weight: 700; }
.hero-sub code {
  background: var(--panel-fill);
  color: var(--cyan-bright);
}

/* buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-solid { background: #ffffff; color: #14121a; }
.btn-solid:hover { background: #e8e6ef; }

.btn-ghost {
  background: var(--panel-fill);
  color: var(--panel-ink);
  border-color: var(--panel-line);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }

.btn-outline {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-outline[aria-disabled="true"] { color: var(--ink-3); }

.btn-lg { padding: 16px 32px; font-size: 15.5px; }

.btn-accent {
  background: linear-gradient(96deg, var(--blue), var(--teal));
  color: #ffffff;
}
.btn-accent:hover { filter: brightness(1.08); }

.hero-note {
  margin: -22px 0 0;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--panel-ink-3);
}

/* --------------------------------- cards --------------------------------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
/* Three cards go straight from one column to three: two columns would leave the third alone. */
@media (max-width: 959px) { .grid-3:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 960px) { .grid-3:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid > * { min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 34px) clamp(22px, 3vw, 38px);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card p { color: var(--ink-2); margin: 0; font-size: 15.5px; }
.card p + p { margin-top: 12px; }

.card-accent {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: linear-gradient(180deg, var(--accent-soft), var(--card));
}

.stepnum {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .2em; color: var(--accent);
  margin: 0 0 12px !important;
}
.step-grid { margin-top: 22px; }

/* --------------------------- cake animation ----------------------------- */
/* The scene sits straight on the hero panel, with no ground of its own, and
   picks its own layout from the stage width (cake-animation.js): a wide one,
   and a portrait one capped so it never towers. */
.cake-animation { margin: 6px 0 30px; }
.cake-bar {
  display: flex; justify-content: flex-end;
  margin-bottom: 4px;
}
.cake-toggle {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--panel-ink-2);
  background: var(--panel-fill);
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.cake-toggle:hover { color: var(--panel-ink); border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); }
.cake-toggle:focus-visible { outline-color: var(--cyan-bright); }
.cake-toggle > span { display: inline-flex; align-items: center; gap: 8px; }
.cake-icon { width: 11px; height: 11px; fill: currentColor; flex: 0 0 auto; }
.cake-when-paused,
.cake-when-ended,
.cake-animation.is-paused .cake-when-playing,
.cake-animation.is-ended .cake-when-playing { display: none !important; }
.cake-animation.is-paused .cake-when-paused,
.cake-animation.is-ended .cake-when-ended { display: inline-flex !important; }
.cake-animation:not(.is-ready) .cake-bar { display: none; }

.cake-stage { margin: 0; }
.cake-scene {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}
.cake-scene[data-layout="narrow"] { max-width: 480px; }
.cake-animation:not(.is-ready) .cake-scene { display: none; }
.cake-fallback {
  padding: 22px;
  border: 1px solid var(--panel-line);
  border-radius: var(--r-card);
  text-align: center;
  color: var(--panel-ink-2);
}
.cake-fallback p {
  max-width: 46ch;
  margin: 0 auto;
  font-size: 15px;
}
.cake-animation.is-ready .cake-fallback { display: none; }

/* -------------------------------- tagline -------------------------------- */
/* The one line the page stands on, set in the hero title's voice. */
.tagline-wrap {
  position: relative;
  isolation: isolate;
  /* The clouds may drift past the edges; they never widen the page. */
  overflow: hidden;
  padding: clamp(64px, 9vw, 112px) 0 clamp(28px, 4vw, 48px);
  margin-bottom: calc(-1 * clamp(28px, 4vw, 48px));
}
/* Clouds in the logo's colours, left to right, faint enough that the line stays the subject. */
.tagline-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tagline-sky > svg:first-child { position: absolute; }
.cloud { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto; aspect-ratio: 2 / 1; opacity: var(--o); animation: cloud-drift var(--t) ease-in-out infinite alternate; }
.cloud-1 { --w: clamp(150px, 22vw, 300px); --x: -4%;  --y: 18%; --o: .10; --t: 46s; fill: var(--blue); }
.cloud-2 { --w: clamp(90px, 12vw, 170px);  --x: 22%;  --y: 4%;  --o: .08; --t: 38s; fill: var(--cyan); animation-delay: -12s; }
.cloud-3 { --w: clamp(120px, 17vw, 240px); --x: 58%;  --y: 58%; --o: .09; --t: 52s; fill: var(--cyan); animation-delay: -30s; }
.cloud-4 { --w: clamp(160px, 24vw, 330px); --x: 76%;  --y: 8%;  --o: .10; --t: 44s; fill: var(--teal); animation-delay: -6s; }
.cloud-5 { --w: clamp(70px, 9vw, 130px);   --x: 8%;   --y: 66%; --o: .07; --t: 34s; fill: var(--teal); animation-delay: -20s; }
:root[data-theme="dark"] .cloud { opacity: calc(var(--o) * 1.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cloud { opacity: calc(var(--o) * 1.6); } }
@keyframes cloud-drift { from { translate: -6vw 0; } to { translate: 6vw 0; } }
@media (max-width: 640px) { .cloud-2, .cloud-5 { display: none; } }
.tagline {
  margin: 0 auto;
  max-width: 22em;
  text-align: center;
  font-size: clamp(32px, 5.6vw, 64px);
  font-weight: 900;
  letter-spacing: -.07em;
  word-spacing: .12em;
  line-height: 1;
  text-wrap: balance;
}
.tagline-a, .tagline-b { display: block; }
.tagline-a { color: var(--ink); }
.tagline-b {
  margin-top: .12em;
  background: linear-gradient(96deg, var(--blue) 0%, var(--cyan) 48%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .tagline-b { color: var(--accent); background: none; }
}
/* The line plays in once, when it is first seen: the first half rises, then the second, its gradient
   sweeping left to right like the logo's. app.js adds is-waiting only when it can observe the line
   and motion is welcome, so without either the line simply stands. */
.tagline-b { background-size: 200% 100%; background-position: 0 0; }
.tagline-wrap.is-waiting .tagline-a, .tagline-wrap.is-waiting .tagline-b { opacity: 0; translate: 0 .35em; }
.tagline-wrap.is-playing .tagline-a { animation: tagline-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.tagline-wrap.is-playing .tagline-b {
  background-image: linear-gradient(96deg, var(--blue) 0%, var(--cyan) 24%, var(--teal) 50%, var(--teal) 100%);
  animation: tagline-rise .9s cubic-bezier(.2, .7, .2, 1) .45s both, tagline-sweep 2.2s ease-out .45s both;
}
@keyframes tagline-rise { from { opacity: 0; translate: 0 .35em; } to { opacity: 1; translate: 0 0; } }
@keyframes tagline-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .cloud { animation: none; }
  .tagline-wrap.is-waiting .tagline-a, .tagline-wrap.is-waiting .tagline-b { opacity: 1; translate: none; }
}

/* --------------------------------- steps --------------------------------- */
/* A numbered path, however many steps it takes, joined by one brand rule. */
.steps {
  list-style: none; margin: 0; padding: 0;
  max-width: 820px;
  display: grid; gap: 14px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 25px; top: 30px; bottom: 30px; width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
  opacity: .5;
}
/* The number straddles the card's left edge, centred on the rule. */
.steps { padding-left: 26px; }
.step {
  position: relative;
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 18px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 22px 26px 22px 0;
}
.step-num {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  margin-left: -27px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #ffffff;
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  box-shadow: 0 0 0 6px var(--bg);
}
.step .h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* -------------------------------- networks ------------------------------- */
.plan-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .2em;
  color: var(--accent); margin: 0 0 12px !important;
}
.net-card { display: flex; flex-direction: column; }
.net-best {
  margin-top: auto !important;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px !important;
  color: var(--ink-3) !important;
}
.net-card .h3 + p { margin-bottom: 16px; }

/* Why (02): the one measured number, in the card it explains. */
.why-stat { display: grid; gap: 2px; margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px !important; color: var(--ink-3) !important; }
.why-stat strong { font-size: 28px; font-weight: 900; letter-spacing: -.04em; color: var(--ink); line-height: 1.1; }

/* How (03): one measured decode round, drawn by lab.js; wide in a row, narrow in a column. */
.pipe { margin: clamp(26px, 4vw, 40px) 0 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--r-big); background: var(--card); box-shadow: var(--shadow); }
.pipe-art { min-height: 120px; }
.pipe-svg { display: block; width: 100%; max-width: 980px; height: auto; margin-inline: auto; overflow: visible; }
.pipe-box { fill: var(--card-solid); stroke: var(--line); stroke-width: 2; transition: stroke .12s ease; }
.pipe-box.is-busy { stroke: var(--teal); }
.pipe-name { font-size: 18px; font-weight: 800; fill: var(--ink); }
.pipe-layers { font-family: var(--mono); font-size: 13px; font-weight: 700; fill: var(--accent); }
.pipe-gpu { font-family: var(--mono); font-size: 12.5px; fill: var(--ink-3); }
.pipe-ribbon { fill: var(--line); }
.pipe-slice { fill: var(--accent); }
.pipe-ms { font-family: var(--mono); font-size: 12.5px; font-weight: 700; fill: var(--ink-2); }
.pipe-compute { fill: var(--teal); }
.pipe-link { stroke: var(--line); stroke-width: 2.5; }
.pipe-net { stroke: var(--cyan); stroke-dasharray: 6 6; }
.pipe-net-label { fill: var(--cyan); }
.pipe-dot { fill: var(--accent); }
.pipe-glow { fill: var(--accent); opacity: .18; }
.pipe figcaption { margin-top: 14px; max-width: 78ch; font-size: 14px; line-height: 1.6; color: var(--ink-3); }

/* The measured lab (04): the October 2026 test on the dark panel, the copy beside the race. */
.lab {
  margin-top: 22px;
  display: grid; gap: clamp(22px, 4vw, 48px);
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-big);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 4vw, 48px);
  position: relative; isolation: isolate; overflow: hidden;
}
.lab::before {
  content: ""; position: absolute; inset: -30% -10% auto 30%; height: 150%;
  background: radial-gradient(45% 55% at 60% 40%, rgba(47, 220, 200, .18), transparent 70%);
  z-index: -1; pointer-events: none;
}
.lab .plan-tag { color: var(--cyan-bright); font-size: 10px; }
.lab-copy p { color: var(--panel-ink-2); font-size: 15.5px; margin: 0; }
.lab-copy .h3 { color: var(--panel-ink); }
.lab-machines { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 8px; }
.lab-machines li {
  display: grid; gap: 2px; padding: 10px 14px;
  border: 1px solid var(--panel-line); border-radius: 14px; background: var(--panel-fill);
}
.lab-machines strong { font-size: 13px; color: var(--panel-ink); }
.lab-machines span { font-family: var(--mono); font-size: 11.5px; color: var(--panel-ink-3); overflow-wrap: anywhere; }
.lab-big { display: grid; gap: 4px; margin: 0 0 18px !important; }
.lab-big strong {
  font-size: clamp(30px, 4vw, 40px); font-weight: 900; letter-spacing: -.04em; line-height: 1;
  background: linear-gradient(90deg, var(--blue-bright), var(--teal-bright)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.example-note { font-size: 14px !important; }
.example-note strong { color: var(--panel-ink); }

/* The race: three lanes, the same answer, real time (lab.js); the markup is its finished state. */
.race { margin: 0; display: grid; gap: 14px; }
.race-head { margin: 0; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--panel-ink-3); }
.race-lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.race-lanes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; }
.race-name { font-size: 14px; color: var(--panel-ink); }
.race-time { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--teal-bright); text-align: right; min-width: 5ch; }
.race-slow .race-time { color: #ff9b9b; }
.race-track { grid-column: 1 / -1; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.race-track i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-bright), var(--teal-bright)); }
.race-slow .race-track i { width: 3%; background: #ff9b9b; }
.race figcaption { font-size: 13px; line-height: 1.6; color: var(--panel-ink-3); }
.race figcaption a { display: inline-block; margin-top: 6px; color: var(--cyan-bright); font-weight: 700; }
.race-again {
  justify-self: start; font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--panel-ink-2);
  background: transparent; border: 1px solid var(--panel-line); border-radius: 999px; padding: 7px 12px; cursor: pointer;
}
.race-again:hover { border-color: var(--cyan-bright); color: var(--panel-ink); }
.race-again[hidden] { display: none; }
@media (max-width: 860px) {
  .lab { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------- videos --------------------------------- */
/* Placeholders until the real videos exist: the frame keeps the shape the
   video will have, so swapping one in changes nothing around it. */
.video-frame {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  overflow: hidden;
}
.shot-soon {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .18em; color: var(--panel-ink-3);
  border: 1px dashed var(--panel-line);
  border-radius: 999px;
  padding: 7px 14px;
}
/* One video, the one that presents PoM: the frame large, its text beside it; one column below 900px. */
.videos { grid-template-columns: minmax(0, 1fr); }
.video-desc { color: var(--ink-2); font-size: 15.5px; }
.video { padding: 14px 14px clamp(22px, 3vw, 28px); }
.video-text { padding-inline: 10px; }
.video .stepnum { margin-top: 18px !important; }
@media (min-width: 901px) {
  .video-main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: center; padding: 14px; }
  .video-main .video-text { padding: 0 clamp(8px, 1.6vw, 22px) 0 0; }
  .video-main .stepnum { margin-top: 0 !important; }
  .video-main .h3 { font-size: clamp(22px, 2.2vw, 30px); }
}
.video-frame {
  aspect-ratio: 16 / 9;
  flex-direction: column; gap: 16px;
  margin: 0;
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(79, 155, 255, .28), transparent 70%),
    radial-gradient(50% 70% at 80% 80%, rgba(47, 220, 200, .2), transparent 70%),
    var(--panel);
  border: 1px solid var(--line);
}
.video-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
}
.video-play svg { width: 20px; height: 20px; fill: #ffffff; margin-left: 3px; }
.videos[hidden] { display: none; }

/* Under the main video: a row of three, the other published videos (at most two) and then the PoM
   Academy tile filling the rest of it (--rest, set by home-media.js); one column on a phone. */
.videos-after { margin-top: clamp(28px, 4vw, 44px); }
.videos-after[hidden], .videos-more-title[hidden] { display: none; }
.videos-more-title { margin: 0 0 16px; }
.videos-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-small { padding: 12px 12px 18px; }
.video-small .video-frame { border-radius: 14px; }
.video-small .video-play { width: 46px; height: 46px; }
.video-small-title { margin: 14px 6px 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.videos-academy {
  grid-column: span var(--rest, 3);
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  min-height: 140px; padding: clamp(24px, 3vw, 34px);
  border: 0; color: #ffffff; text-decoration: none;
  background:
    radial-gradient(70% 90% at 85% 15%, rgba(47, 220, 200, .35), transparent 70%),
    linear-gradient(120deg, var(--blue), var(--teal));
}
.videos-academy-kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .18em; opacity: .85; }
.videos-academy-text { font-size: clamp(22px, 2.4vw, 30px); font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.videos-academy-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-top: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
}
.videos-academy-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.videos-academy:hover .videos-academy-arrow svg { transform: translateX(3px); }
@media (max-width: 900px) {
  .videos-more { grid-template-columns: minmax(0, 1fr); }
  .videos-academy { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .videos-academy-arrow svg { transition: none; } .videos-academy:hover .videos-academy-arrow svg { transform: none; } }

/* A published video (content.js): the thumbnail kept by the license server, a play button, and on
   click YouTube's player in the same frame. */
.video-ready {
  width: 100%; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
}
.video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-ready::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(4, 10, 20, .45));
  transition: background-color .18s ease;
}
.video-ready .video-play {
  position: relative; z-index: 1;
  background: rgba(8, 15, 24, .55);
  border-color: rgba(255, 255, 255, .5);
  backdrop-filter: blur(6px);
  transition: transform .18s ease, background-color .18s ease;
}
.video-ready:hover .video-play, .video-ready:focus-visible .video-play { transform: scale(1.08); background: var(--blue); }
.video-ready:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.video-time {
  position: absolute; z-index: 1; right: 12px; bottom: 10px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: #ffffff; background: rgba(8, 15, 24, .72); border-radius: 6px; padding: 3px 7px;
}
.video-player { display: block; width: 100%; height: auto; border: 0; background: #000000; }

/* The full-screen player (content.js): the whole window, the video as large as fits at 16:9. */
.theater {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 2.4vw, 28px);
  border: 0; background: #000000; color: #ffffff;
}
.theater[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.theater::backdrop { background: #000000; }
.theater-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.theater-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; letter-spacing: -.02em; }
.theater .theater-close { flex: 0 0 auto; gap: 6px; margin: 0; padding: 10px 18px; color: #ffffff; border-color: rgba(255, 255, 255, .45); }
.theater-screen { display: grid; place-items: center; min-height: 0; }
.theater-screen .video-player {
  width: min(100%, calc((100dvh - 2 * clamp(12px, 2.4vw, 28px) - 60px) * 16 / 9));
  aspect-ratio: 16 / 9; height: auto; border-radius: 14px;
}
@media (prefers-reduced-motion: reduce) { .video-ready .video-play { transition: none; } .video-ready:hover .video-play { transform: none; } }

/* ------------------------------- screenshots ------------------------------- */
/* The PoM screenshots under the videos (home-media.js): a row that scrolls sideways inside itself,
   one screen and a glimpse of the next, snapping to each; a click opens it full screen. */
.screens { margin-top: clamp(30px, 4vw, 44px); }
.screens[hidden] { display: none; }
.screens-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.screens-head .h3 { margin: 0; }
.screens-nav { display: flex; align-items: center; gap: 8px; }
.screens.is-single .screens-nav { display: none; }
.screens-count { min-width: 3.4em; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.screens-arrow {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card, transparent); color: var(--ink); cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.screens-arrow:hover { border-color: var(--accent); color: var(--accent); }
.screens-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.screens-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 880px); gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
  border-radius: 22px;
}
.screens-track::-webkit-scrollbar { display: none; }
.screens-track:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.screens.is-single .screens-track { grid-auto-columns: 100%; }
.screen { margin: 0; scroll-snap-align: start; display: grid; gap: 10px; align-content: start; }
.screen-open {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--panel); cursor: zoom-in;
  transition: border-color .18s ease;
}
.screen-open:hover { border-color: var(--accent); }
.screen-open:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.screen-open img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.screen figcaption { padding-inline: 6px; color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 640px) { .screens-track { grid-auto-columns: 88%; gap: 12px; } }

/* ------------------------------- downloads ------------------------------- */
/* The download is the page's main call to action, so it gets the same dark
   floating panel as the hero. */
.cta-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow-lg);
  padding: clamp(34px, 5vw, 64px) clamp(22px, 5vw, 64px);
  color: var(--panel-ink);
}
.cta-panel::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%; height: 140%;
  background:
    radial-gradient(46% 60% at 20% 10%, rgba(79, 155, 255, .26), transparent 70%),
    radial-gradient(40% 50% at 86% 30%, rgba(47, 220, 200, .2), transparent 70%);
  z-index: -1; pointer-events: none;
}
.cta-panel .lede { color: var(--panel-ink-2); }
.cta-panel .card {
  background: var(--panel-fill);
  border-color: var(--panel-line);
  box-shadow: none;
}
.cta-panel .card:hover { border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.cta-panel .card p { color: var(--panel-ink-2); }
.cta-panel .dl-icon { background: rgba(255, 255, 255, .08); color: var(--cyan-bright); }
.cta-panel .dl-meta { color: var(--panel-ink-3) !important; }
.cta-panel .dl-card .btn { width: 100%; margin-top: auto; }
.cta-panel .dl-meta { margin-bottom: 22px !important; }
.cta-panel .fineprint { color: var(--panel-ink-3); }
.cta-panel .fineprint a { color: var(--cyan-bright); }
.cta-panel :focus-visible { outline-color: var(--cyan-bright); }

.dl-card { display: flex; flex-direction: column; align-items: flex-start; }
.dl-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 18px;
}
.dl-meta { font-size: 13px !important; color: var(--ink-3) !important; margin-top: 4px !important; }
.dl-card .btn { margin-top: 20px; }
/* Compact platform cards: the icon beside the name and requirement, then one button per file
   of the newest release (download.js), labelled with its build and size rather than its name. */
.dl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.dl-head .dl-icon { margin: 0; width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto; }
.dl-head .h3 { margin: 0; }
.cta-panel .dl-head .dl-meta { margin: 2px 0 0 !important; }
.cta-panel .dl-card { padding: 20px 20px 22px; }
.dl-files { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; margin-top: auto; }
.cta-panel .dl-files .btn { margin-top: 0; }
.dl-none { margin: 0; font-size: 14px; }
.dl-release { margin: -6px 0 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--cyan-bright); }
/* Before the launch, without an invitation (download.js): what is going on, and where to ask. */
.dl-pending .dl-files .btn { opacity: .55; pointer-events: none; }
.dl-locked { opacity: .5; cursor: not-allowed; }
.dl-invite {
  display: flex; gap: 16px; align-items: flex-start;
  margin: -4px 0 26px; padding: 18px 20px;
  border: 1px solid var(--panel-line); border-radius: 22px; background: var(--panel-fill);
}
.dl-invite[hidden] { display: none; }
.dl-invite-icon { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 2px; fill: none; stroke: var(--cyan-bright); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dl-invite-title { margin: 0 0 6px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--panel-ink); }
.dl-invite-text { margin: 0 0 14px; color: var(--panel-ink-2); font-size: 15px; }
.dl-invite .dl-invite-cta { margin: 0; }
.dl-invite-invalid, .dl-invite[data-state="invalid"] .dl-invite-required { display: none; }
.dl-invite[data-state="invalid"] .dl-invite-invalid { display: inline; }
@media (max-width: 560px) { .dl-invite { flex-direction: column; gap: 10px; } }
/* Docker, under the platform cards: download.js shows it only to whoever may download. The command
   reads like a terminal and scrolls inside its own box, never the page. */
.dl-docker { margin-top: 22px; padding: 24px 24px 22px; }
.dl-docker[hidden] { display: none; }
.cta-panel .dl-docker .dl-head .dl-meta { margin-bottom: 0 !important; }
.dl-docker strong { color: var(--panel-ink); font-weight: 700; }
.dl-code { position: relative; margin: 18px 0 14px; }
.dl-code pre {
  margin: 0; padding: 18px 22px; padding-right: 116px; overflow-x: auto;
  border-radius: 18px; background: rgba(0, 0, 0, .38); border: 1px solid var(--panel-line);
  color: rgba(255, 255, 255, .88); font-family: var(--mono); font-size: 13px; line-height: 1.75;
  -webkit-overflow-scrolling: touch;
}
.dl-code code { background: none; padding: 0; border: 0; border-radius: 0; color: inherit; font-size: inherit; white-space: pre; }
.dl-copy { position: absolute; top: 12px; right: 12px; padding: 8px 16px; font-size: 13px; }
.dl-copy-done, .dl-copy.is-done .dl-copy-idle { display: none; }
.dl-copy.is-done .dl-copy-done { display: inline; }
.cta-panel .dl-docker .dl-hint { font-size: 14px; color: var(--panel-ink-3); }
.cta-panel .dl-hint code { padding: 2px 7px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .08); font-family: var(--mono); font-size: 12.5px; color: var(--cyan-bright); white-space: nowrap; }
@media (max-width: 560px) {
  .dl-docker { padding: 20px 18px; }
  .dl-code pre { padding: 56px 18px 16px; font-size: 12px; }
}

/* After a macOS download (download.js): the first-launch steps, on the download panel's own dark
   ground in both themes, so it reads as part of the same moment. */
.mac-help {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto;
  padding: clamp(26px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(22px, 3.4vw, 32px);
  border: 1px solid var(--panel-line); border-radius: clamp(24px, 3vw, 32px);
  background:
    radial-gradient(60% 46% at 12% 0%, rgba(79, 155, 255, .22), transparent 70%),
    radial-gradient(50% 40% at 100% 12%, rgba(47, 220, 200, .16), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow-lg); color: var(--panel-ink);
}
.mac-help::backdrop { background: rgba(8, 15, 24, .62); backdrop-filter: blur(4px); }
.mac-help .eyebrow { margin-bottom: 14px; padding-right: 44px; }
.mac-help-title { margin: 0 0 12px; padding-right: 36px; font-size: clamp(23px, 3.4vw, 30px); font-weight: 900; line-height: 1.08; letter-spacing: -.04em; }
.mac-help-lede { margin: 0 0 22px; color: var(--panel-ink-2); font-size: 16px; }
.mac-help-steps { display: grid; gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: mac-step; }
.mac-help-steps > li { position: relative; min-width: 0; padding-left: 42px; color: var(--panel-ink-2); font-size: 15.5px; counter-increment: mac-step; }
.mac-help-steps > li::before {
  content: counter(mac-step); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal)); color: #ffffff;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
}
.mac-help strong { color: var(--panel-ink); font-weight: 700; }
.mac-help kbd {
  padding: 1px 7px; border: 1px solid var(--panel-line); border-radius: 6px; background: rgba(255, 255, 255, .08);
  font-family: var(--sans); font-size: 13px; color: var(--panel-ink); white-space: nowrap;
}
.mac-help .dl-code { margin: 12px 0 0; }
/* The command's lines run long: the copy button sits above them, never over them. */
.mac-help .dl-code pre { padding: 54px 18px 14px; font-size: 12.5px; }
.mac-help-note { margin: 0 0 22px; padding-top: 16px; border-top: 1px solid var(--panel-line); color: var(--panel-ink-3); font-size: 13.5px; }
.mac-help .mac-help-done { margin: 0; }
.mac-help-x {
  position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--panel-line); border-radius: 50%; background: rgba(255, 255, 255, .06);
  color: var(--panel-ink); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.mac-help-x:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }
.mac-help-x:focus-visible, .mac-help .dl-copy:focus-visible { outline: 3px solid var(--cyan-bright); outline-offset: 2px; }
@media (max-width: 560px) {
  .mac-help-steps > li { padding-left: 38px; }
  .mac-help .mac-help-done { width: 100%; }
}

.fineprint {
  margin: 26px 0 0;
  font-size: 14px; color: var(--ink-3);
}
.fineprint a code { background: none; padding: 0; }
.fineprint a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ------------------------------- enterprise ------------------------------ */
.soon-tag {
  margin-left: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: .16em;
}
.ent-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 18px;
}
.ent-icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ent-cta { margin: 30px 0 0; }
/* The Enterprise edition, inside the plugins section: a block of its own below the store link. */
.btn[aria-disabled="true"] { cursor: default; }

/* ------------------------------ closing CTA ------------------------------ */
.final-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); align-items: center;
  gap: 28px clamp(24px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--r-big);
  background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--card);
  box-shadow: var(--shadow);
}
.final-cta .h2 { margin: 0; max-width: 18ch; }
.final-copy .lede { margin: 16px 0 18px; max-width: 48ch; }
/* The captain's line: the gradient of the logo, like the tagline's second half. */
.final-punch {
  margin: 0 0 26px; max-width: 26ch; font-size: clamp(20px, 2.2vw, 26px); font-weight: 900; letter-spacing: -.04em; line-height: 1.15;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.final-copy .btn-row { margin: 0; }
@media (max-width: 860px) { .final-cta { grid-template-columns: minmax(0, 1fr); } }

/* Under the closing card, filled by plugin-shots.js from the store: a card per plugin (logo, name,
   description; a click opens its screenshots), then the example plugin, larger, across the row. */
.plugin-shots { margin-top: 26px; }
.plugin-shots[hidden], .plugin-cards[hidden], .plugin-example[hidden], .plugin-example [hidden] { display: none; }
.plugin-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; gap: 16px; }
@media (max-width: 1000px) { .plugin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plugin-cards { grid-template-columns: minmax(0, 1fr); } }
.plugin-card {
  display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px 20px 18px;
  border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.plugin-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.plugin-card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.plugin-card-logo, .plugin-example-logo {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; object-fit: contain;
  /* white in both themes: plugin logos are drawn for a light ground, and a dark one hides on a dark card */
  background: #ffffff; border: 1px solid var(--line-soft);
}
.plugin-card-title { display: grid; gap: 3px; min-width: 0; }
.plugin-card-name { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.plugin-card-tag-team { text-transform: none !important; }
.plugin-card-tag { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.plugin-card-desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
  color: var(--ink-2); font-size: 14.5px; line-height: 1.55;
}
.plugin-card-more { margin-top: auto; padding-top: 2px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.plugin-card-more::after { content: " →"; }
@media (prefers-reduced-motion: reduce) { .plugin-card:hover { transform: none; } }

.plugin-example {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(22px, 3vw, 40px); align-items: center;
  margin-top: 18px; padding: clamp(22px, 3vw, 36px);
  background:
    radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 70%),
    var(--card);
}
.plugin-example:not(:has(.plugin-example-shot:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.plugin-example-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.plugin-example-logo { width: 64px; height: 64px; border-radius: 18px; }
.plugin-example-kicker { margin: 0 0 4px !important; font-family: var(--mono); font-size: 10.5px !important; font-weight: 700; letter-spacing: .16em; color: var(--accent) !important; }
.plugin-example-name { margin: 0; font-size: clamp(22px, 2.4vw, 30px); overflow-wrap: anywhere; }
.plugin-example .plugin-example-lede { margin: 18px 0 8px; color: var(--ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.plugin-example .plugin-example-desc { margin: 0 0 22px; }
.plugin-example .btn-row { margin: 0; }
.plugin-example-shot { position: relative; display: block; min-width: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-soft); cursor: zoom-in; transition: transform .18s ease; }
.plugin-example-shot:hover { transform: translateY(-2px); }
.plugin-example-shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.plugin-example-badge {
  position: absolute; right: 14px; top: 14px; padding: 8px 16px; border-radius: 999px;
  background: linear-gradient(96deg, var(--blue), var(--teal)); color: #ffffff; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(8, 15, 24, .28);
}
@media (max-width: 860px) { .plugin-example { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .plugin-example-shot:hover { transform: none; } }

/* A plugin's screenshots, full screen: a dark stage in both themes, like the store's own gallery. */
.shots-box-arrow[hidden] { display: block; visibility: hidden; }
.shots-box {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 2vw, 22px);
  border: 0; background: var(--panel); color: #ffffff;
}
.shots-box::backdrop { background: var(--panel); }
.shots-box-inner { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.shots-box-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.shots-box-bar strong { font-size: 17px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.shots-box-bar .btn-row { margin: 0; }
.shots-box .btn-outline { gap: 6px; color: #ffffff; border-color: rgba(255, 255, 255, .45); }
.shots-box-stage { min-height: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.shots-box-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.shots-box-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08); color: #ffffff; font-size: 24px; line-height: 1; cursor: pointer;
}
.shots-box-arrow:hover { background: rgba(255, 255, 255, .2); }
.shots-box-count { margin: 0; text-align: center; font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .72); }
@media (max-width: 520px) {
  .shots-box-stage { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 4px; }
  .shots-box-arrow { width: 34px; height: 34px; font-size: 20px; }
  .shots-box .btn-row .btn { flex: 0 0 auto; padding: 10px 16px; font-size: 13px; }
}

/* The puzzle: PoM and its plugins, one logo gradient across the whole board, so once the pieces
   lock it reads as one piece, the way the logo is one line. Its whole, still state is the
   default; app.js adds is-waiting (hidden) and then is-playing as it scrolls in, once. */
.puzzle { margin: 0; display: grid; justify-items: center; gap: 16px; }
.puzzle-art { width: min(440px, 100%); height: auto; overflow: visible; }
.pz-from { stop-color: var(--blue); }
.pz-mid { stop-color: var(--cyan); }
.pz-to { stop-color: var(--teal); }
.pz-piece { transform-box: fill-box; transform-origin: center; }
.pz-piece path { fill: url(#pz-gradient); stroke: var(--card-solid); stroke-width: 1.4; stroke-linejoin: round; }
.pz-piece text { fill: #ffffff; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-anchor: middle; }
/* The dark palette's gradient is bright, so its labels go dark, declared twice like the palette. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pz-piece text { fill: #08131f; } }
:root[data-theme="dark"] .pz-piece text { fill: #08131f; }
.puzzle-brand { font-family: var(--mono); font-size: clamp(12px, 1.4vw, 15px); font-weight: 700; letter-spacing: .26em; color: var(--ink-2); }
/* The caption: PoM, PieceOfMind, Platform of Mind and Power of Machines take turns for good, each
   rising in, holding and leaving upwards. All four sit in one grid cell, so the widest sets the
   width and nothing around it moves. Once the puzzle plays, the turns begin as the pieces lock. */
.puzzle-cycle { display: inline-grid; overflow: hidden; justify-items: center; padding-block: .1em; }
.puzzle-cycle > span {
  grid-area: 1 / 1; white-space: nowrap;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0;
  animation: pz-cycle 10s cubic-bezier(.22, .61, .36, 1) infinite both;
  animation-delay: calc(var(--start, 0s) + var(--k) * 2.5s);
}
.puzzle-cycle > span:nth-child(1) { --k: 0; }
.puzzle-cycle > span:nth-child(2) { --k: 1; }
.puzzle-cycle > span:nth-child(3) { --k: 2; }
.puzzle-cycle > span:nth-child(4) { --k: 3; }
@keyframes pz-cycle {
  0% { opacity: 0; translate: 0 100%; }
  5%, 22% { opacity: 1; translate: 0 0; }
  27%, 100% { opacity: 0; translate: 0 -100%; }
}
/* Without motion the turns stay, as a plain cross-fade in place. */
@keyframes pz-cycle-fade { 0% { opacity: 0; } 5%, 22% { opacity: 1; } 27%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .puzzle-cycle > span { animation-name: pz-cycle-fade; } }

/* Scattered pieces: each comes from its own side and angle, left to right, then the seams close,
   the board glows once and PieceOfMind turns into Platform of Mind. */
.pz-piece:nth-of-type(1) { --fx: -150px; --fy: -70px; --turn: -28deg; }
.pz-piece:nth-of-type(2) { --fx: -130px; --fy: 90px; --turn: 22deg; }
.pz-piece:nth-of-type(3) { --fx: -20px; --fy: -120px; --turn: 30deg; }
.pz-piece:nth-of-type(4) { --fx: 30px; --fy: 130px; --turn: -24deg; }
.pz-piece:nth-of-type(5) { --fx: 160px; --fy: -60px; --turn: 26deg; }
.pz-piece:nth-of-type(6) { --fx: 140px; --fy: 100px; --turn: -30deg; }
.js .puzzle.is-waiting .pz-piece { opacity: 0; }
.js .puzzle.is-waiting .puzzle-cycle > span { animation-play-state: paused; }
.puzzle.is-playing .puzzle-cycle { --start: 2.25s; }
.puzzle.is-playing .pz-piece { animation: pz-in .8s cubic-bezier(.22, .61, .36, 1) calc(var(--i) * .14s) both; }
.puzzle.is-playing .pz-piece path { animation: pz-lock .6s ease 1.55s both; }
.puzzle.is-playing .puzzle-art { animation: pz-glow 1.3s ease 1.6s both; }
@keyframes pz-in {
  from { opacity: 0; translate: var(--fx) var(--fy); rotate: var(--turn); }
  to { opacity: 1; translate: 0 0; rotate: 0deg; }
}
@keyframes pz-lock { from { stroke-width: 3.5; } to { stroke-width: 1.4; } }
@keyframes pz-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  45% { filter: drop-shadow(0 10px 28px rgba(53, 201, 240, .45)); }
}
.final-cta .btn-solid { background: var(--ink); color: var(--bg); }
.final-cta .btn-solid:hover { background: var(--accent); color: #ffffff; }

/* --------------------------------- footer -------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(38px, 5vw, 56px) 0 clamp(30px, 4vw, 44px);
  background: var(--bg-2);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 26px 40px;
}

/* The newsletter sits at the top of the footer: copy on the left, the e-mail field and its pill on
   the right, a line under it before the rest of the footer. */
.newsletter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: center;
  padding-bottom: clamp(30px, 4vw, 44px); margin-bottom: clamp(30px, 4vw, 44px);
  /* The line under it spans the content, not the shell's side padding. */
  background: linear-gradient(var(--line), var(--line)) bottom center / calc(100% - 2 * var(--pad)) 1px no-repeat;
}
.nl-kicker { margin: 0 0 10px; color: var(--accent); font: 700 10px/1.3 var(--mono); letter-spacing: .18em; }
.nl-title { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; color: var(--ink); }
.nl-lede { margin: 10px 0 0; max-width: 46ch; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.nl-form { min-width: 0; }
.nl-row {
  display: flex; gap: 6px; padding: 6px; min-width: 0;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card-solid);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nl-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nl-input {
  flex: 1; min-width: 0; padding: 10px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); font: inherit; font-size: 16px; outline: none;
}
.nl-input::placeholder { color: var(--ink-3); }
.nl-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.nl-button { flex: 0 0 auto; padding: 11px 22px; background: var(--ink); color: var(--bg); }
.nl-button:hover { background: var(--accent); color: #ffffff; }
.nl-button[disabled] { opacity: .6; cursor: progress; transform: none; }
.nl-note { margin: 10px 0 0 18px; font-size: 12.5px; color: var(--ink-3); }
.nl-note a { color: var(--ink-2); text-underline-offset: 3px; }
.nl-note a:hover { color: var(--accent); }
.nl-status { margin: 8px 0 0 18px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.nl-done {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; outline: none;
  border-radius: 22px; background: var(--accent-soft); color: var(--ink-2); font-size: 14.5px; line-height: 1.5;
}
.nl-done[hidden], .nl-form[hidden] { display: none; }
.nl-done p { margin: 0; overflow-wrap: anywhere; }
.nl-done strong { color: var(--ink); }
.nl-done-icon {
  flex: 0 0 auto; width: 34px; height: 34px; padding: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal)); fill: none; stroke: #ffffff;
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.js .nl-done.is-in { animation: nl-in .5s cubic-bezier(.22, .61, .36, 1); }
@keyframes nl-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: none; } }
@media (prefers-reduced-motion: reduce) { .js .nl-done.is-in { animation: none; } }
@media (max-width: 760px) {
  .newsletter { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .nl-row { flex-direction: column; border-radius: 22px; }
  .nl-button { width: 100%; }
  .nl-note, .nl-status { margin-left: 4px; }
}
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand .lockup { height: 34px; width: auto; }
.footer-tag {
  margin: 0; font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .2em; color: var(--ink-3);
  border-left: 1px solid var(--line); padding-left: 13px; line-height: 1;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.footer-links a {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-2);
  text-decoration: none; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .15s ease, color .15s ease;
}
.footer-links a:hover { border-color: var(--accent); color: var(--accent); }
.footer-note.company-legal { font-size: 12px; line-height: 1.6; }
.company-legal strong { font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }

/* The signature: a black line at the very end of every page, in both themes. Its coffee and steak
   and beer are the Lucide "coffee", "beef" and "beer" icons (lucide.dev, ISC License, Copyright (c) Lucide Contributors). */
/* clip, not hidden: the names above the icons may rise out of the bar, but never past the page's sides. */
.made-bar { background: #000000; color: rgba(255, 255, 255, .78); overflow-x: clip; }
.made-line { margin: 0 auto; padding-block: 14px; font-size: 13px; line-height: 1.7; text-align: center; }
.made-line a { color: #ffffff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.made-line a:hover { color: var(--cyan-bright); }
.made-flag { display: inline-block; width: 21px; height: auto; border-radius: 3px; vertical-align: -3px; }
/* Each icon is a word of the sentence; its name shows above it on hover or keyboard focus,
   read from aria-label, which i18n.js already swaps between the two languages. */
.made-word { position: relative; display: inline-block; vertical-align: -4px; border-radius: 4px; cursor: default; }
.made-word:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: 2px; }
.made-word::after {
  content: attr(aria-label); position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 4px;
  padding: 4px 9px; border-radius: 8px; background: #ffffff; color: #000000;
  font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s ease, translate .15s ease;
}
.made-word:hover::after, .made-word:focus-visible::after { opacity: 1; translate: -50% 0; }
.made-icon { display: block; width: 18px; height: 18px; fill: none; stroke: #ffffff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-note {
  flex: 1 1 100%;
  margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); max-width: 62ch;
}

/* The hero is the one place a load sequence belongs, so it runs on load
   rather than on scroll: it is already on screen. Same vocabulary as the
   cards, same easing, one step slower, top to bottom in the order the eye
   reads it. Gated on .js the same way, and app.js is what lights it. */

.js .hero-lit > * {
  opacity: 0;
  translate: 0 16px;
}

.js .hero-lit.is-lit > * {
  opacity: 1;
  translate: none;
  transition: opacity .6s cubic-bezier(.22, .61, .36, 1),
              translate .6s cubic-bezier(.22, .61, .36, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.hero-lit > .eyebrow-hero    { --i: 0; }
.hero-lit > .cake-animation  { --i: 1; }
.hero-lit > .hero-sub        { --i: 2; }
.hero-lit > .btn-row         { --i: 3; }
.hero-lit > .hero-note       { --i: 4; }

@media (prefers-reduced-motion: reduce) {
  .js .hero-lit > * {
    opacity: 1; translate: none; transition: none;
  }
}

/* -------------------------------- motion ---------------------------------
   One idea, used everywhere: a group of cards arrives in reading order, the
   way hidden state moves down the chain. The wave is triggered on the group
   rather than on each card, so a section lands as one gesture instead of six
   unrelated ones, and the delay comes from the card's position in the grid.

   Nothing is hidden until the page has said it has JavaScript (.js is set by
   the inline script in the head, before the first paint) and app.js has said
   it can observe. With scripting off, every card is simply there. */

/* The rise uses `translate`, not `transform`, on purpose: a card also moves
   on hover, and the two would otherwise be the same property fighting over
   one value, with the reveal's deeper selector winning permanently. The two
   properties compose, so each animation owns one and neither knows about the
   other. A browser without `translate` just fades, which is fine. */
/* The rise has to be seen: 36px over three quarters of a second, the cards 90 ms apart. A shorter
   one read as cards popping in from nowhere. */
.js .reveal-group > * {
  opacity: 0;
  translate: 0 36px;
}

.js .reveal-group.is-in > * {
  opacity: 1;
  translate: none;
  transition: opacity .75s cubic-bezier(.22, .61, .36, 1),
              translate .75s cubic-bezier(.22, .61, .36, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* Reading order, plainly. The grids are auto-fit, so how many cards share a
   row changes with the viewport; anything cleverer than counting would put a
   later card ahead of an earlier one at some width. Six is the longest grid,
   which puts the last card 450 ms behind the first. */
.reveal-group > *:nth-child(1) { --i: 0; }
.reveal-group > *:nth-child(2) { --i: 1; }
.reveal-group > *:nth-child(3) { --i: 2; }
.reveal-group > *:nth-child(4) { --i: 3; }
.reveal-group > *:nth-child(5) { --i: 4; }
.reveal-group > *:nth-child(6) { --i: 5; }

/* Hover: the same one pixel lift the buttons already use, scaled to the size
   of a card, plus the border picking up the accent. No scale, no glow. */
.card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: var(--shadow-hi);
}
.card-accent:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

/* A card that holds the focused control should not be moving. */
.card:focus-within { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal-group > * {
    opacity: 1; translate: none; transition: none;
  }
  .card { transition: border-color .18s ease, box-shadow .18s ease; }
  .card:hover { transform: none; }
}

/* -------------------------------- narrow --------------------------------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand-sub { display: none; }
  /* the nav is gone at this width, so the switch takes over pushing right */
  .topbar-inner .langs { margin-left: auto; }
  .lang span { display: none; }
  .lang { padding: 5px; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* ============ 04 topologies: the engines strip ============ */
.engines { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; margin-top: 28px; padding: 28px 32px; border-radius: 26px; background: var(--panel); color: var(--panel-ink); box-shadow: var(--shadow-lg); }
.engines .plan-tag { color: var(--cyan-bright); }
.engines .h3 { color: var(--panel-ink); }
.engines p { color: var(--panel-ink-2); }
.engine-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.engine-list li { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 15px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel-fill); }
.engine-list .engine-next { border-style: dashed; color: var(--panel-ink-3); font-weight: 500; }
@media (max-width: 760px) { .engines { grid-template-columns: 1fr; padding: 22px; } }

/* ============ 07 results: bars and the Strata table ============ */
.bars { list-style: none; margin: 10px 0 22px; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 3.4em; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); }
.bar-track { height: 14px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-bright), var(--teal-bright)); }
.bar-track i.bar-low { background: #ff8a8a; }
.bar-val { font-weight: 900; font-size: 18px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.results-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 14px; font-variant-numeric: tabular-nums; }
.results-table th, .results-table td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; }
.results-table thead th { font-size: 12.5px; color: var(--ink); vertical-align: bottom; }
.results-table thead small { display: block; font-weight: 500; color: var(--ink-3); }
.results-table tbody th { text-align: left; font-weight: 600; color: var(--ink-3); }
.results-table td { font-weight: 700; font-size: 16px; color: var(--ink); }
.results-note { margin-top: 18px; font-size: 13.5px; color: var(--ink-3); }
.results-note a { margin-left: 6px; font-weight: 700; }
@media (max-width: 520px) { .bars li { grid-template-columns: 1fr 3.4em; } .bars .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* the live demo call, right under the tagline: a small dark panel, like the hero */
.demo-cta { position: relative; display: flex; align-items: center; gap: 22px; width: fit-content; max-width: 100%; margin: 40px auto 0; padding: 14px 14px 14px 22px; border-radius: 999px; background: var(--panel); border: 1px solid var(--panel-line); box-shadow: var(--shadow-lg); color: var(--panel-ink); text-decoration: none; text-align: left; transition: transform .25s ease, box-shadow .25s ease; }
.demo-cta::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(96deg, var(--blue-bright), var(--cyan-bright), var(--teal-bright)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; transition: opacity .25s ease; pointer-events: none; }
.demo-cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 46px rgba(47, 220, 200, .22); }
.demo-cta:hover::before { opacity: 1; }
.demo-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: rgba(47, 220, 200, .12); font-family: var(--mono, ui-monospace, monospace); font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--teal-bright); white-space: nowrap; }
.demo-live i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); }
.demo-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--teal-bright); animation: demo-pulse 1.8s ease-out infinite; }
@keyframes demo-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(3.2); opacity: 0; } }
.demo-copy { display: grid; gap: 2px; }
.demo-copy strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--panel-ink); }
.demo-copy > span { font-size: 13.5px; color: var(--panel-ink-2); }
.demo-go { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; background: linear-gradient(96deg, var(--blue-bright), var(--cyan-bright) 55%, var(--teal-bright)); color: #06121f; font-size: 15px; font-weight: 800; white-space: nowrap; }
.demo-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.demo-cta:hover .demo-go svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .demo-live i::after { animation: none; } .demo-cta, .demo-go svg { transition: none; } }
@media (max-width: 760px) { .demo-cta { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; border-radius: 26px; text-align: center; } .demo-live { align-self: center; } .demo-go { justify-content: center; } }
