/**
 * components.css — All non-calculator UI components.
 *
 * Covers: wordmark, nav, hero copy, eyebrow, trust row, diff/stat strip,
 * typography components, buttons, badges, breadcrumbs, footer.
 *
 * Import order: tokens.css → reset.css → layout.css → components.css
 */

/* ── Wordmark ─────────────────────────────────────────────── */
/*
 * Typography-as-logo. Fraunces italic light — reads as a proper mark,
 * not a generic logotype. Teal color; never bold.
 */
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: color var(--duration-sm) var(--ease-out);
}
.wordmark:hover { color: var(--teal-dark); }
.wordmark:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

/* ── Site nav ────────────────────────────────────────────── */
.nav-links {
  display: flex;
  gap: var(--space-8) - 4px; /* 28px */
  gap: 28px;
  list-style: none;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--duration-sm) var(--ease-out);
}
.nav-links a:hover   { color: var(--teal); }
.nav-links a.active  { color: var(--teal); }
.nav-links a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

/* Mobile: hide nav links, show hamburger instead */
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ── Hero copy ───────────────────────────────────────────── */
/* Eyebrow: small all-caps label above the H1 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-5);
}

.eyebrow__dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* H1 — Fraunces 700. Large, confident, left-aligned. */
.hero__h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-bottom: var(--space-6);
  text-wrap: balance;
}

/* The italic "precisely." — teal, Fraunces 300 italic */
.hero__h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--teal);
}

/* Hero subtext */
.hero__sub {
  font-size: var(--text-md);
  color: var(--ink-muted);
  line-height: var(--leading-relaxed);
  max-width: 460px;
  margin-bottom: var(--space-8);
}

/* Trust row: three small checkmark items */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2) - 2px;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.trust-icon {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--teal);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.trust-icon svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Diff strip (below hero) ─────────────────────────────── */
.below-hero__heading {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300; /* Not bold — this is a question / invitation */
  font-size: var(--text-md);
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-10) - 4px;
  margin-bottom: 36px;
}

/* The big numeral / icon in each stat block */
.diff-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  color: var(--teal);
  line-height: 1;
  margin-bottom: var(--space-2);
}

/* ✓ icon variant — approved stat block change for "0 → ✓" */
.diff-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-2);
}
.diff-icon svg {
  width: 36px;
  height: 36px;
  color: var(--teal);
}

.diff-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-1) + 2px;
  margin-bottom: var(--space-2);
}

.diff-sub {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
}

/* Inline mono snippet inside diff-sub */
.diff-sub code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--teal-ghost);
  color: var(--teal-dark);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
}

/* ── General typographic components ──────────────────────── */

/* Section heading (H2) */
.section-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-h2);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-bottom: var(--space-6);
}

/* Section heading (H3) */
.section-h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-bottom: var(--space-4);
}

/* Lead paragraph (larger intro text) */
.lead {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

/* ── Buttons ─────────────────────────────────────────────── */

/* Primary solid — teal fill */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--teal);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition:
    background var(--duration-sm) var(--ease-out),
    box-shadow  var(--duration-sm) var(--ease-out);
}
.btn-primary:hover  { background: var(--teal-dark); color: #fff; }
.btn-primary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: var(--focus-offset);
}
.btn-primary:active { background: var(--teal-dark); }

/* Secondary outline */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1.5px solid var(--teal);
  color: var(--teal);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: calc(var(--space-3) - 1.5px) var(--space-6);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: none;
  transition:
    background var(--duration-sm) var(--ease-out),
    color      var(--duration-sm) var(--ease-out);
}
.btn-outline:hover  { background: var(--teal-ghost); }
.btn-outline:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* ── Badges / pills ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  border: 1px solid currentColor;
}
.badge--teal  { color: var(--teal);  background: var(--teal-ghost); }
.badge--gold  { color: var(--gold);  background: #FEF3C7; }
.badge--muted { color: var(--ink-muted); background: transparent; border-color: var(--rule); }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-6);
}
.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb__sep { color: var(--rule); user-select: none; }
.breadcrumb__current { color: var(--ink); }

/* ── Unverified warning block ────────────────────────────── */
/*
 * Used on any page or data entry marked UNVERIFIED — DO NOT PUBLISH.
 * Must be visible; not subtle.
 */
