/* Per-job pages under /jobs/. Builds on /styles.css tokens and /guides/guides.css prose.
   Each page sets --sc (score colour, dark ramp) and --scl (same hue darkened for light theme). */

.job-page { --c-score: var(--sc, var(--accent)); }
:root[data-theme="light"] .job-page { --c-score: var(--scl, var(--accent)); }

.jp-head { max-width: 70ch; padding-top: 20px; }
.jp-head h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08;
  font-size: clamp(32px, 4vw + 14px, 56px); text-wrap: balance;
}

/* Verdict: the answer, first */
.verdict {
  margin-top: 22px; padding: 16px 20px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--c-score) 13%, var(--surface));
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 18px;
}
.v-score { font-family: var(--serif); line-height: 1; color: var(--c-score); white-space: nowrap; }
.v-score b { font-size: 52px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.v-score span { font-size: 24px; font-weight: 500; margin-left: 2px; }
.v-text { font-size: 16.5px; line-height: 1.45; color: var(--text); }
.v-text strong { font-weight: 600; }
.pips { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-top: 14px; }
.pips i { height: 7px; border-radius: 4px; background: var(--surface-2); }
:root[data-theme="dark"] .pips i { background: rgba(255,255,255,0.09); }
:root .pips i.on { background: var(--c-score); }

/* Pay, jobs and trend as one cluster */
.facts {
  margin-top: 12px; border-radius: var(--radius); background: var(--surface);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.facts > div { padding: 14px 18px 16px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--text-3); }
.facts dd { margin-top: 2px; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.facts dd small { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.facts p { margin-top: 4px; font-size: 13.5px; line-height: 1.4; color: var(--text-3); }
.tr-up { color: var(--up); } .tr-down { color: var(--down); }

/* Ruler: this job against familiar ones */
.ruler { margin-top: 30px; }
.ruler-anchors { position: relative; height: 46px; list-style: none; }
.anc { position: absolute; bottom: 0; left: var(--x); font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.anc { width: 0; }
.anc span { display: block; width: max-content; transform: translateX(-50%); }
.anc.al span { transform: translateX(-6px); }
.anc.ar span { transform: translateX(calc(-100% + 6px)); }
.anc.t0 span { padding-bottom: 6px; }
.anc.t1 span { padding-bottom: 26px; }
.anc b { font-weight: 600; color: var(--text); }
.anc::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 1px; height: 8px; background: var(--text-3); }
.anc.t1::after { height: 28px; }
.ruler-bar {
  position: relative; height: 10px; border-radius: 5px; margin: 2px 0 0;
  background: linear-gradient(90deg, rgb(56,189,248), rgb(45,212,191) 25%, rgb(234,179,8) 50%, rgb(249,115,22) 75%, rgb(239,68,68));
}
:root[data-theme="light"] .ruler-bar {
  background: linear-gradient(90deg, rgb(2,132,199), rgb(13,148,136) 25%, rgb(202,138,4) 50%, rgb(234,88,12) 75%, rgb(220,38,38));
}
.ruler-you {
  position: absolute; top: 50%; left: var(--x); width: 24px; height: 24px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--you); border: 4px solid var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.ruler-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ruler-label { position: relative; left: var(--x); width: max-content; margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--text); transform: translateX(-50%); }
.ruler-label.al { transform: translateX(-12px); }
.ruler-label.ar { transform: translateX(calc(-100% + 12px)); }
.ruler-label b { color: var(--c-score); }
.ruler-cap { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--text-3); }

/* Reading column */
.job-page .prose { margin-top: 8px; }
.job-page .prose h2 { margin-top: 48px; }
.prose .note { margin-top: 12px; font-size: 15px; color: var(--text-3); line-height: 1.6; }
.actions { list-style: none; counter-reset: act; margin-top: 18px; }
.actions li { counter-increment: act; position: relative; padding-left: 44px; }
.actions li + li { margin-top: 20px; }
.actions li::before {
  content: counter(act); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text);
  font: 600 15px/1 var(--sans);
}
.actions h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--text); }
.actions p { margin-top: 4px; }

.prose .job-list { list-style: none; padding: 0; margin-top: 14px; border-top: 1px solid var(--line); }
.prose .job-list li { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.job-list a { min-width: 0; overflow-wrap: anywhere; color: var(--text); text-decoration-color: var(--line-strong); }
.job-list a:hover { text-decoration-color: var(--accent); }
.job-list .meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.job-list .pay { font-size: 15px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.sc {
  display: inline-block; min-width: 30px; padding: 2px 6px; border-radius: 6px; text-align: center;
  background: var(--c); color: #0a0a0f; font: 600 14px/1.3 var(--sans); font-variant-numeric: tabular-nums;
}
:root[data-theme="light"] .sc { background: var(--cl); color: #fff; }

.prose .cite { margin-top: 18px; font-size: 14px; color: var(--text-3); line-height: 1.6; }

.az-jump { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 28px; max-width: 70ch; }
.az-jump a { display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 8px; background: var(--surface); text-decoration: none; font-weight: 600; }
.az-jump a:hover { background: var(--surface-2); }
.job-page .prose > h2[id] { scroll-margin-top: calc(var(--nav-h, 60px) + 12px); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .facts > div:nth-child(2) { border-left: 0; }
  .v-score b { font-size: 46px; }
}
