/* ==========================================================================
   ASU Prep design system — aligned to the org DESIGN.md standard.
   Brand tokens: Maroon #8C1D40 (primary), Gold #FFC627 (accent), on a
   near-white surface (#FAFAFA). Typography is the single DESIGN.md Arial
   stack — no web fonts, no separate display face. Body is 16px/1.6; headings
   are weight 700 on the DESIGN heading scale (page title → h1 48, section and
   card headers → h3 22). Buttons follow the 13px button token.

   Project extension semantic tokens beyond the base palette: --ela plum
   subject accent, the per-subject chip colors, and the coverage
   full/partial/none palette — kept as accessible bg/fg pairs.
   ========================================================================== */

:root {
  --font-asu-sans: Arial, Helvetica, "Nimbus Sans L", "Liberation Sans", FreeSans, sans-serif;
  --font-asu-heading: var(--font-asu-sans); /* DESIGN.md: one stack, no separate display face */
  --maroon: #8C1D40;
  --gold: #FFC627;
  --ela: #75276D;
  /* DESIGN.md radius tokens */
  --radius-base: 0.5rem;
  --radius-lg: 0.625rem;
  --radius-xl: 0.75rem;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-asu-sans); background: #FAFAFA; color: #191919; min-height: 100vh; font-size: 16px; line-height: 1.6; }

