/* ==========================================================================
   perfyo.com — the Perfyo family look (the spec is BRAND.md; the agent at
   ai.perfyo.com keeps its own copy of the same values, nothing is shared).
   Paths are relative to this file, so pages in sub folders can use it too.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Brand (BRAND.md "Colour"): pastel sky blue with a periwinkle partner, on cool blue-white neutrals */
  --sky: #7db4ee;           /* pastel sky: marks, dots and fills, never text */
  --sky-strong: #2a62b4;    /* links and blue text */
  --sky-deep: #1d4c8f;      /* blue text on tints */
  --sky-tint: #e6f0fc;
  --sky-soft: #cfe2f8;
  --peri: #a9b5f2;          /* pastel periwinkle */
  --peri-deep: #3f4c9e;
  --peri-tint: #eef0fd;

  /* Neutrals */
  --page: #f5f8fd;
  --surface: #ffffff;
  --line: #d2deee;
  --line-soft: #e4ecf6;
  --muted: #55647a;
  --body: #2e3a4d;
  --ink: #18233a;

  /* Roles */
  --bg: var(--page);
  --card: var(--surface);
  --text: var(--body);
  --heading: var(--ink);
  --link: var(--sky-strong);
  --button: #bcd8f8;
  --button-hover: #a4c9f4;
  --button-text: #10295a;
  --focus: #4f86d8;
  --wordmark-yo: #3f86da;
  --danger: #c2410c;

  /* Status pills on the home cards (BRAND.md status hues, one step darker for text on their tints) */
  --ok: #23683f;
  --ok-tint: #e3f3ea;
  --warn: #8a4f0c;
  --warn-tint: #fbf0e1;
  --idle: var(--muted);
  --idle-tint: #edf1f6;

  /* The home page's contact panel: night blue in both themes */
  --panel-bg: linear-gradient(160deg, #0f1c36 0%, #141a3a 70%, #18204a 100%);
  --panel-heading: #eef3fb;
  --panel-text: #a9b9d1;
  --panel-button: #9cc6f5;
  --panel-button-hover: #bcd9f9;
  --panel-button-text: #0c1220;

  /* The hero: a pastel wash in light, deep night blue in dark */
  --hero-bg: linear-gradient(165deg, #dfebfc 0%, #e9ecfd 55%, var(--page) 100%);
  --hero-heading: var(--ink);
  --hero-text: #3a4a63;
  --hero-accent: #2a62b4;
  --hero-sheen: linear-gradient(90deg, #3c7fd8, #6f7fe0, #4a9ae0, #3c7fd8);
  --hero-card: rgb(255 255 255 / 0.66);
  --hero-card-hover: rgb(255 255 255 / 0.92);
  --hero-card-line: rgb(42 98 180 / 0.14);
  --hero-card-line-hover: rgb(42 98 180 / 0.4);
  --hero-tile: #ffffff;
  --hero-tile-line: rgb(255 255 255 / 0.6);
  --glow-a: 125 180 238;
  --glow-b: 169 181 242;
  --glow-a-alpha: 0.55;
  --glow-b-alpha: 0.5;

  /* Type, shape, depth, motion */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-control: 12px;
  --r-card: 18px;
  --shadow-sm: 0 1px 2px 0 rgb(30 60 120 / 0.05), 0 12px 24px -16px rgb(30 60 120 / 0.18);
  --shadow-lg: 0 4px 8px -4px rgb(30 60 120 / 0.08), 0 22px 40px -16px rgb(30 60 120 / 0.24);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 16px;
  --max: 1160px;
  --header: 64px;
}

/* Dark: only when the visitor picks it with the header switch (theme.js sets data-theme on <html>); light is the default. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --sky-strong: #9cc6f5;
  --sky-deep: #b5d4f8;
  --sky-tint: #16273f;
  --sky-soft: #1d3352;
  --peri-deep: #c3cbf7;
  --peri-tint: #1c2246;
  --bg: #0c1220;
  --card: #131b2c;
  --line: #26324a;
  --line-soft: #1b2539;
  --text: #c8d4e6;
  --muted: #9fb0c8;
  --heading: #eef3fb;
  --link: #9cc6f5;
  --button: #9cc6f5;
  --button-hover: #bcd9f9;
  --button-text: #0c1220;
  --focus: #8fbcf2;
  --wordmark-yo: #8fc0f4;
  --danger: #fb923c;
  --ok: #7fd1a0;
  --ok-tint: #12301f;
  --warn: #f0b860;
  --warn-tint: #33240f;
  --idle-tint: #1b2639;
  --hero-bg: linear-gradient(165deg, #0f1c36 0%, #141a3a 60%, #0c1220 100%);
  --hero-heading: #ffffff;
  --hero-text: #c4d3ea;
  --hero-accent: #a9cdf7;
  --hero-sheen: linear-gradient(90deg, #a9cdf7, #c3c9f7, #9fd3f5, #a9cdf7);
  --hero-card: rgb(255 255 255 / 0.05);
  --hero-card-hover: rgb(255 255 255 / 0.09);
  --hero-card-line: rgb(255 255 255 / 0.12);
  --hero-card-line-hover: rgb(169 205 247 / 0.55);
  --hero-tile: #1a2438;
  --hero-tile-line: rgb(169 205 247 / 0.16);
  --glow-a-alpha: 0.32;
  --glow-b-alpha: 0.3;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3), 0 12px 24px -16px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 4px 8px -4px rgb(0 0 0 / 0.4), 0 22px 40px -16px rgb(0 0 0 / 0.7);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

/* ---------------------------------------------------------------- base */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

[id] { scroll-margin-top: calc(var(--header) + 16px); }

/* No overflow rule on html or body: a clipped or hidden root can stall in-page jumps and smooth scrolling in Safari.
   Anything off screen is contained where it lives (.hp); the consent bar gets its own scroll padding. */
html:has(.consent) { scroll-padding-bottom: 120px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Nothing is bold (BRAND.md "Type"). */
b, strong, th, h1, h2, h3, h4 { font-weight: 500; }

h1, h2, h3 { color: var(--heading); letter-spacing: -0.011em; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-size: 1.125rem; }
p { margin: 0; }

a { color: var(--link); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }

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

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-control);
  background: var(--button); color: var(--button-text); text-decoration: none;
}
.skip:focus { top: 12px; }
main:focus { outline: none; } /* focus lands here from the skip link; tabindex="-1" keeps it out of the tab order */

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(48px, 7vw, 80px) 0; }
.section + .section { padding-top: 0; }