.unverified-banner {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: #991B1B;
  margin-block: var(--space-6);
}
.unverified-banner strong { font-weight: 700; }

/* ── Site footer ─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-10);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-6);
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  list-style: none;
}
.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--teal); }

/* ── Grade scale table ───────────────────────────────────── */
/* Used on GPA scale reference pages */
.scale-table {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.scale-table th {
  background: var(--teal-ghost);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--teal-dark);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.scale-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule);
  font-size: var(--text-sm);
  vertical-align: middle;
}
.scale-table tr:last-child td { border-bottom: none; }
.scale-table tr:hover td { background: var(--teal-ghost); }
.scale-table .col-grade {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.scale-table .col-points {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Hamburger button ────────────────────────────────────── */
/*
 * Hidden on desktop (≥ 861px); visible on mobile.
 * Three bars animate to × when nav is open.
 */
.nav-hamburger {
  display: none;           /* desktop: hidden */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background var(--duration-sm) var(--ease-out);
}
.nav-hamburger:hover { background: var(--teal-ghost); }
.nav-hamburger:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.nav-hamburger__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform var(--duration-md) var(--ease-out),
    opacity   var(--duration-md) var(--ease-out);
}

/* Bars animate into × when open */
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-hamburger { display: flex; }
}

/* ── Mobile nav overlay ──────────────────────────────────── */
/*
 * On mobile: nav-links are hidden until .nav-open is toggled.
 * The menu drops below the sticky header as a full-width panel.
 */
@media (max-width: 860px) {
  /* nav element is the overlay container */
  #nav-menu {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--paper);
    z-index: 40;
    overflow-y: auto;
    border-top: 1px solid var(--rule);
  }
  #nav-menu.nav-open {
    display: block;
  }

  /* nav-links stack vertically in the overlay */
  .nav-links {
    display: flex !important;   /* override the desktop flex already set */
    flex-direction: column;
    gap: 0;
    padding: var(--space-4) 0;
  }
  .nav-links li {
    border-bottom: 1px solid var(--rule);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: var(--space-4) var(--wrap-pad);
    font-size: var(--text-base);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
  }
  .nav-links a.active,
  .nav-links a:hover { color: var(--teal); background: var(--teal-ghost); }

  /* Prevent body scroll when menu open */
  body.nav-body-lock { overflow: hidden; }
}

/* ── Footer grid ─────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-6);
}

.footer-col__heading {
  font-family: var(--font-body);   /* NOT display — footer heads are small/utilitarian */
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--duration-sm) var(--ease-out);
}
.footer-links a:hover { color: var(--teal); }

/* Footer bottom bar */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: baseline;
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  max-width: none;   /* override reset's max-width on p */
}
.footer-copy a { color: var(--ink-muted); }
.footer-copy a:hover { color: var(--teal); }
.footer-tagline {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  max-width: none;
}
.footer-tagline a { color: var(--teal); text-decoration: none; }
.footer-tagline a:hover { text-decoration: underline; }

/* ── Section heading variants ────────────────────────────────── */
/*
 * Not every section heading should look the same.
 * .section-h2 (in components.css) is the default — Fraunces 600, 28px.
 * These variants give different sections their own typographic character.
 */

/* Editorial h2 — max confidence, used for key section moments */
.h2-editorial {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

/* Quiet h2 — italic light; invitation/question tone; less dominant */
.h2-quiet {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}

/* Section kicker — gold label above an h2 (not an eyebrow — no uppercase) */
.kicker {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

/* ── Callout / note block ─────────────────────────────────────── */
/*
 * Typographically distinct from body copy.
 * NOT a pill badge or a generic info box — editorial feel.
 */
.callout {
  padding: var(--space-5) var(--space-6) var(--space-5) var(--space-8);
  background: var(--teal-ghost);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-block: var(--space-8);
}
.callout p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: var(--leading-relaxed);
  max-width: none;
}
.callout p + p { margin-top: var(--space-3); }
.callout strong { color: var(--teal-dark); font-weight: 600; }

/* Warning / important variant */
.callout--warn {
  background: #FFFBEB;
  border-left-color: var(--gold);
}
.callout--warn strong { color: #92400E; }

/* ── Pull quote ───────────────────────────────────────────────── */
/*
 * Fraunces italic, larger than body — for featured statements
 * in guide pages, scale pages, methodology sections.
 */
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--teal);
  border-left: 4px solid var(--teal);
  padding: var(--space-3) 0 var(--space-3) var(--space-6);
  margin-block: var(--space-10);
  max-width: none;
}
.pull-quote cite {
  display: block;
  font-style: normal;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  color: var(--ink-muted);
  margin-top: var(--space-3);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* ── Card system — hierarchy, NOT uniform rounded grid ───────── */
/*
 * Cards use a left accent border (teal), NOT box-shadow + rounded-lg.
 * Three sizes: featured (headline card), standard, compact (secondary).
 */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
}
.card__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-2);
}
.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}
.card__desc {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
  flex: 1;
  max-width: none;
}
.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: gap var(--duration-sm) var(--ease-out);
}
.card__link:hover { gap: var(--space-2); text-decoration: underline; text-underline-offset: 3px; }

