/* New pages — token aliases + components (aao-explorer-new-pages-cursor-prompt) */
:root {
  --text-muted: var(--slate);
  --text-hint: var(--slate-soft);
  --text: var(--ink);
  --surface: var(--panel);
  --bg: var(--page);
  --border-hover: var(--slate-soft);
}

.b-remand  { background: #FAEEDA; color: #633806; }
.b-sustain { background: #E1F5EE; color: #085041; }
.b-dismiss { background: #F1EFE8; color: #444441; }

.visa-hero { padding: 24px 0 28px; border-bottom: 0.5px solid var(--border-color, var(--line)); margin-bottom: 28px; }
.visa-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.visa-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.03em; }
.visa-badge--purple { background: #EEEDFE; color: #3C3489; }
.visa-badge--blue { background: #E8ECF4; color: #1E3158; }
.visa-badge--gold { background: #FAEEDA; color: #633806; }
.visa-badge--teal { background: #E1F5EE; color: #085041; }
.visa-badge--rose { background: #FAECE7; color: #712B13; }
.visa-badge--slate { background: #F1EFE8; color: #444441; }
.form-tag { font-size: 12px; color: var(--text-muted); padding: 4px 10px; border: 0.5px solid var(--line); border-radius: 999px; }
.visa-title { font-family: var(--font-serif, var(--display)); font-size: 26px; font-weight: 500; line-height: 1.25; margin-bottom: 10px; }
.visa-title em { font-style: italic; }
.visa-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 580px; margin-bottom: 20px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-label { font-size: 11px; color: var(--text-hint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.stat-val { font-size: 22px; font-weight: 500; }
.stat-val--teal { color: #0F6E56; }
.stat-val--amber { color: #854F0B; }
.stat-val--sm { font-size: 16px; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.two-col-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; padding-bottom: 48px; align-items: start; }
.card-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.55; }

.criteria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.crit-card { border: 0.5px solid var(--line); border-radius: 8px; padding: 12px 14px; text-decoration: none; display: block; transition: border-color 0.15s, background 0.15s; color: inherit; }
.crit-card:hover { border-color: #1D9E75; background: rgba(29,158,117,0.04); }
.crit-num { font-size: 11px; color: var(--text-hint); margin-bottom: 4px; }
.crit-name { font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.crit-bar-wrap { height: 4px; background: var(--line); border-radius: 2px; margin-bottom: 5px; }
.crit-bar { height: 4px; border-radius: 2px; background: #1D9E75; }
.crit-pct { font-size: 11px; color: var(--text-muted); }
.crit-pct span { font-weight: 500; color: var(--text); }

.case-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.case-tab { padding: 6px 14px; border-radius: 999px; border: 0.5px solid var(--line); background: transparent; font-family: var(--sans); font-size: 13px; cursor: pointer; color: var(--text-muted); }
.case-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.case-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.case-filters select { padding: 6px 10px; border-radius: 8px; border: 0.5px solid var(--line); font-family: var(--sans); font-size: 13px; }
.case-count-label { margin-left: auto; font-size: 12px; color: var(--text-hint); }

.case-card { display: block; border: 0.5px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; transition: border-color 0.15s; margin-bottom: 8px; color: inherit; }
.case-card:hover { border-color: var(--teal); }
.case-card[hidden] { display: none !important; }
.case-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.case-verdict { font-family: var(--font-serif, var(--display)); font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 6px; color: var(--text); }
.case-summary { font-size: 12px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.case-year { font-size: 11px; color: var(--text-hint); }
.badge-sm { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 500; display: inline-block; }
.see-all-link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--teal-deep); }

.sidebar-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.sidebar-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.chart-wrap { position: relative; height: 160px; margin-bottom: 12px; }
.chart-legend { display: flex; flex-direction: column; gap: 6px; }
.chart-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.chart-legend-sq { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

.mode-pill-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; border: 0.5px solid var(--line); font-size: 12px; color: var(--text-muted); text-decoration: none; transition: border-color 0.12s, background 0.12s; margin-bottom: 6px; }
.mode-pill-row:hover { border-color: var(--border-hover); background: var(--surface); }
.mode-pill-row strong { display: block; font-size: 12px; font-weight: 600; color: var(--text); }
.mode-pill-row i { color: var(--text-hint); font-size: 15px; flex-shrink: 0; }
.mode-pill-row span.sub { font-size: 11px; color: var(--text-hint); }

.merits-note { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }
.related-visa-list { display: flex; flex-direction: column; gap: 6px; }
.related-visa-list a { font-size: 13px; color: var(--teal-deep); font-weight: 600; text-decoration: none; }
.related-visa-list a:hover { text-decoration: underline; }

/* Criterion / prong pages */
.crit-hero { padding: 20px 0 24px; border-bottom: 0.5px solid var(--line); margin-bottom: 24px; }
.crit-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.crit-title { font-family: var(--font-serif, var(--display)); font-size: 30px; font-weight: 600; margin-bottom: 8px; line-height: 1.25; }
.crit-title em { font-style: italic; font-weight: 400; color: #534AB7; }
.prong-title em { color: #854F0B; font-weight: 400; }
.crit-reg { font-size: 13px; color: var(--text-muted); line-height: 1.6; padding: 12px 16px; background: var(--surface); border-radius: 0; border-left: 3px solid #AFA9EC; margin-bottom: 18px; }
.crit-reg strong { color: var(--text); }

.evidence-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ev-col { border-radius: 8px; padding: 14px 16px; }
.ev-col.wins { border: 0.5px solid #9FE1CB; }
.ev-col.fails { border: 0.5px solid #F5C4B3; }
.ev-col-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.ev-col-title { font-size: 12px; font-weight: 600; }
.ev-col-title.teal { color: #085041; }
.ev-col-title.coral { color: #712B13; }
.ev-item { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.ev-icon { width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; font-size: 9px; font-weight: 700; }
.ev-icon.tick { background: #E1F5EE; color: #085041; }
.ev-icon.cross { background: #FAECE7; color: #712B13; }
.ev-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.ev-text strong { color: var(--text); }

.threshold-card { border: 0.5px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.12s; text-decoration: none; display: block; color: inherit; }
.threshold-card:hover { border-color: var(--border-hover); }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.tc-label { font-size: 12px; font-weight: 600; color: var(--text); }
.tc-pct-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 500; flex-shrink: 0; }
.pct-high { background: #E1F5EE; color: #085041; }
.pct-mid  { background: #FAEEDA; color: #633806; }
.pct-low  { background: #FAECE7; color: #712B13; }
.tc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.tc-desc em { font-style: italic; }

.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fpill-btn { padding: 5px 12px; border-radius: 999px; border: 0.5px solid var(--line); background: transparent; font-family: var(--sans); font-size: 12px; cursor: pointer; color: var(--text-muted); }
.fpill-btn.active { background: #EEEDFE; border-color: #534AB7; color: #3C3489; font-weight: 600; }

.case-card2 { display: block; border: 0.5px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: inherit; }
.case-card2:hover { border-color: var(--teal); }
.case-card2[hidden] { display: none !important; }
.case-card2 h4 { font-family: var(--font-serif, var(--display)); font-size: 13px; font-weight: 500; margin: 4px 0; }
.case-card2 p { font-size: 11px; color: var(--text-muted); line-height: 1.45; }

.sb-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.quiz-card { background: rgba(238,237,254,0.12); border: 0.5px solid #AFA9EC; border-radius: 10px; padding: 14px 16px; }
.quiz-q { font-size: 13px; line-height: 1.5; margin-bottom: 12px; color: var(--text); }
.quiz-opt { display: block; width: 100%; font-size: 12px; padding: 8px 12px; border: 0.5px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--text-muted); background: var(--bg); transition: all 0.12s; text-align: left; margin-bottom: 6px; font-family: var(--sans); }
.quiz-opt:hover:not(:disabled) { border-color: #534AB7; color: #3C3489; background: #EEEDFE; }
.quiz-opt.correct { border-color: #1D9E75; background: #E1F5EE; color: #085041; }
.quiz-opt.wrong   { border-color: #E24B4A; background: #FCEBEB; color: #A32D2D; }
.quiz-exp { font-size: 12px; color: var(--text-muted); margin-top: 10px; line-height: 1.5; padding: 10px 12px; background: var(--surface); border-radius: 6px; }

.related-list { display: flex; flex-direction: column; gap: 6px; }
.rel-item { font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 8px 10px; border: 0.5px solid var(--line); border-radius: 8px; display: flex; justify-content: space-between; align-items: center; transition: border-color 0.12s; }
.rel-item:hover { border-color: var(--border-hover); }
.rel-item.active { border-color: #534AB7; color: #3C3489; background: rgba(238,237,254,0.1); font-weight: 600; }

/* Dashboard */
.dash-page { padding-top: 32px; padding-bottom: 60px; }
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-header h1 { font-family: var(--font-serif, var(--display)); font-size: 28px; font-weight: 500; margin-top: 6px; }
.dash-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-controls select { padding: 8px 12px; border-radius: 8px; border: 0.5px solid var(--line); font-family: var(--sans); font-size: 13px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 0.5px solid var(--line); background: var(--surface); font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: var(--slate-soft); }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 0.5px solid var(--line); border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.kpi-label { font-size: 11px; color: var(--text-hint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.kpi-val { font-size: 24px; font-weight: 500; line-height: 1; }
.kpi-val.teal { color: #0F6E56; }
.kpi-val.amber { color: #854F0B; }
.kpi-delta { font-size: 11px; margin-top: 4px; }
.delta-pos { color: #0F6E56; }
.delta-neg { color: #A32D2D; }
.delta-neu { color: var(--text-hint); }

.tab-nav { display: flex; border-bottom: 0.5px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tnav { padding: 9px 16px; font-size: 13px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -0.5px; transition: color 0.12s; font-family: var(--sans); white-space: nowrap; }
.tnav.active { color: #534AB7; border-bottom-color: #534AB7; font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.chart-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.chart-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-legend-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.chart-canvas-wrap { position: relative; height: 220px; }
.chart-canvas-wrap.tall { height: 280px; }

.rate-table-wrap { margin-top: 24px; overflow-x: auto; }
.rate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rate-table th { text-align: left; padding: 10px 12px; border-bottom: 0.5px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-hint); }
.rate-table td { padding: 12px; border-bottom: 0.5px solid var(--line); vertical-align: middle; }
.rate-table tr.clickable { cursor: pointer; }
.rate-table tr.clickable:hover { background: var(--navy-50, #F4F6FA); }
.mini-bar { height: 5px; border-radius: 2.5px; background: var(--line); min-width: 60px; }
.mini-bar-fill { height: 5px; border-radius: 2.5px; }
.rate-high { color: #0F6E56; font-weight: 600; }
.rate-mid  { color: #854F0B; font-weight: 600; }
.rate-low  { color: #A32D2D; font-weight: 600; }

@media (max-width: 768px) {
  .stat-row, .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .criteria-grid, .evidence-cols, .chart-row { grid-template-columns: 1fr; }
  .two-col-layout { grid-template-columns: 1fr; }
  .two-col-layout .col-sidebar { order: -1; }
}
@media (max-width: 480px) {
  .stat-row, .kpi-row { grid-template-columns: 1fr; }
}

/* Content pages (disclaimer, why, contact) */
.content-page { padding-top: 32px; padding-bottom: 60px; max-width: 720px; }
.content-page h1 { font-family: var(--font-serif, var(--display)); font-size: 32px; font-weight: 500; margin-bottom: 16px; }
.content-page h2 { font-family: var(--font-serif, var(--display)); font-size: 22px; font-weight: 500; margin: 32px 0 12px; }
.content-page h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.content-page p { font-size: 15px; line-height: 1.7; color: var(--slate); margin-bottom: 14px; }
.content-page a { color: #534AB7; }
.content-page .btn-primary {
  display: inline-block;
  padding: 12px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.content-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(20,35,63,.22);
  color: #fff;
}
.content-feature { margin: 18px 0; padding: 16px 18px; border: 0.5px solid var(--line); border-radius: 10px; background: var(--surface); }
.content-closing { margin-top: 28px; font-weight: 500; color: var(--ink); }
.content-note { font-size: 13px; color: var(--text-hint); }