.section-head { max-width: 44rem; margin-bottom: clamp(32px, 4vw, 48px); }

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--link);
}

.lede { font-size: clamp(1.0625rem, 1.8vw, 1.1875rem); color: var(--muted); max-width: 40rem; margin-top: 16px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-control);
  font: 500 1rem/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.16s var(--ease), background-color 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--button); color: var(--button-text); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--button-hover); }
.btn-ghost { color: var(--heading); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--link); }
.btn .arrow { transition: transform 0.16s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------------------------------------------------------------- header */

/* The header is a floating bar: the sticky header itself is clear, the bar inside the wrap carries the glass. */
.site-header { position: sticky; top: 0; z-index: 50; padding-top: 12px; }
.header-bar {
  position: relative; display: flex; align-items: center; gap: 16px;
  min-height: calc(var(--header) - 4px); padding: 0 10px 0 16px; border-radius: 16px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
}

.brand { display: inline-flex; align-items: center; gap: 0.45em; text-decoration: none; font-size: 1.375rem; }
.brand img { width: 1.5em; height: 1.5em; }
.wordmark { font-weight: 500; letter-spacing: -0.02em; color: var(--heading); line-height: 1; }
.wordmark .yo { color: var(--wordmark-yo); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 0.9375rem;
}
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--heading); background: var(--sky-tint); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-control);
  border: 1px solid var(--line); background: transparent; color: var(--heading); cursor: pointer;
}
.nav-toggle svg { margin: auto; }

/* Light/dark switch. theme.js sets data-theme on <html> before the page draws; without it the site follows the
   system setting and the switch stays hidden. */
.theme-toggle {
  display: none; flex: none; width: 44px; height: 44px; border-radius: var(--r-control);
  border: 1px solid var(--line); background: transparent; color: var(--heading); cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s;
}
[data-theme] .theme-toggle { display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--link); background: var(--sky-tint); }
.theme-toggle svg { grid-area: 1 / 1; transition: transform 0.24s var(--ease), opacity 0.24s; }
[data-theme="light"] .theme-toggle .sun, [data-theme="dark"] .theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }

