/* Shared shell for the standalone document pages (pricing, terms, privacy,
   refunds). Tokens are copied verbatim from index.html so the doc pages and the
   landing never drift apart — if a value changes there, change it here too. */

:root {
  color-scheme: dark;
  --bg: #060607;
  --bg-raised: #0C0C0E;
  --bone: #F0EFEC;
  --gray: #98979A;
  --gray-dim: #5C5B5F;
  --amber: #FF5426;
  --orange-rgb: 255, 84, 38;
  /* Paid-tier accent: Pro badges, purchase CTAs. Not for ordinary chrome —
     orange should read as "this is about the licence". Put --bone on top of an
     orange fill only in dark mode; on a fill use ink text, never white. */
  --orange: #FF5426;
  --fg-rgb: 240, 239, 236;
  --bg-rgb: 6, 6, 7;
  --panel-float: #141416;
  --fg-hover: #FFFFFF;
  --line: rgba(var(--fg-rgb), 0.08);
  --card: rgba(var(--fg-rgb), 0.04);
  --card-hover: rgba(var(--fg-rgb), 0.06);
  /* The films are dark in either theme — they were rendered that way — so
     the box they play in keeps a black of the same kind in light mode too,
     and a film that has not loaded yet is not a light hole in the page. */
  --media-bg: #0A0A0B;
  --media-fg: rgba(240, 239, 236, 0.92);
  --media-track: rgba(240, 239, 236, 0.24);
  --media-scrim: rgba(3, 4, 4, 0.5);
  --media-line: rgba(240, 239, 236, 0.14);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F1F0ED;
  --bg-raised: #F9F8F6;
  --bone: #1B1B1E;
  --gray: #6B6A6F;
  --gray-dim: #A3A2A6;
  --amber: #D93A12;
  --orange-rgb: 217, 58, 18;
  --orange: #D93A12;
  --fg-rgb: 27, 27, 30;
  --bg-rgb: 241, 240, 237;
  --panel-float: #FFFFFF;
  --fg-hover: #000000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--bone);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-x: clip;
}

::selection { background: rgba(var(--fg-rgb), 0.2); }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(var(--bg-rgb), 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
/* No gap: the mark and the word sit together, matching the landing header. */
.brand { display: flex; align-items: center; font-weight: 500; font-size: 15px; letter-spacing: 0.01em; }
.brand svg { width: 22px; height: 22px; }
.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: flex; gap: 2px; }
.lang-switch a, .lang-switch button {
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--gray-dim);
  background: none; border: none;
  padding: 6px 8px; border-radius: 7px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lang-switch a:hover, .lang-switch button:hover { color: var(--gray); }
.lang-switch a.on, .lang-switch button.on { color: var(--bone); background: var(--card-hover); }

/* ---------- The bar ---------- */
/* The sections of the site, between the mark and the languages. The editors
   are behind a disclosure because there will be more of them than fit on a
   line; `details` gives that a keyboard and a no-script state for free. */
.nav-inner { gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav-links > a, .nav-drop > summary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--gray);
  padding: 7px 10px; border-radius: 9px;
  cursor: pointer; list-style: none;
  transition: color 0.2s, background 0.2s;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-links > a:hover, .nav-drop > summary:hover { color: var(--bone); background: var(--card); }
.nav-links > a:focus-visible, .nav-drop > summary:focus-visible,
.nav-menu > summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.nav-drop { position: relative; }
.nav-drop[open] > summary { color: var(--bone); background: var(--card); }
/* The chevron, drawn from two borders so there is no icon to ship. */
.nav-drop > summary i {
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s;
}
.nav-drop[open] > summary i { transform: rotate(-135deg); margin-top: 1px; }
.drop-panel, .menu-panel {
  position: absolute; z-index: 60;
  min-width: 260px; padding: 8px;
  background: var(--panel-float);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(var(--fg-rgb), 0.06);
  animation: drop-in 0.18s ease-out both;
}
.drop-panel { top: calc(100% + 8px); left: 0; }
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.drop-panel a, .menu-panel a, .menu-panel .nav-drop > summary {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 11px; border-radius: 9px;
  font-size: 14px; color: var(--bone);
  transition: background 0.15s;
}
.drop-panel a span, .menu-panel a span { font-size: 12.5px; color: var(--gray); }
.drop-panel a:hover, .menu-panel a:hover { background: var(--card-hover); }
.drop-all, .menu-panel .drop-all {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px solid var(--line); border-radius: 0 0 9px 9px;
  color: var(--gray);
}

