/* ==========================================================================
   WorkTime Tools — design system
   One typeface (IBM Plex Sans, 400/600), one primary colour, one accent.
   Hierarchy comes from type, spacing and hairline dividers — not from boxes.

   1 Fonts & tokens  2 Base  3 Layout & header  4 Controls  5 Panels & results
   6 Tool-specific  7 Listings & home  8 Content  9 Footer & dialogs  10 Print
   ========================================================================== */

/* ---------- 1. Fonts & tokens ---------- */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand: one primary, one accent (accent is for graphics only, never text) */
  --brand: #0b6157;
  --brand-strong: #084a43;
  --brand-contrast: #ffffff;
  --brand-soft: #e7f1ef;
  --brand-ink: #0b6157;
  --accent: #2ec4a6;
  --logo-base: #0b6157;

  /* Neutrals */
  --bg: #f6f7f7;
  --surface: #ffffff;
  --surface-2: #f1f3f3;
  --surface-3: #e6e9ea;
  --border: #e0e4e5;
  --border-strong: #c8cfd1;
  --text: #13171a;
  --text-2: #394146;
  --muted: #5b646a;
  --focus: #0b6157;

  /* Semantic */
  --success: #137a4a;
  --success-soft: #eaf6ef;
  --warn: #8a5300;
  --warn-soft: #fdf6e8;
  --warn-border: #edd5a4;
  --danger: #b42318;
  --danger-soft: #fdf1f0;
  --danger-border: #f2c4bf;
  --star: #d98e04;

  /* Type */
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-15: 0.9375rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;

  /* Space (4px scale) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Layout */
  --container: 1160px;
  --gutter: 24px;
  --section: 64px;
  --measure: 68ch;
  --header-h: 64px;
  --control-h: 40px;
  --control-sm: 34px;

  /* Shape & depth: only floating layers (menus, dialogs) get shadows */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-float: 0 12px 32px -8px rgba(16, 24, 28, 0.22), 0 2px 6px rgba(16, 24, 28, 0.06);
  color-scheme: light;
}

[data-theme="dark"] {
  --brand: #4fd1b6;
  --brand-strong: #7ee2cc;
  --brand-contrast: #062b25;
  --brand-soft: rgba(79, 209, 182, 0.1);
  --brand-ink: #6fdcc4;
  --accent: #2ec4a6;
  --logo-base: #d9ebe7;

  --bg: #0f1213;
  --surface: #161a1c;
  --surface-2: #1b2023;
  --surface-3: #242a2e;
  --border: #283034;
  --border-strong: #3a4448;
  --text: #e8ecec;
  --text-2: #c4cbcd;
  --muted: #98a2a6;
  --focus: #6fdcc4;

  --success: #57d38c;
  --success-soft: rgba(87, 211, 140, 0.1);
  --warn: #f2bf5e;
  --warn-soft: rgba(242, 191, 94, 0.08);
  --warn-border: rgba(242, 191, 94, 0.3);
  --danger: #f48a80;
  --danger-soft: rgba(244, 138, 128, 0.08);
  --danger-border: rgba(244, 138, 128, 0.3);
  --star: #f2bf5e;
  --shadow-float: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

@media (max-width: 760px) { :root { --gutter: 20px; --section: 48px; } }
@media (max-width: 420px) { :root { --gutter: 16px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: var(--fs-16); line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.5rem + 1vw, 2rem); letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: var(--fs-22); }
h3 { font-size: var(--fs-18); }
h4 { font-size: var(--fs-16); }
p { margin: 0 0 1em; }
strong, b { font-weight: 600; }
a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 5px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: var(--fs-12); line-height: 1.6; text-align: center; }
hr { margin: var(--sp-8) 0; border: 0; border-top: 1px solid var(--border); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 20%, transparent); }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -48px; left: 12px; z-index: 100; padding: 8px 14px; border-radius: var(--radius); background: var(--brand); color: var(--brand-contrast); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.is-positive { color: var(--success); }
.is-negative { color: var(--danger); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- 3. Layout & header ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: calc(820px + var(--gutter) * 2); }
.narrow { max-width: 820px; }
main { display: block; min-height: 60vh; padding-bottom: var(--section); outline: none; }

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: var(--sp-6); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.logo { display: block; width: auto; height: 28px; }
.logo-footer { height: 26px; }
.logo-base { fill: var(--logo-base); }
.logo-accent { fill: var(--accent); }
.logo-word { fill: var(--text); }
.logo-word-2 { fill: var(--muted); }
.primary-nav { display: flex; align-items: center; align-self: stretch; gap: var(--sp-1); }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 10px; border: 0; background: none; color: var(--text-2) !important; font: inherit; font-size: var(--fs-15); text-decoration: none; cursor: pointer; }
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--text) !important; }
.nav-link[aria-current="page"], .nav-link.is-current { color: var(--text) !important; font-weight: 600; }
.nav-link[aria-current="page"]::after, .nav-link.is-current::after { content: ""; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--brand); }
.nav-trigger .icon { transition: transform 0.15s; }
.nav-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
.search-trigger { display: inline-flex; align-items: center; gap: var(--sp-2); width: 232px; height: var(--control-sm); padding: 0 6px 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font: inherit; font-size: var(--fs-14); cursor: pointer; }
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger kbd { margin-left: auto; }
.icon-btn { display: inline-grid; flex: none; place-items: center; width: var(--control-sm); height: var(--control-sm); border: 0; border-radius: var(--radius); background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.theme-toggle .icon-sun, [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.menu-btn { display: none; }
.menu-btn .icon-close, .menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mega { max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-float); }
.mega-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-8); padding-top: var(--sp-8); padding-bottom: var(--sp-8); }
.mega-mobile { display: none; }
.mega-title { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.mega ul { margin: 0; padding: 0; list-style: none; }
.mega li a { display: block; padding: 4px 0; color: var(--text-2); font-size: var(--fs-15); text-decoration: none; }
.mega li a:hover { color: var(--text); text-decoration: underline; }
.mega li a[aria-current="page"] { color: var(--text); font-weight: 600; }
.mega-all { margin-top: var(--sp-4); }
@media (max-width: 1040px) {
  .search-trigger { justify-content: center; width: var(--control-sm); padding: 0; border: 0; background: none; color: var(--text-2); }
  .search-trigger-text, .search-trigger kbd { display: none; }
  .mega-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .primary-nav { display: none; }
  .menu-btn { display: inline-grid; }
  .mega { max-height: calc(100dvh - var(--header-h)); }
  .mega-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-4); padding-top: var(--sp-5); }
  .mega-mobile { display: flex; grid-column: 1 / -1; gap: var(--sp-2); }
  .mega-mobile .btn { flex: 1; }
  .logo { height: 26px; }
}
@media (max-width: 480px) { .mega-inner { grid-template-columns: 1fr; } }

