/* Habitat — page styles. Style source: spec 5.2 (taken from focusindustries.tech).
   Tokens in :root are shared with css/check.css (Task 4). */

:root {
  --bg: rgb(12 12 12);
  --bg-2: rgb(25 25 25);
  --text: rgb(255 255 255);
  --muted: rgb(165 167 170);
  --accent: oklch(0.637 0.237 25.331);
  --line: rgb(255 255 255 / 0.24);
  --radius: 2px;
  --font: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --card: rgb(167 168 170);
  --ink: rgb(12 12 12);
  --ok: oklch(0.76 0.15 152);
  --line-strong: rgb(255 255 255 / 0.55);

  --gx: clamp(16px, 2.9vw, 48px);
  --gutter: clamp(10px, 1.45vw, 24px);
  --section-y: clamp(104px, 11.5vw, 184px);

  --fs-display: clamp(50px, 10.84vw, 200px);
  --fs-h2: clamp(30px, 3.125vw, 56px);
  --fs-lead: clamp(21px, 2.1vw, 36px);
  --fs-h4: clamp(18px, 1.42vw, 24px);
  --fs-body: clamp(15px, 1.08vw, 17px);
  --fs-small: 13px;
  --fs-label: 10.5px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: rgb(255 255 255 / 0.28) var(--bg);
  scrollbar-width: thin;
}

/* faint grain over everything, as on the reference */
html::after {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: 90;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.075;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-size: var(--fs-body);
  line-height: 1.55;
  letter-spacing: -0.01em;
  overflow-x: clip;
}

::selection { background: var(--text); color: var(--ink); }

img, svg { display: block; }
p, h1, h2, h3, h4, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
strong { font-weight: 600; }

