/* =========================================================
   LiveMath — "Midnight Plane" design system
   Home + reusable shell for subpages.
   ========================================================= */

:root {
  /* Hero radial stops */
  --navy-1: #1b3050;
  --navy-2: #101f33;
  --navy-3: #0a1320;

  --ink: #13243a;

  --blue: #3fa9ff;
  --blue-lt: #7fe3ff;
  --blue-soft: #9fd0ff;
  --blue-mid: #6fa8d8;

  --paper: #eef3fb;
  --paper-2: #e3ecf8;

  --text: #1f2d40;
  --text-soft: #51637a;

  --red: #c0392b;
  --line: #d4deec;

  --max: 1200px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --section-pad: clamp(2rem, 4vw, 3.5rem);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;

  --font-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Anchor jumps (e.g. #features) land below the sticky nav, not behind it.
     Header height varies because the 14-flag strip can wrap onto a second row;
     8rem covers the tallest case with a touch of breathing room. */
  scroll-padding-top: 8rem;
}
/* Belt-and-braces for older WebKit that ignored scroll-padding on html. */
section[id] { scroll-margin-top: 8rem; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

/* ---------- shared section shell ---------- */

.section {
  padding: var(--section-pad) var(--gutter);
}
.section > .wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.section.dark      { background: #0c1626; color: #e6edf6; }
.section.near-dark { background: #0a1320; color: #cdd6e3; }
.section.light     { background: var(--paper); color: var(--text); }
.section.paper-2   { background: var(--paper-2); color: var(--text); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 1rem 0;
}
.section.dark .eyebrow,
.section.near-dark .eyebrow { color: var(--blue-soft); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; margin: 0 0 0.6em 0; }

h2.sec {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.4em;
}
.section.dark h2.sec,
.section.near-dark h2.sec { color: #f1f6ff; }

p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--text-soft); max-width: 56ch; }
.section.dark .lede,
.section.near-dark .lede { color: #eef3fb; }

/* ---------- wordmark ---------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}
.wordmark .live { font-style: italic; color: #f1f6ff; }
.wordmark .math { font-style: normal; color: var(--blue); }

/* dark-context default; subpages on light bg flip via .wordmark.on-light */
.wordmark.on-light .live { color: var(--ink); }
.wordmark.on-light .math { color: var(--blue); }

/* ---------- dice chip ---------- */

.dice {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 6px 14px;
  border: 1px solid rgba(159, 208, 255, 0.25);
  border-radius: 999px;
  background: rgba(63, 169, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.dice .die {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2px;
  width: 26px;
  height: 26px;
  padding: 3px;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(13, 36, 58, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.35);
  place-items: center;
}
.dice .die .pip {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.dice .die .pip.off { background: transparent; }
.dice .dot {
  color: var(--blue-lt);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  margin: 0 -1px;
  text-shadow: 0 0 6px rgba(127, 227, 255, 0.65);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn.primary {
  background: var(--blue);
  color: #061322;
  box-shadow: 0 6px 24px -8px rgba(63,169,255,0.55);
}
.btn.primary:hover { transform: translateY(-1px); background: #58b6ff; text-decoration: none; }
.btn.ghost {
  background: transparent;
  color: #e6edf6;
  border-color: rgba(159, 208, 255, 0.35);
}
.btn.ghost:hover { background: rgba(159, 208, 255, 0.08); text-decoration: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Opaque and unblurred. The old rgba(...,0.6) + backdrop-blur turned this
     bar into frosted glass that smeared whatever scrolled beneath it and read
     as washed grey on light pages. */
  background: var(--navy-2);
  border-bottom: 1px solid rgba(159, 208, 255, 0.14);
}
.nav .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* let the 13-flag strip drop to its own row if tight */
  row-gap: 0.6rem;
  gap: 1.5rem;
  min-height: 64px;
}
.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  line-height: 1;
}
/* The GIF (LM4spinninglarge2.gif) already animates the cube — no CSS spin
   on top, or you get a double-rotation visual that fights itself. */
.nav .brand img {
  height: 52px;
  width: auto;
  display: block;
}
.nav .brand .wordmark { font-size: 1.5rem; line-height: 1; display: inline-flex; align-items: center; }
.nav ul {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  line-height: 1;
}
.nav ul li { display: inline-flex; align-items: center; }
.nav ul a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cdd6e3;
}
.nav ul a:hover { color: var(--blue-lt); text-decoration: none; }
.nav .cta { margin-left: 0.5rem; }
.nav .cta .btn { line-height: 1; }

/* language flag strip (header) — all 13 flags; live = color link, rest grayscale.
   A compact fixed-width GRID block pinned to the far right (after the CTA):
   5 columns, wrapping to as many rows as needed (13 → 5+5+3). */
.lang-flags {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 0.35rem 0.5rem;
  align-items: center;
  justify-items: center;
  flex: 0 0 auto;          /* fixed block; does not grow */
}
.lang-flags a {
  display: inline-flex;
  border-radius: 3px;
  line-height: 0;
  outline: 1.5px solid transparent;
  outline-offset: 2px;
  transition: opacity 0.15s ease, transform 0.15s ease, outline-color 0.15s ease;
}
.lang-flags a:hover,
.lang-flags a:focus-visible { opacity: 1; transform: translateY(-1px); }
.lang-flags a.is-current { outline-color: var(--blue); }
.lang-flags .soon {           /* not-yet-translated: visible but clearly inactive */
  display: inline-flex;
  line-height: 0;
  opacity: 0.32;
  filter: grayscale(1);
  cursor: default;
}
.lang-flags img {
  display: block;
  height: 14px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

/* localized product name under the hero wordmark (non-English pages only) */
.wordmark-local {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  color: var(--blue-soft);
  letter-spacing: 0.02em;
  margin: 0.1rem 0 0;
}

.nav .menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(159, 208, 255, 0.3);
  color: #e6edf6;
  border-radius: var(--r-sm);
  padding: 0.4rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  margin-left: auto;
}

/* language toggle button (mobile only) — opens the flag dropdown like Menu */
.nav .lang-toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid rgba(159, 208, 255, 0.3);
  border-radius: var(--r-sm);
  padding: 0.4rem 0.55rem;   /* match .menu-toggle vertical metrics so they sit level */
  line-height: 1;
  cursor: pointer;
}
.nav .lang-toggle img { display: block; height: 16px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); }
.nav .lang-toggle .lang-caret { color: #cdd6e3; font-size: 10px; line-height: 1; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-2);
  color: #e6edf6;
  padding: clamp(5rem, 11vw, 9rem) var(--gutter) clamp(6rem, 12vw, 10rem);
}
.hero .wrap {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.hero .wordmark {
  display: inline-block;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  margin: 1.25rem 0 0.5rem;
}
.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  color: var(--blue-soft);
  margin: 0 0 1.5rem;
}
.hero .lede {
  margin: 0 auto 1.5rem;
  max-width: 56ch;
  color: #eef3fb;
  font-size: 1.15rem;
}
.hero .platform-note {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(159,208,255,0.55);
}
.hero .btn-row { justify-content: center; }

.hero .lissajous {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .lissajous path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero content fade-up.
   Per LiveMath splash spec: curves draw in first, then the foreground
   group (wordmark + dice + tagline + lede + buttons) fades in together
   ~1500ms later. This matches the desktop splash where the FG group
   shares a single OutCubic envelope.

   - no-JS fallback (.fade-up alone): animations fire immediately
   - JS on (html.lm-js): hold until window.load → body.lm-loaded,
     then ALL .fade-up children fade as one group after a delay */
.fade-up { opacity: 0; transform: translateY(14px); animation: fadeup .8s cubic-bezier(.22,.61,.36,1) forwards; }
html.lm-js .fade-up { animation: none; }
html.lm-js body.lm-loaded .fade-up {
  animation: fadeup .8s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: 1.5s;
}
@keyframes fadeup { to { opacity: 1; transform: none; } }

/* ---------- pitch strip ---------- */

.pitch .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.4vw, 2.2rem);
}
.pitch .item .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 0.5rem;
}
.pitch .item p {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  color: #e6edf6;
  margin: 0;
}

/* ---------- two-column ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* "Not a black box" — copy block above, video grid below */
.blackbox-intro {
  max-width: 64ch;
  margin: 0 auto 0.5rem;
  text-align: center;
}
.blackbox-intro .lede { margin-left: auto; margin-right: auto; }
.blackbox-intro .btn-row { justify-content: center; }

/* base item styles (used by both grid and orbit layouts) */
.vid-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: var(--vid-w, 360px);
  cursor: zoom-in;
}

/* ---------- orbit: tangle cube center, 6 ferris-wheeling around ---------- */
@property --lm-spin {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: true;
}

.showcase-orbit {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 11 / 7.5;        /* wide, flat band — the orbit is an ellipse, not a circle */
  margin: 0.5rem auto -1.5rem;   /* NO negative top margin: satellites must never ride up
                                    into the intro/CTA (the "Getting Started" clobber). */
  container-type: inline-size;
  --lm-spin: 0deg;
  animation: lm-orbit 90s linear infinite;
}

/* Blackbox section: the orbit's interior already supplies whitespace, so
   trim the bottom further; the immediately following section also gets
   a tighter top since the orbit's bottom does the visual separation. */
.section-blackbox { padding-bottom: clamp(0.25rem, 0.5vw, 0.75rem); }
.section-blackbox + .section { padding-top: clamp(1rem, 2vw, 2rem); }
@keyframes lm-orbit {
  from { --lm-spin: 0deg; }
  to   { --lm-spin: -360deg; }  /* CCW */
}
.showcase-orbit .vid-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--vid-w, 220px);
  max-width: var(--vid-w, 220px);
  margin: 0;
  /* Elliptical orbit: wide x-radius, flat y-radius. Every item sweeps through
     the 12-o'clock point as it spins, so --ry (plus half the tallest card)
     bounds the vertical reach — keep it low enough that nothing can touch
     the intro/CTA above, at any spin angle. */
  --rx: 36cqw;
  --ry: 17cqw;
  /* Promote each orbiting figure to its own GPU layer so the per-frame
     transform update doesn't re-raster the box-shadow + video + caption.
     Without this the items shake at certain angles (subpixel rounding
     during repeated rasterization). */
  will-change: transform;
  backface-visibility: hidden;
  /* video itself is only translated, never rotated -> stays upright like a ferris-wheel car
     translateZ(0) at the tail forces the layer regardless of will-change support */
  transform:
    translate(-50%, -50%)
    translate(
      calc(cos(var(--angle, 0deg) + var(--lm-spin)) * var(--rx)),
      calc(sin(var(--angle, 0deg) + var(--lm-spin)) * var(--ry))
    )
    translateZ(0);
}
.showcase-orbit .vid-item.center {
  width: 200px;
  max-width: 200px;
  --rx: 0px;
  --ry: 0px;
  transform: translate(-50%, -50%) translateZ(0);
  z-index: 2;
  will-change: auto;  /* center doesn't move, no need to promote */
}
.showcase-orbit .vid-item video {
  box-shadow: 0 24px 50px -22px rgba(13, 36, 58, 0.4);
}
.showcase-orbit .vid-item.center video {
  box-shadow:
    0 0 0 6px rgba(127, 227, 255, 0.10),
    0 0 60px -10px rgba(63, 169, 255, 0.5),
    0 24px 50px -22px rgba(13, 36, 58, 0.4);
}