/* Page heads — the same structure on every page */
.breadcrumbs { padding-top: var(--sp-5); font-size: var(--fs-14); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; color: var(--muted); list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text-2); }
.page-head { max-width: 760px; padding: var(--sp-6) 0 var(--sp-8); }
.page-404 .page-head { padding-top: var(--sp-12); }
.page-head-text { max-width: 760px; }
.eyebrow { margin: 0 0 var(--sp-2); color: var(--brand-ink); font-size: var(--fs-13); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-head h1 { margin: 0; }
.lead { max-width: 62ch; margin: var(--sp-3) 0 0; color: var(--text-2); font-size: var(--fs-18); line-height: 1.55; }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: var(--sp-3) 0 0; color: var(--muted); font-size: var(--fs-14); }
.page-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-5); }
.assurances { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.page-head-actions { flex: none; }

/* ---------- 4. Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); height: var(--control-h); padding: 0 var(--sp-4); border: 1px solid transparent; border-radius: var(--radius); font: inherit; font-size: var(--fs-15); font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none !important; cursor: pointer; transition: background-color 0.12s, border-color 0.12s, color 0.12s; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-contrast) !important; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text) !important; }
.btn-secondary:hover { border-color: var(--muted); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2) !important; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text) !important; }
.btn-danger { border-color: var(--danger-border); background: var(--surface); color: var(--danger) !important; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { gap: 6px; height: var(--control-sm); padding: 0 var(--sp-3); font-size: var(--fs-14); }
.btn-xs { gap: 5px; height: 30px; padding: 0 10px; font-size: var(--fs-13); }
.btn-lg { height: 48px; padding: 0 var(--sp-5); font-size: var(--fs-16); }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.fav-button[aria-pressed="true"] .icon, .fav-toggle[aria-pressed="true"] .icon { fill: var(--star); stroke: var(--star); }

.field { min-width: 0; margin: 0; }
fieldset.field { padding: 0; border: 0; }
.field > label, .field > legend, .label { display: block; margin-bottom: 6px; padding: 0; color: var(--text); font-size: var(--fs-14); font-weight: 600; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.45; }
.input { width: 100%; height: var(--control-h); margin: 0; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-16); font-variant-numeric: tabular-nums; transition: border-color 0.12s, box-shadow 0.12s; }
.input[type="color"] { width: 56px; padding: 4px; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:hover:not(:disabled) { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
input[type="time"].input, input[type="date"].input, input[type="month"].input { min-width: 0; padding-right: 6px; }
input[type="number"].input { appearance: textfield; -moz-appearance: textfield; }
input[type="number"].input::-webkit-inner-spin-button, input[type="number"].input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; top: 50%; right: 14px; width: 7px; height: 7px; margin-top: -5px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
select.input { padding-right: 34px; text-overflow: ellipsis; cursor: pointer; appearance: none; -webkit-appearance: none; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { flex: 1 1 auto; min-width: 0; border-radius: 0; }
.input-group .input:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .input:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.input-group .affix { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); font-size: var(--fs-14); white-space: nowrap; }
.input-group .affix:first-child { border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.input-group .affix:last-child { border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-4); }
.form-grid > .check-field, .form-grid > .field-wide { grid-column: 1 / -1; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
/* Settings panels on full-width tools: one fixed four-column grid, so fields line up
   from row to row and panel to panel. Rows that hold fewer fields leave the space empty. */
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid-4 > .span-2 { grid-column: span 2; }
@media (max-width: 860px) { .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; } .form-grid-4 > .span-2 { grid-column: auto; } }
.field-wide { grid-column: 1 / -1; }
.form-section { margin-top: var(--sp-6); }
.form-section:first-child { margin-top: 0; }
.form-section + .form-section, form + .form-section, .stack + .form-section { padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.form-section-title { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: var(--fs-14); font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; }
.segmented label:hover { color: var(--text); }
.segmented input:checked + label { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
[data-theme="dark"] .segmented input:checked + label { background: var(--surface-3); }
.segmented input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 1px; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-15); cursor: pointer; }
.check input, input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.check input { flex: none; width: 18px; height: 18px; margin: 0; }
.check-field { display: flex; flex-direction: column; justify-content: center; }
.field > label.check { display: inline-flex; margin: 0; font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: var(--control-sm); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: var(--fs-14); font-weight: 600; cursor: pointer; user-select: none; }
.chip label:hover { border-color: var(--muted); color: var(--text); }
.chip input:checked + label { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.chip input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: var(--fs-13); font-weight: 600; }

