/* DispWatch public site (dispwatch.com). One stylesheet, no frameworks.
   Brand spec: DESIGN.md ("The Night Departures Board"), dark only.
   Served under a strict CSP: no external fonts, images or scripts. */

/* Fonts ------------------------------------------------------------------- */

@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/geist-latin-wght-normal.woff2') format('woff2-variations'),
       url('fonts/geist-latin-wght-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/geist-mono-latin-wght-normal.woff2') format('woff2-variations'),
       url('fonts/geist-mono-latin-wght-normal.woff2') format('woff2');
}

/* Tokens (design/tokens.css, as hex) ------------------------------------- */

:root {
  color-scheme: dark;

  --ground: #0f0f14;
  --surface-1: #1a1a23;
  --surface-2: #2a2a37;
  --seam: #3a3a4c;
  --hairline: rgb(58 58 76 / 0.6);
  --ink: #ececf4;
  --muted: #9a9ab0;
  --brand: #7b61ff;
  /* Button fills sit a step deeper than --brand so white text clears
     WCAG AA (5.2:1 at rest, 4.6:1 on hover). */
  --brand-fill: #6a50f0;
  --brand-fill-hover: #7259fa;
  --brand-text: #a594ff;
  --ok: #3dd68c;

  --radius-cell: 4px;
  --radius-control: 10px;
  --radius-panel: 14px;
  --radius-sheet: 22px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration: 200ms;

  --sans: 'Geist Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;

  --max: 1120px;
  --pad: 16px;
  /* Full-bleed bars keep their content on the page column. */
  --bleed: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
}

@media (min-width: 720px) {
  :root { --pad: 24px; }
}

@media (min-width: 1024px) {
  :root { --pad: 32px; }
}

/* Base -------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgb(123 97 255 / 0.16), transparent 60%),
    var(--ground);
  background-repeat: no-repeat;
  font: 400 1rem/1.5 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

::selection {
  background: rgb(123 97 255 / 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 650;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: var(--brand-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #c3b7ff;
}

a,
button,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

code {
  font: 500 0.875em var(--mono);
}

.fig {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.unit {
  font: 500 0.8125rem/1 var(--sans);
  color: var(--muted);
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: 600 0.9375rem/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary,
.btn-primary:hover {
  color: #fff;
}

.btn-primary {
  background: var(--brand-fill);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 1px 2px rgb(0 0 0 / 0.4);
}

.btn-primary:hover {
  background: var(--brand-fill-hover);
}

.btn-secondary,
.btn-secondary:hover {
  color: var(--ink);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--hairline);
}

.btn-secondary:hover {
  background: var(--seam);
}

.btn-ghost,
.btn-ghost:hover {
  color: var(--brand-text);
}

.btn-ghost:hover {
  background: rgb(123 97 255 / 0.14);
}

.btn-lg {
  min-height: 52px;
  padding: 0 20px;
  font-size: 1rem;
}

/* Header (shared with the legal pages) ----------------------------------- */

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  padding: 8px var(--bleed) 0;
  background: rgb(26 26 35 / 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 10px 30px rgb(0 0 0 / 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font: 650 1.0625rem/1 var(--sans);
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
}

/* The wordmark text beside the DW mark; the image's alt already names it. */
.brand::after {
  content: 'DispWatch';
  content: 'DispWatch' / '';
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 22px;
  width: 100%;
  border-top: 1px solid rgb(255 255 255 / 0.05);
  margin-top: 8px;
}

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font: 500 0.9375rem/1 var(--sans);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
}

/* On phones the call to action sits on the brand row. */
.site-nav .btn {
  position: absolute;
  top: 8px;
  right: var(--pad);
  padding: 0 14px;
}

@media (min-width: 720px) {
  .site-header {
    position: sticky;
    top: 0;
    flex-wrap: nowrap;
    min-height: 64px;
    padding-block: 10px;
  }

  .site-nav {
    width: auto;
    margin: 0 0 0 auto;
    border-top: 0;
    column-gap: 28px;
  }

  .site-nav .btn {
    position: static;
    margin-left: 4px;
    padding: 0 16px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--surface-1); }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--surface-1);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Footer (shared with the legal pages) ----------------------------------- */

.site-footer {
  display: grid;
  gap: 14px;
  margin-top: 0;
  padding: 32px var(--bleed) 40px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--brand-text);
}

.site-footer p {
  max-width: 72ch;
}

.site-footer .footer-note {
  font-size: 0.8125rem;
}

