/*
 * The stylesheet of frontier-tasks.com, served from /assets/site.<digest>.css with a year's cache
 * (src/assets.ts) and linked with the page's nonce. Colour, type, radius and shadow come only from
 * the Frontier tokens below; `.dark` on <html> switches the palette, set by the theme bootstrap in
 * src/html.ts. After editing the rules run `npm run assets` so the digest matches; test/assets.test.ts
 * fails when it does not.
 */
/* design/system/tokens.css, copied in by `npm run assets` — edit it there, not here. */
/*
 * Frontier Tasks design tokens — the one source of truth for work.*, jobs.* and ats.*.
 *
 * Plain CSS custom properties on the scaffold's shadcn structure: warm neutrals, hairline
 * borders, Frontier moss as the one accent, Geist for text and Geist Mono for code. Light is the
 * default; `.dark` on <html> switches the palette. Each Worker serves the two font files from
 * its own /fonts/ (copies of design/system/fonts/). Tailwind apps map these into utilities with
 * their own `@theme inline` block; server-rendered pages use the variables directly.
 *
 * Owner decision 2026-09-22: this system replaces the dark charcoal + moss lock of 2026-09-14 on
 * every Frontier surface, including the public board.
 */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono-variable.woff2") format("woff2");
}

/*
 * Frontier Tasks tokens on the scaffold's shadcn structure: warm neutrals,
 * hairline borders, Frontier moss as the one accent.
 */
:root {
  --radius: 0.5rem;

  --background: #ffffff;
  --foreground: #14130f;
  --card: #ffffff;
  --card-foreground: #14130f;
  --popover: #ffffff;
  --popover-foreground: #14130f;

  --primary: #2f6548;
  --primary-foreground: #f7f4ed;
  --secondary: #f4f4f1;
  --secondary-foreground: #1d1d16;
  --muted: #f4f4f1;
  --muted-foreground: #6f6e66;
  --accent: #f1f5f2;
  --accent-foreground: #1d4a35;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;

  --border: #e8e8e3;
  --input: #d8d8d0;
  --ring: #2f6548;

  --sidebar: #fbfbf9;
  --sidebar-foreground: #14130f;
  --sidebar-primary: #2f6548;
  --sidebar-primary-foreground: #f7f4ed;
  --sidebar-accent: #eeeeea;
  --sidebar-accent-foreground: #14130f;
  --sidebar-border: #e8e8e3;
  --sidebar-ring: #2f6548;

  --brand: #2f6548;
  --brand-strong: #25523a;
  --brand-soft: #dcefe3;
  --brand-mint: #7bc5a0;

  --status-active-bg: #dcfce7;
  --status-active-fg: #166534;
  --status-paused-bg: #fef3c7;
  --status-paused-fg: #92400e;
  --status-expired-bg: #f4f4f1;
  --status-expired-fg: #7c7c68;
  --status-pending-bg: #dbeafe;
  --status-pending-fg: #1e40af;
  --status-rejected-bg: #fee2e2;
  --status-rejected-fg: #991b1b;
  --status-revision-bg: #ffedd5;
  --status-revision-fg: #9a3412;

  --chart-1: #2f6548;
  --chart-2: #2563eb;
  --chart-3: #c2410c;
  --chart-4: #7e22ce;
  --chart-5: #a16207;

  /* Badge theme pairs also live in badge-palette.json; the domain test checks parity. */
  --badge-check-ink: #ffffff;
  --badge-preview-light-bg: #ffffff;
  --badge-preview-light-fg: #14130f;
  --badge-preview-dark-bg: #141412;
  --badge-preview-dark-fg: #f4f2ec;
  --badge-neutral-light: #6f6e66;
  --badge-neutral-dark: #a3a19a;
  --badge-neutral: var(--badge-neutral-light);
  --badge-amber-light: #a16207;
  --badge-amber-dark: #facc15;
  --badge-amber: var(--badge-amber-light);
  --badge-teal-light: #0f766e;
  --badge-teal-dark: #5eead4;
  --badge-teal: var(--badge-teal-light);
  --badge-blue-light: #2563eb;
  --badge-blue-dark: #60a5fa;
  --badge-blue: var(--badge-blue-light);
  --badge-violet-light: #7e22ce;
  --badge-violet-dark: #c084fc;
  --badge-violet: var(--badge-violet-light);
  --badge-slate-light: #475569;
  --badge-slate-dark: #94a3b8;
  --badge-slate: var(--badge-slate-light);
  --badge-stone-light: #57534e;
  --badge-stone-dark: #a8a29e;
  --badge-stone: var(--badge-stone-light);
  --badge-copper-light: #9a3412;
  --badge-copper-dark: #fdba74;
  --badge-copper: var(--badge-copper-light);
  --badge-red-light: #b91c1c;
  --badge-red-dark: #f87171;
  --badge-red: var(--badge-red-light);
  --badge-coral-light: #c04b37;
  --badge-coral-dark: #fda48c;
  --badge-coral: var(--badge-coral-light);
  --badge-orange-light: #c2410c;
  --badge-orange-dark: #fb923c;
  --badge-orange: var(--badge-orange-light);
  --badge-gold-light: #92700b;
  --badge-gold-dark: #e6c869;
  --badge-gold: var(--badge-gold-light);
  --badge-yellow-light: #857006;
  --badge-yellow-dark: #e7d86c;
  --badge-yellow: var(--badge-yellow-light);
  --badge-lime-light: #4d7c0f;
  --badge-lime-dark: #bef264;
  --badge-lime: var(--badge-lime-light);
  --badge-green-light: #15803d;
  --badge-green-dark: #86efac;
  --badge-green: var(--badge-green-light);
  --badge-emerald-light: #047857;
  --badge-emerald-dark: #6ee7b7;
  --badge-emerald: var(--badge-emerald-light);
  --badge-cyan-light: #0e7490;
  --badge-cyan-dark: #67e8f9;
  --badge-cyan: var(--badge-cyan-light);
  --badge-sky-light: #0369a1;
  --badge-sky-dark: #7dd3fc;
  --badge-sky: var(--badge-sky-light);
  --badge-navy-light: #1e40af;
  --badge-navy-dark: #93c5fd;
  --badge-navy: var(--badge-navy-light);
  --badge-indigo-light: #4338ca;
  --badge-indigo-dark: #a5b4fc;
  --badge-indigo: var(--badge-indigo-light);
  --badge-purple-light: #6d28d9;
  --badge-purple-dark: #c4b5fd;
  --badge-purple: var(--badge-purple-light);
  --badge-fuchsia-light: #a21caf;
  --badge-fuchsia-dark: #e879f9;
  --badge-fuchsia: var(--badge-fuchsia-light);
  --badge-pink-light: #be185d;
  --badge-pink-dark: #f9a8d4;
  --badge-pink: var(--badge-pink-light);
  --badge-rose-light: #be123c;
  --badge-rose-dark: #fda4af;
  --badge-rose: var(--badge-rose-light);
}