/* ---------- 5. Panels, results & feedback ---------- */
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 52px; padding: 10px var(--sp-5); border-bottom: 1px solid var(--border); }
.panel-head .hint { margin: 0; }
.panel-title { margin: 0; font-size: var(--fs-16); font-weight: 600; letter-spacing: 0; }
.panel-body { padding: var(--sp-5); }
.panel + .panel, .calc + .panel { margin-top: var(--sp-4); }
.panel-title .hint { display: inline; margin: 0 0 0 var(--sp-2); font-weight: 400; }
.panel-total { color: var(--muted); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.panel-total strong { margin: 0 4px; color: var(--text); font-size: var(--fs-18); }
@media (max-width: 560px) { .panel-body { padding: var(--sp-4); } .panel-head { padding: 10px var(--sp-4); } }

.tool-app { margin-bottom: var(--section); }
.tool-app > * + * { margin-top: var(--sp-4); }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.calc > .panel + .panel { margin-top: 0; }
/* Every results panel is marked the same way, whatever the tool's layout. */
.calc-output, .panel-results { border-top: 2px solid var(--brand); }
/* A results panel with optional settings beside the figures (pay rate, overtime). */
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: var(--sp-8); align-items: start; }
.results-options { padding-left: var(--sp-8); border-left: 1px solid var(--border); }
@media (max-width: 860px) {
  .results-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .results-options { padding: var(--sp-5) 0 0; border-top: 1px solid var(--border); border-left: 0; }
}
.panel-intro { margin: 0; color: var(--text-2); font-size: var(--fs-14); }
/* Buttons that act on the list or table directly above them: add a row, clear all. */
.list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); }
.list-actions + .hint { margin-top: var(--sp-3); }
/* A borderless button at the start of a row lines its icon up with the content edge. */
.list-actions > .btn-ghost:first-child { margin-left: calc(var(--sp-3) * -1); }

