/* Components. Semantic tokens only; no raw colors below this line. */

/* ---------- RIASEC hue hook: any .chip--X element gets --c / --c-soft ---------- */
.chip--R { --c: var(--riasec-R); --c-soft: var(--riasec-R-soft); }
.chip--I { --c: var(--riasec-I); --c-soft: var(--riasec-I-soft); }
.chip--A { --c: var(--riasec-A); --c-soft: var(--riasec-A-soft); }
.chip--S { --c: var(--riasec-S); --c-soft: var(--riasec-S-soft); }
.chip--E { --c: var(--riasec-E); --c-soft: var(--riasec-E-soft); }
.chip--C { --c: var(--riasec-C); --c-soft: var(--riasec-C-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap-size); padding: 0 var(--space-5);
  border-radius: var(--radius-pill); border: 2px solid transparent;
  font-weight: var(--weight-bold); text-decoration: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--color-brand); color: var(--color-on-brand); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-brand-strong); }
.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-control-border); }
.btn--ghost:hover { background: var(--color-surface); }
.btn--danger { background: transparent; color: var(--color-danger); border-color: currentColor; }
.btn--sm { min-height: 36px; padding-inline: var(--space-4); font-size: var(--text-sm); }
.btn--block { width: 100%; }
.btn--block + .btn--block { margin-top: var(--space-2); }
.link-arrow { font-weight: var(--weight-bold); }
.link-arrow::after { content: "\00a0\2192"; }

/* ---------- Page header ---------- */
.page-header { margin-bottom: var(--space-5); max-width: 52rem; }
.eyebrow {
  font-size: var(--text-xs); font-weight: var(--weight-heavy);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--color-brand); margin-bottom: var(--space-2);
}
.lede { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 44rem; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-4); }
.crumbs { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.crumbs a { font-weight: 600; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.card-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
/* Anything placed right after a grid, table or strip gets breathing room (they have no margin of their own). */
:is(.card-grid, .roi-grid, .pathway-grid, .table-scroll, .fact-strip) + * { margin-top: var(--space-4); }
.card-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; gap: var(--space-6); align-items: center;
  padding: var(--space-6) var(--space-5);
  margin-inline: calc(var(--space-4) * -1);
  border-radius: var(--radius-lg);
  background: var(--hero-glow), var(--color-surface-2);
  border: 1px solid var(--color-border);
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.4fr 1fr; padding: var(--space-8) var(--space-7); margin-inline: 0; }
}
.hero h1 { max-width: 15ch; }
.accent-text {
  background: linear-gradient(transparent 62%, var(--color-accent) 62%, var(--color-accent) 90%, transparent 90%);
  padding-inline: 0.1em;
}
[data-theme="dark"] .accent-text { background: none; color: var(--color-accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block: var(--space-5); }
.hero__art { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); max-width: 340px; justify-self: center; width: 100%; }
.hero__tile {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--c-soft); color: var(--c);
  font: var(--weight-heavy) clamp(2rem, 6vw, 3.25rem) / 1 var(--font-display);
  border: 2px solid color-mix(in srgb, var(--c) 30%, transparent);
  animation: pop var(--dur-med) var(--ease-out) both;
  animation-delay: calc(var(--i) * 60ms);
}
.hero__tile:nth-child(odd) { transform: rotate(-3deg); }
.hero__tile:nth-child(even) { transform: rotate(2deg); }
@keyframes pop { from { opacity: 0; scale: 0.85; } to { opacity: 1; scale: 1; } }
@media (max-width: 859px) { .hero__art { display: none; } }

.next-up {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--color-surface);
  border: 1px solid var(--color-border); text-decoration: none; color: var(--color-text);
}
.next-up__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); font-weight: var(--weight-bold); }
.next-up__title { font-weight: var(--weight-bold); }

/* ---------- Stats and citations ---------- */
.stat-row { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stat {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-5); border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-border-strong);
}
.stat--brand { border-top-color: var(--color-brand); }
.stat--accent { border-top-color: var(--color-accent); }
.stat--warn { border-top-color: var(--color-danger); }
.stat__label { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--color-text-muted); }
.stat__value { font: var(--weight-heavy) var(--text-2xl) / 1.1 var(--font-display); color: var(--color-heading); font-variant-numeric: tabular-nums; }
.stat__sub { font-size: var(--text-sm); color: var(--color-text-muted); flex: 1; }
.muted-strike { font-size: 0.55em; color: var(--color-text-muted); font-weight: 600; text-decoration-thickness: 2px; }
.cite {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.3em;
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted);
  text-decoration: none; border-radius: var(--radius-pill);
  min-height: 24px; max-width: 100%; padding: 0.1em 0.6em; background: var(--color-muted-soft);
  white-space: normal; overflow-wrap: anywhere; border-radius: 12px;
}
.cite::before { content: ""; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--color-brand); }
.cite:hover { color: var(--color-text); }
.source-note { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-4); }
.source-note a { color: inherit; }
.as-of { overflow-wrap: anywhere; }