@media (max-width: 799px) {
  .js .nav-toggle { display: grid; place-items: center; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px 8px 12px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }
  .js .nav:not(.open) { display: none; }
  .js .nav a:not(.btn) { padding: 12px; }
  .nav { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------------------------------------------------------------- home: centred intro, then bento cards */

.intro { padding: clamp(48px, 8vw, 88px) 0 0; text-align: center; }
.intro h1 {
  margin: 24px auto 0; max-width: 18ch; text-wrap: balance;
  font-size: clamp(2.25rem, 5.6vw, 4.25rem); letter-spacing: -0.045em; line-height: 1.04;
}
.intro h1 .accent { color: var(--link); }
.intro .lede { margin: 20px auto 0; max-width: 40rem; }
.intro .actions { justify-content: center; }
.occasion-note { margin-top: 16px; font-size: 0.875rem; color: var(--link); }
.occasion-note:empty { display: none; }

/* Every product's icon and name under the buttons, as direct links (generated "product-index"). */
.product-index { margin: 40px auto 0; max-width: 60rem; }
.product-index ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.product-index a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-soft); color: var(--heading); font-size: 0.9375rem;
  text-decoration: none; transition: border-color 0.16s, box-shadow 0.16s var(--ease);
}
.product-index a:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.product-index img { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.product-index .mark-tile { padding: 3px; }
@media (max-width: 639px) {
  .product-index ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .product-index a { flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; border-radius: 0; font-size: 0.75rem; line-height: 1.3; text-align: center; }
  .product-index a:hover { box-shadow: none; }
  .product-index img { width: 48px; height: 48px; border-radius: 12px; box-shadow: var(--shadow-sm); }
  .product-index .mark-tile { padding: 6px; }
}

.section-head h2 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); letter-spacing: -0.03em; }
.section-head .lede { margin-top: 8px; font-size: 1.0625rem; }
.section-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }

/* Facts in one line of three (TrainX's pricing notes). */
.summary { margin: 32px 0 0; display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; overflow: clip; }
@media (min-width: 720px) { .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.summary div { padding: 16px 20px; background: var(--card); }
.summary dt { font-size: 0.8125rem; color: var(--muted); }
.summary dd { margin: 4px 0 0; color: var(--heading); }

/* The group filter (script.js); hidden, and so absent, without the script. */
.filters { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: var(--r-control); background: var(--card); border: 1px solid var(--line); }
.filters[hidden] { display: none; }
@media (max-width: 639px) { .filters { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; } .filters button { flex: none; } }
.filters button {
  font: inherit; font-size: 0.875rem; padding: 8px 14px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); transition: background-color 0.16s, color 0.16s;
}
.filters button:hover { color: var(--heading); }
.filters button[aria-pressed="true"] { background: var(--sky-tint); color: var(--heading); font-weight: 500; }