/* Expandable advanced settings: an inline toggle, or a whole panel that folds to its header. */
.disclosure > summary, .panel-disclosure > summary { list-style: none; cursor: pointer; }
.disclosure > summary::-webkit-details-marker, .panel-disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-size: var(--fs-14); font-weight: 600; }
.disclosure > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.disclosure > summary .icon, .panel-disclosure > summary > .icon { flex: none; color: var(--muted); transition: transform 0.15s; }
.disclosure > summary .icon { color: inherit; }
.disclosure:not([open]) > summary .icon, .panel-disclosure:not([open]) > summary > .icon { transform: rotate(-90deg); }
.disclosure-body { margin-top: var(--sp-3); }
.panel-disclosure:not([open]) > summary { border-bottom: 0; }
.panel-disclosure > summary:hover .panel-title { color: var(--brand-ink); }
.panel-disclosure > summary { flex-wrap: nowrap; }
.panel-summary { min-width: 0; margin-left: auto; overflow: hidden; color: var(--muted); font-size: var(--fs-14); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.panel-disclosure .panel-title { flex: none; }
@media (min-width: 1000px) { .calc-output { position: sticky; top: calc(var(--header-h) + 16px); } }
@media (max-width: 759px) { .calc { grid-template-columns: 1fr; } }
.results-empty { margin: 0; color: var(--muted); font-size: var(--fs-15); }
/* "Loading…" placeholders only make sense when scripts run; without them the noscript notice explains. */
html:not(.js) .js-loading { display: none; }

/* Vertical rhythm. Blocks stacked in a form, a form section or a results region share one
   gap; captions and hints sit closer to what they describe; sections get more room.
   Tool templates and scripts never set their own margins. */
.stack > * + *, .form-section > * + *, .results > * + * { margin-top: var(--sp-4); }
:is(.stack, .form-section, .results) > * + .form-section, :is(.stack, .form-section, .results) > * + .sub-heading { margin-top: var(--sp-6); }
:is(.stack, .form-section, .results) > :is(.form-section-title, .sub-heading, .table-caption) + * { margin-top: var(--sp-3); }
:is(.stack, .form-section, .results) > * + .hint { margin-top: var(--sp-2); }
:is(.row-list, .seg-list) + :is(.toolbar-main, .add-row) { margin-top: var(--sp-3); }
.field > * + .btn { margin-top: var(--sp-2); }
.sub-heading { margin: 0; font-size: var(--fs-15); font-weight: 600; letter-spacing: 0; }
.table-caption { margin: 0; color: var(--muted); font-size: var(--fs-13); }
.result-note { margin: 0; color: var(--text-2); font-size: var(--fs-14); }

/* Results: one prominent figure, secondary figures in a ruled row */
.stats { display: flex; flex-wrap: wrap; }
.stat { flex: 1 1 130px; min-width: 0; padding: 12px var(--sp-5) 12px 0; border-top: 1px solid var(--border); }
.stat-label { display: block; color: var(--muted); font-size: var(--fs-13); }
.stat-value { display: block; margin-top: 2px; color: var(--text); font-size: var(--fs-20); font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-sub { display: block; color: var(--muted); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.stat-primary { flex-basis: 100%; padding: 0 0 var(--sp-4); border-top: 0; }
.stat-primary .stat-label { color: var(--text-2); font-size: var(--fs-14); font-weight: 600; }
.stat-primary .stat-value { margin-top: 4px; color: var(--brand-ink); font-size: clamp(2.25rem, 1.9rem + 1.2vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.1; }
.stat-primary .stat-sub { margin-top: 4px; }
.result-list { margin: var(--sp-3) 0 0; padding: 0; }
.result-list > div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: 9px 0; border-top: 1px solid var(--border); font-size: var(--fs-15); }
.result-list dt { color: var(--text-2); }
.result-list dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.result-list .total { border-top: 1px solid var(--text-2); }
.result-list .total dt { color: var(--text); font-weight: 600; }

/* Action bar: keep · share · download, reset apart */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); }
.toolbar-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.toolbar-group { display: flex; flex-wrap: wrap; gap: 6px; }
.toolbar-group + .toolbar-group { padding-left: var(--sp-3); border-left: 1px solid var(--border); }
.toolbar [data-action="reset"] { color: var(--muted) !important; }
.toolbar [data-action="reset"]:hover { background: var(--danger-soft); color: var(--danger) !important; }
.toolbar-standalone { border: 1px solid var(--border); border-radius: var(--radius-lg); }
@media (max-width: 560px) { .toolbar { padding: var(--sp-3) var(--sp-4); } .toolbar-group + .toolbar-group { padding-left: 0; border-left: 0; } }

.notice { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-14); line-height: 1.5; }
.notice > .icon { margin-top: 2px; color: var(--muted); }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice-warn { border-color: var(--warn-border); background: var(--warn-soft); }
.notice-warn > .icon { color: var(--warn); }
.notice-error { border-color: var(--danger-border); background: var(--danger-soft); }
.notice-error > .icon { color: var(--danger); }
.notice-privacy { border-color: color-mix(in srgb, var(--brand) 30%, transparent); background: var(--brand-soft); }
.notice-privacy > .icon { color: var(--brand-ink); }
.notice + .notice { margin-top: 10px; }
.gross-notice { margin-top: var(--sp-4); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--fs-12); font-weight: 600; line-height: 1.6; white-space: nowrap; }
.badge-brand { border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand-ink); }
.badge-warn { border-color: var(--warn-border); background: var(--warn-soft); color: var(--warn); }
.badge-danger { border-color: var(--danger-border); color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table thead th { background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tfoot td { border-top: 1px solid var(--text-2); border-bottom: 0; font-weight: 600; }
.data-table .num { text-align: right; }
.data-table .input { height: var(--control-sm); font-size: var(--fs-15); }

/* Wide input tables become stacked rows on small screens (cells carry data-label) */
@media (max-width: 640px) {
  .stack-sm.table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .stack-sm table { min-width: 0 !important; }
  .stack-sm table, .stack-sm tbody, .stack-sm tfoot, .stack-sm tr, .stack-sm td { display: block; width: 100%; }
  .stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-sm tbody tr, .stack-sm tfoot tr { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 14px 0; border-top: 1px solid var(--border); }
  .stack-sm tbody tr:first-child { border-top: 0; padding-top: 0; }
  .stack-sm td, .stack-sm tfoot td { min-width: 0; padding: 0; border: 0; background: none; }
  .stack-sm td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: var(--fs-12); font-weight: 600; }
  .stack-sm td.cell-wide { grid-column: 1 / -1; }
  .stack-sm tr > td:first-child { grid-column: 1 / -1; padding-right: 44px; }
  .stack-sm td.cell-action { position: absolute; top: 10px; right: 0; width: auto; }
  .stack-sm tbody tr:first-child td.cell-action { top: -4px; }
  .stack-sm td.num { text-align: left; }
  .stack-sm td:empty { display: none; }
}

/* Editable row lists */
.row-list { display: grid; gap: var(--sp-2); }
.row-item { display: grid; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.row-item .field > label { margin-bottom: 4px; font-size: var(--fs-13); }
.row-item .input { height: var(--control-sm); }
.row-actions { display: flex; justify-content: flex-end; }
@media (max-width: 560px) {
  .row-item { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .row-item > .field:first-child { grid-column: 1 / -1; }
  .row-item > .row-actions { grid-column: -2 / -1; }
}

/* ---------- 6. Tool-specific ---------- */
.ts { display: grid; }
.ts-head, .ts-day { display: grid; grid-template-columns: 150px minmax(0, 1fr) 104px; gap: var(--sp-3); }
.ts-head { padding: 0 var(--sp-4) var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ts-head-shift, .ts-shift { display: grid; grid-template-columns: repeat(2, minmax(96px, 1fr)) repeat(2, minmax(72px, 0.75fr)) 64px 34px; gap: var(--sp-2); align-items: center; }
.ts-head > span:last-child { text-align: right; }
.ts-week-title { margin: var(--sp-5) 0 var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.ts-week-title:first-child { margin-top: 0; }
.ts-day { align-items: start; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-bottom-width: 0; }
.ts-days > .ts-day:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.ts-days > .ts-day:last-child { border-bottom-width: 1px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.ts-day:focus-within { background: var(--surface-2); }
.ts-day.is-off { background: var(--surface-2); }
.ts-day.is-off .ts-dayname { color: var(--muted); }
.ts-day.has-problem { box-shadow: inset 3px 0 0 var(--warn); }
.ts-day-label { padding-top: var(--sp-2); }
.ts-dayname { display: block; font-weight: 600; line-height: 1.3; }
.ts-date { display: block; color: var(--muted); font-size: var(--fs-13); }
.ts-shifts { display: grid; gap: var(--sp-2); min-width: 0; }
.ts-shift .input { height: var(--control-sm); padding: 0 8px; font-size: var(--fs-15); }
.ts-cell { display: block; min-width: 0; margin: 0; }
.ts-cell-label { display: none; }
.ts-hours { color: var(--text-2); font-size: var(--fs-15); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ts-hours.is-error { color: var(--warn); font-size: var(--fs-13); text-align: left; }
.ts-shift-note { grid-column: 1 / -1; margin: -2px 0 0; color: var(--warn); font-size: var(--fs-13); }
.ts-shift-note.is-info { color: var(--muted); }
.ts-add { justify-self: start; }
.ts-day-total { padding-top: 6px; text-align: right; font-variant-numeric: tabular-nums; }
.ts-day-total strong { display: block; font-size: var(--fs-16); }
.ts-day-total span { display: block; color: var(--muted); font-size: var(--fs-13); }
.ts-day-total .ts-cell-label { display: none; }
@media (max-width: 860px) {
  .ts-head { display: none; }
  .ts-day { grid-template-columns: 1fr auto; gap: 10px var(--sp-3); margin-bottom: 10px; padding: 14px; border-bottom-width: 1px; border-radius: var(--radius-lg) !important; }
  .ts-day-label { padding-top: 0; }
  .ts-day-total { grid-column: 2; grid-row: 1; padding-top: 0; }
  .ts-shifts { grid-column: 1 / -1; }
  .ts-shift { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) 10px; padding: 10px 0 0; border-top: 1px solid var(--border); }
  .ts-cell-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: var(--fs-12); font-weight: 600; }
  .ts-hours { align-self: center; font-size: var(--fs-16); text-align: left; }
  .ts-shift .btn-remove { justify-self: end; }
}
.dialog-shifts .ts-shift { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.dialog-shifts .ts-cell-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: var(--fs-12); font-weight: 600; }
.dialog-shifts .ts-hours { align-self: center; font-size: var(--fs-16); text-align: left; }
.dialog-shifts .btn-remove { justify-self: end; }

.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-month-label { min-width: 140px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: 0 6px 2px; color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.cal-cell { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cal-cell:hover { border-color: var(--brand); }
.cal-cell.is-outside { visibility: hidden; }
.cal-cell.has-hours { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); background: var(--brand-soft); }
.cal-cell.is-today .cal-date { background: var(--brand); color: var(--brand-contrast); }
.cal-cell.has-problem { box-shadow: inset 0 -3px 0 var(--warn); }
.cal-date { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: var(--radius-sm); font-size: var(--fs-14); font-weight: 600; }
.cal-hours { margin-top: auto; color: var(--brand-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-hours.is-warn { color: var(--warn); }
.cal-shifts { color: var(--muted); font-size: var(--fs-12); line-height: 1.3; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .cal { gap: 3px; }
  .cal-cell { align-items: center; min-height: 56px; padding: 4px; text-align: center; }
  .cal-shifts { display: none; }
  .cal-hours { margin-top: 2px; font-size: var(--fs-13); }
  .cal-date { min-width: 22px; height: 22px; font-size: var(--fs-13); }
}

.rot-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-4); padding: 0; font-size: var(--fs-14); list-style: none; }
.rot-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rot-swatch { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; }
.rot-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--sp-4); }
.rot-month { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); break-inside: avoid; }
.rot-month h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-15); }
.rot-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.rot-dow { color: var(--muted); font-size: 0.6875rem; font-weight: 600; text-align: center; text-transform: uppercase; }
.rot-day { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); line-height: 1.05; font-variant-numeric: tabular-nums; }
.rot-day b { display: block; font-size: 0.6875rem; font-weight: 600; }
.rot-day.is-work, .pattern-strip .is-work, .rot-swatch.is-work { background: color-mix(in srgb, var(--c, #888) 30%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #888) 65%, transparent); color: var(--text); }
.rot-day.is-blank { background: none; }
.rot-day.is-today { outline: 2px solid var(--text); outline-offset: -2px; }
.rot-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: var(--fs-12); }
.seg-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.seg-item { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.seg-item select, .seg-item input { height: var(--control-sm) !important; font-size: var(--fs-14) !important; }
.seg-item select { width: auto; min-width: 92px; padding-left: 8px; }
.seg-item input { width: 64px; padding: 0 8px; }
.pattern-strip { display: flex; flex-wrap: wrap; gap: 3px; margin-top: var(--sp-3); }
.pattern-strip span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 0.6875rem; font-weight: 600; }

.sched-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.sched { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: var(--fs-14); }
.sched th, .sched td { padding: var(--sp-2); vertical-align: top; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sched thead th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); letter-spacing: 0.04em; text-align: left; text-transform: uppercase; }
.sched thead .th-sub { font-weight: 400; letter-spacing: 0; text-transform: none; }
.sched th:first-child, .sched td:first-child { position: sticky; left: 0; z-index: 1; min-width: 170px; box-shadow: 1px 0 0 var(--border); }
.sched thead th:first-child { z-index: 2; }
.sched tr > *:last-child { border-right: 0; }
.sched tbody tr:last-child td, .sched tfoot tr:last-child td { border-bottom: 0; }
.sched tfoot td { background: var(--surface-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.sched .input { height: var(--control-sm); padding: 0 6px; font-size: var(--fs-14); }
.sched-cell { display: grid; gap: 4px; min-width: 104px; }
.sched-cell .sched-hours { color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.sched-cell.is-error .sched-hours { color: var(--warn); }
.sched-emp { display: grid; gap: 4px; }
.sched-emp-actions { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .sched-wrap { overflow: visible; border: 0; border-radius: 0; }
  .sched { min-width: 0; }
  .sched, .sched tbody, .sched tfoot, .sched tr, .sched td { display: block; width: 100%; }
  .sched thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sched tbody tr, .sched tfoot tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
  .sched td, .sched th, .sched tfoot td { position: static; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; }
  .sched td:first-child { position: static; z-index: auto; grid-column: 1 / -1; min-width: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); box-shadow: none; }
  .sched td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: var(--fs-12); font-weight: 600; }
  .sched-cell { min-width: 0; }
  .sched tfoot tr { background: var(--surface-2); }
}

.timeline-bar { position: relative; display: flex; height: 24px; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-3); }
.timeline-seg { height: 100%; min-width: 1px; }
.timeline-seg.is-before { background: var(--brand); }
.timeline-seg.is-after { background: var(--accent); }
.timeline-seg.is-break { background: repeating-linear-gradient(45deg, var(--surface-3), var(--surface-3) 4px, var(--border-strong) 4px, var(--border-strong) 8px); }
.timeline-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.timeline-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: var(--sp-2) 0 0; padding: 0; color: var(--muted); font-size: var(--fs-13); list-style: none; }
.timeline-legend li { display: inline-flex; align-items: center; gap: 6px; }
.timeline-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }

/* ---------- 7. Listings & home ---------- */
/* Tool listings: the same ruled rows everywhere */
.tool-list { margin: 0; padding: 0; border-top: 1px solid var(--border); list-style: none; }
.tool-item { position: relative; padding: 12px 40px 12px 0; border-bottom: 1px solid var(--border); }
.tool-item-name { margin: 0; font-size: var(--fs-16); font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.tool-item-name a { color: var(--text) !important; text-decoration: none; }
.tool-item:hover .tool-item-name a { color: var(--brand-ink) !important; text-decoration: underline; }
.tool-item-desc { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.45; }
.tool-list-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-12); }
@media (max-width: 760px) { .tool-list-2 { grid-template-columns: 1fr; } }
.stretched-link::after { content: ""; position: absolute; inset: 0; }
.stretched-link:focus-visible { outline: none; }
.stretched-link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.fav-toggle { position: absolute; top: 50%; right: 0; z-index: 1; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: none; color: var(--border-strong); cursor: pointer; transform: translateY(-50%); }
.fav-toggle:hover { background: var(--surface-2); color: var(--star); }

.guide-list { margin: 0; padding: 0; border-top: 1px solid var(--border); list-style: none; }
.guide-row { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); padding: 12px 0; border-bottom: 1px solid var(--border); }
.guide-row-text { min-width: 0; }
.guide-row-title { margin: 0; font-size: var(--fs-16); font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.guide-row-title a { color: var(--text) !important; text-decoration: none; }
.guide-row:hover .guide-row-title a { color: var(--brand-ink) !important; text-decoration: underline; }
.guide-row p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-14); }
.guide-row-meta { flex: none; color: var(--muted); font-size: var(--fs-13); white-space: nowrap; }
.guide-list-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-12); }
@media (max-width: 760px) { .guide-list-2 { grid-template-columns: 1fr; } }

