:root {
  --font-ui: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --display-style: normal;
  --display-weight: 500;

  --bg: oklch(0.985 0.008 75);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.965 0.01 75);
  --surface-hover: oklch(0.95 0.012 75);
  --ink: oklch(0.20 0.012 60);
  --ink-soft: oklch(0.42 0.012 60);
  --ink-muted: oklch(0.60 0.012 60);
  --ink-faint: oklch(0.78 0.008 60);
  --line: oklch(0.91 0.008 75);
  --line-strong: oklch(0.82 0.012 75);
  --good: oklch(0.55 0.12 155);
  --warn: oklch(0.72 0.16 65);

  --accent: oklch(0.50 0.16 250);
  --accent-2: oklch(0.66 0.17 50);
  --accent-ink: oklch(0.99 0.01 60);
  --tint: oklch(0.94 0.03 250);
  --tint-2: oklch(0.94 0.04 55);

  --shadow-card: 0 1px 0 oklch(1 0 0 / .8) inset, 0 1px 2px oklch(0 0 0 / .04), 0 2px 8px oklch(0 0 0 / .035);
  --shadow-pop: 0 8px 32px oklch(0 0 0 / .12), 0 1px 0 oklch(1 0 0 / .9) inset;
}

[data-theme="dark"] {
  --bg: oklch(0.165 0.008 65);
  --surface: oklch(0.205 0.008 65);
  --surface-2: oklch(0.235 0.008 65);
  --surface-hover: oklch(0.265 0.008 65);
  --ink: oklch(0.96 0.005 75);
  --ink-soft: oklch(0.78 0.005 75);
  --ink-muted: oklch(0.58 0.005 75);
  --ink-faint: oklch(0.42 0.005 75);
  --line: oklch(0.30 0.008 65);
  --line-strong: oklch(0.40 0.008 65);
  --shadow-card: 0 1px 0 oklch(1 0 0 / .04) inset, 0 1px 2px oklch(0 0 0 / .3), 0 4px 16px oklch(0 0 0 / .25);
  --shadow-pop: 0 12px 40px oklch(0 0 0 / .5), 0 1px 0 oklch(1 0 0 / .05) inset;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.dot { color: var(--ink-faint); margin: 0 .4em; }
.muted { color: var(--ink-muted); }

/* ── HEADER ─────────────────────────────────────────────────────────────── */

.hdr {
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px) saturate(120%);
  background: color-mix(in oklab, var(--bg), transparent 8%);
}
.hdr-brand { display: flex; align-items: center; gap: 12px; }
.hdr-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.hdr-name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; font-size: 20px; text-decoration: none; color: var(--ink); }
.hdr-tld { color: var(--accent); }
.hdr-tagline { font-size: 11px; color: var(--ink-muted); margin-top: 2px; letter-spacing: 0.02em; }

.hdr-search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0 14px;
  height: 38px;
  color: var(--ink-soft);
  transition: border .15s, box-shadow .15s;
}
.hdr-search:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink), transparent 92%);
}
.hdr-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); min-width: 0; }
.hdr-search input::placeholder { color: var(--ink-muted); }
.hdr-search kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-muted); background: var(--surface-2); }

.hdr-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.hdr-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  height: 34px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 13px;
  display: flex; align-items: center; gap: 6px; transition: background .12s, border-color .12s;
}
.hdr-btn:hover { background: var(--surface-hover); }
.hdr-btn.icon { width: 34px; padding: 0; justify-content: center; }
.hdr-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hdr-btn.primary:hover { opacity: 0.88; }
.hdr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hdr-badge { font-size: 11px; font-family: var(--font-mono); padding: 2px 6px; background: var(--tint); color: var(--ink); border-radius: 4px; }
.hdr-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 12px; letter-spacing: 0.02em; border: 0; }

/* ── MAIN ────────────────────────────────────────────────────────────────── */

.main { max-width: 1320px; margin: 0 auto; padding: 48px 32px 96px; width: 100%; }

.page-title { margin-bottom: 32px; max-width: 800px; }
.page-title h1 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(42px, 5.5vw, 76px); line-height: 0.95; letter-spacing: -0.02em; color: var(--ink); display: flex; flex-direction: column; }
.t-display { font-style: var(--display-style); }
.t-display.em { color: var(--accent-2); }
.page-sub { font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; }
.page-sub b { color: var(--ink); font-weight: 600; }

