/* resume-pilot.io
   Idea: a job posting under inspection. The check result is the posting with
   reviewer's notes in its margin; everything else stays quiet around it. */

@font-face { font-family: "Young Serif"; src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --paper: #f2f4f6;
  --sheet: #ffffff;
  --ink: #18202e;
  --muted: #566173;
  --rule: #d3dae2;
  --pen: #2546b8;
  --pen-ink: #ffffff;
  --ok: #1c7a50;
  --warn: #8f5b00;
  --risk: #b42318;
  --info: #566173;
  --ok-wash: #e6f3ec;
  --warn-wash: #fbf0dc;
  --risk-wash: #fbe7e5;
  --board: #9aa5b4;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 66ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10151d; --sheet: #18202b; --ink: #e7ecf2; --muted: #9ba7b6; --rule: #2d3745;
    --pen: #93a9ff; --pen-ink: #0f1626; --ok: #5cc596; --warn: #e3ae4d; --risk: #f2867c; --info: #9ba7b6;
    --ok-wash: #15302a; --warn-wash: #33290f; --risk-wash: #3a1d1b; --board: #5d6878; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10151d; --sheet: #18202b; --ink: #e7ecf2; --muted: #9ba7b6; --rule: #2d3745;
  --pen: #93a9ff; --pen-ink: #0f1626; --ok: #5cc596; --warn: #e3ae4d; --risk: #f2867c; --info: #9ba7b6;
  --ok-wash: #15302a; --warn-wash: #33290f; --risk-wash: #3a1d1b; --board: #5d6878; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--pen); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--sheet); padding: 6px 10px; z-index: 5; }

/* ---- type scale (1.25, from 17px) ---- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.2rem); margin-top: 0; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.small { font-size: 0.875rem; color: var(--muted); }
.measure { max-width: var(--measure); }

/* ---- frame ---- */
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
header.top { padding: 22px 0; }
header.top .wrap { display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap; }
.mark { font-family: var(--serif); font-size: 1.45rem; color: var(--ink); text-decoration: none; margin-right: auto;
  display: inline-flex; align-items: center; gap: 10px; align-self: center; }
.rp-logo { width: 38px; height: 38px; flex: none; overflow: visible; }
.rp-ring { fill: none; stroke: var(--ink); stroke-width: 6; }
.rp-hub { fill: var(--ink); }
.rp-wedge { fill: var(--pen); opacity: 0.3; }
.rp-plane { fill: var(--pen); }
.rp-sweep, .rp-plane { transform-box: view-box; }
.rp-sweep { transform-origin: 27px 37px; transform: rotate(15deg); }
button[aria-busy="true"] { cursor: progress; filter: none; display: inline-flex; align-items: center; gap: 10px; }
button[aria-busy="true"]::before {
  content: ""; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box;
  background: conic-gradient(from 0deg, currentColor 0 70deg, transparent 70deg);
}

nav.links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.95rem; }
nav.links a { color: var(--ink); text-decoration: none; }
nav.links a:hover, nav.links a[aria-current="page"] { text-decoration: underline; }
main { padding-bottom: 40px; }
section.band { padding: clamp(48px, 7vw, 96px) 0; }
section.band + section.band { border-top: 1px solid var(--rule); }
footer.bottom { border-top: 1px solid var(--rule); padding: 32px 0 48px; font-size: 0.9rem; color: var(--muted); }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; }
footer.bottom a { color: var(--muted); }
footer.bottom .fine { flex-basis: 100%; max-width: 70ch; }

