/* Blanket dashboard. Same palette as the portfolio site: #06141B / #11212D surfaces, #253745 / #4A5C6A accents,
   #CCD0CF / #9BA8AB text (lifted a step for contrast). Dark only. System fonts only: the dashboard loads nothing from
   outside this computer, so Playfair Display is used when installed and Georgia otherwise. */
:root {
  color-scheme: dark;
  --bg: #06141b;
  --bg-blob-1: rgba(74, 92, 106, 0.24);
  --bg-blob-2: rgba(37, 55, 69, 0.4);
  --glass: #11212d;
  --glass-strong: #162a38;
  --pop-bg: #172b39;
  --glass-soft: rgba(155, 168, 171, 0.05);
  --field: rgba(74, 92, 106, 0.3);
  --field-hover: rgba(74, 92, 106, 0.46);
  --hairline: #22323d;
  --line: #1c2c37;
  --ink: #dfe3e2;
  --muted: #adb8bb;
  --accent: #ccd0cf;
  --accent-hover: #ffffff;
  --accent-ink: #06141b;
  --accent-soft: rgba(155, 168, 171, 0.16);
  --ring: rgba(155, 168, 171, 0.4);
  --ok: #9fd3b4;
  --warn: #e8c98f;
  --bad: #e2a9a9;
  --ok-bg: rgba(159, 211, 180, 0.13);
  --warn-bg: rgba(232, 201, 143, 0.13);
  --bad-bg: rgba(217, 160, 160, 0.14);
  --info-bg: rgba(74, 92, 106, 0.28);
  --code: rgba(0, 0, 0, 0.3);
  --shadow: none;
  --shadow-lift: none;
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.55);
  --blur: none;
  /* Sized from the viewport, like the portfolio site: blocks sit an inset from every screen edge and their
     padding, gaps and corners scale with the window instead of jumping at breakpoints. */
  --inset: clamp(16px, 3.5vw, 48px);
  --gap: clamp(12px, 1.4vw, 22px);
  --header-h: clamp(56px, 3.4vw, 72px);
  --r-sm: clamp(10px, 0.9vw, 14px);
  --r-md: clamp(14px, 1.3vw, 20px);
  --r-lg: clamp(16px, 1.8vw, 26px);
  --pad: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Open Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Code", SFMono-Regular, Consolas, monospace;
}