/* ── TRENDING ─────────────────────────────────────────────────────────────── */

.trend { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.trend-label { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.trend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 80%); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent), transparent 92%); } }
.trend-rail { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.trend-rail::-webkit-scrollbar { display: none; }
.trend-pill { appearance: none; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 13px; white-space: nowrap; transition: all .12s; }
.trend-pill:hover { border-color: var(--ink-soft); }
.trend-pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.trend-count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.trend-pill.is-active .trend-count { color: var(--bg); opacity: 0.7; }

/* ── FILTER BAR ───────────────────────────────────────────────────────────── */

.fbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.fbar-group { display: flex; align-items: center; gap: 8px; }
.fbar-grouplabel { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }
.fbar-divider { width: 1px; height: 24px; background: var(--line); }
.fbar-clear { margin-left: auto; background: transparent; border: 0; color: var(--ink-soft); font: inherit; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; padding: 0; }
.fbar-clear:hover { color: var(--ink); }
.fbar-exclude { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; font-size: 13px; padding: 4px 10px; width: 160px; outline: none; }
.fbar-exclude:focus { border-color: var(--ink-soft); }
.fbar-exclude::placeholder { color: var(--ink-muted); }
.grid-sidebar .fbar-exclude { width: 100%; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 8px; gap: 2px; }
.seg-opt { appearance: none; border: 0; background: transparent; color: var(--ink-soft); padding: 4px 11px; border-radius: 6px; font: inherit; font-size: 13px; }
.seg-opt:hover { color: var(--ink); }
.seg-opt.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / .06); font-weight: 500; }
[data-theme="dark"] .seg-opt.is-active { background: var(--ink); color: var(--bg); }

.fselect { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); position: relative; }
.fselect:hover { border-color: var(--ink-soft); }
.fselect-label { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.fselect select { appearance: none; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); padding: 0 18px 0 0; outline: none; cursor: pointer; }
.fselect-chev { position: absolute; right: 8px; color: var(--ink-muted); pointer-events: none; }

/* Sidebar filter variant */
.grid-sidebar .fbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; position: sticky; top: 72px; margin-bottom: 0; gap: 10px; }
.grid-sidebar .fbar .fbar-divider { width: 100%; height: 1px; margin: 2px 0; }
.grid-sidebar .fbar .fbar-group { flex-direction: column; align-items: stretch; gap: 6px; }
.grid-sidebar .fbar .seg { width: 100%; }
.grid-sidebar .fbar .seg-opt { flex: 1; text-align: center; }
.grid-sidebar .fbar .fselect { width: 100%; }
.grid-sidebar .fbar-clear { margin-left: 0; text-align: left; padding: 4px 0; }

/* ── LANGUAGE PILLS ────────────────────────────────────────────────────────── */

.lang-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.lang-pill {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); padding: 3px 10px; border-radius: 999px;
  font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.lang-pill:hover { border-color: var(--ink-soft); color: var(--ink); }
.lang-pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-theme="dark"] .lang-pill.is-active { background: var(--ink); color: var(--bg); }
.grid-sidebar .lang-pills { gap: 4px; }

/* ── SALARY FILTER ─────────────────────────────────────────────────────────── */

.sal-filt { display: flex; flex-direction: column; gap: 6px; min-width: 200px; flex: 1; max-width: 260px; }
.sal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sal-readout { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sal-readout b { color: var(--ink); font-weight: 600; font-family: var(--font-mono); font-size: 11px; }
.sal-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 26px; align-items: end; }
.sal-bar { background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.85; }
.sal-bar.is-dim { background: var(--line-strong); opacity: 0.7; }
.sal-range { position: relative; height: 14px; margin: 0 -2px; }
.sal-range input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; appearance: none; background: transparent; pointer-events: none; }
.sal-range input[type="range"]::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); cursor: ew-resize; box-shadow: 0 1px 2px oklch(0 0 0 / .2); }
.sal-range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); cursor: ew-resize; }
.sal-ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); letter-spacing: 0.04em; }
.grid-sidebar .sal-filt { width: 100%; max-width: none; min-width: 0; }