/* Sections */
.section { padding-top: var(--section); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-6); }
.section-head h2 { margin: 0; }
.section-intro { max-width: var(--measure); margin: calc(var(--sp-4) * -1) 0 var(--sp-6); color: var(--muted); }
.section-count { color: var(--muted); font-size: var(--fs-14); }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-15); font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* Categories always appear in catalogue order: left to right, then down. */
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-10) var(--sp-12); align-items: start; }
.category-block { scroll-margin-top: calc(var(--header-h) + var(--sp-6)); }
@media (max-width: 860px) { .category-grid { grid-template-columns: 1fr; } }
.category-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.category-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--fs-18); }
.category-title .icon { color: var(--brand-ink); }
.category-desc { margin: 4px 0 var(--sp-4); color: var(--muted); font-size: var(--fs-14); }

/* Home */
.hero { padding: var(--sp-12) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-16); align-items: start; }
.hero-grid > * { min-width: 0; }
.hero h1 { max-width: 18ch; font-size: clamp(2rem, 1.55rem + 1.6vw, 2.625rem); line-height: 1.12; letter-spacing: -0.025em; }
.hero .lead { margin-top: var(--sp-4); }
.hero-searchbox { position: relative; max-width: 560px; margin-top: var(--sp-8); }
.hero-searchbox form { display: flex; align-items: center; gap: var(--sp-2); height: 52px; padding: 0 6px 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); transition: border-color 0.12s, box-shadow 0.12s; }
.hero-searchbox form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.hero-searchbox form > .icon { color: var(--muted); }
.hero-searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: var(--fs-16); }
.hero-searchbox input::placeholder { color: var(--muted); }
.hero-searchbox input::-webkit-search-cancel-button { display: none; }
.hero-searchbox .btn { height: var(--control-h); }
.search-popover { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 30; max-height: min(60vh, 460px); padding: 6px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); }
.hero-aside { padding-top: 4px; }
.aside-title { margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.hero-assurances { margin-top: var(--sp-3); }
/* Common tasks: task-worded shortcuts, ruled like every other list; the whole row is the link. */
.task-list { margin: 0; padding: 0; border-top: 1px solid var(--border); list-style: none; }
.task-list li { position: relative; display: flex; align-items: center; gap: var(--sp-3); border-bottom: 1px solid var(--border); }
.task-list a { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 0; text-decoration: none; }
.task-list a::after { content: ""; position: absolute; inset: 0; }
.task-name { color: var(--text); font-size: var(--fs-16); font-weight: 600; line-height: 1.35; }
.task-tool { color: var(--muted); font-size: var(--fs-13); }
.task-list li > .icon { color: var(--muted); transition: transform 0.12s, color 0.12s; }
.task-list li:hover .task-name, .task-list li:hover > .icon { color: var(--brand-ink); }
.task-list li:hover > .icon { transform: translateX(2px); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fact { padding: var(--sp-5) var(--sp-6) var(--sp-5) 0; }
.fact + .fact { padding-left: var(--sp-6); border-left: 1px solid var(--border); }
.fact dt { font-size: var(--fs-15); font-weight: 600; }
.fact dd { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.5; }
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-10); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .hero { padding-top: var(--sp-8); }
  .hero-searchbox .btn { display: none; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: var(--sp-4) 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--border); }
}
.search-launch { display: flex; align-items: center; gap: 10px; width: min(100%, 460px); height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-16); text-align: left; cursor: text; }
.search-launch:hover { border-color: var(--brand); }

/* Favourites and recently used: each block appears only when it has tools in it. */
.personal, .personal-block { display: none; }
/* Under the search on the home page: a returning visitor sees their own tools first. */
.has-personal .personal { display: grid; gap: var(--sp-5); margin-top: var(--sp-8); }
.has-favs .personal-favs, .has-recent .personal-recent { display: block; }
.personal-block h2 { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.personal-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.personal-list a { display: inline-flex; align-items: center; height: var(--control-sm); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text) !important; font-size: var(--fs-14); font-weight: 600; text-decoration: none; }
.personal-list a:hover { border-color: var(--brand); }