/* ---------- Features (home) ---------- */
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.feature {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--color-border);
  text-decoration: none; color: var(--color-text);
  transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.feature:hover { border-color: var(--color-brand); transform: translateY(-2px); }
.feature svg { grid-row: span 2; fill: none; stroke: var(--color-brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; padding: 6px; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--color-brand-soft); }
.feature__title { font-weight: var(--weight-heavy); font-family: var(--font-display); }
.feature__body { font-size: var(--text-sm); color: var(--color-text-muted); }
.parents { padding: var(--space-5); border-radius: var(--radius-lg); background: var(--color-surface-2); border: 1px dashed var(--color-border-strong); }
.parents__grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- Chips, badges, pills ---------- */
.chips { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }
.chip {
  display: inline-flex; align-items: center; gap: 0.3em;
  padding: 0.15em 0.6em; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--c); background: var(--c-soft);
}
.chip b { font-weight: var(--weight-heavy); }
.badge { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-bold); padding: 0.3em 0.8em; border-radius: var(--radius-pill); }
.badge--hot { background: var(--color-accent-soft); color: var(--color-accent-text); }
.fit { font-size: var(--text-xs); font-weight: var(--weight-heavy); color: var(--color-brand); background: var(--color-brand-soft); padding: 0.2em 0.6em; border-radius: 12px; max-width: 100%; }
.growth { font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.growth--very-fast, .growth--fast { color: var(--color-good); }
.growth--solid { color: var(--color-text); }
.growth--slow { color: var(--color-text-muted); }
.growth--shrinking { color: var(--color-danger); }
.pill {
  display: inline-flex; align-items: center; max-width: 100%;
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  padding: 0.25em 0.7em; border-radius: var(--radius-pill);
  background: var(--color-muted-soft); color: var(--color-text-muted);
}
.pill--open, .pill--today, .pill--manageable, .pill--debt-free { background: var(--color-good-soft); color: var(--color-good); }
.pill--upcoming { background: var(--color-brand-soft); color: var(--color-brand); }
.pill--tight { background: var(--color-warn-soft); color: var(--color-warn); }
.pill--heavy, .pill--closed { background: var(--color-danger-soft); color: var(--color-danger); }
.pill--check { background: var(--color-warn-soft); color: var(--color-warn); }
.pill--past { background: transparent; border: 1px solid var(--color-control-border); color: var(--color-text-muted); }

/* ---------- Save button ---------- */
.save-btn {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: 36px; padding: 0 var(--space-3);
  border-radius: var(--radius-pill); border: 1.5px solid var(--color-control-border);
  background: var(--color-surface); color: var(--color-text);
  font-size: var(--text-sm); font-weight: var(--weight-bold); cursor: pointer;
}
.save-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.save-btn:hover { border-color: var(--color-brand); color: var(--color-brand); }
.save-btn.is-saved { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-accent-text); }
.save-btn.is-saved svg { fill: var(--color-accent); stroke: var(--color-accent); }

