/* Firstmat launch page. Palette, type and motion follow docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;
  --bg: #f6f2ec; /* linen page */
  --bg-deep: #ece5db; /* alternating section band, footer */
  --surface: #fdfbf8; /* cards, browser frame */
  --text: #2a2521; /* 13.6:1 on --bg */
  --text-muted: #5f564c; /* 6.4:1 on --bg */
  --line: #ddd4c8; /* hairlines */
  --line-strong: #8a7f72; /* outlined button, frame edges */
  --accent: #3f5641; /* sage: links, primary button, eyebrows (7.2:1) */
  --accent-hover: #2f4231;
  --on-accent: #fdfbf8;
  --accent-soft: #e2e8dc; /* soft sage fills, active demo tab */
  --on-accent-soft: #33473a;
  --clay: #b5653f; /* decorative only: circle, step numerals at display size, dots */
  --clay-soft: #f1ddd0; /* clay wash behind the hero circle */
  --focus: #3f5641;

  --code-num: #8f4a2b; /* AA-safe clay for numbers in the light code panel */
  --shadow-sm:
    0 1px 2px rgb(42 37 33 / 0.06), 0 8px 20px -14px rgb(42 37 33 / 0.18);
  --shadow:
    0 1px 2px rgb(42 37 33 / 0.06), 0 24px 48px -20px rgb(42 37 33 / 0.22);
  --shadow-lift:
    0 2px 4px rgb(42 37 33 / 0.08), 0 30px 56px -20px rgb(42 37 33 / 0.3);

  --font-display:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "URW Palladio L", Georgia, serif;
  --font-text:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 1.25rem;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --section-space: 6rem;
  --header-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --bg-deep: #1f1c19;
    --surface: #211e1b;
    --text: #f2ece4;
    --text-muted: #bcb1a3;
    --line: #38322c;
    --line-strong: #7d746a;
    --accent: #a8c19f;
    --accent-hover: #bfd3b7;
    --on-accent: #161412;
    --accent-soft: #2b3529;
    --on-accent-soft: #c4d6bd;
    --clay: #e09a76;
    --clay-soft: #3a2a21;
    --focus: #a8c19f;

    --code-num: var(--clay);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 20px -14px rgb(0 0 0 / 0.7);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 24px 48px -20px rgb(0 0 0 / 0.7);
    --shadow-lift:
      0 2px 4px rgb(0 0 0 / 0.55), 0 30px 56px -20px rgb(0 0 0 / 0.8);
  }
}

@media (max-width: 719px) {
  :root {
    --section-space: 4rem;
  }
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  overflow-x: clip;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--on-accent);
}

section[id] {
  scroll-margin-top: var(--header-h);
}

#demo:focus {
  outline: none;
}

/* ---------- Shared type ---------- */

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.85rem, 1.3rem + 2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
}

.lead {
  margin-top: 1.1rem;
  max-width: 62ch;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.section {
  padding-block: var(--section-space);
}

.band {
  background: var(--bg-deep);
}

.section-head {
  max-width: 62ch;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 200ms var(--ease),
    border-color 200ms var(--ease),
    transform 200ms var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-small {
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: 0.925rem;
}

.btn .arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  font-weight: 600;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

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

.logo {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
  flex: none;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--text);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--accent);
}

@media (max-width: 719px) {
  .nav-links {
    display: none;
  }
}

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

.hero {
  padding-block: 3.5rem var(--section-space);
  overflow-x: clip;
}

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
}

@media (min-width: 768px) {
  .h1-line {
    display: block;
  }
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 62ch;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.fine-print {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 960px) {
  .hero {
    padding-top: 2rem;
  }

  .hero-inner {
    grid-template-columns: 58fr 42fr;
    min-height: min(88vh, 52rem);
  }

  .h1-line {
    white-space: nowrap;
  }
}

/* The still life: three app cards over a breathing circle. */

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding: 15rem 0 1rem;
}

.breath-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26rem;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    var(--clay-soft) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.breath-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  opacity: 0.35;
}

.mini-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}

.mini-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.mini-title {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.3;
}

.card-a {
  position: absolute;
  top: 0;
  left: -1rem;
  width: 17rem;
  rotate: -3deg;
}

.options {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  font-size: 0.85rem;
}

.option .dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex: none;
}

.option.is-selected {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--on-accent-soft);
}

.option.is-selected .dot {
  background: var(--accent);
  border-color: var(--accent);
}

.card-b {
  z-index: 2;
  width: min(21.5rem, 100%);
  margin-right: 1.5rem;
  padding: 1.5rem;
}

