/* DeadlineCalculator.net — "Modern SaaS" design system (approved Superdesign direction C).
   White and slate surfaces, one brand blue, Inter only (self-hosted, variable weight).
   Themes: light by default; dark when the system prefers it, unless the visitor picked one
   (html[data-theme="light" | "dark"], applied by theme.js before first paint). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* A local font scaled to Inter's metrics, shown until Inter arrives, so the swap does not
   move the page (a long holiday table shifted by 0.13 on a cold load without it). */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

:root {
  --ink: #0F172A;
  --text: #475569;
  --muted: #64748B;
  --faint: #94A3B8;
  --brand: #2563EB;
  --brand-hover: #1D4ED8;
  --brand-text: #1D4ED8;
  --brand-tint: #EFF6FF;
  --brand-line: #DBEAFE;
  --on-brand: #FFFFFF;
  --page: #F8FAFC;
  --surface: #FFFFFF;
  --subtle: #F8FAFC;
  --field: #F8FAFC;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --ok: #047857;
  --skip: #B45309;
  --skip-bg: #FEF3C7;
  --warn-bg: #FFFBEB;
  --warn-line: #FDE68A;
  --error: #B91C1C;
  --error-bg: #FEF2F2;
  --focus: #2563EB;
  --dot: #E2E8F0;
  --glow: #DBEAFE;
  --footer: #0F172A;
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-xl: 0 1px 2px rgb(15 23 42 / .04), 0 20px 40px -12px rgb(15 23 42 / .14);
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --sans: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F1F5F9; --text: #CBD5E1; --muted: #94A3B8; --faint: #64748B;
    --brand: #60A5FA; --brand-hover: #93C5FD; --brand-text: #93C5FD; --brand-tint: #0F1E3D; --brand-line: #1E3A8A; --on-brand: #0B1120;
    --page: #020617; --surface: #0F172A; --subtle: #0B1222; --field: #0B1222;
    --border: #1E293B; --border-strong: #334155;
    --ok: #34D399; --skip: #FBBF24; --skip-bg: #2A1E05; --warn-bg: #1C1708; --warn-line: #713F12;
    --error: #F87171; --error-bg: #2A1215; --focus: #93C5FD;
    --dot: #1E293B; --glow: #1E3A8A; --footer: #020617;
    --shadow-xl: 0 0 0 1px #1E293B, 0 20px 40px -12px rgb(0 0 0 / .6); --shadow-sm: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F1F5F9; --text: #CBD5E1; --muted: #94A3B8; --faint: #64748B;
  --brand: #60A5FA; --brand-hover: #93C5FD; --brand-text: #93C5FD; --brand-tint: #0F1E3D; --brand-line: #1E3A8A; --on-brand: #0B1120;
  --page: #020617; --surface: #0F172A; --subtle: #0B1222; --field: #0B1222;
  --border: #1E293B; --border-strong: #334155;
  --ok: #34D399; --skip: #FBBF24; --skip-bg: #2A1E05; --warn-bg: #1C1708; --warn-line: #713F12;
  --error: #F87171; --error-bg: #2A1215; --focus: #93C5FD;
  --dot: #1E293B; --glow: #1E3A8A; --footer: #020617;
  --shadow-xl: 0 0 0 1px #1E293B, 0 20px 40px -12px rgb(0 0 0 / .6); --shadow-sm: none;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body { margin: 0; font: 400 1rem/1.7 var(--sans); color: var(--text); background: var(--page); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss03"; }
::selection { background: var(--brand-tint); color: var(--brand-text); }
img, svg { max-width: 100%; }
a { color: var(--brand-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); line-height: 1.2; letter-spacing: -.022em; }
.wrap { width: min(1240px, 100% - 3rem); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 2rem); } }
.skip-link { position: absolute; left: -9999px; top: .75rem; z-index: 100; background: var(--surface); color: var(--ink); padding: .75rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-xl); font-weight: 600; }
.skip-link:focus { left: .75rem; }
.ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; }
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px #334155; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { box-shadow: 0 0 0 1px #334155; } }
.brand-tld { color: var(--brand); }
.site-nav ul { display: flex; gap: .125rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 .8rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500; transition: background-color .15s, color .15s; }
.site-nav a:hover { background: var(--subtle); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--brand-text); background: var(--brand-tint); }
.nav-drop { position: relative; }
.nav-drop > summary { display: inline-flex; align-items: center; gap: .3rem; min-height: 38px; padding: 0 .7rem 0 .8rem; border-radius: var(--radius-sm); color: var(--text); font-size: .9rem; font-weight: 500; cursor: pointer; list-style: none; transition: background-color .15s, color .15s; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary svg { width: 16px; height: 16px; transition: transform .15s; }
.nav-drop[open] > summary svg { transform: rotate(180deg); }
.nav-drop > summary:hover, .nav-drop[open] > summary { background: var(--subtle); color: var(--ink); }
.nav-drop > summary.is-current { color: var(--brand-text); background: var(--brand-tint); }
.site-nav .nav-drop-panel { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 70; width: max-content; max-width: min(34rem, calc(100vw - 2rem)); padding: .75rem .75rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xl); }
.nav-drop-title { margin: 0 .35rem .5rem; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.site-nav .nav-drop-list { display: grid; gap: .125rem; margin: 0; padding: 0; list-style: none; }
.site-nav .states-grid { grid-template-columns: repeat(2, minmax(10rem, 1fr)); }
.site-nav .nav-drop-list a { display: flex; width: 100%; gap: .6rem; align-items: center; }
.nav-drop-foot { display: flex; flex-wrap: wrap; gap: .25rem .4rem; margin: .5rem .35rem 0; padding-top: .55rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.nav-drop-foot a { color: var(--brand-text); text-decoration: none; }
.nav-drop-foot a:hover { text-decoration: underline; }
.st-abbr { display: inline-grid; place-items: center; min-width: 2.1rem; height: 1.45rem; padding: 0 .3rem; border-radius: .35rem; background: var(--subtle); color: var(--muted); font-family: var(--mono, ui-monospace, monospace); font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
a[aria-current="page"] .st-abbr { background: var(--brand-text); color: #fff; }
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; flex: none; transition: background-color .15s, color .15s, border-color .15s; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--subtle); color: var(--ink); border-color: var(--border); }
.theme-toggle svg { width: 20px; height: 20px; display: none; }
.theme-toggle[data-mode="auto"] .i-auto, .theme-toggle[data-mode="light"] .i-light, .theme-toggle[data-mode="dark"] .i-dark { display: block; }
.theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Mobile menu (native disclosure: works without JavaScript) */
.nav-menu { position: relative; display: none; }
.nav-menu > summary { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; list-style: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary svg { width: 20px; height: 20px; }
.nav-menu .i-close, .nav-menu[open] .i-open { display: none; }
.nav-menu[open] .i-close { display: block; }
.nav-menu[open] > summary { background: var(--subtle); }
.nav-panel { position: fixed; left: 0; right: 0; top: 64px; z-index: 60; padding: .75rem 1rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xl); }
.nav-panel ul { display: grid; gap: .25rem; max-width: 40rem; margin: 0 auto; padding: 0; list-style: none; }
.nav-panel a { display: flex; align-items: center; min-height: 48px; padding: 0 1rem; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.nav-panel a:hover { background: var(--subtle); }
.nav-panel a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-text); }
.nav-panel-group { padding: .35rem 0 .25rem; }
.nav-panel-h { margin: .25rem 1rem .35rem; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-panel-states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; padding: 0; list-style: none; }
.nav-panel-states a { gap: .6rem; font-weight: 500; }
@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-menu { display: block; }
  .header-row { gap: .5rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; text-align: center; padding: 4rem 0 4.5rem; background-color: var(--page); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 24px 24px; border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; left: 50%; top: -30%; width: min(900px, 120%); height: 130%; transform: translateX(-50%); background: radial-gradient(closest-side, var(--glow), transparent); opacity: .75; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to bottom, transparent, var(--page)); pointer-events: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-tool { padding-bottom: 9rem; border-bottom: 0; }
.hero h1 { margin: 0 auto 1rem; max-width: 20ch; font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.hero .lede { margin: 0 auto; max-width: 44rem; font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); color: var(--text); line-height: 1.65; }
.crumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .85rem; font-weight: 500; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-text); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); font-size: .87rem; font-weight: 500; }
.chips li::before { content: ""; width: 1rem; height: 1rem; flex: none; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12 2.5 2.5 5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12 2.5 2.5 5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 640px) { .hero { padding: 2.5rem 0 3rem; } .hero-tool { padding-bottom: 7rem; } .chips { display: none; } }