/* Bento: the platforms as one wide and one tall card, the apps three to a row. */
.bento { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .bento:not(.app-tiles) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 640px) { .app-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .app-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app-tiles > li { display: flex; }
.app-tiles > li[hidden] { display: none; }

.bento-card {
  --accent: var(--sky);
  position: relative; display: flex; flex-direction: column; flex: 1; min-width: 0;
  padding: 24px; border-radius: 22px; overflow: hidden; overflow: clip;
  background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.16s;
}
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.tile-head { display: flex; align-items: center; gap: 12px; }
.tile-name { font-size: 1.25rem; letter-spacing: -0.015em; }
.tile-line { margin-top: 10px; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.tile-meta { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 0.875rem; color: var(--muted); }

/* A platform: its screenshot runs off the bottom-right corner. */
.bento-feature .tile-head { justify-content: flex-start; }
.bento-feature .tile-name { margin-top: 20px; font-size: clamp(1.5rem, 2.6vw, 1.875rem); letter-spacing: -0.025em; }
.bento-feature .tile-line { max-width: 34rem; font-size: 1rem; }
.tile-more { color: var(--link); font-weight: 500; }
.tile-more .arrow { display: inline-block; transition: transform 0.16s var(--ease); }
.bento-card:hover .tile-more .arrow { transform: translateX(3px); }
.bento-wide { background: linear-gradient(160deg, var(--card) 45%, var(--sky-tint)); }
.bento-tall { background: linear-gradient(170deg, var(--card) 50%, var(--peri-tint)); }
@media (min-width: 900px) {
  .bento-wide { grid-column: span 4; }
  .bento-tall { grid-column: span 2; }
}
.feature-shot {
  display: block; flex: 1; min-height: 200px; margin: 24px -24px -24px 24px;
  border: 1px solid var(--line); border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0;
  overflow: hidden; overflow: clip; box-shadow: var(--shadow-lg); background: var(--card);
}
.bento-tall .feature-shot { margin-left: 0; }
.feature-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
@media (min-width: 900px) { .feature-shot { max-height: 380px; } }

/* An app: screenshot on top, then icon and name, one line, status and what it runs on, and its group. */
.tile-shot {
  display: block; margin: -24px -24px 20px; aspect-ratio: 16 / 9; overflow: hidden; overflow: clip;
  background: var(--sky-tint); border-bottom: 1px solid var(--line-soft);
}
.tile-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tile-shot img.narrow { object-fit: contain; object-position: center; padding: 12px; }
.app-tile .app-icon { width: 40px; height: 40px; border-radius: 10px; }
.app-tile .tile-name { font-size: 1.125rem; }
.app-tile .tile-line { flex: 1; }
.app-tile .tile-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
.tile-group { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--muted); }

/* Phones: an app card is icon, name, line and status; a desktop screenshot is unreadable at this width. */
@media (max-width: 639px) {
  .app-tile { padding: 18px; }
  .app-tile .tile-shot { display: none; }
  .app-tile .tile-line { margin-top: 8px; }
  .app-tile .tile-meta { margin-top: 12px; flex-direction: row; align-items: center; gap: 6px 12px; }
  .app-tile .tile-group { display: none; }
}

/* A last app alone on its row spans the row, with its screenshot beside the text. */
@media (min-width: 640px) and (max-width: 959px) { .app-tiles > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 960px) { .app-tiles > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
@media (min-width: 640px) {
  .app-tiles > li:last-child:nth-child(odd) .app-tile { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 40px; align-content: center; }
  .app-tiles > li:last-child:nth-child(odd) .tile-shot { grid-column: 2; grid-row: 1 / -1; margin: -24px -24px -24px 0; aspect-ratio: auto; min-height: 240px; border-bottom: 0; border-left: 1px solid var(--line-soft); }
  .app-tiles > li:last-child:nth-child(odd) .app-tile > :not(.tile-shot) { grid-column: 1; }
}
@media (min-width: 960px) { .app-tiles > li:last-child:not(:nth-child(3n+1)) .app-tile { display: flex; } .app-tiles > li:last-child:not(:nth-child(3n+1)) .tile-shot { margin: -24px -24px 20px; aspect-ratio: 16 / 9; min-height: 0; border-left: 0; border-bottom: 1px solid var(--line-soft); } }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-live { background: var(--ok-tint); color: var(--ok); }
.pill-dev { background: var(--warn-tint); color: var(--warn); }
.pill-soon { background: var(--idle-tint); color: var(--idle); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; letter-spacing: 0;
  background: var(--peri-tint); color: var(--peri-deep);
}
.badge-live { background: var(--sky-tint); color: var(--sky-deep); }

/* ---------------------------------------------------------------- product cards (About, and next/previous on product pages) */

/* One template for every app: icon, name, one line, arrow. */
.app-card {
  --accent: var(--sky);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; align-items: center;
  padding: 14px 16px; border-radius: 16px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line-soft);
  transition: border-color 0.16s;
}
.app-card:hover { border-color: var(--link); }
.app-card .mark-tile, .app-card .app-icon { grid-row: span 2; }
.app-card-name { font-weight: 500; color: var(--heading); letter-spacing: -0.01em; }
.app-card-line { grid-column: 2; font-size: 0.875rem; line-height: 1.45; color: var(--muted); }
.app-card .chev { grid-column: 3; grid-row: 1 / span 2; color: var(--muted); }
.app-card:hover .chev { color: var(--link); }

.mark-tile {
  flex: none; box-sizing: border-box; width: 48px; height: 48px; padding: 7px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--accent) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.mark-tile.lg { width: 64px; height: 64px; padding: 10px; border-radius: 18px; }

/* ---------------------------------------------------------------- cards */

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
}
.card p { color: var(--muted); font-size: 0.9375rem; }

