:root {
  color-scheme: light;
  --page: #edf3ef;
  --panel: #ffffff;
  --panel-soft: #fffdf7;
  --ink: #182332;
  --muted: #657180;
  --line: #dfe7e3;
  --line-strong: #c8d3ce;
  --teal: #0f3c34;
  --teal-2: #245b65;
  --teal-3: #12352e;
  --sidebar: #0d251f;
  --sidebar-panel: #142f28;
  --sidebar-line: #29473f;
  --sidebar-muted: #b9c8c1;
  --gold: #c9963f;
  --gold-soft: #f7d890;
  --cream: #fbf5e8;
  --ok-bg: #dcf3e9;
  --warn-bg: #fff1d4;
  --bad-bg: #ffe8e2;
  --info-bg: #e8f4f7;
}

* { box-sizing: border-box; letter-spacing: 0; }
body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgba(15, 60, 52, .08), transparent 28%), var(--page);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}
button, input, select { font: inherit; }
a { color: #14605a; }

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px 20px 26px;
  color: #f7fbf8;
  background: linear-gradient(180deg, rgba(19, 83, 72, .92), rgba(11, 31, 26, .96)), var(--sidebar);
  border-right: 1px solid #071713;
  box-shadow: 14px 0 36px rgba(20, 34, 29, .22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
}
.brand strong { display: block; font-size: 16px; line-height: 1.1; }
.brand span { display: block; color: var(--sidebar-muted); font-size: 12px; margin-top: 4px; }
.mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #effff8;
  font-size: 13px;
  font-weight: 950;
  background: linear-gradient(145deg, #178070, #225f63);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 12px 24px rgba(0, 0, 0, .22);
}

.side-section {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--sidebar-line);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(20, 47, 40, .92);
}
.side-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.2;
}
.control-panel p {
  margin: 0;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.45;
}
.mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.mode-chips span {
  border: 1px solid rgba(247, 216, 144, .38);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--gold-soft);
  background: rgba(0, 0, 0, .16);
  font-size: 11px;
  font-weight: 900;
}

label {
  display: block;
  margin: 12px 0 7px;
  color: #dbe7e2;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
input, select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8cbb7;
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  color: var(--ink);
  background: #fff8ec;
}
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 150, 63, .24);
}

.plan-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
}
.plan-card > span {
  align-self: flex-start;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: #19251d;
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 950;
}
.plan-card strong { display: block; font-size: 13px; }
.plan-card p {
  margin: 4px 0 0;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.35;
}

