/* Daily Micro Tools : "The Ledger, Committed" design system (Theme A, 2026-09-19)
   ---------------------------------------------------------------------------
   POINT OF VIEW: this site is kept by a meticulous person who does your math
   on paper and shows their work. Not a fintech app -- a green ledger book,
   a good pen, and strong opinions about rounding.

   TYPEFACES (each chosen for a job, never defaulted):
   - Zilla Slab (700): display. Chosen for its slab-serif bookkeeping
     character -- the face on ledger covers and old receipts. Used large
     and tight, never polite.
   - Karla: body/UI. Humanist sans with a slightly hand-set feel; keeps long
     explanations readable against the slab display.
   - IBM Plex Mono: every figure on the site. Tabular numerals are a ledger
     non-negotiable -- columns must align or the page is lying.
   - Zilla Slab Highlight (400): margin notes ONLY. The penciled voice of the
     person keeping the book. Never for UI, never for headings.

   PALETTE (four colors, each load-bearing):
   - paper cream #f4f1e6: the page. Warm, never the default #fafafa.
   - ink black #1a1f1a: primary. Headings, header, rules.
   - deep ledger green #1d4a2c: the working color. Buttons, answers, stamps
     of approval. Deepened from the old teal so the green reads as *green*.
   - rubber-stamp red #b3402a: exactly one accent, used sparingly enough that
     each appearance means something (stamps, the double rule under an
     answer, focus). Never decoration.

   MOTIFS (bookkeeping, not decoration):
   - Ruled lines behind everything; paper grain over everything.
   - Double rules where a bookkeeper would put them: under heroes, under
     grand totals (accounting's double-underline), above the footer.
   - Perforation on the featured tool: it tears out of the book.
   - Rubber stamps, slightly rotated: FREE FOREVER means free.
   - Dotted leaders in the wage index, like a table of contents.
   - Hand-drawn underline under the one phrase each page is really about. */

:root {
  --paper: #f4f1e6;
  --paper-deep: #e9e3cd;
  --card: #fbf8ee;
  --ink: #1a1f1a;
  --ink-soft: #2c332c;
  --muted: #5f6659;
  --ledger: #1d4a2c;
  --ledger-deep: #143420;
  --stamp: #b3402a;
  --rule: #d6cfb6;
  --rule-strong: #b3a988;
  --good: #1d4a2c;
  --font-ui: "Karla", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-hand: "Zilla Slab Highlight", "Zilla Slab", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-sm: 3px;
  --r-md: 6px;
  --shadow: 0 1px 2px rgba(26,31,26,.10), 0 10px 26px rgba(26,31,26,.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.62;
  /* the ruling of the ledger page */
  background-image: repeating-linear-gradient(to bottom, transparent 0 30px, rgba(29,74,44,.055) 30px 31px);
}
/* paper grain over everything, barely there */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
::selection { background: var(--ledger); color: #f7f3e4; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 8px; border: 3px solid var(--paper-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--ledger); }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .55em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 700; margin-top: 2em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 72ch; }
a { color: var(--ledger); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* ---- header: the cover of the book ---- */
.site-header { background: var(--ink); color: #ece5cd; border-bottom: 2px double rgba(244,241,230,.45); }
.site-header .wrap { display: flex; align-items: center; gap: 14px; padding-top: 13px; padding-bottom: 13px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 46px; height: 46px; border-radius: 10px; display: block; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.38rem; letter-spacing: 0; line-height: 1.05; color: #f7f3e4; }
.brand-name small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .72rem; color: #b9b198; letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a { color: #ece5cd; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 9px 13px; border-radius: 4px; }
.site-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--stamp); border-radius: 0; }

/* ---- breadcrumb ---- */
.crumbs { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); padding: 16px 0 0; letter-spacing: .02em; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 8px; color: var(--rule-strong); }
.back-link { display: inline-block; margin: 20px 0 0; font-weight: 700; font-size: .95rem; }

/* the dateline: a newspaper byline set *below* the headline (never an eyebrow
   above it). Ruled top and bottom like a ledger entry's date line. */
.dateline {
  display: block; font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  letter-spacing: .02em; color: var(--ink);
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: 10px 2px; margin: 26px 0 0; max-width: 72ch;
}

/* ---- hero ---- */
.hero { padding: 52px 0 46px; border-bottom: 2px double var(--rule-strong); }
.hero h1 { max-width: 15ch; margin-bottom: .35em; }
.hero h1 em.scribble, .scribble { font-style: normal; }
.scribble {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 30 3, 60 10, 118 5' fill='none' stroke='%23b3402a' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 100% .32em;
  padding-bottom: .14em;
}
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 58ch; }
.lede strong { color: var(--ink); }
/* the penciled voice in the margin */
.margin-note {
  font-family: var(--font-hand); font-size: 1.05rem; color: var(--ledger);
  display: inline-block; transform: rotate(-1.1deg); margin: 16px 0 0; max-width: 60ch;
}

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 30px; }
.tool-card { position: relative; overflow: hidden; }
/* perforation: the featured tool tears out of the book */
.tool-card.perf::before {
  content: ""; display: block; height: 15px; margin: -30px -30px 22px;
  background-image: radial-gradient(circle, var(--paper) 4px, rgba(0,0,0,0) 4.6px);
  background-size: 19px 15px; background-position: center top;
  border-bottom: 1.5px dashed var(--rule-strong);
}
.entry-line { font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin: 0 0 10px; }
.tool-card h2 { margin: 0 0 .45em; font-size: clamp(1.6rem, 3.4vw, 2.1rem); padding-right: 150px; }
/* rubber stamp: slightly rotated, double-bordered, red. Each appearance
   is a promise (here: free), never decoration. */
