/* Payroll Hours Calculator
   Single stylesheet. System fonts, no external requests. */

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #18212b;
  --muted: #55606c;
  --line: #e1ddd2;
  --line-strong: #cfc9ba;
  --brand: #0e5a57;
  --brand-ink: #0a4442;
  --brand-soft: #e2efed;
  --amber-ink: #7a4f00;
  --amber-soft: #fbf0d6;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --info-soft: #e8f0f8;
  --info-ink: #1d4a73;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(24, 33, 43, .06), 0 12px 28px -16px rgba(24, 33, 43, .22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .6em; color: var(--ink); }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #2b8a86; outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 8px; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--brand); background: var(--brand); color: #fff;
  font-weight: 600; font-size: .95rem; line-height: 1; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- header ---------- */
.site-header {
  position: relative; z-index: 50; height: var(--header-h);
  background: #fff; border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.2rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 32px; height: 32px; flex: none; }
@media (max-width: 420px) { .brand { font-size: 1.02rem; gap: 8px; } .brand svg { width: 28px; height: 28px; } }
@media (max-width: 360px) { .brand { font-size: .9rem; gap: 7px; white-space: nowrap; } .brand svg { width: 26px; height: 26px; } }
.brand span b { color: var(--brand); font-weight: 750; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a {
  display: block; padding: 9px 14px; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-weight: 550; font-size: .95rem;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: transparent; border: 1.5px solid var(--line-strong); border-radius: 8px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 820px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: var(--header-h); background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -18px rgba(24, 33, 43, .3);
    padding: 10px 20px 16px; display: none;
  }
  .js .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: 13px 12px; font-size: 1.02rem; }
  .no-js .site-header { height: auto; position: static; }
  .no-js .site-header .container { flex-wrap: wrap; padding-block: 10px; height: auto; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 5vw, 56px) 0 clamp(18px, 3vw, 30px); position: relative; }
.hero::before { /* faint ruled-paper lines, like a timesheet */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(14, 90, 87, .07) 31px 32px);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.2rem); font-weight: 780; letter-spacing: -.03em; max-width: 18ch; margin-bottom: .45em; }
.hero p.lead { font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--muted); max-width: 62ch; margin-bottom: 1.1em; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: .86rem; font-weight: 550; color: var(--ink); }
.chips svg { width: 15px; height: 15px; color: var(--brand); flex: none; }

