/* =====================================================================
   accidentcompensationcalculator.us — Design System
   Legal / finance authority aesthetic. Calm, trustworthy, fast.
   Mobile-first. No external fonts (system stack for speed + privacy).
   ===================================================================== */

:root {
  /* Brand palette — calm authority blues + a reassuring green accent */
  --navy:        #0f2c4d;   /* deep trust navy (header, headings) */
  --navy-700:    #173f6b;
  --blue:        #1f6fb2;   /* primary action / links */
  --blue-600:    #1a5e98;
  --blue-50:     #eef5fb;   /* tints, panels */
  --teal:        #0f8a7e;   /* success / "result" accent */
  --teal-50:     #e7f5f3;
  --gold:        #c8842b;   /* subtle highlight, "estimate" badge */

  --ink:         #1c2733;   /* body text */
  --ink-soft:    #46596b;   /* secondary text */
  --line:        #d9e2ec;   /* borders / hairlines */
  --line-soft:   #eaf0f6;
  --bg:          #ffffff;
  --bg-alt:      #f5f8fb;   /* section alternation */
  --bg-sink:     #eef3f8;

  --warn-bg:     #fdf6e9;
  --warn-line:   #e8cf9a;
  --warn-ink:    #7a5310;

  --radius:      14px;
  --radius-sm:   9px;
  --shadow-sm:   0 1px 2px rgba(15, 44, 77, .06), 0 1px 3px rgba(15, 44, 77, .08);
  --shadow:      0 4px 14px rgba(15, 44, 77, .08), 0 2px 6px rgba(15, 44, 77, .05);
  --shadow-lg:   0 18px 48px rgba(15, 44, 77, .14);

  --maxw:        1080px;
  --maxw-narrow: 760px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.22;
  font-weight: 750;
  letter-spacing: -.01em;
  margin: 1.8em 0 .55em;
}
h1 { font-size: clamp(1.85rem, 4.4vw, 2.7rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); padding-top: .35em; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; color: var(--navy-700); }
p  { margin: 0 0 1.05em; }
strong { color: var(--navy-700); font-weight: 700; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow    { max-width: var(--maxw-narrow); margin-left: auto; margin-right: auto; }

/* skip link for accessibility */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; color: #fff; }

/* =========================  HEADER / NAV  ========================= */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.1) blur(6px);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.12rem; color: var(--navy);
  letter-spacing: -.02em; white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--navy); }
.brand .mark {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  background: linear-gradient(150deg, var(--blue), var(--teal));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .92rem;
  box-shadow: var(--shadow-sm);
}
.brand .brand-sub { color: var(--blue); }

.nav-links {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
  list-style: none; padding: 0; margin-block: 0;
}
.nav-links a {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); font-weight: 600; font-size: .96rem;
}
.nav-links a:hover { background: var(--blue-50); color: var(--navy); text-decoration: none; }
.nav-links a.cta {
  background: var(--blue); color: #fff;
}
.nav-links a.cta:hover { background: var(--blue-600); color: #fff; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; width: 42px; height: 38px; cursor: pointer; color: var(--navy);
  font-size: 1.25rem; line-height: 1;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 10px 14px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 1.02rem; }
}

/* =========================  HERO  ========================= */
.hero {
  background:
    radial-gradient(1200px 380px at 78% -8%, rgba(15,138,126,.14), transparent 60%),
    radial-gradient(900px 420px at 8% 0%, rgba(31,111,178,.16), transparent 55%),
    linear-gradient(180deg, #f7fafd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(34px, 6vw, 64px) 0 clamp(28px, 4vw, 44px);
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-50); border: 1px solid #cbeae5;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { max-width: 18ch; }
.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--ink-soft);
  max-width: 60ch; margin-bottom: 0;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: 1.05fr 1.25fr; gap: 40px; align-items: center; }
}

.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px;
  font-size: .92rem; color: var(--ink-soft);
}
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row .tick { color: var(--teal); font-weight: 800; }

/* =========================  REGION TOGGLE  ========================= */
.region-toggle {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--bg-sink); border: 1px solid var(--line); border-radius: 999px;
}
.region-toggle button {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  padding: 7px 16px; border-radius: 999px; color: var(--ink-soft);
  background: transparent; transition: all .15s ease; font-size: .92rem;
}
.region-toggle button[aria-pressed="true"] {
  background: #fff; color: var(--navy); box-shadow: var(--shadow-sm);
}
.region-toggle button:hover { color: var(--navy); }

