:root {
  --navy: #173f75;
  --navy-dark: #0e2d55;
  --blue: #1469a8;
  --blue-soft: #e8f2f9;
  --teal: #087f73;
  --teal-soft: #e2f5f1;
  --gold: #b86b00;
  --gold-soft: #fff3dc;
  --red: #b42318;
  --red-soft: #feeceb;
  --ink: #16202a;
  --muted: #5c6975;
  --line: #dbe2e8;
  --surface: #ffffff;
  --background: #f4f7f9;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
a { color: var(--blue); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #f0aa35;
  outline-offset: 2px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--navy-dark);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 20px;
  background: var(--navy-dark);
  color: #fff;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 6px;
  background: #fff;
  color: var(--navy-dark);
  font-size: 14px;
  font-weight: 900;
}
.brand h1 { margin: 0; font-size: 17px; line-height: 1.2; }
.brand p { margin: 3px 0 0; color: rgba(255, 255, 255, .72); font-size: 12px; }
.nav { display: grid; gap: 6px; }
.nav-btn {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .82);
  text-align: left;
  font-weight: 750;
}
.nav-btn:hover, .nav-btn.active { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.side-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); }
.side-label { margin-bottom: 9px; color: rgba(255, 255, 255, .62); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.source-pill, .status-pill {
  min-height: 36px;
  margin-bottom: 7px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 6px;
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
}
.status-pill { justify-content: flex-start; }
.dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #f0aa35; }
.dot.green { background: #42d3b0; }
.sidebar-note { margin: 18px 2px 0; color: rgba(255, 255, 255, .64); font-size: 11px; line-height: 1.5; }

.main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 249, .96);
  backdrop-filter: blur(12px);
}
.title h2 { margin: 0; color: var(--navy-dark); font-size: 21px; line-height: 1.2; }
.title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.btn.primary:hover { border-color: var(--navy-dark); background: var(--navy-dark); color: #fff; }
.btn.ghost { background: transparent; }
.btn.compact { min-height: 36px; padding: 7px 10px; font-size: 13px; }
.btn:disabled { cursor: not-allowed; opacity: .45; }

.content { padding: 28px; }
.view { display: none; }
.view.active { display: block; }
.associate-hero, .page-intro {
  padding: 4px 0 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.page-intro { display: block; max-width: 900px; }
.associate-hero h3, .page-intro h3 { margin: 5px 0 8px; max-width: 850px; color: var(--navy-dark); font-size: 28px; line-height: 1.18; }
.associate-hero p, .page-intro p { margin: 0; max-width: 820px; color: var(--muted); line-height: 1.5; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.hero-note { min-width: 188px; padding-left: 20px; border-left: 3px solid var(--teal); }
.hero-note strong { display: block; color: var(--navy-dark); font-size: 38px; line-height: 1; }
.hero-note span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; line-height: 1.3; }
.evidence-summary {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.evidence-summary > div { min-height: 92px; padding: 15px 16px; border-right: 1px solid var(--line); }
.evidence-summary > div:last-child { border-right: 0; }
.evidence-summary strong, .evidence-summary span { display: block; }
.evidence-summary strong { color: var(--navy-dark); font-size: 14px; }
.evidence-summary span { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.grid { display: grid; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 22px rgba(14, 45, 85, .04); }
.quick-themes { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-card {
  min-height: 100px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-align: left;
}
.theme-card:hover, .theme-card.active { border-color: var(--blue); background: var(--blue-soft); }
.theme-card span { display: block; color: var(--navy-dark); font-weight: 800; line-height: 1.2; }
.theme-card strong { display: block; margin-top: 7px; color: var(--blue); font-size: 21px; }
.theme-card small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.25; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { min-height: 112px; padding: 15px; }
.kpi span, .coverage-card > span, .deadline-summary article > span { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.kpi strong, .coverage-card strong, .deadline-summary strong { display: block; margin-top: 7px; color: var(--navy-dark); font-size: 32px; line-height: 1; }
.kpi p, .coverage-card p, .deadline-summary p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }

.toolbar {
  margin-top: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.toolbar .wide { grid-column: span 2; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.input, .select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.input:hover, .select:hover { border-color: #9caebb; }
.split { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(390px, .65fr); gap: 14px; align-items: start; }
.split > *, .table-card { min-width: 0; max-width: 100%; }
.section-head { min-height: 62px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.section-head h3 { margin: 0; color: var(--navy-dark); font-size: 16px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-head.unframed { padding-left: 0; padding-right: 0; border: 0; }
.table-wrap { max-height: 720px; overflow: auto; }
table { width: 100%; min-width: 820px; border-collapse: collapse; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 2; background: #f7f9fb; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
td { color: var(--ink); font-size: 13px; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.active { background: #edf5fa; }
.subject { color: var(--navy-dark); font-weight: 800; line-height: 1.3; }
.muted { color: var(--muted); font-size: 12px; }
.source-mini { margin-top: 5px; color: var(--blue); font-size: 10px; font-weight: 800; line-height: 1.2; }
.subtheme-label { margin-top: 6px; max-width: 180px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.25; }
.clamp { margin-top: 4px; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.tag { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--gold-soft); color: #845000; font-size: 10px; font-weight: 850; line-height: 1.2; }
.tag.blue { background: var(--blue-soft); color: #0e5586; }
.tag.green { background: var(--teal-soft); color: #08665e; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.neutral, .tag.muted-tag { background: #eef1f3; color: #4b5965; }
.pager { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pager span { color: var(--muted); font-size: 12px; }

.detail-card { position: sticky; top: 94px; overflow: hidden; }
.detail-heading { align-items: flex-start; }
.detail-body { padding: 15px; }
.detail-title { margin: 0; color: var(--navy-dark); font-size: 20px; line-height: 1.25; }
.detail-summary { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.evidence-strip {
  margin-top: 15px;
  display: grid;
  grid-template-columns: .8fr 1.5fr .8fr;
  border: 1px solid #9fc4de;
  background: var(--blue-soft);
}
.evidence-strip span { min-width: 0; padding: 9px 10px; color: #23465f; font-size: 11px; line-height: 1.35; word-break: break-word; }
.evidence-strip span + span { border-left: 1px solid #b9d6e8; }
.evidence-strip b { display: block; margin-bottom: 3px; color: var(--navy-dark); font-size: 9px; text-transform: uppercase; }
.meta-grid { margin: 15px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.meta-item { min-height: 72px; padding: 9px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-item span { display: block; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.meta-item b { display: block; margin-top: 4px; color: var(--ink); font-size: 13px; line-height: 1.35; word-break: break-word; }
.notice { margin: 12px 0; padding: 11px 12px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.notice.green { border-color: var(--teal); background: var(--teal-soft); }
.notice.warning { border-color: var(--gold); background: var(--gold-soft); }
.notice strong, .notice span { display: block; }
.notice strong { color: var(--navy-dark); font-size: 13px; }
.notice span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.detail-section { margin-top: 17px; }
.detail-section h5 { margin: 0 0 8px; color: var(--navy-dark); font-size: 12px; text-transform: uppercase; }
.contact-list { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-chip { padding: 5px 8px; border: 1px solid #acd0e6; border-radius: 4px; background: var(--blue-soft); color: #0e5586; font-size: 11px; text-decoration: none; word-break: break-all; }
.material-list { margin: 0; padding-left: 18px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.content-box { max-height: 430px; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fbfcfd; color: #28343f; white-space: pre-wrap; line-height: 1.55; font-size: 13px; }
.detail-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.source-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.technical-details { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.technical-details summary { cursor: pointer; color: var(--ink); font-weight: 800; }
.technical-details p { margin: 7px 0 0; word-break: break-word; }
.empty { padding: 30px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 5px; color: var(--navy-dark); font-size: 17px; }

.deadline-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.deadline-summary article { min-height: 112px; padding: 15px; border-right: 1px solid var(--line); }
.deadline-summary article:last-child { border-right: 0; }
.action-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.action-list { max-height: 780px; overflow: auto; }
.action-item { width: 100%; min-height: 76px; padding: 11px 13px; display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.action-item:hover { background: #f3f8fb; }
.action-date { color: var(--blue); font-size: 12px; font-weight: 850; }
.action-copy strong, .action-copy small { display: block; }
.action-copy strong { color: var(--navy-dark); font-size: 13px; line-height: 1.3; }
.action-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.coverage-grid { margin-bottom: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.coverage-card { min-height: 140px; padding: 15px; }
.coverage-bar, .rank-bar { width: 100%; overflow: hidden; border: 0; border-radius: 0; background: #e8edf0; appearance: none; }
.coverage-bar { height: 6px; margin-top: 14px; }
.coverage-bar::-webkit-progress-bar, .rank-bar::-webkit-progress-bar { background: #e8edf0; }
.coverage-bar::-webkit-progress-value { background: var(--teal); }
.coverage-bar::-moz-progress-bar { background: var(--teal); }
.charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rank-list { padding: 12px 15px 16px; display: grid; gap: 11px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 12px; align-items: center; }
.rank-name { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 7px; margin-top: 5px; }
.rank-bar::-webkit-progress-value { background: var(--blue); }
.rank-bar::-moz-progress-bar { background: var(--blue); }
.rank-count { color: var(--muted); font-size: 12px; text-align: right; }

.methodology { overflow: hidden; }
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.method-grid article { min-height: 180px; padding: 18px; border-right: 1px solid var(--line); }
.method-grid article:last-child { border-right: 0; }
.method-grid article > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 850; }
.method-grid h4, .module-card h4 { margin: 13px 0 7px; color: var(--navy-dark); font-size: 15px; }
.method-grid p, .module-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.module-band { margin-top: 24px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.module-card { min-height: 130px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.module-card h4 { margin-top: 0; }
.footer { padding: 20px 28px 28px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 360px; padding: 11px 13px; display: none; border-radius: 6px; background: var(--ink); color: #fff; box-shadow: 0 16px 36px rgba(0, 0, 0, .2); font-size: 13px; }
.toast.show { display: block; }

@media (max-width: 1260px) {
  .toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar .wide { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .detail-card { position: static; }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .side-block, .sidebar-note { display: none; }
  .quick-themes, .kpis, .coverage-grid, .method-grid, .evidence-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-summary > div:nth-child(2) { border-right: 0; }
  .evidence-summary > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .method-grid article:nth-child(2) { border-right: 0; }
  .method-grid article { border-bottom: 1px solid var(--line); }
  .method-grid article:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 720px) {
  .sidebar { padding: 16px; }
  .brand { margin-bottom: 14px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { position: static; padding: 15px 16px; align-items: stretch; flex-direction: column; }
  .content { padding: 20px 16px; }
  .associate-hero { align-items: stretch; flex-direction: column; }
  .associate-hero h3, .page-intro h3 { font-size: 24px; }
  .hero-note { padding: 13px 0 0; border-top: 2px solid var(--teal); border-left: 0; }
  .quick-themes, .kpis, .coverage-grid, .charts, .action-columns, .module-grid, .method-grid, .deadline-summary, .toolbar, .evidence-summary { grid-template-columns: 1fr; }
  .evidence-summary > div, .evidence-summary > div:nth-child(2) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-summary > div:last-child { grid-column: auto; border-top: 0; border-bottom: 0; }
  .toolbar .wide { grid-column: auto; }
  .actions .btn { flex: 1; }
  .deadline-summary article, .method-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .deadline-summary article:last-child, .method-grid article:last-child { border-bottom: 0; }
  .action-item { grid-template-columns: 74px minmax(0, 1fr); }
  .action-item .tag { grid-column: 2; justify-self: start; }
  .table-wrap { max-height: 900px; overflow-x: hidden; overflow-y: auto; }
  table { min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  tbody, tbody tr, tbody td { display: block; }
  tbody tr { padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .65fr); gap: 7px 12px; border-bottom: 1px solid var(--line); }
  tbody td { padding: 0; border: 0; }
  tbody td:nth-child(3) { grid-column: 1 / -1; grid-row: 1; }
  tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  tbody td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  tbody td:nth-child(1) { grid-column: 1; grid-row: 3; }
  tbody td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; }
  .meta-grid { grid-template-columns: 1fr; }
  .evidence-strip { grid-template-columns: 1fr; }
  .evidence-strip span + span { border-left: 0; border-top: 1px solid #b9d6e8; }
  .detail-actions .btn { width: 100%; text-align: center; }
  .footer { padding: 16px; flex-direction: column; }
}
