/* emirateslaw.ai: "the decision memo". Public Sans, cool white, institutional navy.
   Palette and contrast ratios: design brief section 6.2. */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
}

:root {
  --paper: #f8f9fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #0f1a2a;
  --text: #283445;
  --muted: #556274;
  --accent: #123e7c;
  --accent-hover: #0c2e5e;
  --accent-tint: #e8eef8;
  --signal: #b4530a;
  --rule: #dde3ec;
  --ok: #1f6b45;
  --warn: #8a5300;
  --risk: #a1262b;
  --focus: #f2c200;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --container: 1200px;
  --measure: 720px;
  --rail: 220px;
  --gutter: 32px;

  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.5 var(--font-sans);
  color: var(--text);
  background: var(--paper);
  font-variant-numeric: lining-nums;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.25em; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:visited { color: var(--accent); }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
legend:focus, h2:focus { outline: none; }
legend:focus-visible, h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 10;
  background: var(--ink); color: #fff; padding: var(--s-3) var(--s-4); font-weight: 600; border-radius: 2px;
}
.skip-link:visited { color: #fff; }
.skip-link:focus { top: var(--s-3); color: #fff; }

.wrap { max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-top: 3px solid var(--accent); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; gap: var(--s-6); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:visited { color: var(--ink); }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-tld { color: var(--muted); font-weight: 400; }
.seal { width: 20px; height: 20px; background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 4px #fff; flex: none; }
.nav { margin-left: auto; }
.nav-list { list-style: none; padding: 0; display: flex; gap: var(--s-5); }
.nav-list a { display: inline-block; padding: 6px 0; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; }
.nav-list a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav-list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.menu { display: none; }
.menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--rule); border-radius: 2px;
  font-weight: 600; font-size: 15px; color: var(--ink);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 7px; height: 7px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.menu-list {
  list-style: none; padding: var(--s-2) 0; margin: 0;
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--rule); border-top: 1px solid var(--rule);
}
.menu-list a { display: flex; align-items: center; min-height: 48px; padding: 0 20px; color: var(--ink); font-weight: 500; text-decoration: none; }
.menu-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-tint); }
.menu-list a:hover { background: var(--surface-2); }

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font: 600 16px/1.25 var(--font-sans); padding: 12px 20px; min-height: 44px;
  background: var(--accent); color: #fff; border: 0; border-radius: 2px; cursor: pointer;
  box-shadow: 0 2px 0 var(--accent-hover); text-decoration: none;
}
.button:visited { color: #fff; }
.button:hover { background: var(--accent-hover); color: #fff; }
.button:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--accent-hover); }
.button-small { font-size: 14px; padding: 8px 14px; min-height: 36px; }
.button-secondary { background: transparent; color: var(--ink); box-shadow: none; border: 1px solid var(--ink); }
.button-secondary:hover { background: var(--surface-2); color: var(--ink); }
.text-link { font-weight: 600; text-decoration: none; }
.text-link::after, .card-more::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px;
  border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(-1px) rotate(45deg);
}
.text-link:hover { text-decoration: underline; }
.link-button {
  font: 600 16px/1.5 var(--font-sans); background: none; border: 0; padding: 0; color: var(--accent);
  cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; min-height: 44px;
}
.link-button:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

/* ---------- Shared type ---------- */
.tag { font-size: 14px; font-weight: 600; color: var(--accent); margin: 0 0 var(--s-3); display: flex; align-items: center; gap: var(--s-2); }
.tag::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.lede { font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem); line-height: 1.5; color: var(--muted); max-width: 680px; }
.notice { font-size: 14px; line-height: 1.5; color: var(--muted); padding: var(--s-3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.notice strong { color: var(--text); font-weight: 600; }

/* ---------- Page head (tools, 404) ---------- */
.page-head { padding-top: var(--s-6); padding-bottom: var(--s-6); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: 14px; margin-bottom: var(--s-5); }
.breadcrumb li + li::before { content: "/"; color: var(--muted); margin-right: var(--s-2); }
.breadcrumb a[aria-current="page"] { color: var(--muted); text-decoration: none; }
.page-head h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.875rem); line-height: 1.1; letter-spacing: -0.015em;
  font-weight: 500; max-width: 820px; margin-bottom: var(--s-4);
}
.meta {
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); margin: var(--s-6) 0 0; padding-top: var(--s-5);
  border-top: 1px solid var(--rule); font-size: 14px;
}
.meta dt { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.meta dd { margin: 0; color: var(--ink); font-weight: 500; }

.page-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) var(--rail); justify-content: start; column-gap: var(--s-9); padding-bottom: var(--s-8); }
.page-main { min-width: 0; display: grid; gap: var(--s-6); align-content: start; }
.rail { position: sticky; top: var(--s-5); align-self: start; font-size: 14px; border-left: 1px solid var(--rule); padding-left: var(--s-5); }
.rail-title { color: var(--muted); font-size: 13px; margin-bottom: var(--s-3); }
.rail ol { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.rail a { color: var(--text); text-decoration: none; }
.rail a:hover { color: var(--accent); text-decoration: underline; }

.prose { font-size: 17px; line-height: 1.65; }
.prose h2, .sources h2, .faq h2 { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); line-height: 1.2; margin-bottom: var(--s-4); }
.prose ul { display: grid; gap: var(--s-3); }

