:root {
  color-scheme: light;
  --page: #f5f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5f6f82;
  --line: #dce3ec;
  --line-strong: #a8b6c7;
  --blue: #0d5e8c;
  --blue-dark: #073e61;
  --red: #b3261e;
  --orange: #9a671f;
  --gold: #b68a3a;
  --ok-bg: #e5f5ec;
  --warn-bg: #fff4db;
  --bad-bg: #ffece7;
  --info-bg: #e8f2fb;
  --sidebar: #0f2233;
  --sidebar-panel: #172d41;
  --sidebar-line: #2c4860;
  --sidebar-ink: #f8fbff;
  --sidebar-muted: #c7d6e2;
}

* { box-sizing: border-box; letter-spacing: 0; }
body {
  margin: 0;
  background: linear-gradient(180deg, #fbfcff 0, var(--page) 100%);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}
button, input, select { font: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 18px 16px 22px;
  background: linear-gradient(180deg, rgba(13, 94, 140, .25), rgba(182, 138, 58, .08) 52%, transparent 78%), var(--sidebar);
  color: var(--sidebar-ink);
  border-right: 1px solid #12283a;
  box-shadow: 14px 0 34px rgba(15, 23, 42, .22);
}

.brand { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.brand strong { display: block; font-size: 17px; }
.brand span { display: block; color: var(--sidebar-muted); font-size: 12px; margin-top: 3px; }
.mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fffaf0;
  background: linear-gradient(145deg, #08486d, #0d5e8c 58%, #b68a3a);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.side-section, .side-note {
  border: 1px solid var(--sidebar-line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(180deg, #1a344b, var(--sidebar-panel));
  padding: 13px;
  margin: 12px 0;
}
.side-section h2 { margin: 0 0 10px; font-size: 16px; }
label { display: block; margin: 12px 0 7px; font-weight: 760; }
input, select {
  width: 100%;
  border: 1px solid #c7d7e6;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fbff;
  color: #111827;
  outline: none;
}
input:focus, select:focus { box-shadow: 0 0 0 3px rgba(13, 94, 140, .18); }

.dropzone {
  min-height: 128px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  padding: 12px;
  background: #14283a;
}
.dropzone.is-dragging { border-color: var(--gold); background: #203b52; }
.dropzone strong { display: block; font-size: 14px; }
.dropzone span { display: block; color: var(--sidebar-muted); font-size: 12px; line-height: 1.45; margin: 5px 0 10px; }
.dropzone input { background: transparent; border: 0; padding: 0; color: var(--sidebar-muted); }
.dropzone input::file-selector-button {
  margin-right: 10px;
  border: 1px solid #c7d7e6;
  border-radius: 8px;
  background: #f6f9fc;
  color: #132536;
  font-weight: 850;
  padding: 10px 12px;
  cursor: pointer;
}
.file-meta { display: grid; gap: 5px; margin-top: 9px; color: var(--sidebar-muted); font-size: 12px; }
.file-list { display: grid; gap: 4px; }
.file-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--sidebar-line);
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--sidebar-ink);
  background: #112436;
}
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
button {
  min-height: 43px;
  border: 1px solid #c7d7e6;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
  background: #fbfdff;
  color: #151f2a;
}
button.primary { grid-column: 1 / -1; background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover { background: var(--blue-dark); }
button:disabled { cursor: not-allowed; background: #d6dde5; color: #3f4a56; }
.notice { min-height: 18px; margin: 10px 0 0; color: var(--sidebar-muted); font-size: 12px; line-height: 1.4; }
.notice.ok { color: #cbe8d7; }
.notice.error { color: #ffd5ce; }
.side-note { color: var(--sidebar-muted); font-size: 12px; line-height: 1.45; }
.side-note b { display: block; color: var(--sidebar-ink); margin-bottom: 4px; }
.contact-note a {
  display: block;
  margin-top: 6px;
  color: #d8eefb;
  font-weight: 800;
  text-decoration: none;
}
.contact-note a:hover { text-decoration: underline; }

.main { min-width: 0; padding: 28px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.eyebrow { margin: 0 0 8px; color: var(--blue); font-weight: 850; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 56px); line-height: 1; }
.hero p:last-child { max-width: 850px; color: var(--muted); line-height: 1.6; font-size: 17px; }
.hero-panel {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}
.hero-panel span { display: block; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.hero-panel strong { display: block; margin-top: 8px; font-size: 22px; line-height: 1.15; }

.coverage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.coverage article, .metric, .coverage-card, .executive-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}
.coverage span, .metric span, .coverage-card span, .executive-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.coverage strong { display: block; margin-top: 7px; line-height: 1.25; }

.offer-band {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 18px;
  margin: 0 0 22px;
  background: #fff;
}
.offer-band span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.offer-band strong {
  display: block;
  margin-top: 5px;
  font-size: 23px;
}
.offer-band p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.offer-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid #c7d7e6;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
  text-decoration: none;
}
.offer-actions a + a {
  color: var(--blue-dark);
  background: #f8fbff;
}

.empty-state, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--panel);
}
.empty-state strong { display: block; font-size: 24px; }
.empty-state > span { display: block; margin-top: 7px; color: var(--muted); }
.empty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.empty-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}
.empty-grid b, .empty-grid small { display: block; }
.empty-grid small { color: var(--muted); margin-top: 5px; line-height: 1.35; }

.summary-head, .toolbar, .executive-strip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.summary-head h2 { margin: 0 0 5px; font-size: 27px; }
.summary-head p { margin: 0; color: var(--muted); }
.status-pill {
  white-space: nowrap;
  border: 1px solid #bdd1df;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--blue-dark);
  background: var(--info-bg);
  font-weight: 850;
}
.coverage-grid, .grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric strong { display: block; font-size: 28px; }
.coverage-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.35; }
.executive-strip { margin-top: 18px; align-items: stretch; }
.executive-card { flex: 1; }
.executive-card strong { display: block; margin-top: 7px; line-height: 1.35; }
.toolbar { margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn { min-height: 36px; padding: 8px 11px; }
.filter-btn.is-active { background: var(--blue); color: white; border-color: var(--blue); }
.table-search { max-width: 420px; background: white; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; background: white; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
th { position: sticky; top: 0; background: #edf3f8; color: #273545; z-index: 1; }
code { font-family: Consolas, Monaco, monospace; font-size: 12px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}
.status-chip.ok { color: #12543d; background: var(--ok-bg); }
.status-chip.warning { color: #765016; background: var(--warn-bg); }
.status-chip.error { color: #842b2c; background: var(--bad-bg); }
.status-chip.info { color: #264d5a; background: var(--info-bg); }
.empty-row { display: none; padding: 16px; color: var(--muted); background: white; }

.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  margin-top: 12px;
}
.result-card summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}
.doc-title { font-weight: 850; }
.doc-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.doc-caret { color: var(--blue); font-weight: 850; }
.detail-body { border-top: 1px solid var(--line); padding: 14px; }
.issue-table { min-width: 860px; }
.issue-table th { position: static; }
.severity-error td:first-child { border-left: 4px solid var(--red); }
.severity-warning td:first-child { border-left: 4px solid var(--orange); }
.severity-passed td:first-child { border-left: 4px solid #16835d; }
.privacy {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #f8fafc;
}
.privacy strong { color: var(--ink); margin-right: 8px; }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .hero { grid-template-columns: 1fr; }
  .coverage, .coverage-grid, .grid, .empty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .main { padding: 18px; }
  .coverage, .coverage-grid, .grid, .empty-grid { grid-template-columns: 1fr; }
  .summary-head, .toolbar, .executive-strip, .offer-band { display: grid; }
  .table-search { max-width: none; }
  .result-card summary { grid-template-columns: 1fr; }
}
