/* ==========================================================================
   AgentRank Checker, one stylesheet.
   Every colour, face and size lives in the token block below. Swap a hex here
   and the whole site follows. Light is the default (the paper of a report
   card); [data-theme="dark"] is the ink-on-night version, designed in full.
   Monospace is reserved for literal code and URLs.
   ========================================================================== */

:root {
  /* ── Colour: light (default) ────────────────────────────────────────── */
  --bg:            #f7f5fd;   /* paper with a violet whisper */
  --bg-2:          #efebfa;   /* alternate band */
  --surface:       #ffffff;   /* cards, the report card itself */
  --raised:        #f3effc;   /* nested surfaces, tracks */
  --line:          #e3ddf5;   /* hairlines */
  --line-strong:   #c9bfec;
  --text:          #1a1433;
  --text-2:        #3f3764;
  --muted:         #675e8c;
  --accent:        #6b48f5;   /* the purple */
  --accent-strong: #5636d6;   /* links, hover */
  --accent-deep:   #4b2fc4;
  --accent-ink:    #ffffff;   /* text set on the accent */
  --accent-soft:   #ece7ff;   /* tinted fills */
  --glow:          rgba(107, 72, 245, .16);
  --pass:          #16855a;
  --pass-soft:     #dcf4e8;
  --partial:       #9a6414;
  --partial-soft:  #fbeed0;
  --fail:          #c92d54;
  --fail-soft:     #fde2e9;
  --na:            #7d7799;
  --na-soft:       #ecebf3;
  --grade-a:       #16855a;
  --grade-b:       #5636d6;
  --grade-c:       #9a6414;
  --grade-d:       #c45a17;
  --grade-f:       #c92d54;
  --shadow:        0 24px 50px -30px rgba(50, 30, 110, .35);
  --shadow-chip:   0 14px 28px -14px rgba(40, 25, 90, .4);
  --mock-sky-1:    #e2e8ff;
  --mock-sky-2:    #f2ecff;
  --mock-house:    #ffffff;
  --mock-roof:     rgba(107, 72, 245, .55);
  --mock-photo-1:  linear-gradient(135deg, #cdb9ff, #8f74f0);
  --mock-photo-2:  linear-gradient(135deg, #bfe3ff, #7fb0f5);
  --mock-photo-3:  linear-gradient(135deg, #ffd7c2, #f59a72);

  /* ── Type ───────────────────────────────────────────────────────────── */
  --font-display: "Gabarito", "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --text-base:    1.0625rem;   /* 17px */
  --leading:      1.6;
  --h1:           clamp(2.6rem, 5.6vw, 4.6rem);
  --h2:           clamp(1.7rem, 3vw, 2.4rem);
  --h3:           1.2rem;

  /* ── Layout ─────────────────────────────────────────────────────────── */
  --wrap:         1160px;
  --wrap-narrow:  720px;
  --gutter:       clamp(1.1rem, 4vw, 2.5rem);
  --radius:       18px;
  --radius-sm:    10px;
  --space-1: .5rem; --space-2: 1rem; --space-3: 1.75rem; --space-4: 2.75rem; --space-5: 4.5rem; --space-6: 7rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  --bg:            #0b0914;
  --bg-2:          #100d1d;
  --surface:       #161022;
  --raised:        #1f1832;
  --line:          #2a2141;
  --line-strong:   #3d3060;
  --text:          #f1ecff;
  --text-2:        #cdc3ea;
  --muted:         #a196c7;
  --accent:        #9b7bff;
  --accent-strong: #bda8ff;
  --accent-deep:   #6a4cff;
  --accent-ink:    #0b0914;
  --accent-soft:   #241a48;
  --glow:          rgba(122, 90, 255, .35);
  --pass:          #4ade9a;
  --pass-soft:     rgba(74, 222, 154, .14);
  --partial:       #f4c95d;
  --partial-soft:  rgba(244, 201, 93, .14);
  --fail:          #ff6b8b;
  --fail-soft:     rgba(255, 107, 139, .14);
  --na:            #8a82ad;
  --na-soft:       rgba(138, 130, 173, .16);
  --grade-a:       #4ade9a;
  --grade-b:       #bda8ff;
  --grade-c:       #f4c95d;
  --grade-d:       #ff9f6b;
  --grade-f:       #ff6b8b;
  --shadow:        0 24px 60px -30px rgba(0, 0, 0, .8);
  --shadow-chip:   0 14px 30px -12px rgba(0, 0, 0, .7);
  --mock-sky-1:    #1b1636;
  --mock-sky-2:    #261d4a;
  --mock-house:    #2e2552;
  --mock-roof:     #7a5cff;
  --mock-photo-1:  linear-gradient(135deg, #5d47b8, #33256e);
  --mock-photo-2:  linear-gradient(135deg, #3c6fb3, #223f6b);
  --mock-photo-3:  linear-gradient(135deg, #b5643f, #6b3a25);
}

/* ── Fonts (self-hosted, OFL) ─────────────────────────────────────────── */
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/assets/fonts/gabarito.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/instrument-sans.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/instrument-sans-italic.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2"); }

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: var(--h1); font-weight: 800; letter-spacing: -.035em; line-height: .95; }
h2 { font-size: var(--h2); font-weight: 700; }
h3 { font-size: var(--h3); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; overflow-x: auto; line-height: 1.5; }
strong { font-weight: 600; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: .5rem .9rem; border-radius: var(--radius-sm); z-index: 100; font-weight: 600; }
.skip:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 .9rem; }
.lead { font-size: 1.2rem; color: var(--text-2); max-width: 58ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.mono { font-weight: 600; font-variant-numeric: tabular-nums; } /* check ids and grade letters in tables: a label, not code */

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .98rem/1 var(--font-body);
  padding: .85rem 1.25rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  white-space: nowrap; /* a pill never breaks its own label; tight rows wrap whole buttons instead */
  transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
:root[data-theme="dark"] .btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-head { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.site-head__row { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.brand .mark { color: var(--text); flex: none; }
.brand__name em { font-style: normal; font-weight: 400; color: var(--muted); }
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.theme-toggle { background: transparent; border: 1px solid var(--line-strong); color: var(--text-2); width: 2.4rem; height: 2.4rem; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ── Check form ───────────────────────────────────────────────────────── */
.check-form { margin: 0; }
.check-form__label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.check-form__bar {
  display: flex; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px;
  padding: .35rem .35rem .35rem 1rem;
  box-shadow: 0 10px 30px -22px rgba(50, 30, 110, .5);
  transition: border-color .15s, box-shadow .2s;
}
.check-form__bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.check-form__scheme { align-self: center; font-size: 1rem; color: var(--muted); user-select: none; }
.check-form__input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text);
  font: 500 1.15rem/1 var(--font-body); padding: .85rem .4rem;
}
.check-form__input::placeholder { color: var(--muted); opacity: .8; }
.check-form__input:focus { outline: none; }
.check-form__go { border-radius: 12px; padding-inline: 1.3rem; white-space: nowrap; }
.check-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check-form__meta { font-size: .9rem; color: var(--muted); margin: .8rem .2rem 0; }
/* Mode: real estate is the default, not a setting. Without JS a small "Testing a non-real estate
   site?" checkbox shows (off = real estate); with JS it becomes a quiet text link plus a labelled state. */
.check-form__mode { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; margin: .6rem .2rem 0; }
.check-form__flip { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); cursor: pointer; user-select: none; }
.check-form__flip input { appearance: none; -webkit-appearance: none; width: 1rem; height: 1rem; margin: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; }
.check-form__flip input:checked { background: var(--accent); border-color: var(--accent); }
.check-form__flip input:checked::after { content: ""; width: .3rem; height: .55rem; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check-form__flip input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--glow); }
.js .check-form__flip { display: none; }
.check-form__alt { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.check-form__alt:hover { color: var(--text); }
.check-form__alt:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.check-form__state { order: -1; margin: 0; font-size: .85rem; color: var(--text-2); }
.check-form__state::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); margin-right: .45rem; }
.check-form--inline .check-form__mode { justify-content: center; }
.check-form--inline .check-form__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.check-form--inline .check-form__input { font-size: 1rem; }
@media (max-width: 520px) {
  .check-form__bar { flex-wrap: wrap; padding: .5rem; }
  .check-form__scheme { display: none; }
  .check-form__input { flex-basis: 100%; padding: .75rem .35rem; }
  .check-form__go { width: 100%; justify-content: center; margin-top: .35rem; }
}

/* ── Chips: a pass/fail mark and a plain-English verdict ──────────────── */
.chip {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: .55rem .85rem .55rem .6rem;
  box-shadow: var(--shadow-chip);
  font-weight: 600; font-size: .88rem; line-height: 1.2; white-space: nowrap;
}
.chip__mark { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 6px; font-size: .78rem; font-weight: 800; flex: none; }
.chip--pass .chip__mark { background: var(--pass-soft); color: var(--pass); }
.chip--fail .chip__mark { background: var(--fail-soft); color: var(--fail); }
.chip--score { padding: .65rem .95rem .65rem .65rem; gap: .7rem; border-color: var(--accent); }
.chip--score .gauge { width: 2.7rem; }
.chip--score .gauge__track, .chip--score .gauge__fill { stroke-width: 12; }
.chip__score b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; display: block; line-height: 1; letter-spacing: -.03em; }
.chip__score span { font-size: .74rem; color: var(--muted); font-weight: 500; }

/* ── The AIQ gauge: a 270° arc, gap at the bottom. Logo and score are one shape. */
.gauge { position: relative; width: clamp(150px, 22vw, 200px); aspect-ratio: 1; }
.gauge__svg { width: 100%; height: 100%; display: block; }
.gauge__track { fill: none; stroke: var(--raised); stroke-width: 9; stroke-linecap: round; }
.gauge__fill { fill: none; stroke: var(--grade-col, var(--accent)); stroke-width: 9; stroke-linecap: round; }
.gauge__num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding-top: 6%; }
.gauge__num b { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.gauge__num span { font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; margin-top: .2rem; }
/* Before arc.js takes over (with motion allowed), the live gauge holds at zero so arc and number start together. */
html.anim .gauge--live:not(.is-ready) .gauge__fill { stroke-dashoffset: 100; }
html.anim .gauge--live:not(.is-ready) .gauge__num b { opacity: 0; }

/* ── Word marks and stamps ────────────────────────────────────────────── */
.wm { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 6px; line-height: 1.2; white-space: nowrap; }
.wm--pass { background: var(--pass-soft); color: var(--pass); }
.wm--partial { background: var(--partial-soft); color: var(--partial); }
.wm--fail { background: var(--fail-soft); color: var(--fail); }
.wm--na { background: var(--na-soft); color: var(--na); }
.wm--found { background: var(--accent-soft); color: var(--accent-strong); }
.stamp { display: inline-block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; line-height: 1; color: var(--grade-col, var(--accent)); border: 2px solid currentColor; border-radius: 6px; padding: .45rem .7rem .4rem; transform: rotate(-2.5deg); }
.grade--a { --grade-col: var(--grade-a); } .grade--b { --grade-col: var(--grade-b); } .grade--c { --grade-col: var(--grade-c); } .grade--d { --grade-col: var(--grade-d); } .grade--f { --grade-col: var(--grade-f); }

/* ── Bands: full-bleed sections that alternate so the eye rests ───────── */
.band { padding: var(--space-5) 0; }
.band--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band--alt + .band--alt { border-top: 0; }
.band__head { max-width: 62ch; margin-bottom: var(--space-3); }
.band__head h2 { margin-bottom: .4em; }
.band__head p { color: var(--text-2); margin: 0; font-size: 1.08rem; }
.band .more { margin: var(--space-3) 0 0; color: var(--text-2); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: var(--space-5) 0 var(--space-5); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 70%;
  background: radial-gradient(60% 60% at 72% 30%, var(--glow), transparent 70%);
  pointer-events: none; opacity: .9;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; position: relative; }
.hero__copy h1 { margin-bottom: .45em; }
/* The one-line promise under the h1, echoed on the closing CTA band: display face, between h1 and body in weight. */
.hero__sub, .cta-band__sub { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -.015em; line-height: 1.3; color: var(--text); margin: 0 0 .9rem; text-wrap: balance; }
.cta-band__sub { font-size: 1.15rem; margin-bottom: .5rem; }
.hero__copy .lead { margin-bottom: 1.6rem; }
.hero__visual { position: relative; padding: 1.5rem 0 2.4rem; }

/* The mockup: a browser frame around a made-up agent website. Decorative; the chips carry the message. */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; transform: perspective(1600px) rotateY(-6deg) rotateX(1.5deg); }
.mock__bar { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; background: var(--raised); border-bottom: 1px solid var(--line); }
.mock__bar span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line-strong); }
.mock__url { margin-left: .5rem; flex: 1; background: var(--surface); border-radius: 6px; font-size: .68rem; color: var(--muted); padding: .25rem .6rem; font-style: normal; }
.mock__site { font-size: .7rem; color: var(--text); }
.mock__nav { display: flex; gap: .9rem; align-items: center; padding: .7rem 1rem; }
.mock__nav b { margin-right: auto; font-family: var(--font-display); font-size: .82rem; white-space: nowrap; }
@media (max-width: 640px) { .mock__nav span:nth-child(n+4) { display: none; } }
.mock__nav span { color: var(--muted); }
.mock__hero { position: relative; height: 150px; background: linear-gradient(180deg, var(--mock-sky-1), var(--mock-sky-2)); overflow: hidden; }
.mock__hero svg { position: absolute; right: 0; bottom: 0; width: 56%; height: 84px; }
.mock__h { position: absolute; left: 1rem; top: 1.1rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.1; max-width: 50%; letter-spacing: -.02em; }
.mock__search { position: absolute; left: 1rem; top: 4.1rem; width: 50%; height: 1.5rem; background: var(--surface); border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.mock__search::after { content: ""; position: absolute; right: .25rem; top: .25rem; bottom: .25rem; width: 30%; background: var(--accent); border-radius: 4px; }
.mock__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; padding: .8rem 1rem .5rem; }
.mock__card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mock__photo { height: 50px; background: var(--mock-photo-1); }
.mock__card:nth-child(2) .mock__photo { background: var(--mock-photo-2); }
.mock__card:nth-child(3) .mock__photo { background: var(--mock-photo-3); }
.mock__price { padding: .4rem .5rem 0; font-weight: 700; font-size: .72rem; }
.mock__line { height: .35rem; margin: .3rem .5rem .5rem; background: var(--raised); border-radius: 3px; width: 70%; }
.mock__reviews { display: flex; gap: .7rem; align-items: center; padding: .3rem 1rem 1rem; color: var(--muted); }
.mock__stars { color: #e5a50a; letter-spacing: .05em; font-size: .8rem; }
.mock__reviews i { flex: 1; height: .35rem; background: var(--raised); border-radius: 3px; }

.chips--hero { list-style: none; margin: 0; padding: 0; }
/* Two layers per chip: the .chip-spot is positioned and enters once; the .chip inside floats forever.
   One transform animation per element (GPU compositing only), never two competing on one property. */
.chip-spot { display: inline-block; }
.chips--hero .chip-spot { position: absolute; z-index: 3; }
.chips--hero .chip-spot:nth-child(1) { top: 4%; left: -7%; }
.chips--hero .chip-spot:nth-child(2) { top: 31%; right: -9%; }
.chips--hero .chip-spot:nth-child(3) { top: 56%; left: -5%; }
.chips--hero .chip-spot:nth-child(4) { top: 74%; right: -6%; }
.chip-spot--score { position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; width: max-content; z-index: 4; }
.anim .chips--hero .chip-spot, .anim .chip-spot--score { animation: chip-in .6s var(--ease) both; }
.anim .chips--hero .chip, .anim .chip-spot--score .chip { animation: chip-float 7s ease-in-out infinite; will-change: transform; }
.anim .chips--hero .chip-spot:nth-child(1) { animation-delay: .5s; }
.anim .chips--hero .chip-spot:nth-child(1) .chip { animation-delay: -1.2s; }
.anim .chips--hero .chip-spot:nth-child(2) { animation-delay: .65s; }
.anim .chips--hero .chip-spot:nth-child(2) .chip { animation-delay: -2.9s; }
.anim .chips--hero .chip-spot:nth-child(3) { animation-delay: .8s; }
.anim .chips--hero .chip-spot:nth-child(3) .chip { animation-delay: -4.6s; }
.anim .chips--hero .chip-spot:nth-child(4) { animation-delay: .95s; }
.anim .chips--hero .chip-spot:nth-child(4) .chip { animation-delay: -6.3s; }
.anim .chip-spot--score { animation-delay: 1.15s; }
.anim .chip-spot--score .chip { animation-delay: -3.5s; }
.anim .mock { animation: mock-in .8s .2s var(--ease) both; }
@keyframes chip-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes chip-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes mock-in { from { opacity: 0; transform: perspective(1600px) rotateY(-6deg) rotateX(1.5deg) translateY(16px); } to { opacity: 1; transform: perspective(1600px) rotateY(-6deg) rotateX(1.5deg); } }
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 600px; margin: 1rem auto 0; }
  .mock { transform: none; }
  .anim .mock { animation-name: chip-in; }
  .chip { font-size: .82rem; padding: .45rem .7rem .45rem .5rem; }
  .chips--hero .chip-spot:nth-child(odd) { left: 2%; }
  .chips--hero .chip-spot:nth-child(even) { right: 2%; }
}
@media (max-width: 900px) { .hero { padding-top: var(--space-4); } }
@media (max-width: 640px) {
  .chips--hero { display: none; }
  .hero__visual { padding-bottom: 0; }
  .chip-spot--score { position: static; margin: 1rem auto 0; display: block; }
  .anim .chip-spot--score { animation: chip-in .6s .9s var(--ease) both; }
  .anim .chip-spot--score .chip { animation: none; }
}