/* Scope ("Not covered here"), collapsed */
.scope { background: var(--surface-2); border-radius: 4px; }
.scope > summary { cursor: pointer; padding: var(--s-4) var(--s-5); font-weight: 600; color: var(--ink); min-height: 44px; }
.scope > ul { padding: 0 var(--s-5) var(--s-5) calc(var(--s-5) + 1.25em); display: grid; gap: var(--s-2); }

/* ---------- Tool panel ---------- */
.tool form, .result-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 4px;
}
.stepper { padding: 40px; display: grid; gap: var(--s-5); }
.progress { display: grid; gap: var(--s-2); }
.back-link {
  justify-self: start; font: 600 15px/1.5 var(--font-sans); color: var(--accent); background: none; border: 0; padding: 0 0 var(--s-2);
  cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; text-decoration: underline; text-underline-offset: 0.18em;
}
.back-link::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg); }
.progress-label { font-size: 14px; font-weight: 600; color: var(--text); }
.progress-number { color: var(--signal); }
.progress-bar { list-style: none; padding: 0; display: flex; gap: 4px; }
.progress-bar li { flex: 1; height: 4px; background: var(--rule); }
.progress-bar li.done { background: var(--accent); }
.progress-bar li.current { background: color-mix(in srgb, var(--accent) 50%, var(--surface)); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--s-2); }
legend {
  padding: 0; margin-bottom: var(--s-4); font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  line-height: 1.25; font-weight: 600; color: var(--ink);
}
.hint { color: var(--muted); margin: calc(-1 * var(--s-2)) 0 var(--s-2); }
.option {
  display: flex; align-items: flex-start; gap: var(--s-3); min-height: 56px; padding: 14px 16px;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--surface); cursor: pointer; line-height: 1.45;
}
.option:hover { border-color: var(--muted); }
.option:has(input:checked) { border: 2px solid var(--accent); padding: 13px 15px; background: var(--accent-tint); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 1px 0 0; width: 20px; height: 20px;
  border: 2px solid var(--text); background: var(--surface); display: grid; place-content: center; cursor: pointer;
}
.option input:focus-visible { outline: none; }
.option input[type="radio"] { border-radius: 50%; }
.option input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); }
.option input[type="radio"]:checked { border-color: var(--accent); }
.option input[type="radio"]:checked::before { transform: scale(1); }
.option input[type="checkbox"] { border-radius: 2px; }
.option input[type="checkbox"]::before { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg) scale(0); }
.option input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.option input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(45deg) scale(1); }
.option-text { color: var(--ink); }
.step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-3); }
.error { color: var(--risk); font-weight: 600; border-left: 3px solid var(--risk); padding: var(--s-1) 0 var(--s-1) var(--s-3); }

/* Without the stepper (no JavaScript): every question, one button */
.stepper > .button { justify-self: start; }

/* Check your answers */
.review { display: grid; gap: var(--s-4); }
.review-title { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); line-height: 1.25; }
.summary { margin: 0; border-top: 1px solid var(--rule); }
.summary > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: var(--s-2) var(--s-5); padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); }
.summary dt { font-weight: 600; color: var(--ink); }
.summary dd { margin: 0; }
.summary dd ul { padding-left: 1.1em; display: grid; gap: var(--s-1); }
.summary-change { text-align: right; }
.summary-change .link-button { min-height: 0; }

