/* ============================================================
   CareerPath Data — design tokens & components
   Style: editorial data reference / Swiss grid
   Zero external fonts. Zero JS. Pure CSS graphics.
   ============================================================ */

:root {
  /* ---- color: neutral ---- */
  --ink:        #14161a;
  --ink-2:      #464e5a;
  --ink-3:      #77808f;
  --ink-4:      #9aa3b0;
  --line:       #e2e5ea;
  --line-2:     #c9ced7;
  --paper:      #ffffff;
  --paper-2:    #fafaf8;
  --paper-3:    #f3f4f2;

  /* ---- color: semantic ---- */
  --brand:      #1d4ed8;
  --brand-ink:  #1e3a8a;
  --brand-tint: #eef2ff;
  --pos:        #047857;
  --pos-tint:   #ecfdf5;
  --neg:        #b45309;
  --neg-tint:   #fffbeb;

  /* ---- type ---- */
  --font-display: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --font-sans:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  /* type scale (16px base, ~1.22 ratio) */
  --t-xs:  12px;
  --t-sm:  13px;
  --t-md:  14px;
  --t-base:16px;
  --t-lg:  18px;
  --t-xl:  21px;
  --t-2xl: 26px;
  --t-3xl: 32px;
  --t-4xl: 40px;

  /* ---- space (4px base) ---- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* ---- radius / elevation ---- */
  --r1: 4px; --r2: 6px; --r3: 10px;
  --shadow-1: 0 1px 2px rgba(20, 22, 26, .06);
  --shadow-2: 0 2px 8px rgba(20, 22, 26, .08);

  /* ---- layout ---- */
  --wrap: 1120px;
  --measure: 68ch;
}

/* ============================ reset ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
p { margin: 0 0 var(--s4); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

/* ============================ layout ============================ */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
@media (max-width: 640px) { .wrap { padding-inline: var(--s4); } }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: var(--s2) var(--s4); z-index: 100;
}
.skip-link:focus { left: var(--s4); top: var(--s4); }

/* ============================ header ============================ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--s5);
  min-height: 60px;
}
.brand {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand__dot { color: var(--brand); }

.site-nav { display: flex; gap: var(--s5); margin-left: auto; font-size: var(--t-md); }
.site-nav a { color: var(--ink-2); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .site-nav { display: none; } }

/* ============================ breadcrumb ============================ */
.crumbs { font-size: var(--t-sm); color: var(--ink-3); padding-block: var(--s5) var(--s3); }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--brand); }
.crumbs__sep { margin-inline: var(--s2); color: var(--ink-4); }

/* ============================ page head ============================ */
.page-head { padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.page-head h1 {
  font-size: var(--t-3xl);
  line-height: 1.15;
  margin-bottom: var(--s3);
}
@media (min-width: 768px) { .page-head h1 { font-size: var(--t-4xl); } }

.eyebrow {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s3);
}

.lede {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ============================ stat grid ============================ */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  margin-block: var(--s5);
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.stat { background: var(--paper); padding: var(--s4); }
.stat__label {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s2);
  line-height: 1.3;
}
.stat__value {
  font-family: var(--font-sans);
  font-size: var(--t-2xl);
  font-weight: 650;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat__value--sm { font-size: var(--t-xl); }
.stat__note { font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s1); }
.stat__value.pos { color: var(--pos); }
.stat__value.neg { color: var(--neg); }

/* ============================ section ============================ */
.section { padding-block: var(--s7); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section h2 {
  font-size: var(--t-xl);
  margin-bottom: var(--s2);
}
.section__sub {
  font-size: var(--t-md);
  color: var(--ink-3);
  margin-bottom: var(--s5);
  max-width: var(--measure);
}

/* ============================ data table ============================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dtable {
  font-size: var(--t-md);
  font-variant-numeric: tabular-nums;
}
.dtable th {
  text-align: left;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: var(--s3) var(--s3);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
  background: var(--paper);
}
.dtable td {
  padding: var(--s3) var(--s3);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.dtable tbody tr:hover { background: var(--paper-2); }
.dtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable .rank { color: var(--ink-4); width: 2.5em; }
.dtable tr.is-current { background: var(--brand-tint); }
.dtable tr.is-current td { font-weight: 600; }
.dtable a { color: var(--ink); }
.dtable a:hover { color: var(--brand); }

/* ============================ percentile bar ============================ */
.pbar { margin-block: var(--s5); }
.pbar__scale {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s2);
}
.pbar__track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 40px;
  margin-bottom: var(--s2);
}
.pbar__seg {
  position: relative;
  background: var(--brand-tint);
  border-radius: 2px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--s1);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.pbar__seg:nth-child(2) { background: #dbe4fd; }
.pbar__seg:nth-child(3) { background: #bfd0fb; }
.pbar__seg:nth-child(4) { background: #a3bcf8; }
.pbar__seg--mid { box-shadow: inset 0 0 0 2px var(--brand); }
.pbar__axis {
  display: flex; justify-content: space-between;
  font-size: var(--t-xs); color: var(--ink-4);
  border-top: 1px solid var(--line);
  padding-top: var(--s2);
}

/* ============================ callout ============================ */
.callout {
  border-left: 3px solid var(--brand);
  background: var(--brand-tint);
  padding: var(--s4) var(--s5);
  border-radius: 0 var(--r2) var(--r2) 0;
  margin-block: var(--s5);
  font-size: var(--t-md);
  line-height: 1.6;
}
.callout--neg { border-left-color: var(--neg); background: var(--neg-tint); }
.callout--pos { border-left-color: var(--pos); background: var(--pos-tint); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { font-variant-numeric: tabular-nums; }

/* ============================ faq ============================ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: var(--s4) 0;
  font-weight: 600;
  font-size: var(--t-base);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: var(--t-lg);
  line-height: 1;
  flex: none;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq__body {
  padding-bottom: var(--s4);
  font-size: var(--t-md);
  color: var(--ink-2);
  max-width: var(--measure);
}
.faq .faq__body p:last-child { margin-bottom: 0; }

/* ============================ related links ============================ */
.linkgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
}
@media (min-width: 640px) { .linkgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .linkgrid { grid-template-columns: repeat(3, 1fr); } }

.linkgrid a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  color: var(--ink);
  font-size: var(--t-md);
  transition: border-color .15s ease, background .15s ease;
}
.linkgrid a:hover {
  text-decoration: none;
  border-color: var(--brand);
  background: var(--brand-tint);
}
.linkgrid .lg-val { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================ source note ============================ */
.source {
  font-size: var(--t-xs);
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
  margin-top: var(--s6);
  line-height: 1.7;
}
.source a { color: var(--ink-3); text-decoration: underline; }

/* ============================ footer ============================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: var(--s7);
  margin-top: var(--s8);
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; }
.site-footer a { color: var(--ink-2); }
.site-footer nav { display: flex; gap: var(--s4); flex-wrap: wrap; }

/* ============================ hero (home) ============================ */
.hero { padding-block: var(--s8) var(--s7); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: var(--t-3xl); line-height: 1.1; margin-bottom: var(--s4); }
@media (min-width: 768px) { .hero h1 { font-size: 52px; } }
.hero p { font-size: var(--t-lg); color: var(--ink-2); max-width: var(--measure); }

/* ============================ utility ============================ */
.muted { color: var(--ink-3); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