/* ── base ─────────────────────────────────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--field-hover) transparent; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* the ground is flat: no glow behind the page */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--field-hover); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }
::selection { background: var(--accent-soft); }

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.015em; }
h1 { margin: 0; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }
h2 { margin: 0 0 12px; font-size: 19px; line-height: 1.25; font-weight: 650; }
h3 { margin: 20px 0 8px; font-size: 15px; line-height: 1.3; font-weight: 650; }
p { max-width: 74ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── header ───────────────────────────────────────────────────────────────────────────────────────────── */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px 22px;
  min-height: 60px;
  padding: 8px var(--inset);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
header.top .brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font: 700 16px/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
header.top .brand svg { width: 28px; height: 28px; flex: none; }
nav.primary { display: flex; flex: 1 1 auto; align-items: center; gap: 2px; min-width: 0; }
nav.primary .links { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
nav.primary .links::-webkit-scrollbar { display: none; }
nav.primary a, nav.primary summary {
  position: relative;
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
nav.primary a:hover, nav.primary summary:hover { color: var(--ink); background: var(--field); text-decoration: none; }
nav.primary a[aria-current="page"], nav.primary details.has-current > summary {
  color: var(--accent);
  background: var(--accent-soft);
}
nav.primary details.more { position: relative; margin: 0; }
nav.primary details.more > summary { display: inline-flex; align-items: center; gap: 5px; list-style: none; cursor: pointer; }
nav.primary details.more > summary::-webkit-details-marker { display: none; }
nav.primary details.more > summary::after {
  content: "";
  width: 6px; height: 6px;
  margin-top: -3px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
nav.primary details.more[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
nav.primary .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-pop);
  animation: pop-in 0.22s var(--ease);
}
nav.primary .menu a { padding: 9px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.mode-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: help;
}
.mode-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

/* ── layout ───────────────────────────────────────────────────────────────────────────────────────────── */
main { width: auto; margin: 0 var(--inset); padding: var(--inset) 0 calc(var(--inset) * 2); }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 0 0 18px; }
body[data-page="home"] .page-head h1 { color: var(--accent); font-size: 13px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
body[data-page="home"] .page-head { margin-bottom: 10px; }

section.card, .glass {
  position: relative;
  margin: var(--gap) 0;
  padding: var(--pad);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
section.card { overflow-x: auto; }
section.card > :first-child { margin-top: 0; }
section.card > :last-child { margin-bottom: 0; }

/* entrance: cards rise in, staggered */
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── tables ───────────────────────────────────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--glass-soft);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th {
  position: sticky;
  top: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
tbody tr { transition: background-color 0.18s var(--ease); }
tbody tr:hover { background: var(--accent-soft); }
tbody tr:last-child > * { border-bottom: 0; }
td > a:first-child:not(.btn) { color: var(--ink); font-weight: 600; }
td > a:first-child:not(.btn):hover { color: var(--accent); }

/* key/value tables become a definition grid */
:is(table.kv, section.card > table) tbody tr:hover { background: transparent; }
:is(table.kv, section.card > table) th, :is(table.kv, section.card > table) td { padding: 11px 0; }
:is(table.kv, section.card > table) th { width: 32%; padding-right: 18px; color: var(--muted); font-size: 13px; font-weight: 500; }
@media (max-width: 640px) {
  :is(table.kv, section.card > table) tr { display: grid; }
  :is(table.kv, section.card > table) th { width: auto; padding-bottom: 0; border: 0; }
}

/* ── badges, notices ──────────────────────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--muted); opacity: 0.7; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.ok::before, .badge.warn::before, .badge.bad::before { background: currentColor; opacity: 1; }
p.badge { display: inline-flex; margin: 0 0 6px; }

.notice {
  position: relative;
  margin: 12px 0;
  padding: 12px 16px 12px 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--info-bg);
  color: var(--ink);
}
.notice::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 1.15em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.notice.warn { background: var(--warn-bg); }
.notice.warn::before { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.notice.bad { background: var(--bad-bg); }
.notice.bad::before { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.notice.ok { background: var(--ok-bg); }
.notice.ok::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.notice:empty { display: none; }
main > .notice:first-of-type { margin-top: 0; }

.sensitive { border: 1px dashed var(--bad) !important; }
.tag-sensitive { color: var(--bad); font-size: 12px; font-weight: 650; }

pre, code { background: var(--code); border-radius: 8px; font: 12.5px/1.55 var(--mono); }
code { padding: 2px 6px; overflow-wrap: anywhere; }
pre { max-height: 28em; padding: 14px 16px; overflow: auto; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--hairline); }
mark { padding: 0 2px; border-radius: 3px; background: var(--accent-soft); color: var(--ink); }
.ask-kind { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--accent-soft); color: var(--muted); }

/* ── buttons ──────────────────────────────────────────────────────────────────────────────────────────── */
form { margin: 0; }
form.inline { display: inline; }
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  margin: 2px 0;
  padding: 7px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--ink);
  font: 600 14px/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease),
              box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
button:hover, .btn:hover { background: var(--field-hover); text-decoration: none; }
button:active, .btn:active { transform: scale(0.97); }
button.primary, .btn.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
button.primary:hover, .btn.primary:hover { background: var(--accent-hover); }
button.danger { border-color: transparent; background: var(--bad-bg); color: var(--bad); box-shadow: none; }
button.danger:hover { background: var(--bad); color: var(--accent-ink); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
td .btn, td button { min-height: 32px; padding: 5px 13px; font-size: 13px; }

/* ── form fields ──────────────────────────────────────────────────────────────────────────────────────── */
input[type=text], input[type=number], input[type=password], input[type=email], input[type=url], input:not([type]),
textarea, select {
  max-width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:hover, textarea:hover, select:hover { background: var(--field-hover); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; background: var(--glass-strong); box-shadow: 0 0 0 4px var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.85; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select option { background: var(--bg); color: var(--ink); }
textarea { width: 100%; min-height: 5em; resize: vertical; }
input[type=file] { max-width: 100%; color: var(--muted); font: inherit; font-size: 13px; }
input[type=file]::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--ink);
  font: 600 13px var(--font);
  cursor: pointer;
}
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 13px; font-weight: 550; }
label.check { display: flex; gap: 9px; align-items: center; margin: 8px 0; color: var(--ink); font-size: 14px; font-weight: 400; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
fieldset { min-width: 0; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
/* job page: which resume was compared, and the user's own yes/no for a requirement */
.resume-used { margin: 0 0 12px; }
.resume-used p { margin: 0; flex: 1 1 320px; }
.confirm-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.confirm-row button { min-height: 28px; padding: 2px 10px; font-size: 12.5px; }
.confirm-row select, .confirm-row input.num { min-height: 28px; padding: 2px 8px; font-size: 12.5px; }
.confirm-row input.num { width: 6.5em; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid2 > div { padding: 16px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--glass-soft); }
.grid2 > div h3 { margin-top: 0; }
.qbox { margin: 12px 0; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--glass-soft); }

details { margin-top: 12px; }
summary { color: var(--muted); font-size: 14px; font-weight: 550; cursor: pointer; transition: color 0.2s var(--ease); }
summary:hover { color: var(--ink); }
details[open] > :not(summary) { animation: fade-in 0.25s var(--ease) both; }

/* ── discovery panel (Job search, All jobs) ───────────────────────────────────────────────────────────── */
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 18px; margin: 12px 0 16px; align-items: start; }
.search-grid label.wide { grid-column: 1 / -1; }
.search-grid input[type=text], .search-grid input:not([type]), .search-grid select { width: 100%; }
.search-grid fieldset, fieldset.chips { margin: 8px 0 0; padding: 0; border: 0; }
.search-grid fieldset legend { padding: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 550; }
.search-grid fieldset label.check, fieldset.chips label.check { display: inline-flex; margin: 0 6px 6px 0; }
/* chip-style checkboxes (work arrangement) */
label.check.chip, .search-grid fieldset label.check, fieldset.chips label.check {
  position: relative;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass-strong);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.search-grid fieldset label.check:has(input:checked), fieldset.chips label.check:has(input:checked) {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}
.search-grid fieldset label.check input, fieldset.chips label.check input { width: 15px; height: 15px; }

/* ── jobs list toolbar ────────────────────────────────────────────────────────────────────────────────── */
.toolbar {
  margin: var(--gap) 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin: 12px 0 0; }
.filters label { margin: 0; }
.filters label select, .filters label input { display: block; margin-top: 4px; }
.filters label.grow { flex: 1 1 260px; }
.filters label.grow input { width: 100%; }
.quickbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.quickbar .small { margin: 0 2px 0 12px; font-weight: 550; }
.quickbar .small:first-child { margin-left: 0; }
.quickbar .small:last-child { margin-left: auto; }
.quickbar .btn { min-height: 30px; padding: 5px 12px; font-size: 12.5px; font-weight: 550; box-shadow: none; }
.quickbar .btn:not(.primary) { background: transparent; }
.quickbar .btn:not(.primary):hover { background: var(--field); }
/* Filters: one button on the bar opens a panel of choices; each choice is a chip, on when clicked, off when clicked
   again. The choices that are on also sit under the bar, where a click removes them. */
.filters .filter-toggle { gap: 8px; }
.filters .filter-toggle::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 2px; border: solid currentColor;
  border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.filters .filter-toggle[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
.filters .n, .chip .n { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--field); font-size: 11.5px;
  line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.btn.primary .n { background: rgba(6, 20, 27, 0.14); }
.filters button[type=submit] { align-self: stretch; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.active-filters .clear { margin-left: 6px; color: var(--muted); font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border: 1px solid var(--hairline);
  border-radius: 999px; color: var(--ink); font-size: 12.5px; font-weight: 550; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease); }
a.chip:hover { background: var(--field); text-decoration: none; }
.chip.on { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
a.chip.on:hover { background: var(--accent-hover); }
.chip.on .n { background: rgba(6, 20, 27, 0.14); }
.chip.empty { opacity: 0.45; cursor: default; }
.filter-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px 28px;
  margin: 14px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.filter-panel[hidden] { display: none; }
.fgroup h3 { margin: 0 0 8px; color: var(--muted); font: 600 12px/1.3 var(--font); letter-spacing: 0.06em; text-transform: uppercase; }
.fgroup .fchips, .fgroup .more .fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fgroup p.small { margin: 8px 0 0; }
.fgroup .more { margin-top: 8px; }
.fgroup .more summary { color: var(--muted); font-size: 12.5px; cursor: pointer; }
.fgroup .more .fchips { max-height: 220px; margin-top: 8px; overflow: auto; }
.filter-panel .fnote { grid-column: 1 / -1; margin: 0; }
.job-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* ── home: hero search ────────────────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 var(--gap);
  padding: clamp(22px, 3.4vw, 64px) clamp(14px, 3vw, 64px);
  border: 1px solid var(--hairline);
  border-radius: calc(var(--r-lg) + 6px);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.hero-title { margin: 0; font-size: clamp(30px, 4.4vw, 68px); font-weight: 750; line-height: 1.06; letter-spacing: -0.035em; }
.hero-sub { margin: 10px 0 24px; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); }
.hero-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-template-areas: "what where go" "filters filters filters" "resume resume resume";
  align-items: start;
  gap: 0;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lift);
}
.hero-bar > form { display: contents; }
.hero-field { grid-area: what; margin: 0; padding: 6px 16px 8px; border-radius: 16px; transition: background-color 0.2s var(--ease); }
.hero-field:focus-within, .hero-bar #search-area:focus-within { background: var(--field); }
.hero-field .field-label, .hero-bar .place-search > label {
  display: block;
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero-field .field-label span, .hero-bar .place-search > label span { color: var(--muted); font-weight: 500; }
.hero-field input, .hero-bar #place-input {
  width: 100%;
  min-height: 38px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
  box-shadow: none;
}
.hero-field input:focus, .hero-bar #place-input:focus { background: transparent; box-shadow: none; }
.hero-bar #search-area { position: relative; grid-area: where; margin: 0; padding: 6px 16px 8px; border: 0; border-left: 1px solid var(--line); border-radius: 16px; background: transparent; }
.hero-bar > form > button[type=submit] {
  grid-area: go;
  align-self: stretch;
  min-height: 58px;
  margin: 0 0 0 6px;
  padding: 0 30px;
  border-radius: 16px;
  font-size: 16px;
}
.hero-filters { grid-area: filters; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 0; padding: 10px 12px 6px; border-top: 1px solid var(--line); }
.hero-filters fieldset.chips { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
.hero-filters fieldset.chips legend { float: left; margin-right: 8px; padding: 0; color: var(--muted); font-size: 13px; font-weight: 550; }
.hero-filters fieldset.chips label.check { margin: 3px 6px 3px 0; }
.hero-filters label.inline-select { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; }
.hero-filters label.inline-select select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
.hero.slim { padding: clamp(10px, 1.2vw, 18px); }
.hero.slim .hero-hint { margin: 10px 8px 0; }
.hero-status { margin: 12px 4px 0; }
.hero-status > p { margin: 6px 0; }
.hero-status .notice { margin: 8px 0 0; }
.hero-hint { margin: 14px 4px 0; color: var(--muted); font-size: 13px; }
.hero-empty { text-align: left; }
.hero-empty .btn { min-height: 46px; padding: 0 26px; font-size: 16px; }

/* ── home: two columns ────────────────────────────────────────────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 24vw, 400px); gap: var(--gap); align-items: start; }
.home-grid > * { min-width: 0; }
.home-main > section.card:first-child, .home-side > :first-child { margin-top: 0; }
.home-side { position: sticky; top: 80px; }
.activity-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.activity-head h2 { margin: 0; }
.source-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; padding: 0; list-style: none; }
.source-chips li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--glass-soft);
  font-size: 13px;
}
.source-chips li b { font-weight: 600; }
.source-chips li .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.source-chips li .badge { padding: 1px 8px; font-size: 11.5px; }

/* LinkedIn-style profile card */
section.card.profile-card { --av: clamp(76px, 4.6vw, 104px); overflow: hidden; padding: 0; text-align: center; }
.profile-card .banner { height: clamp(70px, 4.8vw, 104px); background: linear-gradient(120deg, #253745 0%, #4a5c6a 100%); }
.profile-card .avatar {
  display: grid;
  place-items: center;
  width: var(--av); height: var(--av);
  margin: calc(var(--av) / -2) auto 0;
  border: 4px solid var(--glass-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, #253745, #11212d);
  color: var(--ink);
  font: 700 calc(var(--av) * 0.34)/1 var(--font-display);
  box-shadow: var(--shadow);
}
.profile-card .avatar svg { width: 48%; height: 48%; }
.profile-card .who { padding: clamp(10px, 0.8vw, 16px) clamp(16px, 1.4vw, 26px) clamp(14px, 1.1vw, 20px); }
.profile-card .who h2 { margin: 0; font-size: clamp(18px, 1.1vw, 22px); }
.profile-card .who p { margin: 6px auto 0; max-width: none; color: var(--muted); font-size: clamp(13px, 0.75vw, 15px); overflow-wrap: anywhere; }
.profile-card .who .badge { margin-left: 4px; }
.stats { display: grid; grid-template-columns: 1fr; gap: 1px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--line); }
.stat { display: block; padding: clamp(12px, 1vw, 18px) 8px; background: var(--glass-strong); color: var(--ink); text-align: center; text-decoration: none; transition: background-color 0.2s var(--ease); }
a.stat:hover { background: var(--accent-soft); text-decoration: none; }
.stat .num { display: block; font: 700 clamp(20px, 1.3vw, 26px)/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .lbl { display: block; margin-top: 4px; color: var(--muted); font-size: clamp(12px, 0.68vw, 14px); }
.profile-card .facts { display: grid; gap: clamp(8px, 0.6vw, 12px); padding: clamp(14px, 1.1vw, 22px) clamp(16px, 1.4vw, 26px); text-align: left; font-size: clamp(13px, 0.75vw, 15px); }
.profile-card .facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.profile-card .facts > div > :last-child { text-align: right; }
.profile-card .facts .k { flex: none; color: var(--muted); }
.profile-card .facts > .small { display: block; padding-top: 2px; font-size: clamp(12px, 0.68vw, 14px); }
.profile-card .links { display: grid; padding: clamp(6px, 0.5vw, 10px); border-top: 1px solid var(--line); text-align: left; }
.profile-card .links a { display: flex; align-items: center; justify-content: space-between; padding: clamp(9px, 0.7vw, 13px) clamp(10px, 0.9vw, 16px); border-radius: 10px; color: var(--ink); font-size: clamp(14px, 0.8vw, 16px); font-weight: 500; }
.profile-card .links a::after { content: "›"; color: var(--muted); font-size: 18px; line-height: 1; }
.profile-card .links a:hover { background: var(--field); text-decoration: none; }

/* job detail header */
.job-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.job-head .meta .pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--field); font-size: 13.5px; }
.job-head .meta .pill b { font-weight: 600; }
.job-head .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }

/* résumé drop zone */
#upload-form.dropzone {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 14px 0 8px;
  padding: 30px 20px;
  border: 1.5px dashed var(--line);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-lg);
  background: var(--info-bg);
  text-align: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
#upload-form.dropzone:hover, #upload-form.dropzone:focus-within { border-color: var(--accent); background: var(--accent-soft); }
#upload-form.dropzone .drop-icon { width: 40px; height: 40px; color: var(--accent); }
#upload-form.dropzone .drop-title { margin: 0; font-weight: 650; }
#upload-form.dropzone label.check { margin: 0; }

/* ── responsive ───────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { position: static; order: -1; }
  .profile-card .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  header.top { flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; padding-bottom: 6px; }
  nav.primary { order: 3; flex-basis: 100%; }
  .mode-pill { margin-left: auto; }
  :root { --header-h: 96px; }
  .hero-bar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "what" "where" "go" "filters" "resume"; }
  .hero-resume { grid-template-columns: minmax(0, 1fr); }
  .hero-resume .or { display: none; }
  .hero-bar #search-area { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
  .hero-bar > form > button[type=submit] { min-height: 50px; margin: 6px 0 0; }
  .hero-filters label.inline-select { margin-left: 0; }
  td { min-width: 110px; }
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .profile-card .stats { grid-template-columns: 1fr; }
  .quickbar .small:last-child { margin-left: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: var(--glass-strong); }
}

/* inputs written inside their label sit on their own line, full width */
label > input:is([type=text], [type=email], [type=url], [type=password], [type=number], :not([type])), label > select, label > textarea {
  display: block; width: 100%; margin-top: 5px; }
.filters label > select, .hero-filters label > select { width: auto; }

/* Hero text and the search bar grow with the window, so the full-screen block stays balanced on large displays. */
.hero:not(.slim) .hero-title { font-size: clamp(30px, 4.6vw, 104px); }
.hero:not(.slim) .hero-sub { font-size: clamp(15px, 1.2vw, 24px); max-width: 60ch; }
.hero-field input, .hero-bar #place-input { font-size: clamp(16px, 1.1vw, 24px); min-height: clamp(38px, 2.6vw, 52px); }
.hero-field .field-label, .hero-bar .place-search > label { font-size: clamp(12px, 0.72vw, 15px); }
.hero-bar > form > button[type=submit] { font-size: clamp(16px, 1vw, 21px); padding: 0 clamp(24px, 2.2vw, 44px); }
.hero-hint { font-size: clamp(13px, 0.75vw, 15px); }
body { font-size: clamp(15px, 0.85vw, 18px); }
header.top { min-height: clamp(56px, 3.4vw, 72px); }
header.top .brand { font-size: clamp(16px, 0.95vw, 20px); }
header.top .brand svg { width: clamp(28px, 1.6vw, 34px); height: clamp(28px, 1.6vw, 34px); }
nav.primary a, nav.primary summary { font-size: clamp(13.5px, 0.78vw, 16px); }
.mode-pill { font-size: clamp(12px, 0.66vw, 14px); }

/* hero: one centred column, capped so the bar never stretches across an ultrawide screen */
.hero-inner { width: 100%; max-width: 1560px; margin: 0 auto; }
.hero-resume {
  grid-area: resume;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px clamp(12px, 1.2vw, 20px);
  margin-top: 6px;
  padding: clamp(10px, 0.9vw, 16px) clamp(12px, 1vw, 18px);
  border-top: 1px solid var(--line);
}
.hero-resume .or {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}
.hero-resume .resume-pitch { display: grid; gap: 2px; min-width: 0; }
.hero-resume .resume-pitch strong { font-size: clamp(14px, 0.85vw, 17px); font-weight: 650; }
.hero-resume .resume-pitch .muted { font-size: clamp(12.5px, 0.72vw, 14.5px); }
.hero-resume .resume-go { min-height: clamp(40px, 2.4vw, 48px); padding: 0 clamp(18px, 1.4vw, 28px); border-color: transparent; background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.hero-resume .resume-go:hover { background: var(--accent); color: var(--accent-ink); }
.hero-empty .hero-inner { max-width: 900px; }

/* home: the search, with the profile card beside it when there is one */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 400px); gap: var(--gap); align-items: stretch; }
.home-top > * { min-width: 0; }
.home-top .hero { height: 100%; margin: 0; }
.home-top .home-side { position: relative; z-index: 1; }
.home-top .profile-card { margin: 0; }
@media (max-width: 1080px) {
  .home-top { grid-template-columns: minmax(0, 1fr); }
  .home-top .home-side { order: 0; }
}
.home-top .home-side { top: auto; align-self: start; }
.results { margin-top: var(--gap); }

