/* Cork launch site. Tokens are the brief's palette, redefined for dark. */
:root {
  color-scheme: light dark;
  --paper: #f6f1e8;
  --paper-raised: #fffdf9;
  --paper-sunken: #ece5d9;
  --ink: #22201c;
  --ink-muted: #675e54;
  --rule: #e0d8cb;
  --rule-strong: #c9bfb0;
  --teal: #2c6a62;
  --teal-hover: #22554e;
  --teal-soft: #dcebe7;
  --on-teal: #ffffff;
  --cork: #c49a6c;
  --cork-deep: #a87c4f;
  --amber: #8a4b00;
  --amber-soft: #fcecd3;
  --amber-edge: #e7b56a;
  --danger: #a3302a;
  --ok: #2f6b3a;
  --p1: #3d5fc4;
  --p1-soft: #e3e9fa;
  --p2: #1f8a6e;
  --p2-soft: #dbf1ea;
  --p3: #c0437a;
  --p3-soft: #f9e1ec;
  --p4: #6b7a1f;
  --p4-soft: #ecf0d6;
  --p5: #7a4fc7;
  --p5-soft: #ece4fa;
  --note: #fbe58a;
  --note-pink: #f8c9d4;
  --note-blue: #cfe4f5;
  --shadow-paper: 0 1px 1px rgb(60 45 30 / 0.06), 0 6px 16px rgb(60 45 30 / 0.08), 0 18px 40px rgb(60 45 30 / 0.08);
  /* site-only helpers */
  --rust: #b4552a;
  --ok-soft: #dcefdf;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --gutter: clamp(20px, 5vw, 48px);
  --section-space: clamp(40px, 6vw, 80px);
  --display: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181614;
    --paper-raised: #221f1c;
    --paper-sunken: #1c1a17;
    --ink: #eee8e1;
    --ink-muted: #a99f94;
    --rule: #37322d;
    --rule-strong: #4d463f;
    --teal: #6cc2b5;
    --teal-hover: #8ad3c8;
    --teal-soft: #1f3833;
    --on-teal: #10201d;
    --cork: #5a4632;
    --cork-deep: #46362a;
    --amber: #f2b860;
    --amber-soft: #3a2a12;
    --amber-edge: #8a6326;
    --danger: #f08a80;
    --ok: #86cf94;
    --p1: #8aa4f0;
    --p1-soft: #232b45;
    --p2: #5fcfaf;
    --p2-soft: #17352d;
    --p3: #ec89b4;
    --p3-soft: #3f2130;
    --p4: #bccb6a;
    --p4-soft: #2e3317;
    --p5: #b398f0;
    --p5-soft: #2f2645;
    --note: #4a4220;
    --note-pink: #48262f;
    --note-blue: #1f3445;
    --shadow-paper: 0 1px 1px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
    --rust: #f0a074;
    --ok-soft: #1c3322;
  }
}

/* Matched fallback metrics, so the swap to the web fonts does not shift layout */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia");
  size-adjust: 102%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
