/* ATS checker page. Builds on ../styles.css for tokens, nav, buttons and footer. */
.ats-page .nav { background: rgba(8,9,11,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.ats-private { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ats-private i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.ats { position: relative; z-index: 1; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 132px var(--gutter) 80px; }
.ats__intro { margin-bottom: 44px; }
.ats__intro h1 { text-wrap: balance; font-size: clamp(34px, 5.4vw, 72px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; max-width: 15ch; }
.ats__intro h1 em { font-size: 1.06em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* panels */
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 24px; min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.panel__title { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.panel__meta { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.panel__note { margin: -6px 0 18px; font-size: 14px; color: var(--muted); }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* inputs */
.ats__inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ats__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; }
.ats__error { color: var(--crit); font-size: 14px; }
.btn--text { padding: 14px 10px; color: var(--muted); }
.btn--text:hover { color: var(--text); }
.btn[disabled] { opacity: .55; pointer-events: none; }

.field { display: grid; gap: 8px; margin-top: 18px; }
.field small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 13px; color: var(--dim); letter-spacing: 0; text-transform: none; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; line-height: 1.5; min-height: 160px; }
#resume { font-family: var(--mono); font-size: 13px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,255,90,.12); }
.field ::placeholder { color: var(--dim); }

.drop {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 16px; text-align: center; cursor: pointer;
  border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg); transition: border-color .25s, background .25s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: rgba(184,255,90,.04); }
.drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,255,90,.12); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--accent); margin-bottom: 6px; }
.drop__text b { font-weight: 500; color: var(--accent); }
.drop__hint { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.drop__status { min-height: 1.4em; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.drop__status.is-error { color: var(--crit); }
.drop__status.is-ok { color: var(--accent); }

/* job title autocomplete, level and fitting roles */
.field__label { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.combo { position: relative; }
.combo__list {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow-y: auto; list-style: none;
  padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); box-shadow: 0 18px 40px -12px rgba(0,0,0,.7);
}
.combo__list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.combo__list li small { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
.combo__list li[aria-selected="true"], .combo__list li:hover { background: var(--line); }
.combo__list li mark { background: none; color: var(--accent); }
.combo__group { padding: 8px 12px 4px; font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .04em; cursor: default; }
.combo__group:hover { background: none; }

.fits { margin-top: 12px; }
.fits__label { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-bottom: 8px; }
.fits__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.fits__list button {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 13.5px; transition: border-color .2s, background .2s;
}
.fits__list button:hover, .fits__list button.is-on { border-color: var(--accent); }
.fits__list button.is-on { background: rgba(184,255,90,.06); }
.fits__list small { font-family: var(--mono); font-size: 11px; color: var(--accent); }

.level { border: 0; padding: 0; min-width: 0; }
.level legend { margin-bottom: 8px; padding: 0; }
.level__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.level__opts label { position: relative; }
.level__opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.level__opts span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--muted); transition: border-color .2s, color .2s, background .2s; }
.level__opts input:checked + span { border-color: var(--accent); color: var(--text); background: rgba(184,255,90,.06); }
.level__opts input:focus-visible + span { box-shadow: 0 0 0 3px rgba(184,255,90,.2); }
.level__opts span.is-suggested::after { content: " · suggested"; font-family: var(--mono); font-size: 11px; color: var(--accent); }
.level__hint { min-height: 1.2em; }

.roles { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.role { display: grid; gap: 10px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.role__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.role h4 { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.role__pct { font-family: var(--mono); font-size: 14px; color: var(--tone, var(--accent)); white-space: nowrap; }
.role__meta { font-size: 13.5px; color: var(--muted); }
.role__meta b { font-weight: 500; color: var(--text); }
.role .btn { justify-self: start; padding: 8px 14px; font-size: 13.5px; }
.role.is-current { border-color: var(--accent); }

.basis { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 14.5px; color: var(--muted); }
.basis b { color: var(--text); font-weight: 500; }
.basis .btn { margin-left: auto; padding: 8px 14px; font-size: 13.5px; }

.export { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; }
.export .panel__note { margin: 6px 0 0; }
.export__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.export__actions .btn { padding: 11px 18px; font-size: 14px; }
.export__status { grid-column: 1 / -1; min-height: 1.2em; margin-top: -4px; font-size: 13.5px; color: var(--accent); }
@media (max-width: 760px) {
  .export { grid-template-columns: minmax(0, 1fr); }
  .export__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* the improvement plan, shown only on paper or in a saved PDF */
.print-report { display: none; }
@media print {
  @page { margin: 16mm 14mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body > *:not(.print-report) { display: none !important; }
  .print-report { display: block; font-family: var(--sans); font-size: 10.5pt; line-height: 1.45; color: #111; }
  .print-report h1 { font-size: 20pt; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2pt; }
  .print-report .pr-sub { color: #555; margin-bottom: 10pt; }
  .print-report .pr-summary { display: flex; flex-wrap: wrap; gap: 4pt 14pt; padding: 8pt 10pt; border: 1px solid #ccc; border-radius: 6pt; margin-bottom: 14pt; list-style: none; }
  .print-report .pr-summary li:first-child { font-weight: 600; }
  .print-report section { margin-top: 14pt; break-inside: auto; }
  .print-report h2 { font-size: 12.5pt; font-weight: 600; border-bottom: 1px solid #ddd; padding-bottom: 3pt; margin-bottom: 6pt; break-after: avoid; }
  .print-report .pr-note { color: #555; font-size: 9.5pt; margin-bottom: 6pt; }
  .print-report ul.pr-items { list-style: none; padding: 0; }
  .print-report ul.pr-items li { display: grid; grid-template-columns: 12pt minmax(0, 1fr); gap: 6pt; padding: 3pt 0; break-inside: avoid; }
  .print-report ul.pr-items li::before { content: ""; width: 8pt; height: 8pt; margin-top: 3pt; border: 1px solid #777; border-radius: 2pt; }
  .print-report ul.pr-items.is-plain li::before { border: 0; content: "•"; margin-top: 0; width: auto; height: auto; }
  .print-report .pr-tag { font-weight: 600; margin-right: 4pt; }
  .print-report .pr-tag--must { color: #b42318; }
  .print-report .pr-detail { display: block; color: #555; font-size: 9.5pt; }
  .print-report .pr-foot { margin-top: 18pt; color: #595959; font-size: 8.5pt; }
}

/* results */
.results { display: grid; gap: 16px; margin-top: 56px; outline: none; scroll-margin-top: 84px; }
.summary { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px 36px; align-items: center; padding: 28px; }
.summary__copy h3 { font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.summary__copy p:last-child { margin-top: 10px; color: var(--muted); max-width: 44ch; }
.summary__copy .label { margin-bottom: 10px; }

.dial { position: relative; width: 156px; height: 156px; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 9; }
.dial__track { stroke: var(--line); }
.dial__fill { stroke: var(--tone, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.dial__num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial__num b { font-size: 48px; font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dial__num span { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.tone-good { --tone: var(--accent); }
.tone-mid { --tone: var(--warn); }
.tone-low { --tone: var(--crit); }

.bars { list-style: none; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px 12px; align-items: center; font-size: 14px; }
.bars span { color: var(--muted); }
.bars b { font-family: var(--mono); font-size: 13px; font-weight: 500; text-align: right; }
.bars i { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bars i::after { content: ""; display: block; height: 100%; width: var(--v, 0%); border-radius: inherit; background: var(--tone, var(--accent)); transition: width 1s var(--ease); }

.fixes { list-style: none; display: grid; gap: 2px; counter-reset: fix; }
.fixes li { counter-increment: fix; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.fixes li:first-child { border-top: 0; padding-top: 0; }
.fixes li::before { content: counter(fix, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--dim); padding-top: 3px; }
.fixes p { color: var(--text); }
.fixes .tag { margin-right: 8px; }
.fixes .empty { color: var(--muted); }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: .02em; border: 1px solid currentColor; vertical-align: 1px; }
.tag--fail { color: var(--crit); }
.tag--warn { color: var(--warn); }
.tag--info { color: var(--info); }
.tag--pass { color: var(--accent); }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; }
.seg button.is-on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.kgroup + .kgroup { margin-top: 22px; }
.kgroup h4 { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; font-family: var(--mono); color: var(--muted); margin-bottom: 12px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; }
.chip::before { font-family: var(--mono); font-size: 12px; }
.chip.is-found { border-color: rgba(184,255,90,.35); }
.chip.is-found::before { content: "✓"; color: var(--accent); }
.chip.is-missing { border-color: rgba(255,107,92,.4); background: rgba(255,107,92,.05); }
.chip.is-missing::before { content: "✕"; color: var(--crit); }
.chip small { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.chip em { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--warn); }
.chip.is-covered { border-style: dashed; color: var(--muted); }
.chip.is-covered::before { content: "≈"; color: var(--accent); }
[data-filter="missing"] .chip.is-found, [data-filter="missing"] .chip.is-covered, [data-filter="found"] .chip.is-missing { display: none; }
.kgroup__empty { font-size: 14px; color: var(--dim); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.checks { list-style: none; display: grid; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.checks li:first-child { border-top: 0; padding-top: 0; }
.checks li::before { font-family: var(--mono); font-size: 13px; line-height: 1.55; }
.checks .is-pass::before { content: "✓"; color: var(--accent); }
.checks .is-warn::before { content: "!"; color: var(--warn); font-weight: 600; text-align: center; }
.checks .is-fail::before { content: "✕"; color: var(--crit); }
.checks .is-info::before { content: "i"; color: var(--info); text-align: center; font-style: italic; }
.checks b { display: block; font-weight: 500; }
.checks span { color: var(--muted); }

.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stats3 div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.stats3 b { display: block; font-size: 26px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats3 span { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.bullets { list-style: none; display: grid; }
.bullets li { padding: 14px 0; border-top: 1px solid var(--line); }
.bullets li:first-child { border-top: 0; padding-top: 0; }
.bullets p { font-size: 14.5px; color: var(--text); }
.bullets ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bullets ul li { padding: 0; border: 0; }
.bullets .empty { color: var(--muted); }

.ats__fine { max-width: 70ch; font-size: 13.5px; color: var(--dim); margin-top: 8px; }
.ats__fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

@media (max-width: 1024px) {
  .summary { grid-template-columns: auto minmax(0, 1fr); }
  .bars { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .ats { padding-top: 104px; }
  .ats__inputs, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 20px 16px; }
  .summary { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 22px 16px; }
  .summary .bars { justify-self: stretch; }
  .dial { width: 132px; height: 132px; }
  .dial__num b { font-size: 40px; }
  .ats__actions .btn--primary { width: 100%; justify-content: center; }
  .ats-private { display: none; }
  .stats3 b { font-size: 22px; }
  .roles { grid-template-columns: minmax(0, 1fr); }
}
