/* WreckScore — site styles. Page sections keep the inline styles from the Claude Design screens;
   this file holds fonts, the shared header/footer, and the calculator, journey and legal-page components. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2-variations"), url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-latin-var.woff2") format("woff2-variations"), url("/assets/fonts/public-sans-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-latin-var-italic.woff2") format("woff2-variations"), url("/assets/fonts/public-sans-latin-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #F5F1E8;
  --ink: #14202E;
  --ink-2: #46505C;
  --muted: #5A636E;
  --line: #DCD4C4;
  --card: #FFFFFF;
  --night: #0F1B2A;
  --amber: #F2B01E;
  --amber-soft: #FBEFC9;
  --amber-text: #8A5A00;
  --green: #1D6A4C;
  --green-soft: #E6F0EB;
  --red: #A8261D;
  --col: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
.d { font-family: "Archivo", "Arial Narrow", sans-serif; font-stretch: 82%; }
a { color: var(--ink); }
a:hover { color: var(--green); }
img, svg { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); margin: 0; flex-shrink: 0; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--amber); color: var(--ink); font-weight: 800; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ---------- column layout: mobile-first, centered on larger screens ---------- */
.wrap { max-width: var(--col); margin: 0 auto; background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 700px) {
  body { background: #E9E3D6; }
  .wrap { box-shadow: 0 0 0 1px #DCD4C4; }
}
.wrap > main { flex-grow: 1; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--night); color: #fff; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-height: 44px; }
.brand:hover { color: #fff; }
.brand .d { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.brand .d span { color: var(--amber); }
.hdr-actions { display: flex; align-items: center; gap: 6px; }
.lang { display: flex; border: 1px solid #3A4A5E; border-radius: 999px; overflow: hidden; font-size: 13px; font-weight: 700; }
.lang a, .lang span { padding: 10px 12px; color: #fff; text-decoration: none; line-height: 1; }
.lang [aria-current] { background: var(--amber); color: var(--ink); }
.menu { position: relative; }
.menu summary { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; border-radius: 10px; }
.menu[open] summary { background: #1F2E42; }
.menu nav { position: absolute; right: 0; top: 52px; width: min(300px, calc(100vw - 32px)); background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,27,42,.25); padding: 8px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.menu a:hover, .menu a[aria-current] { background: var(--paper); color: var(--ink); }
.menu li.cta a { background: var(--amber); margin-bottom: 4px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 24px; padding: 28px 20px 36px; background: var(--night); color: #B7C2CF; font-size: 14px; display: flex; flex-direction: column; gap: 14px; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.site-footer nav a { color: #fff; min-height: 40px; display: flex; align-items: center; }
.site-footer p { margin: 0; line-height: 1.55; }

/* ---------- shared page pieces (generated pages) ---------- */
.page { padding: 24px 20px 32px; display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-text); }
.eyebrow.muted { color: var(--muted); }
.page h1 { margin: 0; font-size: 36px; line-height: 1.02; font-weight: 800; }
.small, .fine { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.center { text-align: center; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.prose h2 { font-family: "Archivo", sans-serif; font-stretch: 82%; font-size: 24px; line-height: 1.1; font-weight: 800; margin: 10px 0 0; }
.prose p, .prose li, .prose dd { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.prose p { margin: 0; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose .lede { font-size: 18px; color: var(--ink); }
.prose .small { font-size: 13px; margin-top: 12px; }
.facts { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px; display: grid; grid-template-columns: max-content 1fr; gap: 0 14px; }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid #EDE7DA; }
.facts dt { font-weight: 800; font-size: 14px; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

/* ---------- buttons ---------- */
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 10px 16px; border: 0; border-radius: 14px; background: var(--amber); color: var(--ink); font-size: 18px; font-weight: 800; text-decoration: none; text-align: center; }
.btn-primary:hover { color: var(--ink); filter: brightness(1.04); }
.btn-primary.stack { flex-direction: column; gap: 2px; min-height: 64px; font-size: 17px; }
.btn-primary.stack small { font-size: 12px; font-weight: 600; }
.btn-outline { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 16px; border-radius: 14px; border: 2px solid var(--ink); color: var(--ink); font-size: 15px; font-weight: 800; text-decoration: none; text-align: center; }
.linklike { min-height: 44px; background: transparent; border: 0; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: underline; }

/* ---------- calculator ---------- */
.tool { display: flex; flex-direction: column; gap: 16px; min-height: 60vh; }
.tool[data-view="intro"] { gap: 20px; }
.tool-title { margin: 0; font-size: 38px; line-height: 1.02; font-weight: 800; }
.tool-q { margin: 0; font-size: 30px; line-height: 1.08; font-weight: 800; }
.tool-lede { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.tool-help { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.ticks svg { flex-shrink: 0; margin-top: 1px; color: var(--green); }
.q-top { display: flex; justify-content: space-between; align-items: center; }
.back { min-height: 44px; padding: 0 4px; display: flex; align-items: center; gap: 6px; background: transparent; border: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.count { font-size: 13px; font-weight: 700; color: var(--muted); }
.segments { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.segments span { height: 6px; border-radius: 3px; background: var(--line); }
.segments span.on { background: var(--green); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { min-height: 58px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 14px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.opt:hover { border-color: #A99F8B; }
.opt .box { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #A99F8B; display: flex; align-items: center; justify-content: center; }
.opt .box svg { width: 14px; height: 14px; stroke-width: 3.4; }
.opt[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.opt[aria-pressed="true"] .box { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.result-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ring { position: relative; width: 176px; height: 176px; }
.ring svg { position: absolute; inset: 0; }
.ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num .d { font-size: 58px; line-height: 1; font-weight: 800; }
.ring-num small { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .ring-bar { animation: ring-in .9s ease-out both; }
  @keyframes ring-in { from { stroke-dasharray: 0 402.12; } }
}
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #F8E1DE; border: 1px solid #E3A49C; color: #5C130D; font-size: 15px; line-height: 1.5; }
.alert svg { flex-shrink: 0; color: var(--red); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card h2 { margin: 0; font-size: 22px; font-weight: 800; }
.card.good { background: var(--green-soft); border-color: var(--green-soft); color: #1B3A2E; }
.fix { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid #EDE7DA; }
.fix-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 800; }
.fix .gain { color: var(--amber-text); white-space: nowrap; }
.fix p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.factor-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.factor-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #EDE7DA; font-size: 15px; }
.factor-list li:last-child { border-bottom: 0; }
.factor-list b { font-family: "Archivo", sans-serif; }
.tool-about { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tool-about h2 { margin: 0; font-size: 24px; font-weight: 800; }

/* ---------- claim journey (no JavaScript: radio buttons switch detail level) ---------- */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; background: #E7E0D1; border-radius: 12px; gap: 4px; border: 0; margin: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--ink-2); font-size: 15px; font-weight: 700; cursor: pointer; }
.seg input:checked + label { background: #fff; color: var(--ink); font-weight: 800; }
.seg input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: 2px; }
.stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stage { display: flex; gap: 14px; }
.stage .rail { display: flex; flex-direction: column; align-items: center; width: 36px; flex-shrink: 0; }
.stage .num { width: 36px; height: 36px; border-radius: 50%; background: var(--amber); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; flex-shrink: 0; }
.stage.key .num { background: var(--green); color: #fff; }
.stage.last .num { background: var(--ink); color: #fff; }
.stage .line { flex-grow: 1; width: 2px; background: #C9C0AE; margin: 4px 0; }
.stage .body { flex-grow: 1; padding: 4px 0 22px; display: flex; flex-direction: column; gap: 6px; }
.stage .time { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stage h2 { margin: 0; font-size: 21px; line-height: 1.1; font-weight: 800; }
.stage p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.stage .you { margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.journey .long, .journey .you { display: none; }
.journey:has(#mode-long:checked) .short { display: none; }
.journey:has(#mode-long:checked) .long, .journey:has(#mode-long:checked) .you { display: block; }

@media print {
  .site-header, .site-footer, .skip, .btn-primary, .btn-outline, .seg { display: none !important; }
  .journey .long, .journey .you { display: block !important; }
  body, .wrap { background: #fff; }
}