@media (min-width: 1024px) {
  body {
    font-size: 18px;
  }
}
h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "opsz" 96;
  letter-spacing: -0.03em;
  line-height: 1.05;
  hyphens: manual;
  overflow-wrap: normal;
}
h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.25rem);
}
h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  max-width: 22ch;
}
h3 {
  font-family: var(--body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
a {
  color: var(--teal);
}
a:hover {
  color: var(--teal-hover);
}
code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
.num,
time {
  font-variant-numeric: tabular-nums;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
iframe:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.defs {
  position: absolute;
}
.wrap {
  width: min(72rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
main > section {
  padding-block: var(--section-space);
  scroll-margin-top: 80px;
}
.band {
  background: var(--paper-sunken);
}
.eyebrow {
  font-size: max(0.8rem, 14px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 14px;
}
.lead {
  color: var(--ink-muted);
  max-width: 40rem;
  margin-top: 20px;
}
.teal {
  color: var(--teal);
}
.center {
  text-align: center;
}

/* ---------- Logo ---------- */
.lg-card {
  fill: var(--paper-raised);
  stroke: var(--ink);
}
.lg-p1 {
  fill: var(--p1);
}
.lg-p2 {
  fill: var(--p2);
}
.lg-rust {
  fill: var(--rust);
}
.lg-pin {
  fill: var(--teal);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.logo {
  width: 32px;
  height: 32px;
  flex: none;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 600 1rem/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease);
}
.btn-primary {
  background: var(--teal);
  color: var(--on-teal);
}
.btn-primary:hover {
  background: var(--teal-hover);
  color: var(--on-teal);
}
.btn-ghost,
.btn-outline {
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}
.btn-large {
  min-height: 52px;
  padding: 0 26px;
}
.btn-small {
  padding: 0 18px;
  font-size: 0.95rem;
}
.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}
.btn:hover .arrow {
  transform: translateX(3px);
}
.text-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--teal);
  font: 600 0.9375rem var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-btn[aria-disabled="true"] {
  color: var(--ink-muted);
  cursor: default;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.site-header.is-scrolled::before {
  opacity: 1;
}
.header-row {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav {
  display: none;
}
@media (min-width: 760px) {
  .site-nav {
    display: block;
  }
}
.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transition: transform 200ms var(--ease);
}
.site-nav a:hover {
  color: var(--ink);
}
.site-nav a:hover::after {
  transform: scaleX(1);
}

/* ---------- Cork texture ---------- */
.cork {
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 2px 3px, color-mix(in srgb, var(--cork-deep) 40%, transparent) 1px, transparent 1.6px),
    radial-gradient(circle at 7px 6px, color-mix(in srgb, var(--cork-deep) 32%, transparent) 1.5px, transparent 2.1px),
    repeating-linear-gradient(37deg, color-mix(in srgb, var(--cork-deep) 25%, transparent) 0 1px, transparent 1px 5px);
  background-size:
    7px 7px,
    11px 11px,
    auto;
  background-position:
    0 0,
    3px 5px,
    0 0;
}

/* ---------- Pins ---------- */
.pin {
  position: absolute;
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 2px 1px rgb(0 0 0 / 0.25));
  z-index: 3;
}
.pin-l {
  top: 8px;
  left: 10px;
}
.pin-r {
  top: 8px;
  right: 10px;
}
.pin-c {
  top: -7px;
  left: calc(50% - 7px);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(32px, 6vw, 72px);
}
.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 5fr 7fr;
  }
  /* One sentence per line: capped so the longest line fits the 5/12 column */
  .hero h1 {
    font-size: min(5vw, 4.25rem);
  }
  .hero h1 span {
    display: block;
    white-space: nowrap;
  }
}
.hero h1 {
  margin-bottom: 22px;
}
.hero .lead {
  margin-top: 0;
  font-size: 1.06em;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.small-print {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
@media (max-width: 479px) {
  .btn-row .btn,
  .closing-card .btn,
  .center .btn {
    width: 100%;
  }
}

.hero-visual {
  min-width: 0;
}
.board {
  position: relative;
  border-radius: 20px;
  box-shadow: inset 0 2px 8px rgb(0 0 0 / 0.18);
  padding: 28px 22px 76px;
}
@media (max-width: 639px) {
  .hero-visual > .board,
  .hero-after .board {
    margin-inline: calc(-1 * var(--gutter));
    border-radius: 0;
    padding-inline: 14px;
  }
}
.sheet {
  position: relative;
  background: var(--paper-raised);
  box-shadow: var(--shadow-paper);
  transform: rotate(-1.5deg);
  padding: 26px 14px 14px;
  border-radius: 4px;
  min-height: 340px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.pill-stack {
  display: grid;
}
.pill-stack > * {
  grid-area: 1 / 1;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-warn {
  color: var(--amber);
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px var(--amber-edge);
}
.pill-ok {
  color: var(--ok);
  background: var(--ok-soft);
}
[data-hero] .pill-ok {
  opacity: 0;
}
.sheet-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.rota {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.rota th,
.rota td {
  padding: 3px;
  vertical-align: top;
  text-align: left;
  border-top: 1px solid var(--rule);
}
.rota thead th {
  border-top: 0;
  padding-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.rota thead .today {
  color: var(--teal);
  text-decoration: underline 2px;
  text-underline-offset: 4px;
}
.rota tbody td {
  height: 58px;
  min-width: 72px;
}
.rota tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper-raised);
  padding-left: 8px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.rota .name-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper-raised);
}
.rota tr.p1 th {
  box-shadow: inset 3px 0 var(--p1);
}
.rota tr.p2 th {
  box-shadow: inset 3px 0 var(--p2);
}
.rota tr.p3 th {
  box-shadow: inset 3px 0 var(--p3);
}
.rota tr.p4 th {
  box-shadow: inset 3px 0 var(--p4);
}
.rota tr.p5 th {
  box-shadow: inset 3px 0 var(--p5);
}
.rota .tot,
.rota .tot-col {
  min-width: 92px;
  padding-left: 8px;
}
.tot-line {
  display: block;
  color: var(--ink-muted);
  white-space: nowrap;
}
.tot-line b {
  color: var(--ink);
  font-weight: 600;
}
.is-over .tot-line b,
.is-over > b {
  color: var(--danger);
}
.over {
  display: block;
  color: var(--danger);
  font-weight: 600;
  white-space: nowrap;
}

/* chips: ink on soft fill, 3 px edge in the strong colour */
.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 3px 6px 3px 7px;
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper-raised);
  box-shadow: inset 3px 0 var(--edge, var(--rule-strong));
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.chip b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chip i {
  font-style: normal;
  color: var(--ink-muted);
}
.chip.p1 {
  --edge: var(--p1);
  background: var(--p1-soft);
}
.chip.p2 {
  --edge: var(--p2);
  background: var(--p2-soft);
}
.chip.p3 {
  --edge: var(--p3);
  background: var(--p3-soft);
}
.chip.p4 {
  --edge: var(--p4);
  background: var(--p4-soft);
}
.chip.p5 {
  --edge: var(--p5);
  background: var(--p5-soft);
}
.flag {
  display: block;
  margin-top: 2px;
  color: var(--amber);
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
}
/* display: block above would otherwise beat the hidden attribute */
.flag[hidden],
.over[hidden] {
  display: none;
}
[data-chip] {
  z-index: 2;
}
/* From 640 px the whole week fits the sheet: times wrap after the dash */
@media (min-width: 640px) {
  .rota .chip,
  .rota .flag {
    white-space: normal;
  }
  .rota tbody td {
    min-width: 0;
    height: 80px;
  }
}
/* Phones: the miniature is set at 10 px and scrolls under the pinned names */
@media (max-width: 639px) {
  .rota,
  .rota thead th,
  .rota tbody th,
  .rota .chip {
    font-size: 10px;
  }
  .rota .flag {
    font-size: 9.5px;
  }
  .rota tbody th,
  .rota .name-col {
    box-shadow: 1px 0 0 var(--rule);
  }
}

/* limit bars: a full-width bar scaled with transform */
.bar {
  position: relative;
  display: block;
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--rule);
  overflow: hidden;
}
.bar i,
.bar s {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: var(--teal);
  transform-origin: left center;
  transform: scaleX(var(--v, 0));
}
.bar s {
  background: var(--danger);
}
.bar-danger i {
  background: var(--danger);
}

.sticky-note {
  position: absolute;
  right: clamp(12px, 4%, 36px);
  bottom: 14px;
  width: 180px;
  padding: 16px 16px 18px;
  background: var(--note);
  color: var(--ink);
  font: italic 500 1.0625rem/1.3 var(--display);
  transform: rotate(3deg);
  box-shadow:
    0 2px 3px rgb(0 0 0 / 0.12),
    0 10px 18px rgb(60 45 30 / 0.18);
  z-index: 4;
}
.note-sign {
  display: block;
  margin-top: 4px;
  text-align: right;
}
.hero-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 10px;
  flex-wrap: wrap;
  text-align: center;
}
.hero-caption {
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-style: italic;
}
.state-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0 0 8px;
}
.rm-only {
  display: none;
}
.hero-after {
  margin-top: 24px;
}
.board-small {
  padding-bottom: 22px;
}
.board-small .sheet {
  min-height: 0;
}
.hero-after .hero-caption {
  margin-top: 10px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .rm-only {
    display: block;
  }
  .hero-foot {
    display: none;
  }
  .hero-grid {
    align-items: start;
  }
}

