/* RoleRadar UI (search-api.md §14). Hand-written; no build step, no web fonts.
   Every colour, spacing, radius, shadow and font is a custom property on :root.
   Themes (Amendment 2026-11-15): dark is the primary design and the :root
   default, so it is also the fallback with no preference or no media-query
   support. :root[data-theme="light"] holds the light colours. The inline
   <head> script in base.html sets data-theme (stored choice, else the OS
   setting) before first paint; with no JS the same light block applies under
   prefers-color-scheme: light, and that is the one duplication.
   Tokens and components follow the approved mockup in docs/design/mockup/
   (rr.css, Amendment 2026-11-16 redesign): the sand second accent, the
   --fs-* type scale, and the shared component styles. */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #0b1b20;
  --color-bg-deep: #08151a;
  --color-surface: #102a31;
  --color-surface-raised: #15343e;
  --color-text: #eaf4f4;
  --color-text-muted: #9db8bc;
  --color-accent: #7fd6d0;
  --color-accent-strong: #a6e6e1;
  --color-accent-soft: #1b4a52;
  --color-accent-contrast: #0b1b20;
  --color-highlight: #ff8a3d;
  --color-sand: #e6cfa4;
  --color-sand-soft: rgb(230 207 164 / 0.12);
  --color-border: #6f9097;
  --color-divider: #21424a;
  --color-error: #ff918a;
  --color-ok: #32d583;
  --color-warn: #fdb022;
  --color-info: #6dbcff;
  --color-violet: #c4a5fa;
  --color-neutral: #9db8bc;
  --color-mark-ring: #7fd6d0;
  --color-mark-wedge: #1b4a52;
  --color-mark-highlight: #ff8a3d;

  /* Avatar: the hue comes from the name; saturation and lightness from the
     theme so the initial stays readable (>= 4.5:1 at every hue). */
  --avatar-saturation: 45%;
  --avatar-lightness: 72%;
  --color-avatar-text: #0b1b20;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 14px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.5);
  --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --fs-display: 60px;
  --fs-h2: 32px;
  --fs-h3: 20px;
  --fs-lead: 18px;
  --fs-body: 15px;
  --fs-small: 14px;
  --fs-caption: 12px;
}

:root[data-theme="light"] {
  color-scheme: light;

  --color-bg: #f6f9f9;
  --color-bg-deep: #edf3f3;
  --color-surface: #ffffff;
  --color-surface-raised: #eef4f4;
  --color-text: #12262b;
  --color-text-muted: #3f565c;
  --color-accent: #0e4f5c;
  --color-accent-strong: #0a3c46;
  --color-accent-soft: #e2f0f0;
  --color-accent-contrast: #ffffff;
  --color-highlight: #e8590c;
  --color-sand: #7f5a1f;
  --color-sand-soft: rgb(176 128 52 / 0.12);
  --color-border: #6b8288;
  --color-divider: #d6e2e4;
  --color-error: #b42318;
  --color-ok: #05603a;
  --color-warn: #93370d;
  --color-info: #0b64a0;
  --color-violet: #6941c6;
  --color-neutral: #475467;
  --color-mark-ring: #0e4f5c;
  --color-mark-wedge: #e2f0f0;
  --color-mark-highlight: #e8590c;

  --avatar-saturation: 48%;
  --avatar-lightness: 30%;
  --color-avatar-text: #ffffff;

  --shadow-sm: 0 1px 2px rgb(18 38 43 / 0.06);
  --shadow-md: 0 4px 14px rgb(18 38 43 / 0.08);
  --shadow-lg: 0 12px 32px rgb(18 38 43 / 0.12);
  --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);
}

/* No-JS fallback: keep in step with the light block above (colours only). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;

    --color-bg: #f6f9f9;
    --color-bg-deep: #edf3f3;
    --color-surface: #ffffff;
    --color-surface-raised: #eef4f4;
    --color-text: #12262b;
    --color-text-muted: #3f565c;
    --color-accent: #0e4f5c;
    --color-accent-strong: #0a3c46;
    --color-accent-soft: #e2f0f0;
    --color-accent-contrast: #ffffff;
    --color-highlight: #e8590c;
    --color-sand: #7f5a1f;
    --color-sand-soft: rgb(176 128 52 / 0.12);
    --color-border: #6b8288;
    --color-divider: #d6e2e4;
    --color-error: #b42318;
    --color-ok: #05603a;
    --color-warn: #93370d;
    --color-info: #0b64a0;
    --color-violet: #6941c6;
    --color-neutral: #475467;
    --color-mark-ring: #0e4f5c;
    --color-mark-wedge: #e2f0f0;
    --color-mark-highlight: #e8590c;
    --avatar-saturation: 48%;
    --avatar-lightness: 30%;
    --color-avatar-text: #ffffff;
    --shadow-sm: 0 1px 2px rgb(18 38 43 / 0.06);
    --shadow-md: 0 4px 14px rgb(18 38 43 / 0.08);
    --shadow-lg: 0 12px 32px rgb(18 38 43 / 0.12);
    --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);
  }
}

* {
  box-sizing: border-box;
}

html {
  /* The full-bleed hero radar bleeds off the right edge; clip (not hidden)
     so no scrollbar and no new scroll container. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.wrap {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Text and links */

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