/* Layout ------------------------------------------------------------------ */

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

.section {
  padding-block: 64px;
  border-top: 1px solid var(--hairline);
}

@media (min-width: 1024px) {
  .section { padding-block: 96px; }
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 40rem;
  margin-bottom: 36px;
}

.section-head h2,
.split-copy h2,
.cta-band h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head p,
.split-copy > p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.section--flush {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 1024px) {
  .layout-side {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
  }

  .layout-side .section-head {
    position: sticky;
    top: 104px;
    margin-bottom: 0;
  }
}

/* Hero -------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 48px;
  padding-block: 40px 64px;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 64px;
    padding-block: 88px 104px;
  }
}

.hero-copy {
  display: grid;
  justify-items: start;
  gap: 20px;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.25rem, 1.2rem + 4.6vw, 3.875rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-lede {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 400px) {
  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn-lg {
    padding-inline: 16px;
  }

  .hero-actions .btn-ghost {
    padding-inline: 12px;
  }
}

.hero-plans {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Split-flap wordmark: the logo, and the only place cells are used. Each
   glyph sits on a solid cell; nothing crosses it (DESIGN.md, Clean Cell). */
.flap {
  display: flex;
  gap: clamp(3px, 0.7vw, 5px);
  margin-bottom: 8px;
  font: 700 clamp(1.625rem, 1.1rem + 2.6vw, 2.5rem)/1 var(--mono);
  color: var(--ink);
  perspective: 600px;
  user-select: none;
}

.flap span {
  display: inline-flex;
  justify-content: center;
  min-width: 1.18ch;
  padding: 0.24em 0.14em;
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgb(58 58 76 / 0.6);
  animation: flip-in 200ms var(--ease) both;
}

.flap span:nth-child(2) { animation-delay: 30ms; }
.flap span:nth-child(3) { animation-delay: 60ms; }
.flap span:nth-child(4) { animation-delay: 90ms; }
.flap span:nth-child(5) { animation-delay: 120ms; }
.flap span:nth-child(6) { animation-delay: 150ms; }
.flap span:nth-child(7) { animation-delay: 180ms; }
.flap span:nth-child(8) { animation-delay: 210ms; }
.flap span:nth-child(9) { animation-delay: 240ms; }

@keyframes flip-in {
  from { transform: rotateX(-90deg); opacity: 0.25; }
  to { transform: rotateX(0deg); opacity: 1; }
}

/* Example board (load rows, DESIGN.md "Load Row") ------------------------- */

.board {
  border: 1px solid rgb(58 58 76 / 0.7);
  border-radius: var(--radius-panel);
  background: var(--surface-1);
  overflow: hidden;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--hairline);
}

.board-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.board-title .fig {
  margin-left: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--muted);
  font: 600 0.75rem/1 var(--sans);
}

.loads {
  list-style: none;
  padding: 0;
}

.load {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 14px;
  row-gap: 8px;
  padding: 14px;
}

.load + .load {
  border-top: 1px solid rgb(58 58 76 / 0.55);
}

.load-route {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.012em;
  min-width: 0;
}

.load-price {
  justify-self: end;
  font: 650 1.375rem/1.1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.load-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.load-meta .fig {
  font-size: 0.8125rem;
  font-weight: 500;
}

.load-rate {
  justify-self: end;
  align-self: center;
  font: 550 1rem/1 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.load-rate .unit {
  margin-left: 1px;
}

.code {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-cell);
  background: var(--surface-2);
  color: var(--ink);
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.04em;
  text-decoration: none;
}

abbr.code {
  cursor: help;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgb(123 97 255 / 0.18);
  border: 1px solid rgb(123 97 255 / 0.45);
  color: #c9bfff;
  font: 600 0.75rem/1 var(--sans);
}

.badge-new::before,
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* A load that arrives while the board is open slides in under a brand wash. */
.load.is-new {
  background: rgb(123 97 255 / 0.07);
  animation: slide-in 420ms var(--ease) 420ms both;
}

@keyframes slide-in {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.board-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 380px) {
  .load-route { font-size: 1rem; }
  .load-price { font-size: 1.25rem; }
}

/* How it works ------------------------------------------------------------ */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  counter-reset: step;
  border-top: 1px solid var(--hairline);
}

