/*
 * jobs.cognak.com: the match page, the match detail page, first-run setup
 * (/setup) and the admin page (/admin).
 *
 * Built to docs/design.md: the Admin theme (dark), the work layout (wide
 * from the left), headline at 274px (154 on phones), 16px body, panels with
 * no lit edge, pills for every button. Fonts: the fallback stacks only,
 * because the Diatype web license question is still open (design.md 8).
 * One fixed dark ground and no theme switch, like every COGNAK page.
 */
:root {
  color-scheme: dark;
  --ground: #17151A; --panel: #1C1A21; --panel-hi: #221F28;
  --ink: #F2EEF7; --ink-soft: #A9A3B8;
  --line: rgba(242, 238, 247, .08); --line-strong: rgba(242, 238, 247, .22);
  --field: rgba(0, 0, 0, .24); --field-focus: rgba(0, 0, 0, .36);
  --head: #9F50FF; --cta: #8B1FFF; --cta-hover: #7A12EC; --accent-text: #C79BFF;
  --ok: #AAFF00; --err: #FFA79A;
  --font-sans: 'Diatype Variable', 'ABC Diatype', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Diatype Mono', 'ABC Diatype Mono', 'SF Mono', Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --fs-10: .625rem; --fs-11: .72rem; --fs-12: .75rem; --fs-13: .8125rem; --fs-14: .875rem; --fs-15: .9375rem; --fs-16: 1rem; --fs-17: 1.0625rem;
  --shadow-card: 0 2px 18px rgba(0, 0, 0, .28);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-press: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-s: 200ms; --dur-sm: 250ms; --dur-2xl: 600ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-16); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(159, 80, 255, .45); color: #fff; }
[hidden] { display: none !important; }
a { color: var(--accent-text); text-underline-offset: 3px; }
button { font: inherit; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Keyboard: buttons and links keep a 2px outer ring; fields recolor their own border. */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px;
}
.btn:focus-visible, .pill:has(input:focus-visible), .chip:focus-visible { border-radius: 999px; }
.pill:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

/* ---- top bar: the yak top left, links stacked top right (cognak.com home) ---- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; padding: 24px 40px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; z-index: 2;
}
.brand { display: block; line-height: 0; }
.brand img { display: block; height: 48px; width: auto; opacity: .7; transition: opacity var(--dur-l) ease-in; }
@media (hover: hover) { .brand:hover img { opacity: 1; } }
/* Same as .home-nav on cognak.com: right-aligned, stacked, 14px Diatype. */
.toplinks { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-top: 8px; }
.toplinks a, .toplinks button {
  font-family: var(--font-sans); font-size: var(--fs-14); font-weight: 400; line-height: 1; letter-spacing: .04em;
  color: rgba(255, 255, 255, .6); text-decoration: none; background: none; border: 0; cursor: pointer;
  padding: 5px 12px; margin: -5px -12px; transition: color var(--dur-s) var(--ease-standard);
}
.toplinks a[hidden], .toplinks button[hidden] { display: none; }
@media (hover: hover) { .toplinks a:hover, .toplinks button:hover { color: var(--accent-text); } }
@media (max-width: 720px) { .topbar { padding: 24px 24px 0; } .toplinks a, .toplinks button { font-size: var(--fs-15); } }

/* ---- layout: work page, wide from the left (design.md 5.1) ---- */
.jobs { max-width: 1040px; margin: 0 auto; padding: 274px 6vw 22vh; }
@media (min-width: 960px) { .jobs { margin-left: clamp(48px, 10vw, 180px); margin-right: auto; } }
@media (min-width: 1800px) { .jobs { max-width: min(1440px, 100vw - 760px); margin-left: min(240px, 180px + (100vw - 1800px) * .15); } }
@media (max-width: 720px), (max-height: 500px) and (orientation: landscape) { .jobs { padding-top: 154px; } }
@media (max-width: 720px) { .jobs { padding-left: 24px; padding-right: 24px; padding-bottom: 14vh; } }

