/* CareerMap: shared styles. Mobile-first; system fonts so nothing extra loads. */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --accent: #059669;
  --accent-soft: #d1fae5;
  --accent-ink: #065f46;
  --violet: #6d28d9;
  --violet-soft: #ede9fe;
  --amber-soft: #fef3c7;
  --amber-ink: #92400e;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 16px; background: var(--ink); color: #fff;
}
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo span { color: #34d399; }
.site-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: #cbd5e1; text-decoration: none; font-size: .8rem; padding: 6px 5px; border-radius: 999px; white-space: nowrap; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Footer */
.site-footer { max-width: 760px; margin: 48px auto 0; padding: 24px 16px 40px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.site-footer p { margin: 0 0 6px; }

/* Role page */
.role { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.loading, .error-box { padding: 48px 0; text-align: center; color: var(--muted); }

.role-hero { padding: 28px 0 8px; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }
.role-hero h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); margin: 0 0 10px; }
.tagline { font-size: 1.1rem; color: var(--ink-2); margin: 0; }
.draft-banner {
  margin: 16px 0 0; padding: 10px 14px; border-radius: 10px;
  background: var(--amber-soft); color: var(--amber-ink); font-size: .88rem;
}

/* Jump chips */
.jump {
  position: sticky; top: 56px; z-index: 10;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 16px -16px 0; padding: 10px 16px; background: rgba(248,250,252,.95);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; font-size: .85rem; text-decoration: none; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
}
.jump a:hover { border-color: var(--accent); color: var(--accent-ink); }

/* Sections */
.section { margin-top: 20px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 110px; }
.section h2 { font-size: 1.3rem; margin: 0 0 12px; }
.section p { margin: 0 0 12px; }
.section p:last-child { margin-bottom: 0; }
.intro { color: var(--ink-2); }
.small { font-size: .85rem; color: var(--muted); }

/* Day in the life */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { font-weight: 700; font-size: .85rem; color: var(--accent-ink); padding-top: 2px; font-variant-numeric: tabular-nums; }

/* Salary */
.tiers { display: grid; gap: 10px; grid-template-columns: 1fr; }
.tier { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.tier-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tier-amount { font-size: 1.6rem; font-weight: 800; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.tier-amount.pending { font-size: 1.05rem; color: var(--muted); font-weight: 700; }
.tier-basis { font-size: .82rem; color: var(--ink-2); }
.source { display: inline-block; margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--violet); background: var(--violet-soft); padding: 2px 8px; border-radius: 999px; text-decoration: none; }
a.source:hover { text-decoration: underline; }

.benchmark { margin-top: 16px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); }
.benchmark h3 { font-size: 1rem; margin: 0 0 6px; }
.pct-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.pct-table th, .pct-table td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); }
.pct-table td:last-child { text-align: right; font-weight: 700; }

