/* TipTaxTracker — prep steel and thermal slip.
   Ground is prep steel; every record surface is a thermal slip. Money is
   colored by channel (in hand green, card blue, tip-out amber) only on slip
   surfaces, where each color clears 4.5:1. "Tips to report" is always ink.
   Fonts are self-hosted subsets (see assets/fonts/LICENSES.txt). */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/atkinson-next-subset-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/barlow-condensed-600-subset.woff2') format('woff2');
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/assets/fonts/martian-mono-subset-var.woff2') format('woff2');
}

:root {
  --steel: #E9ECEF;
  --steel-2: #DDE1E6;
  --steel-3: #C3CAD3;
  --rail-hi: #FFFFFF;
  --rail-mid: #BCC4CE;
  --rail-lo: #9AA4B1;
  --slip: #FCFCF9;
  --ink: #172033;
  --ink-2: #4A5468;
  --on-ink: #FCFCF9;
  --green: #1F7A4D;
  --blue: #2B5CB8;
  --amber: #9A5800;
  --alert: #A3261B;
  --rule: rgba(23, 32, 51, .26);
  --rule-strong: rgba(23, 32, 51, .56);
  --shade: rgba(23, 32, 51, .13);
  --bar-track: #DDE1E6;
  --readout: #172033;
  --readout-text: #FCFCF9;
  --readout-muted: #C3CAD3;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --body: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 6px;
  --maxw: 1240px;
  --tap: 44px;
  --tabs-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --steel: #0F141C;
    --steel-2: #161D27;
    --steel-3: #2C3644;
    --rail-hi: #5B6676;
    --rail-mid: #323C4A;
    --rail-lo: #1E2631;
    --slip: #18202B;
    --ink: #E6EAF0;
    --ink-2: #A3AEBF;
    --on-ink: #0F141C;
    --green: #5CC08A;
    --blue: #7FA6F0;
    --amber: #E3A04A;
    --alert: #FF9C8F;
    --rule: rgba(230, 234, 240, .26);
    --rule-strong: rgba(230, 234, 240, .45);
    --shade: rgba(0, 0, 0, .5);
    --bar-track: #2C3644;
    --readout: #05080C;
    --readout-text: #E6EAF0;
    --readout-muted: #A3AEBF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --steel: #0F141C;
  --steel-2: #161D27;
  --steel-3: #2C3644;
  --rail-hi: #5B6676;
  --rail-mid: #323C4A;
  --rail-lo: #1E2631;
  --slip: #18202B;
  --ink: #E6EAF0;
  --ink-2: #A3AEBF;
  --on-ink: #0F141C;
  --green: #5CC08A;
  --blue: #7FA6F0;
  --amber: #E3A04A;
  --alert: #FF9C8F;
  --rule: rgba(230, 234, 240, .26);
  --rule-strong: rgba(230, 234, 240, .45);
  --shade: rgba(0, 0, 0, .5);
  --bar-track: #2C3644;
  --readout: #05080C;
  --readout-text: #E6EAF0;
  --readout-muted: #A3AEBF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100%, var(--maxw)); margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 780px; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.1; text-wrap: balance; }
h1 { font: 600 clamp(1.9rem, 4.2vw, 2.6rem)/1.05 var(--display); text-transform: uppercase; letter-spacing: .03em; }
h2 { font: 600 1.45rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .05em; }
h3 { font: 700 1.05rem/1.25 var(--body); }
p { margin: 0 0 1em; }
.lede { max-width: 60ch; color: var(--ink-2); font-size: 1.06rem; }
.eyebrow, .cap {
  margin: 0 0 .6em;
  color: var(--ink-2);
  font: 600 .95rem/1.2 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.small { color: var(--ink-2); font-size: .9rem; }
.money, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.optional { color: var(--ink-2); font-weight: 400; letter-spacing: 0; text-transform: none; }
.g { color: var(--green); }
.b { color: var(--blue); }
.a { color: var(--amber); }

/* ---------- Top bar ---------- */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 4px 16px;
  background: var(--steel);
  border-bottom: 1px solid var(--steel-3);
}
.brand {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font: 600 1.35rem/1 var(--display);
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 18px; height: 22px; flex: none; }
.bar-nav { display: none; }
.pill {
  margin-left: auto;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}
.pill > span {
  display: inline-flex;
  align-items: stretch;
  min-height: 32px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--slip);
}
.pill .tag {
  display: flex;
  align-items: center;
  padding: 0 8px 0 10px;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 .85rem/1 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pill .act { display: flex; align-items: center; padding: 0 11px 0 8px; font-size: 1rem; font-weight: 700; white-space: nowrap; }
.pill .act-short { display: none; }

/* ---------- Bottom tab bar (phones) ---------- */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: var(--slip);
  border-top: 1px solid var(--steel-3);
  box-shadow: 0 -6px 16px -10px var(--shade);
}
.tabs a {
  position: relative;
  min-height: var(--tabs-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-2);
  font: 600 1rem/1 var(--display);
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--ink);
}