/* The same links on a narrow screen, behind one button. */
.nav-menu { position: relative; display: none; }
.nav-menu > summary {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  list-style: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
}
.nav-menu > summary::-webkit-details-marker { display: none; }
/* Three lines, drawn with a border and two shadows. */
.nav-menu > summary i {
  width: 15px; height: 1.5px; background: var(--bone);
  box-shadow: 0 -5px 0 var(--bone), 0 5px 0 var(--bone);
}
.nav-menu[open] > summary { background: var(--card-hover); }
.menu-panel { top: calc(100% + 10px); right: 0; }
.menu-panel .nav-drop { position: static; }
.menu-panel .nav-drop > summary { flex-direction: row; justify-content: space-between; color: var(--gray); }
.menu-panel .drop-panel {
  position: static; min-width: 0; padding: 4px 0 0;
  border: none; border-radius: 0; box-shadow: none; background: none;
  animation: none;
}
/* The languages, on a narrow screen: the bar has room for the mark, the button
   and the menu, and nothing else — so they move to a row at the foot of the
   menu, a third of the width each, where a thumb can find them. */
.menu-langs {
  display: flex; gap: 2px;
  margin-top: 6px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
.menu-panel .menu-langs a, .menu-langs button {
  flex: 1; display: block; text-align: center;
  padding: 8px 0; font-size: 12.5px;
  color: var(--gray);
}
/* Links on the document pages, buttons on the landing: one colour for both,
   or the same row reads brighter on one page than the next. */
.menu-panel .menu-langs a.on, .menu-langs button.on { color: var(--bone); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .nav-inner { gap: 10px; }
  .nav-right > .lang-switch { display: none; }
}
/* A link the language pass hides must stay hidden, whatever display the panel
   gives it. */
[hidden] { display: none !important; }

/* The section the reader is in. */
.nav-links > a.on, .nav-drop > summary.on { color: var(--bone); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  padding: 9px 18px; border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--bone);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--card-hover); transform: translateY(-1px); }
.btn.primary { background: var(--bone); color: var(--bg); border-color: transparent; }
.btn.primary:hover { background: var(--fg-hover); }

/* ---------- Document body ---------- */
/* main also carries .wrap, whose `padding: 0 28px` outranks a bare element
   selector — the top offset has to match that specificity or the heading
   slides under the fixed nav. */
main.wrap { padding-top: 130px; padding-bottom: 90px; }

.doc { max-width: 720px; }

.doc-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.doc h1 {
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 16px;
}

.doc .lede { font-size: 17px; color: var(--gray); margin-bottom: 10px; }

.doc-meta { font-size: 13px; color: var(--gray-dim); margin-bottom: 44px; }

.doc h2 {
  font-size: 21px; font-weight: 600; letter-spacing: -0.01em;
  margin: 44px 0 14px;
}
.doc h3 {
  font-size: 16px; font-weight: 600;
  margin: 26px 0 8px;
}

.doc p, .doc li { font-size: 15px; line-height: 1.7; color: var(--gray); }
.doc p { margin-bottom: 14px; }
.doc strong { color: var(--bone); font-weight: 600; }
.doc ul, .doc ol { margin: 0 0 16px 20px; }

/* An illustration is a paragraph that happens to be drawn, so it sits in the
   same column and keeps the same rhythm. The SVG is inline and coloured from
   the theme's own variables: one drawing, both themes, no second file to
   forget to update. */