/* ── GRID ────────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 28px; align-items: start; }
.grid-topbar { grid-template-columns: 1fr 320px; }
.grid-topbar.with-drawer { grid-template-columns: 1fr 420px; }
.grid-sidebar { grid-template-columns: 224px 1fr 320px; gap: 20px; }
.grid-sidebar.with-drawer { grid-template-columns: 224px 1fr 420px; }

.list { display: flex; flex-direction: column; gap: 8px; }

/* ── JOB ROW ─────────────────────────────────────────────────────────────── */

.jrow {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; display: grid; grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: start; cursor: pointer;
  transition: border-color .12s, box-shadow .12s; box-shadow: var(--shadow-card);
}
.jrow:hover { border-color: var(--ink-soft); }
.jrow.is-open { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow-card); }
.jrow.is-promoted {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, #ffe680 0%, #c9870e 50%, #ffe680 100%) border-box;
  box-shadow: 0 0 20px rgba(201, 135, 14, 0.14), var(--shadow-card);
}
.jrow.is-promoted:hover {
  box-shadow: 0 0 28px rgba(201, 135, 14, 0.24), var(--shadow-card);
}
.jrow.is-spacious { padding: 22px 24px; gap: 18px; }
.jrow.is-dense { padding: 10px 16px; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; }

.jrow-main { min-width: 0; }
.jrow-location { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.jrow-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.jrow.is-spacious .jrow-title { font-size: 18px; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.01em; }
.jrow.is-dense .jrow-title { font-size: 13px; font-weight: 500; }

.jrow-titlerow { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; margin-bottom: 4px; }
.jrow-salary { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.jrow.is-dense .jrow-salary { font-size: 12px; }

.jrow-meta { display: flex; align-items: center; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; row-gap: 2px; }
.jrow-meta > * { white-space: nowrap; }
.jrow-company { font-weight: 500; color: var(--ink); }
.jrow-mode { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; font-weight: 500; letter-spacing: 0.01em; }
.mode-remote { background: color-mix(in oklab, var(--good), transparent 88%); color: var(--good); }
.mode-hybrid { background: var(--tint); color: var(--accent); }

.jrow-summary { margin: 8px 0 6px; color: var(--ink-soft); line-height: 1.55; font-size: 13px; max-width: 580px; }
.jrow-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.jrow.is-dense .jrow-tags { display: none; }
.tag { font-size: 11px; padding: 3px 8px; background: var(--surface-2); color: var(--ink-soft); border-radius: 4px; font-family: var(--font-mono); letter-spacing: 0.01em; }
.tag-native { background: color-mix(in oklab, var(--tint), transparent 30%); color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent), transparent 70%); }
.tag-promoted { background: color-mix(in oklab, var(--accent-2), transparent 85%); color: var(--accent-2); border: 1px solid color-mix(in oklab, var(--accent-2), transparent 65%); font-weight: 600; }
.tag-source { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-muted); }

.jrow-right { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jrow-matchlabel { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

/* ── MATCH METER ─────────────────────────────────────────────────────────── */

.match-meter { position: relative; display: grid; place-items: center; }
.match-num { position: absolute; font-family: var(--font-mono); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.jrow.is-spacious .match-num { font-size: 14px; }
.jrow.is-dense .match-num { font-size: 10px; }

/* ── COMPANY AVATAR ─────────────────────────────────────────────────────── */

.company-avatar { border-radius: 8px; display: grid; place-items: center; font-weight: 600; color: white; letter-spacing: -0.02em; flex-shrink: 0; overflow: hidden; }
.company-avatar img { width: 100%; height: 100%; object-fit: contain; }

/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */

.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 48px; text-align: center; }
.empty h4 { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: 26px; margin: 0 0 8px; line-height: 1.2; color: var(--ink); }
.empty p { color: var(--ink-soft); margin: 0 0 20px; }
.empty-btn { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); border: 0; font: inherit; }

/* ── DRAWER ──────────────────────────────────────────────────────────────── */

.drawer { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 72px; max-height: calc(100vh - 100px); overflow-y: auto; box-shadow: var(--shadow-card); animation: drawerIn .18s ease-out; }
@keyframes drawerIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.drawer-close { background: transparent; border: 0; color: var(--ink-soft); font: inherit; font-size: 13px; padding: 0; }
.drawer-close:hover { color: var(--ink); }
.drawer-actions { display: flex; gap: 8px; }
.drawer-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13px; }
.drawer-btn:hover { background: var(--surface-hover); }
.drawer-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.drawer-btn.primary:hover { opacity: 0.88; }
.drawer-btn.applied { background: color-mix(in oklab, var(--good), transparent 88%); color: var(--good); border-color: color-mix(in oklab, var(--good), transparent 60%); }