/* fallback for narrow viewports: drop the orbit, use a clean grid */
.showcase-grid-fallback {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1.25rem;
  align-items: end;
  justify-items: center;
  margin-top: 1rem;
}

@media (max-width: 860px) {
  .showcase-orbit { display: none; }
  .showcase-grid-fallback { display: grid; }
}
@media (max-width: 520px) {
  .showcase-grid-fallback { grid-template-columns: 1fr; }
}
.vid-item video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  background: #0a1320;
  box-shadow: 0 20px 40px -22px rgba(13, 36, 58, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.vid-item:hover video {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -22px rgba(13, 36, 58, 0.5);
}
.vid-item figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.vid-item .vid-tag {
  display: block;
  margin-top: 0.5rem;
  padding: 6px 14px;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  max-width: 260px;
  text-align: center;
  align-self: center;
  box-shadow: 0 4px 10px -3px rgba(13, 36, 58, 0.25);
}

/* ---------- video zoom modal ---------- */
#lm-vid-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 13, 26, 0.92);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  cursor: zoom-out;
}
#lm-vid-modal[hidden] { display: none; }
#lm-vid-modal .stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 96vw;
  max-height: 96vh;
  cursor: default;
}
#lm-vid-modal video {
  display: block;
  max-width: 96vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  background: #000;
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
#lm-vid-modal .caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-soft);
  text-align: center;
}
#lm-vid-modal .close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(159, 208, 255, 0.3);
  background: rgba(15, 25, 42, 0.85);
  color: #e6edf6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lm-vid-modal .close-btn:hover {
  background: rgba(63, 169, 255, 0.18);
  border-color: var(--blue);
  color: var(--blue-lt);
}