/* ---------- Career card ---------- */
.career-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.career-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); }
.career-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); }
.career-card__title { margin: 0; font-size: var(--text-lg); }
.career-card__title a { color: var(--color-heading); text-decoration: none; }
.career-card__title a::after { content: ""; position: absolute; inset: 0; }
.career-card { position: relative; }
.career-card__title a:hover { color: var(--color-brand); }
.career-card__summary { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; flex: 1; }
.career-card__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--color-border); }
/* Labels share one row, so a label that wraps to two lines doesn't push its value below the others. */
.career-card__facts { grid-template-rows: auto auto; row-gap: var(--space-1); }
.career-card__facts > div { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.career-card__facts dt { font-size: var(--text-xs); color: var(--color-text-muted); }
.career-card__facts dd { margin: 0; font-weight: var(--weight-bold); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.career-card__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.career-card__foot > *, .career-card .chips { position: relative; z-index: 1; }

/* ---------- Filters and fields ---------- */
.filters { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); align-items: end; margin-bottom: var(--space-4); padding: var(--space-4); }
.field { display: grid; gap: var(--space-1); font-size: var(--text-sm); font-weight: var(--weight-bold); }
.field > span { color: var(--color-text-muted); }
.field small { font-weight: 400; color: var(--color-text-muted); }
.field--wide { grid-column: 1 / -1; }
.field--check { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap-size); }
.field--check input { width: 20px; height: 20px; accent-color: var(--color-brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
input[type="search"], input[type="number"], input[type="password"], input[type="text"], select {
  width: 100%; min-height: var(--tap-size); padding: 0 var(--space-3);
  border-radius: var(--radius-sm); border: 1.5px solid var(--color-control-border);
  background: var(--color-surface-2); font-weight: 500;
}
input:focus, select:focus { border-color: var(--color-brand); }
/* Custom chevron with the same inset as the text, instead of the native arrow
   jammed against the edge. Forced-colors mode drops background images, so it
   falls back to the system arrow there. */
select {
  -webkit-appearance: none; appearance: none;
  padding-right: 2.5rem;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  text-overflow: ellipsis;
  cursor: pointer;
}
@media (forced-colors: active) { select { -webkit-appearance: auto; appearance: auto; background-image: none; padding-right: var(--space-3); } }
.result-count { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 600; }

/* ---------- Empty and callouts ---------- */
.empty { text-align: center; padding: var(--space-7) var(--space-4); border: 2px dashed var(--color-border); border-radius: var(--radius-lg); color: var(--color-text-muted); }
.empty__title { font: var(--weight-heavy) var(--text-xl) / 1.2 var(--font-display); color: var(--color-heading); }
.callout { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--color-surface-2); border-left: 4px solid var(--color-border-strong); }
.callout--warn { background: var(--color-warn-soft); border-left-color: var(--color-warn); }
.callout--good { background: var(--color-good-soft); border-left-color: var(--color-good); }
.callout--brand { background: var(--color-brand-soft); border-left-color: var(--color-brand); margin-block: var(--space-5); }

/* ---------- Quiz ---------- */
.quiz { max-width: 44rem; padding: var(--space-5); }
.progress { height: 10px; border-radius: var(--radius-pill); background: var(--color-surface-sunken); overflow: hidden; margin-bottom: var(--space-4); }
.progress__bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-brand), var(--color-accent)); transition: width var(--dur-med) var(--ease-out); }
.quiz__item { margin: 0; }
.quiz__item:focus-visible { outline-offset: 6px; }
.quiz__count { display: block; font: var(--weight-bold) var(--text-sm) / 1.4 var(--font-sans); letter-spacing: 0; color: var(--color-text-muted); }
.quiz__prompt { display: block; margin: var(--space-4) 0 var(--space-1); font: 400 var(--text-md) / 1.4 var(--font-sans); letter-spacing: 0; color: var(--color-text-muted); }
.quiz__text { display: block; font-size: var(--text-2xl); min-height: 2.3em; }
.quiz__options { display: grid; gap: var(--space-2); margin-block: var(--space-4); }
@media (min-width: 640px) { .quiz__options { grid-template-columns: repeat(5, 1fr); } }
.option {
  min-height: 52px; padding: var(--space-2);
  border-radius: var(--radius-md); border: 2px solid var(--color-control-border);
  background: var(--color-surface-2); font-weight: var(--weight-bold); cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.option:hover { border-color: var(--color-brand); transform: translateY(-1px); }
.option.is-selected { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand); }
.quiz__nav { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.quiz__hint { font-size: var(--text-xs); color: var(--color-text-muted); }
@media (hover: none) { .quiz__hint { display: none; } }

.code-badge { display: inline-block; padding: 0 0.3em; border-radius: var(--radius-sm); background: var(--color-accent); color: var(--color-on-accent); letter-spacing: 0.08em; }
.type-top { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-bottom: var(--space-5); }
.type-card { position: relative; padding: var(--space-5); border-radius: var(--radius-md); background: var(--c-soft); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.type-card__rank { position: absolute; top: var(--space-3); right: var(--space-4); font-weight: var(--weight-heavy); color: var(--c); }
.type-card__code { font: var(--weight-heavy) 3rem / 1 var(--font-display); color: var(--c); }
.type-card__name { margin-top: var(--space-2); font-size: var(--text-xl); }
.type-card__name small { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 600; }
.type-card p { margin: 0; font-size: var(--text-sm); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); max-width: 40rem; }
.bars__row { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.bars__label { font-weight: var(--weight-bold); }
.bars__track { height: 12px; border-radius: var(--radius-pill); background: var(--color-surface-sunken); overflow: hidden; }
.bars__fill { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.bars__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }

/* ---------- Career detail ---------- */
.career-head .chips { margin-bottom: var(--space-3); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.steps > li { counter-increment: step; position: relative; padding: var(--space-3) var(--space-4) var(--space-3) 3.4rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.steps--guide > li { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.steps--guide h2, .steps--guide h3 { font-size: var(--text-lg); margin: 0.2rem 0 var(--space-2); }
.steps--guide p, .steps--guide ul { margin: 0 0 var(--space-2); }
.steps--guide > li > :last-child { margin-bottom: 0; }
.route-list { margin: 0; display: grid; gap: var(--space-3); }
.route-list dt { font-weight: var(--weight-heavy); }
.route-list dd { margin: var(--space-1) 0 0; }
.req-groups { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-bottom: var(--space-3); }
.req-group h3 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 var(--space-1); }
.req-group ul { margin: 0; padding-left: 1.2rem; }
.req-group--required h3 { color: var(--color-brand); }
.req-group--notConsidered h3 { color: var(--color-text-muted); }
.steps > li::before { content: counter(step); position: absolute; left: var(--space-3); top: 50%; translate: 0 -50%; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--color-brand); color: var(--color-on-brand); font-weight: var(--weight-heavy); }
/* Guide steps are long: keep the number beside the heading, not halfway down. */
.steps--guide > li::before { top: var(--space-4); translate: none; }
.aside-card h3 { margin-bottom: var(--space-3); }
.plain-list { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: grid; gap: var(--space-3); }
.plain-list small { color: var(--color-text-muted); }
.cite-inline .cite { vertical-align: middle; }

/* ---------- Pathways ---------- */
.pathway-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pathway-cta { margin-top: var(--space-6); }
.pathway { display: grid; gap: var(--space-4); align-content: start; }
.pathway__head { padding-bottom: var(--space-4); border-bottom: 3px solid var(--color-accent); }
.pathway h2 { font-size: var(--text-xl); margin-bottom: var(--space-1); }
.pathway__tagline { color: var(--color-text-muted); margin: 0; }
.pathway dl { margin: 0; display: grid; gap: var(--space-4); }
.pathway .pathway__glance { margin-top: var(--space-4); gap: var(--space-3); }
.pathway dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; font-weight: var(--weight-heavy); color: var(--color-brand); margin-bottom: var(--space-1); }
.pathway dd { margin: 0; }
.pathway dd p { margin: 0 0 var(--space-2); }
.pathway dd p:last-child { margin-bottom: 0; }
.pathway__examples { color: var(--color-text-muted); font-size: var(--text-sm); }
/* Wide screens: one route per row. Quick facts on the left, details in two columns. */
@media (min-width: 900px) {
  .pathway-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .pathway { grid-template-columns: minmax(14rem, 1fr) 3fr; gap: var(--space-6); padding: var(--space-5) var(--space-6); }
  .pathway__head { padding-bottom: 0; padding-right: var(--space-6); border-bottom: 0; border-right: 3px solid var(--color-accent); }
  .pathway .pathway__facts { align-content: start; grid-template-columns: 1fr 1fr; column-gap: var(--space-6); row-gap: var(--space-5); }
}

/* ---------- Cost & payback ---------- */
.price-chart { margin: 0; }
.price-chart figcaption h2 { font-size: var(--text-xl); }
.price-chart figcaption p { color: var(--color-text-muted); font-size: var(--text-sm); }
.legend { display: flex; gap: var(--space-4); font-size: var(--text-xs); font-weight: var(--weight-bold); margin-bottom: var(--space-3); }
.legend__item::before { content: ""; display: inline-block; width: 0.9em; height: 0.9em; border-radius: 3px; margin-right: 0.4em; vertical-align: -0.1em; }
.legend__item--pub::before { background: var(--chart-published); }
.legend__item--net::before { background: var(--chart-net); }
.price-row { display: grid; gap: var(--space-1); margin-bottom: var(--space-4); }
@media (min-width: 720px) { .price-row { grid-template-columns: 13rem 1fr; align-items: center; gap: var(--space-4); } }
.price-row__label { font-weight: var(--weight-bold); font-size: var(--text-sm); }
.price-row__bars { display: grid; gap: 4px; }
.bar-line { display: flex; align-items: center; gap: var(--space-2); min-height: 26px; }
/* Bars share the row with their label: --w (0..1) scales the space left after the label. */
.bar { flex: none; height: 22px; border-radius: 0 6px 6px 0; width: max(4px, calc((100% - 8.5rem) * var(--w, 0))); }
.bar--pub { background: var(--chart-published); }
.bar--net { background: var(--chart-net); }
.bar--zero, .bar--na { width: 4px; border-radius: 2px; background: var(--chart-net); }
.bar--na { background: repeating-linear-gradient(var(--color-border-strong) 0 4px, transparent 4px 7px); }
.bar-val { font-size: var(--text-xs); font-weight: var(--weight-heavy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-val--net { color: var(--color-brand); }

.roi-layout { display: grid; gap: var(--space-5); }
@media (min-width: 960px) { .roi-layout { grid-template-columns: 320px 1fr; align-items: start; } .roi-form { position: sticky; top: 8rem; } }
.roi-form { display: grid; gap: var(--space-4); }
.roi-summary { margin-bottom: var(--space-4); }
.roi-grid { display: grid; gap: var(--space-4); }
.roi-card h3 { margin-bottom: var(--space-2); }
.roi-cols { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.roi-col { padding: var(--space-4); border-radius: var(--radius-sm); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.roi-col + .roi-col { border-color: var(--color-brand); background: var(--color-brand-soft); }
.roi-col dl { margin: 0; display: grid; gap: var(--space-2); }
.roi-col dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-2); }
.roi-col dt { font-size: var(--text-sm); color: var(--color-text-muted); }
.roi-col dt small { display: block; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.roi-col dt small span { white-space: nowrap; }
.roi-col dd { margin: 0; font-weight: var(--weight-heavy); font-variant-numeric: tabular-nums; display: inline-flex; gap: var(--space-2); align-items: center; }
.roi-card .callout { margin: var(--space-4) 0 0; }
.roi-card .callout + p { margin: var(--space-2) 0 0; }
.roi-card--earn { border-color: var(--color-good); background: var(--color-good-soft); }
.big-number { font: var(--weight-heavy) var(--text-3xl) / 1 var(--font-display); color: var(--color-good); }
.big-number small { font-size: var(--text-md); color: var(--color-text-muted); }

/* ---------- Deadlines ---------- */
.countdown-card { background: var(--color-brand); color: var(--color-on-brand); border: 0; margin-bottom: var(--space-5); }
.countdown__label { text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--text-xs); font-weight: var(--weight-heavy); margin: 0; }
.countdown__title { font: var(--weight-heavy) var(--text-xl) / 1.2 var(--font-display); }
.countdown__title .muted { color: inherit; font-weight: 600; }
.countdown__clock { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.countdown__clock span { display: grid; justify-items: center; min-width: 5rem; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); /* A faint fill plus a ring keeps the small text at 4.5:1 or better on the brand color. */ background: color-mix(in srgb, var(--color-on-brand) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-on-brand) 45%, transparent); font-size: var(--text-xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.08em; }
.countdown__clock b { font: var(--weight-heavy) var(--text-2xl) / 1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* Two by two on narrow screens (room for larger text), four across from 30rem. */
.grade-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-5); }
@media (min-width: 30rem) { .grade-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grade-tab { display: grid; gap: 2px; justify-items: center; min-height: 56px; padding: var(--space-2); border-radius: var(--radius-md); border: 2px solid var(--color-control-border); background: var(--color-surface); font-weight: var(--weight-heavy); cursor: pointer; }
.grade-tab small { font-weight: 600; color: var(--color-text-muted); font-size: var(--text-xs); }
.grade-tab.is-active { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand); }
.checklist { padding-left: 1.3rem; display: grid; gap: var(--space-4); }
.checklist > li::marker { font-weight: var(--weight-heavy); color: var(--color-brand); }
.event-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.event { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: var(--space-3); align-items: start; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-brand); }
.event--apply { border-left-color: var(--color-accent); }
.event--aid { border-left-color: var(--color-good); }
.event--scholarship { border-left-color: var(--riasec-A); }
.event--past { border-left-color: var(--color-control-border); }
.event--past .event__title { color: var(--color-text-muted); }
.event__date { font-weight: var(--weight-heavy); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.event__body { display: grid; gap: 2px; min-width: 0; }
.event__title { font-weight: var(--weight-bold); }
.event__detail, .event__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.event__meta .cite { margin-left: var(--space-1); }
.event-list--compact .event { grid-template-columns: 6rem 1fr auto; padding: var(--space-2) var(--space-3); }
@media (max-width: 520px) {
  /* Date and countdown share the top line; the description gets the full card width. */
  .event, .event-list--compact .event { grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); align-items: center; }
  .event__date { grid-row: 1; grid-column: 1; }
  .event > .pill { grid-row: 1; grid-column: 2; }
  .event__body { grid-row: 2; grid-column: 1 / -1; }
}

/* ---------- Scholarships ---------- */
.scholarship { display: flex; flex-direction: column; gap: var(--space-2); }
.scholarship__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-2) var(--space-3); }
.scholarship__head h3 { margin: 0; }
.scholarship__head p { margin: 0; }
.scholarship__award { font: var(--weight-heavy) var(--text-xl) / 1.2 var(--font-display); color: var(--color-brand); margin: 0; }
.scholarship--closed .scholarship__award { color: var(--color-text-muted); }
.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }
.tag-list li { font-size: var(--text-xs); font-weight: 600; padding: 0.2em 0.6em; border-radius: var(--radius-pill); background: var(--color-muted-soft); }
.scholarship__foot { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.row-gap { display: inline-flex; gap: var(--space-2); flex-wrap: wrap; }
.others { margin-top: var(--space-5); }
.others summary { cursor: pointer; font-weight: var(--weight-bold); min-height: var(--tap-size); display: flex; align-items: center; }
.others .card-grid { margin-top: var(--space-3); }

/* ---------- Plan, sources, schools ---------- */
.quiz-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.quiz-summary h2 { font-size: var(--text-xl); margin: 0; }
.quiz-summary .chips { margin: 0; }
.quiz-summary .chip { font-size: var(--text-sm); }
.source-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.source-list__pub { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; font-weight: var(--weight-heavy); color: var(--color-brand); margin: 0 0 var(--space-1); }
.source-list__title { font-size: var(--text-lg); }
.prose { max-width: 46rem; }
.prose h3 { margin-top: var(--space-5); }
.flag { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-warn); background: var(--color-warn-soft); padding: 0 0.4em; border-radius: var(--radius-pill); text-decoration: none; }