/* Sign-in: the /admin link-page layout, one centered 600px column. */
.jobs.center { margin-left: auto; margin-right: auto; max-width: calc(600px + 12vw); }
.jobs.center > * { max-width: 600px; margin-left: auto; margin-right: auto; }
@media (max-width: 720px) { .jobs.center { max-width: none; } }

/* ---- header ---- */
.headline {
  font-size: clamp(20px, 5.5vw, 62px); font-weight: 500; line-height: 1.1; letter-spacing: -.02em;
  margin: 0 0 1.4rem; color: var(--ink);
}
.headline em { font-style: normal; font-weight: 500; color: var(--head); }
.lede {
  font-size: var(--fs-16); line-height: 1.65; color: var(--ink-soft); text-wrap: pretty;
  max-width: 52ch; margin: 0 0 3.4rem 40px;
}
.center .lede { margin-left: auto; }
@media (max-width: 720px) {
  .headline { font-size: clamp(24px, 7vw, 42px); }
  .lede { margin-left: 0; margin-bottom: 2.4rem; }
}

.group-title {
  font-family: var(--font-mono); font-size: var(--fs-11); font-weight: 400; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0;
}
.status { display: inline-flex; align-items: flex-start; gap: .6rem; margin: 0 0 18px; }
.status-dot { margin-top: .4em; width: 7px; height: 7px; border-radius: 50%; background: var(--head); box-shadow: 0 0 10px rgba(159, 80, 255, .8); flex: none; }

/* ---- sections ---- */
.block { margin-top: 56px; }
.block:first-of-type { margin-top: 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.stack { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }

/* Panels: things you work in. Fill and a hairline, no lit edge, no hover glow. */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px 32px 28px; box-shadow: var(--shadow-card);
}
.panel.match { position: relative; padding: 24px 24px 22px; }
@media (max-width: 900px) { .panel.match { padding: 22px 20px 20px; } }
@media (max-width: 600px) { .panel { padding: 24px 20px 22px; } }
.panel + .panel { margin-top: 12px; }
.group + .group { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 32px; }
.group > .group-title { margin-bottom: 18px; }

/* Match panel anatomy (design.md 7.2). */
.idx, .tag {
  font-family: var(--font-mono); font-size: var(--fs-10); line-height: 1; letter-spacing: .14em;
  color: var(--ink-soft); text-transform: uppercase; font-variant-numeric: tabular-nums;
}
/* The top row of a card: index, workplace pill and the tag on the right,
   all on one line so their tops and centers line up. */
