:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --text: #17201d;
  --muted: #69736f;
  --line: #dfe6e3;
  --accent: #0f6b4f;
  --accent-soft: #e7f4ee;
  --warning: #8b5a00;
  --warning-bg: #fff5dc;
  --danger: #a33131;
  --danger-bg: #fff0f0;
  --shadow: 0 18px 60px rgba(26, 45, 38, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
a { color: var(--accent); }
.site-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 72px; padding: 12px clamp(20px, 5vw, 72px); background: rgba(244,247,246,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; width: max-content; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--accent); font-weight: 800; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.nav { display: flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.nav-link { border: 0; background: transparent; padding: 9px 13px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 650; font-size: 14px; }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.privacy-pill { justify-self: end; padding: 7px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
main { max-width: 1440px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 72px) 80px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.hero { display: flex; justify-content: space-between; gap: 36px; align-items: flex-end; margin: 18px 0 32px; }
.hero.compact h1, .section-heading h1 { max-width: 900px; font-size: clamp(34px, 4vw, 58px); letter-spacing: -.045em; line-height: 1.02; margin: 8px 0 14px; }
.hero-copy { max-width: 760px; font-size: 17px; color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .14em; font-weight: 800; margin: 0; }
.hero-stat { min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.hero-stat span, .hero-stat small { display: block; color: var(--muted); font-size: 12px; }
.hero-stat strong { display: block; margin: 5px 0; font-size: 17px; }
.workspace { display: grid; gap: 22px; }
.two-col { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.settlement-layout { grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.card-head > div:first-child { display: flex; align-items: center; gap: 10px; }
.card h2 { margin: 0; font-size: 19px; }
.step { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; background: #eff3f1; color: var(--muted); font-size: 11px; font-weight: 800; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.status-dot i { width: 7px; height: 7px; background: #27a273; border-radius: 50%; box-shadow: 0 0 0 4px #e3f5ed; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.wide { grid-column: 1 / -1; }
.field > span, .field > label > span { font-size: 12px; color: var(--muted); font-weight: 700; }
input, select { width: 100%; border: 1px solid #cfd8d4; background: #fbfcfc; min-height: 44px; border-radius: 10px; padding: 10px 12px; color: var(--text); outline: none; }
input:focus, select:focus { border-color: #6aa58f; box-shadow: 0 0 0 3px #e7f4ee; }
.money-input { display: grid; grid-template-columns: 32px 1fr; align-items: center; border: 1px solid #cfd8d4; background: #fbfcfc; border-radius: 10px; overflow: hidden; }
.money-input b { color: var(--muted); text-align: right; font-size: 13px; }
.money-input input { border: 0; background: transparent; }
.platform-fields { margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px dashed #cad6d1; background: #f8faf9; }
.advanced-block { margin: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.advanced-block summary { cursor: pointer; font-weight: 750; }
.advanced-block p { color: var(--muted); font-size: 12px; }
.primary-btn { width: 100%; border: 0; border-radius: 12px; background: var(--accent); color: #fff; min-height: 48px; padding: 12px 18px; font-weight: 800; cursor: pointer; box-shadow: 0 7px 24px rgba(15,107,79,.2); }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.microcopy { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 850; letter-spacing: .05em; }
.badge.good { color: var(--accent); background: var(--accent-soft); }
.badge.warn { color: var(--warning); background: var(--warning-bg); }
.badge.danger { color: var(--danger); background: var(--danger-bg); }
.badge.neutral { color: var(--muted); background: #eff3f1; }
.empty-state { min-height: 420px; display: grid; align-content: center; justify-items: center; text-align: center; color: var(--muted); padding: 40px; }
.empty-state h3 { color: var(--text); margin: 14px 0 5px; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 16px; font-size: 24px; }
.hidden { display: none !important; }
.totals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.totals-grid > div { border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #fbfcfc; }
.totals-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.totals-grid strong { font-size: 19px; }
.fee-lines { display: grid; gap: 10px; }
.fee-line { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fee-line summary { list-style: none; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; cursor: pointer; padding: 15px; }
.fee-line summary::-webkit-details-marker { display: none; }
.fee-line-title small { display: block; color: var(--muted); margin-top: 4px; }
.fee-line-amount { font-weight: 850; font-size: 17px; }
.fee-detail { border-top: 1px solid var(--line); padding: 14px 15px; background: #fafcfc; font-size: 12px; color: var(--muted); line-height: 1.65; }
.fee-detail code, .receipt-footer code { word-break: break-all; color: #41514a; }
.source-link { display: inline-block; margin-top: 7px; font-weight: 700; text-decoration: none; }
.warning-box { padding: 11px 13px; margin: 0 0 12px; border-radius: 10px; background: var(--warning-bg); color: var(--warning); font-size: 12px; }
.receipt-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin: 20px 0 28px; }
.section-heading p:not(.eyebrow) { color: var(--muted); max-width: 760px; line-height: 1.6; }
.filter-row label { display: grid; gap: 6px; min-width: 180px; font-size: 12px; color: var(--muted); }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-strip > div { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.summary-strip span { display: block; color: var(--muted); font-size: 11px; }
.summary-strip strong { font-size: 20px; }
.evidence-list { display: grid; gap: 12px; }
.evidence-card { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.evidence-card h3 { margin: 0 0 6px; }
.evidence-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0; }
.evidence-claims { display: grid; gap: 8px; }
.claim { padding: 10px; border-radius: 10px; background: #f7f9f8; font-size: 12px; }
.claim b { display: block; margin-bottom: 3px; }
.privacy-card { min-width: 250px; padding: 14px; border: 1px solid #b9ddce; background: var(--accent-soft); border-radius: 14px; }
.privacy-card strong, .privacy-card span { display: block; }
.privacy-card span { color: #456b5d; margin-top: 4px; font-size: 12px; }
.drop-zone { position: relative; min-height: 210px; border: 2px dashed #bdd0c8; border-radius: 16px; display: grid; place-items: center; align-content: center; gap: 7px; background: #f9fbfa; color: var(--muted); text-align: center; margin-top: 16px; }
.drop-zone.dragging { background: var(--accent-soft); border-color: var(--accent); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-zone strong { color: var(--text); }
.drop-icon { width: 54px; height: 54px; display: grid; place-items: center; background: white; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; font-weight: 900; color: var(--accent); }
.sample-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.mapping-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.mapping-fields.empty-mapping { min-height: 210px; grid-template-columns: 1fr; place-items: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.mapping-fields label { display: grid; gap: 5px; font-size: 11px; color: var(--muted); }
.backtest-results { margin-top: 22px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.outcome-match { color: var(--accent); font-weight: 800; }
.outcome-mismatch { color: var(--danger); font-weight: 800; }
footer { max-width: 1440px; margin: 0 auto; padding: 24px clamp(20px, 5vw, 72px) 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .privacy-pill { display: none; }
  .two-col, .settlement-layout { grid-template-columns: 1fr; }
  .hero, .section-heading { align-items: stretch; flex-direction: column; }
  .hero-stat { min-width: unset; }
  .totals-grid, .summary-strip { grid-template-columns: 1fr 1fr; }
  .evidence-card { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  main { padding-top: 22px; }
  .nav { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .nav-link { white-space: nowrap; }
  .field-grid, .mapping-fields, .totals-grid, .summary-strip { grid-template-columns: 1fr; }
  .hero.compact h1, .section-heading h1 { font-size: 36px; }
  .card { padding: 18px; }
  footer { flex-direction: column; gap: 6px; }
}
