:root {
  --ink: #172126;
  --muted: #607078;
  --paper: #f5f7f3;
  --surface: #ffffff;
  --line: #dbe2dc;
  --teal: #075e54;
  --teal-dark: #044840;
  --teal-soft: #e4f2ed;
  --amber: #a95716;
  --amber-soft: #fff0dc;
  --red: #9d3030;
  --red-soft: #fde8e8;
  --blue: #315c9b;
  --blue-soft: #e9f0fb;
  --shadow: 0 18px 50px rgba(33, 55, 46, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 4%, rgba(240, 188, 114, 0.2), transparent 23rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
select,
input {
  font: inherit;
}

button,
select,
.drop-zone {
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:focus-visible,
select:focus-visible,
.drop-zone:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(49, 92, 155, 0.32);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 11px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.local-badge {
  padding: 7px 11px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #c5dfd5;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 48px;
  align-items: end;
  padding: 72px 0 58px;
}

.eyebrow,
.step-label,
.privacy-kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.hero-text {
  max-width: 700px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 18px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #3f504d;
  font-size: 14px;
  font-weight: 700;
}

.trust-list span::before {
  content: "✓";
  margin-right: 7px;
  color: var(--teal);
}

.privacy-card {
  padding: 27px;
  background: #18352f;
  border-radius: var(--radius);
  color: #dfece8;
  box-shadow: var(--shadow);
}

.privacy-card .privacy-kicker {
  color: #9dd4c2;
}

.privacy-card p:last-child {
  margin-bottom: 0;
}

.workspace,
.results {
  margin-bottom: 32px;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.section-heading,
.review-toolbar,
.analyze-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-heading > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.quick-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0 14px;
  padding: 0;
  list-style: none;
}

.quick-steps li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 15px;
  color: #42534d;
  background: #f6f9f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}

.quick-step-number {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.export-help {
  margin-bottom: 18px;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.export-help summary {
  padding: 13px 15px;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.export-help-body {
  padding: 0 18px 15px 35px;
  color: var(--muted);
  font-size: 13px;
}

.export-help-body ol {
  margin: 0 0 10px;
  padding-left: 18px;
}

.export-help-body p {
  margin-bottom: 0;
}

.drop-zone {
  margin-top: 0;
  padding: 42px 24px;
  text-align: center;
  background: #fbfcfa;
  border: 2px dashed #bfcac2;
  border-radius: var(--radius);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  background: var(--teal-soft);
  border-color: var(--teal);
}

.upload-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 14px;
  font-size: 28px;
  font-weight: 700;
}

.drop-title {
  margin-bottom: 3px;
  font-size: 19px;
  font-weight: 750;
}

.drop-help,
.muted {
  color: var(--muted);
}

.drop-help {
  margin-bottom: 20px;
  font-size: 14px;
}

.button {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 750;
}

.button-primary {
  color: #fff;
  background: var(--teal);
}

.button-primary:hover:not(:disabled) {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.button-secondary:hover {
  border-color: #a9b7ad;
  box-shadow: 0 7px 18px rgba(33, 55, 46, 0.08);
}

.demo-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 16px;
  background: #fff8ed;
  border: 1px solid #efd6b5;
  border-radius: 12px;
}

.demo-title {
  margin-bottom: 2px;
  font-weight: 800;
}

.demo-panel .muted {
  margin-bottom: 0;
  font-size: 13px;
}

.button-demo {
  flex: 0 0 auto;
  color: #713b0d;
  background: #ffe5bf;
  border-color: #e5bd86;
}

.button-demo:hover:not(:disabled) {
  background: #ffd89e;
  transform: translateY(-1px);
}

.demo-notice {
  margin: 12px 0 0;
  padding: 11px 14px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #c8e2d8;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.message-area {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.message {
  margin: 0;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.message-error {
  color: #7d2424;
  background: var(--red-soft);
  border: 1px solid #f2c8c8;
}

.message-warning {
  color: #78400f;
  background: var(--amber-soft);
  border: 1px solid #f0d3ae;
}

.message-success {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #c8e2d8;
}

.file-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px 16px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.file-name {
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.file-meta,
.file-warning {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.file-warning {
  color: var(--amber);
}

.type-select,
.filter-label select {
  width: 100%;
  min-height: 42px;
  padding: 8px 34px 8px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfc9c1;
  border-radius: 9px;
}

.remove-file,
.text-button {
  padding: 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.remove-file:hover,
.text-button:hover {
  color: var(--red);
}

.analyze-row {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.analyze-title {
  margin-bottom: 3px;
  font-weight: 750;
}

.analyze-row .muted {
  margin-bottom: 0;
  font-size: 14px;
}

.results-heading {
  margin-bottom: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.summary-card {
  min-height: 112px;
  padding: 17px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.summary-card.is-highlight {
  background: var(--amber-soft);
  border-color: #efd0a7;
}

.summary-value {
  display: block;
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.count-note,
.download-note {
  color: var(--muted);
  font-size: 13px;
}

.count-note {
  margin: 14px 0 18px;
  padding: 12px 14px;
  color: #465c55;
  background: var(--teal-soft);
  border-radius: 10px;
}

.classification-guide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.classification-guide article {
  padding: 15px;
  background: #fafbf9;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.classification-guide p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-panel {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.toolbar-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.filter-label {
  display: grid;
  min-width: 235px;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.download-note {
  margin: 18px 0 14px;
  padding: 10px 12px;
  background: var(--blue-soft);
  border-radius: 9px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table-scroll-note {
  display: none;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: #52615c;
  background: #f2f5f1;
  font-size: 11px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbfcfa;
}

.email-cell {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.category-pill {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.category-archive {
  color: #78400f;
  background: var(--amber-soft);
}

.category-manual {
  color: #802727;
  background: var(--red-soft);
}

.category-cleaned {
  color: #315c9b;
  background: var(--blue-soft);
}

.category-none {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.empty-state {
  padding: 36px 12px;
  text-align: center;
  color: var(--muted);
}

.safety-callout {
  margin-top: 26px;
  padding: 20px;
  background: #fff8ed;
  border-left: 4px solid #d27a28;
  border-radius: 9px;
}

.safety-title {
  margin-bottom: 3px;
  font-weight: 800;
}

.safety-callout p:last-child {
  margin-bottom: 0;
  color: #694c32;
  font-size: 14px;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--teal);
  font-weight: 700;
}

.footer-notices {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.tests-page main {
  max-width: 920px;
  padding: 54px 0;
}

.test-hero {
  margin-bottom: 28px;
}

.test-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.test-count {
  min-width: 130px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.test-count strong {
  display: block;
  font-size: 28px;
}

.test-list {
  display: grid;
  gap: 8px;
}

.test-item {
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.test-pass {
  border-left: 4px solid var(--teal);
}

.test-fail {
  border-left: 4px solid var(--red);
}

.test-item p {
  margin-bottom: 0;
}

.test-detail {
  margin-top: 4px;
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
  }

  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-steps {
    grid-template-columns: 1fr;
  }

  .file-card {
    grid-template-columns: 1fr auto;
  }

  .file-card .type-select {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .review-toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .table-scroll-note {
    display: block;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    align-items: flex-start;
    gap: 12px;
  }

  .local-badge {
    font-size: 11px;
  }

  h1 {
    font-size: 43px;
  }

  .workspace,
  .results {
    padding: 22px;
  }

  .section-heading,
  .analyze-row,
  .demo-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .classification-guide {
    grid-template-columns: 1fr;
  }

  .file-card {
    gap: 10px;
  }

  .footer-main {
    flex-direction: column;
    gap: 8px;
  }
}