/* ── What you get: a report card, in miniature ────────────────────────── */
.preview { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.preview__text p { color: var(--text-2); font-size: 1.08rem; }
.preview__text p b { color: var(--text); font-weight: 600; }
.rc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rc__stamp { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 1.2rem; background: var(--raised); border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
/* Gauge on the left, like the live report header, so the preview shows what people actually get. */
.rc__top { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 1.2rem; align-items: center; padding: 1.2rem 1.3rem; }
.rc__letter { font-family: var(--font-display); font-size: 3.8rem; font-weight: 800; line-height: .85; letter-spacing: -.06em; color: var(--grade-col); }
.rc__verdict { margin: .6rem 0 0; font-size: .95rem; color: var(--text-2); }
.rc .gauge { width: 5.4rem; }
.rc .gauge__num b { font-size: 1.35rem; }
.rc .gauge__num span { font-size: .55rem; }
.rc .subjects { margin: 0; border-top: 1px solid var(--line); }
.rc .subject { padding: .55rem 1.3rem; font-size: .9rem; grid-template-columns: 2rem minmax(0, 1fr) auto; }
.rc .subject__grade { font-size: 1.2rem; }
@media (max-width: 860px) { .preview { grid-template-columns: 1fr; } .rc { max-width: 560px; } }
@media (max-width: 520px) {
  .rc__top { grid-template-columns: auto minmax(0, 1fr); gap: .8rem 1rem; }
  .rc__top > div:nth-child(3) { grid-column: 1 / -1; }
  .rc .rc__letter { justify-self: end; }
}

/* ── The "why" section: one dark evidence exhibit (quote, stats, sources, fact).
   The panel wears the night palette in both themes: fixed ink tokens in light mode, the
   elevated surface in dark, so the section always reads as the page's evidence object. ── */
.exhibit {
  --ex-bg: #110d20; --ex-line: #2b2145; --ex-text: #f1ecff; --ex-text-2: #cdc3ea; --ex-muted: #a196c7; --ex-accent: #9b7bff; --ex-accent-2: #bda8ff;
  position: relative; overflow: hidden;
  background: var(--ex-bg); color: var(--ex-text-2);
  border: 1px solid var(--ex-line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
:root[data-theme="dark"] .exhibit { --ex-bg: var(--surface); border-color: var(--line-strong); }
.exhibit::before { content: ""; position: absolute; top: -55%; right: -20%; width: 70%; height: 130%; background: radial-gradient(closest-side, rgba(122, 90, 255, .26), transparent 70%); pointer-events: none; }
.exhibit > * { position: relative; }
.exhibit__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.6rem clamp(1.8rem, 4vw, 3.5rem); align-items: center; }
.exhibit__quote { margin: 0; padding: 0; border: 0; }
.exhibit__quote::before { content: "\201C"; display: block; font-family: var(--font-display); font-weight: 800; font-size: 3.6rem; line-height: .5; color: var(--ex-accent); margin-bottom: .6rem; }
.exhibit__quote p { font-size: clamp(1.25rem, 2.3vw, 1.6rem); font-style: italic; line-height: 1.45; color: var(--ex-text); margin: 0 0 1rem; text-wrap: pretty; }
.exhibit__quote footer { font-size: .85rem; color: var(--ex-muted); }
.exhibit__quote cite { font-style: normal; color: var(--ex-text-2); }
.exhibit__src { display: inline-block; margin-left: .6rem; font-size: .78rem; font-weight: 600; color: var(--ex-accent-2); border: 1px solid var(--ex-line); border-radius: 999px; padding: .2rem .7rem; text-decoration: none; white-space: nowrap; }
.exhibit__src:hover { color: var(--ex-text); border-color: var(--ex-accent); }
.exhibit__stats { display: grid; align-content: center; }
.exhibit__stat { display: grid; grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr); gap: 1.1rem; align-items: baseline; padding: .95rem 0; }
.exhibit__stat + .exhibit__stat { border-top: 1px solid var(--ex-line); }
.exhibit__stat b { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -.03em; line-height: 1; color: var(--ex-accent-2); }
.exhibit__stat p { margin: 0; font-size: .92rem; color: var(--ex-text-2); max-width: 34ch; }
.exhibit__foot { border-top: 1px solid var(--ex-line); margin-top: clamp(1.4rem, 3vw, 2rem); padding-top: 1.2rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem clamp(1.8rem, 4vw, 3.5rem); align-items: start; }
.exhibit__sources { margin: 0; font-size: .85rem; color: var(--ex-muted); }
.exhibit__sources a { color: var(--ex-accent-2); }
.exhibit__sources a:hover { color: var(--ex-text); }
.factline { margin: 0; }
.factline__label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ex-accent); }
.factline__text { margin: .35rem 0 0; font-size: .95rem; color: var(--ex-text-2); font-style: italic; min-height: 3em; transition: opacity .6s ease; text-wrap: pretty; }
.factline__text.is-fading { opacity: 0; }
@media (max-width: 860px) {
  .exhibit__grid, .exhibit__foot { grid-template-columns: 1fr; }
  .exhibit__stats { border-top: 1px solid var(--ex-line); }
}