.steps li {
  counter-increment: step;
  display: grid;
  align-content: start;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 6px;
  padding-block: 24px;
  border-bottom: 1px solid var(--hairline);
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font: 650 1.5rem/1.1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.steps h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.steps p {
  color: var(--muted);
  max-width: 34ch;
}

@media (min-width: 840px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--hairline);
  }

  .steps li {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
    padding: 28px 28px 32px;
    border-bottom: 0;
  }

  .steps li:first-child {
    padding-left: 0;
  }

  .steps li + li {
    border-left: 1px solid var(--hairline);
  }

  .steps li::before {
    grid-row: auto;
    margin-bottom: 18px;
  }
}

/* Search filters spec ------------------------------------------------------ */

.spec {
  border-top: 1px solid var(--hairline);
}

.spec > div {
  display: grid;
  gap: 4px;
  padding-block: 18px;
  border-bottom: 1px solid var(--hairline);
}

.spec dt {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.spec dd {
  color: var(--muted);
  max-width: 52ch;
}

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

/* Alerts section ------------------------------------------------------------ */

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

@media (min-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
    align-items: start;
  }

  .split-copy {
    position: sticky;
    top: 104px;
  }
}

.split-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.split-copy h3 {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ticks {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.ticks li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--hairline);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 19px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}

/* Telegram message, drawn in DispWatch colours */
.tg {
  width: 100%;
  max-width: 440px;
  justify-self: center;
  border: 1px solid rgb(58 58 76 / 0.7);
  border-radius: var(--radius-sheet);
  background: var(--surface-1);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .tg { justify-self: start; }
}

.tg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

.tg-head img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.tg-name {
  display: grid;
  gap: 2px;
  font-weight: 600;
  line-height: 1.2;
}