/* ---------- features grid ---------- */

.features .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  margin-top: 2.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -28px rgba(19, 36, 58, 0.25); }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
}
.card p { color: var(--text-soft); margin: 0; font-size: 0.98rem; }
.badge-new {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.card .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 0.25rem;
}

/* Feature card with an embedded autoplay-loop video. */
.card.with-video { padding: 0 0 1.5rem; overflow: hidden; }
.card.with-video > .card-vid {
  margin: 0 0 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.card.with-video > .card-vid video,
.card.with-video > .card-vid img {
  display: block;
  width: 100%;
  height: auto;
  background: #0a1320;
}
.card.with-video > .kicker,
.card.with-video > h3,
.card.with-video > p { padding-left: 1.5rem; padding-right: 1.5rem; }

/* ---------- download band ---------- */

.download {
  /* Light bands, alternating light / paper-2 like the Support page. The bands
     were dark themed gradients; on a page that is mostly a list of links the
     colour was doing more shouting than separating. Tighter vertical rhythm
     too — this page is scanned, not read. */
  position: relative;
  padding-block: clamp(1.5rem, 2.6vw, 2.25rem);
}
/* A hairline between consecutive bands, so they still read as separate rooms. */
.section.download + .section.download { border-top: 1px solid var(--line); }

/* Each platform keeps a single accent, carried only by its eyebrow — enough to
   tell the bands apart without repainting the whole page. */
.download .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a6fa5;
  margin-bottom: 0.5rem;
}
.download.band-ubuntu .meta { color: #b3521f; }
.download.band-chrome .meta { color: #1f7d4d; }
.download.band-apple  .meta { color: #4a6fa5; }

.download h2.sec { margin-bottom: 0.4rem; }
.download .lede  { margin-bottom: 0; }

.download .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 1.25rem;
}
.download .grid.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
.download .grid.cols-1 { grid-template-columns: 1fr; max-width: 420px; }

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dl-card:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 10px 26px -18px rgba(19, 36, 58, 0.5);
  text-decoration: none;
}
.dl-card.is-pending:hover { transform: none; border-color: var(--line); box-shadow: none; }
.dl-card .os {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0;
}
.dl-card .req {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}
.dl-card .arr {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--blue);
}
/* Install steps sit on light now. */
.download .install-steps { margin-top: 1.1rem; }

/* OS logo at top-left of each download card. The svg inherits `color`
   via fill: currentColor so each .dl-logo-* sets the brand hue. */
.dl-logo {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 0.65rem;
}
.dl-logo svg { width: 100%; height: 100%; display: block; fill: currentColor; }
/* Tuned for white cards: the previous values were picked to glow on a dark
   navy band and washed out on light. */
