/* Kit Override — the site wears the app's look (decision 40): a light grey
   slab, a black display for what informs, keys for what acts, one colour per
   meaning. Colours and corners come from KitOverride/Theme/Theme.swift.
   No Teenage Engineering mark anywhere (invariant 15). Light only, like the app. */

/* The WOFF2 files are the TTFs cut to Latin (pyftsubset): 69 KB for both,
   where the TTFs weigh 750 KB. The TTFs stay as the fallback. */
@font-face {
  font-family: "Anton";
  src: url("../fonts/Anton-Regular.woff2") format("woff2"),
       url("../fonts/Anton-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/InterTight-Variable.woff2") format("woff2"),
       url("../fonts/InterTight-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Surfaces */
  --slab: #d3d5d4;
  --ink: #121314;
  --ink-soft: #3e4244;
  --rule: rgba(18, 19, 20, 0.14);
  --display: #0a0a0a;
  --display-text: #f4f4f0;
  --display-dim: #a7abad;

  /* Pads and keys */
  --pad: #2a2b2c;
  --pad-text: #f4f4f0;
  --pad-soft: #d6d8d7;
  --shade: #7e8487;
  --key: #262728;
  --key-light: #eeeeea;
  --key-light-text: #3e4244;
  --key-light-shade: #9da2a4;

  /* One colour, one meaning */
  --accent: #ff5a1f;
  --accent-shade: #9a3a1c;
  --live: #4cd07d;
  --tone-a: #ff5a1f;
  --shade-a: #9a3a1c;
  --tone-b: #ffc21a;
  --shade-b: #9a7410;
  --tone-c: #2ec5f0;
  --shade-c: #17708c;
  --tone-d: #ff4f9a;
  --shade-d: #9a2e5c;

  --corner: 8px;
  --gutter: 16px;
  --section: clamp(72px, 9vw, 128px);
  --ui: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --title: "Anton", "Inter Tight", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 700px) {
  :root { --gutter: 32px; }
}

@media (min-width: 1100px) {
  :root { --gutter: 48px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--shade) var(--slab);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--slab);
  color: var(--ink);
  font: 400 17px/1.55 var(--ui);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--display);
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 120ms ease-out;
}

/* Hover thickens the line and keeps the ink: it reads on the slab and on the display. */
a:hover {
  text-decoration-thickness: 4px;
}

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

.display :focus-visible {
  outline-color: var(--accent);
}

p,
ul,
ol,
dl {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--display);
  color: var(--display-text);
  border-radius: var(--corner);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.page {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Privacy and Support: one reading column, the display as wide as the text. */
.page--doc {
  max-width: calc(680px + 2 * var(--gutter));
}

.nb {
  white-space: nowrap;
}

/* ---------- The black display ---------- */

.display {
  background: var(--display);
  color: var(--display-text);
  border: 3px solid #000;
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 12px 16px 16px;
}

.display-top {
  margin-top: 16px;
}

.wordmark {
  font: 400 clamp(3.4rem, 16vw, 6rem)/0.92 var(--title);
  letter-spacing: 0.01em;
  color: var(--accent);
  text-transform: uppercase;
}

.wordmark a {
  color: inherit;
  text-decoration: none;
}

/* The home page's title is the name and what the app is, in one heading. */
.masthead .wordmark,
.masthead .tagline {
  display: block;
}

.tagline {
  margin-top: 10px;
  font: 600 16px/1.3 var(--ui);
  letter-spacing: 0;
  text-transform: none;
  color: var(--display-text);
}

.display-sub {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--display-dim);
}

.tagline + .display-sub,
.masthead + .display-sub {
  margin-top: 3px;
}

/* The name on the left, the way in on the right. Not on a phone: the intro's
   key is one screen down, and Safari puts its App Store banner above the page. */
.display-head .key {
  display: none;
  min-height: 52px;
  padding: 0 22px;
  font-size: 13px;
}

