:root {
  --blue: #163a7a;
  --blue-bright: #1f55c4;
  --blue-wash: #eef3fb;
  --red: #c21f32;
  --red-wash: #fdf1f2;
  --ink: #15213a;
  --muted: #586379;
  --rule: #d6dde9;
  --paper: #ffffff;
  --wash: #f4f6fa;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1160px;
  --radius-s: 4px;
  --radius-m: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-bright); text-underline-offset: 2px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--paper); padding: 8px 14px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Header: white background */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--rule); }
.site-header::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--blue) 0 72%, var(--red) 72% 100%); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: var(--radius-s); }
.nav a:hover { background: var(--blue-wash); color: var(--blue); }
.nav a.nav-cta { background: var(--blue); color: #fff; margin-left: 8px; }
.nav a.nav-cta:hover { background: var(--blue-bright); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 8px 12px; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }

/* Buttons and form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--sans); padding: 11px 18px; border-radius: var(--radius-s); border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-bright); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--blue); }
label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
input[type="date"], input[type="search"], input[type="text"] {
  width: 100%; font: 500 1rem var(--sans); color: var(--ink); background: #fff;
  border: 1px solid #b9c3d4; border-radius: var(--radius-s); padding: 11px 12px; min-height: 46px;
}
input:focus { border-color: var(--blue-bright); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); }

/* Hero */
.hero { background: var(--wash); border-bottom: 1px solid var(--rule); padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.hero h1 { max-width: 19ch; }
.search { display: flex; gap: 8px; margin-top: 28px; max-width: 520px; }
.search input { flex: 1; }
.quick-links { margin-top: 18px; font-size: .92rem; color: var(--muted); }
.quick-links a { margin-right: 14px; white-space: nowrap; }

/* Calculator panel */
.calc { background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--blue); border-radius: var(--radius-m); padding: 26px; box-shadow: 0 10px 30px -18px rgba(22, 58, 122, .35); }
.calc-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin: 0 0 4px; }
.calc-sub { font-size: .9rem; color: var(--muted); margin: 0 0 18px; }
.calc .field { margin-bottom: 16px; }
.closure-row { display: flex; gap: 8px; }
.closure-row input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; gap: 8px; align-items: center; font: 500 .82rem var(--sans); background: var(--blue-wash); color: var(--blue); border: 1px solid #c9d6ef; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.calc details { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 4px; }
.calc summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--blue); }
.calc details[open] summary { margin-bottom: 12px; }
.calc-output { margin-top: 20px; }