/* Directory */
.directory-controls { position: sticky; top: var(--header-h); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-8); padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.directory-search { position: relative; flex: 1 1 320px; max-width: 480px; }
.directory-search .icon { position: absolute; top: 50%; left: 12px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.directory-search .input { padding-left: 38px; }
.directory-count { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.directory-empty { padding: var(--sp-8) 0; color: var(--muted); text-align: center; }

/* ---------- 8. Content ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: var(--sp-16); align-items: start; padding-top: var(--sp-10); border-top: 1px solid var(--border); }
.content-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.page-guide .content-layout, .page-simple .content-layout { padding-top: 0; border-top: 0; }
@media (max-width: 1000px) { .content-layout { grid-template-columns: 1fr; gap: 0; } .content-aside { display: none; } }
.toc { font-size: var(--fs-14); }
.toc-title { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; border-left: 1px solid var(--border); list-style: none; }
.toc a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc a.is-active { border-left-color: var(--brand); color: var(--text); font-weight: 600; }

.prose { max-width: var(--measure); color: var(--text-2); font-size: var(--fs-16); line-height: 1.7; }
.prose > .content-section + .content-section { margin-top: var(--sp-12); }
.prose h2 { margin: 0 0 var(--sp-4); }
.prose h3 { margin: var(--sp-6) 0 var(--sp-2); }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--text); }
.prose table { width: 100%; margin: var(--sp-2) 0 var(--sp-5); border-collapse: collapse; font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.prose thead th { background: var(--surface-2); color: var(--muted); font-size: var(--fs-13); font-weight: 600; }
.prose tfoot td { border-top: 1px solid var(--text-2); color: var(--text); font-weight: 600; }
.prose td.num, .prose th.num { text-align: right; }
.prose .table-wrap { margin: var(--sp-2) 0 var(--sp-5); background: var(--surface); }
.prose .table-wrap table { margin: 0; }
.prose .table-wrap tbody tr:last-child td { border-bottom: 0; }
.prose code { padding: 1px 5px; border-radius: var(--radius-sm); background: var(--surface-2); font-family: var(--mono); font-size: 0.875em; }
.prose .notice { margin: 0 0 var(--sp-8); }
.prose .tool-list { margin-top: var(--sp-2); }
.example { margin: var(--sp-5) 0; padding: 2px 0 2px var(--sp-5); border-left: 2px solid var(--brand); }
.example-label { margin: 0 0 2px; color: var(--brand-ink); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.example h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-16); }
.example p:last-child, .example ul:last-child, .example ol:last-child, .example .table-wrap:last-child, .example table:last-child { margin-bottom: 0; }
.formula { margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4); overflow-x: auto; border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: var(--fs-14); line-height: 1.75; }

.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; color: var(--text); font-weight: 600; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand-ink); }
.faq-item summary .icon { color: var(--muted); transition: transform 0.15s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-a { padding: 0 0 var(--sp-4); }
.faq-a p:last-child { margin-bottom: 0; }

.related { margin-top: var(--section); padding-top: var(--sp-10); border-top: 1px solid var(--border); }
.related h2 { margin-bottom: var(--sp-5); }
.related-guides-title { margin-top: var(--sp-10); }
.legal-meta { color: var(--muted); font-size: var(--fs-14); }
.prose .examples-note { color: var(--muted); font-size: var(--fs-14); }
.prose .report-problem { margin-top: var(--sp-8); padding-top: var(--sp-4); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-14); }
/* Contact form */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-submit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.contact-submit .hint { margin: 0; }
.contact-sent-title { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); font-size: var(--fs-18); font-weight: 600; }
.contact-sent-title .icon { color: var(--success); }
.contact-sent:focus { outline: none; }
.contact-email { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-5) 0 0; }
.contact-email .icon { color: var(--brand-ink); }
.contact-notes { margin-top: var(--sp-10); }

/* ---------- 9. Footer, dialogs, toast, ads ---------- */
.site-footer { padding: var(--sp-12) 0 var(--sp-8); border-top: 1px solid var(--border); font-size: var(--fs-14); }
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--sp-12); }
.footer-brand p { max-width: 320px; margin: var(--sp-3) 0 0; color: var(--muted); }
.footer-privacy { display: flex; align-items: flex-start; gap: var(--sp-2); }
.footer-privacy .icon { margin-top: 3px; color: var(--brand-ink); }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); }
.footer-col h2 { margin: 0 0 var(--sp-3); color: var(--text); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li + li { margin-top: 6px; }
.footer-col a, .footer-col .link-btn { color: var(--muted); line-height: 1.4; text-decoration: none; }
.footer-col a:hover, .footer-col .link-btn:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2) var(--sp-8); margin-top: var(--sp-10); padding-top: var(--sp-5); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-13); }
.footer-bottom p { margin: 0; }
.footer-bottom p + p { max-width: 80ch; }
@media (max-width: 860px) { .footer-main { grid-template-columns: 1fr; gap: var(--sp-8); } }
@media (max-width: 560px) { .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-4); } }