/* =========================  CALCULATOR CARD  ========================= */
.calc-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.calc-card .calc-head {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.calc-card .calc-head h2 { color: #fff; margin: 0; font-size: 1.18rem; }
.calc-card .calc-head p { margin: 3px 0 0; color: #cfe0f0; font-size: .88rem; }
.calc-body { padding: 22px; }
@media (min-width: 620px) { .calc-body { padding: 26px 28px; } }

.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block; font-weight: 700; color: var(--navy-700);
  margin-bottom: 7px; font-size: .96rem;
}
.field .hint { font-size: .84rem; color: var(--ink-soft); font-weight: 500; margin-top: 5px; }

.input, select.input, input.input {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%231f6fb2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}
.input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31,111,178,.16);
}
.input::placeholder { color: #9bb0c4; }

/* currency-prefixed money inputs */
.money { position: relative; }
.money .cur {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-soft); font-weight: 700; pointer-events: none;
}
.money input { padding-left: 30px; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* segmented severity control */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: block; text-align: center; cursor: pointer; font-weight: 700; font-size: .92rem;
  padding: 11px 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink-soft); background: #fff; transition: all .15s ease;
}
.segmented label small { display: block; font-weight: 500; font-size: .76rem; color: #8497a8; margin-top: 2px; }
.segmented input:checked + label {
  border-color: var(--blue); background: var(--blue-50); color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.segmented input:focus-visible + label { box-shadow: 0 0 0 3px rgba(31,111,178,.18); }
.segmented label:hover { border-color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 750; cursor: pointer; border: 0;
  padding: 14px 22px; border-radius: var(--radius-sm); font-size: 1.02rem;
  transition: transform .08s ease, box-shadow .15s, background .15s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--blue) 0%, var(--teal) 130%);
  color: #fff; width: 100%; box-shadow: var(--shadow);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: #fff; color: var(--blue); border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--blue-50); }

/* button micro-feedback pulse */
@keyframes pulseBtn { 0%{transform:scale(1)} 40%{transform:scale(.97)} 100%{transform:scale(1)} }
.btn.pulse { animation: pulseBtn .32s ease; }

/* =========================  RESULT PANEL  ========================= */
.result {
  margin-top: 22px; border: 1.5px solid var(--teal); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--teal-50) 0%, #fff 78%);
  padding: 22px; display: none; scroll-margin-top: 80px;
}
.result.show { display: block; animation: resIn .35s ease; }
@keyframes resIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.result .result-label {
  font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 4px;
}
.result .result-total {
  font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; color: var(--navy);
  letter-spacing: -.02em; line-height: 1.1;
}
.result .result-sub { color: var(--ink-soft); margin: 2px 0 16px; font-size: .98rem; }

.breakdown { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: .96rem; }
.breakdown th, .breakdown td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line-soft); }
.breakdown td:last-child, .breakdown th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown tr:last-child td { border-bottom: 0; }
.breakdown .row-total td { font-weight: 800; color: var(--navy); border-top: 2px solid var(--line); padding-top: 12px; }
.breakdown .muted td { color: var(--ink-soft); }

.estimate-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700;
  color: var(--gold); background: var(--warn-bg); border: 1px solid var(--warn-line);
  padding: 3px 10px; border-radius: 999px;
}

/* =========================  DISCLAIMER / NOTE BOXES  ========================= */
.note {
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: .92rem;
  margin: 16px 0; line-height: 1.55;
}
.note-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.note-info { background: var(--blue-50); border: 1px solid #c9def0; color: var(--navy-700); }
.note strong { color: inherit; }
.note .note-title { font-weight: 800; display: block; margin-bottom: 3px; }

/* =========================  CONTENT / ARTICLE  ========================= */
.section { padding: clamp(40px, 6vw, 64px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
.section-head { max-width: 62ch; margin-bottom: 8px; }
.section-head .kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px;
}

.prose { font-size: 1.04rem; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--blue); }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 20px; border-left: 4px solid var(--teal);
  color: var(--navy-700); background: var(--teal-50); border-radius: 0 8px 8px 0;
}

/* answer-first lead block (for AI citation) */
.answer-box {
  background: var(--blue-50); border: 1px solid #c9def0; border-left: 5px solid var(--blue);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 0 0 26px;
  font-size: 1.07rem; line-height: 1.6;
}
.answer-box strong { color: var(--navy); }