/* ---------- Calculator ---------- */
main.has-tool .tool { margin-top: -6rem; position: relative; z-index: 2; }
.tool { display: grid; gap: 1.5rem; margin-bottom: 4rem; align-items: start; }
@media (min-width: 640px) and (max-width: 999px) { .tool { max-width: 44rem; margin-inline: auto; } }
@media (max-width: 520px) { .actions .btn { flex: 1 1 calc(50% - .3rem); } .calc, .result { border-radius: var(--radius-md); } }
@media (min-width: 1000px) { .tool { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; } .result { position: sticky; top: 5.5rem; } }
.calc, .result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xl); padding: 1.5rem; }
@media (min-width: 640px) { .calc, .result { padding: 2rem; } }
.calc-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.field { margin: 0 0 1.25rem; min-width: 0; }
.field label, .adv summary { display: block; margin-bottom: .4rem; color: var(--ink); font-size: .9rem; font-weight: 600; }
.for-rule { font-weight: 400; color: var(--muted); }
.hint { margin: .45rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.field-row { display: grid; gap: 0 1rem; }
.calc { container-type: inline-size; }
@container (min-width: 400px) { .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* 16px text: iPhone Safari zooms the page into any field with smaller text. */
input[type="text"], input[type="number"], input[type="time"], input[type="email"], textarea, select {
  width: 100%; min-height: 46px; padding: .6rem .9rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--field); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input::placeholder { color: var(--faint); }
input[type="time"] { -webkit-appearance: none; appearance: none; display: block; }
input[type="time"]::-webkit-date-and-time-value { text-align: left; }
select { appearance: none; padding-right: 2.5rem; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem; }
input:hover, textarea:hover, select:hover { border-color: var(--faint); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; background-color: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
/* Date field with calendar picker */
.date-wrap { position: relative; }
.date-wrap input { padding-right: 3.1rem; }
.dp-btn { position: absolute; top: 50%; right: .35rem; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; transform: translateY(-50%); border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.dp-btn[hidden] { display: none; }
.dp-btn svg { width: 20px; height: 20px; }
.dp-btn:hover, .dp-btn[aria-expanded="true"] { background: var(--brand-tint); color: var(--brand-text); }
.dp { position: absolute; top: calc(100% + .5rem); left: 0; z-index: 40; width: max(100%, 19rem); max-width: calc(100vw - 2rem); padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xl); }
.dp[hidden] { display: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.dp-title { margin: 0; color: var(--ink); font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.dp-nav { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--ink); cursor: pointer; }
.dp-nav:hover { background: var(--subtle); }
.dp-nav svg { width: 18px; height: 18px; }
.dp-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.dp-grid th { height: 1.75rem; color: var(--muted); font-size: .72rem; font-weight: 600; }
.dp-grid td { padding: 0; text-align: center; }
.dp-day { width: 100%; aspect-ratio: 1; min-height: 34px; padding: 0; border: 0; border-radius: 8px; background: var(--subtle); box-shadow: inset 0 0 0 1px var(--border); color: var(--ink); font: 600 .85rem/1 var(--sans); cursor: pointer; transition: background-color .12s, box-shadow .12s; }
.dp-day:hover { background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--brand-text); }
.dp-day.is-weekend { background: transparent; color: var(--muted); font-weight: 500; }
.dp-day.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.dp-day.is-selected { background: var(--brand); box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--brand) 70%, transparent); color: var(--on-brand); font-weight: 800; }
.dp-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dp-foot { display: flex; justify-content: space-between; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.dp-link { min-height: 32px; padding: 0 .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--brand-text); font: 600 .85rem/1 var(--sans); cursor: pointer; }
.dp-link:hover { background: var(--brand-tint); }

.echo { margin: .45rem 0 0; color: var(--ok); font-size: .82rem; font-weight: 600; }
.echo:empty { display: none; }
.echo.bad { color: var(--error); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--error); }
.field-error { margin: 0 0 .4rem; color: var(--error); font-size: .85rem; font-weight: 600; }
.error-summary { margin-bottom: 1.5rem; padding: 1rem 1.15rem; border: 1px solid color-mix(in srgb, var(--error) 40%, transparent); border-left: 4px solid var(--error); border-radius: var(--radius-md); background: var(--error-bg); }
.error-summary p { margin: 0 0 .35rem; color: var(--ink); }
.error-summary ul { margin: 0; padding-left: 1.1rem; }
.error-summary a { color: var(--error); font-weight: 600; }
.adv { margin-top: .25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.adv summary { display: flex; align-items: center; gap: .5rem; min-height: 28px; margin: 0; color: var(--brand-text); cursor: pointer; list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; flex: none; border-radius: 6px; background: var(--brand-tint); font-size: 1rem; line-height: 1; }
.adv[open] summary::before { content: "−"; }
.adv[open] summary { margin-bottom: .75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .5rem .95rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); font: 600 .88rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--subtle); border-color: var(--border-strong); color: var(--ink); }
.btn-primary { width: 100%; min-height: 50px; margin-top: 1.5rem; border: 0; background: var(--brand); color: var(--on-brand); font-size: 1rem; box-shadow: 0 1px 2px rgb(37 99 235 / .25), 0 8px 20px -8px rgb(37 99 235 / .55); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-primary::after { content: "→"; font-weight: 600; transition: transform .15s; }
.btn-primary:hover::after { transform: translateX(3px); }
.btn-quiet { color: var(--text); }

/* ---------- Result ---------- */
.result { min-height: 18rem; }
.result-empty { display: flex; flex-direction: column; }
.result-empty .eyebrow { margin-bottom: .25rem; color: var(--ink); font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
/* Rule diagram (page-specific timeline illustration) */
.guide-title { margin: .1rem 0 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -.025em; }
.rule-diagram { container-type: inline-size; margin: 1.25rem 0 0; padding: 1.1rem 1.1rem .9rem; border: 1px solid var(--brand-line); border-radius: var(--radius-md); background: linear-gradient(180deg, var(--brand-tint), var(--surface)); }
.prose .rule-diagram { margin: 1.75rem 0; }
.rd-track { position: relative; display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.rd-node { position: relative; display: grid; grid-template-columns: 2.4rem 1fr; gap: .75rem; align-items: start; max-width: none; margin: 0; }
.rd-node::after { content: ""; position: absolute; left: calc(1.2rem - 1px); top: 2.6rem; bottom: -.9rem; width: 2px; background: var(--brand-line); }
.rd-node:last-child::after { display: none; }
.rd-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--brand-line); color: var(--brand-text); }
.rd-dot svg { width: 1.15rem; height: 1.15rem; }
.rd-text { display: grid; gap: .05rem; padding-top: .1rem; min-width: 0; }
.rd-day { color: var(--ink); font-size: .95rem; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rd-label { color: var(--text); font-size: .85rem; font-weight: 600; }
.rd-note { color: var(--muted); font-size: .78rem; }
.rd-start .rd-dot { box-shadow: inset 0 0 0 2px var(--brand); }
.rd-count .rd-dot { background: var(--brand-tint); }
.rd-skip .rd-dot { background: repeating-linear-gradient(135deg, var(--skip-bg) 0 4px, var(--surface) 4px 8px); box-shadow: inset 0 0 0 1.5px var(--warn-line); color: var(--skip); }
.rd-roll .rd-dot { background: var(--warn-bg); box-shadow: inset 0 0 0 1.5px var(--warn-line); color: var(--skip); }
.rd-add .rd-dot { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.rd-hearing .rd-dot { background: var(--ink); box-shadow: none; color: var(--surface); }
.rd-deadline .rd-dot { background: var(--brand); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand) 80%, transparent); color: var(--on-brand); }
.rd-deadline .rd-day { color: var(--brand-text); }
.rule-diagram figcaption { margin-top: .9rem; padding-top: .7rem; border-top: 1px dashed var(--brand-line); color: var(--muted); font-size: .8rem; font-weight: 500; }
@container (min-width: 520px) {
  .rd-track { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; }
  .rd-node { grid-template-columns: 1fr; justify-items: center; gap: .55rem; text-align: center; }
  .rd-node::after { left: calc(50% + 1.4rem); right: calc(-50% - .5rem + 1.4rem); top: calc(1.2rem - 1px); bottom: auto; width: auto; height: 2px; }
  .rd-text { justify-items: center; }
}

.how-steps { display: grid; gap: 1.1rem; margin: 1.25rem 0 1.5rem; padding: 0; list-style: none; counter-reset: how; }
.how-steps li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .9rem; align-items: start; counter-increment: how; }
.how-steps li::before { content: counter(how); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-sm); background: var(--brand-tint); color: var(--brand-text); font-weight: 700; }
.how-steps strong { display: block; color: var(--ink); }
.placeholder-note { margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.result-error { border-color: color-mix(in srgb, var(--error) 40%, transparent); background: var(--error-bg); }
.eyebrow { margin: 0 0 .75rem; color: var(--brand-text); font-size: .8rem; font-weight: 600; letter-spacing: .01em; line-height: 1.5; }
.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.eyebrow a:hover { border-bottom-style: solid; }
.hero-date { margin: 0; color: var(--ink); font-size: clamp(2.6rem, 1.7rem + 3.4vw, 3.9rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.hero-weekday { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .5em; font-weight: 700; letter-spacing: -.03em; }
.countdown { display: inline-flex; align-items: center; gap: .4rem; margin: 1rem .5rem 0 0; padding: .3rem .8rem; border-radius: 999px; background: var(--brand-tint); color: var(--brand-text); font-size: .85rem; font-weight: 600; }
.countdown::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.countdown[hidden] { display: none; }
.countdown.past { background: var(--error-bg); color: var(--error); }
.cutoff { margin: .9rem 0 0; color: var(--ink); font-weight: 600; }
.for { margin: .9rem 0 0; color: var(--muted); font-size: .88rem; font-weight: 500; }
.badge { display: inline-block; margin-top: .9rem; padding: .3rem .7rem; border-radius: 8px; font-size: .85rem; font-weight: 600; }
.badge-warn { background: var(--warn-bg); color: var(--ink); border: 1px solid var(--warn-line); }
.alt { margin: 1.25rem 0 0; padding: 1rem 1.15rem; border: 1px solid var(--warn-line); border-radius: var(--radius-md); background: var(--warn-bg); color: var(--ink); font-size: .9rem; }
.alt p, .alt ul { margin: 0; }
.alt ul { margin-top: .4rem; padding-left: 1.1rem; }
.warnings { margin: 1rem 0 0; padding: .85rem 1rem .85rem 2rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--subtle); color: var(--text); font-size: .87rem; }
.warnings li + li { margin-top: .3rem; }
.how { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--brand-line); border-radius: var(--radius-md); background: var(--brand-tint); }
.how > summary, .notes > summary { display: flex; align-items: center; gap: .5rem; min-height: 28px; color: var(--ink); font-size: .92rem; font-weight: 700; cursor: pointer; list-style: none; }
.how > summary::-webkit-details-marker, .notes > summary::-webkit-details-marker { display: none; }
.how > summary::before { content: ""; width: 1.05rem; height: 1.05rem; flex: none; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1'/%3E%3C/svg%3E") center / contain no-repeat; }
.how > summary::after, .notes > summary::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: .8rem; transition: transform .15s; }
.how:not([open]) > summary::after, .notes:not([open]) > summary::after { transform: rotate(-90deg); }
.trace { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: step; font-size: .9rem; }
.trace li { position: relative; padding: 0 0 1rem 2.4rem; counter-increment: step; color: var(--text); font-variant-numeric: tabular-nums; }
.trace li::before { content: counter(step); position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: .75rem; font-weight: 700; }
.trace li::after { content: ""; position: absolute; left: calc(.8rem - .5px); top: 1.8rem; bottom: .15rem; width: 1px; background: var(--brand-line); }
.trace li:last-child { padding-bottom: 0; }
.trace li:last-child::after { display: none; }
.step-k { color: var(--ink); font-weight: 700; }
.step-k::after { content: ":"; }
.cite { color: var(--muted); font-size: .82rem; }
.checklist { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--warn-line); border-radius: var(--radius-md); background: var(--warn-bg); }
.checklist-head { display: flex; gap: .85rem; align-items: flex-start; }
.checklist-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 10px; background: var(--skip-bg); color: var(--skip); }
.checklist-icon svg { width: 1.2rem; height: 1.2rem; }
.checklist h3 { margin: .1rem 0 .2rem; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.checklist-head p { margin: 0; color: var(--text); font-size: .85rem; line-height: 1.5; }
.checklist ul { display: grid; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--warn-line); border-radius: var(--radius-sm); background: var(--surface); }
.checklist input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-height: 0; margin: .15rem 0 0; flex: none; accent-color: var(--brand); cursor: pointer; box-shadow: none; }
.checklist label { color: var(--ink); font-size: .9rem; line-height: 1.5; cursor: pointer; }
.checklist input:checked + label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.notes { margin-top: 1rem; padding: .9rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
.notes ul { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.actions [hidden] { display: none; }
.provenance { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.disclaimer-inline { margin: .3rem 0 0; color: var(--muted); font-size: .8rem; }

/* Mini calendar */
.minical { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--brand-line); }
.month { border-collapse: separate; border-spacing: 3px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.month caption { padding: 0 0 .35rem 3px; color: var(--ink); font-weight: 700; text-align: left; }
.month th { width: 2.1rem; height: 1.5rem; color: var(--muted); font-size: .7rem; font-weight: 600; }
.month td { width: 2.1rem; height: 2.1rem; border-radius: 8px; color: var(--text); text-align: center; }
.month td.count { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand-line); }
.month td.skip { background: repeating-linear-gradient(135deg, var(--skip-bg) 0 4px, transparent 4px 8px); color: var(--skip); text-decoration: line-through; }
.month td.trigger { box-shadow: inset 0 0 0 2px var(--brand); color: var(--ink); font-weight: 700; }
.month td.deadline { background: var(--brand); color: var(--on-brand); font-weight: 800; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--brand) 70%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; width: 100%; margin: 0; color: var(--text); font-size: .76rem; }
.lg::before { content: ""; display: inline-block; width: .8rem; height: .8rem; margin-right: .35rem; border-radius: 3px; vertical-align: -1px; }
.lg.trigger::before { box-shadow: inset 0 0 0 2px var(--brand); }
.lg.count::before { background: var(--surface); box-shadow: inset 0 0 0 1px var(--brand-line); }
.lg.skip::before { background: repeating-linear-gradient(135deg, var(--skip) 0 2px, transparent 2px 5px); }
.lg.deadline::before { background: var(--brand); }

/* ---------- Content ---------- */
main:not(.has-tool) .content-grid { margin-top: 3rem; }
.content-grid { display: grid; gap: 2.5rem; margin-bottom: 5rem; }
@media (min-width: 1040px) { .content-grid { grid-template-columns: 16rem minmax(0, 46rem); justify-content: center; gap: 3.5rem; } .content-grid > .prose:only-child { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 46rem; } }
.toc { align-self: start; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); font-size: .88rem; }
@media (min-width: 1040px) { .toc { position: sticky; top: 5.5rem; } }
.toc-title { margin: 0 0 .75rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; min-height: 24px; padding: .3rem .6rem; margin: 0 -.6rem; border-radius: 8px; color: var(--text); font-weight: 500; line-height: 1.4; text-decoration: none; transition: background-color .15s, color .15s; }
.toc a:hover { background: var(--subtle); color: var(--ink); }
.toc a.active { background: var(--brand-tint); color: var(--brand-text); }
.prose { min-width: 0; color: var(--text); font-size: 1.02rem; }
.prose > :first-child { margin-top: 0; }
.prose > p:first-child { color: var(--ink); font-size: 1.15rem; line-height: 1.65; }
.prose h2 { margin: 3rem 0 1rem; font-size: clamp(1.45rem, 1.25rem + .6vw, 1.8rem); font-weight: 750; letter-spacing: -.028em; }
.prose h3 { margin: 2rem 0 .6rem; font-size: 1.2rem; font-weight: 700; }
.prose p, .prose li { max-width: 70ch; }
.prose li { margin: .4rem 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose blockquote { margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 3px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--brand-tint); color: var(--ink); }
.prose code { padding: .1em .35em; border: 1px solid var(--border); border-radius: 6px; background: var(--subtle); font-family: var(--mono); font-size: .86em; }
.prose table, .table-wrap table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.prose table { display: block; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.prose .table-wrap table { display: table; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0 .6rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.table-wrap table { display: table; margin: 0; border: 0; box-shadow: none; }
.prose th, .prose td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose thead th { background: var(--subtle); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.prose td:first-child { color: var(--ink); font-weight: 500; }
.nowrap { white-space: nowrap; }
/* Holiday tables share one column grid so dates and names line up from table to table. */
.prose table.holidays { table-layout: fixed; }
.prose table.holidays th:first-child { width: 9.5rem; }
.prose table.holidays th:nth-child(3) { width: 34%; }
@media (max-width: 480px) { .prose table.holidays th:first-child { width: 7.5rem; } }
tr.weekend td { color: var(--muted); }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border); color: var(--muted); font-size: .72rem; font-weight: 500; white-space: nowrap; }
.table-source { margin: .4rem 0 1.75rem; color: var(--muted); font-size: .82rem; }
.downloads { margin: 1.5rem 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); list-style: none; }
.downloads li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; max-width: none; margin: 0; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); }
.downloads li:last-child { border-bottom: 0; }
.downloads span { flex: 1 1 16rem; color: var(--ink); font-weight: 600; }
.downloads a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 .8rem; border: 1px solid var(--border); border-radius: 8px; color: var(--brand-text); font-size: .85rem; font-weight: 600; text-decoration: none; }
.downloads a:hover { background: var(--brand-tint); border-color: var(--brand-line); }

