/* =========================================================================
   HOPE-PHC DLI Tracker — Stylesheet
   Brand: #1FB575 (primary green), #FFFFFF (white), #1F3A8A (World Bank blue)
   Font: 'Isidora' with sans-serif fallbacks
   ========================================================================= */

@font-face {
  font-family: 'Isidora';
  src: local('Isidora'), local('Isidora Sans');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --green: #1FB575;
  --green-dark: #0B6B45;
  --green-light: #E7F9F1;
  --green-lighter: #F2FBF7;
  --blue: #1F3A8A;
  --blue-light: #EEF1FA;
  --white: #FFFFFF;
  --ink: #10241D;
  --ink-soft: #4B5B55;
  --gray-50: #F7F9F8;
  --gray-100: #EEF2F0;
  --gray-200: #E2E8E5;
  --gray-300: #C9D3CE;
  --red: #E0483D;
  --red-light: #FDEDEC;
  --yellow: #E8A324;
  --yellow-light: #FDF4E1;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 2px 10px rgba(16, 36, 29, 0.06), 0 1px 2px rgba(16, 36, 29, 0.05);
  --shadow-card-hover: 0 10px 28px rgba(16, 36, 29, 0.10);
  --font: 'Isidora', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------- TOP NAV ---------------------------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.topnav-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.2px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(155deg, var(--green-dark) 0%, var(--blue) 130%);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 15px; font-weight: 800;
}
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.3px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  color: var(--ink); background: transparent; border: none;
}
.nav-link:hover, .nav-link.active { background: var(--green-light); color: var(--green-dark); }
.nav-caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .15s; }
.nav-item.open .nav-caret { transform: rotate(-135deg); margin-top: 3px; }

.state-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: 300px; max-height: 380px; overflow-y: auto;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  padding: 8px; display: none; z-index: 200;
}
.nav-item.open .state-dropdown { display: block; }
.state-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink);
}
.state-dropdown a:hover { background: var(--green-light); color: var(--green-dark); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: none; white-space: nowrap;
}
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--blue); border: 1.5px solid var(--blue-light); }
.btn-outline:hover { background: var(--blue-light); }
.btn-ghost { background: var(--green-light); color: var(--green-dark); }
.admin-link.active { background: var(--blue-light); color: var(--blue); border-color: var(--blue-light); }

/* ---------------------------- HERO ---------------------------- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 56px 0 44px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 88% 12%, rgba(31,58,138,0.35), transparent 45%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.4px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 800; max-width: 760px; margin: 0 0 14px; letter-spacing: -0.5px; }
.hero p.lead { font-size: 16.5px; max-width: 620px; opacity: 0.94; margin: 0 0 26px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 26px; font-weight: 800; }
.hero-stat span { font-size: 12.5px; opacity: 0.85; font-weight: 600; }

/* ---------------------------- DLI MARQUEE CARDS ---------------------------- */
.marquee-section { padding: 34px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: -0.3px; }
.section-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }

.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: scroll-x 46s linear infinite; padding: 6px 2px 18px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.dli-card {
  display: block;
  width: 260px; flex: none;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .15s, transform .15s;
}
.dli-card:hover { transform: translateY(-2px); }
.dli-card:hover { box-shadow: var(--shadow-card-hover); }
.dli-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--green-light); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.dli-card .dli-code { font-size: 11.5px; font-weight: 800; color: var(--green-dark); letter-spacing: 0.4px; text-transform: uppercase; }
.dli-card h3 { font-size: 15.5px; margin: 4px 0 10px; line-height: 1.3; min-height: 40px; }
.dli-amount { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.dli-amount span { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-left: 4px; }
.dli-subrow { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--gray-200); }
.dli-subrow div b { display: block; font-size: 13.5px; }
.dli-subrow div span { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }

/* ---------------------------- FILTER BOX ---------------------------- */
.filter-section { padding: 40px 0; }
.filter-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  padding: 32px;
  max-width: 880px; margin: 0 auto;
  text-align: center;
}
.filter-box h2 { margin: 0 0 6px; font-size: 22px; }
.filter-box p { margin: 0 0 22px; color: var(--ink-soft); font-size: 14.5px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.select-wrap { position: relative; flex: 1; min-width: 220px; text-align: left; }
.select-wrap label { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
select.hp-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: var(--white) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2310241D" stroke-width="2.5"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 14px center;
  background-size: 13px;
  border: 1.5px solid var(--gray-300);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 38px 12px 14px;
  font-size: 14.5px; font-weight: 600; font-family: inherit;
}
select.hp-select:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-light); }
select.hp-select option { color: var(--ink); background: var(--white); }
.filter-go { align-self: flex-end; height: 46px; margin-top: auto; }
.filter-row-inner { display: flex; gap: 12px; width: 100%; align-items: flex-end; flex-wrap: wrap; justify-content: center; }

/* ---------------------------- FAQ (activity-card style) ---------------------------- */
.faq-section { padding: 20px 0 56px; }
.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.faq-card { max-width: 880px; margin: 0 auto; padding: 8px 8px 8px; }

/* Pill bar: pick one category at a time instead of scrolling past all of them. */
.faq-pillbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 20px 4px; }
.faq-pill {
  padding: 8px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--gray-100); color: var(--ink-soft); border: 1.5px solid transparent;
}
.faq-pill:hover { background: var(--green-light); color: var(--green-dark); }
.faq-pill.active { background: var(--green); color: var(--ink); border-color: var(--green-dark); }
.faq-pill-all { background: var(--white); border-color: var(--gray-300); }
.faq-pill-all.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

.faq-category { display: none; padding: 4px 0; }
.faq-category.active { display: block; animation: faqSlideIn .28s ease; }
@keyframes faqSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* In "Show all" mode, multiple .faq-category.active panels render in sequence — separate them visually. */
.faq-category.active ~ .faq-category.active { border-top: 2px solid var(--gray-100); margin-top: 6px; }
.faq-category-title {
  margin: 0; padding: 14px 20px 6px;
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--green-dark);
}
.faq-item { padding: 18px 20px; border-bottom: 1px solid var(--gray-100); }
.faq-item:last-child { border-bottom: none; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 15.5px; }
.faq-toggle { width: 22px; height: 22px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); flex: none; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
.faq-a { color: var(--ink-soft); font-size: 14px; line-height: 1.65; margin-top: 8px; max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-item.open .faq-a { max-height: 900px; margin-top: 12px; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-visual-caption { margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---- FAQ visual answers: flowcharts, stat boxes, grids, scale ---- */
.faq-visual { margin: 2px; }

/* Financing stat boxes */
.stat-boxes { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.stat-box {
  flex: 1; min-width: 130px; background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 3px;
}
.stat-box-value { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; }
.stat-box-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: var(--ink-soft); }
.stat-box-note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; margin-top: 2px; }
.stat-box-total { background: var(--blue); border-color: var(--blue); }
.stat-box-total .stat-box-value, .stat-box-total .stat-box-label { color: var(--white); }
.stat-box-accent { background: var(--green-light); border-color: var(--green); }
.stat-box-op { display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--ink-soft); padding: 0 2px; }
@media (max-width: 640px) { .stat-box-op { display: none; } }

/* HOPE program family diagram */
.program-family { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 0 4px; }
.pf-root, .pf-node {
  background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 12px 16px; text-align: center; box-shadow: var(--shadow-card);
}
.pf-root { background: var(--blue); border-color: var(--blue); max-width: 320px; }
.pf-root .pf-node-title { color: var(--white); }
.pf-root .pf-node-desc { color: rgba(255,255,255,0.85); }
.pf-node-title { display: block; font-weight: 800; font-size: 13.5px; margin-bottom: 4px; }
.pf-node-desc { display: block; font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); }
.pf-connector { width: 2px; height: 20px; background: var(--gray-300); }
.pf-branches { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; position: relative; }
.pf-node { flex: 1; min-width: 190px; max-width: 260px; }
.pf-node.pf-highlight { border-color: var(--green); background: var(--green-lighter); }