/* Hero sequence states (set by main.js) */
@media (prefers-reduced-motion: no-preference) {
  [data-hero] .sticky-note {
    transition:
      transform 300ms var(--ease),
      opacity 300ms var(--ease),
      box-shadow 300ms var(--ease);
  }
  [data-hero].s-note .sticky-note {
    transform: rotate(3deg) translateY(-4px);
    opacity: 0;
    box-shadow:
      0 4px 6px rgb(0 0 0 / 0.14),
      0 18px 30px rgb(60 45 30 / 0.24);
  }
  [data-chip] {
    transition:
      transform 600ms var(--ease),
      box-shadow 200ms var(--ease);
  }
  [data-chip].is-lifted {
    box-shadow:
      inset 3px 0 var(--edge),
      0 8px 18px rgb(40 30 20 / 0.28);
  }
  [data-flag],
  [data-over],
  .bar s,
  [data-hero] .pill {
    transition: opacity 400ms var(--ease);
  }
  [data-hero] .bar i,
  [data-hero] .bar s {
    transition:
      transform 500ms var(--ease),
      opacity 400ms var(--ease);
  }
  [data-hero].s-totals [data-flag],
  [data-hero].s-totals [data-over],
  [data-hero].s-totals [data-sam-bar] s {
    opacity: 0;
  }
  [data-hero].s-ok .pill-warn {
    opacity: 0;
  }
  [data-hero].s-ok .pill-ok {
    opacity: 1;
  }
  .hero-caption {
    transition: opacity 400ms var(--ease);
  }
  .js .hero-foot:not(.s-caption) .hero-caption {
    opacity: 0;
  }
  .no-anim,
  .no-anim * {
    transition: none !important;
  }
}

