:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #5c6862;
  --paper: #f5f3ec;
  --panel: #fffdf7;
  --line: #d8d6ce;
  --green: #0f6f51;
  --green-dark: #094a38;
  --orange: #ec7c2a;
  --red: #a73535;
  --yellow: #8a6513;
  --shadow: 0 18px 48px rgb(23 32 28 / 9%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 90% 4%, rgb(236 124 42 / 14%), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, select, textarea, input { font: inherit; }

button {
  border: 1px solid var(--green-dark);
  border-radius: .55rem;
  background: var(--green-dark);
  color: white;
  cursor: pointer;
  font-weight: 700;
  min-height: 2.75rem;
  padding: .65rem 1rem;
}

button:hover { background: var(--green); }
button:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; opacity: .5; }

.button-secondary { background: transparent; color: var(--green-dark); }
.button-secondary:hover { background: rgb(15 111 81 / 8%); }
.button-tertiary { background: transparent; border-color: var(--line); color: var(--muted); }
.button-tertiary:hover { background: rgb(23 32 28 / 6%); color: var(--ink); }

.skip-link {
  background: var(--ink);
  color: white;
  left: 1rem;
  padding: .75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}
.skip-link:focus { top: 1rem; }

.masthead {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 78rem;
  padding: 1.25rem 2rem;
}

.wordmark { align-items: center; color: var(--ink); display: flex; gap: .7rem; text-decoration: none; }
.wordmark span { color: var(--orange); font-family: ui-monospace, monospace; font-size: 1.2rem; font-weight: 800; }
.status-badge { border: 1px solid var(--line); border-radius: 99rem; color: var(--muted); font-size: .75rem; font-weight: 800; padding: .35rem .65rem; }

main, footer { margin: 0 auto; max-width: 78rem; padding-left: 2rem; padding-right: 2rem; }
.hero { display: grid; gap: 4rem; grid-template-columns: minmax(0, 1.35fr) minmax(17rem, .65fr); padding: 6rem 0 4.5rem; }
.eyebrow { color: var(--green); font-size: .75rem; font-weight: 850; letter-spacing: .12em; margin: 0 0 .65rem; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: -.055em; line-height: .98; margin-bottom: 1.5rem; max-width: 11ch; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; line-height: 1.08; }
.lede { color: var(--muted); font-size: 1.2rem; max-width: 46rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; list-style: none; padding: 0; }
.hero-points li::before { color: var(--green); content: "✓"; font-weight: 900; margin-right: .45rem; }

.scope-card, .tool-shell, .limitations, .privacy, .intent-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
.scope-card { align-self: start; padding: 1.5rem; }
.scope-label { color: var(--orange); font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.scope-card > strong { display: block; font-size: 1.35rem; margin-bottom: 1rem; }
.scope-card dl { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); margin: 1rem 0; }
.scope-card dl div { display: flex; justify-content: space-between; padding: .55rem 0; }
.scope-card dt { color: var(--muted); }
.scope-card dd { color: var(--green-dark); font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 800; margin: 0; }
.scope-card p:last-child { color: var(--muted); font-size: .86rem; margin-bottom: 0; }