.features li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sky-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.5l3 3L16 8' stroke='%232a62b4' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ---------------------------------------------------------------- contact line + footer */

.contact-line {
  display: grid; gap: 20px; align-items: center; padding: clamp(24px, 4vw, 36px);
  border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft);
}
@media (min-width: 760px) { .contact-line { grid-template-columns: minmax(0, 1fr) auto; } .contact-line .actions { margin-top: 0; } }
.contact-line h2 { font-size: clamp(1.375rem, 2.8vw, 1.75rem); letter-spacing: -0.02em; }
.contact-line p { margin-top: 6px; color: var(--muted); }
.contact-panel { background: var(--panel-bg); border-color: rgb(255 255 255 / 0.08); border-radius: 26px; padding: clamp(28px, 5vw, 48px); }
.contact-panel h2 { color: var(--panel-heading); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; }
.contact-panel p { color: var(--panel-text); }
.contact-panel .btn-primary { background: var(--panel-button); color: var(--panel-button-text); }
.contact-panel .btn-primary:hover { background: var(--panel-button-hover); }
/* On phones the main actions are full-width, easy-to-hit buttons. */
@media (max-width: 479px) { .actions .btn { flex: 1 1 100%; } }

.site-footer { border-top: 1px solid var(--line-soft); padding: 56px 0 32px; background: var(--card); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 960px) { .footer-brand { grid-column: auto; } }
.footer-brand p { margin-top: 12px; color: var(--muted); font-size: 0.9375rem; }
.site-footer h2 { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--heading); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a:not(.brand) { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.site-footer a:not(.brand):hover { color: var(--heading); text-decoration: underline; }
.site-footer .link { font: inherit; font-size: 0.9375rem; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.site-footer .link:hover { color: var(--heading); text-decoration: underline; }

/* ---------------------------------------------------------------- cookie consent (made by script.js) */
.consent {
  position: fixed; z-index: 50; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  max-width: 40rem; margin: 0 auto; padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: flex-end;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-lg); animation: consent-in 0.4s var(--ease);
}
.consent p { flex: 1 1 18rem; margin: 0; font-size: 0.9375rem; }
.consent-actions { display: flex; gap: 8px; }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }

.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 0.875rem; }
.site-footer .footer-base a { font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- app pages (apps/<name>/) */

.app-hero {
  position: relative; padding: clamp(32px, 5vw, 56px) 0 clamp(56px, 8vw, 96px);
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 clamp(28px, 4vw, 48px); padding: 0; font-size: 0.875rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--heading); text-decoration: underline; }

.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.lockup { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--heading); }
.lockup span { color: var(--link); }
.kind { margin-top: 4px; font-size: 0.875rem; color: var(--muted); }
.app-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }

.highlight { gap: 12px; }
.highlight h3 { display: flex; align-items: center; gap: 12px; }
.highlight .num {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 0.875rem;
  background: var(--sky-tint); background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--heading);
}

.glance { margin: 0; display: grid; border-top: 1px solid var(--line-soft); }
.glance div { display: grid; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
@media (min-width: 640px) { .glance div { grid-template-columns: 12rem minmax(0, 1fr); } }
.glance dt { color: var(--muted); }
.glance dd { margin: 0; color: var(--heading); }

.pager { display: grid; gap: 12px; }
@media (min-width: 640px) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pager .app-card .mark-tile, .pager .app-card .app-icon, .pager .app-card .chev { grid-row: 1 / span 3; }
.pager-dir { grid-column: 2; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Redirect pages (ai/, trainx/, old app slugs) */
.redirect { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.redirect img { width: 96px; height: 96px; margin: 0 auto 24px; }

/* ---------------------------------------------------------------- screenshots of the real apps */

.app-intro { max-width: 46rem; }
.app-visual { margin-top: clamp(40px, 6vw, 64px); }

.shot { margin: 0; display: grid; gap: 12px; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--line-soft); background: var(--card);
  box-shadow: var(--shadow-sm);
}
/* A small capture (a menu-bar card, a pill) keeps its own size and has no frame of its own. */
.shot.narrow { justify-items: center; }
.shot.narrow img { width: auto; max-width: 100%; border: 0; background: none; box-shadow: none; }
.shot figcaption { font-size: 0.875rem; color: var(--muted); }
.shot.narrow figcaption { text-align: center; }
.shots { display: grid; gap: 32px; }
/* An odd last screenshot takes the whole row rather than leaving half of it empty. */
@media (min-width: 900px) { .shots > .shot:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 900px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; } }

/* A product's tour video: framed like a screenshot; nothing loads until play (preload="none"). */
.tour { margin: 0; display: grid; gap: 12px; }
.tour video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px;
  border: 1px solid var(--line-soft); background: var(--card);
  box-shadow: var(--shadow-sm);
}
.tour figcaption { font-size: 0.875rem; color: var(--muted); }