/* Default page heading (ops pages); pages with their own heading styles
   (hero, results total, job title) override it. */

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

code {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.eyebrow {
  display: block;
  font: 600 var(--fs-caption) / 1 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-sand);
}

/* Layout shell */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}

.site-header__row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 64px;
}

.site-header__spacer {
  flex: 1;
}

/* Theme toggle: needs JS, so it only shows once the head script has run.
   The icon is the current theme (moon in dark, sun in light); the button
   itself carries aria-pressed (pressed = dark). */

.theme-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.js .theme-toggle {
  display: inline-grid;
  place-items: center;
}

.theme-toggle:hover {
  background: var(--color-accent-soft);
}

.theme-toggle:focus-visible {
  box-shadow: var(--focus-ring);
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle__sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle__moon {
  display: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-text);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--color-text);
  text-decoration: none;
}

.wordmark__light {
  font-weight: 400;
}

.wordmark__bold {
  font-weight: 700;
}

@media (max-width: 40rem) {
  .wordmark {
    font-size: 1.25rem;
  }

  .wordmark .logo-mark {
    width: 28px;
    height: 28px;
  }
}

/* Logo mark: coloured by the --color-mark-* tokens */

.mark-wedge {
  fill: var(--color-mark-wedge);
}

.mark-stroke {
  fill: none;
  stroke: var(--color-mark-ring);
}

.mark-fill {
  fill: var(--color-mark-ring);
}

.mark-highlight {
  fill: var(--color-mark-highlight);
}

.site-main {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  flex: 1;
}

/* The home page opts out of the constrained column: its sections manage
   their own .wrap and full-bleed backgrounds. The jobs and job pages do
   the same, so their content lines up with the header. */

.site-main--home,
.site-main--wide {
  max-width: none;
  padding: 0;
}

.site-footer {
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg-deep);
}

.site-footer__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.site-footer__brand {
  font-size: 1.0625rem;
}

.site-footer__spacer {
  flex: 1;
}

.status-link {
  color: var(--color-accent);
  font-weight: 500;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 var(--fs-small) / 1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.btn--primary:hover {
  filter: brightness(1.08);
  color: var(--color-accent-contrast);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
}

.btn--ghost:hover {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.btn--lg {
  height: 52px;
  padding: 0 var(--space-5);
  font-size: var(--fs-body);
  border-radius: var(--radius-md);
}

.btn--block {
  width: 100%;
}

.ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Inputs. The bare element rules keep the not-yet-redesigned search/ops
   forms working; the component classes below are the mockup's. */

label {
  display: block;
  margin: var(--space-3) 0 var(--space-1);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

button {
  font: inherit;
  cursor: pointer;
}

input,
select {
  font: inherit;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
}

.label {
  display: block;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.input input,
.input select {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: var(--fs-small);
  outline: none;
  height: 100%;
}

.input input::placeholder {
  color: var(--color-text-muted);
}

/* One focus ring per field: the wrapper (.input, .searchbar) shows it, so the
   inner control drops the global :focus-visible ring instead of drawing a
   second box inside the first. */
.input input:focus-visible,
.input select:focus-visible,
.searchbar input:focus-visible {
  box-shadow: none;
}

.input:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.searchbar:focus-within {
  border-color: var(--color-accent);
  box-shadow:
    0 0 0 3px var(--color-accent-soft),
    var(--shadow-md);
}

.jobs-topbar .searchbar:focus-within {
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

/* Searchbar: the hero and CTA search box (segments + submit) */

.searchbar {
  display: flex;
  align-items: stretch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  gap: 6px;
}

.searchbar .seg {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  flex: 1;
  min-width: 0;
}

.searchbar .seg + .seg {
  border-left: 1px solid var(--color-divider);
}

.searchbar .seg--keyword {
  flex: 1.6;
}

.searchbar label {
  margin: 0;
}

.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: var(--fs-body);
  outline: none;
  height: 40px;
  padding: 0;
}

.searchbar input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.searchbar--lg input {
  height: 40px;
  font-size: 17px;
}

.searchbar .btn {
  align-self: center;
}

.searchbar--lg .btn {
  height: 52px;
}

/* Chips, segmented control, badges */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  color: var(--color-text);
  font: 500 13px / 1 var(--font-sans);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--color-border);
  text-decoration: none;
  color: var(--color-text);
}

.chip[aria-pressed="true"] {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.chip[aria-pressed="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.chip--remove {
  background: var(--color-accent-soft);
  border-color: transparent;
  padding-right: 6px;
}

.chip--remove .x {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--color-text-muted);
}

.chip--remove .x:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.seg-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.seg-control button {
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  font: 500 13px / 1 var(--font-sans);
  cursor: pointer;
}

.seg-control button:hover {
  color: var(--color-text);
}

.seg-control button[aria-pressed="true"] {
  background: var(--color-surface-raised);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
  font: 500 var(--fs-caption) / 1 var(--font-sans);
  white-space: nowrap;
}

.badge--accent {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.badge--accent::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 var(--fs-caption) / 1 var(--font-sans);
  color: var(--color-text);
}

.new::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-highlight);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-highlight) 25%, transparent);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  color: var(--color-avatar-text);
  font: 700 1rem / 1 var(--font-sans);
  flex: none;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 14px;
  border-radius: 8px;
}