@media (min-width: 760px) {
  .display-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
  }

  .display-head .key {
    display: inline-flex;
  }
}

.display-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  margin-top: 10px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--display-dim);
}

.display-status strong {
  font-weight: 700;
  color: var(--accent);
}

.grid-banner {
  display: block;
  width: 100%;
  height: 64px;
  margin-top: 14px;
}

@media (min-width: 700px) {
  .display { padding: 14px 22px 20px; }
  .grid-banner { height: 104px; margin-top: 20px; }
  .display-sub { font-size: 14px; }
  .tagline { font-size: 19px; }
}

/* ---------- The bar ---------- */

/* A small display that follows the page once the first App Store key has
   scrolled away (home.js). Without the script it never shows. */
.bar {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: max(var(--gutter), calc(50% - 560px));
  right: max(var(--gutter), calc(50% - 560px));
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px 24px;
  padding: 7px 8px 10px 16px;
  box-shadow: 0 0 0 1px rgba(244, 244, 240, 0.16), 0 14px 32px -8px rgba(0, 0, 0, 0.45);
  transform: translateY(calc(-100% - 24px));
  visibility: hidden;
  transition: transform 260ms var(--ease-out), visibility 0s 260ms;
}

.bar.is-on {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}

.bar-mark {
  font: 400 22px/1 var(--title);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}

.bar nav {
  display: none;
  gap: 22px;
  margin-left: auto;
}

.bar nav a {
  padding: 8px 0;
  font: 700 12px/1 var(--ui);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration-color: transparent;
  color: var(--display-dim);
  transition: color 120ms ease-out, text-decoration-color 120ms ease-out;
}

.bar nav a:hover {
  color: var(--display-text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.bar .key {
  min-height: 38px;
  margin-left: auto;
  padding: 0 14px;
  gap: 0.4em;
}

.bar .key span {
  display: none;
}

@media (min-width: 420px) {
  .bar .key span { display: inline; }
}

@media (min-width: 900px) {
  .bar nav { display: flex; }
  .bar .key { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bar { transition: none; }
}

/* What the bar's links land on stays clear of the bar. */
[id] {
  scroll-margin-top: 88px;
}

/* ---------- Keys ---------- */

.key {
  --face: var(--key);
  --face-ink: var(--display-text);
  --face-shade: var(--shade);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--corner);
  background: var(--face);
  color: var(--face-ink);
  box-shadow: 0 3px 0 var(--face-shade);
  font: 700 12px/1 var(--ui);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 60ms ease-out, box-shadow 60ms ease-out, background-color 120ms ease-out;
  -webkit-tap-highlight-color: transparent;
}

.key:hover {
  color: var(--face-ink);
}

/* Under a pointer a key gives a little, before it is pressed. */
@media (hover: hover) {
  .key:hover {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--face-shade);
  }
}

.key:active,
.key[aria-pressed="true"] {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--face-shade);
}

.key:disabled {
  opacity: 0.4;
  cursor: default;
}

.key:disabled:hover,
.key:disabled:active {
  transform: none;
  box-shadow: 0 3px 0 var(--face-shade);
}

.key--light {
  --face: var(--key-light);
  --face-ink: var(--key-light-text);
  --face-shade: var(--key-light-shade);
}

.key--prominent {
  --face: var(--tone, var(--accent));
  --face-ink: var(--display);
  --face-shade: var(--tone-shade, var(--accent-shade));
}

/* LOCK, MUTATE, TWEAK: light with the light off; lit, charcoal and latched. */
.key--tool {
  --face: var(--key-light);
  --face-ink: var(--key-light-text);
  --face-shade: var(--key-light-shade);
}

.key--tool[aria-pressed="true"],
.key--tool.is-lit {
  --face: var(--key);
  --face-ink: var(--display-text);
}

.light {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(157, 162, 164, 0.6);
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}