:focus-visible {
  outline: 1.5px solid var(--text);
  outline-offset: 3px;
  border-radius: 1px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.muted { color: var(--muted); }

/* visible placeholders the owner still has to fill */
.todo {
  color: var(--muted);
  outline: 1px dashed rgb(255 255 255 / 0.4);
  outline-offset: 0.2em;
}

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

.display {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.label {
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.label .rule {
  display: inline-block;
  flex: 0 0 auto;
  width: clamp(48px, 9.6vw, 140px);
  height: 1px;
  background: var(--text);
}

sup.fn {
  font-size: 0.55em;
  line-height: 0;
  vertical-align: 0.75em;
  margin-left: 0.12em;
  letter-spacing: 0;
}
sup.fn a { position: relative; text-decoration: none; padding: 0 0.1em; }
sup.fn a:hover { text-decoration: underline; }
/* a 32px tap area around the small number; it looks the same */
sup.fn a::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
}

/* ---------- layout ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.grid > * { grid-column: 1 / -1; }

.sec { padding: var(--section-y) var(--gx) 0; }
.sec-title { margin-bottom: clamp(40px, 5vw, 72px); }

@media (min-width: 1024px) {
  .sec-title { grid-column: 1 / 4; margin-bottom: 0; padding-top: 0.12em; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 1.5em;
  border: 0;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), opacity 0.25s;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 86%, white); }
.btn-primary:active:not(:disabled) { background: color-mix(in oklab, var(--accent) 88%, black); }
.btn-primary:focus-visible { outline-color: var(--accent); }
.btn-primary:disabled {
  background: color-mix(in oklab, var(--accent) 40%, var(--bg));
  color: rgb(255 255 255 / 0.62);
  cursor: not-allowed;
}

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 1.6vw, 24px) var(--gx) 0;
  mix-blend-mode: difference;
  pointer-events: none;
}
.topbar a { pointer-events: auto; }
/* Over the light price card the blend turns the white words mid-grey (about 3:1).
   main.js adds this class while the card is under the bar: white words on a dark strip. */
.topbar.is-over-light {
  mix-blend-mode: normal;
  padding-bottom: 8px;
  background: rgb(12 12 12 / 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark { width: 18px; height: 18px; color: var(--text); }

.topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.topbar-cta:hover { text-decoration: underline; }

.plus {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
}
.plus::before, .plus::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.plus::before { left: 0; right: 0; top: 4px; height: 1px; }
.plus::after { top: 0; bottom: 0; left: 4px; width: 1px; }

/* ---------- 1. first screen ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 112px var(--gx) clamp(28px, 3.2vw, 52px);
  overflow: clip;
  scroll-margin-top: 0;
}

/* the made-up app's code a stranger can read; a scan line finds the key */
.hero-code {
  position: absolute;
  z-index: -1;
  top: clamp(72px, 9vw, 120px);
  right: var(--gx);
  width: min(58vw, 980px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 32%, rgb(0 0 0 / 0.22) 46%, transparent 60%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 32%, rgb(0 0 0 / 0.22) 46%, transparent 60%);
}

@media (max-width: 899px) {
  .hero-code {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 22%, rgb(0 0 0 / 0.2) 32%, transparent 40%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 22%, rgb(0 0 0 / 0.2) 32%, transparent 40%);
  }
}
@media (max-width: 759px) {
  .hero-code { left: var(--gx); width: auto; }
  .hero-label .rule { display: none; }
}

.code-scan { position: relative; overflow: hidden; }

.code {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(10.5px, 0.98vw, 15px);
  line-height: 1.8;
  letter-spacing: 0;
  white-space: pre;
  color: rgb(255 255 255 / 0.3);
  tab-size: 2;
}
.code .c-kw { color: rgb(255 255 255 / 0.46); }
.code .c-st { color: rgb(255 255 255 / 0.62); }
.code .c-cm { color: rgb(255 255 255 / 0.3); }

.code .c-key {
  display: inline-block;
  margin: 0 -0.6em;
  padding: 0 0.6em;
  border-radius: 1px;
  color: rgb(255 255 255 / 0.5);
  animation: key-find 8s linear infinite;
}
.code .c-key .c-kw, .code .c-key .c-st { color: inherit; }

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 82%, rgb(255 255 255 / 0.045) 99.2%, rgb(255 255 255 / 0.55) 99.6%, rgb(255 255 255 / 0.55) 100%);
  transform: translateY(-100%);
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(-100%); opacity: 1; }
  70% { transform: translateY(0); opacity: 1; }
  76%, 100% { transform: translateY(0); opacity: 0; }
}
/* key line sits at 5.5 / 26 of the block: the scan reaches it at about 15% */
@keyframes key-find {
  0%, 14.6% { color: rgb(255 255 255 / 0.5); background: transparent; box-shadow: none; }
  16%, 95% {
    color: var(--accent);
    background: color-mix(in oklab, var(--accent) 16%, transparent);
    box-shadow: inset 2px 0 0 var(--accent);
  }
  100% { color: rgb(255 255 255 / 0.5); background: transparent; box-shadow: none; }
}

.hero-main { position: relative; }

.hero-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(22px, 2.6vw, 40px);
}

.hero-title {
  margin-left: -0.045em;
  margin-bottom: clamp(32px, 3.6vw, 56px);
  text-wrap: balance;
}
.hero-title .ln { display: block; overflow: clip; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .ln > span { display: inline-block; }

.hero-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
  align-items: end;
}

.hero-sub {
  grid-column: 1 / -1;
  max-width: 30ch;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.hero-row .check-form { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .hero-sub { grid-column: 1 / 6; }
  .hero-row .check-form { grid-column: 7 / -1; }
}

/* ---------- the check form (top and bottom) ---------- */

.check-form { width: 100%; }

.cf-bar {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgb(12 12 12 / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.25s var(--ease-out);
}
.cf-bar:focus-within { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }

.cf-bar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 64px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
  caret-color: var(--text);
  outline: none;
}
.cf-bar input::placeholder { color: var(--muted); opacity: 1; }

.cf-bar .btn {
  margin: 6px;
  min-height: 0;
  padding: 0 1.4em;
}

.cf-consent {
  display: flex;
  text-wrap: pretty; /* no lone last word, like "it." at 900px */
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.cf-consent input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.cf-consent input:hover { border-color: var(--text); }
.cf-consent input:checked { background: var(--text); border-color: var(--text); }
.cf-consent input::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 2.5px;
  width: 5px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.15s, transform 0.25s var(--ease-out);
}
.cf-consent input:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }

.cf-note {
  text-wrap: pretty;
  margin-top: 12px;
  padding-left: 32px;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 599px) {
  .cf-bar { flex-direction: column; }
  .cf-bar input { height: 58px; padding: 0 16px; }
  .cf-bar .btn { margin: 0 6px 6px; min-height: 52px; }
}

/* ---------- 2. why now ---------- */

.why .why-text { display: grid; gap: 1.1em; }
.why .why-text .lead { max-width: 24ch; }

.why-chart { margin-top: 56px; }
.dots { width: 100%; height: auto; }
#dot-all circle { fill: rgb(255 255 255 / 0.26); }
#dot-open circle { fill: var(--accent); }
.dots-open { transform-box: fill-box; transform-origin: 0 0; }

.why-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 18px;
  font-size: var(--fs-small);
  font-weight: 500;
}
.lg { display: inline-flex; align-items: center; gap: 9px; }
.lg::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.lg-open::before { background: var(--accent); }
.lg-all { color: var(--muted); }
.lg-all::before { background: rgb(255 255 255 / 0.32); }

.notes-src {
  margin-top: clamp(48px, 5vw, 80px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--muted);
}
.notes-src li { position: relative; max-width: 72ch; padding-left: 1.9em; scroll-margin-top: 80px; } /* clear of the fixed top bar after a footnote jump */
.notes-src li + li { margin-top: 8px; }
.notes-src .fn-n { position: absolute; left: 0; top: 0; color: var(--text); font-weight: 500; }
.notes-src a { color: var(--text); }
.notes-src li:target { color: var(--text); }

@media (min-width: 1024px) {
  .why .why-text { grid-column: 4 / 9; }
  .why-chart { grid-column: 9 / -1; grid-row: 1 / span 2; margin-top: 0.4em; align-self: start; }
  .why-src { grid-column: 4 / -1; }
}

/* ---------- 3. what we check ---------- */

.rows { border-top: 1px solid var(--line); }

.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 10px;
  align-items: baseline;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
}

.row-art {
  grid-column: 1 / -1;
  width: 72px;
  height: 24px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  overflow: visible;
  align-self: center;
}
.row-art .dash { stroke-dasharray: 2 2.5; }