.avatar--lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
  border-radius: 14px;
}

.avatar--empty {
  background: var(--color-divider);
  color: var(--color-text-muted);
}

/* Cards and job cards */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 1023.98px) {
  .grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .grid3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact card: four rows of three fit one desktop screen on /jobs with the
   pager and footer (company, 2-line title, badges + location, salary/Apply). */
.job-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 14px;
  height: 100%;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border);
}

.job-card__co {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.job-card .avatar {
  width: 26px;
  height: 26px;
  font-size: 13px;
  border-radius: 7px;
}

.job-card__cohead {
  min-width: 0;
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.job-card__coname {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card__posted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.job-card__title {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.job-card__title a {
  color: inherit;
}

.job-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.job-card__title a:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.job-card__where {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.job-card__where .badge {
  flex: none;
  height: 20px;
}

.job-card__loc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin: 0;
}

.job-card__loc .ico {
  width: 14px;
  height: 14px;
}

.job-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: 7px;
  border-top: 1px solid var(--color-divider);
}

.salary--none {
  font-weight: 400;
  color: var(--color-text-muted);
}

.salary {
  font: 600 var(--fs-small) / 1.2 var(--font-sans);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apply-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font: 600 13px / 1 var(--font-sans);
  color: var(--color-accent);
  padding: 8px 10px;
  margin: -8px -10px;
  border-radius: var(--radius-sm);
}

.apply-link:hover {
  background: var(--color-accent-soft);
  text-decoration: none;
}

/* Status pills: ops pages (coverage, health, sources, run history).
   Tinted background, a dot in the status colour and the word. */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.pill--success,
.pill--covered,
.pill--active,
.pill--ready {
  background: color-mix(in srgb, var(--color-ok) 15%, transparent);
  color: var(--color-ok);
}

.pill--failure,
.pill--failing,
.pill--error {
  background: color-mix(in srgb, var(--color-error) 15%, transparent);
  color: var(--color-error);
}

.pill--partial,
.pill--access-blocked {
  background: color-mix(in srgb, var(--color-warn) 18%, transparent);
  color: var(--color-warn);
}

.pill--running,
.pill--no-live-tenant {
  background: color-mix(in srgb, var(--color-info) 15%, transparent);
  color: var(--color-info);
}

.pill--impossible {
  background: color-mix(in srgb, var(--color-violet) 15%, transparent);
  color: var(--color-violet);
}

.pill--unseeded,
.pill--inactive,
.pill--not-ready {
  background: color-mix(in srgb, var(--color-neutral) 16%, transparent);
  color: var(--color-neutral);
}

.pill--in-progress {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Ops pages (coverage, health, sources, run history): dense data tables
   in a scroll wrapper, sticky header, right-aligned tabular numbers. */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  margin-bottom: var(--space-6);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.display-name {
  font-weight: 600;
}

.cell-platform .platform,
.platform-type {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--fs-caption);
}

.handoff-note {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--fs-caption);
  white-space: normal;
}

td .run {
  display: block;
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.last-error,
.error {
  color: var(--color-error);
}

.cell-url .url {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  overflow-wrap: anywhere;
}

/* Pager */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: var(--space-5) 0;
  flex-wrap: wrap;
}

.pager a,
.pager span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font: 500 var(--fs-small) / 1 var(--font-sans);
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.pager a:hover {
  background: var(--color-accent-soft);
  text-decoration: none;
  color: var(--color-text);
}

.pager .is-current {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: var(--color-accent);
  font-weight: 700;
}

.pager .gap {
  border: 0;
  background: none;
  color: var(--color-text-muted);
  min-width: 20px;
}

.pager__page {
  color: var(--color-text-muted);
}

.pager span[aria-disabled="true"] {
  opacity: 0.45;
}

/* The compact page controls in the results header row. */

.pg-mini {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-mini__arrow {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  color: var(--color-text);
}

a.pg-mini__arrow:hover {
  background: var(--color-accent-soft);
  text-decoration: none;
}

span.pg-mini__arrow {
  opacity: 0.4;
}

/* Skeleton loading cards */

@keyframes rr-shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.skel {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--color-surface-raised) 0,
    color-mix(in srgb, var(--color-surface-raised) 60%, var(--color-divider)) 50%,
    var(--color-surface-raised) 100%
  );
  background-size: 800px 100%;
  animation: rr-shimmer 1.4s linear infinite;
}

/* Home hero (search-api.md §14, Amendment 2026-11-16 redesign): two columns,
   copy left and the radar right. The radar is decorative SVG; only transform
   and opacity animate. */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-divider);
  background: radial-gradient(
    900px 520px at 78% 40%,
    var(--color-accent-soft),
    transparent 70%
  );
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.hero__title {
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 750;
  color: var(--color-text);
}