/* feature / card grid */
.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #c5d6e6; }
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 0; }
.card a.card-link { font-weight: 700; display: inline-block; margin-top: 12px; }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue); margin-bottom: 14px; font-size: 1.2rem;
}

/* =========================  LINK HUB (homepage browse-all)  ========================= */
.link-hub {
  display: grid; gap: 26px 30px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.hub-col h3 {
  margin: 0 0 12px; font-size: 1.02rem; color: var(--navy);
  padding-bottom: 8px; border-bottom: 2px solid var(--line);
}
.hub-col ul { list-style: none; padding: 0; margin: 0; }
.hub-col li { margin: 0 0 2px; }
.hub-col li a {
  display: block; padding: 7px 10px; border-radius: 8px;
  color: var(--ink-soft); font-size: .95rem; font-weight: 600;
  transition: background .15s, color .15s;
}
.hub-col li a:hover { background: var(--blue-50); color: var(--navy); text-decoration: none; }
.hub-col li a strong { color: var(--blue); }

/* =========================  COMPARISON / DATA TABLES  ========================= */
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table.data {
  width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 460px; background: #fff;
}
table.data caption { caption-side: top; text-align: left; font-size: .86rem; color: var(--ink-soft); padding: 10px 14px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data thead th {
  background: var(--navy); color: #fff; font-weight: 700; font-size: .88rem;
  letter-spacing: .01em; border-bottom: 0; position: sticky; top: 0;
}
table.data tbody tr:nth-child(even) { background: var(--bg-alt); }
table.data tbody tr:hover { background: var(--blue-50); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .band { font-weight: 700; color: var(--navy-700); }

/* =========================  FAQ ACCORDION (<details>)  ========================= */
.faq { margin: 8px 0; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 12px; background: #fff; overflow: hidden; transition: border-color .15s;
}
.faq details[open] { border-color: #c5d6e6; box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; position: relative;
  font-weight: 700; color: var(--navy); font-size: 1.04rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--blue); transition: transform .2s; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--blue-600); }
.faq .faq-a { padding: 0 18px 18px; color: var(--ink-soft); }
.faq .faq-a > :first-child { margin-top: 0; }
.faq .faq-a > :last-child { margin-bottom: 0; }

/* =========================  CTA STRIP  ========================= */
.cta-strip {
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue-600) 100%);
  color: #fff; border-radius: var(--radius); padding: clamp(28px, 5vw, 44px);
  text-align: center; box-shadow: var(--shadow);
}
.cta-strip h2 { color: #fff; margin-top: 0; }
.cta-strip p { color: #d3e3f1; max-width: 56ch; margin-inline: auto; }
.cta-strip .btn-primary { width: auto; background: #fff; color: var(--navy); margin-top: 8px; }
.cta-strip .btn-primary:hover { background: #eef5fb; }

/* =========================  AD SLOTS  ========================= */
.ad-slot {
  margin: 30px auto; text-align: center; max-width: 728px;
  min-height: 90px; /* reserve space; AdSense fills */
  display: flex; align-items: center; justify-content: center;
}
.ad-slot .ad-label {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #aebccb;
}
.ad-slot ins { display: block; width: 100%; }

/* =========================  BREADCRUMB  ========================= */
.crumbs { font-size: .86rem; color: var(--ink-soft); padding: 16px 0 0; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { margin: 0 7px; color: #b9c6d3; }

/* =========================  FOOTER  ========================= */
.site-footer {
  background: var(--navy); color: #c2d3e4; margin-top: 60px;
  padding: 48px 0 28px; font-size: .95rem;
}
.site-footer a { color: #d9e6f2; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; gap: 28px; grid-template-columns: 1fr;
  padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.12);
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: 8px; display: inline-flex; gap: 9px; align-items: center; }
.footer-brand .mark { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(150deg, var(--blue), var(--teal)); display:grid; place-items:center; color:#fff; font-weight:800; font-size:.85rem; }
.footer-about { color: #9fb6cd; max-width: 42ch; font-size: .92rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  padding-top: 22px; color: #8ba4bd; font-size: .85rem;
}
.footer-disclaimer { color: #8ba4bd; font-size: .82rem; margin-top: 14px; line-height: 1.55; max-width: 95ch; }

/* =========================  UTILITIES  ========================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.lead-text { font-size: 1.15rem; color: var(--ink-soft); }
.updated { font-size: .85rem; color: var(--ink-soft); }
.updated time { font-weight: 600; color: var(--navy-700); }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); border:0; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

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