.doc-fig { margin: 26px 0 28px; }
.doc-fig svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.doc-fig figcaption {
  font-size: 13px; line-height: 1.6; color: var(--gray-dim);
  margin-top: 10px; padding-left: 2px;
}
.doc li { margin-bottom: 8px; }
.doc a:not(.btn) { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.doc a:not(.btn):hover { color: var(--bone); }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: var(--card); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 5px;
  color: var(--bone);
}
/* A key, drawn as a keycap: the thicker bottom edge is what tells ⌥ from a
   stray symbol in the sentence. One cap per key, so ⌥T is two of them. */
.doc kbd {
  display: inline-block; min-width: 1.6em;
  font-family: inherit; font-size: 13px; line-height: 1.5; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-bottom-width: 2px;
  padding: 0 5px; border-radius: 6px; margin: 0 1px;
  color: var(--bone);
}
/* The download at the head of the setup page, with the line for everyone
   who already has the file. */
.doc .doc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 22px 0 40px; }
.doc .doc-cta span { font-size: 14px; color: var(--gray-dim); }

/* ---------- Films ---------- */
/* A feature shown rather than described: one film, or one frame with a row of
   tabs that swaps what plays in it. doc.js loads a film only once it is on
   screen and pauses it when it leaves, so a page of them costs one download
   at a time. */
.doc-video { margin: 6px 0 32px; }
.dv-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--media-bg);
  border: 1px solid var(--line); border-radius: 14px;
}
.dv-frame video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.dv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dv-tabs button {
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1.4;
  color: var(--gray); background: var(--card);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 12px; cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.dv-tabs button:hover { color: var(--bone); }
.dv-tabs button[aria-selected="true"] { color: var(--bone); background: var(--card-hover); border-color: rgba(var(--fg-rgb), 0.2); }
.dv-tabs button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* The timeline, laid over the foot of the film: a thin line that is always
   there, so the film reads as something that can be moved through, and on
   hover or while dragged a thicker one with a knob. The hit area is taller
   than the line — a 3px target is not one. `touch-action: none` lets a
   finger drag it sideways without the page scrolling instead. */
.dv-scrub {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end;
  height: 34px; padding: 0 16px 12px;
  cursor: pointer; touch-action: none;
}
.dv-scrub::before {
  content: ""; position: absolute; inset: -20px 0 0;
  background: linear-gradient(to top, var(--media-scrim), transparent);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.dv-frame:hover .dv-scrub::before, .dv-scrub.drag::before { opacity: 1; }
.dv-track {
  position: relative; flex: 1; height: 3px; border-radius: 3px;
  background: var(--media-track);
  transition: height 0.15s;
}
.dv-frame:hover .dv-track, .dv-scrub.drag .dv-track { height: 5px; }
.dv-fill {
  position: absolute; inset: 0; border-radius: inherit;
  background: var(--media-fg);
  transform-origin: left; transform: scaleX(var(--t, 0));
}
.dv-knob {
  position: absolute; top: 50%; left: calc(var(--t, 0) * 100%);
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: var(--media-fg);
  box-shadow: 0 1px 4px var(--media-scrim);
  transform: scale(0); transition: transform 0.15s;
}
.dv-frame:hover .dv-knob, .dv-scrub.drag .dv-knob, .dv-scrub:focus-visible .dv-knob { transform: scale(1); }
.dv-scrub:focus-visible { outline: none; }
.dv-scrub:focus-visible .dv-track { outline: 2px solid var(--amber); outline-offset: 4px; }
/* Sound, in the corner the timeline stops short of. The films start muted —
   a page that talks on its own is one people close — and this is the way in:
   the same round button the landing's film wears. */
.dv-frame.has-sound .dv-scrub { padding-right: 58px; }
.dv-sound {
  position: absolute; right: 12px; bottom: 5px; z-index: 1;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--media-line); border-radius: 50%;
  background: var(--media-scrim); color: var(--media-fg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  cursor: pointer; opacity: 0.8;
  transition: opacity 0.2s;
}
.dv-sound:hover, .dv-sound:focus-visible { opacity: 1; }
.dv-sound:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.dv-sound svg { width: 16px; height: 16px; }
.dv-sound .on, .dv-sound[aria-pressed="true"] .off { display: none; }
.dv-sound[aria-pressed="true"] .on { display: block; }

/* A finger has no hover: the knob stays, so there is something to hold. */
@media (hover: none) {
  .dv-track { height: 4px; }
  .dv-knob { transform: scale(1); }
}
.doc-video figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--gray-dim); }