/* ---------- landing page ---------- */
.hero .crumbs { margin-bottom: 16px; }
.hero-split { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .hero-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; } }
.hero-split h1 { max-width: 20ch; }
.hero-actions { margin: 0 0 20px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn--light { background: #fff; color: var(--brand-ink); border-color: #fff; }
.btn--light:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-ink); }
.preview { max-width: 460px; }
.preview .stub-title { margin: 0; font-size: 1rem; color: #fff; letter-spacing: 0; font-weight: 700; }
.cta-band { background: var(--brand); color: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.cta-band h2 { color: #fff; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); margin: 0 0 4px; }
.cta-band p { margin: 0; color: #d6e8e6; }

/* ---------- calculator ---------- */
.tool { padding: 8px 0 clamp(36px, 6vw, 64px); }
.tool-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .tool-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; } .results-wrap { position: sticky; top: 16px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: clamp(16px, 2.4vw, 24px); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; letter-spacing: -.01em; }

.setup { display: grid; gap: 16px; }
@media (min-width: 640px) { .setup { grid-template-columns: 1.4fr 1fr 1fr; align-items: end; } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lab { font-size: .85rem; font-weight: 650; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.field .err { font-size: .82rem; color: var(--danger); font-weight: 550; line-height: 1.4; }
.inp {
  width: 100%; min-height: 44px; padding: 8px 12px; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 1rem; line-height: 1.3;
  font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s;
}
.inp:hover { border-color: #a9a291; }
.inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 90, 87, .2); }
.inp[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
select.inp { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2355606c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.inp-money { position: relative; }
.inp-money .sym { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; font-size: .95rem; }
.inp-money .inp { padding-left: 2.1rem; }
.inp-money.long .inp { padding-left: 3.1rem; }

/* segmented period control */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: 41px; padding: 0 6px; font-size: .9rem; font-weight: 600; cursor: pointer; text-align: center; color: var(--ink); transition: background-color .15s, color .15s; border-left: 1px solid var(--line); }
.seg label:first-of-type { border-left: 0; }
.seg label:hover { background: var(--brand-soft); }
.seg input:checked + label { background: var(--brand); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid #2b8a86; outline-offset: -3px; }

/* timesheet */
.ts-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ts-head .card-title { margin: 0; }
.ts-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-cols { display: none; }
.ts-rows { display: grid; gap: 10px; }
.ts-week { font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); padding: 10px 0 0; border-top: 1px dashed var(--line-strong); }
.ts-week:first-child { border-top: 0; padding-top: 0; }
.ts-row {
  display: grid; gap: 8px 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fcfbf8;
  grid-template-columns: 1fr 1fr; grid-template-areas: "day day" "s e" "b h";
}
.inp[type="time"] { padding-left: 10px; padding-right: 6px; }
.inp[type="time"]::-webkit-calendar-picker-indicator { margin-left: 2px; padding: 0; }
.ts-row.is-warn { border-color: #e2c27a; background: #fffbf0; }
.ts-row.is-error { border-color: #e6a39e; background: #fffafa; }
.ts-day { grid-area: day; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ts-day small { color: var(--muted); font-weight: 500; font-size: .82rem; }
.ts-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-cell > label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.ts-cell.s { grid-area: s; } .ts-cell.e { grid-area: e; } .ts-cell.b { grid-area: b; }
.ts-out { grid-area: h; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; text-align: right; min-height: 44px; gap: 2px; }
.ts-out output { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.ts-out .dec { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 750; letter-spacing: .03em; margin-left: 4px; vertical-align: 1px; }
.badge-ot { background: var(--amber-soft); color: var(--amber-ink); }
.badge-dt { background: #f6dfe0; color: #8a1c24; }
.ts-note { grid-column: 1 / -1; margin: 0; font-size: .82rem; line-height: 1.4; padding: 6px 10px; border-radius: 6px; }
.ts-note.info { background: var(--info-soft); color: var(--info-ink); }
.ts-note.warn { background: var(--amber-soft); color: var(--amber-ink); }
.ts-note.error { background: var(--danger-soft); color: #8d1d17; }

@media (min-width: 680px) {
  .ts-cols, .ts-row { grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1fr) 6.2rem 7.2rem; column-gap: 12px; }
  .ts-cols { display: grid; padding: 0 12px 6px; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
  .ts-cols span:last-child { text-align: right; }
  .ts-row { grid-template-areas: "day s e b h" "note note note note note"; align-items: center; padding: 8px 12px; }
  .ts-day { grid-area: day; }
  .ts-cell > label { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .ts-out { justify-content: center; min-height: 0; }
  .ts-note { grid-area: note; }
}

.divider-note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }

/* rules (details) */
details.rules > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px clamp(16px, 2.4vw, 24px); font-weight: 700; border-radius: var(--radius);
}
details.rules > summary::-webkit-details-marker { display: none; }
details.rules > summary .sum-text { color: var(--muted); font-weight: 500; font-size: .86rem; margin-left: 8px; }
details.rules > summary .chev { width: 18px; height: 18px; flex: none; transition: transform .2s; color: var(--muted); }
details.rules[open] > summary .chev { transform: rotate(180deg); }
.rules-body { padding: 0 clamp(16px, 2.4vw, 24px) clamp(16px, 2.4vw, 22px); display: grid; gap: 16px; }
@media (min-width: 640px) { .rules-body { grid-template-columns: repeat(3, 1fr); } .rules-body .span-all { grid-column: 1 / -1; } }
.rules-err { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--danger-soft); color: #8d1d17; font-size: .86rem; font-weight: 550; }

/* results ("pay stub") */
.stub { overflow: hidden; }
.stub-top { background: var(--brand); color: #fff; padding: 14px 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stub-top h3 { margin: 0; font-size: 1rem; color: #fff; letter-spacing: 0; font-weight: 700; }
.stub-top span { font-size: .82rem; opacity: .9; }
.stub-body { padding: 20px; }
.total-label { font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.total-value { font-size: clamp(2.1rem, 1.6rem + 2vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 2px 0 4px; font-variant-numeric: tabular-nums; word-break: break-word; }
.total-sub { color: var(--muted); font-size: .95rem; margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.pay-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pay-table th, .pay-table td { padding: 9px 0; text-align: right; border-top: 1px dashed var(--line-strong); }
.pay-table th:first-child, .pay-table td:first-child { text-align: left; }
.pay-table thead th { border-top: 0; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding-top: 0; }
.pay-table tbody th { font-weight: 550; }
.pay-table tr.is-total td, .pay-table tr.is-total th { border-top: 2px solid var(--ink); font-weight: 800; }
.pay-table tr.is-ot th { color: var(--amber-ink); }
.facts { margin: 14px 0 0; display: grid; gap: 0; font-size: .92rem; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line-strong); font-variant-numeric: tabular-nums; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 650; text-align: right; }
.weeks { margin-top: 16px; }
.weeks h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 6px; }
.rules-line { margin: 14px 0 0; padding: 10px 12px; background: var(--brand-soft); color: var(--brand-ink); border-radius: 8px; font-size: .85rem; line-height: 1.45; }
.notes { margin: 12px 0 0; padding: 10px 12px 10px 28px; background: var(--amber-soft); color: var(--amber-ink); border-radius: 8px; font-size: .85rem; line-height: 1.45; }
.notes li + li { margin-top: 4px; }
.stub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stub-actions .btn { flex: 1 1 auto; }
.copy-status { margin: 8px 0 0; min-height: 1.3em; font-size: .85rem; color: var(--brand); font-weight: 600; }
.stub-foot { margin: 10px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }

.mini-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line-strong);
  box-shadow: 0 -10px 24px -14px rgba(24, 33, 43, .35); padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  display: none; align-items: center; justify-content: space-between; gap: 12px;
}
.mini-bar.is-on { display: flex; }
.mini-bar .t { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.mini-bar .h { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 980px) { .mini-bar, .mini-bar.is-on { display: none; } }

/* ---------- content sections ---------- */
.section { padding: clamp(36px, 6vw, 68px) 0; }
.section--tint { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 70ch; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 760; letter-spacing: -.025em; margin-bottom: .4em; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.cols-2 { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.cols-2 > *, .tool-grid > *, .contact-grid > *, .doc-layout > * { min-width: 0; }
@media (min-width: 900px) { .cols-2 { grid-template-columns: 1fr 1fr; gap: 48px; } .cols-2.wide-left { grid-template-columns: 1.15fr 1fr; } }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: .9rem; }
.steps strong { display: block; margin-bottom: 2px; }
.formula { white-space: pre; max-width: 100%; background: var(--ink); color: #eef3f2; border-radius: var(--radius); padding: 18px 20px; font-family: var(--mono); font-size: .88rem; line-height: 1.8; overflow-x: auto; }
.formula b { color: #8ed7cf; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
.data-table.compact { min-width: 0; }
.data-table.compact th, .data-table.compact td { padding: 10px 12px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: #f1eee5; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table td.r, .data-table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.total td, .data-table tr.total th { font-weight: 800; background: #faf8f2; }
.table-caption { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.def-list { margin: 0; display: grid; gap: 0; }
.def-list div { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.def-list div:last-child { border-bottom: 1px solid var(--line); }
.def-list dt { font-weight: 700; }
.def-list dd { margin: 0; color: var(--muted); }
.checks { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 9px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg) scale(.9); transform-origin: center; }
.callout { background: var(--amber-soft); border-left: 4px solid #d79b1e; color: #4f3500; padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .95rem; }
.callout a { color: #4f3500; }

.faq { max-width: 860px; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 650; position: relative; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details[open] summary { color: var(--brand-ink); }
.faq .answer { padding: 0 18px 16px; color: #2c3742; }
.faq .answer > :last-child { margin-bottom: 0; }

.sources { font-size: .9rem; color: var(--muted); }
.sources ul { margin: .4em 0 0; padding-left: 1.2em; }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(28px, 5vw, 52px) 0 8px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #a39d8c; }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.7rem); font-weight: 780; letter-spacing: -.03em; margin-bottom: .3em; }
.page-head .meta { color: var(--muted); font-size: .92rem; margin: 0; }
.page-head .lead { color: var(--muted); font-size: 1.1rem; max-width: 62ch; margin: 0; }
.page-body { padding: 20px 0 clamp(48px, 7vw, 88px); }
.doc-layout { display: grid; gap: 28px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .doc-layout.has-toc { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; } .toc { position: sticky; top: 20px; } }
.toc { font-size: .9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.toc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 5px; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.prose { max-width: 74ch; }
.prose h2 { font-size: 1.4rem; font-weight: 740; margin: 2em 0 .5em; letter-spacing: -.02em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 1.5em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 650; }
.prose .callout { margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: #f1eee5; }
@media (max-width: 640px) {
  .prose table.stack, .prose table.stack tbody, .prose table.stack tr, .prose table.stack td { display: block; width: 100%; }
  .prose table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table.stack tr { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin: 0 0 10px; }
  .prose table.stack td { border: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .prose table.stack td:last-child { border-bottom: 0; }
  .prose table.stack td::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
}
.prose address { font-style: normal; }

/* contact */
.contact-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; } }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
textarea.inp { min-height: 150px; resize: vertical; line-height: 1.5; }
.form-status { margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; font-size: .93rem; }
.form-status.ok { background: var(--brand-soft); color: var(--brand-ink); }
.form-status.bad { background: var(--danger-soft); color: #8d1d17; }
.mail-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; background: #f1eee5; border-radius: 8px; font-weight: 650; word-break: break-all; }
.counter { font-size: .78rem; color: var(--muted); text-align: right; }

.notfound { text-align: center; padding: clamp(60px, 12vw, 140px) 0; }
.notfound .big { font-size: clamp(4rem, 3rem + 8vw, 8rem); font-weight: 800; letter-spacing: -.05em; color: var(--brand); line-height: 1; margin: 0 0 8px; }

/* ---------- footer ---------- */
.site-footer { background: #15202b; color: #cfd8d7; padding: 48px 0 24px; margin-top: 0; }
.site-footer a { color: #cfd8d7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; } }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand span b { color: #7fd0c8; }
.foot-grid p { font-size: .92rem; line-height: 1.6; max-width: 40ch; margin: 0; color: #aebbb9; }
.foot-grid h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #8fa09e; margin: 0 0 12px; font-weight: 700; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .94rem; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2a3948; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .84rem; color: #8fa09e; }
@media (max-width: 979px) { .has-mini-bar .site-footer { padding-bottom: 88px; } }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .45s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- print: only the timesheet + summary ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .hero, .section, .mini-bar, .ts-tools, .stub-actions, .copy-status, .skip-link, details.rules, .setup-note, noscript { display: none !important; }
  .tool { padding: 0; }
  .tool-grid { display: block; }
  .results-wrap { position: static; }
  .card { box-shadow: none; break-inside: avoid; }
  .stub-top { background: #fff !important; color: #000; border-bottom: 2px solid #000; }
  .stub-top h3 { color: #000; }
  .ts-row { break-inside: avoid; }
  .inp { border: 0; padding: 0; min-height: 0; background: none; }
  select.inp { background-image: none; }
}