.dialog { width: min(560px, calc(100% - 32px)); max-height: min(86vh, 760px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-float); }
.dialog::backdrop { background: rgba(10, 14, 16, 0.45); }
.dialog-small { width: min(440px, calc(100% - 32px)); }
.dialog-inner { display: flex; flex-direction: column; max-height: inherit; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 12px var(--sp-4) 12px var(--sp-5); border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; font-size: var(--fs-16); }
.dialog-body { padding: var(--sp-5); overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: 12px var(--sp-5); border-top: 1px solid var(--border); }
.danger-zone { margin-top: var(--sp-6) !important; padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.danger-zone h3 { margin-bottom: 4px; font-size: var(--fs-15); }
.danger-zone p { color: var(--muted); font-size: var(--fs-14); }
.dialog-search { width: min(620px, calc(100% - 24px)); margin-top: 10vh; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 var(--sp-4); border-bottom: 1px solid var(--border); color: var(--muted); }
.search-box input { flex: 1; height: 56px; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: var(--fs-16); }
.search-box input::-webkit-search-cancel-button { display: none; }
.kbd-btn { padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-12); cursor: pointer; }
.search-results { max-height: 55vh; margin: 0; padding: var(--sp-2); overflow-y: auto; list-style: none; }
.search-popover.search-results { max-height: min(60vh, 460px); padding: 6px; }
.search-results li { margin: 0; }
.search-group { padding: 10px 10px 4px; color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.search-item { display: block; padding: 8px 10px; border-radius: var(--radius); color: var(--text) !important; text-decoration: none; }
.search-item[aria-selected="true"], .search-item:hover { background: var(--surface-2); }
.search-item[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--brand); }
.search-item-text { display: block; min-width: 0; }
.search-item-text strong { display: block; font-size: var(--fs-15); }
.search-item-text span { display: block; overflow: hidden; color: var(--muted); font-size: var(--fs-13); white-space: nowrap; text-overflow: ellipsis; }
.search-none { padding: var(--sp-6); color: var(--muted); text-align: center; }
.search-foot { display: flex; gap: var(--sp-4); margin: 0; padding: 10px var(--sp-4); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-12); }
.search-foot kbd { margin-right: 3px; }
@media (max-width: 560px) { .search-foot { display: none; } .dialog-search { margin-top: 12px; } }
.saved-list { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.saved-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.saved-item-text { flex: 1; min-width: 0; }
.saved-item-text strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.saved-item-text span { color: var(--muted); font-size: var(--fs-13); }

.toast-region { position: fixed; bottom: 24px; left: 50%; z-index: 100; display: grid; gap: var(--sp-2); transform: translateX(-50%); pointer-events: none; }
.toast { padding: 10px var(--sp-4); border-radius: var(--radius); background: var(--text); color: var(--bg); font-size: var(--fs-14); font-weight: 600; box-shadow: var(--shadow-float); animation: toast-in 0.18s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ad-slot { min-height: 300px; margin: var(--sp-10) 0; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.ad-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ad-slot ins { min-height: 260px; }

/* Report (print + blank-timesheet preview) — always light, like paper */
.print-root { display: none; }
.report { color: #111; font-size: 12px; line-height: 1.45; }
.report h1, .report .report-title { margin: 0 0 4px; color: #111; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.report h2 { margin: 16px 0 6px; color: #111; font-size: 13px; }
.report-sub { margin: 0 0 12px; color: #555; }
.report-meta, .report-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin: 0 0 12px; }
.report-meta div, .report-summary div { display: flex; gap: 6px; }
.report-meta dt { color: #555; font-weight: 600; }
.report-meta dd, .report-summary dd { margin: 0; }
.report-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.report-summary div { flex-direction: column; gap: 0; padding: 8px 10px; border-radius: 3px; background: #f1f3f3; }
.report-summary dt { color: #555; font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.report-summary dd { font-size: 15px; font-weight: 600; }
.report-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 6px 0 16px; }
.report-field { display: flex; align-items: flex-end; gap: 8px; }
.report-field > span:first-child { color: #444; font-weight: 600; white-space: nowrap; }
.report-line { flex: 1; min-height: 18px; border-bottom: 1px solid #777; }
.report-table { width: 100%; margin: 4px 0 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.report-table th, .report-table td { padding: 5px 7px; border: 1px solid #c9cfd1; text-align: left; vertical-align: middle; }
.report-table th { background: #eef1f1; color: #444; font-size: 10.5px; letter-spacing: 0.02em; text-transform: uppercase; }
.report-table .num { text-align: right; }
.report-table .center { text-align: center; }
.report-table tfoot td { background: #f6f7f7; font-weight: 600; }
.report-notes p { margin: 3px 0; color: #555; font-size: 11px; }
.report-signatures { display: flex; gap: 40px; margin-top: 36px; }
.report-signatures > div { display: flex; flex: 1; flex-direction: column; gap: 4px; color: #555; }
.report-footer { margin-top: 16px; color: #777; font-size: 10px; }
.paper { overflow-x: auto; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.paper .report { min-width: 640px; }
.paper.is-landscape .report { min-width: 900px; }

/* ---------- 10. Print ---------- */
@media print {
  @page { margin: 14mm; }
  :root, [data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #f3f4f4; --text: #000; --text-2: #222; --muted: #555; --border: #ccc; --brand-ink: #0b6157; --logo-base: #0b6157; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .skip-link, .toolbar, .ad-slot, .content-aside, .related, .breadcrumbs, .fav-button, .fav-toggle,
  .page-head-actions, .page-head-meta, dialog, .toast-region, .btn, .icon-btn, .btn-remove, .ts-add, .no-print, noscript { display: none !important; }
  .panel, .example { break-inside: avoid; }
  .calc { grid-template-columns: 1fr 1fr; }
  .calc-output { position: static; }
  main { padding: 0; }
  .content-layout { border-top: 0; }
  .prose { max-width: none; }
  .faq-item:not([open]) .faq-a { display: block; }
  .printing-report body > *:not(#print-root) { display: none !important; }
  .printing-report #print-root { display: block !important; }
  .report-table tr, .rot-month { break-inside: avoid; }
  .rot-day.is-work, .report-summary div, .report-table th { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