/* Applications: search within the stage tab, status picker, per-job history */
.tab-search { margin: 0 0 var(--gap); }
td form select[name=status] { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
details.history { margin: 0; }
details.history summary { font-size: 13px; }
details.history ol { margin: 8px 0 6px; padding: 0; list-style: none; font-size: 13px; }
details.history li { display: flex; gap: 10px; padding: 3px 0; }
details.history .when { min-width: 92px; color: var(--muted); font-variant-numeric: tabular-nums; }
.add-answer { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 var(--gap); margin-bottom: 12px; }
/* My information: ranked places to work */
.place-rank-list { margin: 0 0 6px; padding: 0; list-style: none; }
.place-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 0; }
.place-row input { margin: 0; }
.place-rank { text-align: center; font-variant-numeric: tabular-nums; }
.place-moves { display: flex; gap: 4px; }
.place-moves button { min-width: 36px; padding: 6px 8px; }
.place-add { position: relative; margin: 6px 0 4px; }
.place-add .combo { display: flex; gap: 8px; align-items: stretch; }
.place-add .combo input { flex: 1 1 14em; min-width: 0; margin: 0; }
.place-add [hidden] { display: none !important; }
.loc-list { list-style: none; margin: 6px 0; padding: 6px; max-height: 22em; overflow-y: auto; border: 1px solid var(--hairline);
            border-radius: var(--r-md); background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow-pop);
            -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.loc-list li { min-height: 44px; padding: 7px 12px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column;
               justify-content: center; overflow-wrap: anywhere; }
.loc-list li:hover { background: var(--field); }
.loc-list li[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--ring); }
.loc-list .place-label { font-weight: 550; }
.loc-list .place-meta { font-size: 0.82em; color: var(--muted); }

/* section tabs (Profile, Applications) */
.subtabs { display: flex; gap: 2px; margin: -6px 0 var(--gap); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs a { flex: none; margin-bottom: -1px; padding: 10px 16px; border-bottom: 2px solid transparent; color: var(--muted);
             font-size: clamp(14px, 0.85vw, 17px); font-weight: 560; text-decoration: none; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.subtabs a:hover { color: var(--ink); text-decoration: none; }
.subtabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }
.subtabs a { display: inline-flex; align-items: center; gap: 8px; }
.subtabs .count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--field); color: var(--muted); font-size: 12px;
                  font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.subtabs a[aria-current="page"] .count { background: var(--accent); color: var(--accent-ink); }
/* switching tabs: one underline slides from the tab you came from (discovery.js sets --ind-x/--ind-w),
   and the page below slides in from that side */
.subtabs { position: relative; }
.subtabs.js-ind a[aria-current="page"] { border-bottom-color: transparent; }
.subtabs.js-ind::after { content: ""; position: absolute; bottom: 0; left: 0; width: var(--ind-w, 0); height: 2px; border-radius: 2px;
                         background: var(--accent); transform: translateX(var(--ind-x, 0)); pointer-events: none; }
