/* Overtime Owl: Precision Light.
   A quiet, premium instrument: a light canvas, white cards, black type at large scale, and color only for hours
   (blue regular, orange 1.5x, red 2x). Motion answers input: digits roll, the strip grows, the switch slides.
   Light by default; a header switch turns on dark. Type is the device's own system face: no font downloads. */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --surface: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-solid: #f0f0f3;
  --line: #e3e3e8;
  --field-line: #86868b;
  --ink: #1d1d1f;
  --ink-2: #48484c;
  --ink-3: #6e6e73;
  --owl: #1d1d1f;

  --reg: #0066d6;
  --ot: #ff9500;
  --dt: #e0262b;

  --btn: #1d1d1f;
  --btn-ink: #ffffff;
  --btn-hover: #3a3a3d;
  --thumb: #ffffff;
  --thumb-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  --tile: #1d1d1f;
  --tile-owl: #4a4a4f;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 28px 56px -28px rgba(0, 0, 0, 0.22);
  --shadow-bar: 0 12px 32px -12px rgba(0, 0, 0, 0.22);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%2348484c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='4.5' width='14' height='12.5' rx='2' fill='none' stroke='%2348484c' stroke-width='1.6'/%3E%3Cpath d='M3 8.5h14M7 2.8v3.4M13 2.8v3.4' stroke='%2348484c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");

  --out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 14 14 6M8 6h6v6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --r-card: 28px;
  --r-field: 12px;
  --wrap: 1120px;
  --measure: 680px;
  --gutter: 16px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glide: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Dark theme: only when the header switch picked it (data-theme="dark" on <html>). Light is the default for everyone. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #0e0e10;
  --surface: #1c1c1e;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-solid: #2c2c2e;
  --line: #333336;
  --field-line: #8e8e93;
  --ink: #f5f5f7;
  --ink-2: #c7c7cc;
  --ink-3: #98989d;
  --owl: #8e8e93;
  --btn: #f5f5f7;
  --btn-ink: #1d1d1f;
  --btn-hover: #d9d9de;
  --thumb: #636366;
  --thumb-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  --tile: #2c2c2e;
  --tile-owl: #6e6e73;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 28px 56px -28px rgba(0, 0, 0, 0.9);
  --shadow-bar: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px -12px rgba(0, 0, 0, 0.8);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%23c7c7cc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='4.5' width='14' height='12.5' rx='2' fill='none' stroke='%23c7c7cc' stroke-width='1.6'/%3E%3Cpath d='M3 8.5h14M7 2.8v3.4M13 2.8v3.4' stroke='%23c7c7cc' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-color: color-mix(in srgb, var(--ink) 28%, transparent) transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.01em;
  caret-color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
@media (hover: hover) { a:hover { text-decoration-thickness: 2px; } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.nowrap { white-space: nowrap; }
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--btn); color: var(--btn-ink); padding: 8px 16px; border-radius: 999px; font-weight: 600; z-index: 40; text-decoration: none; }
.skip:focus { top: 12px; }
/* one container for everything: the header, the calculator, the day panel, the guide and the footer share its two edges */
@media (min-width: 760px) { :root { --gutter: 32px; } }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
/* reading text keeps a comfortable line length and starts on the container's left edge */
.measure { width: min(var(--measure), 100% - 2 * var(--gutter)); margin-left: max(var(--gutter), (100% - var(--wrap)) / 2); margin-right: auto; }

/* ---------- header ---------- */

.site-header { background: var(--bg-2); }
.site-header .wrap { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; flex: none; color: var(--owl); }
.header-end { display: flex; align-items: center; gap: 2px; }
.site-nav { display: flex; gap: 2px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; padding: 8px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
@media (hover: hover) { .site-nav a:hover { color: var(--ink); background: var(--fill); } }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* light / dark switch: a moon in the light theme, a sun in the dark one */
/* the glyph lines up with the container edge; the round hit area spills outside it */
.theme-toggle { margin-right: -10px; width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background 0.2s, color 0.2s; }
@media (hover: hover) { .theme-toggle:hover { background: var(--fill); color: var(--ink); } }
.theme-toggle svg { grid-area: 1 / 1; width: 19px; height: 19px; transition: transform 0.5s var(--ease), opacity 0.3s; }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* ---------- hero: the name and the formula, then the calculator ---------- */

.hero { background: var(--bg-2); padding: 48px 0 88px; }
.hero-inner { display: grid; justify-items: start; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); letter-spacing: -0.035em; line-height: 1.02; }
.answer { margin-top: 16px; max-width: 46ch; font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.5; color: var(--ink-2); }
.answer strong { color: var(--ink); }
/* each sentence wraps on its own, in even lines */
.answer .sent { display: inline-block; text-wrap: balance; }
.answer .mult { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--ot); text-decoration-thickness: 3px; text-underline-offset: 0.2em; text-decoration-skip-ink: none; }
.hero-stage { margin-top: 36px; }

