/* The public site: the landing page, the CP guide, contact, the legal pages,
   404, and the showcase page. Grown from the showcase design, and on the same dark ramp as the signed-in
   app (tokens.css: --surface-*, --line, --fg-*, the --tool-*-hi accents) so
   the site is one piece: real screenshots, one accent per tool.

   Everything here is class-based (apart from a small base) so a page with its
   own long stylesheet, like cp-guide.html, can take the header, footer and
   buttons without its headings and tables being restyled. The tools
   themselves use style.css instead.

   showcase.html loads this file too, so while SHOWCASE_MODE is on it must stay
   self-contained apart from tokens.css: no url() to anything outside the
   showcase allow-list in main.py. */

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

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

/* The chart theme (chart-theme.js) reads these, as it does app.css's. */
:root {
  color-scheme: dark;
  --chart-ink: var(--fg-lo);
  --chart-grid: rgba(141, 160, 184, .14);
  --chart-tooltip: var(--surface-3);
  --ui-surface: var(--surface-1);
  --ui-raised: var(--surface-2);
  --ui-fg: var(--fg-hi);
  --ui-muted: var(--fg-lo);
  --ui-line: var(--line-strong);
  --ui-accent: var(--tool-analyse-hi);
  --ui-on-accent: var(--surface-0);
  /* The older light names that shared code (chart-kit's toolbar, ui.js) reads. */
  --text: var(--fg);
  --muted: var(--fg-lo);
  --border: var(--line-strong);
  --blue: var(--tool-analyse-hi);
}

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--tool-analyse-hi); color: var(--surface-0); padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--tool-analyse); outline-offset: 3px; border-radius: 4px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { padding: 8px 15px; font-size: 15px; }
.btn-bright { background: var(--tool-analyse); color: var(--shell-bg); }
.btn-bright:hover { background: #7DD3FC; }
.btn-line { border-color: rgba(255, 255, 255, .3); color: #fff; background: transparent; }
.btn-line:hover { border-color: #fff; }
.btn-ink { background: var(--shell-bg); color: #fff; }
.btn-ink:hover { background: var(--shell-bg-2); }
.btn-quiet { background: transparent; color: var(--fg-hi); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--fg-lo); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-full { width: 100%; }

/* ── Cockpit: header and hero on the app's dark shell ──────────────────────── */

.cockpit {
  background:
    radial-gradient(900px 480px at 82% 0%, rgba(56, 189, 248, .13), transparent 70%),
    linear-gradient(180deg, var(--shell-bg) 0%, var(--shell-bg-2) 100%);
  color: var(--shell-bright);
  overflow: hidden;
}

.top {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; gap: 28px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.logo .mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-mid), #7CC4FF);
}
.logo .word { font-family: var(--font-mono); font-weight: 500; font-size: 17px; letter-spacing: -.01em; }

.top-nav { display: flex; gap: 22px; margin-left: auto; }
.top-nav a { color: #C6D2E1; text-decoration: none; font-size: 16px; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: #fff; }

.top-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.top-actions .signin { color: #fff; text-decoration: none; font-size: 16px; font-weight: 500; }
.top-actions .signin:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The showcase page's "In development" pill. */
.status {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: #FCD9A0; border: 1px solid rgba(252, 217, 160, .35); border-radius: 999px; padding: 6px 12px;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: #F59E0B; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.hero {
  max-width: 1240px; margin: 0 auto; padding: 56px 24px 0;
  /* The picture's column is 1.05 of the copy's, held to a whole 582 px at full
     width so the picture (580 px inside its frame) is shown pixel for pixel:
     see SLOT in scripts/make_showcase_shots.py. */
  display: grid; grid-template-columns: minmax(0, 1fr) min(582px, calc((100% - 56px) * .513)); gap: 56px; align-items: start;
}
.hero-copy { padding-bottom: 72px; }

.eyebrow {
  margin: 0 0 18px; font-family: var(--font-mono); font-size: 14px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--tool-analyse);
}

.hero h1, .page-head h1 {
  margin: 0 0 22px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance;
}
.hero h1 em, .page-head h1 em { font-style: normal; color: var(--tool-analyse); }

.lede { margin: 0 0 26px; font-size: 20px; line-height: 1.6; color: #C6D2E1; max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.hero-note { margin: 0; font-size: 16px; color: #9FB0C4; max-width: 34em; }
.hero-note a { color: #fff; }

.notice {
  margin: 0; padding: 14px 16px; max-width: 34em;
  border-left: 3px solid #F59E0B; background: rgba(245, 158, 11, .09); border-radius: 0 10px 10px 0;
  font-size: 17px; color: #DCE4EE;
}
.notice strong { color: #fff; font-weight: 600; }

/* Inner pages: a shorter dark band with the page's title. */
.page-head { max-width: 1240px; margin: 0 auto; padding: 40px 24px 56px; }
.page-head.narrow { max-width: 820px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 50px); margin-bottom: 16px; }
.page-head .lede { margin: 0; font-size: 19px; }
.page-head .hero-actions { margin: 26px 0 0; }

/* ── Screenshots ───────────────────────────────────────────────────────────── */

.shot { margin: 0; }
.shot a {
  display: block; border-radius: 14px; overflow: hidden; background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 24px 50px -20px rgba(0, 0, 0, .7);
  transition: transform .2s ease, box-shadow .2s ease;
}
.shot a:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent, var(--tool-analyse-hi)) 45%, var(--line)); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 12px; font-size: 16px; color: var(--fg-lo); }

/* The hero picture runs off the bottom of the cockpit, like a screen in a desk. */
.hero-shot { align-self: end; }
.hero-shot a {
  border-radius: 14px 14px 0 0; border-color: var(--shell-border); border-bottom: 0; background: var(--dash-bg);
  max-height: 560px; box-shadow: 0 -10px 60px -10px rgba(56, 189, 248, .22);
}
.hero-shot a:hover { transform: none; box-shadow: 0 -10px 70px -8px rgba(56, 189, 248, .32); }

/* ── Section headings ──────────────────────────────────────────────────────── */

.title {
  margin: 0 0 16px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(27px, 3.3vw, 38px); line-height: 1.1; letter-spacing: -.03em; text-wrap: balance;
}
.section-lede { margin: 0 0 28px; max-width: 44em; font-size: 19px; color: var(--fg); }
.title { color: var(--fg-hi); }

.num {
  margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent, var(--blue));
}
.num span {
  display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 7px;
  border: 1px solid currentColor; border-radius: 6px; letter-spacing: .04em;
}

/* ── Primer ────────────────────────────────────────────────────────────────── */

.primer { padding: 84px 0 28px; }
.primer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
.primer-body p { margin: 0 0 16px; font-size: 19px; color: var(--fg); }

/* ── Tools ─────────────────────────────────────────────────────────────────── */
/* Words first, then the pictures at the full width of the page: a screenshot
   squeezed into half a column cannot be read. */

.tool { padding: 76px 0; --accent: var(--blue); }
.tool + .tool { border-top: 1px solid var(--line); }
/* Each tool's section carries a faint wash of its colour, as its page does. */
.tool { background: radial-gradient(70% 60% at 85% 10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%); }
.tool[data-tool="analyse"]   { --accent: var(--tool-analyse-hi); }
.tool[data-tool="cp"]        { --accent: var(--tool-cp-hi); }
.tool[data-tool="threshold"] { --accent: var(--tool-threshold-hi); }
.tool[data-tool="diary"]     { --accent: var(--tool-diary-hi); }
.tool[data-tool="planner"]   { --accent: var(--tool-planner-hi); }
.tool[data-tool="coach"]     { --accent: var(--tool-coach-hi); }

.tool-grid { display: grid; gap: 40px; }
.tool-copy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto auto 1fr; gap: 0 56px; align-items: start; }
.tool-copy > .num, .tool-copy > .title, .tool-copy > p { grid-column: 1; }
.tool-copy > ul { grid-column: 2; grid-row: 1 / span 4; }
.tool-copy > p { margin: 0; font-size: 19px; color: var(--fg); }
.tool-copy > p.open { margin-top: 20px; font-size: 17px; }

.open a {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid currentColor; padding-bottom: 1px;
}
.open a:hover { border-bottom-color: transparent; }
.tier {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(148, 163, 184, .14); color: var(--fg-lo);
}

.tool-copy ul { margin: 0; padding: 0; list-style: none; }
.tool-copy li {
  position: relative; padding: 12px 0 12px 26px; font-size: 17px; line-height: 1.5; color: var(--fg);
  border-bottom: 1px solid var(--line);
}
.tool-copy li:last-child { border-bottom: 0; }
.tool-copy li::before {
  content: ""; position: absolute; left: 2px; top: 21px; width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
}

.tool-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
.tool-shots .shot:first-child, .tool-shots .shot:nth-child(2):last-child { grid-column: 1 / -1; }

/* ── Free tools (no account) ───────────────────────────────────────────────── */

.free { padding: 76px 0; background: var(--surface-1); border-top: 1px solid var(--line); --accent: var(--data-good); }
.free-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.free-card {
  display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.free-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.free-card h3 { color: var(--fg-hi); }
.free-card h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.free-card p { margin: 0; font-size: 16px; color: var(--fg-lo); line-height: 1.5; }
.free-card .go { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 16px; color: var(--accent); }

/* ── Models ────────────────────────────────────────────────────────────────── */

.models { padding: 76px 0; background: var(--surface-0); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); --accent: var(--tool-calc-hi); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-1); }
.models table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 17px; }
.models thead th {
  text-align: left; padding: 12px 18px; background: var(--surface-2); color: var(--fg-lo);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
}
.models tbody th, .models tbody td { text-align: left; padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: baseline; color: var(--fg); }
.models tbody th { font-weight: 600; white-space: nowrap; color: var(--fg-hi); }
.models td.mono { font-family: var(--font-mono); font-size: 16px; white-space: nowrap; color: var(--fg-hi); }
.models tr.fitted { background: color-mix(in srgb, var(--tool-calc-hi) 10%, transparent); }
.models tr.fitted th { color: var(--tool-calc-hi); }
.footnote { margin: 16px 0 0; font-size: 16px; color: var(--fg-lo); }