/* Compact quiz result cards on phones so matches stay close to the fold. */
@media (max-width: 639px) {
  .type-card { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); align-items: center; padding: var(--space-4); }
  .type-card__code { font-size: 2.4rem; grid-row: span 2; width: 2.2rem; text-align: center; }
  .type-card__name { margin: 0; font-size: var(--text-lg); }
}

/* Career detail: BLS training facts */
.fact-strip dl { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin: 0; }
.fact-strip > .cite { margin-left: auto; }
@media (max-width: 639px) { .fact-strip > .cite { margin-left: 0; } }
.fact-strip { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: center; margin: var(--space-4) 0 0; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.fact-strip dt { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: var(--weight-bold); }
.fact-strip dd { margin: 0; font-weight: var(--weight-bold); }

/* Source type tags */
.tag { display: inline-block; margin-left: var(--space-2); padding: 0.1em 0.6em; border-radius: var(--radius-pill); font-size: var(--text-xs); text-transform: none; letter-spacing: 0; background: var(--color-muted-soft); color: var(--color-text-muted); }
.tag--official { background: var(--color-good-soft); color: var(--color-good); }

/* State FAFSA lookup */
.field--inline { max-width: 20rem; margin-bottom: var(--space-4); }
.state-fafsa h3 { margin-top: var(--space-3); }
.state-fafsa__detail { gap: var(--space-2); font-size: var(--text-sm); }

/* Windows High Contrast / forced colors: keep data graphics visible. */
@media (forced-colors: active) {
  .bar, .bars__fill, .progress__bar { forced-color-adjust: none; background: CanvasText; }
  .bar--na { background: repeating-linear-gradient(CanvasText 0 4px, transparent 4px 7px); }
  .chip, .pill, .cite, .tag, .fit, .badge { border: 1px solid CanvasText; }
  .option.is-selected, .grade-tab.is-active, .save-btn.is-saved { outline: 3px solid Highlight; }
}

/* Language switch */
.lang-btn {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: var(--tap-size); padding: 0 var(--space-3);
  border-radius: var(--radius-pill); border: 1px solid var(--color-control-border);
  background: var(--color-surface); font-weight: var(--weight-bold); font-size: var(--text-sm); cursor: pointer;
}
.lang-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 420px) { .lang-btn svg { display: none; } }
/* "Career Pathfinder" needs about 490px beside the header tools; below that, only the logo shows (its link keeps the name). */
.brand > span { white-space: nowrap; }
@media (max-width: 520px) { .brand > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* Offline notice */
.offline-banner { margin: 0; padding: var(--space-2) var(--space-4); text-align: center; font-size: var(--text-sm); font-weight: 600; background: var(--color-warn-soft); color: var(--color-text); border-top: 1px solid var(--color-border); }

/* Career comparison */
.compare-picker { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.table-scroll { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); }

.table-scroll:focus-visible { outline-offset: 2px; }
.compare { width: 100%; border-collapse: collapse; min-width: 34rem; font-variant-numeric: tabular-nums; }
.compare caption { text-align: left; padding: var(--space-4) var(--space-4) var(--space-2); font: var(--weight-heavy) var(--text-lg) / 1.2 var(--font-display); color: var(--color-heading); }
.compare th, .compare td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; border-top: 1px solid var(--color-border); }
.compare thead th { font-family: var(--font-display); font-size: var(--text-md); border-top: 0; }
.compare thead th a { color: var(--color-heading); }
.compare tbody th { width: 30%; font-size: var(--text-sm); color: var(--color-text-muted); font-weight: var(--weight-bold); }
.compare__note { display: block; font-weight: 400; font-size: var(--text-xs); }
.compare td .chips { flex-wrap: wrap; }
.best { display: inline-block; margin-left: var(--space-1); padding: 0.05em 0.55em; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-heavy); background: var(--color-good-soft); color: var(--color-good); }