/* Worked examples */
.example { margin: 2rem 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.example figcaption { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--subtle); color: var(--ink); font-weight: 700; }
.ex-k { color: var(--brand-text); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ex-in { margin: 1rem 1.25rem .6rem; color: var(--muted); font-size: .88rem; font-weight: 500; }
.ex-steps { margin: 0 1.25rem; padding-left: 1.25rem; font-size: .9rem; }
.ex-steps li { margin: .35rem 0; }
.ex-out { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 1.25rem 0; padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--brand-tint); color: var(--ink); font-size: .98rem; }
.ex-out strong { color: var(--brand-text); }

/* Dates. The answer date is a highlighted chip; every other date gets a quiet dotted
   underline, so start dates and deadlines read differently at a glance. */
.d { text-decoration: underline dotted var(--muted); text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.d-key { padding: .05em .4em; border-radius: 6px; background: var(--brand-tint); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line); font-weight: 700; white-space: nowrap; }
.ex-out { flex-wrap: wrap; justify-content: flex-start; column-gap: .6rem; }
.ex-out .d-key { background: var(--surface); }
@media print { .d { text-decoration: none; } .d-key { box-shadow: none; padding: 0; } }
.ex-alt { margin: .6rem 1.25rem 0; color: var(--muted); font-size: .85rem; }
.ex-link { margin: .9rem 1.25rem 1.1rem; font-size: .87rem; font-weight: 600; }
.ex-link a { text-decoration: none; }
.ex-link a::after { content: " →"; }