.tool-shell { padding: clamp(1.25rem, 4vw, 2.5rem); }
.tool-shell, .result-grid > section { min-width: 0; }
.tool-heading, .button-row, .intent-panel { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
.tool-heading h2 { margin-bottom: 0; }
label { display: block; font-weight: 750; margin: 1.5rem 0 .45rem; }
label span { color: var(--muted); font-size: .85rem; font-weight: 500; }
select, textarea { background: #fff; border: 1px solid #aeb7b1; border-radius: .55rem; color: var(--ink); padding: .8rem; width: 100%; }
select { max-width: 30rem; }
textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; min-height: 16rem; resize: vertical; tab-size: 2; }
.file-zone {
  align-items: center;
  background: rgb(15 111 81 / 4%);
  border: 1px dashed #8da098;
  border-radius: .65rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .75rem;
  padding: .85rem;
}
.file-zone[data-dragging="true"] { background: #eaf7f1; border-color: var(--green); }
.file-zone span, .input-status { color: var(--muted); font-size: .85rem; }
.input-status { margin: .45rem 0 0; overflow-wrap: anywhere; }
.input-status[data-state="error"] { color: var(--red); }
.input-status[data-state="success"] { color: var(--green-dark); }
.button-row { justify-content: flex-start; margin-top: 1rem; }
.summary { border-left: 4px solid var(--line); margin: 1.5rem 0; padding: .85rem 1rem; }
.summary-valid { background: #eaf7f1; border-color: var(--green); }
.summary-invalid { background: #fff1ed; border-color: var(--red); }
.feedback { border: 1px solid var(--line); border-radius: .6rem; margin: 0 0 1.5rem; padding: 1rem; }
.feedback legend { font-weight: 750; padding: 0 .35rem; }
.feedback legend span { color: var(--muted); font-size: .82rem; font-weight: 500; }
.feedback button { margin: .35rem .35rem 0 0; min-height: 2.25rem; padding: .35rem .7rem; }
.feedback p { color: var(--green-dark); font-size: .85rem; margin: .65rem 0 0; }
.result-grid { display: grid; gap: 2rem; grid-template-columns: minmax(16rem, .75fr) minmax(0, 1.25fr); }
.diagnostics { display: grid; gap: .65rem; list-style: none; margin: 0; padding: 0; }
.diagnostic, .empty-state { border: 1px solid var(--line); border-radius: .6rem; padding: .75rem; }
.diagnostic p { color: var(--muted); font-size: .88rem; margin-bottom: 0; }
.diagnostic-error { border-left: 4px solid var(--red); }
.diagnostic-warning { border-left: 4px solid var(--yellow); }
.diagnostic-confirmed-error { border-left: 4px solid var(--red); }
.diagnostic-confirmed-warning { border-left: 4px solid var(--yellow); }
.diagnostic-potential-issue { border-left: 4px solid var(--orange); }
.diagnostic-unsupported-check, .diagnostic-unknown { border-left: 4px solid var(--muted); }
.diagnostic a { display: inline-block; font-size: .82rem; margin-top: .4rem; }
.empty-state { color: var(--muted); }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; font-size: .85rem; min-width: 42rem; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: .7rem .55rem; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
td:nth-child(2), td:nth-child(3) { font-family: ui-monospace, monospace; word-break: break-all; }

.explanation { padding: 5rem 0 2rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
.cards article { border-top: 2px solid var(--green); padding-top: 1rem; }
.cards strong { display: block; font-size: 1.45rem; }
.cards span { color: var(--muted); font-size: .9rem; }
.limitations, .privacy, .intent-panel { margin-top: 2rem; padding: 2rem; }
.classification-guide { margin-top: 3rem; }
.classification-guide dl { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.classification-guide dl div { background: rgb(255 253 247 / 70%); border: 1px solid var(--line); border-radius: .65rem; padding: 1rem; }
.classification-guide dt { font-family: ui-monospace, monospace; font-size: .82rem; font-weight: 850; overflow-wrap: anywhere; }
.classification-guide dd { color: var(--muted); font-size: .88rem; margin: .35rem 0 0; }
.limitations { display: grid; gap: 2rem; grid-template-columns: .65fr 1.35fr; }
.limitations ul { margin: 0; padding-left: 1.25rem; }
.limitations li + li { margin-top: .65rem; }
.intent-panel > div { max-width: 46rem; }
.intent-panel p:last-child, .privacy p:last-child { color: var(--muted); margin-bottom: 0; }
.privacy { margin-bottom: 4rem; }
.source-row { grid-column: 1 / -1; }
.policy-page { max-width: 52rem; padding-bottom: 5rem; padding-top: 4rem; }
.policy-page section { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; margin-top: 1rem; padding: 1.5rem; }

footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: .8rem; justify-content: space-between; padding-bottom: 2rem; padding-top: 1.5rem; }

@media (max-width: 800px) {
  .hero, .result-grid, .limitations { grid-template-columns: 1fr; }
  .hero { gap: 2rem; padding-top: 3.5rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .classification-guide dl { grid-template-columns: 1fr; }
  .intent-panel, .tool-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .masthead, main, footer { padding-left: 1rem; padding-right: 1rem; }
  .status-badge { display: none; }
  .cards { grid-template-columns: 1fr; }
  .button-row, footer { align-items: stretch; flex-direction: column; }
  button { width: 100%; }
  .feedback button { margin-right: 0; }
  .file-zone { align-items: stretch; flex-direction: column; }
  .limitations, .privacy, .intent-panel { padding: 1.25rem; }
  table { min-width: 38rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