/* Numbered list (implementing agencies, etc.) */
.faq-numbered-list { margin: 0; padding: 0; counter-reset: faqnum; display: flex; flex-direction: column; gap: 8px; }
.faq-numbered-list li {
  list-style: none; counter-increment: faqnum;
  display: flex; align-items: baseline; gap: 10px; font-size: 13.5px;
}
.faq-numbered-list li::before {
  content: counter(faqnum); flex: none;
  width: 20px; height: 20px; border-radius: 50%; background: var(--green-light); color: var(--green-dark);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* Flowchart (7-step unlock process, participation stages, verification chain) */
.flow-chart { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.flow-step {
  flex: 1 1 118px; min-width: 108px; max-width: 138px;
  background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 9px 10px; display: flex; flex-direction: column; gap: 3px;
}
.flow-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: var(--ink);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 1px;
}
.flow-title { font-size: 11.5px; font-weight: 800; line-height: 1.25; }
.flow-role { font-size: 10px; color: var(--ink-soft); line-height: 1.35; }
.flow-arrow {
  flex: none; width: 20px; align-self: center; position: relative; height: 3px; background: var(--green-dark); margin: 0 3px; border-radius: 2px;
}
.flow-arrow::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 7px solid transparent; border-left-color: var(--green-dark); border-left-width: 9px;
}
@media (max-width: 720px) {
  .flow-chart { flex-direction: column; align-items: stretch; }
  .flow-step { max-width: none; }
  .flow-arrow { width: 3px; height: 16px; align-self: flex-start; margin: 2px 0 2px 18px; }
  .flow-arrow::after { right: 50%; top: auto; bottom: -6px; transform: translateX(50%) rotate(90deg); }
}

/* Checklist grid (eligibility criteria, DLI buckets) */
.checklist-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.checklist-box { flex: 1; min-width: 220px; background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 16px; }
.checklist-box-accent { background: var(--green-lighter); border-color: var(--green); }
.checklist-box-title { margin: 0 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: var(--green-dark); }
.checklist-box-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.checklist-box-list li { font-size: 12.5px; line-height: 1.45; padding-left: 20px; position: relative; }
.checklist-box-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green-dark); font-weight: 800; font-size: 12px; }
.checklist-box-list-plain li { padding-left: 0; }
.checklist-box-list-plain li::before { content: none; }

/* Feature grid (IPF / TACRA components) */
.feature-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.feature-card { flex: 1; min-width: 220px; background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 16px; }
.feature-card-title { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; color: var(--blue); }
.feature-card-list { margin: 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.feature-card-list li { font-size: 12.5px; line-height: 1.45; }

/* Discordance scale */
.discordance-scale { display: flex; flex-direction: column; gap: 12px; }
.ds-track { display: flex; height: 34px; border-radius: 999px; overflow: hidden; }
.ds-track > div { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--white); }
.ds-zone-ok { background: var(--green); color: var(--ink) !important; }
.ds-zone-warn { background: var(--yellow); color: var(--ink) !important; }
.ds-zone-bad { background: var(--red); }
.ds-legend { display: flex; flex-direction: column; gap: 6px; }
.ds-legend div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.ds-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; }
.ds-dot-ok { background: var(--green); } .ds-dot-warn { background: var(--yellow); } .ds-dot-bad { background: var(--red); }