/* ---------- Home: the app ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; width: min(100%, var(--maxw)); margin-inline: auto; padding: 16px 16px 8px; }
.app-right { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; min-width: 0; }
.sec-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 10px;
  color: var(--ink-2);
  font: 600 1rem/1.1 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sec-label small { font: 400 .85rem/1.2 var(--body); letter-spacing: 0; text-transform: none; }

/* The close-out slip */
.slip-col { display: flex; justify-content: center; min-width: 0; }
.slip-wrap { width: 100%; max-width: 440px; filter: drop-shadow(0 1px 0 var(--shade)) drop-shadow(0 10px 16px var(--shade)); }
.slip {
  position: relative;
  margin-top: 11px;
  padding: 14px 16px 16px;
  border-radius: 0 0 5px 5px;
  background: var(--slip);
}
.slip::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  height: 12px;
  background: var(--slip);
  clip-path: polygon(0% 100%, 0% 0%, 2.8% 67%, 4.3% 22%, 6.5% 68%, 9% 23%, 11.1% 82%, 13.4% 25%, 15% 70%, 17.4% 21%, 18.6% 82%, 20.6% 28%, 23.3% 60%, 25.3% 28%, 27.7% 81%, 29.9% 27%, 32.8% 70%, 34.5% 25%, 36.2% 61%, 37.9% 13%, 39.6% 92%, 41.7% 22%, 44.5% 57%, 46.1% 17%, 48.2% 72%, 49.6% 27%, 50.8% 70%, 52.6% 20%, 55.5% 76%, 56.9% 12%, 58.5% 70%, 60.4% 10%, 62.5% 80%, 64.1% 27%, 66% 90%, 68.3% 19%, 70.4% 75%, 72.8% 28%, 74.7% 83%, 76.3% 18%, 78% 68%, 79.9% 24%, 82.6% 59%, 85.3% 2%, 87.2% 61%, 88.4% 30%, 89.9% 80%, 91.3% 14%, 93.5% 61%, 96.4% 27%, 99.2% 90%, 100% 40%, 100% 100%);
}
.slip-head { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1.5px dashed var(--rule); }
.slip-title { margin: 0; font: 600 1.2rem/1.15 var(--display); letter-spacing: .07em; text-transform: uppercase; }
.slip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 5px 0 0;
  color: var(--ink-2);
  font: 500 .74rem/1.35 var(--mono);
  font-stretch: 75%;
  letter-spacing: .02em;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.chips legend { padding: 0; margin: 0 0 6px; }
.chip {
  min-height: var(--tap);
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  overflow: hidden;
  border: 1.5px solid var(--steel-3);
  border-radius: 999px;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.chip[aria-pressed="true"]::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--on-ink); }
.job-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }

.mfields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mfield {
  --c: var(--ink);
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px 9px;
  border: 1.5px solid var(--rule);
  border-top: 4px solid var(--c);
  border-radius: 4px 4px 6px 6px;
  cursor: text;
}
.mfield.m-hand { --c: var(--green); }
.mfield.m-card { --c: var(--blue); }
.mfield.m-out { --c: var(--amber); }
.mfield:focus-within { outline: 3px solid var(--c); outline-offset: 1px; }
.mlabel { color: var(--c); font: 600 1rem/1.1 var(--display); letter-spacing: .09em; text-transform: uppercase; }
.min { display: flex; align-items: baseline; gap: 3px; min-width: 0; }
.min .u { flex: none; color: var(--c); font: 500 1.15rem/1 var(--mono); white-space: nowrap; }
.min .u.after { order: 2; color: var(--ink-2); font-size: .95rem; }
.mfield input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--c);
  font: 600 1.85rem/1.1 var(--mono);
  letter-spacing: -.02em;
  outline: none;
}
.mfield input::placeholder { color: var(--rule-strong); opacity: 1; }
.mhint { color: var(--ink-2); font-size: .8rem; line-height: 1.3; }

.more {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.more .muted { color: var(--ink-2); font-weight: 400; }
.more svg { flex: none; transition: transform .2s; }
.more[aria-expanded="true"] svg { transform: rotate(45deg); }
.more-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.more-panel .wide { grid-column: 1 / -1; }

.tot { margin-top: 12px; padding-top: 10px; border-top: 1.5px dashed var(--rule); }
.lead { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.lead .k { font: 600 1rem/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.lead .dots { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--rule); transform: translateY(-4px); }
.lead .v { font: 600 1rem/1.2 var(--mono); white-space: nowrap; }
.lead.big .k { font-size: 1.1rem; }
.lead.big .v { font-size: 1.45rem; font-weight: 700; }
.lead + .lead { margin-top: 4px; }
.math { margin: 3px 0 0; color: var(--ink-2); font: 500 .78rem/1.35 var(--mono); font-stretch: 80%; }
.math span { white-space: nowrap; }

.save {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 1.3rem/1 var(--display);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.save .amt { font: 600 1rem/1 var(--mono); letter-spacing: 0; }
.save:active { transform: translateY(1px); }
.save[disabled] { cursor: progress; opacity: .7; }
.slip-note { margin: 10px 0 0; color: var(--ink-2); font-size: .85rem; line-height: 1.4; }
.form-error { margin: 10px 0 0; color: var(--alert); font-weight: 700; font-size: .92rem; }

/* Printed slip after Save */
.printed { font: 500 .9rem/1.55 var(--mono); font-stretch: 85%; }
.pl { display: flex; align-items: baseline; gap: 8px; margin: 0; opacity: 0; transform: translateY(-4px); }
.pl.on { opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
.pl i { flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-4px); }
.pl b { white-space: nowrap; }
.pl.rule { height: 0; margin: 6px 0; border-top: 1.5px dashed var(--rule); }
.pl.strong { font-size: 1.05rem; font-weight: 700; }
.pl.hd { font: 600 1.05rem/1.3 var(--display); letter-spacing: .09em; }
.pl.sm { color: var(--ink-2); }
.printed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.btn-line {
  min-height: var(--tap);
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  font: 600 1rem/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stamp {
  flex: none;
  display: inline-block;
  padding: 5px 9px 4px 11px;
  border: 2.5px solid var(--ink);
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--slip), inset 0 0 0 3.5px var(--ink);
  color: var(--ink);
  font: 600 1.15rem/1 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: rotate(-7deg);
}
.stamp.sm { padding: 4px 7px 3px 9px; font-size: .95rem; }
.printed-actions .stamp { margin-left: auto; }

/* The tape */
.tape-wrap { max-width: 440px; filter: drop-shadow(0 1px 0 var(--shade)) drop-shadow(0 6px 10px var(--shade)); }
.tape { position: relative; margin-bottom: 9px; padding: 12px 14px 14px; background: var(--slip); font-family: var(--mono); font-stretch: 75%; }
.tape::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 9px;
  background: var(--slip);
  clip-path: polygon(0% 0%, 2.5% 100%, 5% 0%, 7.5% 100%, 10% 0%, 12.5% 100%, 15% 0%, 17.5% 100%, 20% 0%, 22.5% 100%, 25% 0%, 27.5% 100%, 30% 0%, 32.5% 100%, 35% 0%, 37.5% 100%, 40% 0%, 42.5% 100%, 45% 0%, 47.5% 100%, 50% 0%, 52.5% 100%, 55% 0%, 57.5% 100%, 60% 0%, 62.5% 100%, 65% 0%, 67.5% 100%, 70% 0%, 72.5% 100%, 75% 0%, 77.5% 100%, 80% 0%, 82.5% 100%, 85% 0%, 87.5% 100%, 90% 0%, 92.5% 100%, 95% 0%, 97.5% 100%, 100% 0%);
}
.tape-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 1.5px dashed var(--rule);
  color: var(--ink-2);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
}
.tape-top span:last-child { text-align: right; }
.trows { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; }
.trow { display: contents; }
.trow > span { padding-top: 7px; white-space: nowrap; }
.tk { color: var(--ink-2); font-size: .76rem; font-weight: 600; letter-spacing: .06em; }
.tv { color: var(--ink); font-size: 1.2rem; font-weight: 700; }
.tm { color: var(--ink-2); font-size: .8rem; font-weight: 500; }
.tr { color: var(--ink); font-size: .92rem; font-weight: 600; text-align: right; }
.trow.lead-row .tv { font-size: 1.45rem; }
.tsub {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-bottom: 1px;
  padding: 1px 0 7px;
  border-bottom: 1px dotted var(--rule);
  font-size: .72rem;
  font-weight: 500;
}
.tsub span { white-space: nowrap; }
.tape-foot { margin: 10px 0 0; padding-top: 10px; border-top: 1.5px dashed var(--rule); font: 400 .9rem/1.4 var(--body); }
.tape-foot .stamp { float: right; margin: 0 0 4px 10px; }
.sample-flag { color: var(--ink); font-weight: 700; }

/* Tools rail */
.rail {
  position: relative;
  z-index: 2;
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--rail-hi) 0%, var(--rail-mid) 48%, var(--rail-lo) 56%, var(--rail-mid) 100%);
  box-shadow: 0 2px 3px var(--shade);
}
.tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: -5px 0 0; padding: 0 2px; list-style: none; }
.tickets li { min-width: 0; }
.ticket {
  height: 100%;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  border-radius: 0 0 4px 4px;
  background: var(--slip);
  box-shadow: 0 1px 0 var(--shade), 0 8px 14px -6px var(--shade);
  color: var(--ink);
  text-decoration: none;
  transform-origin: 50% 0;
}
.tickets li:nth-child(odd) .ticket { transform: rotate(-.6deg); }
.tickets li:nth-child(even) .ticket { transform: rotate(.5deg); }
.ticket:hover { color: var(--ink); transform: none; }
.t-no {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1.5px dashed var(--rule);
  color: var(--ink-2);
  font: 500 .68rem/1.1 var(--mono);
  font-stretch: 75%;
}
.t-name { font: 600 1.1rem/1.05 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.t-ctx { margin-top: 3px; color: var(--ink-2); font-size: .86rem; line-height: 1.3; }
.t-fig { margin-top: auto; padding-top: 10px; font: 700 1.55rem/1 var(--mono); letter-spacing: -.02em; white-space: nowrap; }
.t-fig small { font-size: .9rem; font-weight: 600; letter-spacing: 0; }
.t-unit { margin-top: 3px; color: var(--ink-2); font-size: .82rem; line-height: 1.3; }
.t-go { display: flex; align-items: center; gap: 5px; margin-top: 9px; font: 600 .85rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }

/* About / FAQ */
.about details { border-bottom: 1px solid var(--steel-3); }
.about summary { min-height: var(--tap); padding: 12px 2px; cursor: pointer; font-weight: 700; }
.about details p { max-width: 68ch; margin: 0 0 14px; color: var(--ink-2); }

/* ---------- Shared record surfaces ---------- */
.check {
  position: relative;
  padding: 20px 18px 24px;
  border-radius: 4px 4px 0 0;
  background: var(--slip);
  box-shadow: 0 1px 0 var(--shade), 0 10px 22px -12px var(--shade);
}
.check::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: var(--slip);
  clip-path: polygon(0% 0%, 2.5% 100%, 5% 0%, 7.5% 100%, 10% 0%, 12.5% 100%, 15% 0%, 17.5% 100%, 20% 0%, 22.5% 100%, 25% 0%, 27.5% 100%, 30% 0%, 32.5% 100%, 35% 0%, 37.5% 100%, 40% 0%, 42.5% 100%, 45% 0%, 47.5% 100%, 50% 0%, 52.5% 100%, 55% 0%, 57.5% 100%, 60% 0%, 62.5% 100%, 65% 0%, 67.5% 100%, 70% 0%, 72.5% 100%, 75% 0%, 77.5% 100%, 80% 0%, 82.5% 100%, 85% 0%, 87.5% 100%, 90% 0%, 92.5% 100%, 95% 0%, 97.5% 100%, 100% 0%);
}
.check-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px dashed var(--rule);
}
.check-title, .check-sequence { color: var(--ink-2); font: 600 1rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.check-line { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; font-size: .95rem; }
.check-line .fill { flex: 1; min-width: 18px; border-bottom: 2px dotted var(--rule); transform: translateY(-4px); }
.card { padding: 18px; border-radius: 4px; background: var(--slip); box-shadow: 0 1px 0 var(--shade); }
.card p { color: var(--ink-2); }
.callout { padding: 14px 16px; border-left: 4px solid var(--ink); border-radius: 4px; background: var(--slip); font-size: .95rem; }
.badge {
  display: inline-block;
  margin-right: 7px;
  padding: 3px 8px;
  border: 1px solid var(--steel-3);
  border-radius: 4px;
  background: var(--steel-2);
  color: var(--ink);
  font: 600 .72rem/1.3 var(--mono);
  letter-spacing: .06em;
  vertical-align: .12em;
}

.btn {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  font: 600 1.05rem/1.1 var(--display);
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.btn:hover { color: var(--on-ink); opacity: .92; }
.btn-ghost, .btn-quiet { background: transparent; color: var(--ink); }
.btn-ghost:hover, .btn-quiet:hover { background: var(--steel-2); color: var(--ink); opacity: 1; }
.btn-quiet { border-color: var(--steel-3); }
.btn[disabled] { cursor: not-allowed; opacity: .55; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.field { margin-bottom: 14px; min-width: 0; }
.field label, .field .label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-2);
  font: 600 .98rem/1.2 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 9px 11px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--slip);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.25;
}
.field input[inputmode="decimal"] { font-family: var(--mono); font-weight: 600; }
.field input::placeholder { color: var(--ink-2); opacity: .85; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid var(--rule); outline-offset: 0; }
.field .hint, .hint { margin: 5px 0 0; color: var(--ink-2); font-size: .85rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- Shifts page (/log) ---------- */
.strip {
  position: sticky;
  top: calc(52px + env(safe-area-inset-top, 0px));
  z-index: 30;
  background: var(--readout);
  color: var(--readout-text);
  font-family: var(--mono);
  font-stretch: 75%;
}
.strip .wrap { min-height: 68px; display: grid; grid-template-columns: 92px repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center; padding-block: 8px; }
.strip .stat { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.strip .k { color: var(--readout-muted); font: 600 .78rem/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; }
.strip .v { color: var(--readout-text); font: 700 1.08rem/1.2 var(--mono); font-stretch: 75%; white-space: nowrap; }
#year-select {
  width: 100%;
  min-height: var(--tap);
  margin: 0;
  padding: 6px 20px 6px 6px;
  border: 1px solid var(--readout-muted);
  border-radius: 4px;
  background: var(--readout);
  color: var(--readout-text);
  font: 600 1rem/1.2 var(--mono);
  font-stretch: 75%;
}
.log-intro { display: grid; gap: 6px; padding-top: 22px; }
.log-intro h1 { margin: 0; }
.log-intro > p { max-width: 62ch; margin: 0; color: var(--ink-2); }
.log-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "entry" "records" "settings" "exports";
  gap: 26px;
  padding-top: 20px;
}
.entry-pane { grid-area: entry; }
.records-pane { grid-area: records; min-width: 0; }
.settings-pane { grid-area: settings; padding: 0; }
.exports-pane { grid-area: exports; scroll-margin-top: 140px; }
.records-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1.5px dashed var(--steel-3); }
.records-head h2, .records-head p { margin: 0; }
.form-intro { margin: 0 0 14px; color: var(--ink-2); font-size: .93rem; }
.form-actions .btn { min-width: 150px; }
.settings-pane > summary {
  min-height: var(--tap);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 14px;
  padding: 14px 16px;
  cursor: pointer;
  font: 600 1.1rem/1.2 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.settings-pane > summary span { color: var(--ink-2); font: 400 .86rem/1.3 var(--body); letter-spacing: 0; text-transform: none; }
.settings-pane[open] > summary { border-bottom: 1.5px dashed var(--rule); }
.settings-body { padding: 16px 16px 4px; }
.export-primary { margin: 12px 0 10px; }
.export-secondary { margin-bottom: 12px; }
.exports-pane h2 { margin-bottom: .2em; }
.month-block { margin-bottom: 24px; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 2px; padding-bottom: 6px; border-bottom: 1.5px dashed var(--steel-3); }
.month-head h3 { margin: 0; font: 600 1.05rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.month-head .money { color: var(--ink-2); font-size: .85rem; }
.shift-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  grid-template-areas: "date who money" "detail detail detail" "actions actions actions";
  gap: 2px 8px;
  align-items: center;
  padding: 8px 2px;
  border-bottom: 1px solid var(--steel-3);
  font-size: .95rem;
}
.shift-row .date { grid-area: date; color: var(--ink-2); font: 500 .8rem/1.3 var(--mono); font-stretch: 75%; }
.shift-row .who { grid-area: who; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-row .who .role { color: var(--ink-2); }
.shift-row > .money { grid-area: money; text-align: right; font-size: .9rem; }
.shift-row .detail { grid-area: detail; color: var(--ink-2); font-size: .82rem; }
.shift-row .row-actions { grid-area: actions; display: flex; justify-content: flex-end; gap: 2px; }
.icon-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-2);
  font: 700 1rem/1 var(--body);
}
.icon-btn:hover { background: var(--steel-2); color: var(--ink); }
.empty { padding: 26px 18px; border: 2px dashed var(--steel-3); border-radius: var(--radius); color: var(--ink-2); }
.empty p:last-child { margin-bottom: 0; }
.empty strong { color: var(--ink); }
.report-check { margin-top: 26px; }
.report-empty { margin-top: 26px; }
.report-sample-note { margin: -4px 0 8px; }
.upgrade-note { margin: 10px 0 0; }