/* Share link */
.share-box { margin-bottom: var(--space-5); padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-brand-soft); border: 1px solid var(--color-border); }
.share-box input { font-family: var(--font-mono); font-size: var(--text-sm); }
.share-box p { margin: var(--space-2) 0 0; }

@media (forced-colors: active) { .best { border: 1px solid CanvasText; } }
/* Keep row labels visible while the comparison scrolls sideways on phones. */
.compare tbody th, .compare thead td { position: sticky; left: 0; z-index: 1; background: var(--color-surface); box-shadow: 1px 0 0 var(--color-border); }
@media (max-width: 640px) { .compare tbody th { width: 8.5rem; min-width: 8.5rem; } }

/* Very narrow phones: keep the header on one line. "My plan" stays in the
   accessibility tree; the bookmark icon and count carry it visually. */
.plan-link, .lang-btn { white-space: nowrap; }
@media (max-width: 380px) {
  .plan-link [data-i18n="app.myPlan"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .plan-link, .lang-btn { padding-inline: var(--space-2); }
  .site-header__tools { gap: var(--space-1); }
}

/* ---------- School finder and profile ---------- */
.school-filters .field--full { grid-column: 1 / -1; }
.more-filters summary { cursor: pointer; font-weight: var(--weight-bold); color: var(--color-link); min-height: 24px; padding-block: var(--space-1); }
.more-filters__grid { display: grid; gap: var(--space-3); margin-top: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); align-items: end; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.results-bar .result-count { flex: 1 1 18rem; margin: 0; }
.results-bar .field--inline { margin-bottom: 0; flex: 0 1 14rem; }
.school-list { list-style: none; padding: 0; margin: 0; }
.school-card { display: grid; gap: var(--space-2); align-content: start; }
.school-card h3 { margin: 0; font-size: var(--text-lg); overflow-wrap: anywhere; }
.school-card p { margin: 0; }
.school-card__foot { display: flex; justify-content: flex-end; padding-top: var(--space-1); }
.school-card__program { font-size: var(--text-sm); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--color-brand-soft); overflow-wrap: anywhere; }
.school-card__facts, .fact-list { margin: 0; display: grid; gap: var(--space-2); }
/* Label left, value right. A value too long to share the line (a price with its year,
   a list of sports) drops below the label instead of squeezing it. */