/* The deadline stamp: the one bold element */
.stamp { border: 2px solid var(--red); outline: 1px solid var(--red); outline-offset: 3px; border-radius: 3px; padding: 14px 18px; color: var(--red); background: var(--red-wash); margin: 4px 4px 20px; }
.stamp-label { font-weight: 700; font-size: .9rem; letter-spacing: .02em; margin: 0; }
.stamp-date { font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 1.85rem); font-weight: 700; line-height: 1.2; margin: 2px 0 0; }
.stamp-time { font-weight: 600; margin: 2px 0 0; }
.stamp.is-new { animation: stamp .35s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes stamp { from { transform: scale(1.06) rotate(-1.5deg); opacity: .4; } to { transform: none; opacity: 1; } }
.steps { list-style: none; counter-reset: s; margin: 0 0 18px; padding: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--rule); font-size: .92rem; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--blue-wash); color: var(--blue); font-weight: 700; font-size: .75rem; display: grid; place-items: center; margin-top: 1px; }
.steps li:last-child::before { background: var(--red); color: #fff; }
.step-date { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.result-error { color: var(--red); font-weight: 600; }
.calc-more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .92rem; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--wash); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

/* Directory of calculators */
.dir-tools { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.dir-tools .search { margin: 0; flex: 1; max-width: 460px; }
.dir-count { color: var(--muted); font-size: .92rem; }
.dir { columns: 2 440px; column-gap: 56px; }
.jur { break-inside: avoid; margin: 0 0 40px; }
.jur-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.jur-code { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 700; font-size: .85rem; border-radius: var(--radius-s); }
.jur-code.fed { background: var(--red); }
.jur-head h3 { margin: 0; }
.jur-head small { display: block; font: 400 .85rem var(--sans); color: var(--muted); }
.jur ul { list-style: none; margin: 0; padding: 0; }
.jur li { border-bottom: 1px solid var(--rule); }
.jur li a { display: block; padding: 11px 0; text-decoration: none; color: var(--ink); }
.jur li a:hover .calc-name { color: var(--blue-bright); text-decoration: underline; }
.calc-name { display: block; font-weight: 600; line-height: 1.35; }
.calc-cat { display: block; font-size: .84rem; color: var(--muted); margin-top: 2px; }
.dir-empty { padding: 24px; background: var(--wash); border-radius: var(--radius-m); }

/* How counting works */
.count-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: c; border-top: 1px solid var(--rule); }
.count-steps li { list-style: none; counter-increment: c; padding: 28px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--rule); }
.count-steps li:last-child { border-right: 0; margin-right: 0; }
.count-steps li::before { content: counter(c); display: block; font: 700 2.4rem/1 var(--serif); color: var(--red); margin-bottom: 14px; }
.count-steps h3 { font-size: 1.15rem; }
.count-steps p { color: var(--muted); font-size: .97rem; }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq summary { cursor: pointer; font-family: var(--serif); font-weight: 600; font-size: 1.12rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font: 400 1.5rem/1 var(--sans); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* Calculator page */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }
.page-hero { background: #fff; padding: 36px 0 64px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: start; }
.page-grid .calc { position: sticky; top: 100px; }
.cite-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.cite-line li { font-size: .85rem; font-weight: 600; color: var(--blue); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 4px 10px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.rule-quote { border-left: 4px solid var(--blue); background: var(--blue-wash); padding: 16px 20px; margin: 0 0 1.2em; font-family: var(--serif); font-size: 1.08rem; line-height: 1.65; }
.rule-quote cite { display: block; margin-top: 8px; font: 600 .85rem var(--sans); font-style: normal; color: var(--blue); }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: var(--wash); font-weight: 700; }
td strong { color: var(--red); }
.note { border: 1px solid #f0c7cc; background: var(--red-wash); border-radius: var(--radius-m); padding: 16px 20px; margin: 0 0 1.2em; }
.note p:last-child { margin: 0; }
.related { list-style: none; padding: 0; margin: 0; }
.related li { border-bottom: 1px solid var(--rule); }
.related a { display: block; padding: 10px 0; font-weight: 600; text-decoration: none; }
.related a:hover { text-decoration: underline; }
.sources li { font-size: .93rem; }
.updated { font-size: .88rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--blue); color: #d9e2f3; padding: 56px 0 28px; margin-top: 0; font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-logo { display: inline-block; background: #fff; padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: 16px; }
.footer-logo img { height: 34px; width: auto; }
.site-footer h3 { font: 700 .95rem var(--sans); color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 40px; padding-top: 20px; font-size: .84rem; color: #b8c6e0; }
.disclaimer p { max-width: 90ch; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .page-grid { grid-template-columns: 1fr; gap: 36px; }
  .page-grid .calc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .nav a.nav-cta { margin: 8px 0 0; text-align: center; }
  .count-steps { grid-template-columns: 1fr; }
  .count-steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--rule); padding-right: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .brand img { height: 34px; }
  .hero { padding: 36px 0 44px; }
  .section { padding: 52px 0; }
  .calc { padding: 20px; }
  .search { flex-direction: column; }
  .steps li { grid-template-columns: 28px 1fr; }
  .step-date { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* Offshore list on homepage */
.off-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.off-list li { border-right: 1px solid var(--rule); }
.off-list li:last-child { border-right: 0; }
.off-list a { display: block; padding: 18px 20px 18px 0; margin-left: 20px; text-decoration: none; color: var(--ink); }
.off-list li:first-child a { margin-left: 0; }
.off-list a:hover .calc-name { color: var(--blue-bright); text-decoration: underline; }
.off-list .calc-name { font-family: var(--serif); font-size: 1.2rem; }

/* Simple content pages */
.simple-hero { background: var(--wash); border-bottom: 1px solid var(--rule); padding: 36px 0 44px; }
.simple-hero h1 { max-width: 24ch; }
.simple-body { padding: 48px 0 72px; }
.simple-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.side-box { position: sticky; top: 100px; border: 1px solid var(--rule); border-top: 4px solid var(--red); border-radius: var(--radius-m); padding: 20px; font-size: .93rem; background: #fff; }
.side-box h2 { font-size: 1.05rem; margin-bottom: 10px; }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.side-box li:last-child { border-bottom: 0; }
.legal-meta { color: var(--muted); font-size: .92rem; }
.prose h3 { margin-top: 1.4em; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 20px; align-items: stretch; margin-bottom: 40px; }
.plan { border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 26px; display: flex; flex-direction: column; background: #fff; }
.plan h2 { font-size: 1.3rem; margin-bottom: 4px; }
.plan-for { color: var(--muted); font-size: .93rem; min-height: 3em; }
.plan-price { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; color: var(--ink); line-height: 1; margin: 10px 0 4px; }
.plan-price small { font: 500 .95rem var(--sans); color: var(--muted); }
.plan-note { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 8px 0 8px 26px; border-bottom: 1px solid var(--rule); position: relative; font-size: .95rem; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 6px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.plan .btn { width: 100%; }
.plan-pro { border: 2px solid var(--blue); box-shadow: 0 14px 34px -22px rgba(22, 58, 122, .5); }
.plan-pro .plan-price { color: var(--blue); }
.plan-tag { align-self: flex-start; background: var(--red); color: #fff; font-weight: 700; font-size: .8rem; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #a3192a; color: #fff; }
.feature-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 48px; margin: 8px 0 40px; }
.feature-rows h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature-rows p { color: var(--muted); margin: 0; }
.contact-card { border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 24px; background: var(--wash); margin-bottom: 1.4em; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-email { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }

@media (max-width: 980px) {
  .simple-grid { grid-template-columns: 1fr; }
  .side-box { position: static; }
  .plans { grid-template-columns: 1fr; }
  .off-list { grid-template-columns: 1fr 1fr; }
  .off-list li:nth-child(2) { border-right: 0; }
  .off-list li:nth-child(3) a { margin-left: 0; }
}
@media (max-width: 560px) {
  .off-list { grid-template-columns: 1fr; }
  .off-list li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .off-list a { margin-left: 0; }
  .feature-rows { grid-template-columns: 1fr; }
}
.prose.wide { max-width: none; }
.prose.wide > p, .prose.wide > h2, .prose.wide > .faq { max-width: 70ch; }
.plan { position: relative; }
.plan-tag { position: absolute; top: -13px; left: 24px; margin: 0; }
.prose .plan h2, .prose .feature-rows h3 { margin-top: 0; }
.count-steps { padding: 0; margin: 0; }
.calc select { width: 100%; font: 500 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid #b9c3d4; border-radius: var(--radius-s); padding: 11px 12px; min-height: 46px; }
.also { background: var(--wash); border-radius: var(--radius-s); padding: 10px 14px; margin: 0 0 16px; font-size: .9rem; }
.also-title { font-weight: 700; margin: 0 0 4px; }
.also ul { list-style: none; margin: 0; padding: 0; }
.also li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--rule); }
.also li:last-child { border-bottom: 0; }
.field-optional { font-weight: 400; color: var(--muted); }
.page-grid { grid-template-areas: "intro calc" "body calc"; row-gap: 0; }
.page-intro { grid-area: intro; }
.page-body { grid-area: body; margin-top: 40px; }
.page-grid > .calc { grid-area: calc; align-self: start; }
@media (max-width: 980px) {
  .page-grid { grid-template-areas: "intro" "calc" "body"; row-gap: 28px; }
  .page-body { margin-top: 12px; }
}
