/* AutoTaxCalculator.com — design system */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --burgundy: #7a1f3d;
  --burgundy-600: #8f2649;
  --burgundy-700: #651832;
  --wine: #3f0d20;
  --wine-2: #551229;
  --rose: #c2416b;
  --rose-50: #fbeef2;
  --gold: #c9a24b;
  --gold-soft: #f4e6c3;
  --cream: #fbf7f4;
  --paper: #ffffff;
  --line: #ecdfe3;
  --line-strong: #dcc6cd;
  --ink: #1f1a1c;
  --text: #2b2427;
  --muted: #6b5e63;
  --green: #2f7d5b;
  --green-50: #e8f4ee;
  --amber-50: #fdf4e3;
  --amber: #8a5a00;

  --r: 12px;
  --r-lg: 20px;
  --shadow-s: 0 1px 2px rgba(63, 13, 32, .06), 0 4px 14px rgba(63, 13, 32, .06);
  --shadow-m: 0 24px 48px -24px rgba(63, 13, 32, .45);
  --wrap: 1160px;
  --read: 760px;
  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font: 400 17px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem); font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.6em; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin: .3em 0; }
strong { color: var(--ink); }
small { font-size: .85em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.read { max-width: var(--read); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--wine); padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip:focus { left: 12px; top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-head { background: var(--wine); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--gold); font-weight: 700; }
.nav { display: none; gap: 4px; }
.nav a { color: #f3e3e8; text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.nav-toggle { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 10px; padding: 8px 12px; font: 600 .9rem var(--body); cursor: pointer; }
.mobile-nav { display: none; background: var(--wine-2); padding: 8px 16px 16px; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; color: #fff; text-decoration: none; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 500; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .nav-toggle, .mobile-nav, .mobile-nav.is-open { display: none; }
}

/* Hero */
.hero {
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(201,162,75,.22), transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(194,65,107,.28), transparent 60%),
    linear-gradient(160deg, var(--wine) 0%, var(--burgundy-700) 55%, var(--burgundy) 100%);
  color: #f7e9ee;
  padding: 40px 0 120px;
}
.hero h1 { color: #fff; max-width: 820px; }
.hero p.lead { font-size: 1.12rem; max-width: 680px; color: #f3dfe6; }
.hero .eyebrow { color: var(--gold); }
.eyebrow { display: inline-block; font: 600 .78rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 14px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.chip b { color: var(--gold); }

/* Breadcrumbs */
.crumbs { font-size: .88rem; margin-bottom: 18px; color: #e8cdd6; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .7; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: #fff; }

/* Calculator */
.calc-shell { margin-top: -88px; position: relative; z-index: 2; }
.calc {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-m);
  border: 1px solid var(--line);
  display: grid;
  overflow: hidden;
}
@media (min-width: 960px) { .calc { grid-template-columns: 1.15fr .85fr; } }
.calc-form { padding: 22px; }
@media (min-width: 600px) { .calc-form { padding: 30px; } }
.calc-form h2 { margin: 0 0 4px; font-size: 1.35rem; }
.calc-form .hint { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.fields { display: grid; gap: 16px; }
@media (min-width: 600px) { .fields { grid-template-columns: 1fr 1fr; } .fields .full { grid-column: 1 / -1; } }
.field label, .field legend { display: block; font-weight: 600; font-size: .93rem; color: var(--ink); margin-bottom: 6px; }
.field .help { display: block; font-size: .82rem; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.input-wrap { position: relative; }
.input-wrap .pre, .input-wrap .post { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-wrap .pre { left: 14px; }
.input-wrap .post { right: 14px; }
input[type="number"], input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: 500 1rem var(--body);
  color: var(--ink);
  background: #fffdfc;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap .pre + input { padding-left: 30px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 4px rgba(122,31,61,.12); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a1f3d' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
fieldset { border: 0; padding: 0; margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { margin: 0; font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; cursor: pointer; font-size: .93rem; min-height: 44px; }
.seg input:checked + span { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--burgundy); flex: none; }

.calc-out {
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(201,162,75,.18), transparent 60%),
    linear-gradient(170deg, var(--wine) 0%, var(--wine-2) 100%);
  color: #f6e4ea;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) { .calc-out { padding: 30px; } }
.calc-out .label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #e5c7d1; font-weight: 600; }
.total { font-family: var(--head); font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.4rem); color: var(--gold); line-height: 1.1; margin: 6px 0 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.total-sub { color: #f0d6df; font-size: .95rem; margin-bottom: 18px; }
.breakdown { list-style: none; padding: 0; margin: 0 0 18px; border-top: 1px solid rgba(255,255,255,.14); }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); margin: 0; font-size: .95rem; }
.breakdown li span:last-child { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown li.grand span { color: var(--gold); font-weight: 700; }
.math { background: rgba(0,0,0,.18); border-radius: 10px; padding: 12px 14px; font-size: .86rem; color: #f3dbe3; line-height: 1.6; margin-bottom: 16px; }
.math b { color: #fff; }
.out-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--body); border-radius: 10px; padding: 12px 18px; min-height: 46px; cursor: pointer; text-decoration: none; border: 1.5px solid transparent; }
.btn-gold { background: var(--gold); color: var(--wine); }
.btn-gold:hover { background: #d8b45f; color: var(--wine); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-primary { background: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-600); color: #fff; }
.note-out { font-size: .8rem; color: #dcbcc7; margin-top: 14px; line-height: 1.5; }
.verified { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: .86rem; color: var(--muted); padding: 14px 22px; border-top: 1px solid var(--line); background: #fffaf8; grid-column: 1 / -1; }
.verified .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; }

/* Content layout */
.content { padding: 48px 0 24px; }
.layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
.layout > * { min-width: 0; }
@media (min-width: 1040px) { .layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.toc { position: sticky; top: 84px; align-self: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; font-size: .92rem; display: none; }
@media (min-width: 1040px) { .toc { display: block; } }
.toc h2 { font-size: 1rem; margin: 0 0 10px; font-family: var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--burgundy); }
.answer {
  background: var(--paper);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 20px;
  box-shadow: var(--shadow-s);
  font-size: 1.05rem;
  margin: 0 0 1.4em;
}
.answer p:last-child { margin: 0; }
.callout { border-radius: var(--r); padding: 16px 18px; margin: 1.4em 0; font-size: .97rem; border: 1px solid; }
.callout p:last-child { margin: 0; }
.callout.tip { background: var(--green-50); border-color: #cfe7da; }
.callout.warn { background: var(--amber-50); border-color: #f1dfb8; }
.callout.info { background: var(--rose-50); border-color: #f1d3dd; }
.callout strong:first-child { display: block; margin-bottom: 4px; }

.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #f8eef1; color: var(--ink); font-weight: 600; font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.example { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin: 1.2em 0; }
.example h3 { margin-top: 0; font-size: 1.1rem; }
.example ol { margin-bottom: 0; }

.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin: 10px 0; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--burgundy); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; }

.sources { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; font-size: .92rem; margin-top: 2.4em; }
.sources h2 { font-size: 1.15rem; margin-top: 0; }
.sources ul { margin-bottom: 0; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); margin: 0 0 1.6em; }

/* Cards */
.section { padding: 56px 0; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head h2 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-s); display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--line-strong); color: var(--text); }
.card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.card p { font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.card .go { margin-top: auto; font-weight: 600; color: var(--burgundy); font-size: .93rem; }
.badge { display: inline-block; font: 600 .72rem/1 var(--body); text-transform: uppercase; letter-spacing: .08em; padding: 6px 9px; border-radius: 6px; background: var(--gold-soft); color: #6b4f12; margin-bottom: 12px; align-self: flex-start; }
.badge.rose { background: var(--rose-50); color: var(--burgundy); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin: 0; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--burgundy); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; font-size: .95rem; color: var(--muted); }

/* Prose pages */
.page-hero { background: linear-gradient(160deg, var(--wine), var(--burgundy-700)); color: #f6e4ea; padding: 40px 0 44px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: #f0d6df; max-width: 680px; margin: 0; }
.prose { padding: 44px 0 56px; }
.prose h2:first-child { margin-top: 0; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-s); }

/* Footer */
.site-foot { background: var(--wine); color: #e9cfd8; padding: 48px 0 28px; margin-top: 40px; font-size: .93rem; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-foot h2 { color: #fff; font: 600 .82rem/1.2 var(--body); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0 0 8px; }
.site-foot a { color: #f3dfe6; text-decoration: none; }
.site-foot a:hover { color: var(--gold); text-decoration: underline; }
.foot-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; font-size: .82rem; color: #d7b7c2; line-height: 1.6; }

@media print {
  .site-head, .site-foot, .toc, .out-actions, .hero-stats, .mobile-nav { display: none !important; }
  .hero { padding: 0; background: none; color: #000; }
  .hero h1 { color: #000; }
  .calc-shell { margin: 0; }
  .calc-out { background: #fff; color: #000; }
  .total { color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Blog posts */
.post-hero { margin: 0 0 1.6em; }
.post-hero img, .fig img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--gold-soft); }
.fig { margin: 1.8em 0; }
.fig figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.split { margin: 1.2em 0 1.6em; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.split-bar { display: flex; height: 38px; border-radius: 8px; overflow: hidden; font-size: .85rem; font-weight: 600; }
.split-bar span { display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.split-bar .yes { background: var(--burgundy); color: #fff; }
.split-bar .no { background: var(--gold-soft); color: var(--wine); }
.split-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: .88rem; color: var(--muted); }
.split-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.split-key .k-yes { background: var(--burgundy); }
.split-key .k-no { background: var(--gold-soft); border: 1px solid var(--line-strong); }
.post-card img { display: block; width: 100%; height: auto; border-radius: 8px; margin: 0 0 22px; aspect-ratio: 16 / 9; object-fit: cover; flex-shrink: 0; }
.post-card h3 { margin-top: 0; line-height: 1.25; }
