/* ============================================================================
   Remote job board — design system
   Dark-first, compact, zero framework. ~9 KB.
   ========================================================================== */

:root {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #171b24;
  --surface-hover: #1b2029;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #e8eaed;
  --text-muted: #8b92a4;
  --text-dim: #656c7d;
  --accent: #c8f751;
  --accent-ink: #0b0d12;
  --accent-glow: rgba(200, 247, 81, 0.16);
  --warn: #ffb86b;
  --radius: 8px;
  --radius-lg: 12px;
  --max: 1140px;
  --row-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Theme resolution ---------------------------------------------
   Three states, resolved with the cascade rather than JavaScript:

     auto (default)  no data-theme attribute -> follows prefers-color-scheme
     light           data-theme="light"      -> always light
     dark            data-theme="dark"       -> always dark

   Doing "auto" in CSS instead of JS means the correct theme paints on the very
   first frame with no flash, and it keeps working with JavaScript disabled.
   The tiny inline script in <head> only runs when the visitor has made an
   EXPLICIT choice, which is the only case CSS cannot express.
   ------------------------------------------------------------------------ */

/* auto -> light, when the visitor's OS asks for light and they have not chosen */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #fbfbfd;
    --surface: #ffffff;
    --surface-2: #f4f5f8;
    --surface-hover: #f0f2f6;
    --border: rgba(10, 12, 20, 0.09);
    --border-strong: rgba(10, 12, 20, 0.16);
    --text: #14171f;
    --text-muted: #5b6373;
    --text-dim: #7b8494;
    --accent: #2f6f2f;
    --accent-ink: #ffffff;
    --accent-glow: rgba(47, 111, 47, 0.1);
  }
}

/* explicit light, chosen via the toggle */
[data-theme='light'] {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f4f5f8;
  --surface-hover: #f0f2f6;
  --border: rgba(10, 12, 20, 0.09);
  --border-strong: rgba(10, 12, 20, 0.16);
  --text: #14171f;
  --text-muted: #5b6373;
  --text-dim: #7b8494;
  --accent: #2f6f2f;
  --accent-ink: #ffffff;
  --accent-glow: rgba(47, 111, 47, 0.1);
}