.dark {
  --background: #0f0f0d;
  --foreground: #f4f2ec;
  --card: #141412;
  --card-foreground: #f4f2ec;
  --popover: #141412;
  --popover-foreground: #f4f2ec;

  --primary: #52a373;
  --primary-foreground: #0b1a12;
  --secondary: #22221f;
  --secondary-foreground: #f4f2ec;
  --muted: #22221f;
  --muted-foreground: #a3a19a;
  --accent: #1c2620;
  --accent-foreground: #cfe9da;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;

  --border: #262624;
  --input: #34342f;
  --ring: #7bc5a0;

  --sidebar: #0f0f0d;
  --sidebar-foreground: #f4f2ec;
  --sidebar-primary: #52a373;
  --sidebar-primary-foreground: #0b1a12;
  --sidebar-accent: #22221f;
  --sidebar-accent-foreground: #f4f2ec;
  --sidebar-border: #262624;
  --sidebar-ring: #7bc5a0;

  --brand: #52a373;
  --brand-strong: #7bc5a0;
  --brand-soft: #1c2f25;
  --brand-mint: #7bc5a0;

  --status-active-bg: #123324;
  --status-active-fg: #86efac;
  --status-paused-bg: #3b2a08;
  --status-paused-fg: #fcd34d;
  --status-expired-bg: #22221f;
  --status-expired-fg: #a3a19a;
  --status-pending-bg: #172554;
  --status-pending-fg: #93c5fd;
  --status-rejected-bg: #450a0a;
  --status-rejected-fg: #fca5a5;
  --status-revision-bg: #431407;
  --status-revision-fg: #fdba74;

  --chart-1: #7bc5a0;
  --chart-2: #60a5fa;
  --chart-3: #fb923c;
  --chart-4: #c084fc;
  --chart-5: #facc15;
  --badge-check-ink: #141412;
  --badge-neutral: var(--badge-neutral-dark);
  --badge-amber: var(--badge-amber-dark);
  --badge-teal: var(--badge-teal-dark);
  --badge-blue: var(--badge-blue-dark);
  --badge-violet: var(--badge-violet-dark);
  --badge-slate: var(--badge-slate-dark);
  --badge-stone: var(--badge-stone-dark);
  --badge-copper: var(--badge-copper-dark);
  --badge-red: var(--badge-red-dark);
  --badge-coral: var(--badge-coral-dark);
  --badge-orange: var(--badge-orange-dark);
  --badge-gold: var(--badge-gold-dark);
  --badge-yellow: var(--badge-yellow-dark);
  --badge-lime: var(--badge-lime-dark);
  --badge-green: var(--badge-green-dark);
  --badge-emerald: var(--badge-emerald-dark);
  --badge-cyan: var(--badge-cyan-dark);
  --badge-sky: var(--badge-sky-dark);
  --badge-navy: var(--badge-navy-dark);
  --badge-indigo: var(--badge-indigo-dark);
  --badge-purple: var(--badge-purple-dark);
  --badge-fuchsia: var(--badge-fuchsia-dark);
  --badge-pink: var(--badge-pink-dark);
  --badge-rose: var(--badge-rose-dark);
}
/* End of design/system/tokens.css. The board's own rules follow. */
:root {
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: calc(var(--radius) - 2px);
  --radius-lg: calc(var(--radius) + 4px);
  --shadow-xs: 0 1px 2px rgba(20, 19, 15, 0.05);
  --shadow-card: 0 1px 2px rgba(20, 19, 15, 0.04), 0 8px 24px -12px rgba(20, 19, 15, 0.12);
  --header-bg: rgba(255, 255, 255, 0.86);
  --max: 1120px;
}
.dark {
  color-scheme: dark;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(15, 15, 13, 0.86);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  z-index: 10000;
  padding: 8px 14px;
  background: var(--foreground);
  color: var(--background);
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
strong {
  font-weight: 600;
}
.wrap {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}
.mono {
  font-family: var(--font-mono);
}

/* —— Buttons (shadcn variants) —— */
.btn-ink,
.btn-apply,
.btn-chip,
.btn-share,
.btn-ghost,
.btn-filter-saved,
.reset,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 120ms ease,
    color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.btn-ink svg,
.btn-apply svg,
.btn-chip svg,
.btn-share svg {
  flex: none;
}
.btn-ink {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.btn-ink:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.btn-ink:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn-apply {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.btn-apply:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.btn-chip,
.btn-share,
.btn-filter-saved {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--input);
  box-shadow: var(--shadow-xs);
}
.btn-chip:hover,
.btn-share:hover,
.btn-filter-saved:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-chip-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-chip-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--primary-foreground);
}
.btn-share {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
}
.btn-ghost,
.reset {
  background: transparent;
  color: var(--muted-foreground);
}
.btn-ghost:hover,
.reset:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.theme-toggle {
  width: 36px;
  padding: 0;
  background: transparent;
  color: var(--muted-foreground);
  position: relative;
}
.theme-toggle:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.theme-toggle svg {
  position: absolute;
  transition:
    transform 200ms ease,
    opacity 200ms ease;
}
.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}
.dark .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}
.dark .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* —— Leaf action row —— */
.leaf-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.leaf-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.leaf-share {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.share-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.toast-notify {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--foreground);
  color: var(--background);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: toastFadeIn 200ms ease forwards;
}
@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sticky header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1;
}
.wordmark .mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: grid;
  place-items: center;
  flex: none;
}
.wordmark .mark svg {
  display: block;
}
.wordmark em {
  font-style: normal;
  color: var(--primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

/* —— Hero —— */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}
.hero-inner {
  max-width: 720px;
}
.hero-eyebrow,
.leaf-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-eyebrow::before,
.leaf-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--foreground);
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-lead {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* —— Board —— */
.market {
  padding: 32px 0 80px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.search {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}
.search input,
.filter-pill select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: 13.5px;
  outline: none;
  box-shadow: var(--shadow-xs);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.search input {
  padding: 0 12px 0 36px;
}
.search input::placeholder {
  color: var(--muted-foreground);
}
.search input:focus,
.filter-pill select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 30%, transparent);
}
.filter-pill {
  position: relative;
  flex: none;
}
.filter-pill select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  padding: 0 32px 0 12px;
  cursor: pointer;
}
.filter-pill .chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted-foreground);
  display: flex;
}
.btn-filter-saved.is-active {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--primary);
}
.saved-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.btn-card-bookmark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-foreground);
  display: grid;
  place-items: center;
  padding: 0;
  transition:
    background 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}