/* Objective cards (Program's four objectives) */
.objective-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .objective-cards { grid-template-columns: 1fr; } }
.objective-card {
  background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start;
}
.objective-card p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.objective-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: var(--white);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* Definition boxes (scalable / time-bound) */
.definition-boxes { display: flex; gap: 14px; flex-wrap: wrap; }
.definition-box { flex: 1; min-width: 200px; background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 16px; }
.definition-box h4 { margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--green-dark); }
.definition-box p { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.def-bar { height: 20px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.def-bar-fill { height: 100%; background: var(--green); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.def-bar-fill span { font-size: 10.5px; font-weight: 800; color: var(--ink); }
.def-clock { font-size: 26px; line-height: 1; }

/* Agency table */
.agency-table-wrap { margin-top: 10px; }
table.agency-table td, table.agency-table th { font-size: 12.5px; }
table.agency-table td:first-child, table.agency-table th:first-child { width: 44px; text-align: center; }

/* Score Report worked example */
.score-worked-example { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.score-example-table { flex: 1; min-width: 240px; }
.score-example-result { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 16px; }
.score-example-result p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.score-example-result .score-ring { width: 70px; height: 70px; flex: none; }
.score-example-result .score-ring b { font-size: 14px; }
.score-example-result .score-ring::before { inset: 6px; }

/* Inline link-buttons inside FAQ answers */
.faq-visual-btn { display: inline-flex; margin-top: 12px; padding: 9px 16px; font-size: 12.5px; }

/* ---------------------------- PAD CTA ---------------------------- */
.pad-cta {
  max-width: 1180px; margin: 0 auto 56px; padding: 0 24px;
}
.pad-cta-inner {
  background: linear-gradient(120deg, var(--blue) 0%, #16265c 100%);
  color: var(--white); border-radius: var(--radius-lg);
  padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.pad-cta-inner h3 { margin: 0 0 6px; font-size: 19px; }
.pad-cta-inner p { margin: 0; opacity: 0.85; font-size: 14px; max-width: 520px; }
.pad-cta-inner .btn-primary { background: var(--white); color: var(--blue); }
.pad-cta-inner .btn-primary:hover { background: var(--green-lighter); }

/* ---------------------------- FOOTER ---------------------------- */
footer { background: var(--blue); color: rgba(255,255,255,0.85); padding: 28px 0; font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------------------------- SECTION SHELLS ---------------------------- */
.page-section { padding: 44px 0; }
.page-section h2 { font-size: 22px; margin: 0 0 4px; }
.page-section .subtext { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; }

/* ---------------------------- STATE HEADER (states-summary style) ---------------------------- */
.state-hero { padding: 34px 0 10px; }
.state-header-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 26px; box-shadow: var(--shadow-card);
  padding: 28px 30px;
}
.state-header-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.state-badge-wrap { position: relative; flex: none; }
.state-badge {
  width: 66px; height: 66px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: var(--white);
  background: linear-gradient(155deg, var(--blue), #16265c);
}
.status-pin {
  position: absolute; bottom: -6px; right: -6px;
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--white);
  display: flex; align-items: center; justify-content: center; color: var(--ink); font-size: 13px; font-weight: 900;
}
.status-pin.green { background: var(--green); } .status-pin.yellow { background: var(--yellow); } .status-pin.red { background: var(--red); }
.state-title-block h1 { margin: 0; font-size: 28px; letter-spacing: -0.4px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.status-chip.green { background: var(--green-light); color: var(--green-dark); }
.status-chip.yellow { background: var(--yellow-light); color: #9C6B0C; }
.status-chip.red { background: var(--red-light); color: #B4372E; }
.state-header-actions { margin-left: auto; display: flex; gap: 10px; }

.state-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--gray-100); }
.state-stat span { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.state-stat b { font-size: 19px; font-weight: 800; }
.state-stat.highlight b { color: var(--green-dark); font-size: 24px; }

/* ---------------------------- DLI BREAKDOWN TABLE ---------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); background: var(--white); box-shadow: var(--shadow-card); }
table.hp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.hp-table th { text-align: left; background: var(--gray-50); color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
table.hp-table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
table.hp-table tr:last-child td { border-bottom: none; }
table.hp-table tr.totals-row td { font-weight: 800; background: var(--green-lighter); }
.pill-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--gray-100); color: var(--ink-soft); }
.pill-tag.scalable { background: var(--green-light); color: var(--green-dark); }
.pill-tag.timebound { background: var(--blue-light); color: var(--blue); margin-left: 4px; }
.amount-cell { font-weight: 800; white-space: nowrap; }
.dash-cell { color: var(--ink-soft); font-weight: 800; text-align: center; }
th.year-highlight-col, td.year-highlight-col, td.year-highlight-cell { background: var(--green-lighter); }
th.year-highlight-col { color: var(--green-dark) !important; }
table.dli-table { min-width: 900px; }
table.dli-table td, table.dli-table th { font-size: 12.5px; }

/* ---------------------------- DLR CARDS (stacked, no horizontal scroll) ---------------------------- */
.dlr-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 18px 22px; margin-bottom: 16px;
}
.dlr-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100); font-size: 15.5px;
}
.dlr-row {
  display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px;
  padding: 9px 0; border-bottom: 1px dashed var(--gray-100);
  font-size: 13.5px; line-height: 1.55;
}
.dlr-row:last-child { border-bottom: none; }
.dlr-label {
  font-weight: 800; color: var(--ink-soft); text-transform: uppercase;
  font-size: 10.5px; letter-spacing: 0.3px; padding-top: 2px;
}
.dlr-value { color: var(--ink); }
.cell-bullets { list-style: disc; padding-left: 18px; margin: 0; }
.cell-bullets li { margin-bottom: 5px; }
.cell-bullets li:last-child { margin-bottom: 0; }
.cell-numbered { list-style: decimal; padding-left: 18px; margin: 0; }
.cell-numbered li { margin-bottom: 5px; font-weight: 600; }
.cell-numbered li:last-child { margin-bottom: 0; }
.cell-numbered li::marker { color: var(--green-dark); font-weight: 800; }
@media (max-width: 560px) {
  .dlr-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------- DLR PAYABLE-AMOUNT CALCULATOR ---------------------------- */
/* Lives inside each state-relevant .dlr-card (dli.js's calcBoxHTML) — lets a
   state punch in its own achieved figures against that DLR's PAD rate and
   see the payable amount live, client-side, no save/submit needed. */
.calc-box {
  margin-top: 14px; padding: 14px 16px; background: var(--green-lighter);
  border: 1px solid var(--green-light); border-radius: var(--radius-md);
}
.calc-box-head { font-size: 12px; font-weight: 800; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 10px; }
.calc-field { margin-bottom: 8px; }
.calc-field:last-of-type { margin-bottom: 0; }
.calc-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.calc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.calc-input[type="number"], select.calc-input {
  width: 100%; padding: 9px 10px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: var(--white);
}
.calc-input[type="number"]:focus, select.calc-input:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-light); }
.calc-field-checkbox label { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 13px; cursor: pointer; }
.calc-field-checkbox input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green-dark); flex: none; margin-top: 1px; }
.calc-note { font-size: 11.5px; color: var(--ink-soft); margin: 8px 0 0; font-style: italic; }
.calc-result {
  margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--green-light);
  font-size: 15px; color: var(--ink);
}
.calc-result b { color: var(--green-dark); font-size: 17px; }
.calc-detail { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
@media (max-width: 480px) {
  .calc-field-row { grid-template-columns: 1fr; }
}

/* ---------------------------- SUB-CHECKLISTS ---------------------------- */
.sub-checklist { margin: 0 20px 18px; padding: 12px 16px; background: var(--gray-50); border-radius: var(--radius-md, 10px); }
.sub-checklist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--gray-100); }
.sub-checklist-row:last-child { border-bottom: none; }
.sub-checklist-row span:first-child { color: var(--ink-soft); }