[aria-pressed="true"] > .light,
.is-lit > .light {
  background: var(--tone, var(--accent));
  box-shadow: 0 0 2px var(--tone, var(--accent)), 0 0 7px var(--tone, var(--accent));
}

/* Keys as names in running text: what the app's keys are called. */
kbd {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: var(--corner);
  background: var(--key);
  color: var(--display-text);
  box-shadow: 0 3px 0 var(--shade);
  font: 700 11px/1 var(--ui);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* A lit tool key is latched, as in the app: sunk, no shade. */
kbd.is-lit {
  box-shadow: none;
  transform: translateY(3px);
}

kbd.kbd--prominent {
  background: var(--accent);
  color: var(--display);
  box-shadow: 0 3px 0 var(--accent-shade);
}

kbd.kbd--light {
  background: var(--key-light);
  color: var(--key-light-text);
  box-shadow: 0 3px 0 var(--key-light-shade);
}

kbd.kbd--pad {
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 44px;
  height: 40px;
  padding: 5px 6px;
  background: var(--pad);
  font-size: 14px;
  letter-spacing: 0;
}

kbd.kbd--pad::after {
  content: "";
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Home: intro and the pads ---------- */

.intro {
  display: grid;
  gap: 40px;
  margin-top: 28px;
}

@media (min-width: 900px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
    gap: 64px;
    margin-top: 48px;
    align-items: center;
  }
}

.lede {
  max-width: 24ch;
  font-size: clamp(1.6rem, 1.15rem + 2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.lede-body {
  max-width: 44ch;
  margin-top: 18px;
  font-size: 18px;
  color: var(--ink);
}

.lede-body + .lede-body {
  margin-top: 12px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}

.cta-note {
  font-size: 15px;
  color: var(--ink-soft);
}

.cta-note a {
  font-weight: 700;
  color: var(--ink);
}

.rig {
  --tone: var(--tone-a);
  --tone-shade: var(--shade-a);
}

.rig[data-group="1"] { --tone: var(--tone-b); --tone-shade: var(--shade-b); }
.rig[data-group="2"] { --tone: var(--tone-c); --tone-shade: var(--shade-c); }
.rig[data-group="3"] { --tone: var(--tone-d); --tone-shade: var(--shade-d); }

.rig-hint {
  min-height: 1.4em;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.rig-board {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
}

.groups,
.pads {
  display: grid;
  grid-template-rows: repeat(4, minmax(80px, 1fr));
  gap: 8px;
}

.pads {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 900px) {
  .groups,
  .pads { grid-template-rows: repeat(4, minmax(96px, 1fr)); }
}

.group-key {
  --face: var(--key-light);
  --face-ink: var(--key-light-text);
  --face-shade: var(--key-light-shade);
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: var(--corner);
  background: var(--face);
  color: var(--face-ink);
  box-shadow: 0 3px 0 var(--face-shade);
  font: 800 20px/1 var(--ui);
  cursor: pointer;
  transition: transform 60ms ease-out, box-shadow 60ms ease-out;
  -webkit-tap-highlight-color: transparent;
}

.group-key::after {
  content: "";
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--own);
}

.group-key small {
  position: absolute;
  bottom: 7px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.group-key:has(small)::after {
  margin-bottom: 8px;
}

.group-key[aria-pressed="true"] {
  --face: var(--own);
  --face-ink: var(--display);
  --face-shade: var(--own-shade);
}

.group-key[aria-pressed="true"]::after {
  background: var(--display);
  opacity: 0.35;
}

@media (hover: hover) {
  .group-key:hover {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--face-shade);
  }

  .pad:hover {
    background: #323435;
  }
}

.group-key:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--face-shade);
}

.group-key:nth-child(1) { --own: var(--tone-a); --own-shade: var(--shade-a); }
.group-key:nth-child(2) { --own: var(--tone-b); --own-shade: var(--shade-b); }
.group-key:nth-child(3) { --own: var(--tone-c); --own-shade: var(--shade-c); }
.group-key:nth-child(4) { --own: var(--tone-d); --own-shade: var(--shade-d); }

.pad {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 8px 7px 8px 8px;
  border: 0;
  border-radius: var(--corner);
  background: var(--pad);
  color: var(--pad-text);
  box-shadow: 0 3px 0 var(--shade);
  font-family: var(--ui);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 120ms ease-out, background-color 120ms ease-out;
}

.pad:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--shade);
}