/* ---------- card ---------- */

.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); }

/* ---------- the calculator: one sentence in, one answer out ---------- */

/* inputs on the left, the answer on the right; stacked below 960px */
.calc { overflow: hidden; }
.calc-in { padding: 36px 48px 32px; container-type: inline-size; }
.ask-line { font-family: var(--font-display); font-size: clamp(1.45rem, 3.2vw, 2.05rem); font-size: clamp(1.45rem, 6.4cqi, 2.1rem); font-weight: 600; line-height: 1.7; letter-spacing: -0.02em; color: var(--ink-3); text-wrap: balance; }
/* the blanks: an inline field on an underline that darkens and thickens on focus */
/* each clause stays on one line when it fits */
.ask-line .clause { display: inline-block; }
.blank { position: relative; display: inline-flex; align-items: baseline; margin: 0 3px; color: var(--ink); }
.blank.money::before { content: "$"; margin-right: 1px; color: var(--ink-3); }
.blank-input { width: 3.6ch; min-width: 2ch; max-width: 10ch; padding: 0 3px 2px; border: 0; border-radius: 0; background: transparent; font: inherit; color: var(--ink); text-align: center; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.blank::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.2em; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 26%, transparent); transform-origin: bottom; transition: background 0.2s, transform 0.3s var(--ease); }
@media (hover: hover) { .blank:hover::after { background: var(--ink-3); } }
.blank:focus-within::after { background: var(--ink); transform: scaleY(1.5); }
.blank-input:focus-visible { outline: none; }
/* the pay period reads as part of the sentence: no box, the same underline, a small chevron */
.blank.pick::before { content: ""; position: absolute; right: 3px; top: 50%; width: 0.4em; height: 0.4em; margin-top: -0.22em; background: var(--ink-3); -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat; pointer-events: none; }
.blank-select { appearance: none; -webkit-appearance: none; min-width: 0; margin: 0; padding: 0 0.6em 2px 3px; border: 0; border-radius: 0; background: transparent; font: inherit; color: var(--ink); letter-spacing: -0.02em; cursor: pointer; field-sizing: content; }
.blank-select:focus-visible { outline: none; }
#pay-hint b { color: var(--ink); font-weight: 600; }
/* "9 hours a day for 5 days this week", "45 hours this week", or the day table's total */
.ask[data-by="week"] .days-clause, .ask[data-by="each"] .days-clause { display: none; }
/* the day table's total and its menu may sit on separate lines on the smallest phones */
.ask[data-by="each"] .clause .nowrap { white-space: normal; }
/* a salary's schedule: small blanks at reading size (16px, so phones do not zoom in) */
.sched { margin-top: 12px; font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.mini { position: relative; display: inline-block; margin: 0 2px; }
.mini-input { width: 2.6ch; padding: 0 2px 1px; font-weight: 600; box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--ink) 30%, transparent); transition: box-shadow 0.2s; }
.mini-input:focus-visible { box-shadow: inset 0 -2px 0 var(--ink); }
.sched-total { color: var(--ink-3); white-space: nowrap; }
.blank-input::placeholder { color: color-mix(in srgb, var(--ink) 28%, transparent); opacity: 1; }
.blank-input[aria-invalid="true"] { text-decoration: underline wavy var(--ink-2) 1px; text-underline-offset: 0.32em; }
.blank-input[readonly] { color: var(--ink-2); }
.ask .field-msg, .ask .hint { margin-top: 4px; }
.ask-rule { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ask-rule .label { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); }
.ask-rule .seg { min-width: min(300px, 100%); }
.more { margin-top: 22px; }
.more-hint { margin-bottom: 12px; font-size: 0.92rem; color: var(--ink-3); }
@media (min-width: 960px), (max-width: 560px) {
  .ask-rule { display: grid; justify-content: stretch; gap: 10px; }
  .ask-rule .seg { width: 100%; }
}
@media (max-width: 560px) { .more .btn { width: 100%; } .more-hint { display: none; } }
.note { margin-top: 16px; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); background: var(--fill); border-radius: 12px; padding: 11px 13px; }
.note:empty { display: none; }