/* ---- hero: form left, inspected posting right ---- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-top: clamp(24px, 5vw, 64px); }
.hero h1 { max-width: 9ch; }

form.check { margin-top: 28px; display: grid; gap: 12px; }
label { font-weight: 600; font-size: 0.95rem; }
.field { display: grid; gap: 6px; }
input[type=url], input[type=text], input[type=email], select, textarea {
  font: inherit; color: var(--ink); background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 6px;
  padding: 12px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--pen); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pen) 25%, transparent); }
textarea { min-height: 120px; resize: vertical; }
.row { display: flex; gap: 10px; }
.row > input { flex: 1; min-width: 0; }
button, .button {
  font: 600 1rem var(--sans); background: var(--pen); color: var(--pen-ink); border: 0; border-radius: 6px;
  padding: 12px 20px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap;
}
button:hover, .button:hover { filter: brightness(1.08); }
details.more { border-top: 1px solid var(--rule); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--pen); font-size: 0.95rem; }
details.more[open] summary { margin-bottom: 12px; }
details.more .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- the inspected posting (signature element) ---- */
.inspect { position: relative; }
.inspect .tag { font-size: 0.85rem; color: var(--muted); margin: 0 0 8px; }
.sheet {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem);
}
.sheet .doc { padding: 26px 26px 30px; border-right: 1px dashed var(--rule); min-width: 0; }
.sheet .doc .co { color: var(--muted); font-size: 0.95rem; margin: 0 0 4px; }
.sheet .doc h3 { font-size: 1.55rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.sheet .doc .meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.sheet .doc .excerpt { font-size: 0.95rem; color: var(--muted); max-height: 11.5em; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.sheet .doc .ghostline { height: 9px; background: var(--rule); border-radius: 2px; margin: 0 0 11px; opacity: 0.7; }
.sheet .notes { list-style: none; margin: 0; padding: 18px 16px 22px; display: grid; gap: 14px; align-content: start; }
.note { font-size: 0.875rem; line-height: 1.45; padding-left: 12px; border-left: 3px solid var(--info); }
.note b { display: block; font-weight: 650; color: var(--ink); }
.note > span { color: var(--muted); display: block; margin-top: 2px; }
.note.ok { border-color: var(--ok); } .note.warn { border-color: var(--warn); } .note.risk { border-color: var(--risk); }
.note .glyph { font-weight: 700; margin-right: 4px; }
.note.ok .glyph { color: var(--ok); } .note.warn .glyph { color: var(--warn); } .note.risk .glyph { color: var(--risk); } .note.info .glyph { color: var(--info); }

.verdict { margin: 0 0 14px; padding: 14px 16px; border-radius: 4px; background: var(--sheet); border: 1px solid var(--rule); border-left-width: 6px; }
.verdict h2 { font-size: 1.6rem; margin: 0 0 4px; }
.verdict p { margin: 0; color: var(--muted); }
.verdict.ok { border-left-color: var(--ok); } .verdict.warn { border-left-color: var(--warn); }
.verdict.risk { border-left-color: var(--risk); background: var(--risk-wash); } .verdict.info { border-left-color: var(--info); }
.verdict .go { margin-top: 10px; }
.sheet.plain { grid-template-columns: 1fr; }
.sheet.plain .notes { padding: 18px 22px 22px; }

/* ---- interview-rate bars ---- */
.bars { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.bars li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 16px; align-items: center; }
.bars .lab { font-size: 0.95rem; }
.bars .track { display: flex; align-items: center; gap: 10px; }
.bars .bar { height: 22px; background: var(--board); border-radius: 0 3px 3px 0; }
.bars li.employer .bar { background: var(--pen); }
.bars .val { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.95rem; }
.legend { display: flex; gap: 20px; font-size: 0.875rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---- prose sections ---- */
.two { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; max-width: var(--measure); }
.steps li h3 { margin-bottom: 4px; }
.steps li p { margin: 0; color: var(--muted); }
.cite { font-size: 0.85rem; color: var(--muted); }
.cite a { color: var(--muted); }
figure.fact { margin: 0; padding: 0 0 22px; }
figure.fact .num { font-family: var(--serif); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem); line-height: 1; display: block; margin-bottom: 8px; }
figure.fact figcaption { max-width: 40ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 40px; margin: 28px 0; }
.statlinks { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.statlinks li { border-bottom: 1px solid var(--rule); }
.statlinks a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 20px 0; text-decoration: none; color: var(--ink); }
.statlinks a strong { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.statlinks a span { color: var(--muted); grid-column: 1; }
.statlinks a em { font-style: normal; color: var(--pen); grid-row: 1 / span 2; grid-column: 2; align-self: center; }
table.data { border-collapse: collapse; width: 100%; max-width: 760px; font-size: 0.95rem; margin: 16px 0; }
table.data th, table.data td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
.empty { background: var(--sheet); border: 1px dashed var(--rule); border-radius: 4px; padding: 22px; max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }

/* ---- waitlist ---- */
form.join { display: grid; gap: 14px; max-width: 520px; }
.notice { padding: 14px 16px; border-radius: 4px; background: var(--sheet); border: 1px solid var(--rule); max-width: var(--measure); }

/* ---- small screens ---- */
@media (max-width: 880px) {
  .hero, .two { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .sheet { grid-template-columns: 1fr; }
  .sheet .doc { border-right: 0; border-bottom: 1px dashed var(--rule); padding: 20px; }
  .row { flex-direction: column; }
  details.more .grid2 { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: 1fr; gap: 4px; }
  nav.links { gap: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .inspect.result .note { animation: mark 360ms ease-out both; }
  .inspect.result .note:nth-child(2) { animation-delay: 90ms; } .inspect.result .note:nth-child(3) { animation-delay: 180ms; }
  .inspect.result .note:nth-child(4) { animation-delay: 270ms; } .inspect.result .note:nth-child(n+5) { animation-delay: 360ms; }
  @keyframes mark { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

  /* Logo: once per visit the sweep makes a full turn, then the plane leaves through the gap. */
  .rp-intro .rp-sweep { animation: rp-turn 1.1s cubic-bezier(.3,.1,.2,1) both; }
  .rp-intro .rp-plane { animation: rp-depart 0.7s cubic-bezier(.2,.7,.2,1) 0.75s both; }
  .mark:hover .rp-plane { transform: translate(1.5px, -1.5px); transition: transform 200ms ease-out; }
  /* While a check runs the radar keeps sweeping, header and button alike. */
  .rp-scanning .rp-sweep { animation: rp-spin 1.4s linear infinite; }
  .rp-scanning .rp-plane { animation: rp-hold 1.4s ease-in-out infinite alternate; }
  button[aria-busy="true"]::before { animation: rp-spin-plain 1.4s linear infinite; }
  @keyframes rp-turn { from { transform: rotate(-345deg); } to { transform: rotate(15deg); } }
  @keyframes rp-spin { from { transform: rotate(15deg); } to { transform: rotate(375deg); } }
  @keyframes rp-spin-plain { to { transform: rotate(360deg); } }
  @keyframes rp-depart { from { opacity: 0; transform: translate(-12px, 12px); } to { opacity: 1; transform: none; } }
  @keyframes rp-hold { from { transform: none; } to { transform: translate(-3px, 3px); } }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- resume x-ray ---- */
.notice.error { border-left: 6px solid var(--risk); background: var(--risk-wash); }
.overall { margin: 8px 0 0; font-family: var(--serif); line-height: 1; }
.overall .num { font-size: clamp(4rem, 3rem + 5vw, 6.5rem); }
.overall .of { font-size: 1.6rem; color: var(--muted); margin-left: 4px; }
h1.grade { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); margin: 6px 0 14px; }
.meters { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.meters li { display: grid; grid-template-columns: 10rem minmax(0, 1fr) 3rem; gap: 6px 16px; align-items: center; }
.meters .lab { font-weight: 650; }
.meters .meter { height: 12px; background: var(--rule); border-radius: 6px; overflow: hidden; }
.meters .fill { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.meters .fill.warn { background: var(--warn); } .meters .fill.risk { background: var(--risk); }
.meters .val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.meters .val.na { color: var(--muted); font-weight: 400; }
.meters .why { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); }
.fixes { padding-left: 1.3em; margin: 0; }
.fixes li { margin-bottom: 18px; } .fixes h3 { margin: 0 0 4px; font-size: 1.15rem; } .fixes p { margin: 0; color: var(--muted); }
.headline-try { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--pen); padding: 12px 16px; border-radius: 4px; font-family: var(--serif); font-size: 1.2rem; }
.sheet.xray { grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); margin-top: 20px; }
ol.parsed { margin: 0; padding-left: 2.6em; font-size: 0.9rem; line-height: 1.5; }
ol.parsed li { padding: 1px 0; overflow-wrap: anywhere; }
ol.parsed li::marker { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
ol.parsed li.name { background: var(--warn-wash); font-weight: 700; }
ol.parsed li.cellbreak { list-style: none; margin: 10px 0 10px -2.6em; padding: 2px 0 2px 2.6em; border-top: 2px dashed var(--warn);
  color: var(--warn); font-size: 0.8rem; font-style: italic; }
.lostline { margin-top: 14px; font-size: 0.9rem; color: var(--risk); }
.legend .st, .bars .st { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: 7px; vertical-align: -1px; }
.st.shown { background: var(--ok); } .st.listed { background: transparent; border: 2.5px solid var(--warn); } .st.missing { background: transparent; border: 2px solid var(--risk); }
.bars.skills li .bar { background: var(--board); }
.proof { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.proof > li { padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; }
.proof > li.weak { border-left: 4px solid var(--warn); }
.proof .line { margin: 0 0 8px; }
.pips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pip { font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.pip.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-wash); font-weight: 600; }
.pip.bad { color: var(--risk); border-color: color-mix(in srgb, var(--risk) 45%, transparent); background: var(--risk-wash); }
.ask { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: 0.93rem; }
.ask p { margin: 0 0 6px; } .ask ul { margin: 0 0 8px; padding-left: 1.2em; color: var(--muted); }
.shape { font-family: var(--serif); }
@media (max-width: 620px) {
  .sheet.xray { grid-template-columns: 1fr; }
  .meters li { grid-template-columns: 1fr 3rem; } .meters .meter { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- news feed ---- */
.feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.feed li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.feed li > a { color: var(--ink); text-decoration: none; font-size: 1.05rem; line-height: 1.4; }
.feed li > a:hover { color: var(--pen); text-decoration: underline; }
.feed .small a { color: var(--muted); }
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: var(--measure); }
.tablewrap { overflow-x: auto; }

/* ---- who's hiring / laying off ---- */
.ledger { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
.ledger .side { border-top: 4px solid var(--pen); padding-top: 18px; min-width: 0; }
.ledger .side.layoffs { border-top-color: var(--risk); }
.ledger .side h2 { margin-bottom: 6px; }
.ledger table.data { max-width: none; }
.bars .bar.risk { background: var(--risk); opacity: .8; }
.tag-risk { font-size: .75rem; color: var(--risk); border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; margin-left: 4px; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
@media (max-width: 860px) { .ledger { grid-template-columns: 1fr; } }