.drawer-body { padding: 22px 20px 32px; display: flex; flex-direction: column; gap: 24px; }
.drawer-hero { display: flex; gap: 14px; align-items: flex-start; }
.drawer-title { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: 28px; margin: 0 0 6px; line-height: 1.2; letter-spacing: -0.01em; }
.drawer-company { margin: 0; font-size: 13px; color: var(--ink-soft); }
.drawer-company b { color: var(--ink); }

.drawer-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px; background: var(--surface-2); border-radius: 10px; }
.drawer-facts > div { display: flex; flex-direction: column; gap: 2px; }
.fact-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); font-weight: 600; }
.fact-v { font-size: 13px; color: var(--ink); }

.drawer-match { background: color-mix(in oklab, var(--accent), transparent 92%); border: 1px solid color-mix(in oklab, var(--accent), transparent 75%); border-radius: 12px; padding: 16px; }
.drawer-match-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.drawer-match-head h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.drawer-match-head p { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); }
.drawer-match-loading { font-size: 13px; color: var(--ink-muted); font-style: italic; }
.drawer-reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.drawer-reasons li { font-size: 13px; color: var(--ink); padding-left: 18px; position: relative; line-height: 1.5; }
.drawer-reasons li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--font-mono); }

.drawer-section h4 { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: 18px; margin: 0 0 10px; line-height: 1.25; color: var(--ink); letter-spacing: -0.01em; }
.drawer-section p { margin: 0 0 10px; color: var(--ink-soft); line-height: 1.65; font-size: 14px; }
.drawer-section ul, .drawer-section ol { margin: 0 0 10px; padding-left: 20px; color: var(--ink-soft); line-height: 1.65; font-size: 14px; }
.drawer-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── RAIL (no selection) ────────────────────────────────────────────────── */

.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 72px; }
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 20px; box-shadow: var(--shadow-card); }
.rail-eyebrow { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; display: block; margin-bottom: 8px; }
.rail-card h4 { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: 20px; margin: 0 0 8px; line-height: 1.25; letter-spacing: -0.005em; color: var(--ink); }
.rail-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.rail-hint { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rail-hint .rail-eyebrow { color: color-mix(in oklab, var(--bg), transparent 50%); }
.rail-hint h4 { color: var(--bg); }
.rail-hint p { color: color-mix(in oklab, var(--bg), transparent 30%); }

/* ── AD / SPONSORED ─────────────────────────────────────────────────────── */

.gads { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; box-shadow: var(--shadow-card); }
.gads-label { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; display: block; margin-bottom: 10px; }
.gads-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); padding: 32px 16px; min-height: 200px; }
.gads-mark { font-family: 'Geist', system-ui, sans-serif; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.gads-ads { color: var(--ink-soft); font-weight: 500; }
.gads-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 0.04em; }

/* ── MODAL ───────────────────────────────────────────────────────────────── */

.modal-overlay { position: fixed; inset: 0; background: oklch(0 0 0 / .48); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 28px 32px; width: 100%; max-width: 480px; box-shadow: var(--shadow-pop); animation: slideUp .2s ease-out; position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } }
.modal-wide { max-width: 640px; }
.modal-x { position: absolute; top: 16px; right: 16px; appearance: none; border: 0; background: transparent; font-size: 20px; color: var(--ink-muted); padding: 0; line-height: 1; }
.modal-x:hover { color: var(--ink); }
.modal h2 { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight); font-size: 24px; margin: 0 0 6px; letter-spacing: -0.01em; }
.modal p.sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 24px; }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; outline: none;
  transition: border .15s, box-shadow .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent), transparent 85%); }
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field .hint { font-size: 11px; color: var(--ink-muted); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-primary { width: 100%; padding: 12px; border-radius: 10px; border: 0; background: var(--ink); color: var(--bg); font: inherit; font-size: 14px; font-weight: 600; margin-top: 8px; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; }

.form-switch { font-size: 13px; color: var(--ink-soft); margin-top: 14px; text-align: center; }
.form-switch button { background: transparent; border: 0; color: var(--accent); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }

.form-error { background: color-mix(in oklab, oklch(0.55 0.18 25), transparent 88%); border: 1px solid color-mix(in oklab, oklch(0.55 0.18 25), transparent 70%); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: oklch(0.45 0.18 25); margin-bottom: 12px; }
.form-success { background: color-mix(in oklab, var(--good), transparent 88%); border: 1px solid color-mix(in oklab, var(--good), transparent 70%); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--good); margin-bottom: 12px; }

