/* ==========================================================================
   OvertimeUS — "Payroll ledger" design system
   Paper, ink, and one poppy-red accent. No web fonts: system serif for
   headlines, system sans for reading, monospace tabular figures for money.
   ========================================================================== */

:root {
  --paper: #f4efe4;
  --surface: #fbf8f2;
  --ink: #1b1a17;
  --muted: #5b574d;
  --line: #d6cdb9;
  --accent: #b93a0e;
  --accent-soft: #f6e1d4;
  --ochre: #c9851a;

  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --rule: 1.5px solid var(--ink);
  --hair: 1px solid var(--line);
  --radius: 2px;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.25rem; margin-top: 1.8em; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

code, .mono { font-family: var(--font-mono); font-size: 0.92em; font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

@media (max-width: 599px) { .hide-sm { display: none; } }

/* ---------- Header / masthead ---------- */
.site-header { background: var(--paper); border-bottom: 4px double var(--ink); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.logo__mark {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 34px; padding: 0 0.4rem;
  background: var(--accent); color: var(--surface);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700; letter-spacing: -0.04em;
  transform: rotate(-6deg);
}
.logo__x { font-size: 0.8em; margin-left: 1px; }
.logo__word { display: inline-flex; align-items: baseline; }
.logo__us {
  margin-left: 0.2rem; padding: 0.05rem 0.3rem 0;
  border: 1.5px solid var(--ink);
  font-family: var(--font-mono); font-size: 0.62em; font-weight: 700; letter-spacing: 0.08em;
  color: var(--accent); align-self: center;
}
.logo:hover { color: var(--ink); }
.logo:hover .logo__mark { transform: rotate(0deg); }
@media (prefers-reduced-motion: no-preference) { .logo__mark { transition: transform 0.2s ease; } }

.not-found__code {
  font-family: var(--font-mono); font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 700;
  line-height: 1; color: var(--accent); margin: 0 0 1rem;
}

.site-header__brand { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.state-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding-left: 0.9rem; border-left: 1.5px solid var(--ink);
}
.state-badge__flag,
.state-card__flag {
  display: block; width: auto; height: 24px; flex-shrink: 0;
  outline: 1px solid rgba(26, 24, 20, 0.25);
}
.state-badge__name {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink);
}
@media (max-width: 560px) {
  .state-badge__name { display: none; }
  .site-header__brand { gap: 0.7rem; }
  .state-badge { padding-left: 0.7rem; }
  .site-header__brand ~ .site-nav li:first-child { display: none; }
}
.state-card__flag { margin-bottom: 0.35rem; align-self: flex-start; }

.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 0.4rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none; color: var(--ink); border: 1.5px solid transparent;
}
.site-nav a:hover { border-color: var(--ink); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ---------- Homepage hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; }
.hero__inner { display: flex; flex-direction: column; gap: 2.5rem; }
.hero__copy, .ratecard { min-width: 0; }
@media (min-width: 1000px) {
  .hero__inner { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 3rem; }
  .hero__copy { flex: 1 1 auto; max-width: 640px; }
  .ratecard { flex: 0 1 360px; }
}
@media (max-width: 999px) { .ratecard { max-width: 480px; } }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__copy > p:not(.eyebrow) { font-size: 1.15rem; color: var(--muted); max-width: 54ch; }
.ratecard__head span { white-space: nowrap; }

.hero__badges {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem;
  list-style: none; margin: 1.5rem 0 1.75rem; padding: 0;
  font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.hero__badges li { display: flex; align-items: center; gap: 0.5rem; }
.hero__badges li::before { content: ""; width: 8px; height: 8px; background: var(--accent); }

/* Rate card: a mini legal "schedule" */
.ratecard { background: var(--surface); border: var(--rule); }
.ratecard__head {
  display: flex; justify-content: space-between; gap: 1rem;
  margin: 0; padding: 0.6rem 1rem;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
}
.ratecard dl { margin: 0; padding: 0.25rem 1rem 0.5rem; }
.ratecard dl div {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.65rem 0; border-bottom: 1px dashed var(--line);
}
.ratecard dl div:last-child { border-bottom: 0; }
.ratecard dt { font-size: 0.95rem; }
.ratecard dt::after { content: ""; flex: 1; }
.ratecard dl div::after { content: none; }
.ratecard dd {
  margin: 0 0 0 auto;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums;
}
.ratecard dd.is-dt { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 40px; padding: 0.45rem 0.9rem;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; min-height: 48px; padding: 0.7rem 1.3rem; font-size: 0.85rem; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Ad slots (fixed heights prevent CLS) ---------- */
.ad-slot {
  position: relative; width: 100%;
  display: flex; align-items: center; justify-content: center;
  margin: 1.5rem auto;
  background:
    repeating-linear-gradient(-45deg, transparent 0 9px, rgba(27, 26, 23, 0.045) 9px 10px),
    var(--surface);
  border: 1px dashed var(--line);
  overflow: hidden;
  contain: layout size;
}
.ad-slot::before {
  content: "Advertisement";
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted);
}
.ad-slot--leaderboard { height: 116px; max-width: 728px; }
@media (min-width: 768px) { .ad-slot--leaderboard { height: 110px; } }
.ad-slot--incontent { height: 290px; max-width: 336px; margin: 2rem auto; }
.ad-slot--sidebar { height: 620px; max-width: 300px; margin-top: 0; }
@media (max-width: 1023px) { .ad-slot--sidebar { height: 290px; max-width: 336px; } }
.ad-slot--multiplex { height: 620px; max-width: none; margin: 2.5rem 0 0; }
@media (min-width: 768px) { .ad-slot--multiplex { height: 420px; } }

/* ---------- Page grid ---------- */
.page-grid { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 4rem; }
.page-grid > div { min-width: 0; }
@media (min-width: 1024px) {
  .page-grid { flex-direction: row; align-items: flex-start; gap: 3rem; }
  .page-grid > div { flex: 1 1 auto; }
  .sidebar { flex: 0 0 300px; }
  .sidebar__sticky { position: sticky; top: 1.5rem; }
}

/* ---------- Cards & section titles ---------- */
.card { background: var(--surface); border: var(--rule); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.card + .card { margin-top: 2rem; }

main { counter-reset: section; }
.section-title { display: flex; align-items: baseline; gap: 0.75rem; counter-increment: section; }
.section-title::before {
  content: "\00a7\00a0" counter(section, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--accent); letter-spacing: 0.05em;
}

/* ---------- State & tool index ---------- */
.state-grid, .tool-grid {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  border-top: var(--rule); border-left: var(--rule);
}
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.state-grid li, .tool-grid li { border-right: var(--rule); border-bottom: var(--rule); }

.state-card {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%;
  padding: 1.1rem 1.1rem 1.25rem;
  color: var(--ink); text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.state-card__name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.state-card__desc { font-size: 0.92rem; color: var(--muted); flex: 1; }
a.state-card:hover { background: var(--ink); color: var(--paper); }
a.state-card:hover .state-card__desc { color: #cfc8b8; }
.state-card--soon { color: var(--muted); }

.tag {
  align-self: flex-start; margin-top: 0.5rem; padding: 0.15rem 0.5rem;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.tag--live { background: var(--accent); color: #fff; }
.tag--soon { border: 1px dashed currentColor; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 1.25rem 0 1.5rem; padding: 0; }
.steps li { counter-increment: step; display: flex; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px dashed var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 700; color: var(--accent);
}

/* ---------- Breadcrumbs & page intro ---------- */
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 1.25rem 0 0; padding: 0;
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.page-intro { padding: 0.5rem 0 1.75rem; border-bottom: var(--rule); margin-bottom: 2rem; }
.page-intro p { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.updated {
  display: inline-block; margin: 0.25rem 0 0; padding: 0.3rem 0.6rem;
  border: 1.5px solid var(--accent); color: var(--accent) !important;
  font-family: var(--font-mono); font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.08em;
  transform: rotate(-1deg);
}

/* ---------- Calculator: the time card ---------- */
.calculator { padding: 0; overflow: hidden; }
.calculator__header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem clamp(1.25rem, 3vw, 2rem);
  background: var(--ink); color: var(--paper);
}
.calculator__header h2 { margin: 0; font-size: 1.25rem; }
.calculator__header::after {
  content: "Time card \00b7  " attr(data-law);
  font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: #bdb5a3;
  white-space: nowrap;
}
@media (max-width: 479px) { .calculator__header::after { display: none; } }

.calculator form { padding: clamp(1.25rem, 3vw, 2rem); }

.field { margin: 0 0 1.75rem; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend {
  display: block; padding: 0; margin-bottom: 0.4rem;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.field__hint { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
.field legend + .field__hint { margin: 0 0 0.9rem; }

.input-wrap { position: relative; max-width: 260px; }
.input-wrap__prefix {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 44px; text-align: center;
  font-family: var(--font-mono); font-size: 1.4rem; color: var(--muted);
}
input[type="number"] {
  width: 100%; min-height: 48px;
  padding: 0.5rem 0.75rem;
  background: #fff; color: var(--ink);
  border: var(--rule); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 1.15rem; font-variant-numeric: tabular-nums;
  appearance: textfield; -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input { padding-left: 44px; font-size: 1.5rem; min-height: 58px; }
input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* Punch-card day columns */
.day-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: var(--rule); border-left: var(--rule);
}
@media (min-width: 560px) { .day-grid { grid-template-columns: repeat(7, 1fr); } }
.day-grid label {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 0.6rem 0.5rem 0.7rem;
  border-right: var(--rule); border-bottom: var(--rule);
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  text-align: center; background: var(--surface);
}
.day-grid label:nth-child(7) { background: var(--accent-soft); }
.day-grid input {
  min-height: 46px; padding: 0.3rem; text-align: center;
  border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent;
  font-size: 1.3rem; font-weight: 700;
}
.day-grid input:focus { box-shadow: none; border-bottom-color: var(--accent); background: #fff; }

.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.notice {
  margin: 0; padding: 0.85rem 1rem;
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  font-size: 0.95rem;
}

/* ---------- Results: the pay stub ---------- */
.results {
  position: relative;
  padding: 2rem clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem);
  background: #fff;
  border-top: 2px dashed var(--ink);
}
/* Perforation notches */
.results::before, .results::after {
  content: ""; position: absolute; top: -11px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: var(--rule);
}
.results::before { left: -11px; }
.results::after { right: -11px; }

.results__stub-head {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 0 0 1rem; padding-bottom: 0.6rem; border-bottom: var(--hair);
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}

.results__total {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}
.results__total-label { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; }
.results__total-value {
  font-family: var(--font-mono); font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: var(--accent); line-height: 1;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
caption { text-align: left; caption-side: top; padding-bottom: 0.5rem; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
th, td { padding: 0.7rem 0.6rem; text-align: left; border-bottom: 1px dotted var(--line); }
thead th {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: var(--rule);
}

.breakdown td { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown thead th:not(:first-child) { text-align: right; }
.breakdown tbody th { font-weight: 600; white-space: nowrap; }
.breakdown tfoot td { border-top: 3px double var(--ink); border-bottom: 0; font-weight: 700; font-size: 1.05rem; }
.breakdown tfoot td:first-child { text-align: left; font-family: var(--font-serif); }

.dot { display: inline-block; width: 10px; height: 10px; margin-right: 0.6rem; vertical-align: 0.05em; }
.dot--reg { background: var(--ink); }
.dot--ot { background: var(--ochre); }
.dot--dt { background: var(--accent); }

.bar { display: flex; height: 14px; margin-bottom: 1.25rem; background: var(--paper); border: var(--rule); overflow: hidden; }
.bar span { display: block; height: 100%; transition: width 0.3s ease; }
.bar__reg { background: var(--ink); }
.bar__ot { background: var(--ochre); }
.bar__dt { background: var(--accent); }

.disclaimer { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ---------- Article ---------- */
.article { font-size: 1.0625rem; }
.article > h2 { padding-top: 0.25rem; }
.article > h2:not(:first-child) { margin-top: 2.25rem; padding-top: 1.5rem; border-top: var(--rule); }
.article p, .article li { max-width: 68ch; }

.rules-table { margin: 0.5rem 0; }
.rules-table td:last-child { font-family: var(--font-mono); font-weight: 700; text-align: right; white-space: nowrap; }
.rules-table thead th:last-child { text-align: right; }
.rules-table tr:has(td:last-child:is(:not(:empty))) td:last-child { color: var(--ink); }
.rules-table tbody tr:nth-child(n+4) td:last-child { color: var(--accent); }

.example {
  margin: 0.75rem 0 1.5rem; padding: 1.1rem 1.25rem;
  background: var(--paper); border-left: 4px solid var(--ink);
}
.example p:last-child { margin-bottom: 0; }
.example code { background: #fff; padding: 0.1rem 0.35rem; border: var(--hair); }

/* ---------- FAQ ---------- */
.faq { margin-top: 2.25rem; padding-top: 1.5rem; border-top: var(--rule); }
.faq details { border-bottom: 1px dashed var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-serif); font-size: 1.12rem; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 28px; height: 28px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 1.1rem; line-height: 1;
  transition: transform 0.2s;
}
.faq details[open] summary::after { content: "\2212"; background: var(--ink); color: var(--paper); }
.faq summary:hover { color: var(--accent); }
.faq details > div { padding: 0 0 1rem; color: var(--muted); }

/* ---------- Sources ---------- */
.sources { list-style: none; counter-reset: src; margin: 0; padding: 0; }
.sources li { counter-increment: src; display: flex; gap: 0.9rem; padding: 0.6rem 0; border-bottom: 1px dotted var(--line); }
.sources li::before { content: "[" counter(src) "]"; font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); padding-top: 0.15rem; }

/* ---------- Sidebar related ---------- */
.related { margin-top: 1.5rem; padding: 1.25rem; }
.related h2 { font-size: 1.1rem; padding-bottom: 0.6rem; border-bottom: var(--rule); }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 0.55rem 0; border-bottom: 1px dotted var(--line); font-size: 0.95rem; }
.related li:last-child { border-bottom: 0; }
.related a[aria-current="page"] { font-weight: 700; color: var(--accent); text-decoration: none; }
.related a[aria-current="page"]::before { content: "\2192\00a0"; }
.related .soon { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d7d0c0; padding: 3rem 0 2rem; font-size: 0.95rem; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--paper); margin-bottom: 0.9rem;
}
.site-footer__grid > div:first-child h2 { font-family: var(--font-serif); font-size: 1.5rem; text-transform: none; letter-spacing: -0.01em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #d7d0c0; text-decoration-color: rgba(215, 208, 192, 0.35); }
.site-footer a:hover { color: #fff; text-decoration-color: var(--accent); }
.site-footer__legal {
  margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid #3a3832;
  font-family: var(--font-mono); font-size: 0.75rem; color: #9d968a;
}

/* Legal & info pages */
.legal-page { max-width: 52rem; padding-block: 2.5rem 4rem; }
.legal-page h1 { margin-top: 0.25rem; }
.legal-page__meta { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.legal-page h2 { margin-top: 2rem; }
.contact-list { margin: 1.5rem 0; border-top: 1px solid var(--ink); }
.contact-list > div { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.2); }
@media (min-width: 700px) { .contact-list > div { flex-direction: row; justify-content: space-between; gap: 2rem; } }
.contact-list dt { font-weight: 700; }
.contact-list dd { margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
@media (min-width: 700px) { .contact-list dd { text-align: right; } }
.contact-list dd span { font-size: 0.88rem; opacity: 0.75; }

/* ---------- Header resilience ---------- */
.site-header__inner { flex-wrap: wrap; }
.site-nav ul { flex-wrap: wrap; }

/* ---------- Next steps (below the pay stub) ---------- */
.next-steps {
  padding: 1.5rem clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
  background: var(--surface); border-top: var(--rule);
}
.next-steps__title { margin: 0 0 1rem; font-size: 1.15rem; }
.projection { margin: 0 0 1.25rem; display: grid; grid-template-columns: 1fr; border-top: var(--rule); border-left: var(--rule); }
@media (min-width: 560px) { .projection { grid-template-columns: 1fr 1fr; } }
.projection div {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.85rem 1rem; border-right: var(--rule); border-bottom: var(--rule); background: #fff;
}
.projection dt { font-size: 0.85rem; color: var(--muted); }
.projection dd {
  margin: 0; font-family: var(--font-mono); font-size: 1.35rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.projection div:first-child dd { color: var(--accent); }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.share-row__status { font-size: 0.88rem; color: var(--accent); font-weight: 600; min-height: 1.4em; }
.share-row__hint { margin: 0.6rem 0 1.25rem; font-size: 0.88rem; color: var(--muted); }

.next-links { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); }
.next-links li { border-bottom: 1px dashed var(--line); }
.next-links a {
  display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0;
  font-weight: 600; text-decoration: none;
}
.next-links a::after { content: "\2192"; font-family: var(--font-mono); color: var(--accent); }
.next-links a:hover { color: var(--accent); }

/* ---------- Comparison table ---------- */
.compare-table { font-size: 0.92rem; min-width: 640px; }
.compare-table thead th { text-align: right; white-space: nowrap; vertical-align: bottom; }
.compare-table thead th:first-child { text-align: left; }
.compare-table thead th span { display: block; font-weight: 400; color: var(--muted); opacity: 0.85; }
.compare-table tbody th { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.compare-table td { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0; }
.compare-table td a { display: block; padding: 0.7rem 0.6rem; text-decoration: none; }
.compare-table td a:hover { background: var(--ink); color: var(--paper); }
.compare-table tbody tr:first-child th { color: var(--accent); }

/* ---------- Embed box ---------- */
.embed-box { margin-top: 2.25rem; padding: 1.5rem; background: var(--paper); border: 1.5px dashed var(--ink); }
.embed-box h2 { margin-top: 0; }
.embed-box__label {
  display: block; margin-bottom: 0.4rem;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.embed-box__code {
  display: block; width: 100%; margin-bottom: 0.9rem; padding: 0.75rem;
  background: #fff; color: var(--ink); border: var(--rule); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; resize: vertical;
}

/* ---------- Embed page ---------- */
.embed-page { background: var(--surface); }
.embed-page .calculator { border: var(--rule); }
.embed-page__credit {
  margin: 0; padding: 0.7rem 1rem; text-align: center;
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
}
