:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5a6673;
  --line: #d9dee5;
  --paper: #f5f7fa;
  --panel: #ffffff;
  --gold: #c79a1b;
  --cyan: #147da2;
  --red: #a93434;
  --green: #247344;
  --navy: #10213d;
  --purple: #6941a5;
  --blue-soft: #eaf4f8;
  --gold-soft: #fff7df;
  --red-soft: #fff0f0;
  --green-soft: #edf8f1;
  --purple-soft: #f2ecfb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 40px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.brand { align-items: center; color: var(--ink); display: inline-flex; gap: 12px; flex: 0 0 auto; }
.brand img { height: 44px; width: 44px; }
.brand strong, .brand small { display: block; }
.brand strong { color: var(--navy); }
.brand small { color: var(--muted); font-size: 13px; margin-top: 2px; }
nav { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: flex-end; }
nav a { font-size: 13px; font-weight: 700; }

main {
  margin: 0 auto;
  max-width: 1320px;
  padding: 34px clamp(16px, 3vw, 40px) 54px;
}

.hero {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 380px;
  margin-bottom: 24px;
}

.eyebrow, .section-kicker {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1 {
  color: var(--navy);
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.035em;
  line-height: 1.03;
  margin: 0;
  max-width: 900px;
}

h2 { color: var(--navy); margin: 0; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.65; margin: 18px 0 0; max-width: 860px; }

.notice {
  background: var(--gold-soft);
  border: 1px solid #ead7a0;
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  padding: 18px 20px;
}
.notice.critical { background: var(--red-soft); border-color: #ecc1c1; border-left-color: var(--red); }
.notice strong { color: var(--navy); font-size: 16px; }
.notice p { color: #674f18; line-height: 1.55; margin: 8px 0 0; }
.notice.critical p { color: #6f3030; }

.ai-gate {
  background: linear-gradient(135deg, var(--navy), #18365f);
  border-radius: 16px;
  color: white;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 300px;
  margin: 0 0 22px;
  padding: 24px;
  box-shadow: 0 12px 34px rgba(16, 33, 61, 0.16);
}
.ai-gate .section-kicker { color: #75d4f3; }
.ai-gate h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); }
.ai-gate p { color: #dfe9f5; line-height: 1.6; margin: 10px 0 0; }
.status-key { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.status-pill { border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 800; line-height: 1.35; padding: 6px 10px; }
.status-pill.artwork { background: #d9f5fb; color: #07556c; }
.status-pill.verified { background: #dff5e7; color: #175a34; }
.status-pill.no-separate { background: var(--purple-soft); color: #573087; }
.status-pill.candidate { background: #fff0bf; color: #6d5200; }
.status-pill.missing { background: #ffdede; color: #8b2424; }
.gate-actions { align-content: start; display: grid; gap: 10px; }
.gate-actions button, .secondary-button {
  border-radius: 9px;
  cursor: pointer;
  display: block;
  font-weight: 800;
  min-height: 44px;
  padding: 11px 14px;
  text-align: center;
  width: 100%;
}
.gate-actions button { background: #fff; border: 0; color: var(--navy); }
.secondary-button { background: transparent; border: 1px solid rgba(255,255,255,0.5); color: #fff; }
.gate-actions small { color: #b9c8db; line-height: 1.45; }

.audit-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 0 0 22px;
  padding: 22px;
}
.audit-heading { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 16px; }
.audit-heading h2 { font-size: clamp(23px, 3vw, 32px); }
.audit-state { border-radius: 999px; font-size: 13px; font-weight: 800; padding: 7px 11px; }
.audit-state.incomplete { background: var(--red-soft); color: var(--red); }
.audit-state.complete { background: var(--green-soft); color: var(--green); }
.audit-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.audit-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; min-height: 128px; padding: 14px; }
.audit-card b { color: var(--navy); display: block; font-size: 28px; line-height: 1; }
.audit-card span { display: block; font-size: 13px; font-weight: 750; margin-top: 7px; }
.audit-card small { color: var(--muted); display: block; font-size: 11px; line-height: 1.4; margin-top: 6px; }
.audit-notes { background: var(--blue-soft); border-left: 4px solid var(--cyan); border-radius: 8px; color: #24485a; line-height: 1.55; margin-top: 14px; padding: 14px 16px; }
.audit-notes ul { margin: 8px 0 0; padding-left: 20px; }
.audit-notes li + li { margin-top: 5px; }

.source-method {
  align-items: start;
  background: linear-gradient(135deg, #ffffff, #eef5fa);
  border: 1px solid #cfe0ea;
  border-radius: 16px;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr);
  margin: 0 0 24px;
  padding: 22px;
}
.source-method h2 { font-size: clamp(23px, 3vw, 32px); }
.source-method p:not(.section-kicker) { color: var(--muted); line-height: 1.6; margin: 10px 0 0; }
.method-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.method-grid div { align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 9px; grid-template-columns: 30px 1fr; padding: 12px; }
.method-grid b { align-items: center; background: var(--navy); border-radius: 50%; color: white; display: inline-flex; height: 28px; justify-content: center; width: 28px; }
.method-grid span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 230px) minmax(220px, 1fr) repeat(3, minmax(135px, 180px)) minmax(180px, 220px);
  margin-bottom: 18px;
}
label span { color: var(--muted); display: block; font-size: 13px; margin-bottom: 6px; }
input[type="search"], select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}
.verified-switch .check-row {
  align-items: center;
  background: var(--green-soft);
  border: 1px solid #c6e5d2;
  border-radius: 8px;
  color: var(--green);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  margin: 0;
  min-height: 42px;
  padding: 8px 10px;
}
.verified-switch input { height: 17px; margin: 0; width: 17px; }
.verified-switch:has(input:disabled) .check-row { background: #f2f3f5; border-color: var(--line); color: var(--muted); opacity: 0.72; }

.summary { color: var(--muted); font-size: 14px; margin: 10px 0 14px; }
.metrics { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 18px; }
.metrics div { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px; }
.metrics b, .metrics span { display: block; }
.metrics b { color: var(--navy); font-size: 25px; line-height: 1; }
.metrics span { color: var(--muted); font-size: 12px; margin-top: 6px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 290px; padding: 18px; }
.logo-preview { align-items: center; aspect-ratio: 16 / 10; background: linear-gradient(180deg, #fff 0%, #eef2f6 100%); border: 1px solid var(--line); border-radius: 9px; display: flex; justify-content: center; margin-bottom: 16px; overflow: hidden; padding: 16px; position: relative; }
.logo-preview:hover { text-decoration: none; }
.logo-preview img { display: block; max-height: 100%; max-width: 100%; object-fit: contain; }
.logo-preview span { background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: 999px; bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 800; padding: 4px 8px; position: absolute; right: 8px; text-transform: uppercase; }
.logo-preview.missing { color: var(--muted); }
.logo-preview.missing span { background: var(--red-soft); border-color: #ecc1c1; color: var(--red); inset: auto; position: static; }
.card h2 { font-size: 21px; line-height: 1.25; margin: 0 0 4px; }
.card .en { color: var(--muted); font-size: 14px; line-height: 1.4; min-height: 40px; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.badge { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; padding: 4px 8px; }
.badge.high { border-color: #efc3c3; color: var(--red); }
.badge.medium { border-color: #d7c58f; color: #735b13; }
.badge.safe { border-color: #b9dcbf; color: var(--green); }
.meta { display: grid; gap: 7px; margin: 0 0 14px; }
.meta div { color: var(--muted); font-size: 13px; line-height: 1.45; }
.meta b { color: var(--ink); }
.notes { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; margin: auto 0 12px; padding-top: 13px; }
.asset-note { background: var(--gold-soft); border-left: 3px solid var(--gold); color: #735b13; font-size: 12px; line-height: 1.45; margin: 0 0 14px; padding: 9px 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions a { border: 1px solid var(--cyan); border-radius: 7px; color: var(--cyan); font-size: 12px; font-weight: 750; padding: 7px 9px; }

.directory { margin-top: 12px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
table { border-collapse: collapse; min-width: 920px; width: 100%; }
table.source-table { min-width: 1520px; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; vertical-align: middle; }
th { background: #f1f3f6; color: var(--muted); font-size: 12px; position: sticky; top: 0; z-index: 2; }
td { font-size: 13px; }
td strong, td small { display: block; }
td small { color: var(--muted); font-size: 11px; line-height: 1.4; margin-top: 4px; }
.source-table th:nth-child(1) { width: 290px; }
.source-table th:nth-child(2) { width: 205px; }
.source-table th:nth-child(3) { width: 260px; }
.source-table th:nth-child(4) { width: 190px; }
.source-table th:nth-child(5) { width: 105px; }
.source-table .source-notes { color: var(--muted); font-size: 12px; line-height: 1.45; min-width: 330px; }
.source-links { display: flex; flex-wrap: wrap; gap: 6px; }
.source-links a { background: #f4fbfe; border: 1px solid #b9dce8; border-radius: 6px; font-size: 11px; font-weight: 750; padding: 5px 7px; }
.thumb { background: #f7f8fa; border: 1px solid var(--line); border-radius: 6px; display: inline-block; height: 36px; margin-right: 10px; object-fit: contain; vertical-align: middle; width: 48px; }
.thumb.placeholder { background: repeating-linear-gradient(45deg, #f7f8fa, #f7f8fa 6px, #edf0f3 6px, #edf0f3 12px); }
.row-state { border-radius: 999px; display: inline-block; font-size: 10px; font-weight: 800; line-height: 1.35; padding: 5px 8px; }
.row-state.official-artwork { background: #d9f5fb; color: #07556c; }
.row-state.source-verified { background: var(--green-soft); color: var(--green); }
.row-state.no-separate { background: var(--purple-soft); color: var(--purple); }
.row-state.candidate { background: var(--gold-soft); color: #6e560d; }
.row-state.review { background: #fff0d9; color: #8b5b00; }
.row-state.missing, .row-state.no-website, .row-state.high { background: var(--red-soft); color: var(--red); }
.row-state.medium { background: var(--gold-soft); color: #735b13; }
.row-state.low { background: var(--green-soft); color: var(--green); }

footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin: 0 auto; max-width: 1320px; padding: 20px clamp(16px, 3vw, 40px) 36px; }
footer p { margin: 0; }

@media (max-width: 1120px) {
  .toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .source-method { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .hero, .ai-gate, .toolbar { grid-template-columns: 1fr; }
  .audit-heading { align-items: flex-start; flex-direction: column; }
  .metrics, .audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

@media (max-width: 520px) {
  main { padding-top: 22px; }
  .metrics, .audit-grid, .method-grid { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .status-pill { border-radius: 8px; width: 100%; }
}