.btn-card-bookmark:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-card-bookmark.is-saved,
.btn-leaf-bookmark.is-saved {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--brand-soft);
}
.is-saved .icon-bm-outline {
  display: none !important;
}
.is-saved .icon-bm-filled {
  display: block !important;
}
.icon-bm-filled {
  display: none;
}

.results-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 4px 0 18px;
}
.results-count {
  margin: 0;
  font-size: 13px;
  color: var(--muted-foreground);
}
.results-count strong {
  color: var(--foreground);
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.contractor-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-foreground);
}

/* —— Cards —— */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.empty-board {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  background: var(--card);
  border: 1px dashed var(--input);
  border-radius: var(--radius-lg);
}
.empty-board h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--foreground);
}
.empty-board p {
  color: var(--muted-foreground);
  font-size: 14px;
  max-width: 46ch;
  margin: 0 auto 20px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 20px 20px 16px;
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--foreground) 18%, var(--border));
  box-shadow: var(--shadow-card);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--foreground);
}
.card-title a {
  color: var(--foreground);
  transition: color 120ms ease;
}
.card-title a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.featured {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--accent-foreground);
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.meta-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
}
.meta-list li svg {
  flex: none;
  margin-top: 2px;
  color: var(--muted-foreground);
}
.meta-list strong {
  font-weight: 500;
  color: var(--foreground);
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.rate {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* —— Framing strip —— */
.framing {
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--secondary);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 16px 32px;
  align-items: center;
}
.framing h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.framing p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.55;
  max-width: 60ch;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--background);
  padding: 24px 0 36px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.footer-inner a {
  color: var(--muted-foreground);
}
.footer-inner a:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .framing {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 40px 0 32px;
  }
  .filter-pill {
    flex: 1 1 auto;
  }
  .filter-pill select {
    width: 100%;
  }
}