.subtabs.js-ind.ind-move::after { transition: transform 0.38s var(--ease), width 0.38s var(--ease); }
@keyframes slide-from-right { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes slide-from-left { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
main.slide-next > .subtabs ~ * { animation: slide-from-right 0.38s var(--ease) both; }
main.slide-prev > .subtabs ~ * { animation: slide-from-left 0.38s var(--ease) both; }

/* mode switch: Search only / Fill-only / Auto submit */
.mode-switch { position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 0 0 clamp(14px, 1.4vw, 24px);
               padding: 4px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--field); }
.mode-switch form { display: contents; }
.mode-switch .seg { min-height: 32px; margin: 0; padding: 5px 15px; border: 0; border-radius: 999px; background: transparent;
                    color: var(--muted); font-size: 13px; font-weight: 600; box-shadow: none; cursor: pointer; list-style: none;
                    display: inline-flex; align-items: center; }
.mode-switch .seg::-webkit-details-marker { display: none; }
.mode-switch .seg:hover { color: var(--ink); background: var(--field-hover); }
.mode-switch .seg[aria-pressed="true"] { background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow); cursor: default; }
.seg-confirm { margin: 0; }
.seg-confirm[open] > .seg { color: var(--accent); }
.seg-pop { position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: min(360px, calc(100vw - 48px)); padding: 14px 16px;
           border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--pop-bg); box-shadow: var(--shadow-pop); }
