:root {
  color-scheme: light;
  --ink: #14251f;
  --muted: #66736e;
  --line: #dbe4df;
  --paper: #ffffff;
  --wash: #f2f6f3;
  --green: #0b6b4f;
  --green-soft: #dff3e9;
  --amber: #996300;
  --amber-soft: #fff0c9;
  --red: #a33b32;
  --red-soft: #fbe7e4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--wash); color: var(--ink); }
.shell { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
header { margin-bottom: 28px; }
.header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.logout-form { margin: 0; }
.eyebrow, .step { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(36px, 6vw, 64px); line-height: 1; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 21px; }
.subtitle { max-width: 650px; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.card { margin-top: 18px; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 32px rgba(20, 37, 31, .055); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
label { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 750; }
input, textarea, select { width: 100%; border: 1px solid #bdcac3; border-radius: 10px; background: #fbfdfc; color: var(--ink); font: inherit; }
input { padding: 11px 13px; }
select { padding: 11px 13px; }
textarea { padding: 14px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(11, 107, 79, .14); border-color: var(--green); }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
button { border: 0; border-radius: 10px; padding: 12px 19px; background: var(--ink); color: white; font: inherit; font-weight: 750; cursor: pointer; }
button:hover { background: var(--green); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { border: 1px solid #aebdb5; background: white; color: var(--ink); }
.secondary:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.small { padding: 8px 12px; font-size: 12px; }
.working, .boundary { color: var(--muted); font-size: 13px; }
.boundary { margin: 18px 0 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 16px; }
.input-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.limit-error { color: var(--red); font-weight: 800; }
.compact-heading { margin-bottom: 14px; }
progress { width: 100%; height: 12px; accent-color: var(--green); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.metric-grid div { padding: 14px; border-radius: 10px; background: var(--wash); }
.metric-grid strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.metric-grid span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.plan-identity { overflow-wrap: anywhere; margin: 15px 0 0; color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; }
.export-actions, .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { margin-bottom: 16px; }
.filter { padding: 8px 11px; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 12px; }
.filter:hover, .filter.active { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.filter span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.batch-table { min-width: 980px; }
.batch-table th:nth-child(1), .batch-table td:nth-child(1) { width: 48px; }
.batch-table th:nth-child(2), .batch-table td:nth-child(2) { width: 90px; font-weight: 800; }
.batch-table th:nth-child(3), .batch-table td:nth-child(3) { width: 150px; }
.batch-table th:nth-child(4), .batch-table td:nth-child(4) { width: 280px; overflow-wrap: anywhere; }
.batch-table td { vertical-align: top; font-size: 12px; line-height: 1.45; }
.mismatch-row { background: #fffaf0; }
.single-panel summary { cursor: pointer; font-weight: 800; }
.single-body { padding-top: 10px; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.neutral { background: #edf1ef; color: #52615b; }
.badge.success { background: var(--green-soft); color: var(--green); }
.badge.review { background: var(--amber-soft); color: var(--amber); }
.badge.error { background: var(--red-soft); color: var(--red); }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.identity-item { min-width: 0; padding: 12px; border-radius: 10px; background: var(--wash); }
.identity-item span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.identity-item code { display: block; overflow-wrap: anywhere; font-size: 12px; }
.issues { margin-top: 16px; padding: 14px; border-radius: 10px; background: var(--amber-soft); color: #694600; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.amount { text-align: right; font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; font-weight: 750; }
.pass-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 20px 0; }
.pass { padding: 9px 4px; border-radius: 8px; background: var(--wash); text-align: center; font-size: 11px; }
.pass strong { display: block; font-size: 13px; }
.pass.qualified, .pass.complete { background: var(--green-soft); color: var(--green); }
.pass.unproven { background: var(--amber-soft); color: var(--amber); }
pre { max-height: 420px; overflow: auto; padding: 16px; border-radius: 10px; background: #11201b; color: #d9efe5; font-size: 11px; line-height: 1.5; }
.error-card { border-color: #e8b9b4; background: #fffafa; }
.error-card .step, .error-card h2 { color: var(--red); }
.auth-body { min-height: 100vh; display: grid; place-items: center; }
.auth-shell { width: min(520px, calc(100% - 28px)); padding: 36px 0; }
.auth-card { margin: 0; }
.auth-card h1 { font-size: clamp(34px, 8vw, 52px); }
.auth-step { margin-top: 24px; }
.auth-subtitle { margin-top: 8px; font-size: 15px; }
.auth-form button { width: 100%; margin-top: 22px; }
.auth-error { margin-top: 20px; padding: 13px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 13px; }
.auth-alternate { display: inline-block; margin-top: 20px; color: var(--green); font-size: 13px; font-weight: 750; }
@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 980px); padding-top: 30px; }
  .card { padding: 19px; border-radius: 14px; }
  .section-heading { display: block; }
  .section-heading .badge { margin-top: 12px; }
  .identity-grid { grid-template-columns: 1fr; }
  .pass-grid { grid-template-columns: repeat(3, 1fr); }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .input-meta { display: block; }
  .input-meta span { display: block; margin-top: 4px; }
  .header-row { display: block; }
  .logout-form { margin: 12px 0 0; }
}