.dl-logo-mac      { color: #1d1d1f; }
.dl-logo-win      { color: #0078d4; }
.dl-logo-ubuntu   { color: #d1500f; }
.dl-logo-chrome   { color: #1f8a45; }
.dl-logo-gplay    { color: #1f8a45; }
.dl-logo-appstore { color: #1d1d1f; }

/* ---------- install-steps (ordered list under section.light) ---------- */
.install-steps {
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.25rem;
  max-width: 64ch;
  /* No explicit color: inherit from parent section. On `.section.light`
     that's `var(--text)` (dark); on `.section.download` that's `#e6edf6`
     (bright). Setting it here would force one or the other and fight the
     `-dark` modifier when the steps land on a navy band. */
}
.install-steps li {
  margin: 0.55rem 0;
  line-height: 1.55;
}
.install-steps code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-2, #eef3fa);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.45em;
}
/* Install steps placed on a .section.download (dark navy) background.
   Higher-specificity selectors so they beat the base .install-steps rules
   regardless of source order, and explicit ::marker color so the
   numbered prefixes (1./2./3.) stay readable. */
ol.install-steps.install-steps-dark {
  margin-top: 2rem;
  color: #ffffff !important;
}
ol.install-steps.install-steps-dark li        { color: #ffffff !important; }
ol.install-steps.install-steps-dark li::marker { color: #9fd0ff !important; font-weight: 600; }
ol.install-steps.install-steps-dark code {
  background: rgba(159, 208, 255, 0.10);
  border-color: rgba(159, 208, 255, 0.25);
  color: #f1f6ff;
}
ol.install-steps.install-steps-dark em      { color: #9fd0ff; font-style: italic; }
ol.install-steps.install-steps-dark strong  { color: #fff; }

/* ---------- legacy lm-store: header lede + pricing matrix ----------
   Step pages render a "Customer Type x Time-Period" matrix plus a small
   intro block. The legacy `.red11b`/`.sectionTitle`/`.darkgrey12` font
   classes (verdana 9-12px from lm_store_styles.css) feel tiny inside the
   lm26 chrome; scope upgrades to `.lmstore` so other places that still
   use these classes stay untouched. */

.lmstore {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 900px;
  margin: 0 auto;
}
/* Legacy step pages use bare <P> tags as line breaks; default 1em top/bottom
   margins push the lede into a 7-line tower. Halve them. */
.lmstore p,
.lmstore P { margin: 0.4rem 0; }
.lmstore br { line-height: 1; }
.lmstore .middlebox {
  width: auto;
  max-width: 760px;
  margin: 1rem auto 1.5rem;
  padding: 0;
}
.lmstore center { margin: 0.75rem 0; }
.lmstore .red11b {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c00;
}
.lmstore .makercolor12b {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0;
  text-transform: none;
}
.lmstore .sectionTitle {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 500;
  font-style: normal;
  color: var(--text);
  line-height: 1.15;
  margin: 1.25rem 0 0.5rem;
}
.lmstore .darkgrey12 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--text-soft);
  line-height: 1.55;
}
/* The "Purchase for Version 4.0: LiveMath" eyebrow + product name pair —
   the eyebrow currently sits on its own line because of a stray `<P>`. */
.lmstore .red11b + .makercolor12b { display: inline-block; margin-left: 0.5rem; }
/* "Please CLICK on the PRICE" callout — keep it red but display-sized. */
.lmstore center .red11b {
  display: inline-block;
  margin: 1rem auto;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
  color: #c00;
}

/* ---- the matrix itself, restyled as a card grid ---- */

.pricing-wrapper { max-width: 820px; margin: 2.5rem auto; }
.pricing-table {
  display: grid;
  /* First column holds the longest row label ("TIME UNLIMITED" / "EXTRA
     ACTIVATIONS") at uppercase + letter-spacing, so it needs ~210px to
     stay on a single line; the rest splits among the three price columns. */
  grid-template-columns: 210px repeat(3, 1fr);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 18px 50px -28px rgba(19, 36, 58, 0.18);
  font-family: var(--font-body);
  font-size: 1rem;
}
.pricing-table > div {
  padding: 1rem 0.85rem;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.pricing-table > div:nth-child(4n) { border-right: none; }
.pricing-table > div:not(.corner):not(.separator):not(.header-separator) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.corner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  background: #f6f9fc;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--blue-mid);
}
.corner .row { display: flex; align-items: center; line-height: 1.2; gap: 4px; }
.corner .top    { justify-content: flex-end; }
.corner .bottom { justify-content: flex-start; }
.corner .header-separator { border: none; height: 1px; background: rgba(159, 208, 255, 0.25); margin: 0.35rem 0; }

.col-header {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  background: rgba(159, 208, 255, 0.06);
}
.student    { color: #c00; }
.individual { color: #d77200; }
.academic   { color: #0052b4; }
.commercial { color: #5e2d8c; }

.row-header {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--blue-mid);
  background: var(--paper-2, #eef3fa);
}
.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.price:hover { transform: translateY(-1px); text-decoration: none; }
.price.strong { color: #c00; }
.price.orange { color: #d77200; }
.price.blue   { color: #0052b4; }
.price.purple { color: #5e2d8c; }
.na {
  background: var(--paper-2, #eef3fa);
  color: #9a7400;
  font-style: italic;
  font-weight: 500;
  font-size: 0.9rem;
}
.separator { grid-column: 1 / -1; height: 6px; background: #2b394d; margin: 0; padding: 0 !important; border: none !important; }
.pricing-table .standout  { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text); }
.pricing-table .standout2 { font-size: 0.92rem; font-weight: 600; color: var(--text-soft); }
.pricing-table img { max-width: 80%; height: auto; }

@media (max-width: 640px) {
  .pricing-table { grid-template-columns: 140px repeat(3, 1fr); font-size: 0.9rem; }
  .pricing-table > div { padding: 0.6rem 0.4rem; }
  .price { font-size: 1.1rem; }
}

/* ---------- store pages: crisp white treatment ----------
   The site palette is built for pages that open on the dark hero: `--paper`
   (#eef3fb) and `--paper-2` (#e3ecf8) are pale blues, and `.nav` is 60%-opaque
   navy that reads dark only over the hero behind it. The store has no hero, so
   every surface landed inside one narrow blue-grey band — page, table, row
   labels, and "Not Available" cells all within a few percent of each other,
   with a washed-out grey nav on top. Hence: powdery.

   `body.lmstore-page` (set in store/lms.php) re-grounds the store on white and
   makes the nav opaque. Scoped to the store so hero pages keep their palette. */

body.lmstore-page { background: #fff; }
/* (The opaque nav used to be a store-only override; it is the global default
   now that the frosted-glass treatment is gone.) */
body.lmstore-page .section.light { background: #fff; }

/* Page type: full-strength ink on white rather than the softened variants. */
body.lmstore-page .lmstore { color: var(--ink); }
body.lmstore-page .lmstore .sectionTitle { color: var(--ink); }
body.lmstore-page .lmstore .darkgrey12  { color: #3c4d64; }

/* The matrix reads as a white card: white cells, one crisp hairline grid, and
   a tint reserved for the label column + column heads so the axes still lead
   the eye. */
body.lmstore-page .pricing-table {
  background: #fff;
  border-color: #dbe3ee;
  box-shadow: 0 1px 2px rgba(19, 36, 58, 0.06),
              0 14px 40px -26px rgba(19, 36, 58, 0.28);
}
body.lmstore-page .pricing-table > div {
  border-right-color: #e6ecf4;
  border-bottom-color: #e6ecf4;
}
body.lmstore-page .col-header {
  background: #fff;
  border-bottom: 2px solid #dbe3ee;    /* the header/body break, stated once */
  font-size: 1.2rem;
}
body.lmstore-page .corner {
  background: #f6f9fc;
  color: #46617f;
  border-bottom: 2px solid #dbe3ee;    /* match .col-header so the rule runs unbroken */
}
body.lmstore-page .corner .header-separator { background: #d9e3ef; }
body.lmstore-page .row-header {
  background: #f6f9fc;
  color: #46617f;
}
/* "Not Available" recedes by weight, not by a mustard-on-blue wash. */
body.lmstore-page .na {
  background: #fbfcfe;
  color: #51637a;
}
/* Prices carry the contrast now that they sit on white. */
body.lmstore-page .price.strong { color: #b3000f; }
body.lmstore-page .price.orange { color: #b85c00; }
body.lmstore-page .price.blue   { color: #00459c; }
body.lmstore-page .price.purple { color: #56287f; }
body.lmstore-page .price:hover  { text-decoration: underline; }
body.lmstore-page .pricing-table .standout  { color: var(--ink); }
body.lmstore-page .pricing-table .standout2 { color: #3c4d64; }
body.lmstore-page .lmstore .aimlink { color: #3c4d64; }

/* ---- shopping basket + address form (ported from lm25.css, scoped) ---- */

:root {
  --lms-spacing-xs: 0.25rem;
  --lms-spacing-s:  0.5rem;
  --lms-spacing-m:  1rem;
  --lms-border:     1px solid var(--line);
  --lms-font-s:     0.85rem;
  --lms-font-m:     0.95rem;
  --lms-font-l:     1.05rem;
  --lms-accent:     #c00;
}

/* Basket display (step 3+ "Your Shopping Basket") --------------------- */
.lmstore .lms-table {
  display: grid;
  grid-template-columns: 30% 50% 20%;
  border: var(--lms-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  font-family: var(--font-body);
  max-width: 760px;
  margin: 1.25rem auto 0;
  box-shadow: 0 18px 50px -28px rgba(19, 36, 58, 0.18);
}
.lmstore .lms-table-header,
.lmstore .lms-table-row { display: contents; }
.lmstore .lms-table-cell {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--lms-font-m);
  color: var(--text);
}
.lmstore .lms-table-cell + .lms-table-cell { border-left: 1px solid var(--line); }
.lmstore .lms-table-header .lms-table-cell {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: rgba(159, 208, 255, 0.06);
  font-weight: 600;
}
.lmstore .lms-cell-item { flex-direction: column; }
.lmstore .lms-item-detail {
  display: flex; align-items: center; gap: 0.4rem;
  margin: 0.2rem 0; line-height: 1.4;
}
.lmstore .lms-price-highlight { color: var(--lms-accent); font-weight: 700; }
.lmstore .lms-table-separator {
  grid-column: 1 / -1;
  background: #2b394d;
  height: 4px;
}
.lmstore .lms-table-total .lms-cell-total-label {
  grid-column: span 2;
  justify-content: flex-end;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-soft);
}
.lmstore .lms-table-total .lms-table-cell {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--lms-accent);
}

/* Customer Information form ------------------------------------------ */
/* Rendered as a single card-grid matching the pricing-table aesthetic:
   outer rounded border + soft shadow, each label/input pair shares a row
   divider, 2-column grid inside, labels right-aligned, inputs full-width
   with a soft hover/focus ring. */
.lmstore .lms-address-wrapper {
  display: flex; flex-wrap: wrap;
  gap: 1.25rem;
  max-width: 720px;
  margin: 1.75rem auto;
  /* counter the legacy <center> wrapper from custinfo.php so labels look
     left-aligned within the card rather than dragged toward center. */
  text-align: left;
}
.lmstore .lms-address-column {
  flex: 1 1 100%;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: 0 18px 50px -28px rgba(19, 36, 58, 0.18);
  overflow: hidden;
}
/* Header bar — mono-uppercase blue label, matching the basket card's
   "ITEM / DESCRIPTION / PRICE" header strip above. */
.lmstore .lms-address-heading {
  margin: 0;
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: rgba(159, 208, 255, 0.10);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
/* Two-column grid with explicit vertical divider between label and input
   cells (so it reads as a real table-like card, matching the basket). */
.lmstore .lms-form-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.lmstore .lms-form-row:last-child { border-bottom: none; }
.lmstore .lms-form-row > label {
  padding: 1rem 1.25rem;
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
  border-right: 1px solid var(--line);
  background: rgba(159, 208, 255, 0.04);
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.lmstore .lms-form-row > label,
.lmstore .lms-form-row > input,
.lmstore .lms-form-row > select { margin: 0; }
/* The actual input cell gets uniform padding so the input sits comfortably. */
.lmstore .lms-form-row > input[type="text"],
.lmstore .lms-form-row > select,
.lmstore .lms-form-row > textarea {
  margin: 1rem 1.5rem;
}
.lmstore .lms-form-row input[type="text"],
.lmstore .lms-form-row select,
.lmstore .lms-form-row textarea {
  width: 100%;
  max-width: 360px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  background: var(--paper);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lmstore .lms-form-row input[type="text"]:hover,
.lmstore .lms-form-row select:hover { border-color: rgba(63, 169, 255, 0.55); }
.lmstore .lms-form-row input[type="text"]:focus,
.lmstore .lms-form-row select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(63, 169, 255, 0.18);
}
.lmstore .lms-note { color: var(--text-soft); font-size: var(--lms-font-s); margin: 0.4rem 0 0; }
.lmstore .lms-form-blurb {
  max-width: 640px;
  margin: 1.25rem auto 0.5rem;
  font-size: 1rem;
  color: var(--text-soft);
  text-align: center;
  font-style: italic;
}

/* The "Go to Next Step" submit + the step5 summary tables -------------- */
.lmstore input[type="submit"],
.lmstore button[type="submit"] {
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 2.25rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin: 1.5rem 0;
  box-shadow: 0 10px 28px -14px rgba(63, 169, 255, 0.55);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.lmstore input[type="submit"]:hover,
.lmstore button[type="submit"]:hover {
  background: #58b6ff;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -14px rgba(63, 169, 255, 0.65);
}

.lmstore .lms-summary-table {
  display: grid;
  grid-template-columns: 200px 300px;
  max-width: 500px;
  margin: 1.25rem auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: var(--font-body);
}
.lmstore .lms-summary-cell {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--lms-font-m);
}
.lmstore .lms-summary-cell + .lms-summary-cell { border-left: 1px solid var(--line); }
.lmstore .lms-label { text-align: right; color: var(--text-soft); }
.lmstore .lms-value { text-align: left;  color: var(--text); }
.lmstore .lms-agree { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.5rem; font-size: var(--lms-font-s); }

@media (max-width: 640px) {
  .lmstore .lms-table { grid-template-columns: 1fr; }
  .lmstore .lms-table-cell { border-left: none !important; }
  .lmstore .lms-table-total .lms-cell-total-label { grid-column: 1 / -1; justify-content: center; }
  .lmstore .lms-form-row { grid-template-columns: 1fr; }
  .lmstore .lms-form-row > label { text-align: left; margin-bottom: 0.25rem; }
  .lmstore .lms-summary-table { grid-template-columns: 1fr; }
  .lmstore .lms-summary-cell { text-align: left; border-left: none; }
}

/* ---------- legacy lm25 SVG colon logo: keep it sized inside lm26 chrome
     so $lm4 / $lm4s / $lm4b / $lm4bs / $lm4ws render at sensible sizes when
     dropped into pages that load livemath.css (no lm25.css). ---------- */
.lmlogo,
.lmlogo-big {
  font-family: var(--font-display), 'Cormorant', 'Newsreader', serif;
  font-weight: 600;
  white-space: nowrap;
}
.colon-svg,
.bigcolon-svg,
.smallcolon-svg,
.whitesmallcolon-svg {
  display: inline-block;
  margin-left: 0;
  margin-right: 0.1rem;
  transition: transform 0.8s ease;
}
.colon-svg:hover,
.bigcolon-svg:hover,
.smallcolon-svg:hover,
.whitesmallcolon-svg:hover { transform: rotate(360deg); }
.colon-svg          { width: 1.4rem; height: 1.4rem; vertical-align: -0.15em; }
.bigcolon-svg       { width: 2rem;   height: 2rem;   vertical-align: 0; }
.smallcolon-svg,
.whitesmallcolon-svg { width: 1rem; height: 1rem; vertical-align: -0.2rem; }

/* ---------- getting started ---------- */

.gs-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  padding: 1rem 1.25rem;
}
.gs-disclosure > summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.4;
  list-style: none;
}
.gs-disclosure > summary::-webkit-details-marker { display: none; }
.gs-disclosure > summary::after { content: ' ▾'; color: var(--blue); }
.gs-disclosure[open] > summary::after { content: ' ▴'; }
.gs-disclosure > summary .kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-right: 0.6em;
}
.gs-disclosure-body { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.gs-disclosure-body p { margin: 0 0 1rem; }
.gs-disclosure-body figure { margin: 1rem 0 1.5rem; }
.gs-disclosure-body figure img {
  width: 100%; height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 8px);
}
.gs-disclosure-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--paper-2, #eef3fa);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.gs-stage {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.gs-stage video {
  width: 100%;
  height: auto;
  background: #000;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.gs-links {
  background: rgba(159, 208, 255, 0.06);
  border: 1px solid rgba(159, 208, 255, 0.18);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.4rem;
  color: #e6edf6;
}
.gs-links .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9fd0ff;
  margin: 0 0 0.75rem;
}
.gs-links p { margin: 0 0 0.65rem; }
.gs-links a { color: #cfe0f5; text-decoration: underline; text-decoration-color: rgba(159,208,255,0.4); }
.gs-links a:hover { color: #fff; text-decoration-color: #9fd0ff; }

.gs-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gs-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.gs-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63,169,255,0.4);
  box-shadow: 0 18px 40px -22px rgba(19,36,58,0.35);
}
.gs-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: #0a1320;
  overflow: hidden;
}
.gs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-card-body { padding: 0.85rem 1rem 1.1rem; display: block; }
.gs-card-body .kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 0.25rem;
}
.gs-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
  display: block;
}

@media (max-width: 800px) {
  .gs-stage { grid-template-columns: 1fr; }
}

/* ---------- support page ---------- */

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.support-grid .card {
  padding: 1.5rem 1.5rem 1.6rem;
  display: block;
}
.support-grid a.card { color: inherit; }
.support-grid a.card:hover { text-decoration: none; }
.support-grid a.card:hover h3 { color: var(--blue); }
.support-grid .card .kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin: 0 0 0.5rem;
}
.support-grid .card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }

.support-note {
  margin-top: 1.75rem;
  font-size: 0.95rem;
  color: var(--text-soft);
  max-width: 64ch;
}

.dmat-group {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9fd0ff;
}
.dmat-list {
  margin: 0;
  list-style: none;
  padding: 0;
  border-top: 1px solid rgba(159,208,255,0.18);
}
.dmat-list li { border-bottom: 1px solid rgba(159,208,255,0.18); }
/* Lock every link state so :visited can't fall back to the browser default
   (purple/underlined) on rows the user has already clicked through. */
.dmat-list a,
.dmat-list a:link,
.dmat-list a:visited,
.dmat-list a:active,
.dmat-list a:focus,
.dmat-list a:hover {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1rem 0;
  color: #e6edf6;
  text-decoration: none;
}
.dmat-list a:hover .dmat-title,
.dmat-list a:focus .dmat-title { color: #9fd0ff; }
.dmat-list .dmat-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #9fd0ff;
  text-transform: uppercase;
  min-width: 6rem;
}
.dmat-list .dmat-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #f1f6ff;
  transition: color .15s ease;
}
.dmat-list a:visited .dmat-title { color: #f1f6ff; }
.dmat-list .dmat-credits {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #cfe0f5;
}

/* ---------- learn / curriculum ---------- */

.learn .layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: stretch;
}
.resource-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.resource-list li { border-bottom: 1px solid var(--line); }
.resource-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0;
  color: var(--text);
}
.resource-list a:hover { text-decoration: none; }
.resource-list a:hover .title { color: var(--blue); }
.resource-list .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--blue-mid);
  text-transform: uppercase;
}
.resource-list .title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  transition: color .15s ease;
}
.resource-list .sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-soft);
}
.resource-list .arr {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--blue-mid);
}

.dc-card {
  position: relative;
  overflow: hidden;
  background: var(--navy-2);
  color: #e6edf6;
  border: 1px solid rgba(159, 208, 255, 0.18);
  border-radius: var(--r-lg);
  padding: clamp(1.8rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 34px 70px -34px rgba(8, 18, 32, 0.75);
}
.dc-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.08;
  margin: 0;
  color: #f1f6ff;
}
.dc-card .sub { color: var(--blue); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.dc-card p { color: #eef3fb; }
.dc-card .dc-courses-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin: 0.25rem 0 -0.15rem;
}
.dc-card .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-card .chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 7px 13px;
  background: rgba(159, 208, 255, 0.06);
  border: 1px solid rgba(159, 208, 255, 0.22);
  border-radius: 999px;
  color: #d7e2f0;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.dc-card .chip b { color: var(--blue-lt); font-weight: 600; margin-right: 0.4em; letter-spacing: 0.06em; }
.dc-card .chip:hover { background: rgba(63, 169, 255, 0.15); border-color: var(--blue); transform: translateY(-1px); }
.dc-card .btn { align-self: flex-start; margin-top: 0.6rem; }

/* ---------- heritage strip ---------- */

.heritage { text-align: center; }
.heritage .wordmark { font-size: clamp(3rem, 8vw, 6rem); display: inline-block; margin-bottom: 1rem; }
.heritage .lineage {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-soft);
}

/* ---------- footer ---------- */

.site-footer {
  background: #060d1a;
  color: #eef3fb;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) 2rem;
}
.site-footer .wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
.site-footer img.logo { width: 110px; }
.site-footer .col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cdd6e3;
  margin: 0 0 1rem;
}
.site-footer .col ul { list-style: none; padding: 0; margin: 0; }
.site-footer .col li { margin-bottom: 0.4rem; }
.site-footer .col a { color: #eef3fb; font-family: var(--font-body); font-size: 0.95rem; }
.site-footer .col a:hover { color: var(--blue-lt); }
.site-footer address {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.6;
}
.site-footer .legal-wrap {
  display: block;        /* override the columns-grid that .wrap inherits */
  max-width: var(--max);
  margin: 0 auto;
}
.site-footer .legal {
  margin-top: 3rem;
  border-top: 1px solid rgba(159, 208, 255, 0.08);
  padding-top: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #7a8aa0;
  line-height: 1.7;
  text-align: center;
  width: 100%;
}
.site-footer .legal .wordmark { font-size: 1.1rem; vertical-align: -0.05em; }
.site-footer .legal a { color: #eef3fb; }
.br-mobile { display: none; }   /* a line break that only applies on mobile */

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  .nav ul { display: none; }
  .nav .menu-toggle { display: inline-flex; }
  .nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10, 19, 32, 0.96);
    padding: 1rem var(--gutter) 1.25rem;
    gap: 0.9rem;
    border-bottom: 1px solid rgba(159, 208, 255, 0.1);
    margin: 0;
  }
  .nav.open ul a { padding: 0.3rem 0; font-size: 13px; }   /* larger tap targets */
  .nav .cta { margin: 0.5rem 0 0; }
  /* mobile: flags collapse into a dropdown behind the .lang-toggle button,
     mirroring the Menu toggle (no big inline flag row) */
  .nav .lang-toggle { display: inline-flex; margin-left: auto; }
  .nav .menu-toggle { margin-left: 0; }   /* lang-toggle owns the auto-margin now */
  .nav .lang-flags { display: none; }
  .nav.lang-open .lang-flags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10, 19, 32, 0.96);
    padding: 1rem var(--gutter) 1.25rem;
    gap: 0.65rem 0.7rem;
    border-bottom: 1px solid rgba(159, 208, 255, 0.1);
    margin: 0;
  }
  .nav.lang-open .lang-flags img { height: 20px; }

  .pitch .grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .features .grid { grid-template-columns: repeat(2, 1fr); }   /* tablet: 2-up, not a long 1-col scroll */
  .download .grid { grid-template-columns: repeat(2, 1fr); }
  .learn .layout { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: repeat(3, 1fr); }  /* logo full-width row, then 3 even text columns */
  .site-footer .logo-cell { grid-column: 1 / -1; }
  .site-footer img.logo { width: 90px; }
  .br-mobile { display: inline; }
}

@media (max-width: 560px) {
  .pitch .grid { grid-template-columns: 1fr; }
  .features .grid { grid-template-columns: 1fr; }
  .download .grid { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h2.sec { font-size: clamp(1.7rem, 6.5vw, 2.2rem); }
  .card { padding: 1.3rem 1.2rem; }
  .card h3 { font-size: 1.3rem; }
  .dc-card { padding: 1.6rem 1.4rem; }
  .dc-card h3 { font-size: 1.5rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero .lissajous path { stroke-dashoffset: 0 !important; transition: none !important; animation: none !important; }
  .showcase-orbit { animation: none !important; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ---------- download: previous versions ----------
   Rendered only when older installers are actually present in the download
   folders, so retiring a line is a matter of deleting files. */
.prev-line { margin: 1.5rem 0 0; }
.prev-line h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.prev-list { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.5rem; }
.prev-list li {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.6rem 0.8rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.prev-list a { font-weight: 600; }
.prev-meta { margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; color: var(--text-soft); }

/* A download card with no installer behind it: present, clearly not clickable.
   Rendered as a <div> rather than an <a>, so it is not focusable or followable. */
.dl-card.is-pending { cursor: default; }   /* no fading: the card stays crisp, the text says "Coming soon" */
.dl-card.is-pending .arr { color: var(--text-soft); font-style: italic; }

/* ---------- download: availability matrix ----------
   Platform down the side, bucket across the top. Generated from the folders,
   so it cannot disagree with what is actually downloadable. */
.avail-wrap { overflow-x: auto; }          /* narrow screens scroll the table, not the page */
.avail {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 0.97rem;
}
.avail th, .avail td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
}
.avail thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: #f6f9fc;
  vertical-align: bottom;
}
.avail tbody th { font-weight: 600; color: var(--ink); }
.avail tbody tr:last-child th,
.avail tbody tr:last-child td { border-bottom: 0; }
/* The public column is the answer most people want; make it the loud one. */
.avail th.is-current, .avail td.is-current { background: #f2f8ff; }
.avail td.is-current a { font-weight: 600; }
.avail-tag {
  display: block;
  margin-top: 0.25rem;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.avail-tag.beta { color: #b06a00; }
.avail-tag.prev { color: var(--text-soft); }
.avail-none { color: #c3cfdf; }
.avail-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ---------- getting-started hero: text + LiveMath Gallery teaser ----------
   Two columns on desktop; the gallery drops below the text on narrow screens. */
.gs-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
/* The hero and the browser-config bar below it are consecutive full-padding
   sections, so their padding stacked into a dead band the height of the hero
   text. Trim the join from both sides rather than only one, or the bar ends up
   crowding the section under IT instead. */
.section.light:has(> .wrap.gs-hero) { padding-bottom: 1rem; }
.section.light:has(> .wrap.gs-hero) + .section { padding-top: 1.25rem; }
.gs-hero-text h1 { margin-top: 0.25rem; }

.gs-gallery {
  border-left: 1px solid var(--line);
  padding-left: 2rem;
}
.gs-gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.gs-gallery-head h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.gs-gallery-all {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Native swipe: scroll-snap beats a JS carousel here — touch, trackpad and
   keyboard all work, and with JS off it is still a scroller. */
.gs-cards {
  display: flex;
  gap: 0.85rem;
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;   /* swiping the strip must not navigate back */
}
.gs-cards:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.gs-card {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: start;
}
.gs-card video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.gs-card {                       /* it is an <li>; do not inherit list styling */
  list-style: none;
}
/* Match .vid-item figcaption — the site's caption voice everywhere else.
   The serif body font at 0.85rem read as body copy, not as a label. */
.gs-card-cap {
  margin: 0.45rem 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--text-soft);
}
.gs-gallery-note {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

@media (max-width: 860px) {
  .gs-hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .gs-gallery { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
}