.hero__title-accent {
  color: var(--color-accent);
}

.hero__blurb {
  font-size: 19px;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 34rem;
}

.hero__search {
  max-width: 620px;
}

.hero__popular {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero__popular-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-right: var(--space-1);
}

/* The radar artwork: 640px square, bleeding slightly off the right edge
   (html clips the overflow). Blips are dim; each lights orange with a ping
   and a job chip exactly when the rotating sweep reaches it. The timing rule:
   a blip at screen angle a (degrees clockwise from east) gets
   animation-delay a/360 * 12s; the chip shows for about 60% of the turn. */

.radar-art {
  position: relative;
  width: 640px;
  aspect-ratio: 1;
  justify-self: end;
  margin-right: -48px;
}

.radar-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.radar-art .rings circle,
.radar-art .rings line {
  fill: none;
  stroke: color-mix(in srgb, var(--color-accent) 22%, transparent);
  stroke-width: 1.5;
}

.radar-art .sweep {
  transform-origin: 50% 50%;
  animation: radar-sweep 12s linear infinite;
}

.radar-art .blip {
  fill: color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.radar-art .blip--hit {
  fill: var(--color-highlight);
}

.radar-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  white-space: nowrap;
}

.radar-chip b {
  display: block;
  font-weight: 600;
  color: var(--color-text);
}

.radar-chip small {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
}

.rd-hit,
.rd-chip {
  opacity: 0;
  animation: rd-found 12s linear infinite both;
  animation-delay: var(--t);
}

.rd-chip {
  margin-top: -24px;
  animation-name: rd-chip;
}

.rd-ping {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: rd-ping 12s ease-out infinite both;
  animation-delay: var(--t);
}

@keyframes radar-sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rd-found {
  0% {
    opacity: 0;
  }

  1.5% {
    opacity: 1;
  }

  62% {
    opacity: 1;
  }

  78% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes rd-chip {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }

  3% {
    opacity: 1;
    transform: none;
  }

  62% {
    opacity: 1;
    transform: none;
  }

  78% {
    opacity: 0;
    transform: none;
  }

  100% {
    opacity: 0;
  }
}

/* Invisible during the delay: the 0% frame is opacity 0 and fill-mode both
   applies it while waiting, so a ping only shows once the sweep reaches it. */

@keyframes rd-ping {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  0.5% {
    opacity: 0.9;
    transform: scale(0.5);
  }

  14% {
    opacity: 0;
    transform: scale(3);
  }

  100% {
    opacity: 0;
    transform: scale(3);
  }
}

/* Platform strip */

.platform-strip {
  background: var(--color-bg-deep);
  border-bottom: 1px solid var(--color-divider);
}

.platform-strip__row {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-top: 28px;
  padding-bottom: 28px;
  flex-wrap: wrap;
}

.platform-strip__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.platform-strip__list {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  color: var(--color-text-muted);
}

.platform-strip__list li {
  opacity: 0.85;
}

.platform-strip__list a {
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
}

/* Monochrome text wordmarks until the real logo SVGs land. */

.platform--workday {
  font: 600 22px / 1 var(--font-sans);
  letter-spacing: -0.02em;
}

.platform--greenhouse {
  font: 500 22px / 1 var(--font-sans);
  letter-spacing: -0.01em;
}

.platform--lever {
  font: 700 17px / 1 var(--font-sans);
  letter-spacing: 0.32em;
}

