:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #1a1f2e;
  --muted: #667085;
  --line: #e6e8ee;
  --brand: #0f2a4a;
  --brand-accent: #d9a441;
  --excellent: #1E8449;
  --good: #2E86C1;
  --average: #D4AC0D;
  --weak: #C0392B;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 10px 30px rgba(16,24,40,.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Header */
.site-header {
  background: var(--brand);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: #fff; }
.brand span { color: var(--brand-accent); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: #cdd6e4; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: #fff; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600;
  background: var(--brand-accent); color: #1a1200; border: none; cursor: pointer; font-size: .95rem;
}
.btn:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-wa { background: #25D366; color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f2a4a 0%, #1b3d63 100%);
  color: #fff; padding: 72px 0;
}
.hero h1 { font-size: 2.6rem; letter-spacing: -.02em; max-width: 15ch; }
.hero p { font-size: 1.15rem; color: #cdd6e4; max-width: 60ch; }
.hero .actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .n { font-size: 2rem; font-weight: 800; color: var(--brand-accent); }

/* Sections */
.section { padding: 56px 0; }
.section h2 { font-size: 1.8rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }

/* Cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg,#2b3f5c,#0f2a4a); }
.card-media .placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#8ba0bd; font-weight:700; letter-spacing:.1em; }
.card-body { padding: 16px 18px 18px; }
.card-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 2px; }
.card-sub { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--muted); }
.card-price { margin-top: 10px; font-weight: 700; }

/* Score badge */
.score-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.95); border-radius: 10px; padding: 6px 10px;
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
}
.score-badge .num { font-weight: 800; font-size: 1.25rem; }
.score-badge .band { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pill { display:inline-block; padding: 2px 9px; border-radius: 999px; font-size:.72rem; font-weight:700; background:#eef1f6; color:#42506b; }
.coverage-note { font-size: .78rem; color: var(--muted); margin-top: 8px; }

/* Filters */
.layout-2 { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 84px; }
.filters h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.field { margin-bottom: 14px; }
.field label { display:block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; }
.field select, .field input, .field textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .9rem; font-family: inherit;
}
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }

/* Detail */
.detail-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 28px 0; }
.detail-title { font-size: 2rem; margin-bottom: 4px; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 32px 0; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.panel h3 { font-size: 1.15rem; margin-bottom: 16px; }

.composite { display: flex; align-items: center; gap: 18px; }
.composite .big { font-size: 3rem; font-weight: 800; line-height: 1; }
.composite .band-label { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }

/* Pillar bars */
.pillar { margin-bottom: 16px; }
.pillar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.pillar-name { font-weight: 600; }
.pillar-val { font-weight: 800; }
.bar { height: 9px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--good); }
.tag { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.tag-redistributed { background: #fff4e5; color: #a86200; }
.tag-pending { background: #fdeaea; color: #a12525; }
.tag-override { background: #eae7fb; color: #4b39a8; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: .9rem; }
table.data th { color: var(--muted); font-weight: 600; }

.checklist { list-style: none; padding: 0; margin: 0; columns: 2; }
.checklist li { padding: 3px 0; font-size: .9rem; }
.checklist li.no { color: var(--muted); }

/* Footer */
.site-footer { background: #0c1c30; color: #9fb0c6; padding: 40px 0 30px; margin-top: 40px; font-size: .88rem; }
.site-footer a { color: #cdd6e4; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.disclaimer { border-top: 1px solid #1c3552; padding-top: 18px; line-height: 1.6; }

/* Pagination */
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 26px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .9rem; }
.pagination .active span { background: var(--brand); color: #fff; border-color: var(--brand); }

@media (max-width: 900px) {
  .layout-2, .detail-grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  .hero h1 { font-size: 2rem; }
  .checklist { columns: 1; }
}