.result { padding: 32px 48px 36px; border-top: 1px solid var(--line); container-type: inline-size; }
@media (min-width: 960px) {
  .calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the day-by-day button sits on the bottom row with Save week */
  .calc-in { display: flex; flex-direction: column; padding: 48px 48px 40px; }
  .more { margin-top: auto; padding-top: 24px; }
  .result { border-top: 0; border-left: 1px solid var(--line); padding: 44px 48px 40px; }
}
.result-head { display: grid; gap: 6px; }
.result-label { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; color: var(--ink-3); }
.pill { padding: 2px 9px; border-radius: 999px; background: var(--fill); color: var(--ink-2); font-size: 0.75rem; font-weight: 600; line-height: 1.5; }
.gross { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.25rem, 7.4vw, 5.25rem); font-size: clamp(2.75rem, 16cqi, 5.25rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
/* rolling digits: each digit is a column of 0-9 that slides to its value */
.roll { display: inline-flex; vertical-align: top; }
.roll .c { display: inline-block; height: 1.08em; line-height: 1.08em; overflow: hidden; }
.roll .d { display: block; transition: transform 760ms var(--ease); will-change: transform; }
.roll.still .d { transition: none; }
.roll .d > span { display: block; height: 1.08em; }
.result-sub { font-size: 1.02rem; line-height: 1.45; color: var(--ink-2); }
.result-sub b { color: var(--ink); font-weight: 600; }
.result .wk-track { margin: 26px 0 12px; }
.strip-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-bottom: 18px; font-size: 0.86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.strip-legend:empty { display: none; }
.strip-legend span { display: inline-flex; align-items: center; }
.rows { margin: 0; display: grid; }
.rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows dt { color: var(--ink-2); }
.rows dt b { color: var(--ink); font-weight: 600; }
.rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the math waits behind one toggle */
.how { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; color: var(--ink); }
.how summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .how summary:hover { color: var(--ink-2); } }
.how summary svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: transform 0.3s var(--ease); }
.how[open] summary svg { transform: rotate(45deg); }
.result-actions { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* the glyph lines up with the card's text edge; the round hit area spills into the padding */
.icon-only { width: 44px; padding: 0; margin-left: auto; margin-right: -13px; }
.trust { margin: 18px 0 0; font-size: 0.82rem; color: var(--ink-3); text-wrap: balance; }

/* dots: the key between a dollar row and its color on the strip */
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.sw-reg { background: var(--reg); } .sw-ot { background: var(--ot); } .sw-dt { background: var(--dt); }

/* undo, offered right where a destructive action happened */
.undo { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.92rem; color: var(--ink-2); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 2px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 0.22em; cursor: pointer; }
@media (hover: hover) { .link-btn:hover { text-decoration-thickness: 2px; } }
.link-btn.quiet { color: var(--ink-2); font-weight: 500; text-decoration: none; }
@media (hover: hover) { .link-btn.quiet:hover { color: var(--ink); } }
.link-btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- fields ---------- */

.field { display: grid; gap: 8px; min-width: 0; }
.field > span:not(.input-money) { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; min-width: 0; min-height: 48px;
  font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-field);
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
@media (hover: hover) { .input:hover { border-color: var(--ink-2); } }
.input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 13%, transparent); }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input[readonly] { background: var(--fill-solid); border-style: dashed; }
.input[aria-invalid="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.input-money { position: relative; display: block; }
.input-money .input { padding-left: 28px; }
.input-money::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; pointer-events: none; }
.input-suffix { position: relative; display: block; }
.input-suffix .input { padding-right: 52px; }
.input-suffix::after { content: attr(data-suffix); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 0.95rem; pointer-events: none; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; cursor: pointer; }
input[type="date"].input::-webkit-calendar-picker-indicator { width: 18px; height: 18px; background: var(--calendar) center / 18px no-repeat; color: transparent; opacity: 1; cursor: pointer; }
.field-msg { font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.field-msg:empty { display: none; }
.hint { font-size: 0.85rem; color: var(--ink-3); }

/* segmented control: a white thumb slides to the chosen option */
.seg { --i: 0; --n: 2; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; margin: 0; border: 0; min-width: 0; background: var(--fill); border-radius: 11px; }
.seg::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 8px; background: var(--thumb); box-shadow: var(--thumb-shadow); transform: translateX(calc(var(--i) * 100%)); transition: transform 420ms var(--glide); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { position: relative; z-index: 1; display: grid; place-items: center; min-height: 40px; padding: 6px 16px; border-radius: 8px; font-size: 0.95rem; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: color 0.2s; }
@media (hover: hover) { .seg label:hover { color: var(--ink); } }
.seg input:checked + label { color: var(--ink); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 1px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  font: inherit; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
  color: var(--ink); background: transparent;
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn, .seg label, .copy-prev, .link-btn, .theme-toggle, .toc a, summary, .blank-select { -webkit-tap-highlight-color: transparent; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-outline { border-color: color-mix(in srgb, var(--ink) 24%, transparent); }
@media (hover: hover) { .btn-outline:hover { background: var(--fill); } }
.btn-quiet { color: var(--ink-2); }
@media (hover: hover) { .btn-quiet:hover { background: var(--fill); color: var(--ink); } }
.btn-primary, .btn-ink { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
@media (hover: hover) { .btn-primary:hover, .btn-ink:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); } }
.btn-block { width: 100%; }

/* ---------- strips: the week, measured ---------- */

.track { position: relative; height: 10px; border-radius: 999px; background: var(--fill); }
/* compositor-only motion: the strip's end is a rounded clip, each color a bar scaled from the left, seams slide */
.strip { --t: 0; position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc((1 - var(--t)) * 100%) 0 0 round 999px); transition: clip-path 760ms var(--ease); }
.strip i { --x: 0; position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--x)); transition: transform 760ms var(--ease); }
.strip .s-reg { background: var(--reg); }
.strip .s-ot { background: var(--ot); }
.strip .s-dt { background: var(--dt); }
.strip .seam { background: none; transform: translateX(calc(var(--x) * 100%)); transition: transform 760ms var(--ease), opacity 0.3s; }
.strip .seam::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--surface); }
.track .tick { position: absolute; top: -7px; bottom: -7px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.track .tick-label { position: absolute; top: calc(100% + 6px); left: 1px; transform: translateX(-50%); font-size: 0.75rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.track .threshold { position: absolute; top: -3px; bottom: -3px; width: 1px; background: color-mix(in srgb, var(--ink) 32%, transparent); }
.wk-track { height: 12px; margin: 28px 0 34px; }

/* ---------- day-by-day panel ---------- */

.days-section { background: var(--bg-2); padding-bottom: 80px; }
.days-card { padding: 40px 48px 36px; animation: rise 600ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.days-head { display: grid; gap: 6px; }
.days-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.days-head p { color: var(--ink-3); }
.days-head .link-btn { justify-self: start; margin-top: 2px; }
.days-settings { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: end; gap: 14px 18px; }
.days-settings .field { width: min(200px, 100%); }
.days-settings .seg { display: inline-grid; }
.check { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--ink); }

.days-sticky { position: sticky; top: 0; z-index: 3; margin: 22px -48px 0; padding: 12px 48px 0; background: var(--surface); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.88rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend .k-reg { background: var(--reg); } .legend .k-ot { background: var(--ot); } .legend .k-dt { background: var(--dt); }
.legend .k-night { width: 16px; height: 16px; border-radius: 0; display: inline-grid; place-items: center; color: var(--ink-2); }
.legend .k-night svg { width: 16px; height: 16px; }

.days-header, .day {
  display: grid; align-items: center;
  grid-template-columns: 120px minmax(0, 1fr) minmax(180px, 0.5fr);
  gap: 8px 14px;
}
.days-header { margin-top: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; color: var(--ink-3); }
.days-header .sm { display: none; }
.days-header .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.days-header .cols.hours-mode { grid-template-columns: minmax(0, 1fr); }
.days-header .cols.adv { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.days-header .cols.hours-mode.adv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.days { list-style: none; margin: 0; padding: 0; }
.day { padding: 11px 0; border-bottom: 1px solid var(--line); }
.day-name { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.day-name .dn { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; white-space: nowrap; }
.day-name .dn small { font-family: var(--font); font-weight: 500; font-size: 0.78rem; color: var(--ink-3); }
.day.is-seventh .dn small { display: none; }
.day-name .flag { align-self: center; font-size: 0.72rem; font-weight: 600; background: var(--btn); color: var(--btn-ink); padding: 2px 8px; border-radius: 999px; }
.copy-prev { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.82rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; cursor: pointer; transition: color 0.2s; }
@media (hover: hover) { .copy-prev:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.22em; } }
.copy-prev svg { width: 14px; height: 14px; flex: none; }
.day-inputs { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.day-inputs.hours-mode { grid-template-columns: minmax(0, 1fr); }
.day-inputs.adv { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.day-inputs.hours-mode.adv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.day-inputs .input { min-height: 44px; padding: 8px 10px; font-size: 1rem; border-radius: 10px; }
.day-inputs .input-money .input { padding-left: 24px; }
.day-inputs .input-money::before { left: 10px; }
.day-inputs input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.day-inputs input[type="time"] { -webkit-appearance: none; appearance: none; }
.day-inputs input[type="time"]::-webkit-date-and-time-value { text-align: left; }
.day-inputs.adv .input { padding-inline: 8px; }
.day-inputs.adv .input-money .input { padding-left: 21px; }
.day-inputs.adv .input-money::before { left: 9px; }
.mini-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.day-hours { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.day-hours .track { height: 8px; }
.day-hours .h { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 4em; font-weight: 600; font-variant-numeric: tabular-nums; }
.day-hours .h.off { color: var(--ink-3); font-weight: 500; }
.day-hours .moon { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
.day-msg { grid-column: 2 / -1; font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-top: -2px; }
.day-msg:empty { display: none; }
.days-foot { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.days-foot .total { font-weight: 500; color: var(--ink-2); }
.days-foot .total b { color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.days-foot .undo { flex-basis: 100%; margin-top: 0; }
.days-foot .btn-quiet { margin-left: auto; margin-right: -21px; }

/* different rates: the strip moves under the inputs */
.days-card.is-adv .days-header, .days-card.is-adv .day { grid-template-columns: 120px minmax(0, 1fr); }
.days-card.is-adv .days-header .h-col { display: none; }
.days-card.is-adv .day-hours { grid-column: 2; }

/* ---------- the math, inside the card ---------- */

.steps { list-style: none; margin: 0; padding: 0 0 8px; }
.step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; padding: 12px 0; }
.step .key { width: 28px; height: 28px; margin: 0; font-size: 0.8rem; color: var(--ink); border-width: 1.5px; grid-row: span 3; }
.step h3 { font-size: 1rem; letter-spacing: -0.01em; }
.step .calc-line { margin-top: 2px; font-size: 0.95rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.step .calc-line b { font-weight: 700; }
.step .why { margin-top: 2px; color: var(--ink-3); font-size: 0.88rem; }
.key { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border: 1px solid currentColor; border-radius: 50%; font-size: 0.7rem; font-weight: 600; line-height: 1; color: var(--ink-3); text-decoration: none; }

/* ---------- saved weeks: the list appears once a week is saved ---------- */

.saved { padding: 72px 0 8px; }
.saved h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); letter-spacing: -0.025em; }
.section-intro { margin-top: 10px; color: var(--ink-3); font-size: 1rem; }
.saved-list { list-style: none; margin: 18px 0 0; padding: 0; }
.saved-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.saved-list .meta { color: var(--ink-3); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.saved-actions { margin-top: 18px; }

/* ---------- guide ---------- */

.guide { background: var(--bg-2); padding: 96px 0 104px; }
.prose h2 { margin-top: 64px; font-size: 1.75rem; letter-spacing: -0.022em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; font-size: 1.2rem; }
.prose p, .prose ul, .prose ol, .prose table { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.prose td.rate { font-weight: 700; white-space: nowrap; }
.example-box { margin-top: 18px; padding: 22px 26px; background: var(--surface); border-radius: 18px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); font-variant-numeric: tabular-nums; }
.prose .example-box > p:first-child { margin-top: 0; }
.prose .example-box p + p { margin-top: 6px; }
.faq { margin-top: 20px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.06rem; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; flex: none; transition: transform 0.3s var(--ease); color: var(--ink-3); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }
/* sources: kept for trust and search, set quiet like footnotes */
.prose #sources { margin-top: 64px; font-size: 1.15rem; letter-spacing: -0.015em; }
.prose .sources { list-style: none; margin-top: 12px; padding-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; font-size: 0.9rem; line-height: 1.45; }
.prose .sources li + li { margin-top: 0; }
.sources li { overflow-wrap: anywhere; color: var(--ink-3); }
.sources a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.sources a::after { content: ""; display: inline-block; width: 0.78em; height: 0.78em; margin-left: 4px; vertical-align: -0.04em; background: currentColor; opacity: 0.6; -webkit-mask: var(--out) center / contain no-repeat; mask: var(--out) center / contain no-repeat; }
@media (hover: hover) { .sources a:hover { color: var(--ink); text-decoration: underline; } }
.updated { margin-top: 18px; color: var(--ink-3); font-size: 0.86rem; }
@media (max-width: 640px) { .prose .sources { grid-template-columns: minmax(0, 1fr); } }
.disclaimer { margin-top: 20px; padding: 18px 22px; background: var(--surface); border-radius: 16px; color: var(--ink-2); font-size: 0.93rem; }

/* ---------- footer ---------- */

.site-footer { background: var(--bg); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.88rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 56px; padding-block: 48px 36px; }
.footer-brand { display: grid; gap: 12px; max-width: 38ch; align-content: start; }
.footer-brand .brand { justify-self: start; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 28px 64px; }
.footer-nav div { display: grid; gap: 9px; align-content: start; }
.footer-h { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.footer-nav a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
@media (hover: hover) { .footer-nav a:hover { color: var(--ink); text-decoration: underline; } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 18px 40px; border-top: 1px solid var(--line); font-size: 0.8rem; }

/* ---------- simple pages: the same light canvas carries the title ---------- */

.page-band { background: var(--bg-2); padding: 56px 0 64px; }
.page-band h1 { font-size: clamp(2.4rem, 5.6vw, 3.75rem); letter-spacing: -0.035em; }
.page .prose { padding-block: 56px 88px; }
.notfound { padding-block: 72px 104px; text-align: center; }
.notfound svg { width: 104px; height: 104px; color: var(--owl); }
.notfound h1 { margin-top: 18px; font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; }
.notfound p { margin: 14px auto 0; max-width: 46ch; color: var(--ink-2); }
.notfound .btn { margin-top: 24px; }

/* ---------- pay bar: the total and its strip stay in reach while the result is off screen ---------- */

.pay-bar {
  position: fixed; z-index: 30; left: 50%; bottom: 18px;
  width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 16px;
  padding: 10px 10px 10px 22px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-radius: 22px; box-shadow: var(--shadow-bar);
  transform: translate(-50%, calc(100% + 36px)); visibility: hidden;
  transition: transform 420ms var(--ease), visibility 0s linear 420ms;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .pay-bar { background: var(--surface); } }
.pay-bar.show { transform: translate(-50%, 0); visibility: visible; transition: transform 420ms var(--ease), visibility 0s; }
.pay-bar .pb-text { flex: 1; min-width: 0; }
.pay-bar .pb-label { display: block; font-size: 0.78rem; line-height: 1.2; color: var(--ink-3); }
.pay-bar .pb-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.pay-bar .pb-gross { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.pay-bar .pb-ot { color: var(--ink-2); font-size: 0.88rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.pb-track { height: 6px; margin-top: 7px; }
.pb-track .strip .seam::before { left: -0.5px; width: 1px; }
.pb-track .tick { top: -3px; bottom: -3px; }

/* ---------- motion and detail ---------- */

@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.86); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.08); } }
@keyframes tick { to { transform: rotate(360deg); } }
@keyframes flash { from { background-color: var(--fill); } }

/* the page arrives in order: title, formula, then the calculator */
html.motion .hero h1, html.motion .page-band h1 { animation: enter 0.8s var(--ease) 0.06s both; }
html.motion .answer { animation: enter 0.8s var(--ease) 0.14s both; }
html.motion .hero-stage { animation: enter 0.9s var(--ease) 0.22s both; }

/* the owl in the header blinks now and then */
.brand .eye { transform-box: fill-box; transform-origin: center; animation: blink 6.5s ease-in-out 2.5s infinite; }

/* first view: the total rolls up from $0, digit by digit, and the strip grows in */
.roll.intro .d { transition-duration: 1.1s; transition-delay: calc(var(--k, 0) * 55ms + 0.3s); }
.strip.intro, .strip.intro i { transition-duration: 1.1s; transition-delay: 0.35s; }

/* below the calculator, each section eases in once as it arrives */
html.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease) var(--d, 0s), transform 0.7s var(--ease) var(--d, 0s); }
html.motion .reveal.in { opacity: 1; transform: none; }
html.motion #steps.reveal { opacity: 1; transform: none; }
html.motion #steps.reveal:not(.in) .step { opacity: 0; }
html.motion #steps.in:not(.settled) .step { animation: enter 0.6s var(--ease) both; animation-delay: calc(var(--n, 0) * 80ms); }
html.motion .faq details[open] > p { animation: enter 0.4s var(--ease) both; }
html.motion .days-section:not([hidden]) .day { animation: enter 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 0.15s); }
.day.flash { animation: flash 1.1s var(--ease); }

/* buttons confirm in place */
.btn.done { pointer-events: none; }
.btn.done svg { animation: pop 0.35s var(--ease) both; }

/* diagrams in the guide, drawn with the calculator's own strip */
.fig { margin: 22px 0 0; padding: 24px 26px 20px; background: var(--surface); border-radius: 18px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.fig-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); }
.fig-head span { text-wrap: balance; }
.fig-head b { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.fig-track { height: 12px; margin: 20px 0 34px; }
.fig figcaption { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fig .strip, .fig .strip i { transition-duration: 1s; transition-delay: 0.25s; }
.fig .strip .s-ot { transition-delay: 0.4s; }
.fig .strip .s-dt { transition-delay: 0.55s; }
html.motion .fig.reveal:not(.in) .strip { clip-path: inset(0 100% 0 0 round 999px); }
html.motion .fig.reveal:not(.in) .strip i { transform: scaleX(0); }

/* the steps read as one line of reasoning */
.step:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 46px; bottom: -10px; width: 1px; background: var(--line); }

/* theme switch: the new theme spreads from the switch as a circle */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal 0.6s var(--ease); }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--vt-x, 100%) var(--vt-y, 0)); } to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 100%) var(--vt-y, 0)); } }