/* ---------------------------- COMMENTS CARD ---------------------------- */
.comments-card { padding: 22px 24px; }
.comments-card h3 { margin: 0 0 12px; font-size: 16.5px; }

/* ---------------------------- TOPIC AREAS (activity style) ---------------------------- */
.activity-card { padding: 6px; }
.activity-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.activity-header h3, .activity-header h4 { margin: 0; font-size: 16.5px; }
.activity-item { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--green-light); color: var(--green-dark); display: flex; align-items: center; justify-content: center; flex: none; font-weight: 800; font-size: 13px; }
.activity-body h4 { margin: 0 0 4px; font-size: 14.5px; }
.activity-body p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.activity-status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.activity-status .dash-cell { font-size: 14px; }

.topic-grid { display: flex; flex-direction: column; gap: 18px; }
.topic-table-wrap { margin: 0 20px 18px; width: auto; }
table.topic-table { min-width: 760px; }
table.topic-table th:nth-child(1), table.topic-table td:nth-child(1) { width: 26%; }
table.topic-table th:nth-child(2), table.topic-table td:nth-child(2) { width: 24%; }
table.topic-table th:nth-child(3), table.topic-table td:nth-child(3) { width: 20%; }
table.topic-table th:nth-child(4), table.topic-table td:nth-child(4) { width: 30%; }
table.topic-table td { font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
table.topic-table td.amount-cell { color: var(--ink); }

/* ---------------------------- TOPIC AREAS: SLIDING HOVER-EXPAND CARDS ---------------------------- */
/* Horizontal slider of fixed-size slots — replaces the old stacked-table
   list, which made scrolling through 11 topic areas feel bulky. Each slot
   reserves layout space; the card inside is absolutely positioned so
   expanding it on hover grows downward over the page instead of pushing
   surrounding content around. */
.topic-slider {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: visible;
  padding: 6px 4px 26px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.topic-slider::-webkit-scrollbar { height: 8px; }
.topic-slider::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 999px; }
.topic-slider::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; }
.topic-card-wrap { flex: 0 0 280px; height: 226px; position: relative; scroll-snap-align: start; }
.topic-card {
  position: absolute; top: 0; left: 0; right: 0; height: 100%;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 18px 20px; overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
  cursor: pointer; z-index: 1; outline: none;
}
.topic-card-wrap:hover .topic-card,
.topic-card:focus-within,
.topic-card:focus {
  height: auto; min-height: 100%; max-height: 460px; overflow-y: auto;
  box-shadow: var(--shadow-card-hover); border-color: var(--green); z-index: 40;
}
.topic-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.topic-card-icon {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--green-light); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px;
}
.topic-card-head h4 { margin: 0; font-size: 14.5px; line-height: 1.3; }
.topic-card-fullname { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 500; margin-top: 2px; }
.topic-card-status { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 10px; }
.topic-desc {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-card-wrap:hover .topic-desc,
.topic-card:focus-within .topic-desc,
.topic-card:focus .topic-desc { -webkit-line-clamp: unset; overflow: visible; }
.topic-card-detail {
  display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--gray-100);
}
.topic-card-wrap:hover .topic-card-detail,
.topic-card:focus-within .topic-card-detail,
.topic-card:focus .topic-card-detail { display: block; }
.topic-card-detail .dlr-row { grid-template-columns: 92px 1fr; padding: 6px 0; font-size: 12px; }
.topic-card-detail .sub-checklist { margin: 10px 0 0; padding: 10px 12px; }
.topic-card-hint { font-size: 10.5px; color: var(--ink-soft); opacity: .65; margin-top: 8px; font-style: italic; }
.topic-card-wrap:hover .topic-card-hint,
.topic-card:focus-within .topic-card-hint,
.topic-card:focus .topic-card-hint { display: none; }