/* —— Leaf (JD + apply) —— */
.leaf-hero {
  padding: 36px 0 28px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.leaf-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.8vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--foreground);
}
.leaf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--muted-foreground);
  font-size: 13.5px;
}
.leaf-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.leaf-meta strong {
  color: var(--foreground);
  font-weight: 500;
}
.leaf-rate-container {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaf-rate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.leaf-rate {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.rate-subtext {
  font-size: 12px;
  color: var(--muted-foreground);
}
.leaf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: 32px 0 80px;
  align-items: start;
}
.jd {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px 28px;
  box-shadow: var(--shadow-xs);
}
.jd h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.jd-body {
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.65;
}
.jd-body p {
  margin: 0 0 12px;
}
.jd-body h3,
.jd-body h4 {
  margin: 22px 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  line-height: 1.25;
}
.jd-body h3 {
  font-size: 17px;
}
.jd-body h4 {
  font-size: 15px;
}
.jd-body h3:first-child,
.jd-body h4:first-child {
  margin-top: 0;
}
.jd-body ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}
.jd-body li {
  margin: 0 0 6px;
}
.jd-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jd-body code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--muted);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}
.apply-card {
  position: sticky;
  top: 72px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.apply-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.apply-card .hint {
  margin: 0 0 16px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.5;
}
.apply-card label {
  display: block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}
.apply-card label > input,
.apply-card label > .file-dropzone {
  margin-top: 6px;
}
.apply-card input[type="text"],
.apply-card input[type="email"],
.apply-card input[type="tel"],
.apply-card select {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 400;
  box-shadow: var(--shadow-xs);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.apply-card input::placeholder {
  color: var(--muted-foreground);
}
.apply-card input:focus,
.apply-card select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 30%, transparent);
  /* Invisible beside the ring, and drawn in the system colour when forced colours drop shadows. */
  outline: 2px solid transparent;
}
/* The mobile number: one group, a country and the number, under a legend like the other labels. */
.apply-card .mobile-field {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.apply-card .mobile-field legend {
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}
.apply-card .field-hint {
  margin: 2px 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted-foreground);
}
.apply-card .mobile-field label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-foreground);
}
.apply-card .select-wrap {
  position: relative;
  display: block;
  margin: 0 0 8px;
}
.apply-card select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.apply-card .select-wrap .chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted-foreground);
  display: flex;
}
/* "Choose a country" reads as a placeholder, as the other fields' do; the list itself does not. */
.apply-card select:invalid {
  color: var(--muted-foreground);
}
.apply-card select option {
  color: var(--foreground);
}
/* The chosen country's code, joined to the number's left edge once a country is chosen. */
.apply-card .tel-wrap {
  display: flex;
}
.apply-card .tel-code {
  display: flex;
  align-items: center;
  flex: none;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--input);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.apply-card .tel-wrap input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
}
.apply-card .tel-code:not([hidden]) + input[type="tel"] {
  border-radius: 0 var(--radius) var(--radius) 0;
}
/* At phone width the fields are 16px, below which iOS Safari zooms the page on focus. */
@media (max-width: 640px) {
  .apply-card input[type="text"],
  .apply-card input[type="email"],
  .apply-card input[type="tel"],
  .apply-card select,
  .apply-card .tel-code {
    font-size: 16px;
  }
}
.apply-card .file-dropzone {
  position: relative;
  border: 1px dashed var(--input);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  background: var(--muted);
  transition:
    border-color 120ms ease,
    background 120ms ease;
  cursor: pointer;
  overflow: hidden;
}
.file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.apply-card .file-dropzone:hover,
.apply-card .file-dropzone.is-dragover {
  border-color: var(--primary);
  background: var(--accent);
}
.dropzone-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dropzone-idle svg {
  color: var(--primary);
  margin-bottom: 2px;
}
.dropzone-idle p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--foreground);
}
.dropzone-idle p strong {
  color: var(--primary);
  font-weight: 500;
}
.file-limits {
  font-size: 11.5px;
  color: var(--muted-foreground);
  font-weight: 400;
}
.dropzone-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}
.dropzone-selected svg {
  color: var(--primary);
  flex: none;
}
.file-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-foreground);
}
.btn-remove-file {
  position: relative;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition:
    background 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}