/* ---------- W-2 tip check ---------- */
.tool-head { padding-top: 22px; }
.tool-head h1 { margin-bottom: .3em; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 14px; }
.tool-layout > * { min-width: 0; }
.w2-results .callout { margin-top: 14px; }
.w2-results .table-scroll { margin-top: 18px; }
.box-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.box-grid .field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workplace-list { display: grid; gap: 2px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.workplace-list legend { margin-bottom: 5px; padding: 0; color: var(--ink-2); font: 600 .98rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.checkline { min-height: var(--tap); display: flex; align-items: center; gap: 10px; }
.checkline input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--ink); }
.checkline label { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.log-figure { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 10px 0; border-block: 1.5px dashed var(--rule); }
.log-figure .money { font-size: 1.3rem; }
.findings { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.finding { padding: 12px 14px; border-left: 5px solid var(--ink-2); border-radius: 4px; background: var(--slip); box-shadow: 0 1px 0 var(--shade); }
.finding[data-tone="match"] { border-left-color: var(--green); }
.finding[data-tone="differs"] { border-left-color: var(--alert); }
.finding h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 4px; }
.tone { padding: 2px 7px; border: 1.5px solid currentColor; border-radius: 4px; font: 600 .8rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.finding[data-tone="match"] .tone { color: var(--green); }
.finding[data-tone="differs"] .tone { color: var(--alert); }
.finding[data-tone="note"] .tone { color: var(--ink-2); }
.finding p { margin: 0 0 6px; }
.finding ul { margin: 4px 0 6px; padding-left: 1.2em; }
.finding .sources { margin: 0; color: var(--ink-2); font-size: .82rem; }
.table-scroll { overflow-x: auto; }
.month-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.month-table caption { margin-bottom: 6px; text-align: left; }
.month-table th, .month-table td { padding: 6px 6px; border-bottom: 1px solid var(--steel-3); text-align: right; white-space: nowrap; }
.month-table th:first-child, .month-table td:first-child { text-align: left; }
.month-table thead th { color: var(--ink-2); font: 600 .9rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.month-table td { font-family: var(--mono); font-stretch: 85%; }
.sources-list { margin: 0; padding-left: 1.2em; }
.sources-list li { margin-bottom: .5em; }

/* ---------- Monthly statement ---------- */
.st-output { display: grid; gap: 16px; align-content: start; min-width: 0; }
.st-output #st-status { margin: 0; }
.statement-sheet {
  position: relative;
  padding: 20px 18px 22px;
  border-radius: 4px;
  background: var(--slip);
  box-shadow: 0 1px 0 var(--shade), 0 10px 22px -12px var(--shade);
}
.sheet-head { position: relative; margin-bottom: 12px; padding: 0 132px 12px 0; border-bottom: 1.5px dashed var(--rule); }
.sheet-title { margin: 0; font: 600 1.35rem/1.1 var(--display); letter-spacing: .07em; text-transform: uppercase; }
.sheet-sub { margin: 4px 0 0; color: var(--ink-2); font-size: .85rem; }
.sheet-head .stamp { position: absolute; top: 2px; right: 0; }
.sheet-fields { display: grid; gap: 8px; margin: 0 0 12px; }
.sheet-fields > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 10px; align-items: baseline; }
.sheet-fields dt { color: var(--ink-2); font: 600 .92rem/1.2 var(--display); letter-spacing: .07em; text-transform: uppercase; }
.sheet-fields dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.blank-line { min-height: 1.5em; border-bottom: 1.5px solid var(--ink); color: var(--ink-2); font-size: .8rem; }
.sheet-money { padding-top: 10px; border-top: 1.5px dashed var(--rule); }
.sheet-sign { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-top: 36px; }
.sheet-sign span { padding-top: 4px; border-top: 1.5px solid var(--ink); color: var(--ink-2); font-size: .8rem; }
.sheet-due { margin: 14px 0 0; font-weight: 700; }
.st-remind h2 { font-size: 1.2rem; }
.st-remind .btn { margin-top: 6px; }
.due-lines { margin: 0; padding: 0; list-style: none; }
.due-lines li + li { margin-top: 4px; }
.due-lines a { font-weight: 400; }
.due-lines b { white-space: nowrap; }

/* ---------- Prose pages ---------- */
.prose { max-width: 780px; padding-top: 28px; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.guide-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 22px 0; }
.reference-list { display: grid; border-top: 1px solid var(--steel-3); }
.reference-list a {
  min-height: 72px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid var(--steel-3);
  color: var(--ink);
  text-decoration: none;
}
.reference-list a:hover { background: var(--steel-2); color: var(--ink); }
.reference-list strong, .reference-list small { display: block; }
.reference-list small { margin-top: 3px; color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
.rule-ledger { border-block: 1px solid var(--steel-3); }
.rule-row { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--steel-3); }
.rule-row:last-child { border-bottom: 0; }
.rule-row h3, .rule-row p { margin: 0; }
.rule-row p { color: var(--ink-2); }
.legal-copy { min-height: 60vh; }

.error-main { min-height: 60vh; display: grid; place-items: center; padding-block: 40px; }
.error-check { width: min(100%, 540px); }
.error-routes { display: grid; margin-top: 18px; border-top: 1px solid var(--rule); }
.error-routes a { min-height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 2px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.error-routes span { color: var(--ink-2); font-size: .85rem; }

/* ---------- Footer, dialogs, toast ---------- */
.site-foot { margin-top: 48px; padding: 18px 0 22px; border-top: 1px solid var(--steel-3); color: var(--ink-2); font-size: .9rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; }
.foot-row p { margin: 0; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.foot-row nav a { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; color: var(--ink-2); font-size: .875rem; }

dialog { width: min(460px, calc(100% - 32px)); padding: 22px; border: 0; border-radius: var(--radius); background: var(--slip); color: var(--ink); box-shadow: 0 20px 50px var(--shade); }
dialog::backdrop { background: rgba(15, 20, 28, .55); }
dialog h3 { margin-top: 0; }
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: calc(60px + env(safe-area-inset-top, 0px));
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--readout);
  color: var(--readout-text);
  font-size: .92rem;
  text-align: center;
  box-shadow: 0 8px 24px var(--shade);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .2s ease;
}
.toast.show { opacity: 1; }

/* ---------- Wide screens ---------- */
@media (min-width: 700px) {
  .strip .wrap { grid-template-columns: 140px repeat(3, minmax(0, 1fr)); gap: 18px; }
  .log-layout {
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    grid-template-areas: "entry records" "settings records" "exports records";
    align-items: start;
    gap: 22px 32px;
  }
  .shift-row { grid-template-columns: 70px minmax(0, 1fr) 100px auto; grid-template-areas: "date who money actions" "detail detail detail detail"; }
  .rule-row { grid-template-columns: minmax(150px, .36fr) minmax(0, 1fr); gap: 24px; }
  .tool-layout { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); align-items: start; gap: 32px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabs { display: none; }
  .toast { top: auto; bottom: 22px; }
  .bar { min-height: 60px; padding: 0 32px; gap: 28px; }
  .bar-nav { display: flex; align-self: stretch; gap: 4px; }
  .bar-nav a {
    display: flex;
    align-items: center;
    margin-bottom: -1px;
    padding: 0 12px;
    border-bottom: 3px solid transparent;
    color: var(--ink-2);
    font: 600 1.05rem/1 var(--display);
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
  }
  .bar-nav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); }
  .bar-nav a:hover { color: var(--ink); }
  .wrap { padding-inline: 32px; }
  .app { grid-template-columns: 400px minmax(0, 1fr); align-items: start; gap: 40px; padding: 28px 32px 40px; }
  .slip-col { position: sticky; top: 84px; }
  .app-right { align-items: start; gap: 34px 30px; }
  .strip { top: 60px; }
}

@media (min-width: 1200px) {
  .app-right { grid-template-columns: 340px minmax(0, 1fr); }
  .app-right > .about { grid-column: 1 / -1; }
  .tickets { gap: 14px 12px; }
}

@media (max-width: 380px) {
  .pill .act-long { display: none; }
  .pill .act-short { display: inline; }
}

@media (max-width: 360px) {
  .brand { font-size: 1.15rem; }
  .pill .act { padding-right: 8px; }
  .mfield input { font-size: 1.55rem; }
  .strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .box-grid { grid-template-columns: 1fr; }
}

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

@media print {
  .bar, .tabs, .site-foot, .strip, .btn, .btn-row, .row-actions, .pill { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  body[data-app="statement"] .tool-head, body[data-app="statement"] #st-form, body[data-app="statement"] .prose,
  body[data-app="statement"] #st-status, body[data-app="statement"] #st-under, body[data-app="statement"] .st-remind,
  body[data-app="statement"] .toast { display: none !important; }
  body[data-app="statement"] .tool-layout { display: block; padding: 0; }
  .statement-sheet { box-shadow: none; padding: 0; }
}