/* ---------------------------- SCORE CARD ---------------------------- */
.score-card { padding: 26px 30px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.score-ring {
  width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(var(--gray-200) 0deg 360deg);
  display: flex; align-items: center; justify-content: center; flex: none; position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--white); }
.score-ring b { position: relative; font-size: 20px; font-weight: 800; color: var(--ink-soft); }
.score-meta h3 { margin: 0 0 6px; font-size: 17px; }
.score-meta p { margin: 0; color: var(--ink-soft); font-size: 13.5px; max-width: 480px; line-height: 1.6; }
.score-band { display: inline-flex; margin-top: 10px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--gray-100); color: var(--ink-soft); }

/* ---------------------------- CONTACT + NEXT STEPS ---------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 840px) { .two-col { grid-template-columns: 1fr; } }
.contact-card, .steps-card { padding: 22px 24px; }
.contact-card h3, .steps-card h3 { margin: 0 0 16px; font-size: 16.5px; }
.contact-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.contact-row:last-child { border-bottom: none; }
.contact-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.contact-info div:first-child { font-weight: 700; font-size: 14px; }
.contact-info div:nth-child(2) { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.contact-info div:nth-child(3) { font-size: 12.5px; color: var(--green-dark); margin-top: 3px; font-weight: 700; }

.step-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.step-list li:last-child { border-bottom: none; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--green-dark); color: var(--white); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }

/* ---------------------------- SCOREBOARD ---------------------------- */
.scoreboard-list { display: flex; flex-direction: column; gap: 12px; }
.sb-row {
  display: grid; grid-template-columns: 44px 44px 1.6fr 1fr 1fr 1fr 1fr; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 16px 20px; box-shadow: var(--shadow-card);
}
.sb-row:hover { box-shadow: var(--shadow-card-hover); }
.sb-rank { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-100); color: var(--ink-soft); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.sb-rank.top1 { background: #FFE9B0; color: #9C6B0C; }
.sb-rank.top2 { background: var(--gray-200); color: var(--ink-soft); }
.sb-rank.top3 { background: #F3D8C4; color: #9C4E1D; }
.sb-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 800; font-size: 13px; background: linear-gradient(155deg, var(--blue), #16265c); }
.sb-name a { font-weight: 800; font-size: 14.5px; }
.sb-name a:hover { color: var(--green-dark); }
.sb-name span { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.sb-col { text-align: right; }
.sb-col span { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: var(--ink-soft); margin-bottom: 4px; }
.sb-col b { font-size: 14.5px; font-weight: 800; }
.sb-headrow { display: grid; grid-template-columns: 44px 44px 1.6fr 1fr 1fr 1fr 1fr; gap: 16px; padding: 0 20px; margin-bottom: 4px; }
.sb-headrow div { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: var(--ink-soft); text-align: right; }
.sb-headrow div:nth-child(3) { text-align: left; }
.yn-yes { color: var(--green-dark); } .yn-no { color: var(--red); } .yn-pending { color: var(--ink-soft); }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 26px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }

/* ---------------------------- BREADCRUMB ---------------------------- */
.breadcrumb { padding: 18px 0 0; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--green-dark); }
.print-btn { padding: 7px 14px; font-size: 12.5px; }

/* ---------------------------- MISC ---------------------------- */
.mono { font-variant-numeric: tabular-nums; }
.note { font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; line-height: 1.6; }
@media (max-width: 720px) {
  .hero h1 { font-size: 30px; }
  .state-stat-row { grid-template-columns: 1fr 1fr; }
  .sb-row, .sb-headrow { grid-template-columns: 36px 36px 1.4fr 1fr 1fr; }
  .sb-col.hide-sm { display: none; }
}

/* ---------------------------- PRINT / SAVE AS PDF ---------------------------- */
/* Triggered by the "Print / Save PDF" button (state, DLI and scoreboard
   pages) via window.print() — every modern browser's print dialog offers
   "Save as PDF" as a destination, so this is what makes that produce a
   clean, single-column document instead of the live site's chrome. */
@media print {
  #topnav, #sitefooter, .print-btn, .topic-card-hint, .marquee-section,
  .faq-section, .hero-cta, .admin-toolbar, .gate-section { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: none; }
  .wrap { max-width: 100%; }
  .page-section { padding: 10px 0; }
  .card, .dlr-card, .dli-card, .state-header-card { box-shadow: none; border: 1px solid var(--gray-200); }

  /* Hover-only topic cards: force every card fully open and stacked,
     since there's no hover state on paper. */
  .topic-slider { display: block; overflow: visible; }
  .topic-card-wrap { flex: none; width: 100%; height: auto; position: static; margin-bottom: 14px; break-inside: avoid; }
  .topic-card { position: static; height: auto; max-height: none; overflow: visible; box-shadow: none; border: 1px solid var(--gray-200); }
  .topic-desc { -webkit-line-clamp: unset; overflow: visible; }
  .topic-card-detail { display: block !important; }

  /* Avoid splitting a row/card awkwardly across a page break. */
  table, tr, .dlr-card, .card, .dli-card, .contact-block, .step-row { break-inside: avoid; }

  /* Nav dropdowns / admin-only chrome never belongs on paper. */
  .state-dropdown, .nav-item, .nav-links { display: none !important; }
}