.btn-remove-file:hover {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-fg);
  border-color: var(--destructive);
}
.apply-error-box {
  color: var(--status-rejected-fg);
  background: var(--status-rejected-bg);
  border: 1px solid color-mix(in srgb, var(--destructive) 30%, transparent);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0 12px;
}
.apply-success-box {
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.apply-success-box h3 {
  font-size: 17px;
  margin: 0 0 6px;
  color: var(--foreground);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.apply-success-box p {
  font-size: 13.5px;
  color: var(--muted-foreground);
  margin: 0 0 16px;
  line-height: 1.5;
}
.apply-success-box p strong {
  color: var(--foreground);
}
.apply-success-box .btn-ghost {
  border-color: var(--input);
  background: var(--background);
  color: var(--foreground);
}
.apply-success-box .btn-ghost:hover {
  background: var(--muted);
}
.success-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.apply-card .btn-ink {
  width: 100%;
  margin-top: 4px;
}
.apply-card .fine {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--muted-foreground);
  line-height: 1.45;
}
/* apply-privacy-line-v1's Privacy Policy link: conspicuous where applicants give their details. */
.apply-card .fine a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.status-page {
  padding: 80px 0 100px;
  text-align: center;
}
.status-page h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  color: var(--foreground);
}
.status-page p {
  color: var(--muted-foreground);
  max-width: 42ch;
  margin: 0 auto 24px;
}
@media (max-width: 900px) {
  .leaf-layout {
    grid-template-columns: 1fr;
  }
  .apply-card {
    position: static;
  }
}

/* —— Breadcrumbs —— */
.breadcrumb {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 120ms ease;
}
.breadcrumb a:hover {
  color: var(--foreground);
}
.breadcrumb .sep {
  color: var(--input);
  user-select: none;
}
.breadcrumb [aria-current="page"] {
  color: var(--foreground);
  font-weight: 500;
}

/* —— Related —— */
.related-jobs {
  padding: 40px 0 72px;
  border-top: 1px solid var(--border);
}
.related-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.related-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.view-all-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}
.view-all-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