/* ---- Header ---- */
.site-header { background: #8C1D40; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18); }
.site-header-inner { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.site-header-logo { height: 34px; width: auto; display: block; }
.site-header-spacer { flex: 1; }
.site-header-link { font-family: var(--font-asu-sans); font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.85); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: var(--radius-base); background: rgba(255, 255, 255, 0.12); transition: background 120ms, color 120ms; }
.site-header-link:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, #8C1D40 0%, #6B1530 100%); border-bottom: 3px solid #FFC627; padding: 22px 0; color: #fff; }
.hero-inner { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
.hero-label { font-family: var(--font-asu-sans); font-size: 11px; font-weight: 700; color: #FFC627; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.hero-title { font-family: var(--font-asu-heading); font-size: 48px; font-weight: 700; color: #fff; line-height: 1.1; margin-bottom: 4px; letter-spacing: -0.01em; }
.hero-sub { font-family: var(--font-asu-sans); font-size: 16px; color: rgba(255, 255, 255, 0.80); }

/* ---- Toolbar ---- */
.toolbar { background: #F5F5F5; padding: 8px 0 0; width: 100%; position: sticky; top: 56px; z-index: 40; border-bottom: 1px solid rgba(28, 46, 56, 0.10); }
.toolbar > div { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-row { padding-bottom: 8px !important; }
.vg { display: flex; gap: 2px; }
.vb { position: relative; background: transparent; border: none; border-radius: 0; color: #484848; font-weight: 700; padding: 10px 14px; font-size: 13px; cursor: pointer; font-family: var(--font-asu-sans); }
.vb::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px; background: #8C1D40; border-radius: 2px; transform: scaleX(0); transform-origin: center; transition: transform 160ms ease; }
.vb:hover { color: #8C1D40; }
.vb:hover::after { transform: scaleX(0.45); }
.vb.active { color: #8C1D40; }
.vb.active::after { transform: scaleX(1); }
.srch { height: 36px; padding: 0 12px; border: 1px solid rgba(28, 46, 56, 0.20); border-radius: var(--radius-base); font-size: 15px; background: #FFFFFF; color: #191919; font-family: var(--font-asu-sans); width: 240px; transition: border-color 120ms, box-shadow 120ms; }
.srch::placeholder { color: #8a8a8a; }
.srch:focus { outline: none; border-color: #8C1D40; box-shadow: 0 0 0 2px rgba(140, 29, 64, 0.15); }

/* ---- Site-specific: state toggle (gold = active, per brand active-state) ---- */
.state-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.state-bar-label { font-family: var(--font-asu-sans); font-size: 12px; font-weight: 700; color: #5C6670; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 2px; }
.stb { padding: 6px 12px; border: 1px solid rgba(28, 46, 56, 0.20); border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; background: #FFFFFF; color: #484848; font-family: var(--font-asu-sans); transition: background 120ms, color 120ms, border-color 120ms; }
.stb:hover:not(.on) { border-color: #8C1D40; color: #8C1D40; }
.stb.on { background: #FFC627; color: #191919; border-color: #FFC627; }

/* ---- Layout ---- */
.page-wrap { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 1.25rem; }
.stat { background: #8C1D40; border-radius: var(--radius-base); padding: 14px 16px; }
.stat-val { color: #FFFFFF; font-family: var(--font-asu-heading); font-size: 30px; font-weight: 700; display: block; line-height: 1.1; }
.stat-lbl { color: rgba(255, 255, 255, 0.75); font-size: 13px; display: block; margin-top: 2px; }

/* ---- Chips ---- */
.chip { display: inline-block; font-family: var(--font-asu-sans); font-size: 12px; font-weight: 500; line-height: 1.3; padding: 4px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.01em; }
.crl { background: #F3E4F1; color: #75276D; }
.cri { background: #DCEFF1; color: #007681; }
.cw  { background: #F1E3D8; color: #A64B16; }
.csl { background: #DCE2EE; color: #1A3C74; }
.cl  { background: #E8E5E3; color: #3D2314; }
.cns { background: #EBEBEA; color: #484848; }
/* Science core-idea tiers + Geometry's Agave split (from the IRG map) */
.csci1 { background: #F3E4F1; color: #75276D; }
.csci2 { background: #DCEFF1; color: #007681; }
.csci3 { background: #F1E3D8; color: #A64B16; }
.csci4 { background: #DCE2EE; color: #1A3C74; }
.cagv-deep { background: #E8EFE9; color: #1B5E20; }
.cagv-light { background: #D6F0D8; color: #34B53E; }
.cnew { background: #8C1D40; color: #FFFFFF; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.cauto { background: #e6f5fc; color: #007DB0; }
.cinst { background: #f9f0f3; color: #8C1D40; }
.cila { background: #f0f8e6; color: #4a7a10; }

/* ---- Module (overview) cards ---- */
.ov-card { position: relative; background: #FFFFFF; border: 1px solid #E8E8E8; border-radius: var(--radius-base); margin-bottom: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); transition: box-shadow 150ms, transform 150ms; }
.ov-card:hover { box-shadow: 0 4px 14px rgba(28, 46, 56, 0.12); transform: translateY(-1px); }
.ov-header { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px 14px 18px; cursor: pointer; user-select: none; }
.ov-header:hover { background: rgba(28, 46, 56, 0.03); }
.ov-accent { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; border-radius: 0; }
.ov-meta { flex: 1; min-width: 0; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.ov-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; color: #75276D; }
.ov-badge svg { width: 12px; height: 12px; flex-shrink: 0; }
.ov-title { font-family: var(--font-asu-heading); font-size: 22px; font-weight: 700; color: #191919; line-height: 1.3; }
.ov-desc { font-size: 14px; color: #484848; line-height: 1.55; margin-top: 6px; }
.ov-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; margin-left: 10px; }
.ov-body { display: none; }
.ov-body.open { display: block; }
.tp { font-size: 12px; padding: 2px 8px; border-radius: var(--radius-base); background: #F5F5F5; color: #191919; font-weight: 700; white-space: nowrap; }
.ov-right .meta-line { font-size: 13px; color: #5C6670; }
.chev { font-size: 18px; font-weight: 700; color: #191919; transition: transform 160ms; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: rgba(28, 46, 56, 0.06); flex-shrink: 0; }
.chev.open { transform: rotate(180deg); }

/* ---- Expand detail grid ---- */
.det-panel { padding: 4px 16px 18px 18px; border-top: 1px solid rgba(28, 46, 56, 0.10); }
.det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 14px; }
.det-head { font-size: 12px; font-weight: 700; color: #8C1D40; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid rgba(28, 46, 56, 0.10); }
.obj-ul { list-style: none; }
.obj-ul li { font-size: 14px; color: #191919; padding: 6px 0; border-bottom: 1px solid rgba(28, 46, 56, 0.08); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.obj-ul li:last-child { border-bottom: none; }
.obj-ul li::before { content: "\203A"; color: #8C1D40; flex-shrink: 0; font-weight: 700; margin-top: 1px; }
.res-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.res-tbl tr { border-bottom: 1px solid rgba(28, 46, 56, 0.08); }
.res-tbl tr:last-child { border-bottom: none; }
.res-tbl td { padding: 7px 4px; color: #484848; vertical-align: middle; }
.res-tbl td:first-child { color: #191919; padding-left: 0; }
.res-tbl td:last-child { text-align: right; white-space: nowrap; color: #5C6670; padding-right: 0; }
.mod-total { font-size: 13px; font-weight: 700; color: #191919; margin-top: 14px; padding: 6px 12px; background: #FFFFFF; border: 1px solid rgba(28, 46, 56, 0.14); border-radius: 999px; display: inline-block; }
.mod-desc-p { font-size: 14px; color: #484848; line-height: 1.6; margin-top: 4px; }
.ass-ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ass-ul li { font-size: 14px; padding: 8px 12px; border-radius: var(--radius-base); font-weight: 500; }
.assf { background: #F5F5F5; color: #484848; }
.asss { background: #f9f0f3; color: #8C1D40; font-weight: 600; }
.std-note { font-size: 14px; background: #FFFFFF; border-radius: var(--radius-base); padding: 12px 14px; color: #484848; line-height: 1.55; grid-column: 1/-1; border: 1px solid rgba(28, 46, 56, 0.10); }
.std-note b { color: #191919; font-weight: 700; }

/* ---- Standards view ---- */
.ap-cat-name { font-family: var(--font-asu-heading); font-size: 22px; font-weight: 700; color: #191919; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 10px 2px; padding-bottom: 6px; border-bottom: 2px solid #FFC627; }
.std-cat-group { margin-bottom: 1.75rem; }
.std-card { background: #FFFFFF; border: 1px solid rgba(28, 46, 56, 0.12); border-radius: var(--radius-lg); margin-bottom: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(28, 46, 56, 0.05); transition: box-shadow 150ms, transform 150ms; }
.std-card:hover { box-shadow: 0 4px 14px rgba(28, 46, 56, 0.12); transform: translateY(-1px); }
.std-badge { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-base); white-space: nowrap; flex-shrink: 0; }
.std-body { display: none; padding: 0 14px 12px; border-top: 1px solid rgba(28, 46, 56, 0.08); }
.std-body.open { display: block; }
.std-mod-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid rgba(28, 46, 56, 0.08); font-size: 14px; }
.std-mod-row:last-child { border-bottom: none; }
.std-mod-name { font-weight: 600; color: #191919; min-width: 190px; flex-shrink: 0; font-size: 14px; }
.std-mod-blocks { color: #484848; line-height: 1.6; flex: 1; font-size: 14px; }

.no-res { font-size: 16px; color: #484848; padding: 2rem 0; text-align: center; }

/* ---- Coverage / crosswalk (AI-generated target-state alignment) ---- */
.cov-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.cov-full { background: #E2F2E4; color: #1B5E20; border: 1px solid #C5E4C9; }
.cov-partial { background: #FDF5D3; color: #6B4A00; border: 1px solid #EDE3AC; }
.cov-none { background: #FFDECC; color: #AE2024; border: 1px solid #F6C6A9; }
.chip.cov-full { background: #E2F2E4; color: #1B5E20; }
.chip.cov-partial { background: #FDF5D3; color: #6B4A00; }
.chip.cov-none { background: #FFDECC; color: #AE2024; }
.stat.s-full { background: #2E7D46; }
.stat.s-partial { background: #B26A00; }
.stat.s-none { background: #A5231F; }
.prov-banner { background: #FFF9E6; border: 1px solid #EDE3AC; border-radius: var(--radius-lg); padding: 11px 14px; margin-bottom: 1.25rem; font-size: 14px; color: #6B4A00; line-height: 1.55; display: flex; gap: 10px; align-items: flex-start; }
.prov-banner svg { flex-shrink: 0; margin-top: 1px; color: #B26A00; }
.prov-banner b { color: #8C1D40; font-weight: 700; }
.stb.ai-state::after { content: "AI"; font-size: 9px; font-weight: 700; vertical-align: super; margin-left: 3px; letter-spacing: .04em; opacity: .8; }
.cov-count { font-family: var(--font-asu-sans); font-size: 13px; font-weight: 600; color: #5C6670; margin-left: 8px; }
.ap-cat-name.cov-head-none { color: #A5231F; border-bottom-color: #F6C6A9; }
.ap-cat-name.cov-head-partial { color: #B26A00; border-bottom-color: #EDE3AC; }
.ap-cat-name.cov-head-full { color: #2E7D46; border-bottom-color: #C5E4C9; }
.std-substrand { font-size: 12px; color: #5C6670; margin-top: 3px; font-style: italic; }
.std-bridge { font-size: 14px; color: #484848; line-height: 1.6; }
.std-bridge b { color: #191919; }
.std-note-line { font-size: 14px; color: #6B4A00; background: #FFF9E6; border-radius: var(--radius-base); padding: 7px 10px; margin-top: 8px; line-height: 1.5; }

/* ---- Footer legend ---- */
.legend-footer { position: fixed; bottom: 0; left: 0; right: 0; background: #8C1D40; padding: 8px 1.25rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; z-index: 50; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.14); }
.legend-footer .chip { cursor: default; }

/* ---- Print button ---- */
.print-btn { background: #FFC627; color: #191919; border: none; border-radius: var(--radius-base); font-family: var(--font-asu-sans); font-size: 13px; font-weight: 700; padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.print-btn:hover { background: #f0b800; }
.print-btn.alt { background: #fff; color: #8C1D40; border: 1px solid #8C1D40; }
.print-btn.alt:hover { background: #f5eff4; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .det-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-title { font-size: 32px; }
}
@media print {
  .toolbar, .legend-footer, .site-header-link, .print-btn { display: none !important; }
  .site-header, .hero { position: static; }
  .ov-body { display: block !important; }
}