/* ---------- The problem ---------- */
.notes {
  list-style: none;
  padding: 0;
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 40px;
  justify-items: center;
}
@media (min-width: 760px) {
  .notes {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}
.notes li {
  max-width: 280px;
  width: 100%;
}
.note {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  padding: 28px;
  margin-bottom: 18px;
  color: var(--ink);
  font: italic 500 1.5rem/1.25 var(--display);
  box-shadow:
    0 2px 3px rgb(0 0 0 / 0.08),
    0 12px 24px rgb(60 45 30 / 0.12);
  transform: rotate(var(--r));
  transition: transform 300ms var(--ease);
}
.note-yellow {
  background: var(--note);
  --r: -2deg;
}
.note-pink {
  background: var(--note-pink);
  --r: 1.5deg;
}
.note-blue {
  background: var(--note-blue);
  --r: -1deg;
}
.note:hover {
  transform: rotate(0) translateY(-2px);
}
.pull {
  margin: clamp(48px, 6vw, 72px) auto 0;
  max-width: 30ch;
  text-align: center;
  font: 500 1.5rem/1.3 var(--display);
  letter-spacing: -0.01em;
}

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 48px;
  position: relative;
}
@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .steps::before {
    content: "";
    position: absolute;
    top: 2.1rem;
    left: 1.5rem;
    right: 10%;
    border-top: 1px dashed var(--rule-strong);
  }
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-num {
  position: relative;
  align-self: flex-start;
  padding-right: 14px;
  background: var(--paper);
  font: 600 3.5rem/1.1 var(--display);
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.step p {
  color: var(--ink-muted);
}
.illo {
  margin-top: 8px;
  min-height: 108px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  display: flex;
  align-items: center;
  gap: 12px;
}
.illo-row {
  font-size: 12px;
}
.mini-name {
  padding: 8px 10px;
  font-weight: 600;
  box-shadow: inset 3px 0 var(--p1);
}
.mini-cell {
  display: grid;
  min-width: 112px;
}
.mini-cell > * {
  grid-area: 1 / 1;
}
.ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--rule-strong);
  border-radius: 5px;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
}
.illo-toggle {
  flex-direction: column;
  align-items: flex-start;
}
.toggles {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  font-size: 13px;
  font-weight: 500;
}
.tog {
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--ink-muted);
}
.tog.is-on {
  background: var(--teal-soft);
  color: var(--ink);
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.badge-pending {
  color: var(--amber);
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px var(--amber-edge);
}
.illo-print {
  justify-content: center;
}
.tiny-sheet {
  position: relative;
  width: 104px;
  aspect-ratio: 297 / 210;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 6px 14px rgb(60 45 30 / 0.14);
  transform: rotate(-2deg);
  padding: 16px 10px 8px;
}
.tiny-sheet .pin {
  top: -5px;
  left: calc(50% - 7px);
}
.tiny-lines {
  display: grid;
  gap: 6px;
}
.tiny-lines i {
  height: 4px;
  border-radius: 2px;
  background: #d7d2ca;
}
.tiny-lines i:nth-child(2) {
  width: 80%;
}
.tiny-lines i:nth-child(4) {
  width: 60%;
}

/* ---------- The checks ---------- */
.bento {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 20px;
}
@media (min-width: 1024px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  box-shadow: 0 1px 2px rgb(60 45 30 / 0.05), 0 8px 24px rgb(60 45 30 / 0.06);
}
.tile p {
  color: var(--ink-muted);
}
.sample {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  line-height: 1.35;
}
.sample .chip {
  font-size: 12px;
}
.sample .flag {
  font-size: 11px;
}
.sample-totals {
  display: grid;
  gap: 14px;
}
.trow {
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 12px;
  align-items: baseline;
}
.trow .bar {
  grid-column: 2;
  height: 6px;
  border-radius: 3px;
}
.tname {
  font-weight: 600;
  padding-left: 9px;
  box-shadow: inset 3px 0 var(--edge);
}
.tname.p1 {
  --edge: var(--p1);
}
.tname.p2 {
  --edge: var(--p2);
}
.tname.p4 {
  --edge: var(--p4);
}
.tval {
  color: var(--ink-muted);
}
.tval b {
  color: var(--ink);
}
.tval .over {
  display: inline;
  margin-left: 8px;
}
.sample-rest {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}
.gap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding-top: 8px;
}
.gap-line {
  width: 100%;
  height: 8px;
  border: 1.5px solid var(--amber);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.gap-label {
  font-weight: 600;
  color: var(--amber);
}
.sample-overlap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.overlap {
  position: relative;
  display: grid;
  max-width: 300px;
}
.overlap .o1 {
  width: 92%;
}
.overlap .o2 {
  width: 64%;
  margin: -6px 0 0 34%;
  box-shadow:
    inset 3px 0 var(--edge),
    0 4px 10px rgb(40 30 20 / 0.16);
  outline: 1px solid var(--paper-raised);
}
.sample-count {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.sample-count .pill {
  justify-self: start;
  font-size: 13px;
  padding: 4px 12px;
}
.issues {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--amber-edge);
  background: var(--amber-soft);
  color: var(--ink);
}
.issues span::before {
  content: "⚠ ";
  color: var(--amber);
}

/* ---------- Swaps ---------- */
.split {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 1024px) {
  .split {
    grid-template-columns: 5fr 7fr;
  }
}
.split-copy > p:not(.eyebrow) {
  margin-top: 20px;
  color: var(--ink-muted);
}
.checks {
  list-style: none;
  padding: 0;
  margin-top: 22px;
  display: grid;
  gap: 12px;
}
.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ck {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.2em;
}
.ck-bg {
  fill: var(--teal-soft);
}
.ck-mark {
  stroke: var(--teal);
}
.swap-card {
  padding: clamp(22px, 3.5vw, 36px);
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  box-shadow: var(--shadow-paper);
  display: grid;
  gap: 16px;
  min-width: 0;
}
.swap-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kind {
  font-size: 0.875rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--ink-muted);
}
.swap-main {
  font-size: 1.125em;
  line-height: 1.4;
}
.swap-note {
  border-left: 3px solid var(--rule-strong);
  padding-left: 14px;
  color: var(--ink-muted);
  font-style: italic;
}
.effect {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.effect caption {
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink-muted);
  padding-bottom: 6px;
}
.effect th,
.effect td {
  text-align: left;
  padding: 10px 8px;
  border-top: 1px solid var(--rule);
}
.effect thead th {
  border-top: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.effect th:first-child,
.effect td:first-child {
  padding-left: 0;
}
.effect tbody th {
  font-weight: 600;
  white-space: nowrap;
}
.effect td > *,
.effect td {
  white-space: nowrap;
}
.effect td.is-over {
  white-space: normal;
}
@media (max-width: 479px) {
  .effect th,
  .effect td {
    padding-inline: 5px;
  }
}
.effect td.is-over {
  color: var(--danger);
  font-weight: 600;
}
.effect b {
  font-weight: 600;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
}
.dot.p2 {
  background: var(--p2);
}
.dot.p3 {
  background: var(--p3);
}
.ok-line {
  color: var(--ok);
  font-weight: 600;
}
.swap-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-fake {
  min-height: 44px;
  cursor: default;
}

/* ---------- Try it ---------- */
.browser {
  margin-top: clamp(32px, 4vw, 48px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-paper);
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}
.browser-bar {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
}
.dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 7px;
}
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule-strong);
}
.browser-label {
  font-size: 14px;
  color: var(--ink-muted);
}
.browser iframe {
  display: block;
  width: 100%;
  height: 780px;
  border: 0;
  background: var(--paper);
}
@media (max-width: 639px) {
  .dots {
    display: none;
  }
  .browser iframe {
    height: 720px;
  }
}
.browser + .center {
  margin-top: 24px;
}