.pad.is-locked {
  box-shadow: inset 0 0 0 2px var(--pad-text), 0 3px 0 var(--shade);
}

.pad-key {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.pad-lock {
  display: none;
  width: 10px;
  height: 12px;
}

.is-locked .pad-lock {
  display: block;
}

.pad-trait {
  width: 18px;
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--tone);
}

/* The small KEYS pad, empty at rest, as in the app. */
.pad-keys {
  position: absolute;
  top: 8px;
  right: 7px;
  width: 26px;
  height: 38px;
  background-image:
    linear-gradient(90deg, transparent 7px, var(--pad) 7px, var(--pad) 9.5px, transparent 9.5px, transparent 16.5px, var(--pad) 16.5px, var(--pad) 19px, transparent 19px),
    linear-gradient(transparent 8px, var(--pad) 8px, var(--pad) 10px, transparent 10px, transparent 18px, var(--pad) 18px, var(--pad) 20px, transparent 20px, transparent 28px, var(--pad) 28px, var(--pad) 30px, transparent 30px);
  background-color: rgba(244, 244, 240, 0.08);
  border-radius: 2px;
  opacity: 0.9;
}

.pad-slot {
  margin-top: auto;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.pad-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--pad-soft);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .pad-key { font-size: 24px; }
  .pad-slot { font-size: 15px; }
  .pad-name { font-size: 11.5px; }
}

/* A struck pad: white-hot, then gone. */
.pad::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--pad-text);
  opacity: 0;
  pointer-events: none;
}

.pad.is-hit::after {
  animation: hit 420ms var(--ease-out);
}

@keyframes hit {
  from { opacity: 0.8; }
  to { opacity: 0; }
}

.pad.is-spared .pad-lock {
  animation: spared 380ms var(--ease-out);
}

@keyframes spared {
  40% { transform: scale(1.5); }
  to { transform: scale(1); }
}

.rig-keys {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 8px;
  margin-top: 16px;
  padding-left: 56px;
}

.rig-keys .key {
  padding: 0 10px;
}

.rig-note {
  max-width: 52ch;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Without the script the pads stay a picture: no keys that do nothing. */
html:not(.js) .rig-keys,
html:not(.js) .rig-hint {
  display: none;
}

/* ---------- The jam card deal ---------- */

/* The stage a card is dealt on, as in the app (Theme/Cards/CardStage.swift):
   the black display, its dots and scan lines, an orange glow under the cards. */
.deal {
  --glow-x: 50%;
  --glow-y: 68%;
  display: grid;
  padding: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(244, 244, 240, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 90, 31, 0.2), rgba(255, 90, 31, 0) 58%),
    radial-gradient(circle, rgba(42, 43, 44, 0.8) 1.4px, transparent 1.9px) 0 0 / 15px 15px,
    var(--display);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.9);
}

.deal-say {
  padding: 24px 20px 6px;
}

.deal-eyebrow {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--display-dim);
}

/* Above `.section h2`, written further down. */
.deal .deal-say h2 {
  max-width: 9ch;
  margin-top: 10px;
  font: 400 clamp(3.1rem, 2rem + 5.4vw, 5rem)/0.94 var(--title);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.deal .deal-say h2 span {
  color: var(--accent);
}

.deal-say p:not(.deal-eyebrow) {
  max-width: 36ch;
  margin-top: 16px;
  font-size: 18px;
}

.deal-say p.deal-sim {
  max-width: 44ch;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--display-dim);
}