/* Review box and page meta */
.page-meta { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.review { display: grid; gap: .35rem; padding: 1.15rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); font-size: .9rem; }
.review p { margin: 0; }
.review-k { color: var(--ink); font-weight: 700; }
.updated { margin-top: 1rem; color: var(--muted); font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 4rem 0 2rem; background: var(--footer); color: #94A3B8; font-size: .9rem; }
.site-footer a { color: #CBD5E1; text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.1fr 1fr 1.5fr 1fr .9fr; } }
.footer-brand { margin: 0 0 .75rem; color: #FFFFFF; font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.footer-note { max-width: 30ch; margin: 0; color: #94A3B8; }
.footer-h { margin: 0 0 1rem; color: #FFFFFF; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: .55rem 0; }
.footer-states { columns: 2; column-gap: 1.5rem; }
.footer-states li { margin-top: 0; margin-bottom: .55rem; }
.footer-states li { break-inside: avoid; }
.footer-sub { display: block; margin: .15rem 0 0 .9rem; font-size: .82rem; color: #94A3B8; white-space: nowrap; }
.footer-sub::before { content: "↳ "; }
.footer-disclaimer { max-width: 90ch; margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid #1E293B; color: #94A3B8; font-size: .82rem; }

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

/* ---------- No layout shift when the script arrives ---------- */
.js .opt-other, .js .for-rule, .js [data-n-field] .hint { display: none; }
.js .countdown[hidden] { display: inline-flex; visibility: hidden; }
.js .actions .btn[hidden] { display: inline-flex; visibility: hidden; }
.js .theme-toggle[hidden] { display: inline-grid; visibility: hidden; }

/* ---------- What usually comes next ---------- */
.next-steps { margin-top: 1.5rem; padding: 1.1rem 1.25rem; border: 1px solid var(--brand-line); border-radius: var(--radius-md); background: var(--brand-tint); }
.next-steps h3 { margin: 0 0 .6rem; font-size: .95rem; }
.next-steps ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.next-steps li { display: grid; gap: .1rem; }
.next-steps a { font-weight: 600; color: var(--brand-text); }
.next-steps span { color: var(--text); font-size: .85rem; }

/* ---------- Change notice, recent calculations ---------- */
.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; }
.notice { margin: 0 0 1.25rem; padding: .85rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--border); font-size: .92rem; line-height: 1.55; }
.notice p { margin: 0; }
.notice-changed { background: var(--warn-bg); border-color: var(--warn-line); color: var(--ink); }
.notice-same { background: var(--brand-tint); border-color: var(--brand-line); color: var(--ink); }
.history { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.history h3 { margin: 0 0 .5rem; font-size: .95rem; }
.history ul { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; gap: .1rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.history li a { font-weight: 600; color: var(--brand-text); text-decoration: none; }
.history li a:hover { text-decoration: underline; }
.history-meta { color: var(--muted); font-size: .85rem; }
.history-stale { justify-self: start; margin-top: .2rem; padding: .1rem .5rem; border: 1px solid var(--warn-line); border-radius: 999px; background: var(--warn-bg); color: var(--ink); font-size: .78rem; font-weight: 600; }
.history-note { margin: .6rem 0 0; color: var(--muted); font-size: .8rem; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Embeddable widget ---------- */
body.embed { background: var(--page); }
.embed-main { padding: 1rem; }
.embed .tool { margin: 0; }
.embed .result { position: static; }
.embed .calc, .embed .result { box-shadow: var(--shadow-sm); }
.embed-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .25rem 1rem 1rem; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.embed-foot p { margin: 0; }
.embed-brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.embed-brand:hover strong { color: var(--brand-text); }
.embed-brand .brand-mark { width: 1.5rem; height: 1.5rem; }

@media print {
  :root, :root[data-theme="dark"] { --page: #fff; --surface: #fff; --subtle: #fff; --ink: #000; --text: #000; --muted: #333; --brand-tint: #fff; --border: #ccc; }
  .site-header, .site-footer, .chips, .calc, .actions, .toc, .skip-link, .theme-toggle, .nav-menu, .dp-btn { display: none !important; }
  .hero { padding: 0 0 1rem; background: none; text-align: left; }
  .hero::before, .hero::after { display: none; }
  main.has-tool .tool { margin-top: 0; }
  .tool { display: block; }
  .result, .prose, .how { border: 0; box-shadow: none; padding: 0; position: static; }
  details > * { display: block; }
  .month td.deadline { outline: 2px solid #000; background: none; color: #000; }
}

/* ---------- Contact form ---------- */
.contact-box { margin: 1.75rem 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xl); }
.contact-box textarea { display: block; min-height: 10rem; line-height: 1.55; resize: vertical; }
.contact-privacy { margin-top: 1rem; }
.opt { color: var(--muted); font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice-ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ink); }