/* ---------- How it works ---------- */
/* A page read in pictures rather than paragraphs. The doc column widens to the
   whole wrap, each feature gets a section with room around it, and the words
   are cut to a line under each heading — the films carry the rest. */
.doc.hw { max-width: none; }
.hw-intro { max-width: 640px; }
.doc .hw-intro .lede { font-size: 19px; line-height: 1.55; }
.hw-sec { margin-top: 128px; }
.doc .hw-h {
  font-size: clamp(26px, 3.4vw, 36px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.15;
  margin: 0 0 12px;
}
.doc .hw-sub { max-width: 560px; margin: 0 0 40px; font-size: 17px; line-height: 1.6; }
.doc .hw-note { margin: 18px 0 0; font-size: 13.5px; color: var(--gray-dim); }
.doc .hw-more { margin: 0; font-size: 15px; }
.doc .hw-more a { text-decoration: none; }
.doc .hw-more a:hover { text-decoration: underline; }

/* The switcher: a list of what the film can show, beside it. Each entry is a
   name and a line, the one playing is a card with its progress drawn along
   the bottom, and when a film ends the next one starts — so the list reads
   as something that moves, not as a row of tags. */
.hw-player {
  display: grid; grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px; align-items: start; margin: 0;
}
.doc .hw-list {
  position: relative; list-style: none;
  display: flex; flex-direction: column; gap: 4px;
  margin: 0; padding: 0;
}
.doc .hw-list li { margin: 0; padding: 0; }
.hw-item {
  position: relative; display: block; width: 100%;
  padding: 12px 14px; border-radius: 12px;
  font: inherit; text-align: left; cursor: pointer;
  background: none; border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.hw-item b { display: block; font-size: 15px; font-weight: 600; color: var(--gray); transition: color 0.2s; }
.hw-item span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--gray-dim); transition: color 0.2s; }
.hw-item:hover b { color: var(--bone); }
.hw-item:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.hw-item[aria-selected="true"] { background: var(--card-hover); border-color: var(--line); }
.hw-item[aria-selected="true"] b { color: var(--bone); }
.hw-item[aria-selected="true"] span { color: var(--gray); }
.hw-bar {
  position: absolute; left: 14px; right: 14px; bottom: 7px;
  height: 2px; border-radius: 2px;
  background: rgba(var(--fg-rgb), 0.08);
  opacity: 0; transition: opacity 0.2s;
}
.hw-bar::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--bone);
  transform-origin: left; transform: scaleX(var(--p, 0));
}
.hw-item[aria-selected="true"] .hw-bar { opacity: 1; }
/* Hidden, not removed: the timeline under the film says the same thing, and
   two bars moving in step was one too many. The markup and the --p the
   script sets stay, so it comes back with this one line. */
.hw-bar { display: none; }
/* Beside the film, only the entry playing says what it is: eight names and
   one line stand as tall as the film does, where eight names and eight lines
   hung far below it. */
@media (min-width: 901px) {
  .hw-item { padding: 9px 14px; }
  .hw-item span { display: none; }
  .hw-item[aria-selected="true"] { padding: 12px 14px; }
  .hw-item[aria-selected="true"] span { display: block; }
}

/* One film and a few words beside it; `.flip` puts the film first, so the
   sections alternate sides down the page. */