.row-title {
  grid-column: 1 / -1;
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.row-num { font-weight: 400; color: var(--muted); margin-right: 0.3em; }

.row-text {
  grid-column: 1 / -1;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.checks-after {
  margin-top: clamp(40px, 4.5vw, 72px);
  max-width: 38ch;
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

@media (min-width: 760px) {
  .row { padding: 26px 0 28px; }
  .row-art { grid-column: 1 / 3; }
  .row-title { grid-column: 4 / 8; }
  .row-text { grid-column: 9 / -1; }
}
@media (min-width: 1024px) {
  .checks .sec-title { margin-bottom: clamp(48px, 5vw, 88px); }
  .checks-after { grid-column: 4 / 11; }
}

/* ---------- 4. what can go wrong ---------- */

.flaws-intro {
  max-width: 34ch;
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--muted);
  text-wrap: pretty;
}

@media (min-width: 1024px) {
  .flaws-intro { grid-column: 4 / 11; }
}

/* 2 groups: the free check's flaws, then the full check's */
.flaw-group { margin-top: clamp(64px, 7vw, 120px); }
.flaw-group + .flaw-group { margin-top: clamp(96px, 10vw, 168px); }
.flaw-group-head {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.flaw-group-title {
  max-width: 30ch;
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.flaw-group-sub {
  max-width: 46ch;
  text-wrap: pretty;
  margin-top: 12px;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--muted);
}
@media (min-width: 1024px) {
  .flaw-group-title, .flaw-group-sub { grid-column: 4 / 11; }
}

.flaw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(64px, 7vw, 112px) var(--gutter);
  margin-top: clamp(40px, 4.5vw, 72px);
}
@media (min-width: 820px) {
  .flaw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(var(--gutter) * 2); }
}

.flaw { min-width: 0; }

.flaw-body {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  max-width: 60ch;
}

.flaw-title {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.flaw-num { font-weight: 400; color: var(--muted); }

.flaw-meta {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}
.flaw-meta strong { color: var(--text); }

.flaw-text { font-size: var(--fs-body); line-height: 1.5; }
.flaw-case, .flaw-note { font-size: 14px; line-height: 1.5; color: var(--muted); }
.flaw-case sup.fn a { color: var(--text); }

.flaws-after { margin-top: clamp(72px, 8vw, 128px); padding: 0; }
.flaws-cta { margin-top: 32px; }
.flaws-src { columns: 1; }

@media (min-width: 1024px) {
  .flaws-cta { grid-column: 4 / -1; }
  .flaws-src { grid-column: 4 / -1; columns: 2; column-gap: calc(var(--gutter) * 2); }
  .flaws-src li { break-inside: avoid; }
}

/* ---------- 5. how it works ---------- */

.notes {
  display: grid;
  gap: 48px var(--gutter);
}
.note-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.note-label .rule { width: auto; flex: 1 1 auto; max-width: 120px; background: var(--line-strong); }
.note-text {
  max-width: 18ch;
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

@media (min-width: 760px) {
  .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .notes { grid-column: 4 / -1; }
}

/* ---------- 6. prices: the light-grey spec card ---------- */

.prices { padding-left: var(--gx); padding-right: var(--gx); }

.spec {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(24px, 3.4vw, 56px) clamp(18px, 3.4vw, 56px) clamp(28px, 3.4vw, 52px);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
}
.spec ::selection { background: var(--ink); color: var(--card); }

.spec-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(56px, 8vw, 140px);
}
.spec-head .h2 { font-size: clamp(30px, 3.125vw, 56px); }
.spec-mark { width: 22px; height: 22px; color: var(--ink); }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.spec-table thead th {
  padding: 0 16px 12px 0;
  border-bottom: 3px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  vertical-align: bottom;
  letter-spacing: -0.01em;
}
.spec-table tbody th,
.spec-table tbody td {
  padding: 22px 16px 30px 0;
  border-bottom: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}
.spec-table tbody th {
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.spec-table .price {
  font-size: clamp(24px, 2.3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
.spec-table td:last-child { max-width: 44ch; padding-right: 0; }

.spec-note {
  margin-top: 28px;
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (min-width: 900px) {
  .spec { width: calc(100% * 10 / 12); }
  .spec-table thead th:nth-child(1) { width: 22%; }
  .spec-table thead th:nth-child(2) { width: 14%; }
  .spec-table thead th:nth-child(3) { width: 20%; }
}

@media (max-width: 759px) {
  .spec-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; }
  .spec-table tbody tr { padding: 20px 0 22px; border-top: 3px solid var(--ink); }
  .spec-table tbody tr + tr { border-top-width: 1px; }
  .spec-table tbody tr:last-child { border-bottom: 1px solid var(--ink); }
  .spec-table tbody th, .spec-table tbody td { padding: 0; border: 0; }
  .spec-table tbody th { margin-bottom: 14px; }
  .spec-table tbody td { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 7px 0; }
  .spec-table tbody td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.6;
  }
  .spec-table .price { font-size: 24px; white-space: normal; }
}

/* ---------- 7. who checks ---------- */

.who-text { display: grid; gap: 0.9em; }
.who-text .lead { max-width: 30ch; }
@media (min-width: 1024px) {
  .who-text { grid-column: 4 / 11; }
}

/* ---------- 8. questions ---------- */

.faq-list { border-top: 1px solid var(--line); }
.faq .sec-title { margin-bottom: clamp(40px, 5vw, 80px); }
.faq-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 10px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--line);
}
.faq-row dt {
  grid-column: 1 / -1;
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.faq-row dd {
  grid-column: 1 / -1;
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
@media (min-width: 760px) {
  .faq-row dt { grid-column: 1 / 6; }
  .faq-row dd { grid-column: 7 / -1; }
}
@media (min-width: 1024px) {
  .faq-row dt { grid-column: 4 / 8; }
  .faq-row dd { grid-column: 9 / -1; }
}

/* ---------- 9. bottom call to action ---------- */

.cta {
  padding: calc(var(--section-y) * 1.3) var(--gx) clamp(72px, 8vw, 128px);
}
.cta-title {
  max-width: 11.5em;
  margin-left: -0.045em;
  margin-bottom: clamp(40px, 4.5vw, 72px);
  font-size: clamp(46px, 8.4vw, 160px);
  text-wrap: balance;
}
.check-form-bottom { max-width: 720px; }
@media (min-width: 1024px) {
  .check-form-bottom { margin-left: calc((100% - var(--gutter) * 11) / 12 * 3 + var(--gutter) * 3); }
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 64px var(--gx) 56px;
  border-top: 1px solid var(--line);
  margin: 0 var(--gx);
  font-size: var(--fs-small);
  text-align: center;
}
.foot-mark { width: 28px; height: 28px; color: var(--text); }
.foot-nav { display: flex; gap: 24px; color: var(--muted); }
.foot-nav a, .footer nav a, .doc-home, .foot-line a, .footer p a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }

/* ---------- motion: load + scroll-in reveals (main.js) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  html::after { animation: grain 0.9s steps(1) infinite; }

  .hero-title .ln > span { animation: rise 1.25s var(--ease-out) both; }
  .hero-title .ln + .ln > span { animation-delay: 0.09s; }
  .hero-label, .hero-row { animation: fade-up 1.1s var(--ease-out) 0.25s both; }
  .hero-code { animation: fade-in 1.6s var(--ease-out) 0.1s both; }

  [data-reveal] {
    transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out), clip-path 1.1s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  [data-reveal].is-pending { opacity: 0; transform: translateY(32px); }
  /* headings come into focus rather than slide (no clip-path: it hides them from the observer) */
  .h2[data-reveal], .cta-title[data-reveal] { transition-property: opacity, transform, filter; }
  .h2[data-reveal].is-pending, .cta-title[data-reveal].is-pending { opacity: 0; transform: translateY(0.25em); filter: blur(10px); }

  .why-chart .dots-open { transition: transform 1.6s var(--ease-io) 0.35s; }
  .why-chart.is-pending .dots-open { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .scanline { display: none; }
  .code .c-key {
    animation: none;
    color: var(--accent);
    background: color-mix(in oklab, var(--accent) 16%, transparent);
    box-shadow: inset 2px 0 0 var(--accent);
  }
}

@keyframes rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-4%, 3%); }
  33% { transform: translate(3%, -5%); }
  50% { transform: translate(-6%, -2%); }
  67% { transform: translate(5%, 4%); }
  83% { transform: translate(-2%, 6%); }
}