/* ---------- Printout ---------- */
.print-strip {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(36px, 6vw, 72px) 0;
  border-radius: 20px;
  box-shadow: inset 0 2px 8px rgb(0 0 0 / 0.18);
  display: flex;
  justify-content: center;
}
.print-sheet {
  position: relative;
  width: min(760px, 92%);
  aspect-ratio: 297 / 210;
  background: #ffffff;
  color: #1a1a1a;
  transform: rotate(1deg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15), 0 10px 28px rgb(40 30 20 / 0.25);
  container-type: inline-size;
}
.print-inner {
  position: absolute;
  inset: 0;
  padding: 7cqi 4.5cqi 4cqi;
  font-family: var(--body);
}
.print-title {
  font: 600 3.2cqi/1.2 var(--display);
  letter-spacing: -0.01em;
  margin-bottom: 2.6cqi;
}
.print-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 1.45cqi;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.print-table th,
.print-table td {
  text-align: left;
  vertical-align: top;
  padding: 1.8cqi 0.6cqi;
  border-bottom: 1px solid #ddd8d0;
  overflow: hidden;
  white-space: nowrap;
}
.print-table thead th {
  font-weight: 600;
  color: #5d5d5d;
  border-bottom: 1.5px solid #1a1a1a;
}
.print-table thead th:first-child {
  width: 10%;
}
.print-table tbody th {
  font-weight: 600;
}
.print-table b {
  display: block;
  font-weight: 600;
}
.print-table i {
  display: block;
  font-style: normal;
  color: #6b6b6b;
}
.print-table .ptot,
.print-table thead th:last-child {
  text-align: right;
  font-weight: 600;
}

