@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap");

:root {
  --ink: #1c2433;
  --ink-soft: #5b6578;
  --paper: #e9eef5;
  --sheet: #ffffff;
  --line: #d7deea;
  --signal: #252636;
  --signal-deep: #1a1b28;
  --verified: #3f4a5c;
  --warning: #8a6a2f;
  --shadow: 0 10px 40px rgba(28, 36, 51, 0.06);
  --header: #ffffff;
  --nyx: #252636;
  --jade: #252636;
  --jade-soft: #eef1f6;
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, a, code, .utility-label, .eyebrow, .privacy-line,
.local-indicator, .file-slot em, .review-footer p, h1, h2, h3, .brand-bar a {
  font-family: Inter, "Segoe UI", sans-serif;
}

h1, h2, h3 {
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(37, 38, 54, 0.22);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }

.brand-bar {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 32px);
  background: var(--header);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-bar a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-bar a span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--nyx) url("/favicon.svg") center / 32px 32px no-repeat;
  color: transparent;
  font-size: 0;
}

.brand-bar p,
.local-indicator,
.intake-note,
.retention-note {
  display: none !important;
}

.new-check {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 80px);
  position: relative;
  overflow: hidden;
}

.new-check::before {
  content: "";
  position: absolute;
  width: 42vw;
  height: 42vw;
  right: -12vw;
  top: -18vw;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 38, 54, 0.05), transparent 68%);
  box-shadow: none;
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; max-width: 720px; }

.eyebrow, .utility-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.hero-copy h1,
.review-header h1,
.report-view h1,
.processing-view h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.05;
  margin: 16px 0 20px;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.hero-copy > p {
  max-width: 560px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
}

.privacy-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.privacy-line span { color: var(--ink-soft); }

.intake-panel {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.intake-panel::before,
.intake-panel::after { display: none; }

.intake-panel h2,
.observation-table h2 {
  font-size: 28px;
  margin: 6px 0 20px;
}

.file-slot {
  border-top: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  padding: 16px 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.file-slot:hover { background: #f4f7fb; }

.file-slot small { color: var(--ink-soft); }

.file-slot em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--nyx);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease;
}

.primary-action:hover:not(:disabled) {
  background: #1a1b28;
}

.primary-action:disabled {
  cursor: not-allowed;
  background: #d7deea;
  color: #7b8494;
  opacity: 1;
}

.intake-panel .primary-action { width: 100%; margin-top: 16px; }

.error-banner {
  padding: 12px 14px;
  border-left: 3px solid #8b3a3a;
  background: #f6f1f1;
  color: #6b3030;
  border-radius: 8px;
}

.processing-view,
.report-view {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.processing-view > p,
.report-view > p {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.processing-orbit {
  width: 96px;
  height: 96px;
  margin-top: 24px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.processing-orbit span { background: var(--signal); }
.processing-orbit--error span { background: #8b3a3a; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pass { color: #3f4a5c; }
.status-warning { color: var(--warning); }
.status-fail { color: #8b3a3a; }
.status-needs-review { color: #4b5563; }

.review-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 48px) 80px;
}

.review-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.summary-rail {
  position: sticky;
  top: 88px;
  align-self: start;
  border-top: 3px solid var(--nyx);
  padding-top: 16px;
}

.summary-rail dl { margin: 18px 0; }
.summary-rail dl div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.summary-rail dt { color: var(--ink-soft); }
.summary-rail dd { margin: 0; font-weight: 700; font-size: 18px; }

.text-action {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.finding-strip { display: grid; gap: 10px; margin-bottom: 24px; }
.finding-strip article {
  display: grid;
  grid-template-columns: minmax(190px, auto) 1fr;
  gap: 16px;
  align-items: baseline;
  border-left: 3px solid var(--nyx);
  background: var(--sheet);
  padding: 14px 16px;
  border-radius: 12px;
}

.evidence-card,
.observation-table {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.evidence-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.evidence-stage {
  margin: 24px;
  padding: 16px;
  background: #eef2f7;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.registration-mark--tl { border-color: var(--signal); }
.registration-mark--br { border-color: var(--signal); }

.evidence-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  color: var(--ink-soft);
  font-size: 12px;
}

.evidence-ledger code {
  background: var(--nyx);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
}

.observation-table { padding: 24px; }

.observation-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(160px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.observation-row input,
.observation-row select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
}

.review-footer {
  background: transparent;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 0;
  margin-top: 20px;
}

.report-actions { display: flex; gap: 12px; margin-top: 24px; }

.danger-action {
  border: 1px solid #8b3a3a;
  color: #8b3a3a;
  background: transparent;
  padding: 0 18px;
  min-height: 44px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 900px) {
  .new-check {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }
  .review-layout { grid-template-columns: 1fr; }
  .summary-rail { position: static; }
  .review-header { flex-direction: column; }
  .observation-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand-bar { padding: 0 16px; }
  .new-check { padding: 28px 16px 56px; }
  .file-slot { grid-template-columns: 1fr; }
  .file-slot em { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .review-footer, .report-actions { flex-direction: column; align-items: stretch; }
  .review-footer .primary-action { width: 100%; }
}