/* ── Pricing ───────────────────────────────────────────────────────────────── */

.pricing { padding: 84px 0; --accent: var(--tool-analyse-hi); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column; padding: 28px 26px; border-radius: 16px;
  background: var(--surface-1); border: 1px solid var(--line);
}
.plan h3 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.plan h3, .plan .price { color: var(--fg-hi); }
.plan .for { margin: 4px 0 18px; font-size: 16px; color: var(--fg-lo); }
.plan .price { margin: 0; font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.plan .price small { font-family: var(--font-sans); font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--fg-lo); }
.plan .per { margin: 4px 0 20px; font-size: 15px; color: var(--fg-lo); }
.plan ul { margin: 0 0 24px; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); flex: 1; }
.plan li { position: relative; padding: 6px 0 6px 26px; font-size: 16px; line-height: 1.45; }
.plan li::before {
  content: ""; position: absolute; left: 3px; top: 12px; width: 11px; height: 6px;
  border-left: 2px solid var(--data-good); border-bottom: 2px solid var(--data-good); transform: rotate(-45deg);
}
.plan li.off { color: color-mix(in srgb, var(--fg-lo) 70%, transparent); }
.plan li.off::before {
  width: 11px; height: 0; top: 17px; left: 2px; border-left: 0; border-bottom: 2px solid var(--line-strong); transform: none;
}
.plan li small { display: block; color: var(--fg-lo); font-size: 14px; }