.platform--personio {
  font: 700 24px / 1 var(--font-sans);
  letter-spacing: -0.03em;
}

.platform--ashby {
  font: 700 23px / 1 Georgia, serif;
}

.platform--recruitee {
  font: 600 20px / 1 var(--font-sans);
}

/* Live numbers */

.home-stats {
  padding: var(--space-9) 0 0;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.stat-tiles__tile {
  padding: 28px;
  border-right: 1px solid var(--color-divider);
}

.stat-tiles__tile:last-child {
  border-right: 0;
}

.stat-tiles__value {
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-tiles__label {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin-top: var(--space-1);
}

/* How it works */

.how {
  padding: var(--space-9) 0;
}

.how .wrap {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.how__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 40rem;
}

.how__title {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.how__blurb {
  color: var(--color-text-muted);
  font-size: 17px;
}

.how__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.how__step {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.how__step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.how__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-sand-soft);
  color: var(--color-sand);
}

.how__number {
  font: 700 13px / 1 var(--font-mono);
  color: var(--color-sand);
}

.how__step-title {
  font-size: 19px;
  font-weight: 650;
}

.how__step-copy {
  color: var(--color-text-muted);
  font-size: var(--fs-body);
}

/* Recently found */

.recent {
  padding: 0 0 var(--space-9);
}

.recent .wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.recent__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
}

.recent__heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent__title {
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.recent__more {
  font-weight: 600;
  font-size: var(--fs-small);
}

.recent .grid3 {
  gap: var(--space-4);
}

/* Final call to action */

.cta {
  padding: 0 0 var(--space-9);
}

.cta__band {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--color-divider);
  background:
    radial-gradient(600px 300px at 90% 0%, var(--color-accent-soft), transparent 70%),
    var(--color-surface);
  padding: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

.cta__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cta__title {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.cta__line {
  color: var(--color-text-muted);
  font-size: 16px;
}

/* Search page (docs/design/mockup/Jobs.dc.html + Mobile.dc.html): the
   search form is a page top bar; the filters card is sticky on desktop and
   a full-screen drawer on phones; results are a card grid under a header
   row with the total, active-filter chips and compact page arrows. The
   form is display: contents so its controls can be laid out in both
   regions while htmx still submits them together. */

.search-layout,
.search-form {
  display: contents;
}

.jobs-topbar {
  background: var(--color-bg-deep);
  border-bottom: 1px solid var(--color-divider);
}

.jobs-topbar__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.jobs-topbar .searchbar {
  flex: 1;
  max-width: 680px;
  box-shadow: none;
  padding: 3px;
}

.jobs-topbar .searchbar input {
  height: 36px;
  font-size: var(--fs-small);
}

.badge--count {
  height: 20px;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font-weight: 700;
}

.filters-button {
  display: none;
  margin: 0;
  flex: none;
}

/* The checkbox that opens the drawer: functional but invisible; focus is
   shown on the drawer itself. */

.filters-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.filters-backdrop {
  display: none;
  border-radius: 0;
}

.search-body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

/* Filters: card on desktop, full-screen drawer on phones (the checkbox
   toggle below works before htmx loads and without JS). */

.filters-drawer {
  flex: 0 0 16rem;
  position: sticky;
  top: 5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-divider);
}

.filters-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filters-head__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filters-clear {
  font-size: 13px;
  font-weight: 600;
}

.filters-close {
  display: none;
  color: var(--color-text);
  cursor: pointer;
}

.filters-close:hover {
  color: var(--color-accent);
}

.filters-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
}

.filters-body fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.filters-body legend {
  padding: 0;
}

.filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filters-foot {
  display: none;
}

/* Real radios and checkboxes, visually hidden inside their styled labels;
   :has() mirrors the mockup's aria-pressed state and stays keyboard
   accessible. */

.seg-control label {
  position: relative;
  display: grid;
  place-items: center;
  height: 32px;
  margin: 0;
  padding: 0 4px;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  font: 500 13px / 1 var(--font-sans);
  cursor: pointer;
  text-align: center;
}

.seg-control label:hover {
  color: var(--color-text);
}

.seg-control input,
.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.seg-control label:has(input:checked) {
  background: var(--color-surface-raised);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.seg-control label:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
  z-index: 1;
}

.seg-control--wrap {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label.chip {
  margin: 0;
}

.chip:has(input:checked) {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.chip:has(input:checked)::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.chip:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

/* One combined control: the number and the period read as a single input. */

.salary-input input {
  flex: 3 1 0;
  min-width: 0;
}

.salary-input select {
  flex: 2 1 0;
  min-width: 0;
  width: auto;
  border: 0;
  border-left: 1px solid var(--color-divider);
  border-radius: 0;
  padding: 0 0 0 8px;
  height: 100%;
}

/* Results region: header row, card grid, skeleton, states */

#results {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#job-list {
  gap: 10px;
}

#results .pager {
  margin: 0;
}

#results .pager a,
#results .pager span {
  height: 36px;
  min-width: 36px;
}