/* explicit dark wins over a light system preference */
[data-theme='dark'] {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #171b24;
  --surface-hover: #1b2029;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #e8eaed;
  --text-muted: #8b92a4;
  --text-dim: #656c7d;
  --accent: #c8f751;
  --accent-ink: #0b0d12;
  --accent-glow: rgba(200, 247, 81, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 0;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600;
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 56px; display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.is-stuck {
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; width: 100%; }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15.5px; letter-spacing: -0.02em; flex-shrink: 0; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #6ee7ff));
  display: grid; place-items: center; color: var(--accent-ink); font-size: 13px; font-weight: 800;
}
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-nav a.nav-link {
  padding: 7px 11px; border-radius: var(--radius); color: var(--text-muted);
  font-size: 13.5px; font-weight: 500; transition: color .15s ease, background .15s ease;
}
.header-nav a.nav-link:hover { color: var(--text); background: var(--surface-2); }

/* The header is the one row that cannot wrap — it is sticky and a fixed 56px —
   so on narrow screens links are dropped rather than allowed to overflow. An
   overflowing header widens the whole document and every page below it scrolls
   sideways, which is what makes a site feel broken on a phone.
   Nothing is lost: the footer carries the full navigation at every width. */
@media (max-width: 700px) {
  .header-nav .nav-secondary { display: none; }
}
@media (max-width: 460px) {
  /* Only the two things a visitor actually taps here survive: the theme toggle
     and the one call to action. */
  .header-nav .nav-link { display: none; }
  .header-nav { gap: 6px; }
  .brand { font-size: 15px; }
  .header-nav .btn-primary { padding: 8px 12px; }
}
@media (max-width: 340px) {
  /* Wordmark goes, logo stays, so the CTA is never squeezed off the screen. */
  .brand > span:not(.brand-mark) { display: none; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }

/* ---------- Hero --------------------------------------------------------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; z-index: 2; padding: 36px 0 24px; max-height: 38vh; }
@media (max-width: 760px) { .hero-inner { padding: 30px 0 22px; max-height: none; } }

/* Aurora background. transform/opacity only, so it stays off the main thread.
   Never the LCP element — the headline paints first and does not wait on this. */
.aurora { position: absolute; inset: -40% -10% auto -10%; height: 320px; z-index: 1; filter: blur(72px); opacity: .5; pointer-events: none; }
.aurora span { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.aurora span:nth-child(1) { width: 460px; height: 300px; left: 4%;  background: radial-gradient(circle, var(--accent) 0%, transparent 68%); animation: drift1 19s ease-in-out infinite; }
.aurora span:nth-child(2) { width: 380px; height: 280px; left: 38%; background: radial-gradient(circle, #6ee7ff 0%, transparent 68%); animation: drift2 23s ease-in-out infinite; }
.aurora span:nth-child(3) { width: 420px; height: 260px; right: 6%; background: radial-gradient(circle, #b98cff 0%, transparent 68%); animation: drift3 27s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(60px,26px,0) scale(1.13); } }
@keyframes drift2 { 0%,100% { transform: translate3d(0,0,0) scale(1.05); } 50% { transform: translate3d(-50px,34px,0) scale(.92); } }
@keyframes drift3 { 0%,100% { transform: translate3d(0,0,0) scale(.95); } 50% { transform: translate3d(-38px,-22px,0) scale(1.1); } }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .aurora { opacity: .3; } }
[data-theme='light'] .aurora { opacity: .3; }

h1.hero-title {
  margin: 0 0 9px; font-size: clamp(27px, 4vw, 38px); line-height: 1.1;
  letter-spacing: -0.035em; font-weight: 800; max-width: 15ch;
}
.hero-title .accent { color: var(--accent); }
.hero-sub { margin: 0 0 16px; color: var(--text-muted); font-size: 16px; max-width: 56ch; }

.hero-search { display: flex; gap: 8px; max-width: 540px; margin-bottom: 12px; }
.hero-search input {
  flex: 1; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 15px; font-family: inherit;
}
.hero-search input::placeholder { color: var(--text-dim); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  font-size: 12.5px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: transform .13s cubic-bezier(.34,1.56,.64,1), background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.chip[aria-pressed='true'], .chip.is-active {
  background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 650;
  transform: scale(1.04);
}
.hero-stats { color: var(--text-dim); font-size: 13px; }
.hero-stats strong { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Filter bar --------------------------------------------------- */

.filter-bar {
  position: sticky; top: 56px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 10px 0;
}
.filter-bar .wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select {
  appearance: none; padding: 7px 30px 7px 11px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font-size: 13px; font-family: inherit; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b92a4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select:hover { border-color: var(--border-strong); color: var(--text); }
.result-count { margin-left: auto; color: var(--text-dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- Job rows ----------------------------------------------------- */

.job-list { margin: 0; padding: 0; list-style: none; }

/* Seven children: logo, main, tags, salary, region, age, apply.
   The column count must match exactly or items wrap onto a second implicit row. */
.job-row {
  position: relative; display: grid; align-items: center; gap: 14px;
  grid-template-columns: 40px minmax(0, 1fr) auto auto auto 38px 78px;
  min-height: var(--row-h); padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .14s ease, transform .14s ease;
}
/* The apply cell keeps its width whether or not the button is visible, so rows
   do not reflow on hover. */
.job-row > .job-apply { justify-self: end; }
.job-row:hover, .job-row:focus-within { background: var(--surface); transform: translateY(-1px); }
.job-row.is-featured { background: var(--feat, var(--surface-2)); border-left: 2px solid var(--feat-border, var(--accent)); padding-left: 12px; }
.job-row.is-expired { opacity: .55; }

.job-logo {
  width: 40px; height: 40px; border-radius: var(--radius); flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--logo-bg, var(--surface-2)); color: #fff; letter-spacing: -0.02em;
}
.job-main { min-width: 0; }
.job-title {
  display: block; font-size: 15px; font-weight: 620; letter-spacing: -0.012em;
  color: var(--text); margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-row:hover .job-title { color: var(--accent); }
.job-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); min-width: 0; }
.job-company { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-company:hover { color: var(--text); text-decoration: underline; }

.tag-list { display: flex; gap: 5px; flex-wrap: nowrap; }
.tag {
  padding: 3px 8px; border-radius: 5px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-muted);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.tag:hover { color: var(--text); border-color: var(--border-strong); }

.job-salary { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.job-salary.is-undisclosed { color: var(--text-dim); font-weight: 500; }
.job-region { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.job-age { font-size: 12px; color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* Apply reveals on hover AND focus-within. Hover does not exist on touch and is
   invisible to keyboard users, so the whole row is always a link underneath. */
.job-apply {
  opacity: 0; transform: translateX(6px);
  transition: opacity .16s ease, transform .16s ease;
  padding: 6px 13px; font-size: 12.5px; white-space: nowrap;
}
.job-row:hover .job-apply, .job-row:focus-within .job-apply { opacity: 1; transform: translateX(0); }
@media (hover: none) { .job-apply { display: none; } }

.badge {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.badge-new { background: var(--accent-glow); color: var(--accent); }
.badge-featured { background: var(--accent); color: var(--accent-ink); }
.badge-expired { background: rgba(255, 184, 107, .14); color: var(--warn); }

/* Narrow screens get an explicit two-row layout rather than a narrower version
   of the same seven-column grid.
 *
 * This has to be spelled out. Hiding .tag-list and .job-region removes them
 * from the grid entirely, so the remaining children reflow into whatever
 * columns are left and land in the wrong places — the classic symptom being an
 * age stamp that drops onto its own line under the logo. Every remaining child
 * is therefore placed by hand.
 */
@media (max-width: 860px) {
  .job-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 11px; row-gap: 3px;
    padding: 11px 12px;
  }
  .tag-list, .job-region, .job-apply { display: none; }

  .job-row > .job-logo   { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .job-row > .job-main   { grid-column: 2; grid-row: 1; }
  .job-row > .job-salary { grid-column: 2; grid-row: 2; font-size: 12.5px; }
  .job-row > .job-age    { grid-column: 3; grid-row: 1; }

  .job-logo { width: 36px; height: 36px; font-size: 13px; }
  .job-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .job-meta { flex-wrap: wrap; row-gap: 2px; }
}

/* ---------- Sections ----------------------------------------------------- */

.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
h2.section-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.section-link { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.section-link:hover { color: var(--accent); }

.empty-state { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.empty-state p { margin: 0 0 14px; }

.link-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.link-cloud a {
  padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size: 13px;
}
.link-cloud a:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

/* ---------- Job detail --------------------------------------------------- */

.breadcrumb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); padding: 18px 0 0; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .5; }

.job-header { padding: 18px 0 24px; border-bottom: 1px solid var(--border); }
.job-header-top { display: flex; gap: 16px; align-items: flex-start; }
.job-header .job-logo { width: 60px; height: 60px; font-size: 20px; border-radius: var(--radius-lg); }
h1.job-h1 { margin: 0 0 5px; font-size: clamp(23px, 3.4vw, 31px); line-height: 1.16; letter-spacing: -0.03em; font-weight: 750; }
.job-header-company { color: var(--text-muted); font-size: 14.5px; }
.job-header-company a { color: var(--text); font-weight: 600; }
.job-header-company a:hover { color: var(--accent); }

.meta-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 18px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; color: var(--text-muted);
}
.meta-chip strong { color: var(--text); font-weight: 600; }

.notice {
  padding: 14px 16px; border-radius: var(--radius-lg); margin: 18px 0;
  border: 1px solid; font-size: 14px; line-height: 1.5;
}
.notice-warn { background: rgba(255, 184, 107, .08); border-color: rgba(255, 184, 107, .28); color: var(--warn); }
.notice-warn strong { color: var(--text); }

/* Validation summary at the top of a returned form. Sits above the fields it
   describes and takes focus, so a screen reader announces the problem rather
   than dropping the user back at the top of a form that looks unchanged. */
.form-errors {
  padding: 14px 16px; border-radius: var(--radius-lg); margin: 0 0 22px;
  background: rgba(255, 107, 107, .09); border: 1px solid rgba(255, 107, 107, .32);
  color: var(--text); font-size: 14px; line-height: 1.5;
}
.form-errors:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-errors ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-muted); }
.form-errors li { margin-bottom: 3px; }

.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding: 28px 0 48px; align-items: start; }
@media (max-width: 900px) { .job-layout { grid-template-columns: 1fr; gap: 28px; } }

.prose { font-size: 15.5px; line-height: 1.68; color: #cfd4de; max-width: 68ch; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .prose { color: #303747; } }
[data-theme='light'] .prose { color: #303747; }
.prose h2 { margin: 30px 0 10px; font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.015em; }
.prose h3 { margin: 22px 0 8px; font-size: 15.5px; font-weight: 650; color: var(--text); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--text-dim); }
.prose strong { color: var(--text); font-weight: 640; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose code { font-family: var(--mono); font-size: .89em; background: var(--surface-2); padding: 2px 5px; border-radius: 4px; }
.prose blockquote { margin: 0 0 16px; padding-left: 14px; border-left: 2px solid var(--border-strong); color: var(--text-muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

.benefit-grid { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 0; }
.benefit { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; }
.card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.card p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.sidebar { position: sticky; top: 78px; }
@media (max-width: 900px) { .sidebar { position: static; } }

.apply-card { border-color: var(--border-strong); }
.apply-note { font-size: 12px; color: var(--text-dim); margin: 10px 0 0; text-align: center; }

.share-row { display: flex; gap: 7px; flex-wrap: wrap; }

/* Sticky mobile apply bar */
.sticky-apply {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: none; gap: 12px; align-items: center;
  transform: translateY(100%); transition: transform .22s ease;
}
.sticky-apply.is-visible { transform: translateY(0); }
.sticky-apply .sa-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .sticky-apply { display: flex; } body.has-sticky-apply { padding-bottom: 66px; } }

/* ---------- Company page ------------------------------------------------- */

.company-header { display: flex; gap: 18px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--border); }
.company-header .job-logo { width: 64px; height: 64px; font-size: 22px; border-radius: var(--radius-lg); }
h1.company-h1 { margin: 0 0 4px; font-size: 27px; letter-spacing: -0.03em; font-weight: 750; }

.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.company-card { display: block; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: transform .14s ease, border-color .15s ease; }
.company-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.company-card .cc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.company-card .job-logo { width: 34px; height: 34px; font-size: 12px; }
.company-card h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.company-card p { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.company-card .cc-count { margin-top: 9px; font-size: 12px; color: var(--accent); font-weight: 600; }

/* ---------- Pagination --------------------------------------------------- */

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 28px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.pagination a:hover { color: var(--text); border-color: var(--border-strong); }
.pagination .is-current { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.pagination .is-gap { border: 0; background: none; }

/* ---------- Alerts / forms ----------------------------------------------- */

.alert-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; text-align: center; }
.alert-box h2 { margin: 0 0 7px; font-size: 19px; letter-spacing: -0.02em; }
.alert-box p { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }
.alert-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.alert-form input {
  flex: 1; padding: 10px 13px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text); font-size: 14.5px; font-family: inherit;
}
@media (max-width: 520px) { .alert-form { flex-direction: column; } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field .hint { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 7px; font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 13px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 14.5px; font-family: inherit;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

/* ---------- FAQ ---------------------------------------------------------- */

.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 8px; }
.faq summary { padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--text-dim); font-size: 17px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq .faq-body { padding: 0 16px 14px; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }
.faq .faq-body p { margin: 0 0 10px; }
.faq .faq-body p:last-child { margin: 0; }

/* ---------- Footer ------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); padding: 34px 0 44px; margin-top: 20px; color: var(--text-muted); font-size: 13px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; margin-bottom: 26px; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 22px; } }
.footer-cols h4 { margin: 0 0 9px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); font-weight: 650; }
.footer-cols ul { margin: 0; padding: 0; list-style: none; }
.footer-cols li { margin-bottom: 6px; }
.footer-cols a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-dim); }

/* ---------- Motion preferences ------------------------------------------- */
/* Mandatory: this is an accessibility requirement, not a nicety. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .aurora span { animation: none !important; }
  .job-apply { opacity: 1; transform: none; }
}


/* ---------- Theme toggle (single button) --------------------------------- */

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  color: var(--text-muted);
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
#theme-auto { margin-right: 10px; }
#theme-auto:hover { color: var(--text); }
/* The toggle stays visible at every width. Phones are where a light/dark switch
   matters most, so hiding it on small screens would remove the feature exactly
   where it is used. */

/* ============================================================================
   Utility classes.

   These exist so no template ever needs an inline style="" attribute. A strict
   `style-src 'self'` blocks inline style attributes, not just <style> elements,
   so an inline style anywhere would force either 'unsafe-inline' (which guts
   the policy) or per-page hashes (impossible to cache). Named classes are the
   clean way out.

   The only dynamic per-element value is a company's brand colour, handled by
   Templates::brandStyleSheet() which emits one <style> block whose SHA-256 hash
   is added to the CSP at request time.
   ========================================================================== */

.u-flush        { margin: 0; }
.u-mt-sm        { margin-top: 10px; }
.u-mt           { margin-top: 20px; }
.u-mt-lg        { margin-top: 30px; }
.u-mt-xl        { margin-top: 34px; }
.u-mb-sm        { margin-bottom: 8px; }
.u-mb           { margin-bottom: 16px; }
.u-mb-lg        { margin-bottom: 22px; }
.u-pt-0         { padding-top: 0; }
.u-pt-sm        { padding-top: 16px; }
.u-pt           { padding-top: 24px; }
.u-pad-page     { padding: 26px 0 12px; }
.u-pad-page-lg  { padding: 40px 0; }
.u-pad-hero     { padding: 34px 0 8px; }
.u-pad-empty    { padding: 90px 20px; }

.u-narrow       { max-width: 620px; }
.u-readable     { max-width: 680px; }
.u-wide         { max-width: 720px; }
.u-measure      { max-width: 62ch; }
.u-measure-sm   { max-width: 34ch; }
.u-min0         { min-width: 0; }
.u-grow         { flex: 1; }
.u-w-sm         { width: 100px; }

.u-muted        { color: var(--text-muted); }
.u-dim          { color: var(--text-dim); }
.u-body         { font-size: 15px; }
.u-body-lg      { font-size: 16px; }
.u-small        { font-size: 13px; }
.u-tiny         { font-size: 12px; }
.u-center       { text-align: center; }
.u-row          { display: flex; gap: 8px; }
.u-stack-sm > * { margin-bottom: 6px; }
.u-offscreen    { position: absolute; left: -9999px; }
.u-tall         { min-height: 110px; }
.u-inline-mr    { margin-right: 5px; }

.page-title     { margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -.03em; font-weight: 750; }
.page-title-lg  { margin: 0 0 10px; font-size: clamp(25px, 3.8vw, 34px); letter-spacing: -.03em; font-weight: 780; }
.page-title-xl  { margin: 12px 0 10px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.03em; font-weight: 800; }
.page-lede      { margin: 0; color: var(--text-muted); max-width: 62ch; font-size: 15px; }
.sub-heading    { font-size: 18px; margin: 0 0 10px; letter-spacing: -.015em; }
.form-heading   { font-size: 18px; margin: 28px 0 14px; letter-spacing: -.015em; }
.country-pill   { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 13px; }
.big-404        { font-size: 56px; margin: 0 0 6px; letter-spacing: -.04em; font-weight: 800; }

/* ---------- Uploaded brand image ----------------------------------------- */
/* A logo is an <img> only when one has been uploaded; otherwise the monogram
   markup above is used. Height is capped so an oversized upload cannot push
   the 56px header out of shape. */
.brand-img { display: block; height: 28px; width: auto; max-width: 220px; object-fit: contain; }
.brand-img-sized { width: var(--logo-w, auto); height: auto; max-height: 34px; }
.site-footer .brand-img { height: 24px; }

/* ---------- Employer account area ---------------------------------------- */
/* The only tabular data on the public site. Deliberately quiet — this is a
   utility screen, not part of the board's front door. */

.page-head-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 8px;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); font-weight: 700;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface); }
.data-table a { font-weight: 600; }
.data-table a:hover { color: var(--accent); }
.data-table .right { text-align: right; white-space: nowrap; }
.data-table .right .btn { margin-left: 6px; }

.u-inline { display: inline-block; }

/* Below this width the four columns stop being readable, so each row becomes
   a stacked card with its column name as a label. */
@media (max-width: 620px) {
  .data-table thead { display: none; }
  .data-table tbody tr {
    display: block; padding: 12px 0; border-bottom: 1px solid var(--border);
  }
  .data-table td { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; border: 0; }
  .data-table td::before {
    content: attr(data-label); color: var(--text-dim); font-size: 12.5px; flex-shrink: 0;
  }
  .data-table .right { text-align: left; }
  .data-table .right .btn { margin: 6px 6px 0 0; }
}

/* ============================================================================
   Post-a-job page — v1.0
   Two columns on a desktop: the form, and a live preview that follows you down
   the page. On a phone the preview moves above the form and collapses, because
   a sticky panel on a 700px-tall screen would eat the form it is describing.
   ========================================================================== */

.hire-hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 300px at 15% -20%, var(--accent-glow), transparent 60%),
    var(--surface);
}
.hire-hero-inner { padding: 40px 0 32px; }
.hire-trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin: 18px 0 0; padding: 0; list-style: none;
  font-size: 13.5px; color: var(--text-muted);
}
.hire-trust li { display: flex; align-items: center; gap: 7px; }
.hire-trust li::before {
  content: '✓'; color: var(--accent); font-weight: 800; font-size: 12px;
}

.hire-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px; align-items: start; padding: 32px 0 64px;
}
.hire-side { position: sticky; top: 72px; display: grid; gap: 16px; }

.hire-step {
  padding: 24px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-h {
  display: flex; align-items: center; gap: 11px;
  margin: 0 0 18px; font-size: 17px; letter-spacing: -.02em;
}
.step-n {
  display: grid; place-items: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 800;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.salary-row { display: grid; grid-template-columns: 1fr auto 1fr 110px; gap: 8px; align-items: center; }
.salary-dash { color: var(--text-dim); }

.counter { font-variant-numeric: tabular-nums; font-weight: 600; }
.counter.short { color: var(--warn); }
.counter.ok { color: var(--accent); }

/* ---------- Package cards ------------------------------------------------ */

.pkg-grid { display: grid; gap: 12px; }
.pkg { display: block; cursor: pointer; position: relative; }
.pkg input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.pkg-body {
  display: block; padding: 16px 18px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg); transition: border-color .15s ease, background .15s ease;
}
.pkg:hover .pkg-body { border-color: var(--text-dim); }
.pkg input:checked + .pkg-body {
  border-color: var(--accent);
  background: var(--accent-glow);
}
/* Focus has to be visible on the label, since the real radio is off-screen. */
.pkg input:focus-visible + .pkg-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.pkg-flag {
  position: absolute; top: -9px; right: 14px; z-index: 1;
  padding: 2px 9px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}
.pkg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pkg-name { font-weight: 700; font-size: 15.5px; }
.pkg-price { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.pkg-blurb { display: block; margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.pkg-perks {
  margin: 12px 0 0; padding: 0; list-style: none;
  display: grid; gap: 5px; font-size: 12.5px; color: var(--text-muted);
}
.pkg-perks li { display: flex; align-items: flex-start; gap: 7px; }
.pkg-perks li::before { content: '✓'; color: var(--accent); font-weight: 800; flex-shrink: 0; }

/* ---------- Preview ------------------------------------------------------ */

.preview-card, .order-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim);
}
.preview-toggle {
  background: none; border: 0; padding: 2px 6px; cursor: pointer;
  color: var(--text-muted); font: inherit; text-transform: none; letter-spacing: 0;
  border-radius: 5px;
}
.preview-toggle:hover { color: var(--text); background: var(--surface-2); }
.preview-note { margin: 0 0 10px; font-size: 12.5px; color: var(--text-dim); }

/* The preview reuses the real .job-row rules, so what an employer sees is the
   component the board actually renders — not a drawing of it. */
.preview-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.preview-list .job-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px 11px; }
.preview-list .job-row:hover { transform: none; background: none; }
.preview-list .job-logo { width: 34px; height: 34px; font-size: 12px; }
.preview-list .tag-list, .preview-list .job-region, .preview-list .job-apply { display: none; }
.preview-list .job-salary { grid-column: 2; font-size: 12px; }
.preview-list .job-age { grid-column: 3; grid-row: 1; }
.preview-list .job-title { font-size: 14px; }

.preview-page {
  margin-top: 14px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
}
.preview-page-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.job-logo.lg { width: 40px; height: 40px; font-size: 14px; }
.preview-page-head strong { display: block; font-size: 14.5px; letter-spacing: -.015em; }
.preview-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.preview-chips .meta-chip { font-size: 11.5px; padding: 3px 8px; }
.preview-body-text {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
  max-height: 190px; overflow: hidden; position: relative;
}
.preview-body-text.is-placeholder { color: var(--text-dim); font-style: italic; }
.preview-body-text p { margin: 0 0 7px; }
.preview-body-text strong { display: block; color: var(--text); margin: 10px 0 4px; }
/* Fades the cut-off rather than ending mid-word. */
.preview-body-text::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 40px;
  background: linear-gradient(transparent, var(--bg));
}

.order-card h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: -.01em; }
.order-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.order-line strong { font-size: 19px; letter-spacing: -.02em; }
.order-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); }
.order-pay { margin: 8px 0 0; font-size: 12px; color: var(--text-dim); }

/* ---------- Small screens ------------------------------------------------
   The preview goes first — an employer should see what they are buying before
   they start typing — but collapsed, so it costs one line rather than a
   screenful. Sticky is dropped entirely; on a short viewport a pinned panel
   just squeezes the form. */
@media (max-width: 940px) {
  .hire-grid { grid-template-columns: 1fr; gap: 20px; }
  .hire-side { position: static; order: -1; }
  .preview-card { order: -1; }
}
@media (max-width: 620px) {
  .hire-hero-inner { padding: 28px 0 24px; }
  .hire-step { padding: 18px 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .salary-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .salary-dash { display: none; }
  .salary-row select { grid-column: 1 / -1; }
  .pkg-body { padding: 14px 15px; }
  .pkg-price { font-size: 17px; }
  .hire-trust { gap: 6px 16px; font-size: 12.5px; }
  /* A full-width action at the bottom of the viewport is the one control that
     should never require scrolling to find on a phone. */
  .page-hire #hire-submit {
    position: sticky; bottom: 12px; z-index: 20;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
  }
}

/* The preview column is 380px wide, so the row inside it needs tighter rules
   than the real board — the company name and employment type must not fight
   each other for a line. */
.preview-list .job-meta { font-size: 11.5px; gap: 5px; flex-wrap: nowrap; overflow: hidden; }
.preview-list .job-company { max-width: 42%; }
.preview-list .badge { font-size: 9px; padding: 1px 5px; flex-shrink: 0; }
.preview-list .job-age { font-size: 11px; }

/* A note under a URL field when the scheme was filled in for the visitor.
   Announced, never silent — quietly rewriting what someone typed is how a form
   loses trust, and this one is asking for money. */
.scheme-note {
  display: block; margin-top: 6px; font-size: 12.5px;
  color: var(--accent); font-weight: 600;
}