/* ---------- Questions ---------- */
.faq {
  max-width: 44rem;
}
.faq h2 {
  margin-bottom: 28px;
}
details {
  border-bottom: 1px solid var(--rule);
}
details:first-of-type {
  border-top: 1px solid var(--rule);
}
summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 44px 12px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  margin-top: -0.6em;
  font: 400 1.6rem/1.2 var(--body);
  color: var(--teal);
  transition: transform 200ms var(--ease);
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  padding: 0 0 20px;
  color: var(--ink-muted);
}

/* ---------- Closing ---------- */
.closing-band {
  border-radius: 24px;
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px);
  box-shadow: inset 0 2px 8px rgb(0 0 0 / 0.18);
  display: flex;
  justify-content: center;
}
.closing-card {
  position: relative;
  max-width: 40rem;
  width: 100%;
  text-align: center;
  padding: clamp(32px, 5vw, 52px) clamp(20px, 4vw, 48px);
  background: var(--paper-raised);
  box-shadow: var(--shadow-paper);
  border-radius: 6px;
  transform: rotate(-1deg);
  display: grid;
  gap: 18px;
  justify-items: center;
}
.closing-card .pin {
  width: 18px;
  height: 18px;
  top: -9px;
  left: calc(50% - 9px);
}
.closing-card h2 {
  margin-inline: auto;
}
.closing-card p {
  color: var(--ink-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 32px;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-row p {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
@media (max-width: 639px) {
  .footer-row {
    flex-direction: column;
    text-align: center;
  }
}

/* Reduced motion: hover lifts stay, but are instant */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Scroll reveals (only with JS and motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .notes .note {
    transition:
      transform 500ms var(--ease),
      opacity 500ms var(--ease);
  }
  .js .notes:not(.is-in) .note {
    opacity: 0;
    transform: translateY(-12px) rotate(0);
  }
  .js .notes li:nth-child(2) .note {
    transition-delay: 80ms;
  }
  .js .notes li:nth-child(3) .note {
    transition-delay: 160ms;
  }
  .js .notes.is-in .note:hover {
    transition-delay: 0ms;
  }

  .js .fill-in,
  .js .ghost,
  .js .pop-in,
  .js .drop {
    transition:
      opacity 400ms var(--ease) 200ms,
      transform 400ms var(--ease) 200ms;
  }
  .js .step:not(.is-in) .fill-in {
    opacity: 0;
    transform: scale(0.92);
  }
  .js .step:not(.is-in) .ghost {
    opacity: 1;
  }
  .js .step:not(.is-in) .pop-in {
    opacity: 0;
    transform: translateY(6px);
  }
  .js .step:not(.is-in) .drop {
    opacity: 0;
    transform: translateY(-6px);
  }

  .js .tile {
    transition:
      transform 500ms var(--ease),
      opacity 500ms var(--ease);
  }
  .js .tile:not(.is-in) {
    opacity: 0;
    transform: translateY(12px);
  }
  .js .tile:nth-child(2) {
    transition-delay: 60ms;
  }
  .js .tile:nth-child(3) {
    transition-delay: 120ms;
  }
  .js .tile:nth-child(4) {
    transition-delay: 180ms;
  }
  .js .fill-up i {
    transition: transform 600ms var(--ease) 250ms;
  }
  .js .tile:not(.is-in) .fill-up i {
    transform: scaleX(0);
  }
  .js .sample-totals .over {
    transition: opacity 300ms var(--ease) 850ms;
  }
  .js .tile:not(.is-in) .sample-totals .over {
    opacity: 0;
  }

  .js .print-sheet {
    transition:
      transform 600ms var(--ease),
      opacity 400ms var(--ease);
  }
  .js .print-sheet:not(.is-in) {
    opacity: 0;
    transform: translateY(-10px) rotate(3deg);
  }
  .js .print-sheet .pin {
    transition:
      transform 300ms var(--ease) 700ms,
      opacity 300ms var(--ease) 700ms;
  }
  .js .print-sheet:not(.is-in) .pin {
    opacity: 0;
    transform: scale(0.4);
  }

  .js .closing-card {
    transition:
      transform 600ms var(--ease),
      opacity 400ms var(--ease);
  }
  .js .closing-card:not(.is-in) {
    opacity: 0;
    transform: rotate(-3deg) translateY(8px);
  }
}