.seg-pop p { margin: 0 0 8px; }

[hidden] { display: none !important; }

/* job list: work through the ticked jobs one at a time */
.queue-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; padding: 10px 14px;
             border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--accent-soft); }
.queue-bar label.check { margin: 0; }
.seg-pop .terms { max-height: 11em; overflow-y: auto; padding: 8px 10px; border-radius: 10px; background: var(--field); }
.seg-confirm:not([open]) .seg-pop { display: none; }
.queue-bar button { white-space: normal; text-align: left; }
.profile-card .who .status { margin-top: 10px; }
.profile-card .who .status .badge { margin: 0; }
.profile-card .stats { margin-top: 4px; }

/* history opens inside the job cell, so it grows the row downwards and never widens the table */
details.history { margin-top: 8px; }
details.history ol { max-width: 34em; }
details.history .when { flex: none; }

/* profile card: fills the height of the search block beside it instead of hanging from the top */
.home-top .home-side { display: flex; align-self: stretch; }
.home-top .profile-card { display: flex; flex: 1; flex-direction: column; }
.home-top .profile-card .links { margin-top: auto; }
.home-top .profile-card .stats { flex: 1; grid-auto-rows: 1fr; margin-top: 0; }
.home-top .profile-card .stat { display: grid; align-content: center; }
.home-top .profile-card .links { margin-top: 0; }
/* a lone action button at the end of a table row sits at the right edge, centred on the row */
td:last-child:has(> form.inline:only-child) { text-align: right; vertical-align: middle; }

