@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-700.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --glass: #d7e4ea;
  --stage: #e7f1f4;
  --sheet: #f4f8f9;
  --ink: #102028;
  --muted: #3c5362;
  --line: #b7c9d2;
  --snap: #9c2e16;
  --ledger: #0b5e4d;
  --binding: #1d3d8f;
  --redact: #5b2a86;
  --focus: #0b4f8c;
  --grid: rgba(16, 32, 40, 0.08);
  --shadow: 0 1px 0 rgba(16, 32, 40, 0.08);
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --glass: #0c1418;
  --stage: #101c22;
  --sheet: #152228;
  --ink: #e7f2f6;
  --muted: #c5d5de;
  --line: #314854;
  --snap: #ff8d78;
  --ledger: #6ee0c6;
  --binding: #b7c4ff;
  --redact: #dcbcff;
  --focus: #7ec8ff;
  --grid: rgba(231, 242, 246, 0.07);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--glass);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  font-size: 1.05rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: Fraunces, Palatino, "Palatino Linotype", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 0 0 0.6rem; }
.hub .hero-copy h1 { font-size: clamp(2.8rem, 6.4vw, 4.4rem); max-width: 16ch; }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); margin: 0 0 0.45rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.35rem; }

p { margin: 0 0 0.8rem; }

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 5;
  padding: 0.6rem 0.9rem;
  background: var(--sheet);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.nav, main, footer {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  font-family: Fraunces, Palatino, serif;
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
}

.nav nav, .footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
}

.nav nav a, .footer-links a, summary, .btn, .theme-toggle {
  min-height: 24px;
}

.nav nav a, .footer-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.1rem;
}

.nav nav a[aria-current="page"], .footer-links a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--sheet);
  color: var(--ink);
  display: grid;
  place-items: center;
}

.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

main { padding-bottom: 3rem; }

.lede { font-size: 1.15rem; max-width: 42rem; }

.muted { color: var(--muted); }

.hub { padding-top: 1.5rem; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.trust li {
  min-height: 24px;
  padding-left: 1.1rem;
  background: linear-gradient(var(--ink), var(--ink)) 0 0.45rem / 0.45rem 2px no-repeat;
}

.trust.chips { gap: 0.5rem; }
.trust.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.15rem 0.75rem 0.15rem 0.45rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  line-height: 1.3;
}
.trust.chips li::marker { content: none; }
.trust.chips .check { width: 1.05rem; height: 1.05rem; flex: none; }

.tool-grid, .grid3, .pricing-grid {
  display: grid;
  gap: 1rem;
}

.grid3 { grid-template-columns: repeat(3, 1fr); }
.tool-grid { grid-template-columns: repeat(2, 1fr); }
.pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pricing-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* four plans read best as two rows of two */

.card, .sheet, .notice {
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card { padding: 1.1rem 1.15rem 1.2rem; }

.tool-tile {
  border-top: 6px solid var(--tile, var(--ink));
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tool-tile[data-tool="tableshift"],
.proof-panel[data-tool="tableshift"] { --tile: var(--snap); }
.tool-tile[data-tool="statementcsv"],
.proof-panel[data-tool="statementcsv"] { --tile: var(--ledger); }
.tool-tile[data-tool="epubfix"],
.proof-panel[data-tool="epubfix"] { --tile: var(--binding); }
.tool-tile[data-tool="redactor"] { --tile: var(--redact); }

.proof-panel { border-top: 6px solid var(--tile, var(--ink)); min-width: 0; }
.proof-panel h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.proof-panel h3 a { min-height: 24px; display: inline-flex; align-items: center; }
.proof-panel .sheet + .sheet { margin-top: 0.55rem; }
.proof-panel .sheet th,
.proof-panel .sheet td { white-space: nowrap; overflow-wrap: normal; }
.proof-panel .sheet { min-width: 0; }
.sheet-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
.proof-panel .sheet table { width: max-content; min-width: 100%; }
.hub .trust { margin-top: 1.25rem; }
.proof-strip { margin: 2.25rem 0 0.25rem; }
.proof-strip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.csv-lines {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre;
  width: max-content;
  color: var(--ink);
}

.tool-icon { width: 2rem; height: 2rem; color: var(--tile, var(--accent, var(--ink))); }

.tool-tile .actions, .stmt-actions, .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: auto;
}

.tool-tile .actions { padding-top: 0.8rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--ink);
  color: var(--sheet);
  border-color: var(--ink);
}