/* Lifestyle */
.scores { display: grid; gap: 14px; }
.score-row { display: grid; gap: 4px; }
.score-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.score-name { font-weight: 700; }
.score-num { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.dots span { height: 8px; border-radius: 4px; background: var(--line); }
.dots span.on { background: var(--accent); }
.score-ends { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.score-note { font-size: .85rem; color: var(--ink-2); }

/* Licenses */
.licenses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.licenses li { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.lic-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.badge.req { background: var(--accent-soft); color: var(--accent-ink); }
.badge.often { background: var(--violet-soft); color: var(--violet); }
.lic-when { font-size: .88rem; color: var(--ink-2); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.tags li { font-size: .88rem; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }

/* Recruiting */
.recruit { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px solid var(--accent-soft); }
.recruit li { position: relative; padding: 0 0 16px 4px; }
.recruit li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--card); }
.recruit-when { font-weight: 700; }
.recruit-when small { font-weight: 600; color: var(--muted); margin-left: 6px; }

/* Exits */
.exits { display: grid; gap: 10px; }
.exit-col { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.exit-col h3 { font-size: .95rem; margin: 0 0 8px; color: var(--accent-ink); }
.exit-col ul { margin: 0; padding-left: 18px; }
.exit-col li { margin-bottom: 4px; font-size: .92rem; }

/* Related */
.related { display: grid; gap: 8px; }
.related a, .related span {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 600; background: var(--bg);
}
.related a:hover { border-color: var(--accent); }
.related a::after { content: "→"; color: var(--accent); }
.related span { color: var(--muted); font-weight: 500; }
.related span small { font-size: .75rem; }

/* Placeholder */
.placeholder { border-style: dashed; background: transparent; text-align: center; color: var(--muted); }

.site-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Home */
.home-hero { background: radial-gradient(120% 90% at 85% 0%, #134e4a 0%, var(--ink) 60%); color: #fff; padding: 36px 16px 28px; }
.home-hero-inner { max-width: 960px; margin: 0 auto; }
.home-hero h1 { font-size: clamp(1.9rem, 7.5vw, 3.2rem); margin: 0 0 10px; max-width: 16ch; }
.home-hero p { color: #cbd5e1; font-size: 1.05rem; margin: 0 0 20px; max-width: 46ch; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--muted); border-radius: 14px; padding: 0 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: 14px 0; color: var(--ink); background: transparent; }
.search:focus-within { box-shadow: 0 0 0 3px #34d399, 0 8px 30px rgba(0,0,0,.25); }
.filters { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; font: inherit; font-size: .85rem; color: #e2e8f0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: #34d399; border-color: #34d399; color: var(--ink); font-weight: 700; }

.map { max-width: 960px; margin: 0 auto; padding: 8px 16px 0; }
.result-count { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }
.overview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.overview a { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c); text-decoration: none; color: var(--ink); }
.overview a:hover { border-color: var(--c); }
.overview strong { font-size: .92rem; line-height: 1.25; }
.overview span { font-size: .78rem; color: var(--muted); }
.field { margin-top: 28px; scroll-margin-top: 70px; }
.field-head { border-left: 4px solid var(--c); padding-left: 12px; margin-bottom: 12px; }
.field-head h2 { margin: 0; font-size: 1.3rem; }
.field-head p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.cards { display: grid; gap: 12px; }
.role-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c);
  text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
a.role-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.role-card h3 { margin: 0; font-size: 1.1rem; }
.role-card p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.card-sub { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips span { font-size: .75rem; padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.pay { font-weight: 700; font-size: .9rem; margin-top: 2px; }
.pay small { font-weight: 600; font-size: .72rem; color: var(--violet); background: var(--violet-soft); padding: 2px 6px; border-radius: 999px; margin-left: 4px; }
.role-card.soon { opacity: .6; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }
.empty button { font: inherit; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }

/* Simple page hero (calendar, tools) */
.page-hero { background: var(--ink); color: #fff; padding: 28px 16px 22px; }
.page-hero-inner { max-width: 960px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); margin: 0 0 8px; }
.page-hero p { color: #cbd5e1; margin: 0 0 16px; max-width: 52ch; }
.year-pick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.year-pick::-webkit-scrollbar { display: none; }
.year-pick button { flex: none; font: inherit; font-size: .9rem; color: #e2e8f0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.year-pick button[aria-pressed="true"] { background: #34d399; border-color: #34d399; color: var(--ink); font-weight: 700; }

/* Calendar */
.cal { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.now-panel { margin-top: 20px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid #a7f3d0; }
.now-panel h2 { font-size: 1.05rem; margin: 0 0 6px; color: var(--accent-ink); }
.now-panel p { margin: 0 0 6px; }
.now-panel ul { margin: 0; padding-left: 20px; }
.now-panel a { font-weight: 600; color: var(--accent-ink); }
.now-panel .next-up { margin-top: 12px; }
.cal-key { position: sticky; top: 56px; z-index: 5; background: rgba(248,250,252,.96); backdrop-filter: blur(6px); margin: 16px -16px 0; padding: 10px 31px 8px; border-bottom: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .cell { display: inline-block; width: 14px; height: 10px; }
.strip, .strip-years, .strip-seasons { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.strip-head { display: grid; gap: 2px; font-size: .68rem; color: var(--muted); text-align: center; font-weight: 600; }
.strip-years span { border-bottom: 2px solid var(--line); padding-bottom: 1px; color: var(--ink-2); }
.strip-head .dim { opacity: .35; }
.cell { height: 12px; border-radius: 3px; background: var(--line); }
.cell.none { background: #eef2f6; }
.cell.prep { background: #cbd5e1; }
.cell.apply { background: #059669; }
.cell.internship { background: #f59e0b; }
.cell.dim { opacity: .25; }
.cell.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.cell.now-key { background: transparent; outline: 2px solid var(--ink); outline-offset: -2px; }

.cal-field { margin-top: 22px; }
.cal-field h2 { font-size: 1.15rem; margin: 0 0 8px; padding-left: 10px; border-left: 4px solid var(--c); }
.cal-role { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.cal-role summary { list-style: none; cursor: pointer; display: grid; gap: 8px; padding: 12px 14px; }
.cal-role summary::-webkit-details-marker { display: none; }
.cal-title { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.cal-title::after { content: "+"; color: var(--muted); font-weight: 400; }
.cal-role[open] .cal-title::after { content: "–"; }
.cal-body { padding: 0 14px 14px; }
.cal-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cal-entries li { display: grid; gap: 2px; font-size: .92rem; }
.cal-entries strong { font-size: .85rem; }
.tag { justify-self: start; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag.prep { background: #e2e8f0; color: var(--ink-2); }
.tag.apply { background: var(--accent-soft); color: var(--accent-ink); }
.tag.internship { background: #fef3c7; color: #92400e; }
.more { display: inline-block; margin-top: 10px; font-size: .88rem; font-weight: 600; text-decoration: none; }

@media (min-width: 720px) {
  .cal-role summary { grid-template-columns: 250px 1fr; align-items: center; }
  /* Lines the season header up with the strips: 16px page gutter + 1px card border + 14px card padding. */
  .cal-key { display: grid; grid-template-columns: 250px 1fr; column-gap: 8px; align-items: end; padding-left: 31px; padding-right: 31px; }
  .legend { margin: 0; }
  .now-panel ul { columns: 3; column-gap: 24px; }
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .overview { grid-template-columns: repeat(4, 1fr); }
  .home-hero { padding: 56px 24px 40px; }
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 640px) {
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .exits { grid-template-columns: repeat(3, 1fr); }
  .related { grid-template-columns: 1fr 1fr; }
  .section { padding: 24px 28px; }
}

/* ---------- AI tools (decoder, resume) ---------- */
.tool { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.tool-card { margin-top: 20px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; }
.tool-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tool-label-row label { font-weight: 700; }
.link-btn { font: inherit; font-size: .88rem; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.tool textarea { width: 100%; font: inherit; font-size: 16px; line-height: 1.45; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; resize: vertical; min-height: 200px; background: var(--bg); color: var(--ink); }
.tool textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
.tool-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.turnstile:empty { display: none; }
.primary-btn { font: inherit; font-weight: 700; font-size: 1rem; color: #fff; background: var(--accent); border: 0; border-radius: 12px; padding: 14px 18px; cursor: pointer; }
.primary-btn:hover { background: var(--accent-ink); }
.primary-btn:disabled { opacity: .65; cursor: progress; }
.form-msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fee2e2; color: #991b1b; font-size: .92rem; }
.decode-head h2 { font-size: 1.45rem; }
.match { display: grid; gap: 2px; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid #a7f3d0; color: var(--ink); text-decoration: none; }
.match span { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.match strong::after { content: " →"; color: var(--accent); }
.match small { color: var(--ink-2); font-size: .85rem; }
.bullets { margin: 0 0 12px; padding-left: 20px; }
.bullets li { margin-bottom: 6px; }
.bullets:last-child { margin-bottom: 0; }
.posted-pay { font-size: 1.35rem; font-weight: 800; margin-bottom: 2px !important; }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flag { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border-left: 4px solid; font-size: .92rem; }
.flag.red { background: #fef2f2; border-color: #dc2626; }
.flag.watch { background: var(--amber-soft); border-color: #f59e0b; }
.flag.good { background: #ecfdf5; border-color: var(--accent); }
.flag-kind { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.flag.red .flag-kind { color: #b91c1c; }
.flag.watch .flag-kind { color: var(--amber-ink); }
.flag.good .flag-kind { color: var(--accent-ink); }
.jargon { margin: 0; display: grid; gap: 0; }
.jargon dt { font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); }
.jargon dt:first-child { border-top: 0; padding-top: 0; }
.jargon dd { margin: 2px 0 10px; color: var(--ink-2); font-size: .92rem; }
.decode-note { text-align: center; margin-top: 16px; }
