:root {
  color-scheme: light;
  --ink: #1c211d;
  --muted: #62685f;
  --paper: #f4f1e8;
  --paper-2: #ebe7dc;
  --line: #c9c6bb;
  --acid: #c9f757;
  --acid-deep: #a8d63c;
  --good: #3a6b44;
  --warn: #a8512d;
  --white: #fffef9;
  --shadow: 0 22px 60px rgba(31, 38, 31, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(28, 33, 29, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 33, 29, 0.034) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, label:focus-visible {
  outline: 3px solid var(--acid-deep);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--acid);
  font-weight: 800;
}
.skip-link:focus { top: 16px; }

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 4.5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.9);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 5px;
  background: var(--ink);
}
.brand-mark i { display: block; background: var(--acid); }
.brand-mark i:nth-child(2) { transform: translateY(4px); }
.brand-mark i:nth-child(3) { transform: translateY(8px); }

.topbar-actions { display: flex; align-items: center; gap: 18px; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4d9158; box-shadow: 0 0 0 4px rgba(77,145,88,.12); }

.credit-pill {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 13px;
  color: var(--paper);
  background: var(--ink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.credit-pill #creditCount { color: var(--acid); font-size: 17px; line-height: 1; letter-spacing: -.03em; }

main { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }

.intro { padding: clamp(54px, 8vw, 105px) 0 clamp(34px, 5vw, 64px); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span + span::before { content: ""; display: inline-block; width: 23px; height: 1px; margin: 0 10px 3px 0; background: var(--ink); }
h1 { max-width: 900px; margin: 0; font-size: clamp(42px, 7.4vw, 94px); line-height: .94; letter-spacing: -.067em; font-weight: 860; }
.intro-copy { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; letter-spacing: -.018em; }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(300px, .72fr); box-shadow: var(--shadow); }
.upload-panel { min-height: 520px; padding: clamp(25px, 4vw, 48px); background: var(--white); border: 1px solid var(--ink); }
.panel-heading, .section-heading > div { display: flex; align-items: center; gap: 17px; }
.panel-heading { margin-bottom: 34px; }
.step-number { width: 32px; height: 32px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.panel-kicker { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h2, h3, p { text-wrap: pretty; }
.panel-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }

.dropzone {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 32px 22px;
  border: 1.5px dashed #8f958a;
  background: #f8f6ef;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.dropzone:hover, .dropzone.is-dragging { transform: translateY(-2px); border-color: var(--ink); background: #f0f6df; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone strong { font-size: 21px; letter-spacing: -.025em; }
.dropzone > span:last-child { color: var(--muted); font-size: 13px; }
.upload-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 50%; background: var(--acid); }
.upload-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; }

.sample-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 21px 0; }
.sample-row p { margin: 0; color: var(--muted); font-size: 13px; }
.text-button { min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid currentColor; color: var(--ink); background: transparent; cursor: pointer; font-weight: 760; }
.text-button:hover { color: #49761e; }
.text-button.compact { min-height: 36px; font-size: 12px; }

.assurance-row { display: flex; flex-wrap: wrap; gap: 12px 22px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 650; }
.assurance-row span { display: inline-flex; align-items: center; gap: 7px; }
.assurance-row svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }

.engine-panel { padding: 25px 28px 30px; color: #e8ecdf; background: var(--ink); border: 1px solid var(--ink); }
.engine-topline { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding-bottom: 21px; border-bottom: 1px solid rgba(255,255,255,.16); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .08em; }
.engine-light { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px rgba(201,247,87,.7); }
.engine-state { color: var(--acid); }
.engine-steps { margin: 0; padding: 20px 0 10px; list-style: none; }
.engine-steps li { display: grid; grid-template-columns: 31px 1fr; gap: 13px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.engine-steps li > span { color: #879084; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.engine-steps strong { display: block; margin-bottom: 4px; font-size: 14px; }
.engine-steps small { color: #9ba498; font-size: 11px; line-height: 1.45; }
.engine-outcome { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 15px; margin-top: 25px; }
.engine-outcome span { color: #9ba498; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.engine-outcome strong { color: var(--acid); font-size: 16px; }
.engine-outcome em { color: #a8afa5; font-size: 10px; font-style: normal; font-weight: 500; }

.processing-panel { margin-top: 26px; padding: 28px; border: 1px solid var(--ink); background: var(--white); box-shadow: var(--shadow); }
.processing-copy { display: flex; align-items: center; gap: 14px; }
.processing-copy p { margin: 0 0 3px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
.progress-track { height: 4px; margin: 24px 0 11px; overflow: hidden; background: var(--paper-2); }
.progress-track span { display: block; width: 70%; height: 100%; background: var(--acid-deep); animation: progress 1.1s ease-in-out infinite alternate; }
.processing-panel > p { margin: 0; color: var(--muted); font-size: 12px; }

.results { margin-top: 30px; }
.results-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.results-eyebrow { margin-bottom: 12px; }
.results-header h2 { margin: 0; font-size: clamp(32px, 5vw, 56px); letter-spacing: -.055em; }
.results-header p:last-child { margin: 12px 0 0; color: var(--muted); }

.primary-button, .secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border: 1px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.primary-button { color: var(--ink); background: var(--acid); box-shadow: 4px 4px 0 var(--ink); }
.primary-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); background: #d6ff6e; }
.secondary-button { color: var(--ink); background: transparent; }
.secondary-button:hover { background: var(--white); transform: translateY(-2px); }

.result-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); background: var(--white); }
.result-metrics > div { min-height: 128px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: end; padding: 22px; border-right: 1px solid var(--line); }
.result-metrics > div:last-child { border-right: 0; }
.result-metrics span { grid-column: 1 / -1; align-self: start; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.result-metrics strong { font-size: 44px; line-height: .85; letter-spacing: -.06em; }
.result-metrics small { color: var(--muted); font-size: 11px; }

.download-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 21px; border: 1px solid var(--ink); border-top: 0; background: var(--paper-2); }
.download-strip > div { display: flex; align-items: center; gap: 13px; }
.download-strip strong, .download-strip small { display: block; }
.download-strip small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.file-badge { width: 42px; height: 42px; display: grid; place-items: center; color: var(--acid); background: var(--ink); font-size: 9px; font-weight: 900; letter-spacing: .08em; }

.results-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); margin-top: 24px; border: 1px solid var(--ink); background: var(--white); }
.table-panel, .detail-panel { min-width: 0; padding: 25px; }
.detail-panel { border-left: 1px solid var(--line); background: #eeeadf; }
.section-heading { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 10px; color: var(--muted); border-bottom: 1px solid var(--ink); text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td:nth-child(2) { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.row-status { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 800; }
.row-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.change-count { display: inline-grid; min-width: 29px; height: 24px; place-items: center; border: 1px solid var(--line); font-weight: 800; }

.change-cards { display: grid; gap: 11px; }
.change-card { padding: 15px; border: 1px solid var(--line); background: var(--white); }
.change-card > span { display: block; margin-bottom: 11px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.change-value { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: start; }
.change-value code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #777d73; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.change-value code:last-child { color: var(--ink); font-weight: 800; }
.change-value b { color: var(--good); font-size: 12px; }
.empty-change { color: var(--muted); font-size: 12px; line-height: 1.5; }

.quarantine-panel { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 20px; padding: 22px 24px; border: 1px solid #ad6847; background: #f5e7dc; }
.quarantine-panel h3 { margin: 0 0 5px; font-size: 15px; }
.quarantine-panel p { margin: 0; color: #76523f; font-size: 12px; line-height: 1.5; }

.paywall { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 30px; margin-top: 24px; padding: 30px; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); box-shadow: var(--shadow); }
.paywall-copy h3 { margin: 4px 0 9px; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.045em; }
.paywall-copy > p:last-child { max-width: 560px; margin: 0; color: #a8afa5; font-size: 13px; line-height: 1.5; }
.paywall .panel-kicker { color: var(--acid); }
.price-block { display: flex; align-items: center; gap: 13px; padding-right: 30px; border-right: 1px solid rgba(255,255,255,.18); }
.price-block strong { color: var(--acid); font-size: 42px; letter-spacing: -.06em; }
.price-block span { color: #a8afa5; font-size: 11px; line-height: 1.5; }
.pay-button { white-space: nowrap; }
.test-note { grid-column: 3; color: #91998e; text-align: center; font-size: 9px; }

.definition-strip { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr; gap: 15px; align-items: center; margin: clamp(55px, 8vw, 100px) 0; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.definition-strip span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .11em; }
.definition-strip strong { font-size: 13px; }

footer { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 4.5vw, 72px); color: var(--muted); border-top: 1px solid var(--line); background: var(--paper-2); font-size: 11px; }
footer nav { display: flex; gap: 16px; }
footer a { color: inherit; text-underline-offset: 3px; }
footer a:hover { color: var(--ink); }

.legal-main { width: min(780px, calc(100% - 40px)); margin: 0 auto; padding: clamp(55px, 9vw, 110px) 0; }
.legal-main h1 { font-size: clamp(42px, 7vw, 76px); }
.legal-main .effective { margin: 20px 0 50px; color: var(--muted); font-size: 13px; }
.legal-content { padding: clamp(24px, 5vw, 48px); border: 1px solid var(--ink); background: var(--white); }
.legal-content h2 { margin: 34px 0 10px; font-size: 20px; letter-spacing: -.03em; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: #4f554e; font-size: 14px; line-height: 1.7; }
.legal-content ul { padding-left: 20px; }
.legal-content a { color: var(--ink); text-underline-offset: 3px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 380px; padding: 15px 18px; color: var(--white); background: #843f2f; box-shadow: 5px 5px 0 var(--ink); font-size: 13px; line-height: 1.45; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress { from { transform: translateX(-30%); } to { transform: translateX(70%); } }

@media (max-width: 900px) {
  .tool-grid, .results-grid { grid-template-columns: 1fr; }
  .engine-panel { min-height: auto; }
  .detail-panel { border-left: 0; border-top: 1px solid var(--line); }
  .paywall { grid-template-columns: 1fr auto; }
  .paywall-copy { grid-column: 1 / -1; }
  .test-note { grid-column: 2; }
  .result-metrics { grid-template-columns: repeat(2, 1fr); }
  .result-metrics > div:nth-child(2) { border-right: 0; }
  .result-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .definition-strip { grid-template-columns: auto 1fr; }
}

@media (max-width: 620px) {
  .topbar { min-height: 66px; padding-inline: 16px; }
  .privacy-note { display: none; }
  main { width: min(100% - 24px, 1220px); }
  .intro { padding-top: 48px; }
  h1 { font-size: clamp(40px, 14vw, 62px); }
  .intro-copy { font-size: 16px; }
  .upload-panel { min-height: auto; padding: 22px; }
  .dropzone { min-height: 230px; }
  .sample-row { align-items: flex-start; flex-direction: column; }
  .results-header, .download-strip, .quarantine-panel { align-items: stretch; flex-direction: column; }
  .results-header .secondary-button, .download-strip .primary-button, .quarantine-panel .secondary-button { width: 100%; }
  .result-metrics > div { min-height: 108px; padding: 16px; }
  .result-metrics strong { font-size: 36px; }
  .table-panel, .detail-panel { padding: 19px 15px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .paywall { grid-template-columns: 1fr; padding: 24px; }
  .price-block { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .pay-button { width: 100%; }
  .test-note { grid-column: 1; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 20px; }
  footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