@media (forced-colors: active) {
  .btn-primary { border: 1px solid ButtonText; }
  html::after { display: none; }
}

/* ---------- extra pages: privacy, terms, thanks, 404 (markup from Task 5) ---------- */

.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(120px, 14vw, 200px) var(--gx) clamp(80px, 9vw, 140px);
}
.doc > .label { margin-bottom: 28px; color: var(--muted); }
.doc h1 {
  margin-bottom: clamp(28px, 3vw, 44px);
  font-size: clamp(44px, 6.7vw, 112px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.doc-lead {
  margin-bottom: 20px;
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.doc-date { color: var(--muted); font-size: var(--fs-small); }
.doc section {
  margin-top: clamp(48px, 5vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.doc h2 {
  margin-bottom: 16px;
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.doc p, .doc li { max-width: 64ch; line-height: 1.6; }
.doc p + p { margin-top: 12px; }
.doc section > p, .doc li { color: rgb(255 255 255 / 0.86); }
.doc ul { display: grid; gap: 10px; margin: 14px 0; }
.doc ul li { position: relative; padding-left: 22px; }
.doc ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--muted);
}
.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.doc a { color: var(--text); }
.doc-steps {
  display: grid;
  gap: 28px;
  margin: clamp(40px, 5vw, 64px) 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.doc-steps .note {
  margin-bottom: 10px;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-steps li p:not(.note) { font-size: var(--fs-h4); line-height: 1.35; letter-spacing: -0.02em; }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  margin: 0 var(--gx);
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--muted);
}
.footer nav { display: flex; gap: 24px; }
.footer nav a:last-child { justify-content: flex-end; } /* the words stay flush with the right edge */
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }
