/* Paste Train website. Same world as the side panel: the NOW SERVING sign over numbered paper tickets. */

@font-face {
  font-family: "Big Shoulders Display";
  font-weight: 800;
  font-display: swap;
  src: url("fonts/big-shoulders-display-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-weight: 800;
  font-display: swap;
  src: url("fonts/big-shoulders-display-800-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Franklin";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/libre-franklin-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/libre-franklin-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --ground: #f3efe6;
  --paper: #fffaf0;
  --field: #ffffff;
  --ink: #1d1b18;
  --muted: #6d665b;
  --line: #e2dccf;
  --line-strong: #cfc6b4;
  --red: #d42d2a;
  --red-text: #b82522;
  --stub: #d42d2a; /* ticket numbers */
  --sign: #1d1b18;
  --sign-deep: #0e0d0b;
  --sign-raised: #2a2621;
  --sign-line: #4a433a;
  --sign-text: #f6efe2;
  --sign-muted: #b9b0a1;
  --glow: #ff5a36;
  --on-red: #fffaf0;
  --on-red-soft: #fffaf0; /* paper white: anything dimmer drops under 4.5:1 on the red */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Libre Franklin", system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #171513;
    --paper: #221f1b;
    --field: #2a2621;
    --ink: #f3ece0;
    --muted: #a59c8e;
    --line: #36312a;
    --line-strong: #4a433a;
    --red: #c42b28;
    --red-text: #ff7a66;
    --stub: #ff5a36;
    --sign: #0e0d0b;
    --sign-deep: #080706;
    --sign-raised: #221f1b;
    --sign-line: #3a352e;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scrollbar-color: var(--line-strong) var(--ground); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sign); color: var(--glow); }

a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--sign);
  color: var(--sign-text);
}
.skip:focus { top: 12px; }

/* ---------- The first screen ---------- */

.hero {
  --train-h: clamp(96px, 21svh, 220px);
  --train-w: calc(var(--train-h) * 12.357); /* the drawing is 1730 × 140 */
  --peek: 0.37; /* how much of the train has pulled in at the top */
  --start: calc(100vw - var(--train-w) * var(--peek));
  --end: calc(-1 * var(--train-w) - 4vw);
  --rail-bottom: clamp(28px, 8svh, 76px);
  position: relative;
  background: var(--red);
  color: var(--on-red);
}

.stage {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.hero :focus-visible { outline-color: var(--on-red); }

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
  padding: 0 var(--pad);
}
.wordmark {
  margin-right: auto;
  font: 800 28px/1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav { display: flex; gap: 26px; }
.nav a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline 2px transparent;
  transition: text-decoration-color 160ms ease;
}
.nav a:hover { text-decoration-color: currentColor; }

.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--sign);
  color: var(--sign-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.pill-button:hover { background: #000000; }
.pill-button:active { transform: scale(0.97); }
.pill-button.big { height: 56px; padding: 0 26px; font-size: 17px; }
.free {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--sign-raised);
  color: var(--glow);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: clamp(104px, 17svh, 168px);
  z-index: 2;
}

.slogan {
  margin: 0;
  font: 800 clamp(58px, 8.6vw, 152px)/0.88 var(--display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.rise, .lift, .enter { display: block; }

.intro { margin-top: clamp(20px, 3.4svh, 36px); max-width: 560px; }
.lead { margin: 0; color: var(--on-red-soft); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 26px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.message-2 { visibility: hidden; }

/* The big number behind the train */
.counter {
  position: absolute;
  right: calc(var(--pad) - 0.04em);
  bottom: calc(var(--rail-bottom) + var(--train-h) * 0.35);
  z-index: 0;
  height: 0.86em;
  overflow: hidden;
  color: rgba(29, 27, 24, 0.13);
  font: 800 clamp(220px, 52svh, 560px)/0.86 var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.counter-strip span { display: block; height: 0.86em; }
.counter-strip { transform: translateY(-0.86em); }
.message-2 .lead { max-width: 520px; margin-top: 24px; }

/* The rail the train runs on, with its sleepers */
.rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--rail-bottom) - 12px);
  height: 16px;
  background:
    linear-gradient(var(--sign), var(--sign)) top / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, rgba(29, 27, 24, 0.34) 0 10px, transparent 10px 34px) 0 4px / 100% 12px no-repeat;
}

.train-run {
  position: absolute;
  left: 0;
  bottom: var(--rail-bottom);
  width: var(--train-w);
  height: calc(var(--train-h) * 132 / 140); /* the wheels sit on the rail */
  transform: translateX(var(--start));
  will-change: transform;
}
.train { display: block; width: var(--train-w); height: var(--train-h); overflow: visible; }

/* The drawing's materials */
.e-body { fill: var(--sign); }
.e-seam { fill: var(--sign-deep); }
.e-window { fill: var(--sign-raised); stroke: var(--sign-line); stroke-width: 1.5; }
.e-sign { fill: var(--sign-deep); stroke: var(--sign-line); stroke-width: 1.5; }
.e-label { fill: var(--sign-muted); font: 700 10px var(--body); letter-spacing: 0.08em; }
.e-item { fill: var(--sign-text); font: 600 14px var(--body); }
.e-number { fill: var(--glow); font: 800 40px var(--display); font-variant-numeric: tabular-nums; }
.e-stripe { fill: #d42d2a; }
.e-lamp { fill: var(--glow); }
.w-tyre { fill: var(--sign-raised); stroke: var(--sign); stroke-width: 3; }
.w-weight { fill: var(--sign-line); }
.w-hub { fill: var(--sign-muted); }
.t-paper { fill: var(--paper); stroke: var(--line-strong); stroke-width: 1.5; }
.t-tear { stroke: var(--line-strong); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0 6; }
.t-number { fill: var(--stub); font: 800 40px var(--display); font-variant-numeric: tabular-nums; }
.t-label { fill: var(--muted); font: 700 10px var(--body); letter-spacing: 0.08em; }
.t-value { fill: var(--ink); font: 600 17px var(--body); }
.spin-run, .spin-arrive { transform-box: fill-box; transform-origin: center; }

/* ---------- After the first screen ---------- */

/* What only shows once we know whether Paste Train is installed */
body[data-installed="yes"] .when-missing { display: none !important; }
body:not([data-installed="yes"]) .when-installed { display: none !important; }

kbd {
  display: inline-block;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.88em/1.6 var(--body);
  white-space: nowrap;
}

.section {
  padding: clamp(88px, 11vw, 168px) max(var(--pad), calc((100vw - 1240px) / 2));
}
.section + .section { padding-top: 0; }
.section-title {
  margin: 0;
  font: 800 clamp(52px, 7vw, 104px)/0.9 var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}
.section-lead { max-width: 60ch; margin: 22px 0 0; color: var(--muted); font-size: 19px; text-wrap: pretty; }
h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }

/* How it works: a line of tickets, each torn along its dotted line */
.ticket-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.ticket {
  --stub-w: 76px;
  display: grid;
  grid-template-columns: var(--stub-w) 1fr;
  min-height: 220px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  -webkit-mask: radial-gradient(circle 8px at var(--stub-w) 0, transparent 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at var(--stub-w) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 8px at var(--stub-w) 0, transparent 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at var(--stub-w) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
}
.ticket-number {
  padding-top: 22px;
  color: var(--stub);
  font: 800 46px/1 var(--display);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.ticket-body { padding: 24px 26px 26px; border-left: 2.5px dotted var(--line-strong); }
.ticket-body p { margin: 10px 0 0; color: var(--muted); }
.ticket-body kbd { color: var(--ink); }

.same-keys {
  margin-top: 28px;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3.4vw, 44px);
  border-radius: 12px;
  background: var(--sign);
  box-shadow: 0 6px 18px rgba(29, 27, 24, 0.22);
  color: var(--sign-text);
}
.same-keys h3 { font-size: clamp(21px, 2vw, 26px); }
.same-keys p { max-width: 72ch; margin: 12px 0 0; color: var(--sign-muted); }
.same-keys kbd { border: 0; background: var(--sign-raised); color: #ffffff; }

/* The practice areas */
.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
  margin-top: 44px;
}
.practice {
  padding: clamp(22px, 2.6vw, 32px);
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
}
.practice-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.pro-label, .pro-tag {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--sign);
  color: var(--glow);
  font: 700 11px/22px var(--body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.steps { margin: 18px 0 0; padding-left: 1.6em; }
.steps li::marker { color: var(--red-text); font: 800 20px var(--display); }
.steps li { padding-left: 4px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip {
  padding: 6px 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--ground);
  font-weight: 600;
}

.practice-form { display: grid; gap: 12px; margin-top: 14px; }
.practice-form label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
input[type="text"], input[type="email"] {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: 16px var(--body);
}
input:focus { border-color: var(--ink); outline: none; }
input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.sheet {
  width: 100%;
  margin-top: 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  border-spacing: 0;
  background: var(--field);
  font-size: 15px;
  table-layout: fixed;
}
.sheet th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--ground);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.sheet th:first-child { border-top-left-radius: 7px; }
.sheet th:last-child { border-top-right-radius: 7px; }
.sheet td { padding: 10px; border-top: 1px solid var(--line); overflow-wrap: break-word; }
.sheet tr:first-child td { border-top: 0; }
.sheet td + td, .sheet th + th { border-left: 1px solid var(--line); }
.sheet th:nth-child(2) { width: 42%; } /* the emails get the room */
#target-table td { padding: 3px; }
#target-table input { height: 38px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; font-size: 15px; }
#target-table input:focus { outline: 2px solid var(--red-text); outline-offset: -2px; }

.done { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-weight: 700; }
.done[hidden] { display: none; }
.done svg { color: var(--red-text); }

/* Every shortcut, on the sign */
.shortcuts-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.board {
  padding: clamp(26px, 3.4vw, 44px);
  border-radius: 12px;
  background: var(--sign);
  box-shadow: 0 6px 18px rgba(29, 27, 24, 0.22);
  color: var(--sign-text);
}
.board-title { margin: 0 0 18px; font: 800 clamp(44px, 5vw, 72px)/0.9 var(--display); text-transform: uppercase; }
.board-rows { margin: 0; }
.board-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border-top: 1px solid var(--sign-line);
}
.board-rows dt { font-size: 18px; font-weight: 600; }
.board-rows dd { margin: 0; }
.board kbd { padding: 2px 10px; border: 0; background: var(--sign-raised); color: var(--glow); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.board .pro-tag { margin-left: 6px; background: var(--sign-raised); vertical-align: 2px; }
.board-note { margin: 18px 0 0; color: var(--sign-muted); }
.board-link {
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.board-link:hover { color: var(--glow); }
.board :focus-visible { outline-color: #ffffff; }

.more { margin: 0; padding: 0; list-style: none; }
.more li { padding: 22px 0; border-top: 1px solid var(--line-strong); }
.more li:last-child { border-bottom: 1px solid var(--line-strong); }
.more p { margin: 8px 0 0; color: var(--muted); }

/* Free, or Pro */
.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 44px;
}
.plan { display: flex; flex-direction: column; padding: clamp(26px, 3.4vw, 44px); border-radius: 12px; }
.plan-free .plan-actions { margin-top: auto; padding-top: 30px; }
.plan-have { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.plan-have svg { color: var(--red-text); }
.plan h3 { font: 800 clamp(40px, 4vw, 56px)/0.9 var(--display); text-transform: uppercase; }
.plan-free { border: 1.5px solid var(--line-strong); background: var(--paper); }
.plan-pro { background: var(--sign); box-shadow: 0 6px 18px rgba(29, 27, 24, 0.22); color: var(--sign-text); }
.price { margin: 22px 0 0; }
.amount { font: 800 64px/1 var(--display); font-variant-numeric: tabular-nums; }
.price-choice { display: grid; gap: 10px; margin-top: 22px; }
.price-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1.5px solid var(--sign-line);
  border-radius: 10px;
  color: var(--sign-muted);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.price-option:has(input:checked) { border-color: var(--sign-text); background: var(--sign-raised); color: var(--sign-text); }
.price-option input {
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid var(--sign-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.price-option input::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glow);
  transform: scale(0);
  transition: transform 160ms var(--ease-out);
}
.price-option input:checked { border-color: var(--glow); }
.price-option input:checked::before { transform: scale(1); }
.price-option input:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.price-option .amount { color: var(--sign-text); font-size: 40px; vertical-align: -3px; }
.price-option:has(input:checked) .amount { color: var(--glow); }
.save {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.features { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.features li { position: relative; padding-left: 30px; }
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 18px;
  background: var(--red-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan-free .features li { color: var(--ink); }
.plan-pro .features li { color: var(--sign-muted); }
.plan-pro .features strong { color: var(--sign-text); }
.plan-pro .features li::before { background: var(--glow); }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }
.plan-actions:not(:has(> :not([hidden]))) { display: none; } /* every button hidden for now */
.pill-button.red { background: var(--red); color: #ffffff; }
.pill-button.red:hover { background: #b82522; }
.plan-pro :focus-visible { outline-color: #ffffff; }
.text-link.on-sign { color: var(--sign-text); }
.fine { margin: 18px 0 0; color: var(--sign-muted); font-size: 14px; }
.pro-soon { margin-top: 30px; color: var(--sign-text); font-size: 17px; font-weight: 600; }

/* Privacy */
.privacy-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(28px, 5vw, 72px); margin: 32px 0 24px; }
.privacy-columns p { max-width: 62ch; margin: 0; font-size: 19px; }
.privacy .text-link { color: var(--red-text); }

/* The close, back on the red */
.close {
  position: relative;
  padding: clamp(96px, 12vw, 180px) var(--pad) 32px;
  background: var(--red);
  color: var(--on-red);
}
.close :focus-visible { outline-color: var(--on-red); }
.close-title { margin: 0; font: 800 clamp(88px, 15vw, 240px)/0.85 var(--display); text-transform: uppercase; }
.close-text { max-width: 40ch; margin: 24px 0 30px; font-size: 20px; }
.close kbd { border: 0; background: var(--sign); color: var(--sign-text); }
/* The engine waits at the platform, on the same rail as at the top */
.close-scene {
  position: relative;
  height: clamp(120px, 15vw, 210px);
  margin: clamp(40px, 6vw, 80px) calc(-1 * var(--pad)) 0;
  background:
    linear-gradient(var(--sign), var(--sign)) left bottom 12px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, rgba(29, 27, 24, 0.34) 0 10px, transparent 10px 34px) left bottom / 100% 12px no-repeat;
}
.close-train {
  position: absolute;
  right: var(--pad);
  bottom: 16px;
  height: calc(100% - 16px);
  width: auto;
  overflow: visible;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 28px;
  font-size: 15px;
}
.footer span { margin-right: auto; font: 800 22px/1 var(--display); text-transform: uppercase; }

@media (prefers-color-scheme: dark) {
  .same-keys, .board, .plan-pro { box-shadow: inset 0 0 0 1px var(--sign-line); }
}

/* ---------- The other pages: the trial, the privacy policy and the terms ---------- */

.page-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 76px;
  padding: 0 var(--pad);
  background: var(--red);
  color: var(--on-red);
}
.page-bar :focus-visible, .page-foot :focus-visible { outline-color: var(--on-red); }
.subpage { width: min(100% - 2 * var(--pad), 1000px); margin: 0 auto; padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
.subpage-title { margin: 0; font: 800 clamp(56px, 8vw, 112px)/0.9 var(--display); text-transform: uppercase; }
.subpage-heading { margin: clamp(48px, 6vw, 72px) 0 0; font: 800 clamp(36px, 4vw, 52px)/0.95 var(--display); text-transform: uppercase; }
.subpage-heading + .ticket-line { margin-top: 24px; }
.subpage-note { max-width: 64ch; margin: 28px 0 0; color: var(--muted); }
.subpage a:not(.pill-button) { color: var(--red-text); }
.page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  padding: 24px var(--pad);
  background: var(--red);
  color: var(--on-red);
  font-size: 15px;
}
.page-foot span { margin-right: auto; font: 800 22px/1 var(--display); text-transform: uppercase; }

/* The trial, on the sign: its number is the days left */
.trial-sign {
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: 12px;
  background: var(--sign);
  box-shadow: 0 6px 18px rgba(29, 27, 24, 0.22);
  color: var(--sign-text);
}
.trial-sign-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.trial-sign-label { padding-top: 10px; color: var(--sign-muted); font-size: 14px; font-weight: 600; }
.trial-days {
  color: var(--glow);
  font: 800 clamp(88px, 12vw, 140px)/0.8 var(--display);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 90, 54, 0.45);
}
.trial-sign h1 { max-width: 22ch; margin: 18px 0 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
#status { max-width: 56ch; margin: 14px 0 0; color: var(--sign-muted); font-size: 18px; }
#status strong { color: var(--sign-text); }

/* The privacy policy: for reading */
.policy { width: min(100% - 2 * var(--pad), 760px); }
.policy .date { margin: 18px 0 32px; color: var(--muted); }
.policy .summary {
  margin: 0;
  padding: 22px 26px;
  border-radius: 12px;
  background: var(--sign);
  box-shadow: 0 6px 18px rgba(29, 27, 24, 0.22);
  color: var(--sign-muted);
  font-size: 18px;
}
.policy .summary strong { color: var(--sign-text); }
.policy h2 { margin: 52px 0 10px; font-size: 23px; line-height: 1.25; letter-spacing: -0.01em; }
.policy p, .policy li { max-width: 68ch; font-size: 18px; line-height: 1.65; }
.policy ul { padding-left: 1.2em; }
.policy li { margin: 6px 0; }
.policy li::marker { color: var(--red-text); }

@media (prefers-color-scheme: dark) {
  .trial-sign, .policy .summary { box-shadow: inset 0 0 0 1px var(--sign-line); }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Arriving: the slogan rises out of its line, the train pulls in, the sign lights up */
  .rise { animation: rise 900ms var(--ease-out) calc(160ms + var(--i, 0) * 110ms) both; }
  .intro { animation: fade-up 600ms var(--ease-out) 560ms both; }
  .topbar { animation: fade 500ms ease 100ms both; }
  .train-arrive { animation: arrive 1700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .spin-arrive { animation: spin-arrive 1700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .spin-arrive.small { animation-name: spin-arrive-small; }
  .e-number, .e-lamp { animation: light-up 520ms linear 1250ms both; }
  .counter-load { animation: roll-in 700ms var(--ease-out) 1250ms both; }

  @keyframes rise { from { transform: translateY(104%); } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
  @keyframes roll-in { from { transform: translateY(0.86em); } }
  @keyframes arrive { from { transform: translateX(60vw); } }
  @keyframes spin-arrive { from { transform: rotate(3000deg); } }
  @keyframes spin-arrive-small { from { transform: rotate(3500deg); } }
  @keyframes light-up {
    0% { opacity: 0.15; }
    25% { opacity: 1; }
    40% { opacity: 0.3; }
    60%, 100% { opacity: 1; }
  }

  html { scroll-behavior: smooth; }

  /* How it works: the tickets come out of the dispenser one by one (site.js starts it) */
  .ticket { transition: opacity 500ms ease, transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
  .ticket-line.waiting .ticket { opacity: 0; transform: translateX(56px); }

  /* Scrolling (train.js drives it): the train crosses, the slogan lifts away, the second line takes over */
  .scene .hero { height: 210svh; }
  .scene .stage { position: sticky; top: 0; }
}

/* ---------- Small screens ---------- */

@media (max-width: 980px) {
  .ticket-line, .practice-grid, .shortcuts-section, .plans, .privacy-columns { grid-template-columns: minmax(0, 1fr); }
  .ticket { min-height: 0; }
}

@media (max-width: 480px) {
  .sheet { font-size: 14px; }
  .sheet td, .sheet th { padding: 8px 7px; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .topbar { height: 64px; gap: 12px; }
  .wordmark { font-size: 24px; }
  .pill-button { height: 38px; padding: 0 16px; font-size: 14px; }
  .pill-button.big { height: 52px; }
  .hero { --train-h: clamp(92px, 15svh, 140px); --start: 14vw; }
  .counter { font-size: clamp(140px, 22svh, 220px); }
  .message { top: 92px; }
  .slogan { font-size: clamp(46px, 14.5vw, 76px); }
}

@media (max-height: 640px) and (min-width: 761px) {
  .slogan { font-size: clamp(52px, 7vw, 110px); }
  .intro { margin-top: 16px; }
  .lead { font-size: 15px; }
}