/* ---------- Result card ---------- */
.result { scroll-margin-top: var(--s-5); display: grid; gap: var(--s-5); }
.result-head { background: var(--surface-2); padding: var(--s-5); border-bottom: 1px solid var(--rule); display: grid; gap: var(--s-2); justify-items: start; }
.result-head .tag { margin: 0; }
.result-head .amount { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); line-height: 1.2; font-weight: 600; color: var(--ink); }
/* The calculators print their amount straight in the result box, without a result head. */
.result > .amount { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); line-height: 1.2; font-weight: 600; color: var(--ink); margin: 0; }
.result-basis { font-size: 14px; color: var(--muted); }
.result-body { padding: var(--s-5); display: grid; gap: var(--s-6); }
.result-section { display: grid; gap: var(--s-3); }
.result-section h3 { font-size: 20px; line-height: 1.3; }
.result-section h4 { font-size: 16px; margin-top: var(--s-3); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.status-shape { width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.status-ok { color: var(--ok); }
.status-ok .status-shape { background: currentColor; }
.status-warn { color: var(--warn); }
.status-warn .status-shape { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status-risk { color: var(--risk); }

.law-list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.law-row { padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); display: grid; gap: var(--s-2); }
.law-name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4); color: var(--ink); }
.law-title { font-weight: 600; }
.ref { font-size: 13px; text-decoration: none; margin-left: 2px; }
.ref:hover { text-decoration: underline; }
.points, .checks { list-style: none; padding: 0; display: grid; gap: 0; }
.points li, .checks li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--rule); }
.points li .status, .checks li .status { padding-top: 2px; align-self: start; }
.cite { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reasons { display: grid; gap: var(--s-3); padding-left: 1.4em; }
.reasons li::marker { color: var(--muted); font-weight: 600; }
.note { font-size: 15px; }
.result-body > .note { background: var(--surface-2); padding: var(--s-3) var(--s-4); border-radius: 4px; }
.result-notice { font-size: 14px; color: var(--muted); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.result-notice strong { color: var(--text); font-weight: 600; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }
.result-actions .button { padding: 10px 16px; font-size: 15px; }
.copy-status { font-size: 14px; color: var(--ok); font-weight: 600; }
.cta-inline { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); padding: var(--s-4) var(--s-5); border-radius: 4px; }
.cta-inline a { font-weight: 600; }

/* ---------- Sources ---------- */
.sources h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin: var(--s-5) 0 var(--s-2); }
.method-note { color: var(--muted); font-size: 15px; }
.source-list { list-style: none; padding: 0; counter-reset: none; border-top: 1px solid var(--rule); }
.source-list li { padding: var(--s-3) 0 var(--s-3) 40px; border-bottom: 1px solid var(--rule); position: relative; line-height: 1.45; }
.source-list li[value]::before { content: "[" attr(value) "]"; position: absolute; left: 0; top: var(--s-3); color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.guides .source-list li { padding-left: 0; }
.source-meta { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.source-list li:target { background: var(--accent-tint); }

/* ---------- Questions ---------- */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-4) var(--s-6) var(--s-4) 0; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 24px; width: 8px; height: 8px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq summary h3 { display: inline; font-size: 17px; line-height: 1.4; font-weight: 600; }
.faq details p { padding: 0 0 var(--s-5); font-size: 17px; line-height: 1.65; max-width: 680px; }

/* ---------- CTA block ---------- */
.cta { background: var(--surface-2); border-top: 1px solid var(--rule); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-7); padding-top: var(--s-7); padding-bottom: var(--s-7); align-items: start; }
.cta-title { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); line-height: 1.2; margin-bottom: var(--s-3); }
.cta-text p { max-width: 680px; font-size: 17px; line-height: 1.6; }
.cta-actions { display: grid; gap: var(--s-3); justify-items: start; }
.cta-actions .button { margin-bottom: var(--s-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--rule); padding: var(--s-8) 0 var(--s-6); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-6) var(--s-7); }
.footer-col h2, .footer-legal h2 { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.footer-col a { color: var(--text); }
.footer-publisher p { color: var(--muted); margin-top: var(--s-3); max-width: 300px; }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: var(--s-5); display: grid; gap: var(--s-3); max-width: 900px; }
.footer-legal p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.footer-legal strong { color: var(--text); }
.footer-bar { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }

/* ---------- Home ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); padding-top: var(--s-9); padding-bottom: var(--s-8); align-items: start; }
.hero h1 { font-size: clamp(2.375rem, 1.6rem + 3.2vw, 3.75rem); line-height: 1.06; letter-spacing: -0.02em; font-weight: 300; margin-bottom: var(--s-5); max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); margin-top: var(--s-6); }
.fact-panel { border-top: 3px solid var(--accent); background: var(--paper); padding: var(--s-2) var(--s-5) var(--s-4); }
.fact-panel dl { margin: 0; }
.fact-panel dl > div { padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); }
.fact-panel dl > div:last-child { border-bottom: 0; }
.fact-panel dt { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.fact-panel dd { margin: 0; color: var(--ink); font-size: 16px; }
.jurisdictions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding-bottom: var(--s-6); }
.jurisdictions-label { font-size: 13px; color: var(--muted); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { font-size: 13px; border: 1px solid var(--rule); border-radius: 2px; padding: 4px 10px; color: var(--ink); background: var(--paper); }

.section { padding: var(--s-9) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 680px; margin-bottom: var(--s-6); display: grid; gap: var(--s-3); }
.section-head h2 { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); line-height: 1.2; }
.section-head p { font-size: 17px; color: var(--muted); }
.section > .wrap > .notice { margin-top: var(--s-6); }

.tool-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.card { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.card:hover { border-color: var(--accent); }
.card:hover .card-link { text-decoration: underline; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-title { font-size: 22px; line-height: 1.25; font-weight: 600; }
.card-link { color: var(--ink); text-decoration: none; }
.card-link:visited { color: var(--ink); }
.card-link:focus-visible { outline: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-summary { font-size: 17px; color: var(--text); }
.card-details { margin: var(--s-2) 0 0; border-top: 1px solid var(--rule); }
.card-details > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.card-details dt { color: var(--muted); }
.card-details dd { margin: 0; color: var(--ink); }
.card-details dd ul { padding-left: 1.1em; display: grid; gap: 2px; }
.card-meta { font-size: 13px; color: var(--muted); }
.card-more { margin-top: auto; padding-top: var(--s-2); color: var(--accent); font-weight: 600; }

.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.method-grid > div { border-top: 2px solid var(--accent); padding-top: var(--s-4); display: grid; gap: var(--s-2); align-content: start; }
.method-grid h3, .guides h3 { font-size: 19px; line-height: 1.3; }
.guides { margin-top: var(--s-8); max-width: 820px; display: grid; gap: var(--s-3); }
.guides > p { color: var(--muted); }

.publisher-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.publisher-grid .section-head { margin: 0; }
.author-box { background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: var(--s-5); display: grid; gap: var(--s-2); }
.author-name { font-size: 18px; font-weight: 600; color: var(--ink); }
.author-role { font-size: 14px; color: var(--muted); margin-bottom: var(--s-2); }

/* ---------- Calculators (not published; WITH_CALCULATORS=1) ---------- */
.page-main form:not(.stepper) { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: var(--s-5); display: grid; gap: var(--s-4); }
.page-main form:not(.stepper) label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink); }
.page-main form:not(.stepper) label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.page-main form:not(.stepper) button { justify-self: start; font: 600 16px/1.25 var(--font-sans); padding: 12px 20px; border: 0; border-radius: 2px; background: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-hover); cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
input[type="date"], input[type="number"] { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 2px; background: var(--surface); color: var(--ink); }
small { font-weight: 400; color: var(--muted); font-size: 14px; }
.page-main > .result:not(:has(.result-card)) { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: var(--s-5); display: block; }
.result table { width: 100%; border-collapse: collapse; font-size: 15px; }
.result th, .result td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--rule); vertical-align: top; }
td.art { color: var(--muted); font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .page-main { max-width: var(--measure); }
  .rail { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding-top: var(--s-8); }
  .hero h1 { max-width: 16ch; }
  .fact-panel { max-width: 680px; }
  .tool-cards { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
}
@media (max-width: 899px) {
  .nav-list, .header-cta { display: none; }
  .menu { display: block; }
  .site-header { position: relative; }
  .header-inner { min-height: 60px; }
  .cta-inner { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .method-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .publisher-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-publisher { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  :root { --gutter: 20px; }
  .brand-name { font-size: 18px; }
  .section { padding: var(--s-8) 0; }
  .hero-grid { padding-top: var(--s-7); padding-bottom: var(--s-6); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .text-link { align-self: flex-start; }
  .page-head { padding-top: var(--s-5); padding-bottom: var(--s-5); }
  .meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
  .stepper { padding: 20px; }
  .step-actions .button, .review .step-actions .button { width: 100%; }
  .summary > div { grid-template-columns: minmax(0, 1fr) auto; }
  .summary dd:not(.summary-change) { grid-column: 1 / -1; grid-row: 2; }
  .summary-change { grid-column: 2; grid-row: 1; }
  .tool { margin: 0 calc(-1 * var(--gutter)); }
  .tool form { border-left: 0; border-right: 0; border-radius: 0; }
  .result { margin: 0 calc(-1 * var(--gutter)); }
  .result-card { border-left: 0; border-right: 0; border-radius: 0; }
  .result-head, .result-body { padding: 20px; }
  .cta-inline { margin: 0 20px; }
  .points li, .checks li { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .cite { white-space: normal; }
  .card { padding: 20px; }
  .card-details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 1fr; }
}

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

/* ---------- Print: the result card only ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .cta, .skip-link, .rail, .page-head .meta, .tool, .scope, #how, #sources, .faq, .result-actions, .cta-inline, .page-main > .notice { display: none !important; }
  .page-head { padding: 0 0 12pt; }
  .page-grid { display: block; padding: 0; }
  .result { margin: 0; }
  .result-card { border: 1px solid #999; }
  .result-head { background: #fff; }
  .result-card .source-list a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-break: break-all; }
  a { color: #000; }
}
