:root {
  color-scheme: light;
  --ink: #16231d;
  --muted: #65726c;
  --line: #d9e0dc;
  --surface: #f5f7f5;
  --white: #ffffff;
  --green: #126b4d;
  --green-soft: #e3f2eb;
  --amber: #8a5b00;
  --amber-soft: #fff2d3;
  --red: #a12f2f;
  --red-soft: #fde8e8;
  --radius: 10px;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green); }
code, pre { font-family: "SFMono-Regular", Consolas, monospace; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: var(--ink); color: var(--white); border-bottom: 3px solid var(--green); }
.header-inner { min-height: 64px; display: flex; align-items: center; gap: 12px; }
.brand { color: var(--white); text-decoration: none; font-weight: 700; font-size: 18px; }
.version { color: #b8c4be; font-size: 12px; }
.account-nav { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.account-nav a, .account-nav button { color: #dfeae4; background: none; border: 0; font: inherit; cursor: pointer; }
.account-nav form { margin: 0; }
main.shell { padding-top: 28px; padding-bottom: 64px; }
h1, h2 { line-height: 1.15; letter-spacing: -0.025em; }
h1 { font-size: clamp(28px, 4vw, 42px); margin: 4px 0 8px; }
h2 { font-size: 20px; margin: 0 0 14px; }
p { margin: 0 0 14px; }
.muted, .section-heading span { color: var(--muted); }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.hero { max-width: 850px; padding: clamp(38px, 7vw, 80px) 0 52px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); }
.lead { max-width: 720px; color: #415049; font-size: 20px; }
.small { font-size: 12px; margin-top: 12px; }
.narrow { max-width: 660px; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.button-row, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--white); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { border-color: var(--green); }
.button.primary { color: var(--white); border-color: var(--green); background: var(--green); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.metric { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.metric span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.metric strong { font-size: 24px; font-weight: 700; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 30px; }
.action-card { padding: 18px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.action-card:hover { border-color: var(--green); box-shadow: 0 3px 12px rgb(18 107 77 / 10%); }
.action-card strong, .action-card span { display: block; }
.action-card span { color: var(--muted); margin-top: 6px; }
section { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 18px 0; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #fafbfa; }
tr:last-child td { border-bottom: 0; }
.dense th, .dense td { padding: 9px 10px; font-size: 13px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.actions { text-align: right; }
.status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status.large { padding: 7px 11px; }
.status.success { background: var(--green-soft); }
.state-missing_bom, .state-missing_weight, .state-missing_material, .state-unknown_plastic_scope { color: var(--amber); background: var(--amber-soft); }
.form-stack { margin-top: 24px; }
.form-stack p { margin-bottom: 18px; }
label { display: block; font-weight: 650; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid #bfc9c4; border-radius: 7px; background: var(--white); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgb(18 107 77 / 25%); border-color: var(--green); }
.helptext { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.errorlist { color: var(--red); margin: 5px 0; }
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 5px 9px; background: var(--green-soft); border-radius: 999px; font-size: 13px; }
.chip.warning { color: var(--amber); background: var(--amber-soft); }
.empty-state { text-align: center; padding: 56px 20px; border: 1px dashed #bfc9c4; border-radius: var(--radius); background: var(--white); }
.empty-inline { color: var(--muted); }
.messages { margin-bottom: 18px; }
.message { padding: 12px 14px; border-radius: 7px; background: var(--green-soft); }
.message.error { color: var(--red); background: var(--red-soft); }
.message.info, .notice { color: var(--amber); background: var(--amber-soft); }
.exception-stack { display: grid; gap: 12px; }
.exception-item { padding: 18px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--radius); }
.severity-blocker, .severity-high { border-left-color: var(--red); }
.exception-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12px; }
.exception-item h2 { margin-top: 12px; }
.inline-data { display: flex; flex-wrap: wrap; gap: 18px 28px; margin: 16px 0; }
.inline-data div { min-width: 120px; }
dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
dd { margin: 3px 0 0; }
.resolve-form { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.resolve-form .checkbox { display: flex; gap: 7px; align-items: center; min-height: 40px; font-size: 13px; }
.resolve-form .checkbox input { width: auto; margin: 0; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-column section { margin: 0; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { border-bottom: 0; }
pre { white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; padding: 14px; color: #dfeae4; background: var(--ink); border-radius: 7px; font-size: 12px; }
.report-header { margin-bottom: 30px; }
.audit-footer { background: #f8faf8; }
.example-box, .notice { padding: 12px 14px; border-radius: 7px; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 650; }
.resolution-buttons { margin-top: 14px; }
.legend { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.legend-known, .legend-null { min-width: 26px; padding: 2px 6px; text-align: center; border-radius: 5px; background: var(--green-soft); color: var(--green); }
.intent-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.intent-list li { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfb; }
.keyword-table td:first-child { font-weight: 650; }
.consent-banner { position: fixed; right: 18px; bottom: 18px; z-index: 20; width: min(520px, calc(100% - 36px)); padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgb(22 35 29 / 18%); }
.consent-banner p { margin-bottom: 10px; }

@media (max-width: 760px) {
  .page-heading, .section-heading { align-items: stretch; flex-direction: column; }
  .two-column { grid-template-columns: 1fr; }
  .resolve-form { grid-template-columns: 1fr; }
  .button-row .button { flex: 1; }
}

@media print {
  body { background: var(--white); }
  .site-header, .no-print, .messages, .button { display: none !important; }
  main.shell { width: 100%; padding: 0; }
  section, .metric, .table-wrap { break-inside: avoid; border-color: #bbb; }
}