.hw-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 56px; align-items: center;
}
.hw-split.flip { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.hw-split.flip > .hw-text { order: 2; }
.hw-split .doc-video { margin: 0; }
.doc .hw-text p { font-size: 16px; line-height: 1.65; margin: 0 0 16px; }

.hw-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hw-card { padding: 28px 28px 26px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.doc .hw-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--bone); }
.doc .hw-card p { margin: 0; font-size: 14.5px; line-height: 1.6; }

.hw-end { margin-top: 128px; text-align: center; }
.doc .hw-end .hw-h { margin-bottom: 24px; }

@media (max-width: 900px) {
  .hw-sec, .hw-end { margin-top: 96px; }
  .hw-player { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hw-player .dv-frame { order: -1; }
  /* On a phone the list turns into a strip of cards under the film, scrolled
     sideways inside itself — the page never is. */
  .doc .hw-list {
    flex-direction: row; gap: 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -28px; padding: 2px 28px 4px;
  }
  .doc .hw-list::-webkit-scrollbar { display: none; }
  .doc .hw-list li { flex: none; scroll-snap-align: start; scroll-margin-left: 28px; }
  .hw-item { width: 196px; height: 100%; border-color: var(--line); }
  .hw-split, .hw-split.flip { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hw-split.flip > .hw-text { order: 0; }
  .hw-cards { grid-template-columns: 1fr; }
}

/* The setup page is read with the app open beside it, one step at a time:
   the steps get room between them, and the films room around them. */
.doc.setup h2 { margin-top: 76px; }
.doc.setup .doc-video { margin: 28px 0 44px; }

/* Callout for the beta notice and the "short version" summaries. */
.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 34px;
}
.note p:last-child { margin-bottom: 0; }
.note.amber { border-color: rgba(var(--orange-rgb), 0.28); }

/* ---------- Pricing ---------- */
/* Three plans, one row. Fixed column count rather than auto-fit: auto-fit
   strands the last card alone on a second row at in-between widths. */
.plans {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin: 0 0 20px;
}
@media (max-width: 720px) {
  .plans { grid-template-columns: 1fr; }
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex; flex-direction: column;
}
.plan.featured { border-color: rgba(var(--orange-rgb), 0.4); background: var(--card-hover); }
.plan-name { font-size: 13px; font-weight: 600; color: var(--gray); margin-bottom: 10px; }
.plan-badge {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber); background: rgba(var(--orange-rgb), 0.14);
  padding: 3px 8px; border-radius: 99px; margin-left: 8px;
  vertical-align: 2px;
}
.plan-price { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--bone); }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--gray-dim); letter-spacing: 0; }
/* What the lifetime licence costs without the launch discount. Struck through
   and a size down in the muted grey, so the eye lands on the number actually
   charged; paddle.js removes it in any currency where Paddle reports the two
   amounts as equal, rather than showing a saving that isn't one. */
.plan-price s {
  font-size: 20px; font-weight: 500; color: var(--gray-dim);
  margin-right: 8px; text-decoration-thickness: 1px;
}
/* The grid stretches the cards to a common height, so a button placed straight
   after the feature list lands wherever that list happens to end — three
   buttons at three different heights. Pushing each one down with `auto` lines
   them up along the bottom instead. The gap above is attached to the list and
   only applies when a visible button follows, so the beta layout, where the
   buttons are hidden, keeps its original spacing. */
.plan { display: flex; flex-direction: column; }
.plan ul:has(+ .plan-cta:not([hidden])) { margin-bottom: 18px; }
.plan-cta { display: block; width: 100%; margin-top: auto; text-align: center; }
.plan-cta[hidden] { display: none; }
.plan-sub { font-size: 13px; color: var(--gray-dim); margin-top: 6px; }

/* Stands where the buy button will once Paddle has answered. A disabled
   button would say the same thing worse: greyed out or not, it still looks like
   an invitation, and the only thing it can do is refuse. This is a sentence,
   and since 1.0 a true one whatever happens next — the trial comes first — so
   a page whose Paddle script was blocked is left saying something right, and
   one where it loads swaps a line for a button of about the same height. */