.cardtop { display: flex; align-items: center; gap: 10px; min-height: 20px; }
.cardtop .tag { margin-left: auto; }
.cardtop .wpill { margin-left: 0; }
.mtitle { font-size: 1.5rem; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; margin: 22px 0 7px; }
.mtitle a { color: var(--ink); text-decoration: none; transition: color var(--dur-s) var(--ease-standard); }
@media (hover: hover) { .mtitle a:hover { color: var(--accent-text); } }
.meta { font-size: var(--fs-14); line-height: 1.5; color: var(--ink-soft); margin: 0; }
.mini {
  display: block; font-family: var(--font-mono); font-size: var(--fs-10); line-height: 1.4; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); margin: 16px 0 6px;
}
.mini + .why, .why { font-size: var(--fs-14); line-height: 1.5; color: var(--ink); margin: 0; max-width: 72ch; }
.gaps { font-size: var(--fs-13); line-height: 1.45; color: var(--ink-soft); margin: 0; max-width: 72ch; }
.mini.gaps-label { margin-top: 12px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.actions .push { margin-left: auto; }
.textlink {
  font-size: var(--fs-13); color: var(--ink-soft); text-decoration: none; padding: 6px 2px;
  transition: color var(--dur-s) var(--ease-standard);
}
@media (hover: hover) { .textlink:hover { color: var(--accent-text); } }

/* ---- buttons: always pills ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-sans); font-size: var(--fs-15); font-weight: 500; line-height: 1.33;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-s) var(--ease-standard), color var(--dur-s) var(--ease-standard),
    border-color var(--dur-s) var(--ease-standard), box-shadow var(--dur-sm) var(--ease-standard), transform 150ms var(--ease-press);
}
@media (hover: hover) { .btn:hover:not(:disabled) { border-color: var(--ink); } }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
/* White on #8B1FFF is 5.62:1. Hover deepens rather than lightens so the label stays above 4.5. */
.btn.primary { background: var(--cta); border-color: var(--cta); color: #fff; }
@media (hover: hover) { .btn.primary:hover:not(:disabled) { background: var(--cta-hover); border-color: var(--cta-hover); box-shadow: 0 0 26px rgba(139, 31, 255, .5); } }
.btn.ghost { font-size: var(--fs-14); padding: 10px 18px; }
.btn.small { font-size: var(--fs-14); padding: 8px 16px; }
.linkbtn {
  background: none; border: 0; padding: 2px 0; color: var(--accent-text); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 3px;
}

/* ---- pills (choices) ---- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.pill {
  position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none;
  font-size: var(--fs-15); line-height: 1.33; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--field); color: var(--ink);
  transition: background var(--dur-s) var(--ease-standard), border-color var(--dur-s) var(--ease-standard),
    color var(--dur-s) var(--ease-standard), transform 150ms var(--ease-press);
}
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
@media (hover: hover) { .pill:hover { border-color: var(--ink); } }
.pill:active { transform: scale(.96); }
.pill:has(input:checked), .pill.on { background: var(--cta); border-color: var(--cta); color: #fff; font-weight: 500; }
.pill:has(input:disabled) { opacity: .55; cursor: default; }
.pills.compact .pill { font-size: var(--fs-14); padding: 8px 14px; }

/* Reason chips after a skip: smaller pills, one tap each. */
.chip {
  font-family: var(--font-sans); font-size: var(--fs-13); line-height: 1.3; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--field); color: var(--ink-soft); cursor: pointer;
  transition: border-color var(--dur-s) var(--ease-standard), color var(--dur-s) var(--ease-standard), transform 150ms var(--ease-press);
}
@media (hover: hover) { .chip:hover { border-color: var(--ink); color: var(--ink); } }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { border-color: var(--accent-text); color: var(--ink); }

/* ---- fields (design.md 3.6) ---- */
.field { margin: 1.6rem 0 0; }
.q { display: block; margin-bottom: .75rem; }
.q-title { display: block; font-size: var(--fs-17); font-weight: 500; line-height: 1.3; color: var(--ink); }
.q-sub { display: block; font-size: var(--fs-14); line-height: 1.4; color: var(--ink-soft); margin-top: 4px; }
.center .q-title { font-size: var(--fs-15); }
.txt {
  width: 100%; margin: 0; background: var(--field); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); -webkit-text-fill-color: var(--ink); caret-color: var(--accent-text);
  font-family: inherit; font-size: var(--fs-16); line-height: 1.5; padding: 12px 16px; outline: none;
  transition: border-color var(--dur-s) var(--ease-standard), background var(--dur-s) var(--ease-standard);
}
.txt::placeholder { color: #8A8499; -webkit-text-fill-color: #8A8499; }
.txt:focus { border-color: var(--accent-text); background: var(--field-focus); }
.txt:focus-visible { outline: 1.5px solid var(--accent-text); outline-offset: -1px; }
.txt.is-error { border-color: var(--err); }
textarea.txt { resize: vertical; min-height: 48px; field-sizing: content; max-height: 240px; }
.txt:-webkit-autofill, .txt:-webkit-autofill:hover, .txt:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink) !important; caret-color: var(--accent-text);
  -webkit-box-shadow: 0 0 0 1000px var(--panel-hi) inset !important; transition: background-color 9999s ease-out 0s;
}
.note { margin: .9rem 0 0; font-size: var(--fs-13); line-height: 1.45; color: var(--ink-soft); }
.note:empty { margin: 0; }
.note.is-error { color: var(--err); }

/* ---- sign-in panel (the /admin card) ---- */
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 36px 32px 32px; box-shadow: var(--shadow-card); }
@media (max-width: 600px) { .acard { padding: 28px 20px 24px; } }
.signin-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.2rem; }
.signin-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; margin-bottom: 1.1rem;
  border-radius: 999px; color: var(--accent-text); background: rgba(159, 80, 255, .12);
  border: 1px solid rgba(159, 80, 255, .34); box-shadow: 0 0 36px rgba(139, 31, 255, .22);
}
.signin-head .group-title { margin-bottom: 1.15rem; }
.signin-sub { font-size: var(--fs-15); line-height: 1.5; color: var(--ink-soft); max-width: 34ch; margin: 0; }
.acard .actions { justify-content: center; margin-top: 1.6rem; }
@media (max-width: 600px) { .acard .actions .btn { width: 100%; } }

/* ---- prep progress and inline lines ---- */
.progress { margin-top: 20px; }
.progress .note { margin: 0 0 10px; }
.bar { position: relative; height: 2px; border-radius: 2px; background: var(--line-strong); overflow: hidden; max-width: 320px; }
.bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 34%; border-radius: inherit; background: var(--accent-text);
  animation: slide 1.6s var(--ease-standard) infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.alert { margin: 16px 0 0; font-size: var(--fs-14); line-height: 1.5; color: var(--err); max-width: 64ch; }

.skipped-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: var(--fs-14); color: var(--ink-soft); }
.skipped-line .said { color: var(--ink); }
.skip-block { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; border-radius: 0; }
.skip-block.flash { animation: flash-line 1.2s var(--ease-standard) 1; }
@keyframes flash-line { 0%, 40% { border-top-color: var(--accent-text); } 100% { border-top-color: var(--line); } }
.panel.collapsed { padding: 16px 24px; box-shadow: none; animation: fadein var(--dur-sm) var(--ease-standard); }
@media (max-width: 600px) { .panel.collapsed { padding: 14px 20px; } }
.reasons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.reasons .mini { margin: 0 6px 0 0; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---- file rows (packet) and tracker rows: 8px, field fill, hairline ---- */
.row { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.filerow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; margin-top: 18px; }
.filerow .name { font-size: var(--fs-15); font-weight: 500; }
.filerow .fmeta { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--ink-soft); letter-spacing: .04em; }
.filerow .acts { display: flex; gap: 8px; justify-self: end; }
.filerow .fmeta { overflow-wrap: anywhere; }

.trow { display: grid; grid-template-columns: minmax(0, 1.5fr) 92px auto auto; align-items: center; gap: 12px 20px; }
.trow + .trow { margin-top: 8px; }
.trow .role { min-width: 0; }
.trow .rtitle { display: block; font-size: var(--fs-15); font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .trow a.rtitle:hover { color: var(--accent-text); } }
.trow .rmeta { display: block; font-size: var(--fs-13); line-height: 1.45; color: var(--ink-soft); margin-top: 2px; }
.trow .when { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--ink-soft); font-variant-numeric: tabular-nums; line-height: 1.4; }
.trow .when b { display: block; font-weight: 400; font-size: var(--fs-10); letter-spacing: .14em; text-transform: uppercase; }
.trow .plink { font-size: var(--fs-13); white-space: nowrap; }
.trow .notes { grid-column: 1 / -1; }
.trow .notes .txt { font-size: var(--fs-15); padding: 10px 14px; }
.trow .rnote { grid-column: 1 / -1; margin: 0; }
@media (max-width: 960px) {
  .trow { grid-template-columns: minmax(0, 1fr) auto; }
  .trow .pills { grid-column: 1 / -1; }
  .trow .plink { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .trow .when { grid-column: 1; }
}
@media (max-width: 600px) {
  #tracker-panel { padding: 8px; }
  #tracker-panel .empty { padding: 16px 12px; }
  .trow { padding: 14px; }
  .pills.compact { gap: 6px; }
  .pills.compact { display: grid; grid-template-columns: 1fr 1fr; }
  .pills.compact .pill { padding: 8px 12px; justify-content: center; }
}
.empty { font-size: var(--fs-14); color: var(--ink-soft); margin: 0; }

/* Skipped: collapsed by default. */
details.panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary .chev { color: var(--ink-soft); transition: transform var(--dur-s) var(--ease-standard); }
details.panel[open] > summary .chev { transform: rotate(180deg); }
details.panel[open] > summary { margin-bottom: 18px; }
details.panel:not([open]) .if-open, details.panel[open] .if-closed { display: none; }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.srow .stitle { font-size: var(--fs-15); color: var(--ink); text-decoration: none; }
.srow .smeta { font-size: var(--fs-13); color: var(--ink-soft); }
.srow .btn { margin-left: auto; }

.footnote { font-size: var(--fs-13); line-height: 1.7; color: var(--ink-soft); max-width: 72ch; margin: 40px 0 0; }

/* ---- match page: packet ---- */
.plist { margin: 0; padding-left: 1.2em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; overflow-wrap: anywhere; font-size: var(--fs-15); line-height: 1.55; max-width: 76ch; }
.plist li::marker { color: var(--ink-soft); }
.plist.plain { list-style: none; padding-left: 0; }
.ptext { font-size: var(--fs-15); line-height: 1.55; margin: 0; max-width: 76ch; }
.psub { font-size: var(--fs-14); color: var(--ink-soft); line-height: 1.5; margin: 4px 0 0; max-width: 76ch; }
.label-inline { font-family: var(--font-mono); font-size: var(--fs-10); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); display: block; margin: 0 0 4px; }
.outline-part + .outline-part { margin-top: 16px; }

.grid-table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); line-height: 1.5; }
.grid-table th {
  text-align: left; font-family: var(--font-mono); font-weight: 400; font-size: var(--fs-10); letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); padding: 0 16px 10px 0;
}
.grid-table td { vertical-align: top; padding: 14px 16px 14px 0; border-top: 1px solid var(--line); }
.grid-table td:last-child, .grid-table th:last-child { padding-right: 0; }
.grid-table .need { font-weight: 500; font-size: var(--fs-15); width: 34%; }
.grid-table .str { width: 96px; }
.ev + .ev { margin-top: 10px; }
.ev .eid { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--ink-soft); margin-right: 6px; }
.ev .none { color: var(--ink-soft); }
.stag, .ctag {
  display: inline-block; font-family: var(--font-mono); font-size: var(--fs-10); line-height: 1; letter-spacing: .14em;
  text-transform: uppercase; padding: 5px 7px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--ink);
  vertical-align: .1em; white-space: nowrap;
}
.stag.partial { color: var(--ink-soft); }
.stag.gap { color: var(--ink-soft); border-style: dashed; }
.ctag { color: var(--accent-text); border-color: rgba(199, 155, 255, .45); margin-left: 6px; }
.ctag.soft { color: var(--ink-soft); border-color: var(--line-strong); }
@media (max-width: 720px) {
  .grid-table thead { display: none; }
  .grid-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
  .grid-table td { display: block; padding: 0; border: 0; width: auto !important; }
  .grid-table td.ev-cell, .grid-table td.wide { grid-column: 1 / -1; }
  .grid-table.fields tr { padding: 12px 0; gap: 4px 12px; }
  .grid-table.fields td.wide { grid-row: 2; }
  .grid-table.fields td:last-child { grid-column: 2; grid-row: 1; }
}