.seg-type { display: flex; gap: 8px; margin-bottom: 20px; }
.seg-type button { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 13px; transition: all .12s; }
.seg-type button:hover { border-color: var(--ink-soft); }
.seg-type button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

.cv-upload-area { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 28px; text-align: center; background: var(--surface-2); position: relative; }
.cv-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cv-upload-area p { margin: 8px 0 0; font-size: 13px; color: var(--ink-muted); }
.cv-upload-icon { font-size: 28px; margin-bottom: 8px; }
.cv-uploaded { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in oklab, var(--good), transparent 90%); border: 1px solid color-mix(in oklab, var(--good), transparent 65%); border-radius: 10px; font-size: 13px; color: var(--good); }

/* ── ADMIN PANEL ─────────────────────────────────────────────────────────── */

.admin-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); padding: 4px 10px; border-radius: 6px; font: inherit; font-size: 12px;
  cursor: pointer; transition: background .12s, border-color .12s;
}
.admin-btn:hover { background: var(--surface-hover); border-color: var(--ink-soft); }
.admin-btn.warn { border-color: color-mix(in oklab, var(--warn), transparent 40%); color: oklch(0.52 0.14 55); background: color-mix(in oklab, var(--warn), transparent 88%); }
.admin-btn.warn:hover { background: color-mix(in oklab, var(--warn), transparent 80%); }
.admin-btn.danger { border-color: color-mix(in oklab, oklch(0.55 0.18 25), transparent 50%); color: oklch(0.50 0.18 25); background: color-mix(in oklab, oklch(0.55 0.18 25), transparent 88%); }
.admin-btn.danger:hover { background: color-mix(in oklab, oklch(0.55 0.18 25), transparent 80%); }

.modal-btn { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 8px 16px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; transition: background .12s; }
.modal-btn:hover { background: var(--surface-hover); }
.modal-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.modal-btn.primary:hover { opacity: 0.88; }

/* ── SAVED SEARCHES POPOVER ─────────────────────────────────────────────── */

.ss-pop { position: fixed; top: 66px; right: 180px; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; z-index: 60; box-shadow: var(--shadow-pop); animation: slideUp .15s ease-out; }
.ss-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ss-head h4 { margin: 0; font-size: 13px; font-weight: 600; }
.ss-x { background: transparent; border: 0; font: inherit; font-size: 18px; color: var(--ink-muted); padding: 0; width: 24px; height: 24px; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */

.foot { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-soft); }
.foot-support { background: none; border: none; font: inherit; font-size: 12px; color: var(--ink-soft); cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.foot-support:hover { color: var(--ink); }

/* ── LOADING ─────────────────────────────────────────────────────────────── */

.loading-pulse { display: flex; flex-direction: column; gap: 8px; }
.loading-row { height: 80px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; animation: shimmer 1.4s infinite linear; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── DENSITY ─────────────────────────────────────────────────────────────── */

.density-spacious .list { gap: 12px; }
.density-dense .list { gap: 2px; }
.density-dense .jrow { border-radius: 8px; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .grid-sidebar { grid-template-columns: 200px 1fr; }
  .grid-sidebar.with-drawer { grid-template-columns: 200px 1fr; }
  .grid-sidebar .drawer { display: none; }
}

@media (max-width: 900px) {
  .hdr { grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; }
  .hdr-search { display: none; }
  .grid-topbar, .grid-topbar.with-drawer { grid-template-columns: 1fr; }
  .grid-sidebar { grid-template-columns: 1fr; }
  .grid-sidebar .fbar { position: static; }
  .main { padding: 24px 16px 64px; }
}

@media (max-width: 640px) {
  .jrow { grid-template-columns: auto 1fr; }
  .jrow.is-dense { grid-template-columns: auto 1fr; }
  .jrow-right { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
