:root {
  color-scheme: light;
  --paper: #f9f8f2;
  --white: #fffefa;
  --ink: #14332b;
  --muted: #476058;
  --green: #154e3c;
  --accent: #cce68c;
  --line: #ced7cb;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, dl { margin: 0; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: wait; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #347a62; outline-offset: 4px; }
html { scroll-padding-top: 1.25rem; }

.shell { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: absolute; z-index: 1; background: var(--white); padding: .6rem 1rem; }
.top { border-bottom: 1px solid var(--line); }
.top-inner, .top nav, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-inner { min-height: 4.5rem; }
.top nav { gap: clamp(.85rem, 3vw, 2rem); font-size: .9rem; font-weight: 650; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.brand { display: inline-flex; gap: .65rem; align-items: center; font-weight: 760; text-decoration: none; letter-spacing: -.025em; }
.brand-mark { display: flex; align-items: end; gap: 3px; padding: 7px; height: 30px; background: var(--green); border-radius: 7px; }
.brand-mark i { width: 3px; height: 6px; background: var(--accent); border-radius: 1px; }
.brand-mark i:nth-child(2) { height: 10px; }
.brand-mark i:nth-child(3) { height: 14px; }

.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 6rem); padding-block: clamp(3rem, 7.5vw, 6.5rem); }
.eyebrow, .step {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.hero .eyebrow > span { display: inline-block; vertical-align: .04em; width: .62rem; height: .62rem; border-radius: 50%; background: #699551; margin-right: .4rem; }
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.052em;
  line-height: 1.01;
}
h1 { font-size: clamp(3.35rem, 7.4vw, 6.5rem); margin-block: .72rem 1.3rem; }
h1 span { color: #457a41; }
h2 { font-size: clamp(2.15rem, 4.4vw, 3.65rem); margin-top: .38rem; }
h3 { font-size: 1.13rem; letter-spacing: -.024em; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.24rem); max-width: 39ch; }
.hero-actions, .run-bar, .export-bar, .inline-links { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; }
.hero-actions { margin-top: 1.55rem; gap: 1.15rem; }
.button {
  display: inline-flex;
  min-height: 2.85rem;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  padding: .55rem 1rem;
  font-size: .9rem;
  font-weight: 720;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
}
.primary { background: var(--green); color: white; }
.primary:hover { background: #103c2f; }
.secondary { background: var(--white); border-color: #9faf9e; }
.secondary:hover { background: #edf2e8; }
.button:disabled { opacity: .57; }
.pagination button:disabled { cursor: default; }
.text-link, .link-button { font-weight: 690; font-size: .9rem; }
.link-button { padding: .25rem 0; border: 0; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: .22em; }
.link-button:hover { text-decoration-thickness: 2px; }
.privacy { margin-top: 1.25rem; color: var(--muted); font-size: .88rem; }
.privacy span { color: #527b46; margin-right: .3rem; }

.preview {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #143a2f;
  color: #fffefa;
  padding: clamp(1.4rem, 4vw, 2.55rem);
  border: 1px solid #0e3328;
  border-radius: 1.15rem;
  box-shadow: .44rem .5rem 0 #e1e8d1;
}
.preview-head, .preview-amounts > div, .preview-foot { display: flex; justify-content: space-between; align-items: baseline; gap: .55rem; }
.preview-head .eyebrow { color: #d3e6ba; }
.preview-title { font-family: Georgia, serif; font-size: clamp(1.3rem, 3vw, 2.04rem); letter-spacing: -.035em; margin-top: .15rem; }
.preview-amounts { font-size: .96rem; margin-block: 1.1rem; }
.preview-amounts > div { padding: .31rem 0; }
.preview-amounts dd, .preview-foot strong { font-family: ui-monospace, Consolas, monospace; margin: 0; white-space: nowrap; }
.preview-amounts .preview-net { border-top: 1px solid #648179; margin-top: .5rem; padding-top: .67rem; font-weight: 720; }
.preview-net small { font-size: .7rem; color: #d3e6ba; padding-left: .3rem; }
.preview-foot { font-size: .86rem; background: #254c40; padding: .65rem .8rem; border-radius: .45rem; color: #edf6e3; }
.badge { border-radius: 999px; display: inline-block; padding: .18rem .58rem; font-size: .73rem; font-weight: 760; line-height: 1.45; white-space: nowrap; }
.badge.good { background: #ddedbc; color: #24482f; }
.badge.review { background: #f7e9c9; color: #694313; }
.badge.neutral { background: #e6ede8; color: #354e43; }

.workspace-bg { border-block: 1px solid var(--line); background: #eff2e9; }
.workspace, .guide { padding-block: clamp(2.2rem, 5vw, 4.4rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.section-intro { margin-block: .65rem 1.2rem; color: var(--muted); }
.input-grid, .guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.input-card { min-width: 0; display: flex; flex-direction: column; align-items: start; padding: 1.15rem; border-radius: .8rem; border: 1px solid var(--line); background: var(--white); }
.step { color: var(--green); margin-bottom: .3rem; }
.input-card label { font-size: 1.17rem; font-weight: 760; }
.input-card p { color: var(--muted); font-size: .9rem; margin-block: .25rem .7rem; }
.input-card input { margin-top: auto; max-width: 100%; width: 100%; color: var(--ink); font-size: .88rem; border: 1px dashed #91a492; border-radius: .5rem; background: #f6f7f1; padding: .66rem; }
.input-card input::file-selector-button { font: inherit; font-weight: 700; color: var(--ink); background: #e6ede0; border: 1px solid #c0cdbb; border-radius: .35rem; padding: .27rem .54rem; margin-right: .6rem; cursor: pointer; }
.input-card .file-info { margin: .4rem 0 0; overflow-wrap: anywhere; }
.file-info:empty { display: none; }
.input-card > .link-button, .input-card .inline-links { margin-top: .45rem; }
.run-bar { margin-top: 1rem; }
.muted { color: var(--muted); }
.small, .run-bar .muted { font-size: .86rem; }
.notice { border-radius: .55rem; margin-top: .9rem; padding: .7rem .95rem; }
.notice.error { background: #fff0e8; color: #802c22; border: 1px solid #d59d8b; overflow-wrap: anywhere; }

.results { margin-top: 2.1rem; border-top: 1px solid var(--line); padding-top: 1.7rem; }
.metrics { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .95rem; }
.metrics div { min-width: 8.6rem; flex: 1; border: 1px solid var(--line); background: var(--white); border-radius: .55rem; padding: .65rem .85rem; }
.metrics dt { color: var(--muted); font-size: .82rem; }
.metrics dd { margin: 0; font-size: 1.5rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.results .small { margin-block: .6rem; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: .65rem; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: .65rem .72rem; white-space: nowrap; text-align: left; vertical-align: top; }
thead th { background: #e7ede2; font-size: .78rem; }
tbody tr + tr { border-top: 1px solid #e3e7df; }
tbody tr:nth-child(even) { background: #f9faf5; }
.numeric { font-variant-numeric: tabular-nums; text-align: right; }
.identity code { display: block; margin-bottom: .23rem; }
.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; font-size: .86rem; }
.breakdown { margin-top: 1.2rem; }

.guide-grid { margin-top: 1rem; gap: 1.1rem; }
.guide article, .scope { border: 1px solid var(--line); border-radius: .85rem; background: var(--white); padding: clamp(1rem, 2.6vw, 1.65rem); }
.guide article p, .scope p { color: var(--muted); margin-top: .52rem; }
.columns { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin-block: .65rem; padding: 0; }
.columns li { max-width: 100%; overflow-wrap: anywhere; }
.columns code { display: inline-block; background: #edf2e8; border: 1px solid #dce5d8; border-radius: .3rem; padding: .12rem .38rem; font-size: .79rem; }
.scope { margin-top: 1.1rem; background: #edf2e8; }
.footer { padding-block: 1.2rem; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); flex-wrap: wrap; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 2rem); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .desktop-break { display: none; }
}

@media (max-width: 560px) {
  .top-inner { min-height: 3.65rem; }
  .top nav a:last-child { display: none; }
  .input-grid, .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .run-bar .muted { width: 100%; }
}