/* guide contents: chips that jump to each part */
.guide-grid .prose { min-width: 0; max-width: var(--measure); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.toc-title { display: none; }
.toc a { padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 0.88rem; font-weight: 500; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); transition: color 0.2s, background 0.2s, transform 0.2s var(--ease); }
@media (hover: hover) { .toc a:hover { color: var(--ink); transform: translateY(-1px); } }
/* wide screens: the contents sit beside the guide and follow along, marking the part being read */
@media (min-width: 1000px) {
  .guide-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) 240px; justify-content: space-between; align-items: start; }
  .guide-grid .prose { grid-column: 1; grid-row: 1; }
  .guide-grid .toc { grid-column: 2; grid-row: 1; position: sticky; top: 32px; display: grid; gap: 0; margin: 0; }
  .toc-title { display: block; margin-bottom: 10px; font-size: 0.8rem; font-weight: 600; color: var(--ink); }
  .toc a { padding: 7px 0 7px 16px; border-radius: 0; background: none; box-shadow: none; border-left: 2px solid var(--line); color: var(--ink-3); transition: color 0.2s, border-color 0.2s; }
  .toc a:hover { color: var(--ink); transform: none; }
  .toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--ink); }
}

/* short windows (a laptop with a browser bar): a tighter hero so the answer shows sooner */
@media (min-width: 760px) and (max-height: 820px) {
  .hero { padding: 30px 0 64px; }
  .hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); }
  .answer { margin-top: 12px; }
  .hero-stage { margin-top: 26px; }
  .calc-in { padding-top: 32px; padding-bottom: 28px; }
  .ask-rule { margin-top: 18px; }
  .result { padding-top: 30px; }
}