.school-card__facts div, .fact-list div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); align-items: baseline; }
.school-card__facts dt, .fact-list dt { flex: 1 1 9rem; min-width: 0; }
.school-card__facts dd, .fact-list dd { flex: 0 1 auto; max-width: 100%; }
.school-card__facts div + div, .fact-list div + div { border-top: 1px solid var(--color-border); padding-top: var(--space-2); }
.school-card__facts dt, .fact-list dt { font-size: var(--text-sm); color: var(--color-text-muted); }
.school-card__facts dd, .fact-list dd { margin: 0; font-weight: var(--weight-heavy); font-variant-numeric: tabular-nums; text-align: start; }
/* School photo: a wide banner, cropped to fit; the credit line sits under it. */
.school-photo { margin: 0 0 var(--space-4); }
.school-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 22rem; object-fit: cover; border-radius: var(--radius-md); background: var(--color-surface-2); }
.school-photo figcaption { margin-top: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); }
.school-links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0; }
.school-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.school-grid h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.school-grid h3 { font-size: var(--text-md); margin: var(--space-5) 0 var(--space-2); }
.school-grid .muted { margin: var(--space-3) 0 0; }
.share-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.share-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "bar bar"; gap: 2px var(--space-2); }
.share-bars__label { grid-area: label; }
.share-bars__value { grid-area: value; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.share-bars__bar { grid-area: bar; height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--chart-net) calc(var(--w, 0) * 100%), var(--color-surface-sunken) 0); }
.program-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
/* Card content stacks from the top with even gaps, however tall its row is. */
.program-list li { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); overflow-wrap: break-word; }
.program-list__name { margin: 0; font-size: var(--text-md); font-weight: var(--weight-bold); line-height: 1.3; }
.program-list__meta, .program-list__careers { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.5; }
.program-list__name + .program-list__meta { margin-top: calc(-1 * var(--space-1)); }
.program-list__label { font-weight: var(--weight-bold); color: var(--color-text); }
.program-list__careers a { color: var(--color-link); }
.program-list__more summary { cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--color-link); min-height: 24px; padding-block: 2px; }
.program-list__more[open] summary { margin-bottom: var(--space-1); }
.more-programs { margin-top: var(--space-3); }
.more-programs summary { cursor: pointer; font-weight: var(--weight-bold); color: var(--color-link); min-height: 24px; padding-block: var(--space-1); margin-bottom: var(--space-2); }
@media (forced-colors: active) { .share-bars__bar { background: CanvasText; width: calc(var(--w, 0) * 100%); } }