/* Featured card — top border instead of left; no radius; padding more generous */
.card--featured {
  border-left: 1px solid var(--rule);
  border-top: 3px solid var(--teal);
  border-radius: 0;
  padding: var(--space-8);
}
.card--featured .card__title {
  font-size: var(--text-2xl);
}

/* Compact card — minimal padding, smaller type */
.card--compact {
  padding: var(--space-3) var(--space-4);
  border-left-width: 2px;
}
.card--compact .card__title {
  font-size: var(--text-base);
  font-weight: 600;
}
.card--compact .card__desc {
  font-size: 0.75rem;
  margin-top: 2px;
}

/* ── Cluster grid (hub pages) — featured item + secondary grid ── */
/*
 * First child spans full width as the "featured" item.
 * Secondary items fill a 2-col (then 3-col) grid below.
 * This avoids "uniform grid of identical rounded cards" pattern.
 */
.cluster-grid {
  display: grid;
  gap: var(--space-5);
}
.cluster-grid > .card--featured:first-child {
  grid-column: 1 / -1;
}
@media (min-width: 600px) {
  .cluster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cluster-grid > .card--featured:first-child {
    grid-column: 1 / -1;
  }
}
@media (min-width: 860px) {
  .cluster-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Stat block — JetBrains Mono, confident size ─────────────── */
/* For inline stat callouts alongside body text */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.stat-block__number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-block__unit {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-weight: 500;
}

/* ── Confirmation dialog — accessible native <dialog> ─────────── */
/*
 * Uses <dialog> element for built-in keyboard focus trap.
 * NOT browser alert() or confirm(). Accessible at role="dialog".
 * Backdrop: semi-transparent dark teal with blur.
 */
.confirm-dialog {
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-8);
  max-width: 380px;
  width: calc(100% - 48px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 40px rgba(12, 31, 30, 0.22);
}
.confirm-dialog::backdrop {
  background: rgba(12, 31, 30, 0.52);
  backdrop-filter: blur(2px);
}
.confirm-dialog__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--ink);
  margin-bottom: var(--space-3);
  text-wrap: balance;
}
.confirm-dialog__body {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
  max-width: none;
}
.confirm-dialog__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}
/* Destructive action button inside dialog */
.confirm-dialog__actions .btn-destroy {
  background: var(--danger);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  transition: background var(--duration-sm) var(--ease-out);
}
.confirm-dialog__actions .btn-destroy:hover { background: #b91c1c; }
.confirm-dialog__actions .btn-cancel {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-sm) var(--ease-out);
}
.confirm-dialog__actions .btn-cancel:hover { border-color: var(--ink-muted); }

/* ── Multi-semester widget additions ──────────────────────────── */
.calc-semester {
  border-top: 1px solid var(--rule);
}
.calc-semester:first-child {
  border-top: none;
}
.calc-semester__header {
  display: flex;
  align-items: center;
  padding: 8px var(--space-5) 8px var(--space-5);
  background: var(--input-bg);
  border-bottom: 1px solid var(--rule);
  gap: var(--space-3);
}
.calc-semester__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-muted);
  flex: 1;
}
.calc-semester__gpa {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.calc-semester__remove {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-muted);
  opacity: 0.55;
  transition:
    opacity  var(--duration-sm) var(--ease-out),
    color    var(--duration-sm) var(--ease-out);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}
