:root {
  color-scheme: light;
  --ink: #142c3a;
  --text: #314656;
  --muted: #506776;
  --line: #d8e1e6;
  --paper: #f4f7f8;
  --white: #fff;
  --accent: #185b52;
  --accent-dark: #10443e;
  --soft: #e7f1ee;
  --alert: #784916;
  --alert-bg: #fbefdc;
  --soft-blue: #edf2f6;
  font-family: "Aptos", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: var(--accent); }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 3px solid #247e70; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 92px)); margin-inline: auto; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 8px 12px; background: white; transform: translateY(-140%); }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top { border-bottom: 1px solid #e0e7e9; }
.top-inner { height: 68px; display: flex; align-items: center; gap: 26px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.03rem; font-weight: 750; text-decoration: none; white-space: nowrap; letter-spacing: -.025em; }
.mark { display: grid; align-content: center; gap: 3px; padding: 0 6px; width: 27px; height: 27px; background: var(--ink); border-radius: 5px; }
.mark i { height: 2px; width: 14px; border-radius: 1px; background: #fff; }
.mark i:nth-child(2) { width: 10px; background: #abd4c4; }
.top nav { display: flex; gap: 26px; margin-inline: auto 0; }
.top nav a, .top-link { color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 650; }
.top-link { color: var(--accent); border-left: 1px solid var(--line); padding-left: 23px; white-space: nowrap; }
.hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 78px 0 79px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.27fr) minmax(0, .93fr); gap: clamp(35px, 7vw, 109px); align-items: center; }
.overline { display: inline-block; margin: 0 0 16px; color: var(--accent); font-weight: 700; font-size: .8rem; border-bottom: 2px solid #84b8a9; padding-bottom: 5px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.7rem, 5.25vw, 4.75rem); letter-spacing: -.054em; line-height: .99; max-width: 650px; font-weight: 755; }
.intro { color: var(--text); font-size: clamp(1rem, 1.55vw, 1.19rem); margin-top: 23px; max-width: 525px; }
.hero-actions, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-actions { margin-top: 25px; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 9px 14px; border: 1px solid transparent; border-radius: 6px; font-size: .89rem; font-weight: 700; text-decoration: none; line-height: 1.25; }
.btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn.outline { background: white; color: var(--ink); border-color: #bfccd3; }
.btn.outline:hover { background: #eef3f5; }
.btn.plain { background: transparent; color: var(--text); border-color: transparent; }
.btn.plain:hover:not(:disabled) { background: var(--soft-blue); }
.local { margin-top: 15px; color: var(--muted); font-size: .84rem; }
.local-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2a816f; vertical-align: 1px; margin-right: 6px; }
.example { background: white; border: 1px solid #bed0d2; border-top: 4px solid var(--ink); border-radius: 9px; box-shadow: 0 12px 36px #1c3c4220; overflow: hidden; }
.example-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 19px; border-bottom: 1px solid #e6ebed; font-size: .92rem; font-weight: 750; }
.chip, .finding { border-radius: 4px; padding: 3px 7px; font-weight: 700; font-size: .73rem; color: var(--alert); background: var(--alert-bg); }
.example-main { padding: 19px 19px 11px; }
.example-id { color: var(--muted); font-size: .85rem; }
.example h2 { font-size: 1.57rem; letter-spacing: -.03em; line-height: 1.13; margin: 4px 0 8px; }
.example-main > p:last-child { color: var(--text); font-size: .88rem; }
.example-ledger { margin: 0 19px; }
.example-ledger div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.example-ledger dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.example-foot { padding: 11px 19px; background: var(--paper); font-size: .77rem; color: var(--muted); }
.audit { padding: 56px 0 62px; scroll-margin-top: 12px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 21px; }
.section-head h2, .guide h2, .trial h2 { line-height: 1.12; letter-spacing: -.045em; font-size: clamp(1.62rem, 3.1vw, 2.34rem); }
.section-head p, .guide p, .trial p { color: var(--muted); margin-top: 8px; font-size: .94rem; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.input-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; min-width: 0; }
.input-head { display: flex; gap: 9px; align-items: center; margin-bottom: 13px; }
.input-head span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--soft-blue); font-weight: 700; font-size: .8rem; }
.input-head h3 { font-size: 1rem; }
.drop { display: flex; flex-direction: column; gap: 3px; justify-content: center; align-items: center; text-align: center; background: #f7faf9; border: 1px dashed #8eaaa6; min-height: 88px; border-radius: 6px; cursor: pointer; padding: 10px; color: var(--accent-dark); }
.drop span { color: var(--muted); font-size: .84rem; }
.drop.is-over, .drop:focus-within, .drop:hover { background: var(--soft); border-color: var(--accent); }
.input-card:has(.file-input:focus-visible) .drop { outline: 3px solid #247e70; outline-offset: 3px; }
.file-info { font-size: .85rem; color: var(--muted); margin: 9px 0 6px; overflow-wrap: anywhere; min-height: 1.3em; }
.text-btn { border: 0; background: transparent; color: var(--accent); padding: 3px 0; font-size: .83rem; text-decoration: underline; text-underline-offset: 4px; }
.input-card details { border: 0; margin: 8px 0; background: #f4f7f8; padding: 8px; border-radius: 5px; }
.input-card summary { font-size: .86rem; }
.map-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding-top: 7px; }
.map-grid label, .sheet-select { font-size: .82rem; font-weight: 700; display: block; }
.map-grid select, .sheet-select select { margin-top: 3px; }
select, input[type=search] { max-width: 100%; border: 1px solid #bdcbd2; border-radius: 5px; color: var(--ink); background: white; padding: 5px 7px; min-height: 36px; }
.map-grid select, .sheet-select select { width: 100%; display: block; }
.run-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 15px; padding: 13px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.run-label strong, .run-label span { display: block; }
.run-label strong { font-size: .9rem; }
.run-label span { font-size: .82rem; color: var(--muted); }
.error { padding: 10px 12px; border: 1px solid #d9a2a2; border-radius: 6px; background: #fff3f3; color: #802727; margin-top: 12px; overflow-wrap: anywhere; }
.results { margin-top: 43px; scroll-margin-top: 10px; }
.result-head { margin-bottom: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #f0f4f5; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.metric { padding: 13px 19px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: .84rem; }
.metric strong { font-size: 1.9rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric.flagged { background: #fcf4e8; color: #764819; }
.total-note { color: var(--text); margin: 9px 0 16px; font-size: .86rem; }
.table-controls { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.table-controls label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: .84rem; font-weight: 650; min-width: 0; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
table { border-collapse: collapse; width: 100%; min-width: 675px; font-size: .9rem; }
thead { background: var(--soft-blue); color: var(--text); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e3eaec; vertical-align: top; overflow-wrap: anywhere; }
thead th { font-size: .8rem; }
tbody tr:last-child td { border-bottom: 0; }
.finding { display: inline-block; }
.finding.matched, .finding.split { color: #17564d; background: var(--soft); }
.finding.variance { color: #842f27; background: #f9e8e6; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.subline { display: block; font-size: .77rem; color: var(--muted); }
td details { display: inline; line-height: 1.3; }
td summary { color: var(--accent); font-size: .82rem; cursor: pointer; }
td details p { margin: 5px 0 0; font-size: .82rem; color: var(--text); max-width: 320px; }
.page-controls { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .85rem; padding-top: 4px; }
.guide { background: var(--paper); border-block: 1px solid var(--line); padding: 42px 0; }
.guide-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 50px; }
.guide details { padding: 10px 0; border-top: 1px solid var(--line); }
.guide details:last-child { border-bottom: 1px solid var(--line); }
.guide summary { font-weight: 700; cursor: pointer; }
.trial { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 41px 0; }
.foot { border-top: 1px solid var(--line); padding: 18px 0; font-size: .85rem; }
.foot .shell { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 860px) {
  .shell { width: min(720px,calc(100% - 56px)); }
  .hero { padding: 48px 0 52px; }
  .hero-grid { gap: 25px; grid-template-columns: 1.14fr 1fr; }
  .hero-actions .btn { padding-inline: 10px; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 34px); }
  .top-inner { height: 53px; gap: 12px; }
  .top nav { display: none; }
  .top-link { margin-left: auto; border: 0; padding: 0; }
  .hero { padding: 29px 0 29px; }
  .hero-grid, .upload-grid, .guide-grid { grid-template-columns: 1fr; gap: 17px; }
  h1 { font-size: clamp(2.55rem, 10vw, 3.35rem); max-width: 475px; }
  .intro { margin-top: 14px; }
  .hero-actions { margin-top: 16px; }
  .local { margin-top: 10px; }
  .example-main { padding: 12px 14px 7px; }
  .example-top, .example-foot { padding: 8px 14px; }
  .example-ledger { margin: 0 14px; }
  .example-ledger div { padding: 5px 0; }
  .audit { padding: 29px 0 37px; }
  .section-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
  .audit > .section-head { flex-wrap: nowrap; }
  .input-card { padding: 13px; }
  .run-strip { align-items: flex-start; flex-direction: column; }
  .metric { padding: 9px; }
  .metric span { font-size: .75rem; min-height: 2.45em; }
  .table-controls { flex-wrap: wrap; }
  table, tbody { display: block; min-width: 0; }
  thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  tbody tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 5px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { min-width: 0; padding: 6px; border-bottom: 0; }
  td:first-child { grid-column: span 2; align-self: center; }
  td:nth-child(2) { text-align: right; }
  td.money { white-space: normal; font-size: .83rem; }
  td.money::before { content: attr(data-label); display: block; color: var(--muted); font-size: .7rem; }
  td:nth-child(6), td[colspan] { grid-column: 1 / -1; }
  td:nth-child(6) { border-top: 1px solid #e5eaed; }
  .guide { padding: 27px 0; }
  .trial { align-items: flex-start; flex-direction: column; padding: 23px 0 28px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