.features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px 32px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.features li { display: flex; align-items: flex-start; gap: 12px; color: var(--text); }
.features li::before { margin-top: 1px; }

/* A real app icon: its own shape, no tile. */
.app-icon { flex: none; width: 48px; height: 48px; }
.app-icon.lg { width: 64px; height: 64px; }

/* ---------------------------------------------------------------- long-form (about) */

.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -0.04em; line-height: 1.05; }

.prose { max-width: 44rem; }
/* A long-form block inside .wrap lines up with the page heading above it instead of sitting centred under it. */
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 44rem; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 56px 0 16px; }
.prose p, .prose ul { margin: 0 0 16px; font-size: 1.0625rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--sky); }
.prose h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.prose code { font-family: var(--mono); font-size: 0.875em; padding: 1px 5px; border-radius: 6px; background: var(--sky-tint); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { color: var(--heading); font-weight: 500; }
@media (max-width: 640px) {
  /* Phones: each row as a small stacked card, every cell labelled, so the table never scrolls sideways. */
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .prose td { padding: 2px 0; border: 0; }
  .prose td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.8125rem; }
}
.contact-form {
  display: grid; gap: 20px; max-width: 40rem; padding: clamp(20px, 4vw, 36px);
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 24px; box-shadow: var(--shadow-sm);
}
.contact-form .field { display: grid; gap: 6px; }
.contact-form label { font-weight: 500; color: var(--heading); }
.contact-form .optional, .contact-form .hint, .form-note { color: var(--muted); font-weight: 400; font-size: 0.9375rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-control);
  font: 400 1rem/1.5 var(--font); color: var(--heading); background: var(--bg);
}
.contact-form textarea { resize: vertical; min-height: 160px; }
/* The topic list is drawn like the text fields (Safari's native select ignores their height and radius). The chevron
   is two small gradients in the muted text colour, so it follows the theme with no image. */
.contact-form select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.contact-form select option { color: var(--heading); background: var(--card); }
.contact-form input, .contact-form select, .contact-form textarea { transition: border-color 0.16s, box-shadow 0.16s; }
.contact-form input:hover, .contact-form select:hover, .contact-form textarea:hover { border-color: color-mix(in srgb, var(--link) 45%, var(--line)); }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible {
  outline: none; border-color: var(--link); box-shadow: 0 0 0 4px color-mix(in srgb, var(--link) 22%, transparent);
}
.contact-form [aria-invalid="true"] { border-color: var(--danger); }
.contact-form .actions { margin-top: 0; }
.contact-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.form-note { margin: 0; }
.form-status { margin: 0; min-height: 1.5em; }
.form-status.ok { color: var(--link); }
.form-status.error { color: var(--danger); }
.page-hero .updated { margin-top: 12px; color: var(--muted); font-size: 0.9375rem; }



/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost img { width: 140px; height: 140px; margin: 0 auto 28px; }

/* ---------------------------------------------------------------- page layouts (round 2) */

/* Header: Contact is the one action, so it is a button. */
.nav .nav-cta { min-height: 38px; padding: 8px 16px; margin-left: 8px; font-size: 0.9375rem; }
.nav .nav-cta[aria-current="page"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 25%, transparent); }
@media (max-width: 799px) { .js .nav .nav-cta { margin: 8px 0 0; min-height: 44px; } }