.calc-semester__remove:hover {
  opacity: 1;
  color: var(--danger);
}
.calc-semester__remove:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 1px;
  opacity: 1;
}
/* Only show remove button when multiple semesters exist */
[data-semesters-count="1"] .calc-semester__remove {
  visibility: hidden;
}

/* Add-semester button — dashed row below all semesters */
.calc-add-semester {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-5);
  width: 100%;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--teal);
  border-top: 1px dashed var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background var(--duration-sm) var(--ease-out);
  text-align: left;
}
.calc-add-semester:hover { background: var(--teal-ghost); }
.calc-add-semester svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Reset button — lives in widget header, far right */
.calc-reset-btn {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-muted);
  opacity: 0.5;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  margin-left: var(--space-2);
  transition:
    opacity  var(--duration-sm) var(--ease-out),
    color    var(--duration-sm) var(--ease-out);
}
.calc-reset-btn:hover {
  opacity: 1;
  color: var(--danger);
}
.calc-reset-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 1px;
  opacity: 1;
}

/* Per-semester GPA breakdown in result panel */
.calc-result__breakdown {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.calc-result__breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-xs);
}
.calc-result__breakdown-label {
  color: rgba(255,255,255,0.45);
  letter-spacing: var(--tracking-wide);
}
.calc-result__breakdown-value {
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.75);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ── Utility: bare button reset ─────────────────────────────── */
/*
 * Strips all browser button styles. Use on <button> elements that should
 * look like links or icon buttons, then layer visual styles on top.
 */
.btn-reset {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

/* ── Link with trailing arrow ────────────────────────────────── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--teal);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: gap var(--duration-sm) var(--ease-out);
}
.link-arrow:hover {
  gap: var(--space-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-arrow:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

/* Footer responsive */
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8) var(--space-6);
  }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-2); }
}

/* ── FAQ accordion (details/summary) ─────────────────────────────── */
/*
 * Uses native <details> for zero-JS progressive disclosure.
 * Border-top on each item creates a clean reading rhythm.
 * No rounded cards — this is a content list, not a card grid.
 */
.faq-item {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-5);
}
.faq-item:last-child {
  border-bottom: 1px solid var(--rule);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink);
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform var(--duration-sm) var(--ease-out);
}
.faq-item[open] > .faq-question::after {
  transform: rotate(45deg);
}
.faq-question:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}
.faq-body {
  padding-top: var(--space-4);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
  max-width: 72ch;
}
.faq-body p + p {
  margin-top: var(--space-3);
}
.faq-body a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.faq-body a:hover { color: var(--teal-dark); }

/* ── Cumulative GPA Calculator — two-section widget ──────────── */
.calc-widget--cumulative { display: flex; flex-direction: column; gap: 0; }

.cumul-section { padding: var(--space-5) var(--space-5) var(--space-4); }
.cumul-section--prev { border-bottom: 1px solid var(--rule); }

.cumul-section__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink);
  margin-bottom: var(--space-1);
  letter-spacing: 0.01em;
}
.cumul-section__hint {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}

.cumul-inputs {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.cumul-field { flex: 1; min-width: 120px; }
.cumul-field__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: var(--space-1);
}
.cumul-field__input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: border-color var(--duration-sm);
}
.cumul-field__input:focus {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-color: var(--teal);
}
.cumul-field__hint {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: var(--space-1);
  opacity: 0.8;
}

.cumul-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--surface-raised);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cumul-divider span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.cumul-scale-row {
  padding: var(--space-3) 0 var(--space-2);
  border-bottom: none;
}

/* Cumulative result breakdown */
.cumul-delta {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.cumul-delta__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  padding: var(--space-1) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cumul-delta__row:last-child { border-bottom: none; }
.cumul-delta__row--change {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: none;
  font-weight: 600;
}
.cumul-delta__label { opacity: 0.85; }
.cumul-delta__val { font-family: var(--font-mono); font-weight: 600; }
.cumul-delta__val--up   { color: #6ee7b7; } /* positive — teal-green */
.cumul-delta__val--down { color: #fca5a5; } /* negative — soft red */

/* ── College GPA Calculator pages ────────────────────────────────────────────
 * Covers: uni-hero, univ-header, uni-chips, univ-calc-section,
 *         data-source-note, prose-block, grade-table, table-scroll, related-links
 * ─────────────────────────────────────────────────────────────────────────── */

/* Full-bleed hero image */
.uni-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--surface-raised);
  margin-bottom: 0;
}
.uni-hero__img {
  width: 100%;
  height: clamp(220px, 36vw, 480px);
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.uni-hero__credit {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: var(--space-2) var(--space-4);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.82);
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  line-height: 1.4;
}
.uni-hero__credit a {
  color: rgba(255,255,255,0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Header */
.univ-header { padding-block: var(--space-8) var(--space-6); }
.univ-header__h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-block: var(--space-3) var(--space-4);
}
.univ-header__h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--teal);
}
.univ-header__lead {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  max-width: 60ch;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-5);
}