.tg-name span {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.tg-chat {
  display: grid;
  gap: 6px;
  padding: 16px 12px 18px;
  background:
    radial-gradient(420px 260px at 100% 0%, rgb(123 97 255 / 0.08), transparent 70%),
    var(--ground);
}

.tg-bubble {
  display: grid;
  gap: 0.95em;
  max-width: 100%;
  padding: 10px 12px 8px;
  border-radius: 14px 14px 14px 4px;
  background: var(--surface-2);
  font-size: 0.875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.tg-bubble b {
  font-weight: 650;
}

.tg-link {
  color: var(--brand-text);
}

.tg-bubble code {
  padding: 1px 4px;
  border-radius: var(--radius-cell);
  background: rgb(15 15 20 / 0.6);
  font-size: 0.8125rem;
}

.tg-rule {
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.08em;
}

.tg-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
}

.tg-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.tg-buttons {
  display: grid;
  gap: 6px;
}

.tg-buttons > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgb(42 42 55 / 0.7);
  border: 1px solid rgb(255 255 255 / 0.05);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.tg-caption {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Boards -------------------------------------------------------------------- */

.boards {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.boards li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding-block: 12px;
  border-bottom: 1px solid var(--hairline);
}

.boards .code {
  justify-self: start;
}

.board-name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Measured speed: a median per board, beside its name */
.speed-cap {
  margin-bottom: 16px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 0.9375rem;
}

.speed {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  text-align: right;
  white-space: nowrap;
}

.speed .fig {
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.speed--none {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.fine {
  margin-top: 20px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Pricing ------------------------------------------------------------------- */

.plans {
  display: grid;
  border: 1px solid rgb(58 58 76 / 0.7);
  border-radius: var(--radius-panel);
  background: var(--surface-1);
}

.plan {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px 20px;
}

.plan + .plan {
  border-top: 1px solid var(--hairline);
}

@media (min-width: 760px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan {
    padding: 32px;
  }

  .plan + .plan {
    border-top: 0;
    border-left: 1px solid var(--hairline);
  }
}

.plan-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price .fig {
  font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-price .unit {
  font-size: 1rem;
}

.plan-alt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.plan-alt .fig {
  font-weight: 550;
}

.plan .ticks {
  margin-block: 4px 8px;
}

.plan .btn {
  justify-self: start;
}

.billing {
  margin-top: 40px;
  border-top: 1px solid var(--hairline);
}

.billing > div {
  display: grid;
  gap: 6px;
  padding-block: 18px;
  border-bottom: 1px solid var(--hairline);
}

.billing dt {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.billing dd {
  color: var(--muted);
  max-width: 68ch;
}

.billing dd .fig {
  font-weight: 550;
}

@media (min-width: 760px) {
  .billing > div {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 24px;
  }
}

/* FAQ ----------------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 16px 40px 16px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.012em;
  cursor: pointer;
  list-style: none;
  transition: color var(--duration) var(--ease);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: #fff;
}

/* Plus that turns into a minus when open */
.faq summary::before,
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--muted);
  transition: transform var(--duration) var(--ease);
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq-answer {
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
  color: var(--muted);
  max-width: 64ch;
}

.faq-answer strong {
  color: var(--ink);
  font-weight: 600;
}

/* Closing call to action ------------------------------------------------- */

.cta-band {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 32px 20px;
  border: 1px solid rgb(58 58 76 / 0.7);
  border-radius: var(--radius-sheet);
  background: var(--surface-1);
}

.cta-band p {
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.cta-band .btn {
  margin-top: 8px;
}

@media (min-width: 760px) {
  .cta-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 48px;
    padding: 48px;
  }

  .cta-band .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
}

/* Inner pages (contact, 404) --------------------------------------------- */

.page {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 48px var(--pad) 80px;
}

@media (min-width: 1024px) {
  .page { padding-block: 80px 112px; }
}

.page-head {
  display: grid;
  gap: 14px;
  max-width: 40rem;
  margin-bottom: 40px;
}

.page-head h1 {
  font-size: clamp(2.125rem, 1.4rem + 3vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page-head p {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  border: 1px solid rgb(58 58 76 / 0.7);
  border-radius: var(--radius-panel);
  background: var(--surface-1);
}

.contact-grid > section {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px 20px;
}

.contact-grid > section + section {
  border-top: 1px solid var(--hairline);
}

@media (min-width: 760px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid > section {
    padding: 32px;
  }

  .contact-grid > section + section {
    border-top: 0;
  }

  .contact-grid > section:nth-child(2n) {
    border-left: 1px solid var(--hairline);
  }

  .contact-grid > section:nth-child(n + 3) {
    border-top: 1px solid var(--hairline);
  }
}

.contact-grid h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.contact-grid p,
.contact-grid address {
  color: var(--muted);
  font-style: normal;
  max-width: 46ch;
}

.contact-big {
  font-size: clamp(1.125rem, 1rem + 0.8vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.contact-grid .btn {
  justify-self: start;
  margin-top: 6px;
}

.page--center {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 60vh;
}

.page--center .page-head {
  margin-bottom: 24px;
}

.code-big {
  font: 650 clamp(3rem, 2rem + 6vw, 5rem)/1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Legal pages: long-form reading ----------------------------------------- */

main.legal {
  width: 100%;
  max-width: calc(70ch + 2 * var(--pad));
  margin-inline: auto;
  padding: 48px var(--pad) 96px;
  font-size: 1.0625rem;
  line-height: 1.65;
}

@media (min-width: 1024px) {
  main.legal { padding-top: 80px; }
}

main.legal h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.875rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

main.legal .legal-meta {
  margin-top: 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Two meta lines (Effective, Updated) share one hairline, under the last. */
main.legal .legal-meta:has(+ .legal-meta) {
  padding-bottom: 0;
  border-bottom: 0;
}

main.legal .legal-meta + .legal-meta {
  margin-top: 4px;
}

main.legal h2 {
  margin-top: 2.4em;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

main.legal h3 {
  margin-top: 1.8em;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

main.legal h4 {
  margin: 1.6em 0 0;
  font-size: 1rem;
  font-weight: 600;
}

main.legal p,
main.legal ul,
main.legal ol,
main.legal table,
main.legal address,
main.legal blockquote {
  margin: 0.85em 0 0;
}

main.legal p,
main.legal li,
main.legal address {
  color: rgb(236 236 244 / 0.86);
}

main.legal address {
  font-style: normal;
}

main.legal ul,
main.legal ol {
  padding-left: 1.4em;
}

main.legal li + li {
  margin-top: 0.4em;
}

main.legal li::marker {
  color: var(--muted);
}

main.legal strong {
  color: var(--ink);
  font-weight: 600;
}

main.legal a {
  overflow-wrap: anywhere;
}

main.legal hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

main.legal blockquote {
  padding: 12px 16px;
  border-left: 2px solid var(--seam);
  background: var(--surface-1);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}

main.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* On phones, tables scroll inside themselves so the page never scrolls
   sideways. */
@media (max-width: 639px) {
  main.legal table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

main.legal th,
main.legal td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
  min-width: 9rem;
}

main.legal th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.875rem;
}

main.legal caption {
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: left;
}

/* Motion: one grammar, and none of it under reduced motion ---------------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .btn:active {
    transform: none;
  }
}