/* Lenis smooth scrolling (desktop wheel only) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- responsive ---------- */

@media (max-width: 759px) {
  .pay-bar { left: 0; bottom: 0; width: 100%; border-radius: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); transform: translateY(110%); box-shadow: 0 -1px 0 color-mix(in srgb, var(--ink) 10%, transparent); }
  .pay-bar.show { transform: translateY(0); }

  /* one day per block; the column names live in the pinned bar instead of on every day */
  .day, .days-card.is-adv .day { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .day-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
  .copy-prev { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--fill); font-weight: 600; }
  .copy-prev:hover { text-decoration: none; }
  .day-msg { grid-column: 1; }
  .days-card.is-adv .day-hours { grid-column: auto; }
  .days-header .lg { display: none; }
  .days-header .sm { display: inline; }
  .days-header, .days-card.is-adv .days-header { grid-template-columns: minmax(0, 1fr); }
  .days-header > span:not(.cols) { display: none; }
  .days-header .cols.adv:not(.hours-mode) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .days-header .cols.adv:not(.hours-mode) span:nth-child(n+4) { display: none; }
  .day-inputs.adv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day-inputs.adv:not(.hours-mode) .field:nth-child(n+4) .mini-label { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  /* phones: the sentence and the answer reach the first screen */
  .hero { padding: 26px 0 52px; }
  .hero h1 { font-size: 2.4rem; }
  .answer { margin-top: 12px; font-size: 0.98rem; }
  .hero-stage { margin-top: 24px; }
  .card { border-radius: 24px; }
  .calc-in { padding: 24px 20px 20px; }
  .ask-line { font-size: 1.42rem; line-height: 1.75; }
  .ask-rule { margin-top: 18px; }
  .more { margin-top: 16px; }
  .result { padding: 24px 20px 22px; }
  .result-actions .btn-outline { flex: 1 1 auto; }
  .prose .example-box, .prose .fig, .prose .disclaimer { padding-inline: 20px; }
  .days-card { padding: 24px 20px 20px; }
  .days-sticky { margin-inline: -20px; padding-inline: 20px; }
  .days-foot .btn-quiet { margin-right: -16px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand svg { width: 26px; height: 26px; }
  .site-nav a { padding: 8px 10px; }
  .guide { padding-block: 72px 80px; }
  .day-inputs, .days-header .cols, .day-inputs.adv:not(.hours-mode), .days-header .cols.adv:not(.hours-mode) { gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.75fr); }
  .day-inputs.hours-mode, .days-header .cols.hours-mode { grid-template-columns: minmax(0, 1fr); }
  .day-inputs.hours-mode.adv, .days-header .cols.hours-mode.adv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day-inputs .input { padding-inline: 8px; font-size: 1rem; }
  .toc a { padding: 9px 14px; }
  .footer-nav div { gap: 0; }
  .footer-nav a { padding-block: 10px; }
  .footer-h { margin-bottom: 4px; }
}
/* narrow phones: the header keeps the other page's link, the switch and the logo */
@media (max-width: 430px) {
  .site-header .wrap { gap: 8px; }
  .site-nav a[aria-current="page"] { display: none; }
}
/* the smallest phones: tighter day cards, so times like 10:00 PM still fit */
@media (max-width: 360px) {
  .days-card { padding-inline: 16px; }
  .days-sticky { margin-inline: -16px; padding-inline: 16px; }
  .day-inputs, .days-header .cols, .day-inputs.adv:not(.hours-mode), .days-header .cols.adv:not(.hours-mode) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.6fr); }
  .day-inputs .input { padding-inline: 6px; }
}

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

/* ---------- print ---------- */

@media print {
  :root, :root[data-theme] {
    color-scheme: light;
    --bg: #fff; --bg-2: #fff; --surface: #fff; --fill: #eee; --fill-solid: #f3f3f3; --line: #d5d5da; --field-line: #888;
    --ink: #000; --ink-2: #333; --ink-3: #555; --owl: #1d1d1f; --btn: #1d1d1f; --btn-ink: #fff;
    --shadow-card: none;
  }
  body { background: #fff; color: #000; font-size: 11pt; }
  .header-end, .answer, .more, .result-actions, .how summary, .trust, .undo, .saved, .guide, .site-footer, .skip, .pay-bar, .copy-prev, .days-foot .btn, .days-settings, .days-head .link-btn { display: none !important; }
  .hero { padding: 0 0 12px; }
  .hero-stage { margin-top: 12px; }
  .card { border: 1px solid #bbb; }
  .days-sticky { position: static; }
  .days-card { animation: none; }
  .reveal, #steps .step { opacity: 1 !important; transform: none !important; animation: none !important; }
  .strip, .strip i, .legend i, .sw { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000; }
}