/* My information: question and answer share the width; the sensitive note sits under the question; Delete stays compact */
.answers-table th:nth-child(1) { width: 46%; }
.answers-table th:nth-child(2) { width: 44%; }
.answers-table td { vertical-align: middle; padding-top: 13px; padding-bottom: 13px; }
.answers-table td:first-child { padding-right: 24px; }
.answers-table td:nth-child(2) { padding-right: 24px; overflow-wrap: anywhere; }
.answers-table td:last-child { width: 1%; white-space: nowrap; }
td .tag-sensitive { display: block; margin-top: 3px; font-size: 11.5px; letter-spacing: 0.02em; }

/* Edit a saved answer: a small button under the answer opens the field in place */
.edit-answer { margin-top: 8px; }
.edit-answer > summary { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 12px; border: 1px solid var(--hairline);
                         border-radius: 999px; background: var(--field); color: var(--ink); font-size: 12.5px; font-weight: 600;
                         list-style: none; cursor: pointer; }
.edit-answer > summary::-webkit-details-marker { display: none; }
.edit-answer > summary:hover { background: var(--field-hover); }
.edit-answer[open] > summary { background: var(--accent-soft); }
.edit-answer form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.edit-answer form input[type=text], .edit-answer form select { flex: 1 1 14em; min-width: 0; margin: 0; }

/* Applications: record what happened, inside the uncertain-submission rows */
details.record-outcome { margin: 0; }
details.record-outcome > summary { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 13px; border: 1px solid var(--hairline);
  border-radius: 999px; background: var(--field); color: var(--ink); font-size: 12.5px; font-weight: 600; list-style: none; cursor: pointer; }
details.record-outcome > summary::-webkit-details-marker { display: none; }
details.record-outcome > summary:hover { background: var(--field-hover); }
details.record-outcome form { display: grid; gap: 8px; min-width: 18em; margin-top: 10px; }
details.record-outcome form select, details.record-outcome form input[type=text] { width: 100%; margin: 0; }

/* Blanket is the Home button: it looks like the other nav pills and is lit on the home page */
header.top .brand { padding: 6px 12px 6px 8px; margin-left: -8px; border-radius: 999px; transition: background-color 0.2s var(--ease); }
header.top .brand:hover { background: var(--field); text-decoration: none; }
header.top .brand[aria-current="page"] { background: var(--accent-soft); }
/* the home page title is the hero itself; keep the heading for screen readers only */
body[data-page="home"] .page-head { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the profile card's name opens Profile */
.profile-card .who h2 a { color: inherit; text-decoration: none; }
.profile-card .who h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* naming a resume */
label.resume-name { display: block; width: 100%; max-width: 26em; margin-top: 10px; text-align: left; }
#upload-form.dropzone label.resume-name { margin: 0; }
td .edit-answer form { min-width: 15em; }
/* the resume picker under "Let your resume do the searching" */
.hero-resume .resume-pick { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; }
.hero-resume .resume-pick span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.hero-resume .resume-pick select { min-height: 34px; max-width: min(100%, 26em); padding-top: 5px; padding-bottom: 5px; font-size: 13px; }

/* Profile: Select and Archive sit together at the end of a resume row */
.resume-actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px; }
.resume-actions form { margin: 0; }
/* archived resumes: a quiet list under the table, each with Restore */
details.archived-resumes { margin-top: 14px; }
details.archived-resumes > summary { display: inline-flex; align-items: center; gap: 8px; }
details.archived-resumes .count { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #ccd0cf; color: #06141b;
  font-size: 12px; font-weight: 700; text-align: center; }

/* search status under the hero: a bar only while searching, "Search completed" briefly, nothing otherwise */
.search-progress { display: flex; align-items: center; gap: 14px; margin: 10px 4px 0; padding: 9px 18px; border: 1px solid var(--hairline);
  border-radius: 999px; background: var(--info-bg); color: var(--ink); font-size: 13.5px; transition: opacity 0.4s var(--ease); }
.search-progress[hidden] { display: none; }
.search-progress .sp-label { flex: none; font-weight: 600; }
.search-progress progress { flex: 1; min-width: 80px; height: 6px; border: 0; border-radius: 999px; background: var(--field);
  -webkit-appearance: none; appearance: none; overflow: hidden; }