/* Visible blanks in bullet skeletons: the candidate fills these in. */
.blank {
  display: inline-block; min-width: 3.2em; height: 1.05em; vertical-align: -.2em; margin: 0 .15em;
  border-bottom: 1.5px solid var(--accent-text); background: rgba(199, 155, 255, .08); border-radius: 2px 2px 0 0;
}

.prompt {
  margin: 0; padding: 16px; background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-mono); font-size: var(--fs-13); line-height: 1.6; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto;
}
.prompt:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.value-ask { color: var(--ink-soft); }

.posting { font-size: var(--fs-15); line-height: 1.65; color: var(--ink); white-space: pre-line; max-width: 76ch; margin: 0; overflow-wrap: anywhere; }
.posting-wrap { margin-top: 18px; }
.flash { animation: flash 1.2s var(--ease-standard) 1; }
@keyframes flash { 0%, 40% { border-color: var(--accent-text); } 100% { border-color: var(--line); } }

/* ---- setup and admin pages ---- */

/* REQUIRED tag (design.md 3.7). On a failed submit it turns the error color; no em dash suffix (Q6). */
.field[data-req] .q-title::after {
  content: "Required"; content: "Required" / "";
  margin-left: .7em; font-family: var(--font-mono); font-size: .62em; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); vertical-align: .15em;
}
.field.invalid .q-title::after { color: var(--err); }
.fields-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
@media (max-width: 720px) { .fields-2 { grid-template-columns: minmax(0, 1fr); } }
.field .pills { margin-top: 2px; }
.form-panel > .field:first-of-type, .form-panel > .fields-2:first-of-type > .field { margin-top: 0; }
@media (max-width: 720px) { .form-panel > .fields-2:first-of-type > .field + .field { margin-top: 1.6rem; } }

.signin-setup { margin: 1.4rem 0 0; text-align: center; font-size: var(--fs-14); color: var(--ink-soft); }
.acard .note { text-align: left; }
.acard .lead-note { margin: 0 0 .4rem; }

/* A password shown once: a read-only mono field with Copy next to it. */
.secret { margin-top: 20px; padding: 18px 18px 16px; background: var(--field); border: 1px solid var(--line-strong); border-radius: 8px; }
.secret > .mini { margin-top: 0; }
.secret-row { display: flex; gap: 10px; align-items: center; }
.secret-row .txt { font-family: var(--font-mono); font-size: var(--fs-15); letter-spacing: .04em; min-width: 0; }
@media (max-width: 600px) { .secret { padding: 16px 14px 14px; } .secret-row { flex-wrap: wrap; } .secret-row .btn { flex: 1 1 100%; } }
.secret .actions { margin-top: 14px; }
.acard .secret { text-align: left; }