.mini-result {
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.15;
}

.mini-text {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.sessions {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.sessions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.7rem;
  background: var(--bg);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.level {
  flex: none;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.card-c {
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: min(15rem, 85%);
  margin-top: -1.75rem;
  margin-right: -0.5rem;
  padding: 0.9rem 1.1rem;
  rotate: 2deg;
  font-size: 0.82rem;
  line-height: 1.45;
}

.clay-dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--clay);
}

@media (max-width: 719px) {
  .hero {
    padding-top: 2rem;
  }

  .hero-visual {
    max-width: 22rem;
    max-height: 22rem;
    padding: 0.5rem 0 0.5rem;
  }

  .breath-circle {
    width: 18rem;
  }

  .card-a {
    display: none;
  }

  .card-b {
    margin-right: 0.75rem;
    width: min(18.5rem, calc(100% - 1rem));
    padding: 1.25rem;
  }

  .card-c {
    margin-right: 0;
    margin-top: -1.5rem;
  }
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

/* ---------- The gap ---------- */

.split {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .split-gap {
    grid-template-columns: 40fr 60fr;
    gap: 4rem;
    align-items: start;
  }
}

.chips {
  display: grid;
  gap: 1rem;
}

.chip {
  position: relative;
  padding: 1.5rem 1.5rem 1.4rem 4.25rem;
}

.quote-mark {
  position: absolute;
  top: 0.9rem;
  left: 1.25rem;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--clay);
}

.chip-q {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.3;
}

.chip-a {
  margin-top: 0.45rem;
  color: var(--text-muted);
}

.sage-arrow {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.15rem;
}

@media (max-width: 719px) {
  .chip {
    padding: 1.25rem 1.25rem 1.25rem 3.25rem;
  }

  .quote-mark {
    font-size: 3rem;
    left: 0.9rem;
    top: 0.75rem;
  }
}

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

.steps {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  counter-reset: none;
}

@media (min-width: 840px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.step {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--clay);
}

.step h3 {
  margin-top: 0.85rem;
}

.step p {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.code-row {
  display: grid;
  gap: 1rem;
  margin-top: 3.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .code-row {
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 2rem;
  }
}

.code-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.bar-dots {
  display: inline-flex;
  gap: 6px;
}

.bar-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.code-file {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-panel pre {
  margin: 0;
  padding: 1.25rem 1.4rem 1.4rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  tab-size: 2;
}

.code-panel code {
  font-family: inherit;
}

.code-panel .k,
.code-panel .f {
  color: var(--text);
}

.code-panel .s {
  color: var(--accent);
}

.code-panel .n {
  color: var(--code-num);
}

.code-panel .c {
  color: var(--text-muted);
  font-style: italic;
}

.code-caption {
  font-size: 0.925rem;
  color: var(--text-muted);
}

/* ---------- Features ---------- */

.bento {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-large {
    grid-column: span 2;
  }
}

@media (min-width: 1000px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
}

.feature .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.feature h3 {
  margin-top: 1rem;
}

.feature p {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.feature-large {
  padding: 2rem;
}

.feature-large h3 {
  font-size: 1.6rem;
}

.feature-large > p {
  max-width: 46ch;
}

.price-sample {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  margin-top: 1rem !important;
  padding: 0.35rem 0.4rem 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text) !important;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.save-tag {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-weight: 600;
}

/* Beginner-path illustration: three pills joined by a dotted path. */

.path-illo {
  position: relative;
  display: grid;
  gap: 2.25rem;
  margin-top: auto;
  padding-top: 2rem;
  min-height: 13rem;
}

.path-svg {
  position: absolute;
  inset: 2rem 0 0;
  width: 100%;
  height: calc(100% - 2rem);
  overflow: visible;
}

.path-dots {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0 7;
  vector-effect: non-scaling-stroke;
}

.path-draw {
  fill: none;
  stroke: #fff;
  stroke-width: 30;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.path-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem 0.5rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.path-pill b {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--bg-deep);
  font-size: 0.8rem;
}

.path-pill:nth-of-type(1) {
  justify-self: start;
}

.path-pill:nth-of-type(2) {
  justify-self: center;
}

.path-pill:nth-of-type(3) {
  justify-self: end;
}

.path-pill.is-first {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.path-pill.is-first b {
  background: var(--on-accent);
  color: var(--accent);
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin-top: 2rem;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.ticks li {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.ticks li + li::before {
  content: "";
  width: 0.7rem;
  height: 0.4rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  rotate: -45deg;
  translate: 0 -0.15rem;
}

/* ---------- Demo ---------- */

.demo {
  margin-top: 2.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
  margin-inline: -4px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 200ms var(--ease),
    border-color 200ms var(--ease),
    transform 200ms var(--ease);
}

.tab:hover {
  border-color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--on-accent-soft);
}

.browser {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line-strong) 40%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
}

.browser-bar .bar-dots i {
  width: 10px;
  height: 10px;
}

.address {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  padding: 0.2rem 1.25rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.speaker {
  display: none;
}

.browser iframe {
  display: block;
  width: 100%;
  height: 44rem;
  border: 0;
  background: var(--bg);
}

.browser iframe.is-switching {
  animation: frame-fade 250ms ease-out;
}

@keyframes frame-fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

.demo-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin-top: 1rem;
}

.muted-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 719px) {
  .browser {
    border-radius: 2rem;
  }

  .browser-bar {
    justify-content: center;
    height: auto;
    padding: 0.625rem 0;
  }

  .browser-bar .bar-dots,
  .address {
    display: none;
  }

  .speaker {
    display: block;
    width: 3.5rem;
    height: 6px;
    border-radius: 999px;
    background: var(--line);
  }

  .browser iframe {
    height: 38rem;
  }
}

/* ---------- The quiz, explained ---------- */

@media (min-width: 900px) {
  .split-quiz {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
}

.rules {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.rules li {
  display: flex;
  gap: 1rem;
}

.badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 600;
}

.rules h3 {
  font-size: 1.15rem;
  line-height: 1.6rem;
  padding-top: 0.2rem;
}

.rules p {
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.closing-line {
  margin-top: 1.75rem;
  max-width: 62ch;
}

.scorecard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.scorecard-head {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.scorecard table {
  width: 100%;
  border-collapse: collapse;
}

.scorecard th,
.scorecard td {
  padding: 0.95rem 1.4rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.scorecard tr:last-child th,
.scorecard tr:last-child td {
  border-bottom: 0;
}

.scorecard th {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

.scorecard td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-muted);
}

.scorecard td strong {
  color: var(--text);
  font-size: 1.1rem;
}

.scorecard tr.is-pick {
  background: var(--accent-soft);
}

.scorecard tr.is-pick th,
.scorecard tr.is-pick td,
.scorecard tr.is-pick td strong {
  color: var(--on-accent-soft);
}

.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-text);
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 0.2em;
  white-space: nowrap;
}

.tag-pick {
  background: var(--surface);
  border-color: transparent;
  color: var(--on-accent-soft);
}

.scorecard tr.is-out th,
.scorecard tr.is-out td {
  color: var(--text-muted);
}

.scorecard tr.is-out td {
  white-space: normal;
  font-size: 0.875rem;
}

@media (max-width: 719px) {
  .scorecard th,
  .scorecard td {
    padding: 0.85rem 1rem;
  }

  .tag {
    display: block;
    width: fit-content;
    margin: 0.3rem 0 0;
  }
}

/* ---------- Closing ---------- */

.closing {
  padding-block: 8rem;
  overflow: hidden;
}

.closing-inner {
  position: relative;
}

.closing-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.1;
}

.closing-copy > p {
  margin-top: 1.1rem;
  max-width: 62ch;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.breath-quiet {
  top: 3rem;
  width: 16rem;
  opacity: 0.7;
}

.actions-center {
  position: relative;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

@media (max-width: 719px) {
  .closing {
    padding-block: 5rem;
  }
}

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

.site-footer {
  background: var(--bg-deep);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
}

.footer-brand p {
  color: var(--text-muted);
}

.footer-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 44ch;
}

@media (min-width: 900px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .footer-note {
    text-align: right;
  }
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .breath-circle {
    animation: breathe 8s ease-in-out infinite;
  }

  .btn:hover .arrow {
    transform: translateX(3px);
  }

  .btn:active,
  .tab:active {
    transform: translateY(1px) scale(0.98);
  }

  /* The hidden reveal state only exists once main.js has run. */
  .js .reveal > * {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 600ms var(--ease),
      transform 600ms var(--ease),
      box-shadow 200ms var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js .reveal.is-visible > * {
    opacity: 1;
    transform: none;
  }

  /* Once revealed, cards answer hover at hover speed. */
  .js .reveal.is-visible > .card:hover {
    transform: translateY(-2px);
    transition-delay: 0ms;
    transition-duration: 200ms;
  }

  .js .path-draw {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 900ms var(--ease) 500ms;
  }

  .js .is-visible .path-draw {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card:hover {
    transform: none;
  }

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

@keyframes breathe {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.06;
  }
}