body[data-tool="tableshift"] .btn.primary,
.tool-tile[data-tool="tableshift"] .btn.primary,
a.btn.primary[data-tool="tableshift"] { background: #9c2e16; color: #fff; border-color: #9c2e16; }
body[data-tool="statementcsv"] .btn.primary,
.tool-tile[data-tool="statementcsv"] .btn.primary,
a.btn.primary[data-tool="statementcsv"] { background: #0b5e4d; color: #fff; border-color: #0b5e4d; }
body[data-tool="epubfix"] .btn.primary,
.tool-tile[data-tool="epubfix"] .btn.primary,
a.btn.primary[data-tool="epubfix"] { background: #1d3d8f; color: #fff; border-color: #1d3d8f; }
body[data-tool="redactor"] .btn.primary,
.tool-tile[data-tool="redactor"] .btn.primary,
a.btn.primary[data-tool="redactor"] { background: #5b2a86; color: #fff; border-color: #5b2a86; }

:root[data-theme="dark"] body[data-tool="tableshift"] .btn.primary,
:root[data-theme="dark"] .tool-tile[data-tool="tableshift"] .btn.primary,
:root[data-theme="dark"] a.btn.primary[data-tool="tableshift"] { background: #ff8d78; color: #102028; border-color: #ff8d78; }
:root[data-theme="dark"] body[data-tool="statementcsv"] .btn.primary,
:root[data-theme="dark"] .tool-tile[data-tool="statementcsv"] .btn.primary,
:root[data-theme="dark"] a.btn.primary[data-tool="statementcsv"] { background: #6ee0c6; color: #102028; border-color: #6ee0c6; }
:root[data-theme="dark"] body[data-tool="epubfix"] .btn.primary,
:root[data-theme="dark"] .tool-tile[data-tool="epubfix"] .btn.primary,
:root[data-theme="dark"] a.btn.primary[data-tool="epubfix"] { background: #b7c4ff; color: #102028; border-color: #b7c4ff; }
:root[data-theme="dark"] body[data-tool="redactor"] .btn.primary,
:root[data-theme="dark"] .tool-tile[data-tool="redactor"] .btn.primary,
:root[data-theme="dark"] a.btn.primary[data-tool="redactor"] { background: #dcbcff; color: #102028; border-color: #dcbcff; }

.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 1;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.btn.big { min-height: 48px; padding-inline: 1.2rem; }

.card.highlight { border-width: 2px; border-color: var(--ink); }
.plan-note { font-weight: 700; margin-bottom: 0.4rem; }

.price { font-family: Fraunces, Palatino, serif; font-size: 2.4rem; line-height: 1; margin: 0.2rem 0 0.7rem; }
.per { font-family: "Atkinson Hyperlegible", sans-serif; font-size: 1rem; color: var(--muted); margin-left: 0.3rem; }

.card ul, .tool-notes { padding-left: 1.1rem; }
.pricing-grid .card { display: flex; flex-direction: column; }
.pricing-grid .card .btn { margin-top: auto; }

.hero.bench {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(18rem, 1.15fr);
  gap: 1.5rem;
  align-items: start;
  padding-top: 0.5rem;
}

.hero-copy .tool-icon { color: var(--ink); }
body[data-tool="tableshift"] .hero-copy .tool-icon { color: #9c2e16; }
body[data-tool="statementcsv"] .hero-copy .tool-icon { color: #0b5e4d; }
body[data-tool="epubfix"] .hero-copy .tool-icon { color: #1d3d8f; }
:root[data-theme="dark"] body[data-tool="tableshift"] .hero-copy .tool-icon { color: #ff8d78; }
:root[data-theme="dark"] body[data-tool="statementcsv"] .hero-copy .tool-icon { color: #6ee0c6; }
:root[data-theme="dark"] body[data-tool="epubfix"] .hero-copy .tool-icon { color: #b7c4ff; }

.hero-stage {
  position: relative;
  padding: 1.25rem 1rem 1rem;
  background-color: var(--stage);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--line);
}
.hero-stage::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1px 12px no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

.proof { margin: 0 0 1rem; }
.proof figcaption { margin-bottom: 0.6rem; max-width: 65ch; }
.proof-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }

.sheet { padding: 0.7rem; }
.sheet-label { font-weight: 700; margin-bottom: 0.35rem; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.sheet th, .sheet td { border: 1px solid var(--line); padding: 0.3rem 0.4rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.sheet th { background: #e4eef2; color: #102028; }
:root[data-theme="dark"] .sheet th { background: #243840; color: #e7f2f6; }
.sheet.excel th { background: #d5ebe4; }
:root[data-theme="dark"] .sheet.excel th { background: #1c3f36; color: #e7f2f6; }

.report-id { font-family: Fraunces, Palatino, serif; font-size: 1.6rem; margin: 0.2rem 0; }

.proof-after { animation: register 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes register {
  from { transform: translate(16px, 8px); }
  to { transform: none; }
}

.tool-card { text-align: left; }
.tool-card.dragging { outline: 3px dashed var(--focus); outline-offset: 4px; }

.drop-demo {
  border: 2px dashed var(--line);
  background: var(--sheet);
  padding: 1.15rem 1.1rem 1.2rem;
  min-height: 16rem;
}
.drop-demo.dragging { border-color: var(--focus); }
.drop-demo .actions { margin-top: 0.85rem; }
.drop-demo .upload-mark { margin-bottom: 0.35rem; }
.upload-mark { font-family: Fraunces, Palatino, serif; font-size: 1.4rem; margin: 0; }

.file-label { position: relative; }
.file-label:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.file-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  color: #102028;
  background: #f4f8f9;
}

.quota {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.8rem;
}

.section { margin-top: 2.5rem; }
.steps ol, ol.grid3 { list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--sheet); border: 1px solid var(--line); padding: 1rem; }

.feature-list, .pricing-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) 1.3fr;
  gap: 1.25rem;
}

.feature-list article + article { margin-top: 1rem; }

.notice { padding: 0.8rem 1rem; margin-bottom: 1rem; }

.narrow, .legal, .post { max-width: 68ch; }
.legal h2, .post h2 { margin-top: 1.6rem; }
.post-body { max-width: 68ch; }
.post-body pre, .post-body code {
  font-family: "Atkinson Hyperlegible", sans-serif;
}
.post-body pre {
  padding: 0.8rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.post-body a { font-weight: 700; }

details { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 0.7rem 0; min-height: 44px; display: flex; align-items: center; }

.stack-table { width: 100%; border-collapse: collapse; }
.stack-table th, .stack-table td { border: 1px solid var(--line); padding: 0.55rem; text-align: left; vertical-align: top; }
.stack-table th { background: var(--sheet); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.tool-tile:hover, .pricing-grid .card:hover, .steps li:hover {
  transform: translateY(-3px);
}
.hub .card:hover { transform: translateY(-2px); }
.tool-tile, .pricing-grid .card, .steps li, .hub .card { transition: transform 160ms ease; }

@media (max-width: 800px) {
  .hero.bench, .proof-pair, .proof-strip-grid, .tool-grid, .grid3, .pricing-grid, .pricing-grid.cols-3, .pricing-grid.cols-4, .feature-list, .pricing-layout, footer {
    grid-template-columns: 1fr;
    display: grid;
  }
  .proof-strip-grid { grid-template-columns: minmax(0, 1fr); }
  footer { display: grid; }
  .nav { align-items: flex-start; }
  .sheet table { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .proof-after { animation: none; }
  .tool-tile, .pricing-grid .card, .steps li, .hub .card { transition: none; }
  .tool-tile:hover, .pricing-grid .card:hover, .steps li:hover, .hub .card:hover { transform: none; }
}

.stack-table code { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { margin-bottom: 0.9rem; border: 1px solid var(--line); }
  .stack-table td { border: 0; border-top: 1px solid var(--line); }
  .stack-table td:first-child { border-top: 0; }
  .stack-table td::before { content: attr(data-label); display: block; font-weight: 700; }
}

.csv-wrap { min-width: 0; max-width: 100%; }
.csv-wrap .csv-lines { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; overflow: hidden; }
main:focus { outline: none; }

/* TrueRedact */
body[data-tool="redactor"] .hero-copy .tool-icon { color: var(--redact); }
.rd-tool textarea { width: 100%; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--muted); border-radius: 6px; padding: 0.5rem 0.6rem; }
.rd-label { font-weight: 700; margin-top: 0.4rem; }
.rd-presets { border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.8rem 0.7rem; margin: 0; width: 100%; }
.rd-presets legend { font-weight: 700; padding: 0 0.3rem; }
.rd-presets label { display: flex; gap: 0.5rem; align-items: center; min-height: 32px; }
.rd-presets input { width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--redact); }
#rdResult { width: 100%; }
.rd-proof h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.rd-proof.pass { border-left: 6px solid var(--ledger); }
.rd-proof.fail { border-left: 6px solid var(--snap); }
.rd-previews { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }
.rd-previews img { width: 100%; height: auto; border: 1px solid var(--line); background: #fff; }
.rd-previews p { margin: 0.2rem 0 0; }
.diagram-row { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 2rem; align-items: center; }
.diagram { margin: 0; padding: 1rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; }
.dg { display: block; width: 100%; height: auto; font-family: "Atkinson Hyperlegible", system-ui, sans-serif; }
.dg-boundary { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 5; }
.dg-boundary.dg-ok { stroke: var(--ledger); stroke-dasharray: none; }
.dg-node { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.25; }
.dg-focus { stroke: var(--redact); stroke-width: 2.5; }
.dg-remote { stroke-dasharray: 3 3; }
.dg-eyebrow { fill: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.dg-label { fill: var(--ink); font-size: 16px; font-weight: 700; }
.dg-sub { fill: var(--muted); font-size: 14px; }
.dg-strong { fill: var(--ink); font-weight: 700; }
.dg-mono { fill: var(--ink); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; }
.dg-bad { fill: var(--snap); font-weight: 700; }
.dg-good { fill: var(--ledger); font-weight: 700; }
.dg-bar { fill: #000; }
:root[data-theme="dark"] .dg-bar { fill: #000; stroke: var(--muted); }
.dg-over { fill-opacity: 0.82; }
.dg-arrow { stroke: var(--muted); stroke-width: 1.75; }
.dg-fill-muted { fill: var(--muted); }
.dg-blocked { stroke: var(--snap); stroke-width: 1.75; stroke-dasharray: 4 3; }
.dg-cross { stroke: var(--snap); stroke-width: 2.5; fill: none; }
.dg-text li + li { margin-top: 0.6rem; }
@media (max-width: 760px) {
  .diagram-row { grid-template-columns: 1fr; gap: 1rem; }
  .tool-grid { grid-template-columns: 1fr; }
}
.rd-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.rd-step { display: grid; gap: 0.6rem; justify-items: start; padding: 1rem; border: 2px solid var(--line); border-radius: 10px; background: var(--sheet); }
.rd-step[aria-current="step"] { border-color: var(--step-accent, var(--redact)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--step-accent, var(--redact)) 25%, transparent); }
.rd-step h2 { display: flex; gap: 0.6rem; align-items: center; margin: 0; font-size: 1.35rem; }
.rd-n { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ink); color: var(--sheet); font-size: 1.1rem; }
.rd-step[aria-current="step"] .rd-n { background: var(--step-accent, var(--redact)); color: var(--sheet); }
.rd-drop { width: 100%; min-height: 170px; display: grid; place-items: center; text-align: center; gap: 0.5rem; padding: 1.2rem; border: 2px dashed var(--muted); border-radius: 10px; }
.rd-drop.dragging { border-color: var(--focus); border-style: solid; }
.rd-drop-text { font-size: 1.2rem; font-weight: 700; margin: 0; }
.rd-tool .btn, .rd-tool .file-label { min-height: 48px; }
.rd-presets label { min-height: 44px; }
.rd-presets input { width: 1.4rem; height: 1.4rem; }
.rd-status { margin: 0; font-weight: 700; }
.rd-step .btn.big { width: 100%; justify-content: center; font-size: 1.1rem; }
.dg-step { fill: var(--sheet); stroke: var(--step-accent, var(--redact)); stroke-width: 2.5; }
.dg-num { fill: var(--ink); font-size: 22px; font-weight: 700; }
.dg-steps { max-width: 420px; }
.hero-copy .diagram { margin-top: 1rem; }
.help-line { text-align: center; margin: 2rem auto 0; font-weight: 700; }
.help-line a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem; }
.rd-reassure { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; }
.rd-price { font-size: 1.1rem; }
.rd-price a { display: inline-flex; align-items: center; min-height: 44px; }
.rd-more { width: 100%; }
.rd-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; text-decoration: underline; }
.rd-step > p { margin: 0; }
.rd-steps .btn.primary.big#rdDownload { width: 100%; justify-content: center; }
@media (max-width: 760px) {
  /* Phones: the tool comes right after the heading; step 1 already says what happens and what it costs. */
  .rd-hero .hero-copy .lede, .rd-hero .rd-price, .rd-hero .hero-copy .tool-icon { display: none; }
  .rd-hero .hero-copy .rd-promise { display: block; margin: .5rem 0 0; font-size: 1.05rem; }
  .rd-hero .hero-copy h1 { font-size: 2rem; margin-bottom: 0; }
}
body[data-tool="tableshift"] { --step-accent: var(--snap); }
body[data-tool="statementcsv"] { --step-accent: var(--ledger); }
body[data-tool="epubfix"] { --step-accent: var(--binding); }
.rd-help { margin: -0.3rem 0 0.4rem 2rem; font-size: 0.95rem; }
[hidden] { display: none !important; }
.rd-presets input { accent-color: var(--step-accent, var(--redact)); }
.rd-big-result { font-size: 1.2rem; font-weight: 700; margin: 0; }

/* PageKit */
.pk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; width: 100%; }
.pk-list li { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pk-list li span { flex: 1 1 12rem; overflow-wrap: anywhere; }
.pk-mark { display: grid; gap: 0.6rem; width: 100%; }
.pk-mark input[type="text"] { min-height: 44px; font-size: 1.05rem; width: 100%; box-sizing: border-box; }
.pk-check { display: flex; gap: 0.6rem; align-items: center; min-height: 44px; }
.pk-check input { width: 1.4rem; height: 1.4rem; flex: none; }
.pk-list .btn, .pk-outs .btn { min-height: 44px; min-width: 44px; }
.pk-jobs label { align-items: flex-start; padding: 0.3rem 0; }
.pk-jobs input { margin-top: 0.3rem; }
.pk-outs { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; }
#pkRanges { min-height: 44px; width: 100%; font: inherit; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: inherit; }

/* Plain Invoice */
.iv-tool textarea, .iv-tool input:not([type="radio"]):not([type="file"]) { min-height: 44px; width: 100%; font: inherit; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: inherit; box-sizing: border-box; }
.iv-lines { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.6rem; }
.iv-line { display: grid; grid-template-columns: 1fr 4.5rem 7rem auto; gap: 0.4rem; align-items: end; }
.iv-line label { display: grid; gap: 0.2rem; font-size: 0.9rem; }
.iv-line .btn, #ivAdd { min-height: 44px; min-width: 44px; }
.iv-more { display: grid; gap: 0.3rem; }
@media (max-width: 560px) { .iv-line { grid-template-columns: 1fr 1fr; } .iv-what { grid-column: 1 / -1; } .iv-line .iv-remove { grid-column: 1 / -1; } }

/* Pro bar */
.pro-bar { margin: 0.5rem 0 0; padding: 0.4rem 0; } /* left edge lines up with the page heading */
.pro-bar summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: underline; }
.pro-bar form { display: grid; gap: 0.4rem; max-width: 28rem; margin-top: 0.4rem; }
.pro-bar input { min-height: 44px; font: inherit; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: inherit; }
.pro-bar .btn { min-height: 44px; }
.pro-bar #proOn a, .pro-page a:not(.btn) { display: inline-flex; min-height: 44px; align-items: center; }
.iv-logo .btn { min-height: 44px; }

/* Guides */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; padding: 0; margin: 0 0 1rem; font-size: .95rem; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin-right: .5rem; color: var(--muted); }
.crumbs a { display: inline-block; padding: .55rem 0; line-height: 1.4; }
.hub-cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.hub-cards h2 { font-size: 1.2rem; margin-top: 0; }
.guide-list { list-style: none; padding: 0; }
.guide-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-weight: 700; font-size: 1.1rem; display: inline-block; min-height: 44px; line-height: 1.4; padding-top: .6rem; }
.guide-list p { margin: .25rem 0 0; color: var(--muted); }
.post-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.guides-box ul { padding-left: 1.2rem; }
.guides-box li { margin: .4rem 0; }
.guides-box li { line-height: 1.9; }
.support-steps { padding-left: 1.4rem; }
.support-steps li { margin: .6rem 0; font-size: 1.1rem; }
.ip-mode { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.ip-mode label { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; font-size: 1.1rem; cursor: pointer; }
.ip-mode input { width: 24px; height: 24px; }
.ip-list { padding: 0; list-style: none; margin: 0 0 1rem; }
.ip-item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line, #ddd); }
.ip-item span { flex: 1 1 12rem; overflow-wrap: anywhere; }
.ip-item .btn { min-width: 48px; }
.ip-tool select { min-height: 48px; font-size: 1rem; max-width: 100%; }
.stmt-balance { padding: .6rem .8rem; border-left: 4px solid var(--focus); background: var(--bg-soft, rgba(0,0,0,.03)); }
.stmt-balance.warn { border-left-color: #b45309; }
.stmt-batch { padding-left: 1.2rem; }
.stmt-batch li { margin: .6rem 0; }
/* Firm: a client box per statement, the groups, the export choice and file names (MyBankToExcel) */
.stmt-client { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .4rem 0 0; }
.stmt-client label { font-weight: 700; }
.stmt-client input, .rd-firm input[type="text"] { min-height: 44px; font-size: 1.05rem; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: inherit; box-sizing: border-box; max-width: 100%; }
.stmt-client input { flex: 1 1 12rem; }
.rd-firm { display: grid; gap: .6rem; margin: 1rem 0; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 8px; }
.rd-firm h3 { margin: 0; }
.rd-firm input[type="text"] { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.rd-groups h4 { margin: .6rem 0 .2rem; }
.rd-groups ul { margin: 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
#llPatternPreview { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pay-privacy { font-size: .95rem; margin: .5rem 0 0; color: var(--ink, inherit); }

/* Explainer video under step 1 (no autoplay, loads only on play) */
.explainer { width: 100%; }
.explainer summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; padding: 0.25rem 0; }
.explainer summary:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.explainer video { display: block; width: 100%; height: auto; margin-top: 0.5rem; border-radius: 8px; background: #000; }
.explainer p { margin: 0.4rem 0 0; }