.search-progress progress::-webkit-progress-bar { background: var(--field); border-radius: 999px; }
.search-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width 0.6s var(--ease); }
.search-progress progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.search-progress.done { border-color: transparent; background: var(--ok-bg); color: var(--ok); }
.search-progress.problem { border-color: transparent; background: var(--warn-bg); }
.search-progress.leaving { opacity: 0; }
/* one line each, cut with an ellipsis rather than wrapping */
.latest-search, .scope-note { max-width: none; margin: 10px 4px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scope-note { margin-top: 6px; }

/* footer on every page, and the About / Terms / Privacy / Licences pages */
.site-footer { margin: 8px var(--inset) 0; padding: 22px 0 28px; border-top: 1px solid var(--line); }
.site-footer .foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.site-footer .foot-brand { font: 700 15px/1 var(--font-display); color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--muted); font-size: 13.5px; font-weight: 560; text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer p { margin: 10px 0 0; }
.prose { max-width: 98ch; }
.prose .lede { margin: 0 0 8px; color: var(--ink); font-size: 1.06em; }
.prose h2 { margin: 26px 0 8px; font-size: 1.12em; }
.prose p, .prose li { max-width: none; }
.prose ul { margin: 8px 0; padding-left: 1.2em; }
.prose li { margin: 7px 0; }
.prose .table-wrap { margin: 12px 0; }
.prose td, .prose th { padding: 10px 12px; }

/* menu on the right: Blanket stays at the left, the page links sit at the top right */
header.top nav.primary { flex: 0 1 auto; margin-left: auto; justify-content: flex-end; }
@media (max-width: 860px) { header.top nav.primary { margin-left: 0; justify-content: flex-end; } }
/* the Jobs found tile scrolls to the list: smoothly, and stopping below the sticky header */
html { scroll-behavior: smooth; }
section.results { scroll-margin-top: calc(var(--header-h) + 12px); }

table { font-variant-numeric: tabular-nums; }

/* Settings and Profile are stacks of narrow cards: two across on a wide screen so nothing is left empty beside them.
   Cards with a table, and everything that is not a card (title, tabs, notices), take the full row. */
body[data-page="cards"] main, body[data-page="pairs"] main { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(560px, 48%), 1fr)); gap: var(--gap); align-items: start; }
body[data-page="cards"] main > *, body[data-page="pairs"] main > * { min-width: 0; margin: 0; }
body[data-page="cards"] main > :not(section.card), body[data-page="pairs"] main > :not(section.card),
body[data-page="cards"] main > section.card:has(.table-wrap) { grid-column: 1 / -1; }
/* two cards side by side are the same height */
body[data-page="cards"] main > section.card { align-self: stretch; }
/* a narrow card with no partner (full-width blocks on both sides) takes the whole row instead of leaving half of it empty;
   its fields keep a readable width */
body[data-page="cards"] main > :is(:not(section.card), section.card:has(.table-wrap)) + section.card:not(:has(.table-wrap)):is(:last-child, :has(+ :not(section.card)), :has(+ section.card .table-wrap)) { grid-column: 1 / -1; }
body[data-page="cards"] main > :is(:not(section.card), section.card:has(.table-wrap)) + section.card:not(:has(.table-wrap)):is(:last-child, :has(+ :not(section.card)), :has(+ section.card .table-wrap)) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { max-width: 36rem; }
/* the scrollbar's room is always kept, so switching between a short and a long tab does not shift the page sideways */
html { scrollbar-gutter: stable; }

/* a page named by its tabs (Resume, My information, Job sources, Passwords) or by the hero does not repeat its title */
.page-head.vh { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* moving between pages: the browser keeps the current page on screen until the next one is drawn, then swaps it in
   place, so there is no blank "loading" frame; the tab slide (discovery.js) plays on the new page */
@view-transition { navigation: auto; }
/* no animation of its own (the group's default size/position tween too): the swap takes one frame, so the new page
   is clickable at once instead of the transition overlay swallowing clicks for a quarter second */
::view-transition-group(*), ::view-transition-image-pair(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
/* Job sources: "Checking your sign-in…" under a board's Sign in button while the page re-checks it */
.signin-watch { display: block; margin-top: 6px; }
.signin-watch:empty { display: none; }
/* Profile → Resume: one box that takes a file, or (switched by the link inside it) pasted text */
.resume-add .way { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.resume-add .way-text-panel { display: none; }
#way-text:checked ~ .way-file-panel { display: none; }
#way-text:checked ~ .way-text-panel { display: grid; }
.resume-add .way-text-panel {
  justify-items: center; gap: 12px; margin: 14px 0 8px; padding: 30px 20px;
  border: 1.5px dashed var(--line); border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-lg); background: var(--info-bg); text-align: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.resume-add .way-text-panel:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.resume-add .way-text-panel form { display: grid; justify-items: center; gap: 12px; width: 100%; margin: 0; }
.resume-add .way-text-panel .drop-title { margin: 0; font-weight: 650; }
body[data-page="cards"] main > section.card.resume-add textarea { width: 100%; max-width: 48rem; margin: 0; text-align: left; }
.resume-add .way-switch { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
.resume-add .way-switch:hover { color: var(--ink); }
.resume-add .way:focus-visible ~ .way-panel .way-switch { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Signed-in account chip in the header (htmlkit.render_page) */
header.top .who { margin-left: auto; display: flex; flex: none; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
header.top .who a { color: var(--ink); text-decoration: none; font-weight: 600; }
header.top .who form.inline { display: inline; margin: 0; }
header.top .who button { font-size: 12px; padding: 4px 9px; }