/* One panel per person, same anatomy as a match panel. */
.panel.person { position: relative; padding: 24px 24px 22px; }
@media (max-width: 900px) { .panel.person { padding: 22px 20px 20px; } }
.person .mtitle { margin-top: 22px; }
.person .group { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.person .group > .group-title { margin-bottom: 14px; }
.person .actions { margin-top: 0; }
.group-sub { font-size: var(--fs-13); line-height: 1.45; color: var(--ink-soft); margin: -6px 0 14px; max-width: 72ch; text-wrap: pretty; }

.files { display: grid; gap: 8px; }
.files .filerow { margin-top: 0; transition: border-color var(--dur-s) var(--ease-standard), background var(--dur-s) var(--ease-standard); }
.filerow .fmeta.off { color: #8A8499; }
.filerow .fmeta.is-error, .filerow .fnote.is-error { color: var(--err); }
.filerow .fnote { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) { .filerow { grid-template-columns: minmax(0, 1fr); } .filerow .acts { justify-self: start; } }
.filerow .fnote:empty { display: none; }
.filerow.drop { border-style: dashed; border-color: var(--accent-text); background: var(--field-focus); }
.btn input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.btn { position: relative; }
label.btn:has(input:disabled) { opacity: .55; cursor: default; }
fieldset.q-group { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.q-group > legend { padding: 0; }
.btn:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* A job's outcome, in the panel it ran from. */
.result { margin-top: 16px; padding: 14px 16px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; }
.result .rhead { margin: 0; font-size: var(--fs-15); font-weight: 500; line-height: 1.4; }
.result .rline { margin: 4px 0 0; font-size: var(--fs-14); line-height: 1.5; color: var(--ink-soft); max-width: 76ch; }
.result.is-error .rhead { color: var(--err); }
.result ul { margin: 8px 0 0; padding-left: 1.1em; font-size: var(--fs-13); line-height: 1.5; color: var(--err); overflow-wrap: anywhere; }
.result .rlink { display: inline-block; margin-top: 8px; font-size: var(--fs-14); }
.result .bar { margin-top: 10px; }

/* In-page confirm: never confirm(), alert() or prompt(). */
.confirm { margin-top: 16px; padding: 16px; background: var(--field); border: 1px solid var(--line-strong); border-radius: 8px; }
.confirm p { margin: 0; font-size: var(--fs-14); line-height: 1.5; max-width: 64ch; }
.confirm .field { margin-top: 14px; max-width: 360px; }
.confirm .q { margin-bottom: .5rem; }
.confirm .q-title { font-size: var(--fs-15); }
.confirm .actions { margin-top: 14px; }
.btn.danger { color: var(--err); border-color: rgba(255, 167, 154, .42); }
@media (hover: hover) { .btn.danger:hover:not(:disabled) { border-color: var(--err); } }
.btn.danger.solid { background: var(--err); border-color: var(--err); color: #1B1424; }
@media (hover: hover) { .btn.danger.solid:hover:not(:disabled) { background: #FF8F7E; border-color: #FF8F7E; } }
.btn.danger.solid:disabled { opacity: .32; }
.page-note { margin: 0 0 14px; }
.gate { max-width: 600px; }
.gate p { margin: 0; font-size: var(--fs-16); line-height: 1.5; }
.gate .actions { margin-top: 20px; }
@media (max-width: 600px) {
  .person .actions .btn, .confirm .actions .btn { flex: 1 1 auto; }
  .filerow .acts { margin-left: 0; }
}

/* ---- motion: panels rise in once; reduced motion shows everything at rest ---- */
.rise { opacity: 0; transform: translateY(8px); transition: opacity var(--dur-2xl) var(--ease-standard), transform var(--dur-2xl) var(--ease-standard); }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rise { opacity: 1; transform: none; transition: none; }
  .bar::after { animation: none; width: 100%; opacity: .5; }
}

/* Setup status on /admin: small pills, one per connection (2026-10-21). */
.status-pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--line-strong); background: var(--field);
  font-family: var(--font-mono); font-size: var(--fs-11); line-height: 1; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.status-pill-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.status-pill.is-ready { color: var(--ink); }
.status-pill.is-ready .status-pill-dot { background: var(--ok); box-shadow: 0 0 8px rgba(170, 255, 0, .55); }
.status-pill.is-missing { color: var(--err); border-color: rgba(255, 167, 154, .45); }
.status-pill.is-missing .status-pill-dot { background: var(--err); }
.edit-form .fields-2 .field:first-child { grid-column: 1 / -1; }

/* Fit score: "FIT 66/100", the number in its fit color (red-orange to green). */
.fit .fit-num { font-variant-numeric: tabular-nums; }
.fit .fit-of { color: var(--ink-soft); }
.fit-inline { white-space: nowrap; }

/* The working box while a packet builds: the same box as the admin morning check. */
.result.working { max-width: 560px; }
.result.working .rhead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.result.working .rtime { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--ink-soft); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.result.working:focus { outline: none; }
.match .result.working, #prep .result.working { margin-top: 20px; }

/* Workplace pill: Klein blue for remote, a lighter blue for hybrid, orange for on-site. */
.wpill {
  display: inline-block; vertical-align: middle; margin-left: 10px; padding: 5px 9px; border-radius: var(--radius-pill, 999px);
  font-family: var(--font-mono); font-size: var(--fs-10); line-height: 1; letter-spacing: .14em; text-transform: uppercase;
}
.wpill.is-remote { background: #0E06D2; color: #FFFFFF; }
.wpill.is-hybrid { background: #8FC2F2; color: #0B1B2B; }
.wpill.is-onsite { background: #EF9146; color: #2A1505; }
.lede .wpill { margin: 0 6px 0 0; vertical-align: 1px; }

/* Preview (admin seeing someone's pages, read only): a bar pinned to the bottom. */
.preview-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px; border-radius: 999px; background: #221F28; border: 1px solid var(--line-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45); font-size: var(--fs-14); line-height: 1.35; color: var(--ink);
}
.preview-dot { width: 7px; height: 7px; border-radius: 50%; background: #8FC2F2; box-shadow: 0 0 10px rgba(143, 194, 242, .8); flex: none; }
.has-preview main { padding-bottom: 96px; }
.preview-line { margin: 16px 0 0; }
.preview-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: var(--fs-14); }
@media (max-width: 600px) { .preview-bar { left: 16px; right: 16px; transform: none; border-radius: 16px; flex-wrap: wrap; } }
@media (min-width: 701px) { .preview-bar > span:nth-child(2) { white-space: nowrap; } }

/* Loading placeholders: card shapes with a soft shimmer, and three dots in
   the status line. Reduced motion keeps the shapes, without movement. */
.skel {
  display: block; border-radius: 6px; background: linear-gradient(90deg, rgba(242, 238, 247, .05) 0%, rgba(242, 238, 247, .11) 40%, rgba(242, 238, 247, .05) 80%);
  background-size: 300% 100%; animation: shimmer 1.6s var(--ease-standard) infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-card .skel + .skel { margin-top: 12px; }
.skel-idx { width: 18px; height: 10px; display: inline-block; }
.skel-pill { width: 58px; height: 20px; border-radius: 999px; display: inline-block; }
.skel-score { width: 52px; height: 10px; display: inline-block; }
.skel-title { width: min(420px, 70%); height: 24px; margin-top: 22px !important; }
.skel-meta { width: min(260px, 50%); height: 14px; }
.skel-text { width: min(640px, 90%); height: 14px; margin-top: 22px !important; }
.skel-text.short { width: min(460px, 70%); margin-top: 10px !important; }
.skel-actions { display: flex; gap: 12px; margin-top: 22px; }
.skel-btn { width: 132px; height: 44px; border-radius: 999px; }
.skel-btn.small { width: 80px; }
.skel-h1 { display: inline-block; width: min(560px, 80vw); height: .9em; vertical-align: -0.05em; border-radius: 10px; }
.skel-lede { display: inline-block; width: min(360px, 70vw); height: 1em; }
.loading-dots { display: inline-flex; gap: 5px; vertical-align: middle; }
.loading-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); animation: dot 1.2s var(--ease-standard) infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .skel, .loading-dots i { animation: none; } .loading-dots i { opacity: .6; } }
.skel-card .cardtop .skel, .skel-actions .skel { margin-top: 0 !important; }
.status-pill.is-new { color: var(--ink); }
.status-pill.is-new .status-pill-dot { background: var(--head); box-shadow: 0 0 8px rgba(159, 80, 255, .7); }
.status-pill .fit-inline .fit-of { color: var(--ink-soft); }
.rmeta.off-rules { display: block; color: var(--err); }