button,
.request-grid a {
  min-height: 40px;
  border: 1px solid #dfcda8;
  border-radius: 8px;
  padding: 10px 12px;
  color: #17211c;
  background: var(--cream);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button.primary {
  width: 100%;
  margin-top: 12px;
  color: #1d251c;
  background: linear-gradient(180deg, #f6d88c, #e8bf65);
  border-color: #e5be6b;
}
button:disabled {
  cursor: not-allowed;
  color: #51605b;
  background: #cbd6d0;
  border-color: #cbd6d0;
}
.request-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.request-grid a:last-child { grid-column: 1 / -1; }
.quick-contact {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.quick-contact a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  padding: 9px 10px;
  color: #e7f2ed;
  background: rgba(0, 0, 0, .14);
  text-decoration: none;
}
.quick-contact span { color: var(--sidebar-muted); font-size: 12px; }
.quick-contact strong { color: var(--gold-soft); font-size: 12px; }

.dropzone {
  min-height: 116px;
  display: grid;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4, 18, 15, .18);
}
.dropzone.is-dragging {
  border-color: var(--gold);
  background: rgba(201, 150, 63, .13);
}
.dropzone strong { display: block; font-size: 13px; }
.dropzone span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.38;
  margin-top: 4px;
}
.dropzone input.file-native {
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  color: var(--sidebar-muted);
  background: transparent;
  font-size: 12px;
}
.dropzone input.file-native::file-selector-button {
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid #ddcba5;
  border-radius: 8px;
  padding: 10px 12px;
  color: #1b241d;
  background: #fff8ec;
  font-weight: 900;
  cursor: pointer;
}
.file-meta {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--sidebar-muted);
  font-size: 12px;
}
.file-meta #cdrFileCount {
  color: #e7d59d;
}
.cdr-list {
  margin-top: 2px;
}
.cdr-list .file-row {
  border-color: rgba(247, 216, 144, .28);
}
.cdr-hidden {
  display: none;
}
.file-list {
  display: grid;
  gap: 5px;
}
.file-list span,
.file-list .file-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--sidebar-line);
  border-radius: 7px;
  padding: 6px 8px;
  color: #edf5f1;
  background: rgba(0, 0, 0, .15);
}
.file-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row small {
  flex: 0 0 auto;
  color: var(--sidebar-muted);
}
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.notice {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.4;
}
.notice.ok { color: #c8ead9; }
.notice.error { color: #ffd2c9; }
.legal-links a {
  display: block;
  margin-top: 8px;
  color: #e5f4ef;
  font-weight: 850;
  text-decoration: none;
}
.legal-links a:hover,
.quick-contact a:hover,
.support-grid a:hover,
.legal a:hover { text-decoration: underline; }

.main {
  min-width: 0;
  max-width: 1540px;
  padding: 28px 34px 40px;
}
.hero {
  min-height: 132px;
  border-radius: 8px;
  padding: 26px 28px;
  color: #f7fff9;
  background: linear-gradient(115deg, #0f3c34, #245b65);
  box-shadow: 0 16px 42px rgba(14, 36, 31, .16);
}
.eyebrow {
  margin: 0 0 8px;
  color: #bde7d8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
}
.hero p:last-child {
  max-width: 1000px;
  margin: 10px 0 0;
  color: #d6e5de;
  line-height: 1.5;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.feature-row article,
.support-grid article,
.criteria-grid article,
.empty-grid div,
.coverage-card,
.metric,
.executive-card,
.privacy,
.empty-state,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.feature-row article {
  min-height: 112px;
  padding: 14px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(180deg, #fffdf8, #fbf5e8);
}
.feature-row strong,
.support-grid strong,
.criteria-toggle strong {
  display: block;
  font-size: 15px;
}
.feature-row span,
.support-grid span,
.criteria-grid span,
.empty-state > span,
.coverage-card span,
.metric span,
.executive-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.feature-row span,
.support-grid span { margin-top: 8px; }

.prevalidation-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 0 0 16px;
  border: 1px solid #bfe2d1;
  border-left: 4px solid #198964;
  border-radius: 8px;
  padding: 13px 16px;
  color: #194f3d;
  background: #edf9f2;
}
.prevalidation-bar strong,
.prevalidation-bar span { display: block; }
.prevalidation-bar span { margin-top: 4px; font-size: 13px; line-height: 1.35; }
.prevalidation-bar b { flex: 0 0 auto; font-size: 12px; }

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.support-grid article {
  min-height: 88px;
  padding: 14px;
}
.support-grid a {
  display: inline-block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 850;
}

.criteria-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--panel);
}
.criteria-toggle a {
  color: #0f6a55;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.criteria-grid article {
  padding: 14px;
}
.criteria-grid span,
.coverage-card span,
.metric span,
.executive-card span {
  font-weight: 900;
  text-transform: uppercase;
}
.criteria-grid strong,
.coverage-card strong,
.executive-card strong {
  display: block;
  margin-top: 7px;
  line-height: 1.35;
}

.empty-state,
.panel {
  padding: 18px;
  background: linear-gradient(180deg, #fffdf8, #ffffff);
}
.empty-state strong { display: block; font-size: 20px; }
.empty-state > span { margin-top: 7px; font-size: 15px; }
.empty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.empty-grid div {
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: #fffdf8;
}
.empty-grid b,
.empty-grid small { display: block; }
.empty-grid small {
  margin-top: 5px;
  color: var(--muted);
  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: 24px; }
.summary-head p { margin: 0; color: var(--muted); }
.status-pill {
  white-space: nowrap;
  border: 1px solid #bdd8cd;
  border-radius: 999px;
  padding: 8px 11px;
  color: #15513f;
  background: var(--ok-bg);
  font-weight: 900;
}
.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)); }
.coverage-card,
.metric,
.executive-card {
  padding: 14px;
}
.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; }
.toolbar { margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  min-height: 36px;
  padding: 8px 11px;
}
.filter-btn.is-active {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.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%;
  min-width: 1120px;
  border-collapse: collapse;
  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;
  z-index: 1;
  color: #26392f;
  background: #eaf2ee;
}
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: 900;
}
.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: 900; }
.doc-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.doc-caret {
  color: #0f6a55;
  font-weight: 900;
}
.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 #b3261e; }
.severity-warning td:first-child { border-left: 4px solid #9a671f; }
.severity-passed td:first-child { border-left: 4px solid #16835d; }
.privacy {
  margin-top: 14px;
  padding: 12px;
  color: var(--muted);
  background: #f8fbf9;
}
.privacy strong { color: var(--ink); margin-right: 8px; }
.legal {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.legal a {
  color: #0f6a55;
  font-weight: 900;
  text-decoration: none;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
}
.legal-page h1 { margin-bottom: 18px; }
.legal-page h2 { margin: 18px 0 8px; font-size: 20px; }
.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.6;
}
.legal-page a {
  color: #0f6a55;
  font-weight: 900;
  text-decoration: none;
}
.legal-page a:hover { text-decoration: underline; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 310px minmax(0, 1fr); }
  .feature-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .support-grid,
  .coverage-grid,
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
  }
  .main { padding: 20px; }
  .feature-row,
  .support-grid,
  .criteria-grid,
  .empty-grid,
  .coverage-grid,
  .grid { grid-template-columns: 1fr; }
  .prevalidation-bar,
  .summary-head,
  .toolbar,
  .executive-strip,
  .criteria-toggle {
    display: grid;
  }
  .table-search { max-width: none; }
  .result-card summary { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .sidebar { padding: 16px; }
  .main { padding: 16px; }
  .hero { padding: 20px; }
  h1 { font-size: 28px; }
  .request-grid,
  .actions { grid-template-columns: 1fr; }
  .request-grid a:last-child { grid-column: auto; }
}