.deal-sim strong {
  font-weight: 700;
  color: var(--display-text);
}

/* The table is the script's: without it, the words and the capture stay. */
.deal-table {
  display: none;
  position: relative;
  overflow: hidden;
  min-height: 470px;
}

.deal-table.is-live {
  display: block;
}

.deal-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 236, 214, 0.5), rgba(255, 90, 31, 0.3) 26%, rgba(255, 90, 31, 0) 62%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease-out;
}

/* A card lies face up: the table stays a little lit. */
.deal-table.is-read .deal-flash {
  opacity: 0.3;
}

.deal-title,
.deal-hint {
  position: absolute;
  margin: 0;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease-out, visibility 0s 200ms;
}

.deal-title.is-shown,
.deal-hint.is-shown {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.deal-title {
  left: 0;
  right: 0;
  top: 24px;
  font: 400 30px/1 var(--title);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.deal-hint {
  left: 50%;
  width: min(100% - 44px, 340px);
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
  color: var(--display-dim);
}

.deal-cards {
  position: absolute;
  inset: 0;
}

.deal-keys {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 60;
  display: flex;
  justify-content: center;
}

.deal-keys .key {
  min-width: 190px;
}

@media (min-width: 900px) {
  .deal {
    --glow-x: 73%;
    --glow-y: 50%;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }

  .deal-say {
    padding: 40px 8px 40px 44px;
  }
}

.deal-facts {
  margin-top: 40px;
}

.deal-facts .section-lead {
  margin-top: 0;
}

@media (min-width: 860px) {
  .deal-facts {
    margin-top: 56px;
  }
}

/* A jam card, as the app cuts it (Theme/Cards/JamCardView.swift): 240 × 340
   at its reading size, every length inside in 240ths of its width. The
   script places it; it leans and turns in its own perspective. */
.jc {
  --u: calc(var(--w) / 240);
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--w);
  height: calc(var(--w) * 340 / 240);
  margin: calc(var(--w) * -170 / 240) 0 0 calc(var(--w) / -2);
  will-change: transform;
}

.jc-tilt,
.jc-flip {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
}

.jc-tilt {
  transform: perspective(900px);
  transition: transform 130ms ease-out;
}

.jc-side {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: calc(14 * var(--u));
  box-shadow: 0 calc(12 * var(--u)) calc(26 * var(--u)) rgba(0, 0, 0, 0.6), 0 calc(2 * var(--u)) 0 rgba(0, 0, 0, 0.5);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.jc-back svg {
  display: block;
  width: 100%;
  height: 100%;
}

.jc-face {
  display: flex;
  flex-direction: column;
  gap: calc(7 * var(--u));
  padding: calc(11 * var(--u)) calc(13 * var(--u)) calc(10 * var(--u));
  background: var(--key-light);
  color: var(--key);
  font-family: var(--ui);
  text-align: left;
  transform: rotateY(180deg);
}

/* The rare card catches the light: the four group colours across it. */
.jc--rare .jc-face {
  background-image: linear-gradient(135deg, rgba(255, 90, 31, 0.3), rgba(255, 194, 26, 0.3), rgba(46, 197, 240, 0.3), rgba(255, 79, 154, 0.3), rgba(255, 90, 31, 0.3));
  background-blend-mode: color-burn;
}

.jc-face > span {
  position: relative;
  display: block;
}

.jc-face [data-part] {
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

/* A part of the face not printed yet is blank; it comes up as it prints. */
.jc-face.is-printing [data-part]:not(.is-on) {
  opacity: 0;
  transform: translateY(calc(5 * var(--u)));
}

.jc-face .jc-head {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  font-size: calc(10 * var(--u));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: calc(1.4 * var(--u));
}

.jc-head svg {
  width: calc(11 * var(--u));
  height: calc(11 * var(--u));
  fill: currentColor;
}

.jc-number {
  margin-left: auto;
  letter-spacing: calc(0.6 * var(--u));
  font-variant-numeric: tabular-nums;
  color: #575c5f;
}

.jc-art {
  padding: calc(9 * var(--u)) calc(14 * var(--u)) calc(10 * var(--u));
  border-radius: calc(9 * var(--u));
  background: var(--display);
}

.jc-art svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--ui);
}

/* Anton's line box is taller than its capitals: the row is cut to the capitals. */
.jc-name {
  height: calc(var(--size) * var(--u));
  font: 400 calc(var(--size) * var(--u)) / 1.08 var(--title);
  letter-spacing: calc(var(--size) * 0.015 * var(--u));
  white-space: nowrap;
}

.jc-face .jc-lines {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: calc(6 * var(--u));
}

.jc-line {
  display: flex;
  align-items: baseline;
  gap: calc(6 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 700;
  line-height: 1.2;
}

.jc-label {
  flex: none;
  width: calc(34 * var(--u));
  font-size: calc(10 * var(--u));
  font-weight: 800;
  letter-spacing: calc(0.9 * var(--u));
  color: #575c5f;
}

.jc-foot {
  padding-top: calc(7 * var(--u));
  border-top: calc(1.5 * var(--u)) solid currentColor;
}

.jc-chips {
  display: flex;
  align-items: center;
  gap: calc(4 * var(--u));
}

.jc-chip,
.jc-pro {
  font-size: calc(10 * var(--u));
  font-weight: 800;
  line-height: 1.3;
  border-radius: calc(4 * var(--u));
}

.jc-chip {
  min-width: calc(18 * var(--u));
  padding: calc(1 * var(--u)) calc(5 * var(--u));
  color: var(--display);
  text-align: center;
}

.jc-pro {
  padding: 0 calc(4 * var(--u));
  border: calc(1.5 * var(--u)) solid currentColor;
  font-size: calc(9 * var(--u));
  letter-spacing: calc(0.5 * var(--u));
}

.jc-skulls {
  display: flex;
  gap: calc(2 * var(--u));
  margin-left: auto;
}

.jc-skulls svg {
  width: calc(15 * var(--u));
  height: calc(15 * var(--u));
  fill: currentColor;
}

/* A band of light across the face, parked off the card at rest. */
.jc-face .jc-sheen {
  position: absolute;
  inset: 0 -80%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 43%, rgba(255, 255, 255, 0.42) 50%, rgba(255, 255, 255, 0) 57%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 130ms ease-out, transform 130ms ease-out;
}

.jc-face .jc-flashed {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

/* Face down, the whole card is a key. */
.jc-pick {
  appearance: none;
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: calc(14 * var(--u));
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.jc-pick:focus-visible {
  outline: calc(5 * var(--u)) solid var(--display-text);
  outline-offset: calc(6 * var(--u));
  border-radius: calc(14 * var(--u));
}

.jc:has(.jc-pick:hover) .jc-tilt,
.jc:has(.jc-pick:focus-visible) .jc-tilt {
  transform: perspective(900px) translateY(calc(-26 * var(--u))) rotateX(7deg);
}

.jc:has(.jc-pick:active) .jc-tilt {
  transform: perspective(900px) translateY(calc(-8 * var(--u)));
}

/* Face up, at rest, it floats a little. */
.jc.is-up {
  animation: jc-float 4.2s ease-in-out infinite;
}

@keyframes jc-float {
  0%, 100% { translate: 0 0; rotate: -0.5deg; }
  50% { translate: 0 -5px; rotate: 0.5deg; }
}

@media (prefers-reduced-motion: reduce) {
  .jc.is-up { animation: none; }
  .jc-tilt,
  .deal-flash { transition: none; }
  .jc:has(.jc-pick:hover) .jc-tilt,
  .jc:has(.jc-pick:focus-visible) .jc-tilt { transform: perspective(900px); }
}

/* ---------- Sections ---------- */

.section {
  padding-top: var(--section);
}

.section h2 {
  max-width: 20ch;
  font-size: clamp(1.85rem, 1.25rem + 2.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

/* A section's title carries the mark of its meaning, the short bar of a pad. */
.section h2[class*="tone-"]::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--mark);
}

.section-lead {
  max-width: 54ch;
  margin-top: 16px;
  font-size: 18px;
}

.split {
  display: grid;
  gap: 40px;
}

/* Words and screen share a middle line: a short text is not left hanging
   at the top of a tall screen. */
@media (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 72px;
    align-items: center;
  }

  .split--flip {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .split--flip > .shot {
    order: -1;
  }
}

.shot {
  width: min(100%, 280px);
  margin: 0 auto;
}

@media (min-width: 860px) {
  .shot { width: 100%; }
}

.shot figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.shot figcaption a {
  color: var(--ink);
}

.shot img,
.shot video {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #000;
  border-radius: 30px;
  background: var(--display);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* The keys and what they do. */
.keymap {
  margin-top: 28px;
  border-top: 1px solid var(--rule);
}

/* On a phone the key sits above its sentence; wider, beside it. */
.keymap > div {
  display: grid;
  gap: 12px;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 520px) {
  .keymap > div {
    grid-template-columns: 8.75rem minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }
}

.keymap dt {
  display: flex;
}

.keymap dd {
  margin: 0;
  max-width: 46ch;
}

.keymap kbd {
  --tone: var(--tone-a);
  padding: 0 10px;
}

.keymap dt {
  flex-wrap: nowrap;
  gap: 6px;
}

/* Lists marked by meaning: green is what is safe (decision 40). */
.marked {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.marked li {
  position: relative;
  max-width: 54ch;
  padding-left: 26px;
}

.marked li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mark, var(--live));
  box-shadow: 0 0 0 2px rgba(18, 19, 20, 0.12);
}

code {
  font: 600 0.9em var(--mono);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(18, 19, 20, 0.08);
}

/* ---------- Sets ---------- */

.sets {
  margin-top: 28px;
  padding: 6px 16px;
}

@media (min-width: 700px) {
  .sets { padding: 8px 22px; }
}

.sets ol {
  padding: 0;
  list-style: none;
}

.sets li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(244, 244, 240, 0.1);
}

.sets li:last-child {
  border-bottom: 0;
}

.sets li::before {
  content: "";
  grid-row: 1;
  align-self: center;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--tone-d);
}

.set-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.set-free {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  padding: 3px 7px;
  border: 1px solid var(--display-text);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.set-about {
  grid-column: 2 / -1;
  grid-row: 2;
  font-size: 14px;
  line-height: 1.4;
  color: var(--display-dim);
}

@media (min-width: 700px) {
  .sets li {
    grid-template-columns: 22px 11rem minmax(0, 1fr) auto;
  }

  .set-about {
    grid-column: 3;
    grid-row: 1;
  }

  .set-free {
    grid-column: 4;
    grid-row: 1;
  }
}

.fineprint {
  max-width: 62ch;
  margin-top: 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- Free and Pro ---------- */

.plans {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

@media (min-width: 760px) {
  .plans {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* Both panels have the display's border, so their lines sit level. */
.plan {
  padding: 22px 20px 24px;
  border: 3px solid transparent;
  border-radius: 16px;
}

@media (min-width: 760px) {
  .plan { padding: 26px 28px 30px; }
}

/* A panel, not a key: flat, no shade. */
.plan--free {
  background: var(--key-light);
}

.plan--pro {
  border-color: #000;
  background: var(--display);
  color: var(--display-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.plan h3 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.plan-cost {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.plan-note {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
}

.plan--pro .plan-note {
  color: var(--display-dim);
}

.plan .marked {
  margin-top: 20px;
  gap: 10px;
}

.plan .marked li::before {
  top: 0.55em;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  box-shadow: none;
}

.plan .marked li {
  padding-left: 28px;
}

.tone-a { --mark: var(--tone-a); }
.tone-b { --mark: var(--tone-b); }
.tone-c { --mark: var(--tone-c); }
.tone-d { --mark: var(--tone-d); }
.tone-live { --mark: var(--live); }
.tone-dim { --mark: var(--display-dim); }
.tone-ink { --mark: var(--ink-soft); }

/* ---------- Requirements ---------- */

.needs {
  margin-top: 28px;
  border-top: 1px solid var(--rule);
}

.needs > div {
  display: grid;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 700px) {
  .needs > div {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
}

.needs dt {
  font-weight: 800;
}

.needs dd {
  max-width: 56ch;
  margin: 0;
}

.os {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- The close ---------- */

/* The page ends as it began: a display, the name's type, the key. Its dots
   and glow are the card stage's. */
.close {
  --glow-x: 50%;
  --glow-y: 100%;
  display: grid;
  gap: 20px;
  margin-top: var(--section);
  padding: 24px 20px 22px;
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 90, 31, 0.22), rgba(255, 90, 31, 0) 55%),
    radial-gradient(circle, rgba(42, 43, 44, 0.8) 1.4px, transparent 1.9px) 0 0 / 15px 15px,
    var(--display);
}

.close-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.close-title {
  font: 400 clamp(2.6rem, 1.6rem + 4.4vw, 4.25rem)/0.94 var(--title);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.close-say p {
  margin-top: 10px;
  font-size: 18px;
}

.close .key {
  min-height: 56px;
  padding: 0 26px;
  font-size: 13px;
}

.close-note {
  max-width: 62ch;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 244, 240, 0.12);
  font-size: 15px;
  color: var(--display-dim);
}

.close a:not(.key) {
  color: var(--display-text);
}

@media (min-width: 760px) {
  .close {
    --glow-x: 88%;
    --glow-y: 30%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px 32px;
    padding: 40px 44px 28px;
  }

  .close-icon {
    width: 104px;
    height: 104px;
    border-radius: 23px;
  }

  .close-note {
    grid-column: 1 / -1;
    max-width: none;
  }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  margin-top: 28px;
  padding: 18px 0 40px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer a {
  color: var(--ink);
}

/* ---------- Privacy and Support ---------- */

.doc-head .wordmark {
  font-size: clamp(3rem, 14vw, 5.5rem);
}

/* The page sets the measure (about 75 characters), so text and display line up. */
.doc {
  padding-bottom: 8px;
}

.doc-index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 8px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.doc .doc-index {
  padding-left: 0;
}

.doc .doc-index li + li {
  margin-top: 0;
}

.doc .marked li {
  max-width: none;
}

.doc .summary {
  padding-top: 18px;
}

.doc-index .key {
  min-height: 40px;
  padding: 0 11px;
}

.doc section {
  padding-top: 56px;
  scroll-margin-top: 16px;
}

.doc h2 {
  font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.doc h3 {
  margin-top: 30px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.005em;
}

.doc p,
.doc ul,
.doc ol {
  margin-top: 12px;
}

.doc h2 + p,
.doc h2 + ul {
  margin-top: 16px;
}

.doc ul,
.doc ol {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 8px;
}

.doc li::marker {
  color: var(--ink-soft);
}

.doc .marked {
  padding-left: 0;
}

.doc .marked li + li {
  margin-top: 0;
}

.summary {
  margin-top: 28px;
  padding: 18px 20px 20px;
}

.summary h2 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--display-dim);
}

.summary .marked {
  margin-top: 14px;
  gap: 10px;
}

.summary .marked li::before {
  box-shadow: none;
}

.optout {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--key-light);
}

.optout label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
}

.optout input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--ink);
}

.optout p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.updated {
  margin-top: 6px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--display-dim);
}