.stamp {
  position: absolute; top: 26px; right: 22px;
  font-family: var(--font-display); font-weight: 700; font-size: .82rem;
  letter-spacing: .13em; text-transform: uppercase; color: var(--stamp);
  border: 3px double var(--stamp); border-radius: 5px; padding: 7px 13px 6px;
  transform: rotate(2.5deg); background: rgba(179,64,42,.05); white-space: nowrap;
}
.tool-card p.desc { color: var(--ink-soft); max-width: 62ch; font-size: 1.04rem; }
.tool-meta { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .82rem; font-weight: 500; color: var(--muted); margin: 16px 0 24px; }
.tool-meta span { display: inline-flex; align-items: center; gap: 8px; }
.tool-meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ledger); display: inline-block; }

/* buttons keep the old offset-shadow idiom, but with real depth:
   a 2px pressed edge plus a soft blur, per the craft floor */
.btn {
  display: inline-block; font-family: var(--font-ui); font-weight: 800; font-size: 1rem; letter-spacing: .01em;
  background: var(--ledger); color: #f6f2e2; border: 2px solid var(--ink);
  border-radius: var(--r-sm); padding: 12px 26px; text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 0 var(--ink), 0 10px 22px rgba(20,52,32,.18);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 0 3px 0 var(--ink), 0 14px 26px rgba(20,52,32,.22); color: #fff; }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 1px 0 var(--ink), 0 4px 10px rgba(20,52,32,.15); }
.btn-secondary { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 rgba(26,31,26,.55), 0 8px 18px rgba(26,31,26,.12); }
.btn-secondary:hover { color: var(--ink); box-shadow: 0 3px 0 rgba(26,31,26,.55), 0 12px 22px rgba(26,31,26,.14); }

/* ---- standing-order strip ---- */
.band { border-top: 2px double var(--ink); border-bottom: 2px double var(--ink); background: var(--paper-deep); }
.band .wrap { padding-top: 28px; padding-bottom: 28px; }
.band h2 { margin-top: 0; font-size: 1.4rem; }
.band p { margin-bottom: .6em; max-width: 68ch; }

/* ---- sections ---- */
.section { padding: 46px 0; }

/* the answer: a bookkeeper's double rule, in stamp red, under the figure */
.answer-block { background: var(--ledger-deep); color: #efe9d2; border-radius: var(--r-md); padding: 30px 30px 26px; margin: 24px 0 32px; box-shadow: 0 16px 34px rgba(20,52,32,.28); }
.answer-block .big-answer {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.1rem); color: #fbf8ee; margin: 8px 0 12px;
  font-variant-numeric: tabular-nums; border-bottom: 2px double var(--stamp); padding-bottom: 8px;
}
.answer-block .big-answer .per { font-size: 1rem; color: #cfc8ab; font-family: var(--font-mono); font-weight: 500; }
.answer-block p { margin: 0 0 .5em; color: #efe9d2; }
.answer-block p strong { color: #fff; }
.answer-block .assumptions { font-family: var(--font-mono); font-size: .78rem; color: #b9b198; margin-top: 12px; }

/* ---- ledger tables ---- */
table.ledger { width: 100%; border-collapse: collapse; font-size: .99rem; }
table.ledger caption { text-align: left; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-bottom: 10px; }
table.ledger th, table.ledger td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--rule); }
table.ledger thead th { font-family: var(--font-mono); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
table.ledger td.num, table.ledger th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ledger tr.highlight td { background: rgba(29,74,44,.09); font-weight: 700; color: var(--ink); }
table.ledger tr.total td { border-top: 2px solid var(--ink); border-bottom: 2px double var(--ink); font-weight: 700; color: var(--ink); }
table.ledger tbody tr:hover td { background: rgba(29,74,44,.05); }

/* ---- calculator ---- */
.calc { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.calc-head { background: var(--ink); color: #efe9d2; padding: 20px 26px; border-bottom: 2px double rgba(244,241,230,.4); }
.calc-head h2 { color: #fbf8ee; margin: 0; font-size: 1.35rem; }
.calc-head p { margin: 5px 0 0; font-size: .92rem; color: #b9b198; }
.calc-body { padding: 26px; }
@media (max-width: 560px) { .calc-body { padding: 20px 15px; } }

.mode-tabs { display: flex; gap: 0; border: 2px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 24px; }
.mode-tabs button {
  flex: 1; font-family: var(--font-ui); font-weight: 700; font-size: .95rem; padding: 12px 8px;
  background: var(--card); color: var(--ink); border: none; cursor: pointer;
}
.mode-tabs button + button { border-left: 2px solid var(--ink); }
.mode-tabs button[aria-selected="true"] { background: var(--ledger); color: #fbf8ee; }
.mode-tabs button:not([aria-selected="true"]):hover { background: var(--paper-deep); }

.field { margin-bottom: 22px; }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.field label { font-weight: 700; font-size: .95rem; color: var(--ink); }
.field .hint, .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }
input[type="number"], input[type="text"] {
  caret-color: var(--ledger);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.05rem;
  border: 1.5px solid var(--rule-strong); border-radius: var(--r-sm); padding: 9px 12px; width: 130px;
  background: #fffef9; color: var(--ink);
}
input[type="number"]:focus, input[type="text"]:focus { outline: 2px solid var(--ledger); outline-offset: 1px; border-color: var(--ink); }
.slider-row { display: flex; align-items: center; gap: 14px; }
input[type="range"] { flex: 1; accent-color: var(--ledger); height: 28px; cursor: pointer; }

.switch-row { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; width: 52px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--paper-deep); border: 1.5px solid var(--rule-strong); border-radius: 999px; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fffef9; border: 1.5px solid var(--rule-strong); transition: left .15s; }
.switch input:checked + .track { background: var(--ledger); border-color: var(--ledger-deep); }
.switch input:checked + .track::after { left: 24px; border-color: var(--ledger-deep); }
.switch input:focus-visible + .track { outline: 2px solid var(--stamp); outline-offset: 2px; }
.ot-fields { margin-top: 12px; padding: 14px 16px; background: rgba(29,74,44,.06); border: 1.5px dashed var(--ledger); border-radius: var(--r-sm); }
fieldset.field { border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 14px 16px; }
fieldset.field legend { font-weight: 700; color: var(--ink); padding: 0 6px; font-size: .9rem; }

.results { margin-top: 8px; }
.results h3 { font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin: 24px 0 8px; }
.effective-rate { display: inline-block; font-family: var(--font-mono); font-size: .9rem; font-weight: 600; background: rgba(29,74,44,.1); border: 1.5px solid var(--ledger); color: var(--ledger-deep); border-radius: var(--r-sm); padding: 7px 13px; margin-top: 12px; }

.takehome { margin-top: 28px; border: 2px solid var(--ink); border-radius: var(--r-md); overflow: hidden; }
.takehome-head { background: var(--ink); color: #fbf8ee; padding: 13px 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.takehome-head h3 { color: #fbf8ee; margin: 0; font-size: 1.05rem; }
.takehome-head .per { font-family: var(--font-mono); font-size: .76rem; color: #b9b198; }
.takehome-body { padding: 8px 22px 16px; background: var(--card); }
.disclaimer {
  margin: 14px 0 0; padding: 12px 14px; font-size: .83rem; line-height: 1.55; color: var(--muted);
  background: rgba(29,74,44,.06); border: 1.5px dashed var(--ledger); border-radius: var(--r-sm);
}
.disclaimer strong { color: var(--ink-soft); }

.compare { margin-top: 28px; }
.compare tbody tr { cursor: pointer; }
.compare .cur td { background: rgba(29,74,44,.1); font-weight: 700; color: var(--ink); }
.copy-row { margin-top: 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.copied-msg { font-size: .88rem; font-weight: 700; color: var(--good); opacity: 0; transition: opacity .2s; }
.copied-msg.show { opacity: 1; }

/* ---- classifieds: the ad slots, set like newspaper classifieds ----
   Explicitly labeled, bordered, part of the page's furniture -- an editor
   placed them here; they were not injected by a template. */
.ad-slot {
  margin: 30px auto; max-width: 728px; min-height: 130px;
  border: 1px solid var(--ink); border-radius: 2px; background: var(--card);
  box-shadow: var(--shadow); overflow: hidden;
}
.ad-label {
  display: block; text-align: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px double var(--rule-strong); background: var(--paper-deep); padding: 9px 8px;
}

/* ---- wage index: ruled ledger entries with dotted leaders, not cards ---- */
.wage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 36px; margin: 20px 0 8px; padding: 0; list-style: none; }
.wage-grid li { border-bottom: 1px solid var(--rule); }
.wage-grid a {
  display: flex; align-items: baseline; padding: 12px 2px;
  text-decoration: none; font-weight: 700; font-size: 1rem; color: var(--ink);
}
.wage-grid a .leader { flex: 1; min-width: 26px; border-bottom: 2px dotted var(--rule-strong); margin: 0 10px; transform: translateY(-4px); }
.wage-grid a .amt { font-family: var(--font-mono); font-size: .86rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wage-grid a:hover { background: rgba(29,74,44,.06); }
.wage-grid a:hover .amt { color: var(--ledger); }

/* ---- FAQ ---- */
details.faq { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--r-sm); margin-bottom: 10px; box-shadow: var(--shadow); }
details.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 15px 18px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.3rem; color: var(--ledger); flex: none; }
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding: 0 18px 16px; color: var(--ink-soft); }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---- budget working-paper ---- */
.budget { background: var(--card); border: 1px solid var(--rule-strong); border-top: 2px double var(--ink); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 26px; margin: 22px 0; }
.budget h3 { margin-top: 0; }
.budget table.ledger td:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.budget .note { font-size: .86rem; color: var(--muted); margin-top: 12px; }

/* ---- footer: the back cover ---- */
.site-footer { background: var(--ink); color: #b9b198; margin-top: 64px; border-top: 2px double var(--stamp); }
.site-footer .wrap { padding-top: 36px; padding-bottom: 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fbf8ee; font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer p, .site-footer li { font-size: .88rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #ece5cd; }
.site-footer a:hover { color: #fff; }
.legal { border-top: 1px solid rgba(244,241,230,.16); }
.legal .wrap { display: block; padding-top: 16px; padding-bottom: 22px; }
.legal p { font-size: .78rem; color: #b9b198; margin: 0; max-width: 90ch; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--ledger); color: #fbf8ee; padding: 8px 14px; border-radius: 4px; font-weight: 700; z-index: 99; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- small screens ---- */
@media (max-width: 720px) {
  .wage-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 8px; }
  .site-nav { margin-left: 0; }
  .site-nav a { padding: 10px 12px; font-size: .88rem; }
  .tool-card h2 { padding-right: 0; }
  .stamp { position: static; display: inline-block; transform: rotate(-1.5deg); margin-bottom: 14px; }
  .tool-card.perf::before { margin: -30px -30px 18px; }
  .hero { padding: 36px 0 32px; }
  table.ledger th, table.ledger td { padding: 9px 6px; font-size: .92rem; }
  .answer-block { padding: 24px 20px; }
  .btn { padding: 11px 20px; }
  .card { padding: 24px 20px; }
}