/* Info chips — pill style with icon */
.uni-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-4);
}
.uni-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  padding: 5px var(--space-3);
  white-space: nowrap;
  line-height: 1;
}
.uni-chip__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}
.uni-chip--cal  { border-color: color-mix(in srgb, var(--teal) 40%, var(--rule)); color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--surface)); }
.uni-chip--cal .uni-chip__icon { opacity: 1; }
.uni-chip--ctrl { }
.uni-chip--loc  { }
.uni-chip--link {
  color: var(--teal);
  text-decoration: none;
  border-color: color-mix(in srgb, var(--teal) 35%, var(--rule));
  transition: background var(--duration-sm) var(--ease-out), color var(--duration-sm) var(--ease-out);
}
.uni-chip--link:hover {
  background: color-mix(in srgb, var(--teal) 12%, var(--surface));
  color: var(--teal-dark);
}
.uni-chip--link .uni-chip__icon { opacity: 1; }

/* Calculator section wrapper */
.univ-calc-section { margin-bottom: var(--space-8); }

/* Data source note below calculator */
.data-source-note {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
  max-width: 72ch;
}
.data-source-note a {
  color: var(--teal);
  text-underline-offset: 2px;
}

/* Prose content blocks inside .below-hero */
.prose-block {
  max-width: 72ch;
  line-height: var(--leading-normal);
  color: var(--ink-muted);
  margin-bottom: var(--space-6);
}
.prose-block p + p { margin-top: var(--space-4); }
.prose-block a     { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

.prose-block__h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--ink);
  margin-block: var(--space-8) var(--space-3);
}
.prose-block__list {
  list-style: disc;
  padding-left: var(--space-6);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
  max-width: 68ch;
}
.prose-block__list li + li { margin-top: var(--space-2); }
.prose-block__list strong  { color: var(--ink); }

/* Grade points reference table */
.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--space-6);
  -webkit-overflow-scrolling: touch;
}
.grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  min-width: 320px;
}
.grade-table th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--rule);
  padding: var(--space-2) var(--space-3);
}
.grade-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.grade-table tr:last-child td { border-bottom: none; }
.grade-table td:nth-child(even) {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--teal);
}

/* Related links list */
.related-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 68ch;
}
.related-links a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.related-links a:hover { color: var(--teal-dark); }