/* `.doc` in front because `.doc p` outranks a bare class: without it this
   line was set in body text, twice the height of the button it stands in for,
   and the cards shrank under the reader when the buttons arrived. */
.doc .plan-when {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
  color: var(--gray-dim);
}
.doc .plan-when strong { display: block; color: var(--gray); font-weight: 600; }
.plan-when[hidden] { display: none; }
.plan ul { list-style: none; margin: 16px 0 0; }
.plan li { font-size: 13.5px; line-height: 1.55; color: var(--gray); margin-bottom: 7px; padding-left: 18px; position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gray-dim);
}

/* ---------- FAQ ---------- */
/* Native <details>: keyboard and find-in-page work without a line of script. */
.faq {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 15px 0;
  font-size: 15px; font-weight: 600; color: var(--bone);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--amber); }
/* Chevron drawn in CSS so it inherits the text colour and needs no asset. */
.faq summary::after {
  content: ""; flex: none; order: 2; margin-left: auto;
  width: 7px; height: 7px; margin-top: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.45;
  transform: rotate(45deg);
  transition: transform 0.2s ease, opacity 0.2s;
}
.faq[open] summary::after { transform: rotate(-135deg); margin-top: 9px; opacity: 0.8; }
.faq[open] summary { color: var(--bone); }
.faq > p { margin: 0 0 18px; padding-right: 28px; }
.faq summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.price-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14.5px; }
.price-table th, .price-table td {
  text-align: left; padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--gray);
}
.price-table th { color: var(--bone); font-weight: 600; font-size: 13px; }
.price-table td:first-child { color: var(--bone); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 30px 0; }
.foot-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--gray-dim);
}
.foot-brand { display: flex; align-items: center; gap: 8px; }
.foot-brand svg { width: 16px; height: 16px; opacity: 0.5; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a { transition: color 0.2s; }
.foot-links a:hover { color: var(--bone); }

@media (max-width: 560px) {
  main.wrap { padding-top: 110px; padding-bottom: 70px; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---------- Licence key on /welcome ---------- */
/* Shown the moment we know a key is coming, waiting in place with a skeleton
   where the key will be. The frame used to stay hidden until the webhook
   answered, which meant the first seconds after paying looked like a page that
   had forgotten to mention a key at all — and that is exactly the moment
   someone closes the tab. */
.key-box {
  border: 1px solid rgba(var(--orange-rgb), 0.4);
  background: var(--card-hover);
  border-radius: 16px; padding: 20px; margin: 0 0 24px;
}
.key-box[hidden], .key-box [hidden] { display: none; }
.key-box-title { font-size: 13px; font-weight: 600; color: var(--gray); margin-bottom: 12px; }
.key-box-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.key-box code {
  font-size: 19px; letter-spacing: 0.06em; color: var(--bone);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  user-select: all;               /* one click selects the whole key */
}
.key-box-hint { font-size: 13px; color: var(--gray-dim); margin: 12px 0 0; }

/* The same height as the key it stands in for, so nothing jumps when the real
   one arrives. */
.key-skeleton {
  height: 28px; max-width: 340px; border-radius: 8px;
  background: linear-gradient(90deg,
    rgba(var(--fg-rgb), 0.05) 0%,
    rgba(var(--fg-rgb), 0.12) 50%,
    rgba(var(--fg-rgb), 0.05) 100%);
  background-size: 220% 100%;
  animation: key-shimmer 1.6s ease-in-out infinite;
}
@keyframes key-shimmer {
  from { background-position: 120% 0; }
  to   { background-position: -120% 0; }
}
.key-box-ready { animation: key-arrive 0.35s ease-out both; }
@keyframes key-arrive {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .key-skeleton { animation: none; }
  .key-box-ready { animation: none; }
}
