:root {
  --blue-900: #002649;
  --blue-800: #003a70;
  --blue-700: #1a4e7e;
  --blue-600: #38658f;
  --blue-500: #577da1;
  --blue-100: #e0e7ee;
  --blue-50: #f4f6f9;
  --gold-600: #936712;
  --gold-400: #f5ac1e;
  --gold-200: #fceac7;
  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --success: #097e3b;
  --success-light: #e7f5ed;
  --success-border: #91d3ae;
  --red-100: #fceceb;
  --red-600: #b8342a;
  --radius-sm: 4px;
  --radius:    8px;
  --shadow-sm: 0 1px 4px rgba(15,48,96,0.08);
  --shadow:    0 2px 12px rgba(15,48,96,0.10);
      --brand-navy: #003a70;
      --brand-orange: #ff9015;
      --brand-purple: #922880;
      --brand-red: #e64134;
      --brand-gold: #f5ac1e;
      --brand-cyan: #23a1c3;
      --brand-green: #0b9d4a;
      --orange-text: #99560d;
      --gold-text: #936712;
      --cyan-text: #187188;
      --green-text: #097e3b;
      --red-text: #b8342a;
      --purple-text: #922880;
      --purple-900: #5f1a53;
      --purple-700: #922880;
      --purple-100: #f2e5f0;
      --purple-50: #fbf6fa;
    }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Public Sans', system-ui, sans-serif; font-size: 20px; line-height: 1.6; color: var(--gray-800); background: var(--gray-50); min-height: 100vh; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--blue-700);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 8px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.header-brand { display: flex; align-items: center; gap: 28px; flex: 1; min-width: 0; }
.header-logo { height: 74px; width: auto; display: block; max-width: 100%; }
.header-title-text { font-family: 'Poppins', system-ui, sans-serif; font-size:1.6rem; font-weight: 900; color: var(--blue-800); line-height: 1.2; padding: 24px 0; }
.header-dpi-logo { height: 90px; width: auto; display: block; flex-shrink: 0; }
.header-divider { width: 2px; height: 80px; background: var(--blue-700); flex-shrink: 0; opacity: 0.25; }
.header-project-img { height: 100px; width: auto; display: block; flex: 1; object-fit: contain; object-position: center; }
.header-tally { text-align: right; flex-shrink: 0; padding-left: 20px; border-left: 1px solid var(--gray-200); }

/* ─── Language switcher ─── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  background: white;
  flex-shrink: 0;
}
.lang-globe { font-size:0.95rem; line-height: 1; }
.lang-switcher select {
  border: none;
  background: transparent;
  font-family: 'Public Sans', sans-serif;
  font-size:0.82rem;
  font-weight: 600;
  color: var(--blue-800);
  cursor: pointer;
  padding: 2px 4px;
  outline: none;
  min-width: 80px;
}
.lang-switcher select:focus-visible {
  outline: 2px solid #ffb703;
  outline-offset: 2px;
  border-radius: 3px;
}

.header-tally-number { font-family: 'Poppins', system-ui, sans-serif; font-size:2.0rem; font-weight: 900; color: var(--blue-700); line-height: 1; letter-spacing: -0.02em; }
.header-tally-label { font-size:0.75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.header-tally-goal { font-size:0.75rem; font-weight: 700; color: var(--gold-600); margin-top: 2px; }

/* ── PROGRESS ── */
.progress-bar-section { background: var(--blue-800); }
.progress-bar-inner { max-width: 1440px; margin: 0 auto; padding: 11px 32px; display: flex; align-items: center; gap: 16px; }
.progress-track { flex: 1; height: 10px; background: rgba(255,255,255,0.15); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); border-radius: 100px; transition: width 1s ease; min-width: 2px; }
.progress-label { font-family: 'Poppins', system-ui, sans-serif; font-size:0.85rem; font-weight: 700; color: rgba(255,255,255,0.9); min-width: 60px; text-align: right; white-space: nowrap; }