.plan.pro {
  background: radial-gradient(80% 60% at 100% 0%, color-mix(in srgb, var(--tool-analyse-hi) 14%, transparent), transparent 70%), var(--surface-2);
  border-color: color-mix(in srgb, var(--tool-analyse-hi) 45%, var(--line)); color: var(--fg-hi); position: relative;
  box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--tool-analyse-hi) 35%, transparent);
}
.plan.pro .for, .plan.pro .per, .plan.pro .price small, .plan.pro li small { color: #9FB0C4; }
.plan.pro ul { border-top-color: var(--shell-border); }
.plan.pro li::before { border-color: var(--tool-analyse); }
.plan .badge {
  position: absolute; top: -12px; right: 22px; padding: 4px 10px; border-radius: 999px;
  background: var(--tool-analyse); color: var(--shell-bg);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.pricing .footnote { margin-top: 20px; }

/* ── FAQ ───────────────────────────────────────────────────────────────────── */

.faq { padding: 76px 0 84px; background: var(--surface-1); border-top: 1px solid var(--line); --accent: var(--tool-account-hi); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 18px 0; font-size: 18px; font-weight: 600; color: var(--fg-hi);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: none; font-family: var(--font-mono); font-size: 22px; font-weight: 400; line-height: 1; color: var(--accent);
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { margin: 0 0 20px; max-width: 46em; font-size: 17px; color: var(--fg); }

/* ── Call to action ────────────────────────────────────────────────────────── */

.cta {
  padding: 72px 0; color: var(--shell-bright);
  background:
    radial-gradient(700px 360px at 15% 100%, rgba(56, 189, 248, .14), transparent 70%),
    var(--shell-bg);
}
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.cta .title { margin: 0 0 8px; }
.cta p { margin: 0; max-width: 36em; font-size: 18px; color: #C6D2E1; }
.cta .hero-actions { margin: 0; }

/* ── How it's built ────────────────────────────────────────────────────────── */

.built { padding: 80px 0 88px; background: var(--shell-bg); color: var(--shell-bright); --accent: var(--tool-analyse); }
.built-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--shell-border); border: 1px solid var(--shell-border); border-radius: 14px; overflow: hidden; }
.built-grid > div { background: var(--shell-bg-2); padding: 26px 26px 28px; }
.built h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.built-grid p { margin: 0; font-size: 17px; line-height: 1.55; color: #B6C2D2; }

.maker {
  margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
}
.maker p { margin: 0; font-size: 20px; color: #C6D2E1; }
.maker strong { color: #fff; font-weight: 600; }
.maker .mail {
  font-family: var(--font-mono); font-size: 17px; font-weight: 500; color: var(--shell-bg); background: var(--tool-analyse);
  text-decoration: none; padding: 10px 18px; border-radius: 999px;
}
.maker .mail:hover { background: #7DD3FC; }

/* ── Inner pages: prose and forms ──────────────────────────────────────────── */

.page-body { padding: 56px 0 88px; }

.prose { font-size: 18px; color: var(--fg); }
.prose h2, .prose h3 { color: var(--fg-hi); }
.prose h2 {
  margin: 44px 0 12px; font-family: var(--font-display); font-weight: 600;
  font-size: 26px; line-height: 1.2; letter-spacing: -.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--tool-analyse-hi); }
.prose .updated { font-family: var(--font-mono); font-size: 14px; color: var(--fg-lo); letter-spacing: .04em; }

.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }

.field { display: block; margin: 0 0 20px; }
.field > span { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; color: var(--fg-hi); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2);
  font-family: var(--font-sans); font-size: 16px; color: var(--fg-hi);
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--fg-lo) 70%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--tool-analyse-hi); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tool-analyse-hi) 22%, transparent); }
.field textarea { resize: vertical; min-height: 140px; }