/* The search and job pages keep the footer to one slim line. */
.site-main--wide ~ .site-footer .site-footer__row {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

/* The search page is a little wider than the others on big screens; the
   header, search band and footer follow so everything stays aligned. */
body:has(> .site-main--search) .wrap {
  max-width: 90rem;
}

/* Desktop app shell. On a desktop-sized window /jobs is exactly the window
   high: header, search band, results and footer stack, the results take the
   rest and the 4x3 grid shares that height, so the cards grow to fill the
   screen and the footer is always on it. 1024px is where the grid is three
   columns; 800px is the least height that still gives a card the compact
   look (four rows of ~120px+). Below either, the page flows and scrolls as
   usual. */
@media (min-width: 1024px) and (min-height: 800px) {
  body:has(> .site-main--search) {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .site-main--search {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .site-main--search .jobs-topbar {
    flex: none;
  }

  .site-main--search .search-body {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    align-items: stretch;
    padding-top: clamp(10px, 1.6vh, 20px);
    padding-bottom: clamp(10px, 1.6vh, 20px);
  }

  /* Filters: as tall as their content, scrolling inside when the window is
     too short; never the page. */
  .site-main--search .filters-drawer {
    position: static;
    align-self: flex-start;
    max-height: 100%;
    overflow-y: auto;
  }

  .site-main--search #results {
    min-height: 0;
    gap: clamp(8px, 1.4vh, 16px);
  }

  .site-main--search #results.is-loading {
    min-height: 0;
  }

  /* A full page (more than nine cards = four rows) shares the height among
     four equal rows; the cells are size containers, so the cards read their
     cell and scale with it. Fewer results keep natural rows at the top. */
  .site-main--search #job-list:has(> li:nth-child(10)) {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 1.4vh, 16px);
  }

  .site-main--search #job-list:has(> li:nth-child(10)) > li {
    min-height: 0;
    container-type: size;
  }

  .site-main--search #job-list:not(:has(> li:nth-child(10))) {
    align-content: start;
  }

  /* Cards by cell height. The base .job-card rules are the compact look
     (cells of about 140px to 160px); a cell without a container (fewer
     results) stays compact too. */
  @container (max-height: 139.98px) {
    .job-card {
      padding: 6px 12px;
      gap: 4px;
    }

    .job-card__title {
      -webkit-line-clamp: 1;
      min-height: 0;
    }
  }

  @container (min-height: 160px) {
    .job-card {
      padding: 12px 16px;
      gap: 7px;
    }

    .job-card .avatar {
      width: 32px;
      height: 32px;
      font-size: 14px;
      border-radius: 8px;
    }

    .job-card__title {
      font-size: 15px;
      line-height: 1.3;
      min-height: 2.6em;
    }

    .job-card__where .badge {
      height: 22px;
    }

    .job-card__foot {
      padding-top: 9px;
    }
  }

  @container (min-height: 200px) {
    .job-card {
      padding: 16px 18px;
      gap: 10px;
    }

    .job-card .avatar {
      width: 36px;
      height: 36px;
      font-size: 15px;
      border-radius: 9px;
    }

    .job-card__title {
      font-size: 16px;
    }

    .job-card__loc {
      font-size: 13.5px;
    }

    .job-card__foot {
      padding-top: 12px;
    }
  }

  @container (min-height: 250px) {
    .job-card {
      padding: 20px 22px;
      gap: 12px;
    }

    .job-card .avatar {
      width: 40px;
      height: 40px;
      font-size: 16px;
    }

    .job-card__title {
      font-size: 18px;
      -webkit-line-clamp: 3;
      min-height: 3.9em;
    }

    .job-card__coname {
      font-size: 15px;
    }

    .job-card__loc {
      font-size: 14.5px;
    }

    .job-card__where .badge {
      height: 24px;
    }

    .job-card__foot .salary {
      font-size: 15px;
    }

    .apply-link {
      font-size: 14px;
    }

    .job-card__foot {
      padding-top: 14px;
    }
  }
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.results-head__main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.results-total {
  margin-right: 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.results-total__count {
  font-variant-numeric: tabular-nums;
}

.results-total__for {
  font-weight: 400;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.clear-all {
  font-size: 13px;
  font-weight: 600;
}

#showing {
  margin-right: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* Loading: skeleton cards over the stale results while an htmx request is
   in flight (the tiny script in jobs.html toggles .is-loading). */

.results-skeleton {
  display: none;
}

#results.is-loading {
  min-height: 24rem;
}

#results.is-loading .results-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--color-bg);
}