/* ── NAV ── */
.site-nav { background: var(--white); border-bottom: 1px solid var(--gray-200); }
.site-nav-inner { max-width: 1440px; margin: 0 auto; padding: 0 32px; display: flex; }
.nav-btn { padding: 13px 20px; font-size:0.875rem; font-weight: 600; color: var(--gray-600); cursor: pointer; background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; font-family: 'Public Sans', sans-serif; white-space: nowrap; letter-spacing: 0.01em; }
.nav-btn:hover { color: var(--blue-700); }
.nav-btn.active { color: var(--blue-700); border-bottom-color: var(--blue-700); }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }
.container { max-width: 1440px; margin: 0 auto; padding: 40px 40px; }

/* ── HERO ── */
.hero { background: linear-gradient(150deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--blue-600) 100%); position: relative; overflow: hidden; }
.hero::after { content:''; position:absolute; inset:0; background:repeating-linear-gradient(-45deg,transparent,transparent 40px,rgba(255,255,255,0.015) 40px,rgba(255,255,255,0.015) 41px); pointer-events:none; }
.hero-inner { max-width: 1440px; margin: 0 auto; padding: 52px 32px 44px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero-bookmark { width: auto; height: 250px; max-width: 100%; display: block; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35)); }
.hero-badge { display: inline-block; background: var(--brand-purple); color: var(--white); font-size:0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; padding: 5px 14px; border-radius: 3px; margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.55); }
.hero-headline { font-family: 'Poppins', system-ui, sans-serif; font-size:2.25rem; font-weight: 900; color: var(--white); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.hero-sub { font-size:1.0rem; color: rgba(255,255,255,0.85); line-height: 1.65; max-width: 480px; margin-bottom: 28px; }
.hero-cta { display: inline-block; background: var(--white); color: var(--blue-700); font-family: 'Public Sans', sans-serif; font-size:0.95rem; font-weight: 700; padding: 13px 30px; border-radius: var(--radius-sm); border: none; cursor: pointer; letter-spacing: 0.02em; box-shadow: 0 2px 10px rgba(0,0,0,0.18); transition: background 0.15s, transform 0.1s; }
.hero-cta:hover { background: var(--blue-50); transform: translateY(-1px); }
.hero-stats { display: flex; flex-direction: column; gap: 10px; min-width: 155px; }
.hero-stat { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); padding: 14px 18px; text-align: center; }
.hero-stat-val { font-family: 'Poppins', system-ui, sans-serif; font-size:1.65rem; font-weight: 900; color: var(--white); line-height: 1; letter-spacing: -0.02em; }
.hero-stat-lbl { font-size:0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* ── STAT GRID ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-val { font-family: 'Poppins', system-ui, sans-serif; font-size:1.65rem; font-weight: 900; color: var(--blue-700); line-height: 1; letter-spacing: -0.02em; }
.stat-lbl { font-size:0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); margin-top: 5px; }

/* PSU breakdown */
.psu-breakdown { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.psu-sub { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.psu-sub-val { font-family: 'Poppins', system-ui, sans-serif; font-size:1.2rem; font-weight: 900; color: var(--blue-700); line-height: 1; }
.psu-sub-lbl { font-size:0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gray-500); margin-top: 3px; }

/* ── CARDS ── */
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--gray-100); }
.card-icon { width: 34px; height: 34px; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-icon svg { width: 17px; height: 17px; color: var(--blue-700); }
.card-title { font-family: 'Poppins', system-ui, sans-serif; font-size:0.98rem; font-weight: 700; color: var(--blue-800); letter-spacing: -0.01em; }
.card-sub { font-size:0.8rem; color: var(--gray-500); margin-top: 1px; }

/* ── FORM ── */
.form-row { margin-bottom: 16px; }
.form-row:last-child { margin-bottom: 0; }
.form-label { display: block; font-size:0.75rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.form-select, .form-input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size:0.95rem; font-family: 'Public Sans', sans-serif; color: var(--gray-800); background: var(--white); transition: border-color 0.15s, box-shadow 0.15s; appearance: none; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; cursor: pointer; }
.form-select:focus, .form-input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(34,96,168,0.12); }
.form-select:disabled { background-color: var(--gray-50); color: var(--gray-400); cursor: not-allowed; }