/* ── High School GPA Calculator — dual result ─────────────────────────────── */
.hs-result { padding: var(--space-5); }
.hs-result__dual {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.hs-result__half {
  flex: 1;
  min-width: 0;           /* flex items default to min-width:auto; this allows shrinking */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  overflow: hidden;       /* clip overflow within each half, not at widget edge */
}

/* Dual-panel GPA number: smaller than the single-panel 88px default.
   Two numbers share one panel — each half is ~½ the widget width.
   56px (3.5rem) fits a 4-character GPA comfortably in a ~200px half at any scale. */
.hs-result__half .calc-result__number {
  font-size: 3.5rem;
  width: 100%;
  text-align: center;
}
.hs-result__label {
  font-size: var(--text-xs);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.hs-result__sublabel {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}
.hs-result__divider {
  width: 1px;
  height: 60px;
  background: var(--rule);
  flex-shrink: 0;
}

/* ── SGPA-to-CGPA semester rows ─────────────────────────────────── */
.sgpa-rows-wrap {
  padding: var(--space-4) var(--space-5) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.sgpa-row {
  display: grid;
  grid-template-columns: 3rem 1fr 1fr 1.5rem;
  gap: var(--space-2);
  align-items: center;
}
.sgpa-row__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sgpa-row__inp {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}
.sgpa-row__remove {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: var(--text-sm);
  padding: 2px 4px;
  line-height: 1;
  border-radius: 3px;
}
.sgpa-row__remove:hover { background: var(--surface-raised); color: var(--ink); }
.sgpa-row__spacer { width: 1.5rem; }
.sgpa-add-btn {
  margin: 0 var(--space-5) var(--space-4);
  background: none;
  border: 1px dashed var(--rule);
  color: var(--ink-muted);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  cursor: pointer;
  width: calc(100% - var(--space-5) * 2);
  transition: border-color 0.15s, color 0.15s;
}
.sgpa-add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── .data-table — shared content table for CGPA/SGPA/Marks pages ─────────
 * Used by: cgpa-to-percentage, percentage-to-cgpa, sgpa-to-cgpa,
 *           sgpa-to-percentage, marks-percentage pages.
 * Matches design system tokens (no --surface-raised / --accent / --radius).
 * ───────────────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  min-width: 320px;
}
.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table th {
  background: var(--teal-ghost);
  color: var(--ink-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 2px solid var(--rule);
  white-space: nowrap;
}
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  vertical-align: middle;
  line-height: 1.4;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--teal-ghost); }
/* Highlight first column — key value in monospace */
.data-table td:first-child {
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--ink);
  white-space: nowrap;
}
/* Zebra stripe — subtle paper tint on even rows */
.data-table tbody tr:nth-child(even) td { background: var(--paper); }
.data-table tbody tr:nth-child(even):hover td { background: var(--teal-ghost); }
/* Wrap container — horizontal scroll on narrow viewports */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  margin-block: var(--space-5);
}
.data-table-wrap .data-table { min-width: 0; }

/* ── Professional School GPA calculator widget ───────────────────────────────
 * Used by: medical, law, dental, pharmacy, PA school, nursing GPA calculators.
 * Each course row: type select (split modes) | grade select | credits | remove.
 * ───────────────────────────────────────────────────────────────────────────── */

/* Results grid — two cards side by side (Overall + Science) */
.prof-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
  border-top: 1px solid var(--rule);
}
.prof-results-grid--single {
  grid-template-columns: 1fr;
}

/* Individual result card */
.prof-result-card {
  text-align: center;
  padding: var(--space-4) var(--space-3);
  background: var(--teal-ghost);
  border-radius: var(--radius-md);
  border: 1px solid var(--rule);
}
.prof-result-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}
.prof-result-card__gpa {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: block;
}
.prof-result-card__status {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-top: var(--space-1);
  display: block;
}
.prof-result-card__credits {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: var(--space-1);
  display: block;
}

/* Gauge sits below the result cards, inside the result region */
.prof-gauge-wrap {
  padding: 0 var(--space-5) var(--space-4);
}

/* ── Wordmark icon + Share bar ──────────────────────────────────────────────
 * Logo icon: geometric G lettermark sits inline-left of wordmark text.
 * Share bar: 6-platform teal outline icons — header (desktop) + footer.
 * ─────────────────────────────────────────────────────────────────────────── */

/* Wordmark — accommodate the SVG icon */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.wordmark__icon {
  flex-shrink: 0;
  display: block;
}

/* Share bar — outer row */
.share-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* .share-bar__label retained for potential future use; currently unused */

/* Individual icon circle */
.share-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-full);
  color: var(--teal);
  text-decoration: none;
  transition: background var(--duration-sm) var(--ease-out),
              border-color var(--duration-sm) var(--ease-out),
              color var(--duration-sm) var(--ease-out);
}

.share-bar__icon:hover,
.share-bar__icon:focus-visible {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--surface);
  outline: none;
}

.share-bar__icon:focus-visible {
  box-shadow: 0 0 0 var(--focus-offset) var(--teal);
}

.share-bar__icon svg {
  display: block;
  width: 13px;
  height: 13px;
}

/* Footer share bar: centered row */
.footer-bottom .share-bar {
  justify-content: center;
  margin: var(--space-4) 0;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom .share-bar .share-bar__label {
  width: 100%;
  text-align: center;
  margin-right: 0;
  margin-bottom: var(--space-2);
}

@media (max-width: 480px) {
  .prof-results-grid { grid-template-columns: 1fr; }
}