.status-msg { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 16px; }
.status-msg.success { display: block; background: rgba(74, 222, 128, .10); border: 1px solid rgba(74, 222, 128, .35); color: #86EFAC; }
.status-msg.error { display: block; background: rgba(248, 113, 113, .10); border: 1px solid rgba(248, 113, 113, .35); color: #FCA5A5; }

.side-note { font-size: 16px; color: var(--fg-lo); }
.side-note h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--fg-hi); }
.side-note p { margin: 0 0 18px; }
.side-note a { color: var(--tool-analyse-hi); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: start; }

/* ── Footer ────────────────────────────────────────────────────────────────── */

.foot { background: #040A14; border-top: 1px solid var(--line); color: #B6C2D2; padding: 48px 0 44px; font-size: 16px; }
.foot-inner { display: grid; gap: 12px; }
.foot p { margin: 0; }
.foot a { color: #DCE4EE; }
.foot .fine { font-size: 14px; }
.foot .logo .mark { width: 26px; height: 26px; border-radius: 7px; }
.foot .logo .word { font-size: 15px; }

.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-grid .about p { margin-top: 14px; max-width: 24em; }
.foot h2 {
  margin: 0 0 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: #8094AC;
}
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { margin-bottom: 8px; }
.foot li a { text-decoration: none; }
.foot li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid #13253D; font-size: 14px; }

/* ── Narrow screens ────────────────────────────────────────────────────────── */

/* With sign-in buttons in the bar there is no room for the section links;
   the footer carries them. The showcase page, with no buttons, keeps them. */
@media (max-width: 980px) {
  .top:has(.top-actions) .top-nav { display: none; }
  .top-actions { margin-left: auto; }
}

@media (max-width: 900px) {
  .hero, .primer-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .tool-copy { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .tool-copy > ul { grid-column: 1; grid-row: auto; margin-top: 20px; }
  .tool-shots { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero { padding-top: 32px; }
  .hero-copy { padding-bottom: 8px; }
  .hero-shot a { max-height: 380px; }
  .tool, .free, .models, .faq { padding: 52px 0; }
  .pricing { padding: 56px 0; }
  .primer { padding: 56px 0 12px; }
  .built-grid, .free-grid, .plans { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid .about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .wrap, .top, .hero, .page-head { padding-left: 16px; padding-right: 16px; }
  .top { gap: 12px; flex-wrap: wrap; }
  .top-nav { order: 3; width: 100%; margin-left: 0; gap: 18px; }
  .status { margin-left: auto; }
  body { font-size: 17px; }
  .lede { font-size: 18px; }
  .top-nav a { font-size: 15px; }
  .top-actions { gap: 12px; }
  .top-actions .btn { padding: 8px 13px; font-size: 14px; }
  .card { padding: 22px 18px; }
  .plan { padding: 24px 20px; }
}

/* A 320 px phone: the logo, Sign in and the button no longer fit one row. */
@media (max-width: 380px) {
  .top-actions .btn { display: none; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status .dot { animation: none; }
  .shot a, .shot a:hover, .free-card, .free-card:hover { transition: none; transform: none; }
}