/* ── GRADE PILLS ── */
.grade-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.grade-pill { padding: 10px 6px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size:0.85rem; font-weight: 700; color: var(--gray-600); cursor: pointer; background: var(--white); font-family: 'Public Sans', sans-serif; transition: all 0.15s; text-align: center; }
.grade-pill:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.grade-pill.selected { border-color: var(--blue-700); background: var(--blue-700); color: var(--white); }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-card { border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; cursor: pointer; background: var(--white); transition: all 0.15s; font-family: 'Public Sans', sans-serif; }
.role-card:hover { border-color: var(--blue-500); background: var(--blue-50); }
.role-card.selected { border-color: var(--blue-700); background: var(--blue-50); }
.role-icon-wrap { display: flex; justify-content: center; margin-bottom: 8px; color: var(--gray-400); }
.role-card.selected .role-icon-wrap { color: var(--blue-700); }
.role-icon-wrap svg { width: 26px; height: 26px; }
.role-label { font-size:0.76rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.35; }
.role-card.selected .role-label { color: var(--blue-700); }

/* ── SCHOOL TYPE PILLS ── */
.type-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

/* ─── Reading-type cards ───
   Each category shows its own examples, matching the printed graphic, so the
   "etc." stays visible and nobody thinks the list is exhaustive. */
.rtype-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.rtype-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--white); border: 2px solid var(--gray-200);
  border-left: 8px solid var(--gray-200);
  border-radius: 10px; padding: 13px 16px;
  font-family: 'Public Sans', sans-serif; transition: border-color 0.15s, background 0.15s;
}
.rtype-card:hover { background: var(--blue-50); }
.rtype-name {
  display: block; font-weight: 800; font-size:0.98rem; color: var(--blue-800);
  margin-bottom: 3px; line-height: 1.25;
}
.rtype-ex { display: block; font-size:0.82rem; color: var(--gray-700); line-height: 1.5; }
.rtype-card.active { border-color: var(--blue-700); background: var(--blue-50); }

/* Category colours echo the brand graphic. Left bar only, so text contrast
   is never affected — the fills themselves are decorative. */
