@import url("https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --ink: #203129;
  --muted: #52645b;
  --paper: #faf7ef;
  --card: #fffdf8;
  --line: #cbd3c8;
  --accent: #1f5c4a;
  --accent-dark: #174537;
  --tint: #e8f0e8;
  --on-accent: #faf8ef;
  --primary: #e6a52f;
  --primary-hover: #d38d1f;
  --on-primary: #332406;
  --note: #f1ede3;
  --focus: #c87e18;
  --badge-ink: #7a1e1a;
  --badge-bg: #f6dfda;
  --medium-ink: #6b4700;
  --medium-bg: #fbecc8;
  --low-ink: #384a41;
  --low-bg: #e3eae4;
  --hero: #1d5645;
  --hero-ink: #faf8ef;
  --hero-muted: #d1e1d8;
  --hero-line: #5d806f;
  color-scheme: light;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --ink: #e5eee8;
  --muted: #acbbb2;
  --paper: #131b17;
  --card: #1b2721;
  --line: #405047;
  --accent: #8fcdb4;
  --accent-dark: #b1dec9;
  --tint: #25382f;
  --on-accent: #13261e;
  --primary: #eab044;
  --primary-hover: #f0c160;
  --on-primary: #322204;
  --note: #212d27;
  --focus: #eab044;
  --badge-ink: #f1b6ad;
  --badge-bg: #4a2623;
  --medium-ink: #f2cf86;
  --medium-bg: #43341a;
  --low-ink: #c6d3cb;
  --low-bg: #2b3a33;
  --hero: #173d31;
  --hero-ink: #faf8ef;
  --hero-muted: #c7d7ce;
  --hero-line: #58766a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.62 var(--sans); }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.08; font-weight: 650; letter-spacing: -0.035em; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 6vw, 5.4rem); margin: 0 0 1.25rem; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); margin: 0 0 1.25rem; }
h3 { font-size: clamp(1.18rem, 2vw, 1.45rem); margin: 0 0 0.55rem; }
p { text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.narrow { max-width: 48rem; }
.skip { position: absolute; left: -9999px; z-index: 3; }
.skip:focus { left: 1rem; top: 0.75rem; padding: 0.5rem 0.75rem; background: var(--card); color: var(--ink); }

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.035em; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; margin-left: auto; font-size: 0.92rem; font-weight: 500; }
.site-header nav a { color: var(--ink); text-decoration-color: transparent; transition: color 180ms ease, text-decoration-color 180ms ease; }
.site-header nav a:hover { color: var(--accent); text-decoration-color: currentColor; }
.theme-toggle { padding: 0.4rem 0.75rem; border: 1px solid var(--line); border-radius: 0.35rem; background: var(--card); color: var(--ink); font: inherit; font-size: 0.82rem; cursor: pointer; transition: border-color 180ms ease, transform 180ms ease; }
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle[aria-pressed="true"] { border-color: var(--accent); }
.sign-in { padding: 0.4rem 0.8rem; border: 1px solid var(--accent); border-radius: 0.35rem; color: var(--accent); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.sign-in:hover { background: var(--accent); color: var(--on-accent); }

.hero { overflow: hidden; padding-block: clamp(3.5rem, 8vw, 7.5rem) clamp(4.5rem, 9vw, 8.5rem); background: var(--hero); color: var(--hero-ink); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(21rem, 0.95fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; animation: page-in 500ms ease-out both; }
.hero-copy { max-width: 43rem; }
.hero h1 { max-width: 11ch; }
.hero .lede { max-width: 37rem; margin: 0 0 2rem; color: var(--hero-muted); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1.25rem; align-items: center; }
.button { display: inline-block; padding: 0.82rem 1.25rem; border: 2px solid var(--primary); border-radius: 0.35rem; font-weight: 700; text-align: center; text-decoration: none; transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease; }
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button.secondary { border-color: var(--accent); background: transparent; color: var(--accent); }
.button.secondary:hover { background: var(--accent); color: var(--on-accent); }
.hero-link { color: var(--hero-ink); font-weight: 600; text-decoration-color: var(--hero-line); transition: text-decoration-color 180ms ease; }
.hero-link:hover { color: var(--hero-ink); text-decoration-color: currentColor; }
.reassurance { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; padding: 0; margin: 1.4rem 0 0; list-style: none; color: var(--hero-muted); font-size: 0.9rem; }
.reassurance li::before { content: "✓"; margin-right: 0.45rem; color: var(--primary); font-weight: 700; }
.hero .disclaimer { max-width: 39rem; margin-top: 2rem; color: var(--hero-muted); }
.hero-copy .fine { margin: 1.4rem 0 0; color: var(--hero-muted); }

.issue { padding: clamp(1.4rem, 3vw, 2.1rem); border-radius: 0.9rem; background: var(--card); color: var(--ink); box-shadow: 0 1.5rem 4rem oklch(15% 0.04 158 / 28%); transform: rotate(1deg); }
/* The example report stays a light sheet of paper in both themes so it stands out on the green hero. */
:root[data-theme="dark"] .issue { --card: #fffdf8; --ink: #203129; --muted: #52645b; --line: #cbd3c8; --tint: #e8f0e8; --accent-dark: #174537; --badge-ink: #7a1e1a; --badge-bg: #f6dfda; }
.issue-label, .section-label { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.issue header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: start; }
.issue h2 { max-width: 16ch; margin: 0; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.issue-summary { margin: 1.35rem 0; font-size: 1.05rem; line-height: 1.5; }
.issue .fine { color: var(--muted); }
.issue dl { margin: 0; }
.issue dl > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding-block: 0.8rem; border-top: 1px solid var(--line); }
.issue dt { font-size: 0.8rem; font-weight: 700; }
.issue dd { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.badge { padding: 0.25rem 0.5rem; border-radius: 0.2rem; background: var(--badge-bg); color: var(--badge-ink); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.verified { display: flex; flex-direction: column; gap: 0.12rem; margin-top: 0.7rem; padding: 0.8rem 0.9rem; border-radius: 0.4rem; background: var(--tint); color: var(--accent-dark); font-size: 0.83rem; }

section.band { padding-block: clamp(4.5rem, 8vw, 7.5rem); border-top: 1px solid var(--line); }
.band > .wrap > h2 { max-width: 18ch; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; margin: 3rem 0 0; list-style: none; }
.steps li { counter-increment: step; padding: 1.4rem clamp(1rem, 2.5vw, 2rem) 0 0; border-top: 2px solid var(--line); }
.steps li::before { content: "0" counter(step); display: block; margin: -0.9rem 0 0.75rem; width: max-content; padding-right: 0.7rem; background: var(--paper); color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.steps h3 { max-width: 14ch; }
.steps p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.trust { background: var(--tint); }
.trust-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); margin-top: 2.8rem; }
.trust-list > div { padding-top: 1.25rem; border-top: 2px solid var(--accent); }
.trust-list h3 { max-width: 15ch; font-size: clamp(1.45rem, 2.5vw, 2rem); }
.trust-list p { max-width: 29ch; margin: 0; color: var(--muted); }

.pricing-band { background: var(--note); }
.pricing-layout { display: grid; grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr); gap: clamp(3rem, 9vw, 9rem); align-items: start; }
.pricing-intro { position: sticky; top: 2rem; }
.pricing-intro h2 { margin: 0 0 1rem; font-size: 1.35rem; letter-spacing: -0.02em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.price { font-weight: 650; }
.price .amount { color: var(--accent); font-size: 2.25rem; font-variant-numeric: tabular-nums; }
.price del { margin-right: 0.3rem; color: var(--muted); font-size: 1.4rem; font-weight: 500; }
.pricing-intro .amount { display: block; margin-bottom: 0.5rem; color: var(--accent); font-size: clamp(4rem, 9vw, 6.5rem); line-height: 0.9; font-variant-numeric: tabular-nums; letter-spacing: -0.07em; }
.pricing-intro > p:last-child { max-width: 31ch; color: var(--muted); }
.pricing-details { padding-top: 0.2rem; }
.pricing-details h3 { margin-bottom: 1.5rem; font-size: clamp(1.6rem, 3vw, 2.25rem); }
.checks { padding: 0; margin: 0 0 2rem; list-style: none; }
.checks li { position: relative; padding: 0 0 1.3rem 2rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pricing-details .fine { max-width: 34rem; margin: 0.9rem 0 0; }

details { border-bottom: 1px solid var(--line); padding-block: 1.1rem; }
summary { cursor: pointer; font-weight: 650; letter-spacing: -0.01em; }
summary:hover { color: var(--accent); }
details p { max-width: 65ch; margin: 0.75rem 0 0; color: var(--muted); }
.fine { color: var(--muted); font-size: 0.88rem; }
.disclaimer { max-width: 48rem; margin: 1.75rem 0 0; padding: 0; background: transparent; color: var(--muted); font-size: 0.84rem; font-style: normal; }

article.doc { padding-block: 3rem 4rem; }
article.doc h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
article.doc h2 { margin-top: 2.7rem; font-size: clamp(1.65rem, 3vw, 2.2rem); }
article.doc li { margin: 0.4rem 0; }
.lede { max-width: 65ch; margin: 0 0 1.75rem; color: var(--muted); font-size: 1.2rem; }
.cta { margin-top: 2.5rem; padding: 1.5rem; border-radius: 0.65rem; background: var(--tint); }
.cta p { margin: 0 0 0.9rem; }

.site-footer { border-top: 1px solid var(--line); padding-block: 2.4rem 3rem; color: var(--muted); font-size: 0.88rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-bottom: 1rem; }
.site-footer .disclaimer { margin-top: 0; }

.form-page { padding-block: 3rem 4rem; }
.form-page h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); }
.form-page h2 { margin-top: 2.7rem; font-size: clamp(1.65rem, 3vw, 2.2rem); }
/* Clerk mounts its sign-in widget in the light DOM, so the heading sizes above land on its own header. */
#sign-in :is(h1, h2, h3) { margin: 0 0 0.5rem; font-size: 1.0625rem; line-height: 1.3; letter-spacing: normal; }
.back { margin: 0 0 0.75rem; font-size: 0.92rem; }
.back a { text-decoration: none; }
.back a:hover { text-decoration: underline; }
.form-page label { display: block; margin: 1.4rem 0 0.4rem; font-weight: 600; }
.form-page input[type="text"], .form-page input[type="email"], .form-page textarea, .form-page input[type="file"] { width: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--muted); border-radius: 0.35rem; background: var(--card); color: var(--ink); font: inherit; }
.form-page .check { display: flex; gap: 0.65rem; align-items: baseline; margin: 1.4rem 0; }
.form-page .check label { display: inline; margin: 0; font-weight: 400; }
.form-page button.button { font: inherit; font-weight: 700; cursor: pointer; }
.form-page form .button { margin-top: 0.8rem; }
.note { padding: 0.7rem 0.9rem; border-radius: 0.35rem; background: var(--note); }
.badge.medium { background: var(--medium-bg); color: var(--medium-ink); }
.badge.low { background: var(--low-bg); color: var(--low-ink); }
.badge.match { background: var(--tint); color: var(--accent-dark); }
.table-scroll { overflow-x: auto; }
.stats { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stats th, .stats td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); text-align: right; }
.stats th[scope="row"] { font-weight: 500; text-align: left; }
.stats .text { text-align: left; }
.summary-card { margin: 1.5rem 0 2.75rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: 0.65rem; background: var(--card); }
.summary-card > p { margin: 0; }
.ba-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 2.8rem 0 2rem; }
.ba { padding: clamp(1.1rem, 2.5vw, 1.5rem); border: 1px solid var(--line); border-radius: 0.65rem; background: var(--card); }
.ba > p { margin: 0 0 1.2rem; color: var(--muted); font-size: 0.94rem; }
.ba figure { margin: 0.9rem 0 0; }
.ba figure .badge { display: inline-block; margin-bottom: 0.45rem; }
.ba figure img, .ba-photo { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 0.4rem; }
.ba-photo { max-width: 9rem; }
.heard { margin: 0; padding: 0.7rem 0.85rem; border-radius: 0.4rem; background: var(--paper); font-size: 0.94rem; }
section.band.own-site { padding-block: clamp(3rem, 5vw, 4.5rem); }
.own-site p { max-width: 60ch; }
.own-site h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.summary-head { margin-top: 0.35rem !important; font-size: 1.15rem; }
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 1.1rem 0; padding: 0; list-style: none; }
.tally li { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; padding: 0.85rem 1rem; border-radius: 0.5rem; background: var(--paper); }
.tally-count { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.tally li.none .tally-count { color: var(--muted); }
.summary-letter { padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); }
.summary-letter .badge { margin-right: 0.2rem; }
.progress { position: relative; height: 0.45rem; margin: 1.1rem 0; overflow: hidden; border-radius: 999px; background: var(--tint); }
.progress::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: inherit; background: var(--accent); animation: progress 1.6s ease-in-out infinite; }
/* Pages scanned is known: show real progress instead of the indeterminate sweep. */
.progress.determinate::before { width: var(--progress); animation: none; }
@keyframes progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}
.top-issues { margin: 0 0 2.75rem; padding: 0; list-style: none; }
.top-issues li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.runs { padding: 0; list-style: none; }
.runs li { margin: 0.9rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 0.65rem; background: var(--card); }
.runs h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.runs p { margin: 0; }
.runs li.order { padding: 0; transition: border-color 180ms ease; }
.runs li.order a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-radius: inherit; color: var(--ink); text-decoration: none; }
.runs li.order p { color: var(--muted); }
.runs li.order .chevron { color: var(--muted); font-size: 1.8rem; line-height: 1; }
.runs li.order:hover { border-color: var(--accent); }
.runs li.order:hover h2, .runs li.order:hover .chevron { color: var(--accent); }

@keyframes page-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 850px) {
  .hero-layout, .pricing-layout, .ba-list { grid-template-columns: 1fr; }
  .hero-copy { max-width: 46rem; }
  .issue { width: min(100%, 38rem); transform: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 0; }
  .trust-list { grid-template-columns: 1fr; gap: 2rem; }
  .trust-list p { max-width: 48ch; }
  .pricing-intro { position: static; }
}

@media (max-width: 640px) {
  .site-header nav { order: 3; width: 100%; margin-left: 0; }
  .theme-toggle { margin-left: auto; }
  .hero-layout { gap: 3rem; }
  .steps { grid-template-columns: 1fr; }
  .issue dl > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .button { width: 100%; }
  .hero-link { padding-block: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-layout { animation: none; }
  .progress::before { width: 100%; opacity: 0.55; animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