/* App and platform pages: the facts sit beside the intro instead of in a section of their own. */
.app-top { display: grid; gap: 32px; align-items: end; }
@media (min-width: 1000px) { .app-top { grid-template-columns: minmax(0, 1fr) 22rem; gap: 56px; } }
.glance-card {
  padding: 22px 24px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--card) 86%, transparent);
}
.glance-card h2 { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.glance-card .glance { border-top: 0; }
.glance-card .glance div { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
.glance-card .glance div:last-child { border-bottom: 0; padding-bottom: 0; }
.glance-card dt { font-size: 0.8125rem; }
.glance-card dd { font-size: 0.9375rem; line-height: 1.5; }

/* About: every product as a card. */
.prose .product-grid {
  list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}
.wrap.prose > .product-grid { max-width: 50rem; }
.prose .product-grid li { margin: 0; }
.prose .product-grid .app-card { height: 100%; }

/* Contact: the form and a short "good to know" column. */
.contact-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: minmax(0, 40rem) minmax(0, 20rem); gap: 48px; } }
.contact-aside { display: grid; gap: 22px; padding-top: 8px; }
.aside-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.aside-icon { box-sizing: content-box; padding: 9px; border-radius: 12px; color: var(--sky-strong); background: var(--sky-tint); }
.aside-item h2 { font-size: 1rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.aside-item p, .aside-mail { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.aside-mail { padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* Privacy and terms: a sticky "On this page" list beside the text on wide screens. */
.legal { display: grid; gap: 24px; }
.toc { font-size: 0.9375rem; }
.toc-title { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 6px 12px; border-left: 2px solid var(--line-soft); color: var(--muted); text-decoration: none;
  transition: color 0.16s, border-color 0.16s, background-color 0.16s;
}
.toc a:hover { color: var(--heading); border-left-color: var(--sky); }
.toc a[aria-current="true"] { color: var(--link); border-left-color: var(--link); background: var(--sky-tint); }
@media (max-width: 1039px) {
  /* Narrow screens: the sections as a compact set of chips instead of a long list. */
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px; }
  .toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.875rem; background: var(--card); }
  .toc a:hover { border-color: var(--link); }
}
@media (min-width: 1040px) {
  .legal { grid-template-columns: 15rem minmax(0, 44rem); gap: 64px; }
  .toc { position: sticky; top: calc(var(--header) + 24px); align-self: start; max-height: calc(100vh - var(--header) - 48px); overflow: auto; }
  .legal .prose > h2:first-child { margin-top: 0; }
}

/* ---------------------------------------------------------------- reduced motion: nothing moves */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- pricing (product pages with a "pricing" entry) */

.pricing-status { margin-top: 16px; }
.price-card {
  border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-sm);
  overflow: hidden; overflow: clip;
}
.price-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.price-table caption { caption-side: top; text-align: left; padding: 16px 20px; font-size: 0.875rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.price-table th, .price-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.price-table thead th { color: var(--heading); font-weight: 500; }
.price-table tbody th { color: var(--muted); font-weight: 400; width: 14rem; }
.price-table td { color: var(--text); }
.price-table tbody tr:first-child td { color: var(--heading); font-weight: 500; font-size: 1.0625rem; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table th:first-child, .price-table td:first-child { padding-left: 20px; }
@media (max-width: 719px) {
  /* Phones: each row as a small block with every value labelled by its plan, so the table never scrolls sideways. */
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; }
  .price-table caption { display: block; }
  .price-table tbody tr { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
  .price-table tbody tr:last-child { border-bottom: 0; }
  .price-table tbody th { width: auto; padding: 0 0 6px; border: 0; color: var(--heading); font-weight: 500; }
  .price-table td, .price-table th:first-child, .price-table td:first-child { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 12px; padding: 3px 0; border: 0; }
  .price-table tbody th:first-child { display: block; padding: 0 0 6px; }
  .price-table td[colspan] { display: block; }
  .price-table td[colspan]::before { content: none; }
  .price-table td::before { content: attr(data-label); color: var(--muted); font-weight: 400; font-size: 0.9375rem; }
}
.pricing-sub { margin-top: 40px; font-size: 1.25rem; }
.pricing-line { margin-top: 8px; color: var(--muted); }
.pricing-line + .summary { margin-top: 16px; }