.rtype-card[data-rtype="text"]     { border-left-color: #d7b3d0; }
.rtype-card[data-rtype="graphics"] { border-left-color: #f7d9a6; }
.rtype-card[data-rtype="art"]      { border-left-color: #e8a99f; }
.rtype-card[data-rtype="video"]    { border-left-color: #f7d9a6; }
.rtype-card[data-rtype="audio"]    { border-left-color: #d7b3d0; }
.rtype-card.active[data-rtype="text"]     { border-left-color: var(--brand-purple); }
.rtype-card.active[data-rtype="graphics"] { border-left-color: var(--brand-gold); }
.rtype-card.active[data-rtype="art"]      { border-left-color: var(--brand-red); }
.rtype-card.active[data-rtype="video"]    { border-left-color: var(--brand-orange); }
.rtype-card.active[data-rtype="audio"]    { border-left-color: var(--brand-purple); }
.type-pill { padding: 7px 18px; border: 1.5px solid var(--gray-200); border-radius: 2px; font-size:0.78rem; font-weight: 700; color: var(--gray-600); cursor: pointer; background: var(--white); font-family: 'Public Sans', sans-serif; letter-spacing: 0.04em; transition: all 0.15s; text-transform: uppercase; white-space: nowrap; }
.type-pill:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.type-pill.active { border-color: var(--blue-700); background: var(--blue-700); color: var(--white); }

/* ── BOOK MODE ── */
.mode-toggle { display: inline-flex; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 18px; }
.mode-btn { padding: 8px 20px; font-size:0.85rem; font-weight: 600; color: var(--gray-600); background: var(--white); border: none; cursor: pointer; font-family: 'Public Sans', sans-serif; transition: all 0.15s; }
.mode-btn + .mode-btn { border-left: 1.5px solid var(--gray-200); }
.mode-btn.active { background: var(--blue-700); color: var(--white); }
.book-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.book-row input { flex: 1; padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size:0.92rem; font-family: 'Public Sans', sans-serif; transition: border-color 0.15s, box-shadow 0.15s; }
.book-row input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(34,96,168,0.1); }
.btn-remove-row { width: 34px; height: 34px; border: none; background: var(--red-100); color: var(--red-600); border-radius: var(--radius-sm); cursor: pointer; font-size:1.1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s; line-height: 1; }
.btn-remove-row:hover { background: #fca5a5; }
.btn-add-row { width: 100%; padding: 9px 14px; background: none; border: 1.5px dashed var(--gray-300); border-radius: var(--radius-sm); font-size:0.85rem; font-weight: 600; color: var(--gray-500); cursor: pointer; font-family: 'Public Sans', sans-serif; transition: all 0.15s; margin-top: 4px; }
.btn-add-row:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.count-wrap { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.count-wrap input[type="number"] { width: 110px; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size:1.2rem; font-weight: 700; color: var(--blue-700); text-align: center; font-family: 'Poppins', system-ui, sans-serif; }
.count-wrap input[type="number"]:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(34,96,168,0.1); }
.count-wrap span { font-size:0.9rem; color: var(--gray-600); }

/* ── SUBMIT ── */
.btn-primary { width: 100%; padding: 14px 24px; background: var(--blue-700); color: var(--white); border: none; border-radius: var(--radius-sm); font-size:1.0rem; font-weight: 700; font-family: 'Public Sans', sans-serif; letter-spacing: 0.03em; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--blue-800); }

/* ── SUCCESS ── */
.success-banner { display: none; background: var(--success-light); border: 1.5px solid var(--success-border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; text-align: center; }
.success-banner.show { display: block; }
.success-banner strong { color: var(--success); font-size:1.0rem; font-weight: 700; display: block; margin-bottom: 4px; }
.success-banner p { color: var(--success); font-size:0.88rem; }

/* ── TOP READS / BOOKBOARD ── */
.reads-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: 12px; }
.read-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 15px; display: flex; gap: 13px; align-items: flex-start; box-shadow: var(--shadow-sm); }
.read-rank { font-family: 'Poppins', system-ui, sans-serif; font-size:1.4rem; font-weight: 900; color: var(--gray-200); line-height: 1; min-width: 28px; flex-shrink: 0; margin-top: 1px; }
.read-rank.gold { color: var(--gold-400); }
.read-rank.silver { color: var(--gray-300); }
.read-rank.bronze { color: #c47a2f; opacity: 0.8; }
.read-title { font-weight: 700; font-size:0.88rem; color: var(--gray-800); line-height: 1.35; }
.read-count { font-size:0.75rem; color: var(--gray-500); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* Board list (vertical ranked list) */
.board-list { list-style: none; }
.bb-tab { background:none; border:none; padding:8px 14px; font-family:'Public Sans',sans-serif; font-size:0.78rem; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(--gray-500); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; transition:all 0.15s; }
.bb-tab:hover { color:var(--blue-600); }
.bb-tab-active { color:var(--blue-700); border-bottom-color:var(--blue-700); }
.board-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.board-item:last-child { border-bottom: none; padding-bottom: 0; }
.board-num { font-family: 'Poppins', system-ui, sans-serif; font-size:1.1rem; font-weight: 900; line-height: 1; min-width: 26px; text-align: center; flex-shrink: 0; }
.board-num.gold   { color: var(--gold-400); }
.board-num.silver { color: var(--gray-400); }
.board-num.bronze { color: #c47a2f; }
.board-num.other  { color: var(--gray-300); font-size:0.85rem; }
.board-bar-wrap { flex: 1; min-width: 0; }
.board-name { font-weight: 700; font-size:0.88rem; color: var(--gray-800); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.board-bar { height: 4px; background: var(--blue-100); border-radius: 100px; overflow: hidden; }
.board-bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); border-radius: 100px; transition: width 0.6s ease; }
.board-val { font-size:0.78rem; font-weight: 700; color: var(--blue-700); white-space: nowrap; flex-shrink: 0; }

/* ── HELP ── */
.help-steps { display: grid; grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); gap: 12px; margin-bottom: 0; }
.help-step { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-sm); padding: 18px; }
.step-num { font-family: 'Poppins', system-ui, sans-serif; font-size:0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue-600); margin-bottom: 8px; }
.step-icon { margin-bottom: 10px; color: var(--blue-600); }
.step-icon svg { width: 22px; height: 22px; }
.step-head { font-weight: 700; font-size:0.9rem; color: var(--blue-800); margin-bottom: 4px; }
.step-desc { font-size:0.82rem; color: var(--gray-600); line-height: 1.5; }
.faq { list-style: none; }
.faq li { border-bottom: 1px solid var(--gray-100); padding: 15px 0; }
.faq li:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q { font-weight: 700; color: var(--blue-800); font-size:0.93rem; margin-bottom: 5px; }
.faq-a { font-size:0.87rem; color: var(--gray-600); line-height: 1.6; }

/* ── ADMIN ── */
.admin-gate { max-width: 400px; margin: 64px auto; text-align: center; }
.admin-gate svg { width: 48px; height: 48px; color: var(--gray-300); margin-bottom: 20px; }
.admin-gate h2 { font-family: 'Poppins', system-ui, sans-serif; color: var(--blue-800); font-size:1.25rem; margin-bottom: 8px; }
.admin-gate p { color: var(--gray-600); font-size:0.9rem; margin-bottom: 24px; }
.admin-error { color: var(--red-600); font-size:0.83rem; margin-top: 12px; font-weight: 600; min-height: 18px; }
.admin-hint { font-size:0.75rem; color: var(--gray-500); margin-top: 14px; }
.admin-panel { display: none; }
.admin-panel.visible { display: block; }
.admin-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.admin-top h2 { font-family: 'Poppins', system-ui, sans-serif; color: var(--blue-800); font-size:1.2rem; }
.admin-top p { color: var(--gray-500); font-size:0.83rem; margin-top: 3px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-dl { padding: 9px 18px; border: none; border-radius: var(--radius-sm); font-size:0.83rem; font-weight: 700; cursor: pointer; font-family: 'Public Sans', sans-serif; background: var(--gold-400); color: var(--blue-900); transition: background 0.15s; }
.btn-dl:hover { background: var(--gold-600); color: var(--white); }
.btn-dl.sec { background: var(--blue-50); color: var(--blue-700); border: 1.5px solid var(--blue-100); }
.btn-dl.sec:hover { background: var(--blue-100); }
.btn-del { padding: 9px 18px; border: none; border-radius: var(--radius-sm); font-size:0.83rem; font-weight: 600; cursor: pointer; font-family: 'Public Sans', sans-serif; background: var(--red-100); color: var(--red-600); transition: background 0.15s; }
.btn-del:hover { background: #fca5a5; }
.admin-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.admin-search { padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size:0.87rem; font-family: 'Public Sans', sans-serif; width: 280px; }
.admin-search:focus { outline: none; border-color: var(--blue-600); }
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size:0.84rem; }
.data-table th { background: var(--blue-50); color: var(--blue-800); font-weight: 700; font-size:0.75rem; text-transform: uppercase; letter-spacing: 0.07em; padding: 10px 13px; text-align: left; border-bottom: 2px solid var(--blue-100); white-space: nowrap; }
.data-table th:last-child { position: sticky; right: 0; background: var(--blue-50); z-index: 2; box-shadow: -2px 0 6px rgba(0,0,0,0.06); }
.data-table td { padding: 10px 13px; border-bottom: 1px solid var(--gray-100); vertical-align: top; line-height: 1.45; }
.data-table td:last-child { position: sticky; right: 0; background: var(--white); z-index: 1; box-shadow: -2px 0 6px rgba(0,0,0,0.05); }
.data-table tr:hover td { background: var(--gray-50); }
.data-table tr:hover td:last-child { background: var(--gray-50); }
.data-table tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 2px 7px; border-radius: 2px; font-size:0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.t-student  { background: #dbeafe; color: #1e40af; }
.t-parent   { background: #fef9c3; color: #854d0e; }
.t-teacher  { background: #d1fae5; color: #065f46; }
.t-community { background: #ffedd5; color: #9a3412; }
.t-admin    { background: #ede9fe; color: #5b21b6; }
.t-lea      { background: #dbeafe; color: #1e40af; }
.t-charter  { background: #d1fae5; color: #065f46; }
.t-lab      { background: #fef9c3; color: #854d0e; }
.t-regional { background: #ede9fe; color: #5b21b6; }
.empty-state { text-align: center; padding: 52px 24px; color: var(--gray-500); }
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.4; display: block; margin-left: auto; margin-right: auto; }
.empty-state p { font-size:0.9rem; }

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--gray-200); background: var(--gray-50); text-align: center; font-size:0.77rem; color: var(--gray-600); margin-top: 40px; padding: 0; }
.site-footer strong { color: var(--blue-700); font-weight: 700; }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  .header-inner { padding: 8px 16px; gap: 12px; }
  .hero-bookmark { height: 165px; }
  .stacks-hero-logo { height: 74px !important; }
  .header-title-text { font-size:1.05rem; padding: 12px 0; }
  .header-dpi-logo { height: 52px; }
  .header-project-img { height: 52px; }
  .header-divider { height: 48px; }
  .header-tally-number { font-size:1.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px 28px; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .hero-stat { flex: 1; min-width: 100px; padding: 12px; }
  .hero-headline { font-size:1.55rem; }
  .role-grid { grid-template-columns: repeat(2,1fr); }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .psu-breakdown { grid-template-columns: repeat(2,1fr); }
  .container { padding: 24px 16px; }
  .site-nav-inner { padding: 0 12px; overflow-x: auto; }
  .nav-btn { padding: 11px 14px; font-size:0.81rem; }
  .admin-search { width: 100%; }
  .progress-bar-inner { padding: 10px 16px; }
  #home-bookboard { grid-template-columns: 1fr !important; }
  #page-reads .container > div { grid-template-columns: 1fr !important; }
  #bb-spotlights { grid-template-columns: 1fr !important; }
  .grade-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

    /* ─── Accessibility: honor OS 'reduce motion' preference ─── */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* ─── Accessibility: visible keyboard focus indicator ─── */
    /* Uses :focus-visible so mouse users don't see focus rings on click,
       but keyboard users always do. */
    :focus-visible {
      outline: 3px solid #ffb703;
      outline-offset: 2px;
      border-radius: 3px;
    }
    .role-card:focus-visible,
    .type-pill:focus-visible,
    .grade-pill:focus-visible,
    .nav-btn:focus-visible,
    .bb-tab:focus-visible {
      outline: 3px solid #ffb703;
      outline-offset: 3px;
    }

    /* ─── Accessibility: skip link (only appears when keyboard-focused) ─── */
    .skip-link {
      position: absolute;
      top: -100px;
      left: 0;
      background: var(--blue-800);
      color: white;
      padding: 12px 20px;
      font-weight: 700;
      z-index: 10000;
      text-decoration: none;
      border-radius: 0 0 6px 0;
    }
    .skip-link:focus {
      top: 0;
    }

    /* ─── Accessibility: sr-only utility for screen-reader-only text ─── */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    .county-map { position: relative; touch-action: manipulation; }
    .county-map svg { width: 100%; height: auto; overflow: visible; pointer-events: auto; display: block; }
    .county-map path.county { pointer-events: all; cursor: pointer; outline: none; }
    .county-map path.county:focus { stroke: #f5ac1e; stroke-width: 2.5px; }

@keyframes spin{to{transform:rotate(360deg)}}

@keyframes popIn { from { opacity:0; transform:scale(0.7); } to { opacity:1; transform:scale(1); } }
