:root {
  color-scheme: light;
  --ink: #172554;
  --muted: #475569;
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --soft: #eff6ff;
  --surface: #ffffff;
  --line: #cbd5e1;
  --danger: #b91c1c;
  --shadow: 0 18px 55px rgb(30 58 138 / 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f8fafc; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 50% 0, #dbeafe 0, #f8fafc 33rem); }
a { color: var(--brand-dark); text-underline-offset: 0.2em; }
.skip-link { position: fixed; z-index: 10; top: 0.75rem; left: 0.75rem; transform: translateY(-180%); padding: 0.75rem 1rem; border-radius: 0.6rem; color: white; background: var(--ink); }
.skip-link:focus { transform: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; min-height: 44px; color: var(--ink); font-weight: 800; text-decoration: none; }
.brand-symbol { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; color: white; background: var(--brand); font-size: 1.25rem; }
.quiet-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.demo-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: 100%; }
.reserved-rail { display: none; }
main { min-width: 0; width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.hero { max-width: 54rem; padding: clamp(1rem, 5vw, 3.5rem) 0 2rem; }
.eyebrow, .step { margin: 0 0 0.65rem; color: var(--brand); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { max-width: 16ch; margin: 0; font-size: clamp(2.15rem, 7vw, 4.8rem); line-height: 0.98; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.lead { max-width: 48rem; margin: 1.25rem 0; color: #334155; font-size: clamp(1.05rem, 2.2vw, 1.28rem); line-height: 1.65; }
.trust-list { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.trust-list li { padding: 0.55rem 0.8rem; border: 1px solid #bfdbfe; border-radius: 999px; color: var(--brand-dark); background: rgb(239 246 255 / 0.86); font-size: 0.92rem; font-weight: 700; }
.calculator-card, .result-card { border: 1px solid #dbeafe; border-radius: 1.25rem; padding: clamp(1rem, 3vw, 2rem); background: rgb(255 255 255 / 0.96); box-shadow: var(--shadow); }
.result-card { margin-top: 1.5rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); line-height: 1.15; }
fieldset { min-width: 0; margin: 1.75rem 0 0; padding: 0; border: 0; }
legend { margin-bottom: 0.8rem; font-weight: 800; }
.card-grid, .context-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0.8rem; }
.context-grid { margin-top: 1rem; }
label { display: grid; gap: 0.4rem; min-width: 0; color: #334155; font-size: 0.92rem; font-weight: 700; }
select, button { min-height: 48px; border-radius: 0.7rem; font: inherit; }
select { min-width: 0; width: 100%; border: 1px solid var(--line); padding: 0.65rem 2.2rem 0.65rem 0.75rem; color: var(--ink); background: var(--surface); }
select:focus-visible, button:focus-visible, a:focus-visible, .table-wrap:focus-visible, .result-card:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.form-help { margin: 1rem 0; color: var(--muted); line-height: 1.55; }
button { width: 100%; border: 0; padding: 0.8rem 1.2rem; color: white; background: var(--brand); font-weight: 800; cursor: pointer; }
button:hover { background: var(--brand-dark); }
button:disabled { cursor: wait; opacity: 0.7; }
.message { padding: 0.85rem 1rem; border-radius: 0.7rem; line-height: 1.5; }
.error { color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; }
.verdict-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1.25rem; }
.verdict-grid article { min-width: 0; padding: 1rem; border-radius: 0.85rem; background: var(--soft); }
.verdict-grid span, .verdict-grid small { display: block; color: var(--muted); }
.verdict-grid strong { display: block; margin: 0.35rem 0; font-size: clamp(1.1rem, 3vw, 1.45rem); overflow-wrap: anywhere; }
.explanation { margin: 1.25rem 0; padding: 1rem; border-left: 4px solid var(--brand); background: #f8fafc; font-size: 1.05rem; font-weight: 700; line-height: 1.6; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 0.8rem; }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th, td { padding: 0.75rem; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: normal; }
thead { color: #334155; background: #f8fafc; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.limits, .app-cta { margin-top: 1.25rem; padding: 1rem; border-radius: 0.85rem; }
.limits { background: #f8fafc; }
.limits h3 { margin-top: 0; }
.limits ul { margin-bottom: 0; padding-left: 1.25rem; line-height: 1.6; }
.app-cta { color: white; background: var(--ink); }
.app-cta strong { display: block; font-size: 1.12rem; }
.app-cta p { margin-bottom: 0; color: #dbeafe; }
footer { display: grid; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.55; }
footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }

@media (max-width: 560px) {
  .site-header { align-items: flex-start; }
  .quiet-link { max-width: 10rem; text-align: right; }
  main { width: min(100% - 1rem, 1120px); padding-top: 0.5rem; }
  .verdict-grid { grid-template-columns: 1fr; }
  .calculator-card, .result-card { border-radius: 1rem; }
}

@media (min-width: 1880px) and (min-height: 720px) {
  .demo-layout { grid-template-columns: 160px minmax(0, 1120px) 160px; justify-content: center; gap: 150px; }
  .reserved-rail { display: grid; align-self: start; place-items: center; min-height: 600px; margin-top: 11rem; border: 1px dashed #cbd5e1; border-radius: 0.8rem; color: #64748b; background: rgb(255 255 255 / 0.58); font-size: 0.75rem; text-align: center; }
  main { width: 1120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