/* Long-text facts: label above value. */
.fact-list--stack div { flex-direction: column; align-items: stretch; gap: var(--space-1); }
.fact-list--stack dt { flex: none; }
.fact-list--stack dd { margin-left: 0; }
.fact-list--stack dd { margin: 0; text-align: start; font-weight: 400; }
.state-grant-wrap { margin-bottom: var(--space-6); }
.state-grant-wrap h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }

/* Fine print folded away so pages stay short; methods and caveats are one tap away. */
.fineprint { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.fineprint summary { cursor: pointer; font-weight: var(--weight-bold); color: var(--color-link); min-height: 24px; padding-block: var(--space-1); }
.fineprint__body > * { margin: var(--space-2) 0 0; }
.assumptions { margin-top: var(--space-2); }
.assumptions summary { cursor: pointer; font-weight: var(--weight-bold); color: var(--color-link); min-height: 24px; padding-block: var(--space-1); }
.assumptions__body { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.feature__step { font-size: var(--text-xs, 0.75rem); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-brand); }
.feature-grid > li { display: flex; }
.feature-grid > li > .feature { flex: 1; }
.feature__step { display: block; }

/* School profile: help and extras the school reported. */
.help-cols { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: var(--space-3); }
.help-cols h3 { margin: 0 0 var(--space-2); font-size: var(--text-base); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.check-list li { position: relative; padding-left: 1.5em; }
.check-list li::before { content: "✓"; content: "✓" / ""; position: absolute; left: 0; color: var(--color-brand); font-weight: var(--weight-bold); }
.help-links { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; gap: var(--space-2); }

/* FAQ: one fold per question. */
.faq__item { border-bottom: 1px solid var(--color-border); }
.faq__item summary { cursor: pointer; font-weight: var(--weight-bold); padding-block: var(--space-3); min-height: 24px; }
.faq__answer { padding-bottom: var(--space-3); }
.faq__answer p { margin: 0 0 var(--space-2); }
.faq__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