/* ── Sections & prose ─────────────────────────────────────────────────── */
.section { padding: var(--space-5) 0; }
.prose { max-width: var(--wrap-narrow); }
.prose h2 { margin-top: var(--space-4); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-3); }
.prose p, .prose li { color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45em; }
.prose blockquote, .quote {
  margin: var(--space-3) 0; padding: .4rem 0 .4rem 1.5rem; border-left: 3px solid var(--accent);
  font-family: var(--font-body); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--text);
}
.prose blockquote p, .quote p { color: var(--text); margin-bottom: .6rem; }
.prose blockquote footer, .quote footer { display: block; font-style: normal; font-size: .85rem; color: var(--muted); }
.prose blockquote cite, .quote cite { font-style: normal; }
.prose table, .table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: var(--space-2) 0 var(--space-3); }
.prose th, .prose td, .table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th, .table th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table td.num, .prose td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.subject-head { display: flex; align-items: center; gap: .6rem; }
.subject-head__icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); flex: none; }
.subject-head__icon svg { display: block; }
.page__head { margin-bottom: var(--space-4); }
.page__meta { font-size: .85rem; color: var(--muted); margin-top: -.4rem; }
.page { padding: var(--space-5) 0 var(--space-6); }

/* ── Tiles: what we check ─────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: var(--space-3) 0 var(--space-2); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem 1.2rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem 1rem; align-items: start; }
.tile__icon { grid-row: 1 / span 2; color: var(--accent-strong); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--accent-soft); border-radius: 10px; }
.tile__icon svg { display: block; }
.tile h3 { margin: .15rem 0 0; font-size: 1.08rem; }
.tile p { margin: 0; color: var(--text-2); font-size: .95rem; }
/* The R card sits flat like the other five; the REAL ESTATE LAYER tag alone carries the distinction. */
.tile__tag { grid-column: 2; margin-top: .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* ── Grade spectrum: one band from Invisible to AI-Ready ──────────────── */
.spectrum { margin: var(--space-3) 0 var(--space-2); }
.spectrum__row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.15fr; gap: 5px; }
.spectrum__seg { display: grid; gap: .55rem; align-content: start; }
.spectrum__seg--f { --seg: var(--grade-f); } .spectrum__seg--d { --seg: var(--grade-d); } .spectrum__seg--c { --seg: var(--grade-c); } .spectrum__seg--b { --seg: var(--grade-b); } .spectrum__seg--a { --seg: var(--grade-a); }
.spectrum__label { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.15; }
.spectrum__label small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .78rem; color: var(--muted); letter-spacing: 0; margin-top: .15rem; }
.spectrum__bar { height: 14px; background: var(--seg); border-radius: 3px; }
.spectrum__seg:first-child .spectrum__bar { border-radius: 999px 3px 3px 999px; }
.spectrum__seg:last-child .spectrum__bar { border-radius: 3px 999px 999px 3px; }
.spectrum__ticks { display: flex; justify-content: space-between; gap: .4rem; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.spectrum__ticks b { color: var(--text-2); font-weight: 700; }
.spectrum__ticks span { white-space: nowrap; }
@media (max-width: 720px) {
  .spectrum__row { grid-template-columns: 1fr; gap: .9rem; }
  .spectrum__seg { grid-template-columns: 10px minmax(0, 1fr); gap: .2rem .9rem; }
  .spectrum__bar, .spectrum__seg:first-child .spectrum__bar, .spectrum__seg:last-child .spectrum__bar { grid-column: 1; grid-row: 1 / span 2; height: auto; width: 10px; border-radius: 5px; }
  .spectrum__label, .spectrum__ticks { grid-column: 2; }
  .spectrum__ticks { justify-content: flex-start; gap: 1rem; }
}

/* ── Three reasons ────────────────────────────────────────────────────── */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; margin: var(--space-3) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.reasons li { padding: 1.4rem 0 .5rem; }
.reasons b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: .35rem; }
.reasons p { margin: 0; color: var(--text-2); }
@media (max-width: 720px) { .reasons { grid-template-columns: 1fr; } .reasons li { border-bottom: 1px solid var(--line); padding: 1rem 0; } .reasons li:last-child { border-bottom: 0; } }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: var(--space-3); }
.faq-grid h3 { font-size: 1.12rem; margin-bottom: .45rem; }
.faq-grid p { color: var(--text-2); margin: 0; font-size: .98rem; }
@media (max-width: 800px) { .faq-grid { grid-template-columns: 1fr; gap: 1.4rem; } }
.faq h3 { margin-top: var(--space-3); font-size: 1.15rem; }
.faq h3:first-of-type { margin-top: var(--space-2); }

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta-band { padding: var(--space-5) 0; border-top: 1px solid var(--line); background: radial-gradient(70% 100% at 50% 100%, var(--glow), transparent 70%); }
.cta-band__inner { max-width: 640px; margin-inline: auto; text-align: center; }
.cta-band h2 { margin-bottom: .4em; }
.cta-band p { color: var(--text-2); }
.cta-band .check-form { text-align: left; }
.cta-band--report { margin-top: var(--space-5); border-top: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4) var(--gutter); background: var(--bg-2); }