.results-skeleton__bar {
  height: 22px;
  width: 160px;
}

.results-skeleton__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.skel-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel-card__row {
  display: flex;
  gap: 12px;
}

.skel-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: none;
}

.skel-card__lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skel-card__foot {
  height: 30px;
}

/* Empty state: explicitly not an error. */

.empty-state {
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
}

.empty-state__radar {
  flex: none;
}

.empty-state__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.empty-state__copy h3 {
  font-size: 18px;
  font-weight: 650;
}

.empty-state__copy p {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.empty-state__copy .btn {
  margin-top: 6px;
}

/* Error state: replaces the results region only; filters are kept. */

.results-error {
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-color: color-mix(in srgb, var(--color-error) 45%, var(--color-divider));
}

.results-error__icon {
  color: var(--color-error);
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.results-error__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.results-error__copy h3 {
  font-size: 16px;
  font-weight: 650;
}

.results-error__copy p {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.results-error__detail {
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .search-body {
    display: block;
  }

  .filters-button {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
  }

  /* Searchbar full width, the Filters button full width beneath it. */
  .jobs-topbar__row {
    flex-direction: column;
    align-items: stretch;
  }

  .jobs-topbar .searchbar {
    flex: none;
    max-width: none;
  }

  .filters-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgb(0 0 0 / 0.5);
    cursor: pointer;
  }

  .filters-toggle:checked ~ .filters-backdrop {
    display: block;
  }

  .filters-drawer {
    position: fixed;
    inset: 0;
    z-index: 30;
    flex: none;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 250ms ease,
      visibility 0s 250ms;
  }

  .filters-toggle:checked ~ .search-body .filters-drawer {
    transform: none;
    visibility: visible;
    transition: transform 250ms ease;
  }

  .filters-toggle:focus-visible ~ .search-body .filters-drawer {
    box-shadow: var(--focus-ring);
  }

  .filters-head {
    height: 56px;
    padding: 0 8px 0 16px;
  }

  .filters-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-pill);
  }

  .filters-close:hover {
    background: var(--color-accent-soft);
    color: var(--color-text);
  }

  .filters-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    gap: 24px;
  }

  .filters-foot {
    display: block;
    position: sticky;
    bottom: 0;
    padding: 12px 16px 20px;
    border-top: 1px solid var(--color-divider);
    background: var(--color-surface);
  }

  /* 44px touch targets on mobile */
  .btn,
  .chip,
  .seg-control label,
  .pager a,
  .pager span,
  .pg-mini__arrow {
    min-height: 44px;
  }

  .results-skeleton__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The htmx loading bar: pinned to the top edge of the window so it is seen
   wherever the Job Seeker is, and takes no room in the page flow. */
.search-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.search-loading .spinner {
  display: block;
  height: 3px;
  border-radius: var(--radius-sm);
  background: var(--color-highlight);
}

/* Job detail page (docs/design/mockup/Job.dc.html): back link, big header,
   a readable ~70ch description column and a sticky summary card with the
   salary large and Apply unmissable. */

.job-back {
  align-self: flex-start;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-accent);
}

.job-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-top: var(--space-5);
  padding-bottom: var(--space-7);
}

.job-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}

.job-main {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.job-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-divider);
}

.job-head__co {
  display: flex;
  align-items: center;
  gap: 14px;
}

.job-head__coname {
  font-size: 16px;
  font-weight: 600;
}

.job-head__all {
  font-size: 13px;
}