/* ── Guides ───────────────────────────────────────────────────────────── */
.guide-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: var(--space-3) 0; }
.guide-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.2rem; color: var(--text); position: relative; transition: border-color .15s, transform .15s var(--ease); }
.guide-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.guide-card h3, .guide-card h2 { margin: .2rem 0 .5rem; font-size: 1.2rem; }
.guide-card h2 a, .guide-card h3 a { color: var(--text); text-decoration: none; }
.guide-card h2 a::after, .guide-card h3 a::after { content: ""; position: absolute; inset: 0; }
.guide-card:hover h2 a, .guide-card:hover h3 a { color: var(--accent-strong); }
.guide-card p { color: var(--text-2); margin: 0; font-size: .95rem; }
.guide-card .page__meta { margin: .8rem 0 0; }
.guide-more { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--line); }

/* ── Progress overlay ─────────────────────────────────────────────────── */
.progress { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); display: grid; place-items: center; padding: var(--gutter); overflow-y: auto; }
.progress__panel { width: min(100%, 640px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.4rem, 4vw, 2.4rem); }
.progress__eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 .5rem; }
.progress__title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 .3rem; }
.progress__domain { color: var(--muted); font-size: .95rem; margin: 0 0 1.4rem; overflow-wrap: anywhere; }
.progress__bar { height: 8px; background: var(--raised); border-radius: 999px; overflow: hidden; margin-bottom: 1.4rem; }
.progress__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-deep), var(--accent-strong)); border-radius: 999px; transition: width .3s linear; }
.progress--done .progress__fill { width: 100% !important; transition-duration: .25s; }
.stages { list-style: none; margin: 0 0 1.6rem; padding: 0; font-size: .92rem; display: grid; gap: .4rem; }
.stages li { display: flex; gap: .7rem; align-items: baseline; color: var(--muted); }
.stages li::before { content: "\25CB"; color: var(--line-strong); width: 1em; flex: none; }
.stages li.is-active { color: var(--text); }
.stages li.is-active::before { content: "\25CF"; color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.stages li.is-done { color: var(--text-2); }
.stages li.is-done::before { content: "\2713"; color: var(--pass); }
@keyframes pulse { 50% { opacity: .35; } }
.fact { border-top: 1px solid var(--line); padding-top: 1.2rem; min-height: 6.5rem; }
.fact__label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.fact__text { font-size: 1.12rem; line-height: 1.45; color: var(--text); margin: 0; transition: opacity .45s ease; }
.fact__text.is-fading { opacity: 0; }
.progress__error { display: none; }
.progress--error .progress__running { display: none; }
.progress--error .progress__error { display: block; }
.progress__error h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.progress__error p { color: var(--text-2); }
.progress__error ul { color: var(--text-2); padding-left: 1.2rem; }
.progress__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }

/* ── Report card ──────────────────────────────────────────────────────── */
.page-report main { padding-bottom: var(--space-6); }
/* Title block, then the action row left-aligned beneath it: its old right-aligned spot belongs to the exhibit now. */
.report-head { padding: var(--space-4) 0 var(--space-3); }
.report-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; }
.report-head h1 a { color: inherit; text-decoration: none; }
.report-head h1 a:hover { color: var(--accent-strong); }
.report-head__meta { font-size: .92rem; color: var(--muted); margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.report-head__meta a { color: var(--muted); overflow-wrap: anywhere; }
.report-head__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.2rem; margin-bottom: 1.2rem; }
/* The "Check again" form is a wrapper only: its button joins the row as a pill of its own, so the
   wrap rules below see five equal buttons, not four buttons and one box. */
.report-head__actions > form { display: contents; }
/* Where the pills can no longer share one line (long domains get here first), wrapped lines fill as
   full rows: every button stretches, none hangs alone mid-row, and the zero-fix note keeps its own line. */
@media (max-width: 760px) {
  .report-head__actions .gate { flex: 1 1 auto; }
  .report-head__actions .gate summary { width: 100%; justify-content: center; }
  .report-head__actions .btn { flex: 1 1 auto; justify-content: center; }
}
.copied { color: var(--pass); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.card__stamp { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .75rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--raised); font-size: .82rem; color: var(--muted); }
.card__stamp .brand { font-size: .95rem; }
/* Gauge on the left; letter, stamp, verdict and meta on the right. */
.grade { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 3rem); align-items: center; padding: clamp(1.4rem, 3.5vw, 2.4rem) clamp(1.2rem, 3.5vw, 2.4rem); }
.grade__letter { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 12vw, 8.5rem); line-height: .82; letter-spacing: -.07em; color: var(--grade-col); }
.grade__verdict { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.25; letter-spacing: -.02em; margin: .9rem 0 .8rem; max-width: 44ch; text-wrap: pretty; }
.grade__facts { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .92rem; color: var(--muted); margin: 0; }
.grade__facts .delta--up { color: var(--pass); font-weight: 600; } .grade__facts .delta--down { color: var(--fail); font-weight: 600; } .grade__facts .delta--same { color: var(--muted); }
/* Quiet lines under the passed count (0.6.6): a check that couldn't run, the site-wide share on an inside page. Same muted size as the mode line. */
.grade__note { font-size: .92rem; color: var(--muted); margin: .45rem 0 0; }
@media (max-width: 760px) {
  .grade { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .grade__verdict { margin-inline: auto; }
  .grade__facts { justify-content: center; }
}

/* Report hero: the grade card and the screenshot exhibit as one composition (the landing hero's
   layer language). Wide screens: the exhibit breaks upward out of the card's top-right, over the
   header strip, whose caption follows the brand so the strip's right side clears. Tablet widths:
   the exhibit hangs half in, half out of the card's bottom-right instead — the top-right column
   does not fit beside the grade row there. Phones: a plain stack, chips flowing under the frame.
   Clicking either shot still opens it full size (said in the image alt; the caption is gone). */
.report-hero { position: relative; }
.hero-shot { margin: 0; position: absolute; top: -2.5rem; right: 1.6rem; width: 350px; z-index: 4; }
.hero-shot__stage { position: relative; }
.report-hero--shot .card__stamp { justify-content: flex-start; gap: 1.3rem; }
.report-hero--shot .grade { padding-right: 25rem; } /* the exhibit's column; the verdict keeps the rest of the recovered room */
.shot__frame { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.shot__bar { display: flex; align-items: center; gap: .38rem; padding: .45rem .75rem; background: var(--raised); border-bottom: 1px solid var(--line); }
.shot__bar span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-strong); flex: none; }
.shot__url { margin-left: .4rem; max-width: 26ch; background: var(--surface); border-radius: 5px; font-size: .64rem; color: var(--muted); padding: .18rem .55rem; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot__link { display: block; }
.shot__link:focus-visible { outline-offset: 4px; }
.shot__frame img { width: 100%; height: auto; aspect-ratio: 800 / 640; object-fit: cover; object-position: top; }
.shot--phone { position: absolute; right: .7rem; bottom: -.9rem; width: 84px; z-index: 3; }
.shot--phone .shot__link { position: relative; border-radius: 14px; overflow: hidden; border: 4px solid #2a2141; background: #2a2141; box-shadow: var(--shadow-chip); }
.shot--phone .shot__link::after { content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 26%; height: 4px; border-radius: 3px; background: rgba(16, 12, 30, .85); }
.shot--phone img { width: 100%; height: 140px; object-fit: cover; object-position: top; border-radius: 10px; }
/* A report with only the mobile shot: the shell stands alone in the corner. */
.hero-shot--phone-only { width: 120px; top: -1rem; }
.hero-shot--phone-only .shot--phone { position: static; width: 100%; }
.hero-shot--phone-only .shot--phone img { height: 200px; }
/* Chips shrink with the compact exhibit but keep their words: top-left, upper-right, bottom-left. */
.hero-shot .chip { font-size: .7rem; padding: .4rem .6rem .4rem .45rem; }
.hero-shot .chip__mark { width: 1.05rem; height: 1.05rem; font-size: .62rem; }
.shot__chips { list-style: none; margin: 0; padding: 0; }
.shot__chips .chip-spot { position: absolute; z-index: 2; }
.shot__chips .chip-spot:nth-child(1) { top: 2.1rem; left: .6rem; } /* below the browser bar */
.shot__chips .chip-spot:nth-child(2) { top: 24%; right: .6rem; }
.shot__chips .chip-spot:nth-child(3) { bottom: .7rem; left: .7rem; }
.anim .shot__chips .chip-spot { animation: chip-in .5s var(--ease) both; }
.anim .shot__chips .chip-spot:nth-child(1) { animation-delay: .15s; }
.anim .shot__chips .chip-spot:nth-child(2) { animation-delay: .3s; }
.anim .shot__chips .chip-spot:nth-child(3) { animation-delay: .45s; }
.anim .shot__chips .chip { animation: chip-float 8s ease-in-out infinite; will-change: transform; }
.anim .shot__chips .chip-spot:nth-child(1) .chip { animation-delay: -2.1s; }
.anim .shot__chips .chip-spot:nth-child(2) .chip { animation-delay: -4.7s; }
.anim .shot__chips .chip-spot:nth-child(3) .chip { animation-delay: -6.9s; }
@media (max-width: 1279px) {
  /* The top-right column does not fit beside the grade row: the exhibit hangs off the bottom-right. */
  .hero-shot { position: static; width: 340px; margin: -150px 1.2rem 0 auto; }
  .report-hero--shot .card { padding-bottom: 150px; } /* the band the exhibit's upper half sits over */
  .report-hero--shot .card__stamp { justify-content: space-between; gap: 1rem; }
  .report-hero--shot .grade { padding-right: clamp(1.2rem, 3.5vw, 2.4rem); }
  .hero-shot--phone-only { width: 120px; margin: var(--space-3) auto 0; }
}
@media (max-width: 640px) {
  /* The overlap unwinds to the plain stack: card, then the full-width exhibit. */
  .report-hero--shot .card { padding-bottom: 0; }
  .hero-shot { position: static; width: auto; margin: var(--space-3) 0 0; }
  .shot--phone { width: 78px; bottom: -1rem; }
  .shot--phone img { height: 122px; }
  .hero-shot .chip { font-size: .78rem; padding: .45rem .7rem .45rem .5rem; }
  .hero-shot .chip__mark { width: 1.15rem; height: 1.15rem; font-size: .68rem; }
  /* Chips flow below the frame, padded clear of the overlapping phone. */
  .shot__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; padding-right: 92px; }
  .shot__chips .chip-spot { position: static; }
  .anim .shot__chips .chip { animation: none; }
  .hero-shot--phone-only { margin-inline: auto; }
}

/* Subject summary: all six categories at a glance. Base styles also dress the landing preview card. */
.subjects { list-style: none; margin: var(--space-4) 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.subject { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.subject__grade { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.04em; line-height: 1; color: var(--grade-col); }
.subject__name { font-weight: 600; margin: 0; }
.subject__pts { font-size: .82rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.subject a { color: inherit; text-decoration: none; }
.subject a:hover { color: var(--accent-strong); }
.subjects__title { margin: calc(var(--space-5) + 1.2rem) 0 0; font-size: 1.4rem; } /* breathing room below the exhibit's hang */
@media (max-width: 520px) { .subject { grid-template-columns: 2.4rem minmax(0, 1fr) auto; } .subject__pts { display: none; } }
/* On the report the summary is a compact index: tight rows, small grades, each row a link to its section. */
.subjects--index { margin-top: var(--space-2); }
.subjects--index .subject { display: block; padding: 0; border-bottom: 0; }
.subject__link { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto 1rem; gap: .9rem; align-items: baseline; padding: .5rem .4rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.subject__link:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.subjects--index .subject__grade { font-size: 1.15rem; }
.subjects--index .subject__name { font-size: .98rem; }
.subject__go { color: var(--muted); font-size: .85rem; text-align: right; transition: transform .15s var(--ease), color .15s; }
.subject__link:hover .subject__go { color: var(--accent-strong); transform: translateY(2px); }
.subject__link:hover .subject__name { color: var(--accent-strong); }
@media (max-width: 520px) { .subject__link { grid-template-columns: 2rem minmax(0, 1fr) 1rem; } .subjects--index .subject__pts { display: none; } }

/* Subject tiles: the report's summary row. One flex rule covers every count: six across (real
   estate), five centered (generic omits the real estate tile), seven for Texas (7-across wide,
   4+3 on a tablet), and a 3-per-row wrap at phone widths. The compact .subjects--index list
   above is retired on the report but kept intact for the Phase 4 guide index. */
.subj-tiles { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: var(--space-2) 0 0; padding: 0; }
.subj-tile { flex: 1 1 9.5rem; max-width: 12.5rem; min-width: 0; display: grid; }
.subj-tile__link { display: grid; gap: .3rem; align-content: start; justify-items: center; text-align: center; padding: .85rem .5rem .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s var(--ease); }
.subj-tile__link:hover { border-color: var(--accent); transform: translateY(-2px); }
.subj-tile__grade { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: .9; letter-spacing: -.04em; color: var(--grade-col, var(--na)); }
.subj-tile__name { font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--text); }
.subj-tile__link:hover .subj-tile__name { color: var(--accent-strong); }
.subj-tile__pts { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .subj-tile { flex-basis: 6rem; max-width: none; } }

/* Needs-work filter: a three-way segmented control above the first subject (JS reveals it; a view only). */
.filter { display: flex; flex-wrap: wrap; gap: .35rem; margin: var(--space-4) 0 0; }
.filter__btn { font: 600 .88rem/1 var(--font-body); padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.filter__btn:hover { border-color: var(--accent); color: var(--text); }
.filter__btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter + .cat-section { margin-top: var(--space-3); }
.checks__empty { margin: .9rem 0 0; color: var(--muted); font-size: .94rem; }
/* The control and the rows carry their own display values, which would beat the browser's [hidden] rule. */
.filter[hidden], .check[hidden] { display: none; }

/* Category sections: the grade, then each check as a sentence with the teacher's comment under it. */
.cat-section { margin-top: var(--space-5); }
.cat-section__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.2rem; align-items: center; padding-bottom: .9rem; border-bottom: 2px solid var(--line-strong); }
.cat-section__grade { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -.05em; color: var(--grade-col); min-width: 3.4rem; }
.cat-section__head h2 { font-size: 1.45rem; margin: 0; }
.cat-section__head p { margin: 0; color: var(--muted); font-size: .92rem; }
.cat-section__pts { text-align: right; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.cat-section__pts b { display: block; font-size: 1rem; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.checks { list-style: none; margin: 0; padding: 0; }
.check { display: grid; grid-template-columns: 5px 5.4rem minmax(0, 1fr) auto; gap: .5rem 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.check__edge { align-self: stretch; border-radius: 3px; background: var(--st-col, var(--na)); }
.check--pass { --st-col: var(--pass); } .check--partial { --st-col: var(--partial); } .check--fail { --st-col: var(--fail); } .check--na { --st-col: var(--line-strong); }
.check .wm { margin-top: .15rem; justify-self: start; }
.check__name { font-weight: 600; margin: 0; }
.check__evidence { margin: .2rem 0 0; color: var(--text-2); font-size: .94rem; overflow-wrap: anywhere; }
.check__evidence code { font-size: .85em; }
.check__evidence p { margin: 0; }
.check__evidence p + p, .check__evidence ul + p { margin-top: .3rem; }
/* Enumerated evidence: one found item per line. */
.evidence-list { list-style: none; margin: .3rem 0 0; padding: 0; }
.evidence-list li { position: relative; padding-left: 1rem; margin: 0 0 .15rem; }
.evidence-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: .45rem; height: 2px; background: var(--accent); border-radius: 1px; }
.check__pts { font-size: .78rem; color: var(--muted); white-space: nowrap; padding-top: .2rem; font-variant-numeric: tabular-nums; }
.check--na .check__name, .check--na .check__evidence { color: var(--muted); }
@media (max-width: 600px) {
  .check { grid-template-columns: 5px minmax(0, 1fr); gap: .35rem .8rem; }
  .check__edge { grid-row: 1 / span 3; }
  .check .wm, .check__body, .check__pts { grid-column: 2; }
  .check__pts { padding-top: 0; }
}
.detected { margin-top: var(--space-5); }
.detected .check { grid-template-columns: 5px 5.4rem minmax(0, 1fr); }
.detected .check--found { --st-col: var(--accent); }
.detected .check--none { --st-col: var(--line-strong); }
.cat-section__grade--eye { display: inline-grid; place-items: center; color: var(--accent-strong); }
.cat-section__grade--eye svg { display: block; }
@media (max-width: 600px) { .detected .check { grid-template-columns: 5px minmax(0, 1fr); } .detected .check__edge { grid-row: 1 / span 2; } }
/* Quiet help line near the bottom of the report, driven by site.cta_url / site.cta_text. */
.report-cta { margin: var(--space-4) 0 0; text-align: center; font-size: .98rem; }
.report-cta a { color: var(--accent-strong); font-weight: 600; }
.report-cta a:hover { color: var(--text); }
.report-foot { margin-top: var(--space-4); font-size: .82rem; color: var(--muted); }
/* ── Contact form + its success note ──────────────────────────────────── */
.contact-form { margin: var(--space-3) 0 var(--space-4); display: grid; gap: 1rem; }
.contact-form__row { display: grid; gap: .35rem; }
.contact-form__row label { font-size: .85rem; color: var(--muted); }
.contact-form__row input, .contact-form__row textarea { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); font: 500 1rem/1.5 var(--font-body); padding: .75rem .9rem; width: 100%; box-sizing: border-box; }
.contact-form__row textarea { resize: vertical; min-height: 8rem; }
.contact-form__row input:focus, .contact-form__row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.contact-form__actions { margin: 0; }
.contact-form__privacy { font-size: .85rem; color: var(--muted); margin: 0; }
.form-note { background: var(--pass-soft); border: 1px solid var(--pass); border-radius: var(--radius); padding: 1rem 1.2rem 1rem; margin: 0 0 var(--space-3); }
.form-note__title { font-family: var(--font-display); font-weight: 700; margin: 0 0 .15rem; color: var(--pass); }
.form-note p:last-child { margin: 0; }

/* ── Message pages ────────────────────────────────────────────────────── */
.message { padding: var(--space-5) 0 var(--space-6); }
.message h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.message__list { color: var(--text-2); }
.message .check-form { margin: var(--space-3) 0; }
.message__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--space-3); }
/* Owner unlock page: one password field, one button. */
.unlock { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: var(--space-3) 0; max-width: 460px; }
.unlock__label { flex-basis: 100%; font-size: .85rem; color: var(--muted); }
.unlock__input { flex: 1 1 220px; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); font: 500 1rem/1 var(--font-body); padding: .8rem .9rem; }
.unlock__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.unlock__error { color: var(--fail); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: var(--space-4) 0 var(--space-3); background: var(--bg-2); font-size: .92rem; }
.site-foot__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.site-foot__tag { color: var(--muted); margin: .7rem 0 0; max-width: 40ch; }
.site-foot__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; }
.site-foot__nav a { color: var(--text-2); text-decoration: none; }
.site-foot__nav a:hover { color: var(--text); text-decoration: underline; }
.site-foot__trust { border-top: 1px solid var(--line); margin-top: var(--space-3); padding-top: var(--space-2); color: var(--muted); max-width: 72ch; }
.site-foot__trust p { margin-bottom: .55em; }
.site-foot__trust strong { color: var(--text-2); }
.site-foot__legal { font-size: .78rem; color: var(--muted); margin: var(--space-2) 0 0; }
@media (max-width: 640px) {
  .site-foot__grid { grid-template-columns: 1fr; }
  .site-head__row { flex-wrap: wrap; row-gap: 0; min-height: 3.6rem; padding-top: .6rem; }
  .theme-toggle { margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 1.1rem; padding-bottom: .55rem; }
  .site-nav a { font-size: .9rem; }
}

/* ── Fix-It Guide gate: a details element in the report's action row ──── */
.gate { position: relative; }
.gate summary { list-style: none; }
.gate summary::-webkit-details-marker { display: none; }
.gate[open] { flex-basis: 100%; }
.gate[open] summary { margin-bottom: .8rem; }
.gate__panel { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.4rem 1.1rem; max-width: 560px; }
.gate__title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin: 0 0 .3rem; }
.gate__lead { color: var(--text-2); font-size: .95rem; margin: 0 0 .9rem; }
.gate__form { display: flex; flex-wrap: wrap; gap: .5rem; }
.gate__input { flex: 1 1 220px; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); font: 500 1rem/1 var(--font-body); padding: .8rem .9rem; }
.gate__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.gate__privacy { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }
.report-head__note { color: var(--muted); font-size: .9rem; align-self: center; flex-basis: 100%; }
.gate__form--page { max-width: 460px; margin: var(--space-3) 0; }

/* ── Certificate unlock block on eligible reports ─────────────────────── */
.cert-unlock { margin-top: var(--space-3); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.2rem; background: var(--accent-soft); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.cert-unlock__mark { color: var(--accent-strong); flex: none; }
.cert-unlock__body { flex: 1 1 320px; }
.cert-unlock__body h2 { font-size: 1.25rem; margin: 0 0 .25rem; }
.cert-unlock__body p { margin: 0; color: var(--text-2); font-size: .95rem; max-width: 62ch; }
.cert-unlock__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── Certificate page ─────────────────────────────────────────────────── */
.cert-page { padding: var(--space-4) 0 var(--space-6); }
.cert { text-align: center; border: 2px solid var(--accent); }
.cert__body { padding: clamp(1.8rem, 5vw, 3.2rem) clamp(1.2rem, 4vw, 2.6rem); }
.cert__award { color: var(--muted); margin: .4rem 0 .2rem; }
.cert__domain { font-size: clamp(1.9rem, 5vw, 3rem); overflow-wrap: anywhere; margin-bottom: .2em; }
.cert__grade { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 10vw, 6.5rem); line-height: .9; letter-spacing: -.06em; color: var(--grade-col); margin: .05em 0 .3em; }
.cert__facts { color: var(--muted); font-size: .92rem; margin: 1.1rem 0 .4rem; }
.cert__verify { margin: 0 0 .4rem; font-size: .95rem; }
.cert__issuer { font-family: var(--font-display); font-weight: 600; margin: 1rem 0 0; }
.cert__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: var(--space-3); }
@media print {
  body.page-certificate .site-head, body.page-certificate .site-foot, body.page-certificate .cert__actions, body.page-certificate .skip { display: none !important; }
  body.page-certificate { background: #fff; }
  body.page-certificate .cert { box-shadow: none; }
}

/* ── Fix-It Guide page ────────────────────────────────────────────────── */
.guide-fix { padding: var(--space-4) 0 var(--space-6); }
.guide-fix .page__head h1 { overflow-wrap: anywhere; } /* the checked page, host + path, can be one long unbroken string */
.guide-index { margin: 0 0 var(--space-4); }
.guide-index .subject__grade { font-size: 1.05rem; }
.guide-index .subject__grade.guide-index__pts--fail { color: var(--fail); }
.guide-index .subject__grade.guide-index__pts--partial { color: var(--partial); }
.fixblock { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line-strong); }
.fixblock__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; font-size: .85rem; color: var(--muted); margin: 0 0 .5rem; }
.fixblock__pts { font-variant-numeric: tabular-nums; }
.fixblock h2 { font-size: 1.45rem; margin-bottom: .5em; }
.fixblock p { color: var(--text-2); }
.fixblock p strong { color: var(--text); }
.fixblock__cta { font-style: italic; color: var(--muted); border-left: 3px solid var(--accent); padding-left: .9rem; margin-top: 1rem; }
.fixblock__cta a { color: var(--accent-strong); }
.guide-passing { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 2px solid var(--line-strong); }
.guide-passing__list { columns: 2; column-gap: 2rem; padding-left: 1.2rem; color: var(--text-2); }
.guide-passing__list li { margin-bottom: .3em; break-inside: avoid; }
@media (max-width: 640px) { .guide-passing__list { columns: 1; } }
.guide-foot { margin-top: var(--space-4); color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); padding-top: var(--space-2); }

/* ── Motion preferences ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip-spot, .chip, .mock { animation: none !important; will-change: auto !important; }
  .stages li.is-active::before { animation: none; }
  .progress__fill, .fact__text, .factline__text, .btn, .guide-card { transition: none; }
}