.job-title {
  margin: 0;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 750;
  max-width: 22ch;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.job-meta__loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.job-meta__loc .ico {
  width: 16px;
  height: 16px;
}

/* Description: untrusted source HTML made readable — a ~70ch measure,
   heading and list rhythm, accent list markers, scrollable tables and
   wrapping long words. */

.job-description {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.job-description h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 32px 0 10px;
}

.job-description h2:first-child {
  margin-top: 0;
}

.job-description h3,
.job-description h4 {
  margin: 24px 0 8px;
}

.job-description p {
  margin: 0 0 14px;
}

.job-description ul,
.job-description ol {
  list-style: disc;
  padding-left: 22px;
  margin: 0 0 14px;
}

.job-description ol {
  list-style: decimal;
}

.job-description li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.job-description li::marker {
  color: var(--color-accent);
}

.job-description a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.job-description table {
  display: block;
  overflow-x: auto;
  margin: 0 0 14px;
  border-collapse: collapse;
}

.job-description th,
.job-description td {
  border: 1px solid var(--color-divider);
  padding: 6px 10px;
  text-align: left;
}

.job-side {
  flex: 1 1 320px;
  max-width: 360px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-summary {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-md);
}

.job-summary__salary .label {
  margin-bottom: 6px;
}

.job-summary__amount {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.job-summary__period {
  margin-top: 2px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.job-facts {
  margin: 0;
  padding: 4px 0;
}

.job-facts__row {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--fs-small);
}

.job-facts__row:last-child {
  border-bottom: 0;
}

.job-facts dt {
  flex: none;
  width: 5rem;
  color: var(--color-text-muted);
}

.job-facts dd {
  margin: 0;
  min-width: 0;
}

.job-apply {
  text-decoration: none;
}

.job-apply:hover {
  text-decoration: none;
}

.job-apply-note {
  margin: -10px 0 0;
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  text-align: center;
}

.job-also {
  padding: 18px 22px;
}

.job-also__title {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
}

.job-also__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

@media (max-width: 767.98px) {
  .job-layout {
    flex-direction: column;
    padding-bottom: 5.5rem;
  }

  .job-side {
    order: -1;
    position: static;
    max-width: none;
    width: 100%;
  }

  .job-title {
    font-size: 30px;
  }

  .job-facts {
    margin-bottom: 0;
  }

  .job-apply {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    border-radius: 0;
  }
}

/* htmx loading indicator: hidden unless the request is in flight */

.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Responsive home: the hero stacks, the radar moves behind the copy faded,
   and the proof sections stack. No horizontal scroll at 390px. */

@media (max-width: 899.98px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding-top: var(--space-7);
    padding-bottom: var(--space-7);
  }

  .hero__copy {
    position: relative;
    z-index: 1;
  }

  .hero__title {
    font-size: 44px;
  }

  /* Faded art behind the copy; the job chips would sit on the text, so
     they only show on wide screens. */
  .radar-art {
    position: absolute;
    right: -140px;
    bottom: 0;
    width: 420px;
    margin-right: 0;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
  }

  .rd-chip {
    display: none;
  }

  .stat-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-tiles__tile {
    border-bottom: 1px solid var(--color-divider);
  }

  .stat-tiles__tile:nth-child(2n) {
    border-right: 0;
  }

  .stat-tiles__tile:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .how__steps,
  .recent .grid3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta__band {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-6);
  }
}

@media (max-width: 639.98px) {
  /* Header: tighter gaps so the toggle stays fully visible at 390px; the
     Browse jobs link drops away below 480px (footer and page links to
     /jobs remain). */
  .site-header .wrap {
    padding: 0 var(--space-4);
  }

  .site-header__row {
    gap: var(--space-3);
  }

  /* Hero searchbar stacks: keyword, location, then a full-width submit,
     with horizontal dividers instead of the vertical separator. */
  .searchbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .searchbar .seg {
    padding: 0 var(--space-3);
  }

  .searchbar .seg + .seg {
    border-left: 0;
    border-top: 1px solid var(--color-divider);
  }

  .searchbar input,
  .searchbar--lg input {
    height: 48px;
  }

  .searchbar .btn,
  .searchbar--lg .btn {
    align-self: stretch;
    width: 100%;
    height: 48px;
    margin-top: var(--space-2);
  }

  /* The jobs page searchbar stacks like the hero's, each row 48px. */
  .jobs-topbar .searchbar {
    padding: 6px;
  }

  .jobs-topbar .searchbar input {
    height: 48px;
    font-size: var(--fs-body);
  }

  .jobs-topbar .searchbar .btn {
    height: 48px;
  }

  /* Platform strip: the label gets its own line, the names wrap. */
  .platform-strip__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .platform-strip__list {
    justify-content: flex-start;
    gap: var(--space-4) var(--space-5);
  }

  .stat-tiles__value {
    font-size: 28px;
  }
}

@media (max-width: 479.98px) {
  .site-header .btn--ghost {
    display: none;
  }

  .hero__title {
    font-size: 36px;
  }

  .stat-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-tiles__tile {
    border-right: 0;
    border-bottom: 1px solid var(--color-divider);
  }

  .stat-tiles__tile:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .radar-art .sweep,
  .skel {
    animation: none;
  }

  .rd-hit,
  .rd-chip {
    animation: none;
    opacity: 1;
  }

  .rd-ping {
    display: none;
  }

  .job-card,
  .job-card:hover {
    transition: none;
    transform: none;
  }

  .filters-drawer,
  .filters-toggle:checked ~ .search-body .filters-drawer {
    transition: none;
  }

  .htmx-indicator {
    transition: none;
  }
}
