/* ============================================================
   ApplyPilot — styles
   ============================================================ */
:root {
  --brand-ink: #1e3a8a; --brand-pilot: #b45309;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e9ecf1;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e3e7ed;
  --line-strong: #cfd6df;
  /* Brand: navy + royal blue from the ApplyPilot logo, amber ("Pilot") as the highlight */
  --accent: #1d4ed8;
  --accent-hover: #1e3a8a;
  --accent-ink: #ffffff;
  --accent-soft: #edf2ff;
  --accent-line: #bfd0f7;
  --bar: #2563eb;
  --pilot: #f59e0b;
  --pilot-soft: #fff7e0;
  --danger: #c2410c;
  --danger-soft: #fff1ea;
  --focus: 0 0 0 3px rgba(37, 99, 235, .28);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .18);
  --radius: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius-sm: 8px;
  --sidebar: 248px;

  /* Status badge colours (always paired with the status text) */
  --s-wishlist-bg: #f1f5f9; --s-wishlist-fg: #475569;
  --s-applied-bg: #e8f1ff;  --s-applied-fg: #1d4ed8;
  --s-applying-bg: #e0f6f8; --s-applying-fg: #0e7490;
  --s-screening-bg: #f3ecff; --s-screening-fg: #6d28d9;
  --s-interview-bg: #fff6e0; --s-interview-fg: #a16207;
  --s-offer-bg: #e6f7ee;    --s-offer-fg: #15803d;
  --s-rejected-bg: #fdecec; --s-rejected-fg: #b91c1c;
  --s-closed-bg: #eef0f3;   --s-closed-fg: #6b7280;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-ink: #ffffff; --brand-pilot: #fbbf24;
    --bg: #0a0f1c;
    --surface: #111a2e;
    --surface-2: #16213a;
    --surface-3: #1d2a47;
    --ink: #e8eef8;
    --ink-2: #c3cde0;
    --muted: #8e9bb4;
    --line: #22304d;
    --line-strong: #314466;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-ink: #0a0f1c;
    --accent-soft: #15254a;
    --accent-line: #2c4d8f;
    --bar: #60a5fa;
    --pilot: #fbbf24;
    --pilot-soft: #2e2510;
    --danger: #fb923c;
    --danger-soft: #3a1f14;
    --focus: 0 0 0 3px rgba(96, 165, 250, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
    --s-wishlist-bg: #1f2737; --s-wishlist-fg: #b4bfd1;
    --s-applied-bg: #172a4d;  --s-applied-fg: #93b8ff;
    --s-applying-bg: #0f3038; --s-applying-fg: #67e8f9;
    --s-screening-bg: #2a1d4a; --s-screening-fg: #c4a8ff;
    --s-interview-bg: #3a2c0e; --s-interview-fg: #f5c95c;
    --s-offer-bg: #11331f;    --s-offer-fg: #6ee09a;
    --s-rejected-bg: #3d1717; --s-rejected-fg: #fca5a5;
    --s-closed-bg: #23272f;   --s-closed-fg: #9ca3af;
  }
}
/* The Dark mode switch: same colours as the system dark setting, chosen by hand. */
:root[data-theme="dark"] {
    --brand-ink: #ffffff; --brand-pilot: #fbbf24;
    --bg: #0a0f1c;
    --surface: #111a2e;
    --surface-2: #16213a;
    --surface-3: #1d2a47;
    --ink: #e8eef8;
    --ink-2: #c3cde0;
    --muted: #8e9bb4;
    --line: #22304d;
    --line-strong: #314466;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-ink: #0a0f1c;
    --accent-soft: #15254a;
    --accent-line: #2c4d8f;
    --bar: #60a5fa;
    --pilot: #fbbf24;
    --pilot-soft: #2e2510;
    --danger: #fb923c;
    --danger-soft: #3a1f14;
    --focus: 0 0 0 3px rgba(96, 165, 250, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
    --s-wishlist-bg: #1f2737; --s-wishlist-fg: #b4bfd1;
    --s-applied-bg: #172a4d;  --s-applied-fg: #93b8ff;
    --s-applying-bg: #0f3038; --s-applying-fg: #67e8f9;
    --s-screening-bg: #2a1d4a; --s-screening-fg: #c4a8ff;
    --s-interview-bg: #3a2c0e; --s-interview-fg: #f5c95c;
    --s-offer-bg: #11331f;    --s-offer-fg: #6ee09a;
    --s-rejected-bg: #3d1717; --s-rejected-fg: #fca5a5;
    --s-closed-bg: #23272f;   --s-closed-fg: #9ca3af;
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
/* Browser surfaces, themed from the palette */
::selection { background: var(--accent-line); color: var(--ink); }
html { scrollbar-color: var(--line-strong) transparent; accent-color: var(--accent); }
button, a, .nav-item, .mini-item, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand-mark { width: 34px; height: 34px; display: block; flex: none; }
.brand-name { font-weight: 800; font-size: 1.15rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--brand-ink); }
.brand-pilot { color: var(--brand-pilot); }
.brand-name small { display: block; font-weight: 500; color: var(--muted); font-size: 0.75rem; }
.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: var(--radius-sm); border: 0; background: none;
  font: 500 0.92rem inherit; font-family: inherit; color: var(--ink-2); cursor: pointer; text-align: left;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); background: var(--surface-3); padding: 1px 7px; border-radius: 999px; }
.nav-item[aria-current="page"] .count { background: var(--surface); color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.profile-chip { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left; font: inherit; color: inherit; border-radius: var(--radius-sm); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex: none; }
.profile-chip .who { min-width: 0; }
.profile-chip .who b { display: block; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-chip .who span { display: block; font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 0.78rem; color: var(--muted); margin-top: 12px; }
.privacy svg { width: 14px; height: 14px; margin-top: 2px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; gap: 16px; }
.topbar h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; }
.topbar .sub { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; }
.content { max-width: 1180px; width: 100%; margin: 0 auto; padding: 28px 32px 64px; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 0.88rem/1 inherit; font-family: inherit;
  padding: 0 14px; height: 38px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-sm); text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn svg.i { width: 16px; height: 16px; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--line-strong); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 0.82rem; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 0.95rem; }
.btn.icon { width: 34px; height: 34px; padding: 0; }
.btn:disabled { opacity: .55; cursor: default; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 0.92rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 12px; min-height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.textarea { resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hint { font-size: 0.82rem; color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 0.98rem; font-weight: 650; }
.card-head .hint { margin-left: auto; }
.card-body { padding: 18px 20px; }
.section-gap { display: grid; gap: 20px; }

/* ---------- Dashboard ---------- */
.hello { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.hello h2 { font-size: 1.45rem; font-weight: 700; }
.hello p { color: var(--muted); margin-top: 4px; }
.hello .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 1240px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 16px 18px; }
.kpi .label { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.kpi .label svg.i { width: 15px; height: 15px; color: var(--accent); }
.kpi .value { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .foot { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }

/* Pipeline bars: single hue, labelled, hover tooltip via title */
.pipeline { display: grid; gap: 12px; }
.pipe-row { display: grid; grid-template-columns: 92px 1fr 34px; gap: 12px; align-items: center; font-size: 0.86rem; }
.pipe-row .name { color: var(--ink-2); }
.pipe-row .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pipe-track { display: block; height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.pipe-fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 0; transition: width .4s ease; }
.pipe-row:hover .pipe-fill { filter: brightness(1.12); }

.mini-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.mini-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.mini-item:first-child { border-top: 0; }
.mini-item:hover { background: var(--surface-2); }
.mini-item .t { min-width: 0; flex: 1; }
.mini-item .t b { display: block; font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item .t span { display: block; font-size: 0.8rem; color: var(--muted); }
.mini-empty { padding: 22px 20px; color: var(--muted); font-size: 0.88rem; }

.logo-sq { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex: none; text-transform: uppercase; }

/* ---------- Chips / badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font-size: 0.8rem; font-weight: 500; }
.chip.hit { background: var(--s-offer-bg); color: var(--s-offer-fg); border-color: transparent; }
.chip.miss { background: var(--s-rejected-bg); color: var(--s-rejected-fg); border-color: transparent; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; display: grid; place-items: center; opacity: .7; }
.chip button:hover { opacity: 1; }
.chip button svg.i { width: 13px; height: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.s-Wishlist { background: var(--s-wishlist-bg); color: var(--s-wishlist-fg); }
.badge.s-Applying { background: var(--s-applying-bg); color: var(--s-applying-fg); }
.badge.s-Submitted { background: var(--s-applied-bg); color: var(--s-applied-fg); }
.badge.s-Screening { background: var(--s-screening-bg); color: var(--s-screening-fg); }
.badge.s-Interview { background: var(--s-interview-bg); color: var(--s-interview-fg); }
.badge.s-Offer { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.badge.s-Rejected { background: var(--s-rejected-bg); color: var(--s-rejected-fg); }
.badge.s-Closed { background: var(--s-closed-bg); color: var(--s-closed-fg); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.tag.warn { background: var(--s-interview-bg); color: var(--s-interview-fg); }
.match { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.84rem; }
.match small { color: var(--muted); font-weight: 500; }

/* Status select styled as a badge */
.status-select { appearance: none; border: 0; cursor: pointer; font: 600 0.76rem inherit; font-family: inherit; padding: 4px 24px 4px 10px; border-radius: 999px; background-repeat: no-repeat; background-position: right 7px center; background-size: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.status-select.s-Wishlist { background-color: var(--s-wishlist-bg); color: var(--s-wishlist-fg); }
.status-select.s-Applying { background-color: var(--s-applying-bg); color: var(--s-applying-fg); }
.status-select.s-Submitted { background-color: var(--s-applied-bg); color: var(--s-applied-fg); }
.status-select.s-Screening { background-color: var(--s-screening-bg); color: var(--s-screening-fg); }
.status-select.s-Interview { background-color: var(--s-interview-bg); color: var(--s-interview-fg); }
.status-select.s-Offer { background-color: var(--s-offer-bg); color: var(--s-offer-fg); }
.status-select.s-Rejected { background-color: var(--s-rejected-bg); color: var(--s-rejected-fg); }
.status-select.s-Closed { background-color: var(--s-closed-bg); color: var(--s-closed-fg); }
.status-select option { background: var(--surface); color: var(--ink); }

/* ---------- Applications ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 260px; }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search .input { padding-left: 34px; }
.toolbar .select { width: auto; min-width: 150px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0 10px; height: 30px; border-radius: 6px; font: 500 0.82rem inherit; font-family: inherit; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg svg.i { width: 15px; height: 15px; }

.table { width: 100%; }
.trow { display: grid; grid-template-columns: minmax(220px, 2.2fr) 130px 1.3fr 110px 70px 144px; gap: 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.thead { border-top: 0; padding-top: 11px; padding-bottom: 11px; font-size: 0.74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.trow .role { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trow .role .t { min-width: 0; }
.trow .role b { display: block; font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.trow .role b:hover { color: var(--accent); }
.trow .role .t > span { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.trow .cell { font-size: 0.86rem; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .cell.muted { color: var(--muted); }
.trow .acts { display: flex; gap: 2px; justify-content: flex-end; }
.trow:hover:not(.thead) { background: var(--surface-2); }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 220px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.col-head .n { margin-left: auto; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.col-body { padding: 4px 10px 12px; display: grid; gap: 8px; align-content: start; flex: 1; border-radius: 0 0 var(--radius) var(--radius); transition: background .15s; }
.col.drop .col-body { background: var(--accent-soft); outline: 2px dashed var(--accent-line); outline-offset: -4px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: grab; text-align: left; font: inherit; color: inherit; width: 100%; }
.kcard:hover { border-color: var(--line-strong); }
.kcard.dragging { opacity: .5; }
.kcard b { display: block; font-size: 0.88rem; font-weight: 600; }
.kcard .co { font-size: 0.8rem; color: var(--muted); }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.col-empty { font-size: 0.8rem; color: var(--muted); text-align: center; padding: 18px 6px; }

/* Empty states read like the cards around them: left-aligned, the icon beside the heading rather than in a tile above it. */
.empty-state { padding: 32px 28px; }
.empty-title { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; }
.empty-title svg.i { width: 22px; height: 22px; color: var(--accent); }
.empty-state h3 { font-size: 1.08rem; }
.empty-state p { color: var(--muted); margin: 8px 0 20px; max-width: 62ch; }
.empty-state .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state .setup-list { margin-left: 0; }

/* ---------- Resume builder ---------- */
.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.builder-grid .textarea { min-height: 320px; font-size: 0.86rem; }
.panel-label { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-height: 32px; }
.panel-label h3 { font-size: 0.92rem; font-weight: 650; }
.panel-label .btn { margin-left: auto; }
.builder-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 26px; }
details.kw { margin-top: 14px; }
details.kw summary { cursor: pointer; font-size: 0.84rem; font-weight: 600; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.kw summary::-webkit-details-marker { display: none; }
details.kw summary svg.i { width: 15px; height: 15px; transition: transform .15s; }
details.kw[open] summary svg.i { transform: rotate(90deg); }
details.kw .textarea { margin-top: 10px; min-height: 64px; }
.results { display: grid; gap: 18px; }
.score-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.ring { position: relative; width: 116px; height: 116px; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .val b { font-size: 1.7rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ring .val span { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.score-card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.score-card p { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.88rem; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .mk { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.check-list .mk svg.i { width: 12px; height: 12px; stroke-width: 3; }
.check-list .mk.ok { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.check-list .mk.bad { background: var(--s-rejected-bg); color: var(--s-rejected-fg); }
#tailoredOut { min-height: 340px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; background: var(--surface-2); }
.inline-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink-2); font-size: 0.85rem; }
.inline-note svg.i { color: var(--accent); width: 17px; height: 17px; margin-top: 1px; }

/* ---------- Profile ---------- */
.profile-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); min-height: 44px; cursor: text; }
.tag-input:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.tag-input input { flex: 1 1 140px; border: 0; outline: none; background: none; font: inherit; font-size: 0.9rem; color: var(--ink); padding: 4px; min-width: 120px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.suggest button { border: 1px dashed var(--line-strong); background: none; color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font: 500 0.78rem inherit; font-family: inherit; cursor: pointer; }
.suggest button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.data-actions { display: grid; gap: 10px; }
.data-actions .btn { justify-content: flex-start; }
.danger-zone { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }

/* ---------- Dropzone ---------- */
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 28px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .ill { width: 46px; height: 46px; border-radius: 12px; background: var(--surface); color: var(--accent); display: grid; place-items: center; margin: 0 auto 12px; box-shadow: var(--shadow-sm); }
.dropzone b { display: block; font-size: 0.95rem; }
.dropzone span { font-size: 0.82rem; color: var(--muted); }
.file-status { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.86rem; }
.file-status.error { background: var(--danger-soft); color: var(--danger); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 6px; }
.dlg-head h2 { font-size: 1.12rem; }
.dlg-head p { color: var(--muted); font-size: 0.86rem; margin-top: 3px; }
.dlg-head .btn.icon { margin-left: auto; margin-top: -4px; }
.dlg-body { padding: 14px 22px; overflow: auto; max-height: calc(100vh - 200px); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.dlg-foot .left { margin-right: auto; }

/* Onboarding */
#onboarding { width: min(680px, calc(100vw - 24px)); }
.ob-hero { padding: 30px 30px 8px; }
.ob-hero .brand-mark { width: 44px; height: 44px; margin-bottom: 18px; }
.ob-hero h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
.ob-hero p { color: var(--muted); margin-top: 6px; max-width: 52ch; }
.ob-steps { display: flex; gap: 6px; margin-top: 18px; }
.ob-steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.ob-steps i.on { background: var(--accent); }
.ob-body { padding: 18px 30px 8px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 20px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice:hover { border-color: var(--accent); box-shadow: var(--shadow); }
@media (hover: hover) and (pointer: fine) { .choice:hover { transform: translateY(-1px); } }
.choice .ill { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.choice b { font-size: 1rem; }
.choice span { font-size: 0.85rem; color: var(--muted); }
.choice .rec { font-size: 0.7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.ob-foot { display: flex; gap: 8px; align-items: center; padding: 18px 30px 26px; }
.ob-foot .left { margin-right: auto; }
.ob-privacy { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.8rem; margin-top: 16px; }
.ob-privacy svg.i { width: 15px; height: 15px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px);
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--ease-out); z-index: 100;
  max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
/* Apply */
.apply-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.apply-queue { position: sticky; top: 90px; }
.apply-queue .mini-list { max-height: 52vh; overflow-y: auto; }
.mini-item[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.queue-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.apply-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.apply-head .t { flex: 1 1 220px; min-width: 0; }
.apply-head h2 { font-size: 1.15rem; font-weight: 700; }
.apply-head p { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.apply-head-acts { display: flex; align-items: center; gap: 8px; }
.logo-sq.lg { width: 44px; height: 44px; font-size: 0.95rem; border-radius: 10px; }
.step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.74rem; font-weight: 700; display: grid; place-items: center; flex: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fit-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.fit-row b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.fit-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.qf-list { display: grid; }
.qf { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); }
.qf:first-child { border-top: 0; }
.qf .k { width: 110px; flex: none; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.qf .v { flex: 1; min-width: 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.qf .v.muted { color: var(--muted); font-style: italic; }
.submit-card .card-body { display: grid; gap: 14px; }
.applied-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--s-offer-bg); color: var(--s-offer-fg); font-size: 0.9rem; }
.applied-banner svg.i { flex: none; margin-top: 2px; }
.applied-banner b { display: block; }

/* Find jobs */
.input-btn { display: flex; gap: 8px; }
.input-btn .input { flex: 1; min-width: 0; }
.input-btn .btn.icon { height: 40px; width: 40px; flex: none; }
.find-form .field label span { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.chip .ats { color: var(--muted); font-weight: 500; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--radius); border: 1px solid var(--s-interview-fg); background: var(--s-interview-bg); color: var(--ink); font-size: 0.9rem; }
.notice svg.i { flex: none; margin-top: 2px; color: var(--s-interview-fg); }
.notice.error { border-color: var(--danger); background: var(--danger-soft); }
.notice.error svg.i { color: var(--danger); }
.notice b { display: block; margin-bottom: 2px; }
.notice code { font-size: 0.85em; background: var(--surface); padding: 1px 6px; border-radius: 5px; }
.find-form { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 0 14px; }
.find-terms { display: grid; grid-template-columns: 1.15fr 1.15fr 1fr; gap: 0 14px; }
.find-terms .field > span, .find-terms .field label span { display: flex; align-items: baseline; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.find-terms em { font-style: normal; font-weight: 500; color: var(--muted); }
.find-terms .link-btn { margin-left: auto; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.find-terms .link-btn:hover { text-decoration: underline; }
.find-terms-hint { margin: -4px 0 14px; font-size: 0.8rem; }
.tag.skill { background: var(--pilot-soft); color: #92400e; }
:root[data-theme="dark"] .tag.skill { color: #fcd34d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.skill { color: #fcd34d; } }
.find-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.find-row .btn { margin-left: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
#view-find > .card, #runPanel { margin-bottom: 18px; }
.find-toolbar { flex-wrap: wrap; }
.find-toolbar .check { padding: 0 4px; font-weight: 600; }
.toolbar-acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.result-list { overflow: hidden; }
.rrow { display: grid; grid-template-columns: 22px 36px minmax(0, 1fr) 58px auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.rrow:first-child { border-top: 0; }
.rrow.tracked { background: var(--surface-2); }
.rrow input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.rrow .logo-sq img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; background: #fff; }
.rrow .t { min-width: 0; }
.rrow .t b { display: block; font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .t > span { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.rtags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag.ok { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.tag.info { background: var(--s-applied-bg); color: var(--s-applied-fg); }
.tag.bad { background: var(--s-rejected-bg); color: var(--s-rejected-fg); }
.rrow .acts { display: flex; gap: 2px; }
.rdetail { grid-column: 1 / -1; padding: 6px 0 4px 70px; }
.rdetail .desc { white-space: pre-wrap; font-size: 0.85rem; color: var(--ink-2); max-height: 280px; overflow-y: auto; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.setup-list { list-style: none; padding: 0; margin: 18px auto 0; display: grid; gap: 8px; max-width: 460px; text-align: left; }
.setup-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; }
.setup-list .mk { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.setup-list .mk svg.i { width: 12px; height: 12px; }
.setup-list .mk.ok { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.setup-list .mk.bad { background: var(--s-interview-bg); color: var(--s-interview-fg); }
.run-list { display: grid; max-height: 420px; overflow-y: auto; }
.ritem { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line); }
.ritem:first-child { border-top: 0; }
.ritem .t b { display: block; font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ritem .t span { display: block; font-size: 0.8rem; color: var(--muted); }
.ritem .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.run-qa { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; margin-top: 4px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--pilot-soft); }
.run-qa .hint { grid-column: 1 / -1; display: flex; gap: 6px; align-items: flex-start; margin: 0 0 6px; font-size: 0.8rem; }
.run-qa .field { margin: 6px 0 2px; }
.run-qa .field span { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); }
.saved-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.saved-answers li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.saved-answers li:first-child { border-top: 0; }
.saved-answers li div { flex: 1; min-width: 0; }
.saved-answers b { display: block; font-size: 0.84rem; font-weight: 600; }
.saved-answers span { display: block; font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-qa-acts { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 6px; }
@media (max-width: 760px) { .run-qa { grid-column: 1 / -1; } }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; justify-self: start; }
.st .spinner { width: 11px; height: 11px; border-width: 2px; }
.st-wait, .st-skipped { background: var(--s-closed-bg); color: var(--s-closed-fg); }
.st-work { background: var(--s-applied-bg); color: var(--s-applied-fg); }
.st-applied { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.st-needs_you { background: var(--s-interview-bg); color: var(--s-interview-fg); }
.st-failed { background: var(--s-rejected-bg); color: var(--s-rejected-fg); }
.dlg-summary { display: grid; gap: 10px; margin-bottom: 16px; }
.dlg-summary div { display: flex; gap: 10px; align-items: baseline; font-size: 0.9rem; }
.dlg-summary b { min-width: 28px; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
dialog.wide { width: min(980px, calc(100vw - 32px)); }
.tailor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tailor-grid .textarea { min-height: 360px; font-size: 0.84rem; }
.tailor-notes { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 0.85rem; }
.tailor-notes ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

/* Sign in */
.auth { position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: var(--bg);
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: flex-start; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; margin: auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 28px 24px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(15,23,42,.08)); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-form h1 { font-size: 1.35rem; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 14px; font-size: 0.85rem; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; margin: 18px 0 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-social { width: 100%; justify-content: center; margin-bottom: 10px; text-decoration: none; }
.auth-social .brand-ico { width: 18px; height: 18px; }
.auth-social[aria-disabled="true"] { opacity: .55; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.auth-alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.88rem; background: var(--danger-soft); color: var(--ink); border: 1px solid var(--danger); }
.auth-alert.ok { background: var(--s-offer-bg); border-color: var(--s-offer-fg); }
.auth-alert a { word-break: break-all; }
.auth-terms { margin: 2px 0 16px; font-size: 0.85rem; }
.auth-legal { margin: 12px 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--muted); text-align: center; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); font: 600 0.8rem inherit; font-family: inherit; cursor: pointer; padding: 6px 8px; }
.pw-meter { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.pw-meter[data-s="2"] i { background: var(--s-interview-fg); }
.pw-meter[data-s="3"] i, .pw-meter[data-s="4"] i { background: var(--s-offer-fg); }
.pw-hint { display: block; margin-top: 6px; }
.trouble-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; font-size: 0.88rem; color: var(--ink-2); }
.trouble-list b { color: var(--ink); }
.logout-btn { width: 100%; justify-content: flex-start; margin-top: 8px; }
.web-status { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--s-applied-bg); color: var(--s-applied-fg); font-size: 0.86rem; }
.web-status.err { background: var(--danger-soft); color: var(--ink); }
.tag.muted { background: transparent; border: 1px dashed var(--line-strong); }

@media (max-width: 1080px) {
  .dash-grid, .profile-grid { grid-template-columns: 1fr; }
  .apply-grid { grid-template-columns: 1fr; }
  .apply-queue { position: static; }
  .apply-queue .mini-list { max-height: 280px; }
  .trow { grid-template-columns: minmax(200px, 2fr) 128px 100px 64px 144px; }
  .trow .c-loc { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30;
    flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
  }
  .brand, .sidebar-foot { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .nav-item { flex-direction: column; gap: 3px; font-size: 0.7rem; padding: 7px 4px; justify-content: center; text-align: center; }
  .nav-item .count { display: none; }
  .topbar-inner { padding: 14px 16px; }
  .topbar h1 { font-size: 1.3rem; }
  .topbar .sub { display: none; }
  .content { padding: 18px 16px 100px; }
  .builder-grid, .two-col, .grid-2, .choice-grid { grid-template-columns: 1fr; }
  .find-form, .find-terms, .id-form, .tailor-grid, .tailor-notes { grid-template-columns: 1fr; }
  .admin-grid, .kv { grid-template-columns: 1fr; }
  .admin-table .trow { grid-template-columns: 1fr auto; }
  .admin-table .trow > .cell { display: none; }
  .admin-table .trow > .c-keep { display: block; }
  .find-row .btn { margin-left: 0; width: 100%; }
  .toolbar-acts { margin-left: 0; width: 100%; }
  .toolbar-acts .btn { flex: 1; }
  .rrow { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .rrow .logo-sq { display: none; }
  .rrow .acts { grid-column: 2 / -1; }
  .rdetail { padding-left: 0; }
  .ritem { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ritem .acts { justify-content: flex-start; }
  .score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .thead { display: none; }
  .trow { grid-template-columns: 1fr auto; grid-template-areas: "role acts" "status match" "date date"; gap: 8px 12px; }
  .trow .role { grid-area: role; } .trow .c-status { grid-area: status; } .trow .c-match { grid-area: match; text-align: right; }
  .trow .c-date { grid-area: date; white-space: normal; } .trow .acts { grid-area: acts; }
  .ob-hero, .ob-body { padding-left: 20px; padding-right: 20px; }
  .ob-foot { padding: 16px 20px 22px; }
  .auth-card { padding: 22px 18px 20px; border-radius: 14px; }
  .input, .select, .textarea { font-size: 16px; }
  .hello .actions { margin-left: 0; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
  .spinner { animation: spin 1.4s linear infinite !important; }
  .btn:active:not(:disabled) { transform: none; }
  .toast, .toast.show { transform: translateX(-50%); }
}

/* ============================================================
   Visual refresh: gradients, illustrations, motion
   ============================================================ */
:root {
  --grad: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #3b82f6 100%);
  --grad-deep: linear-gradient(150deg, #0b1a45 0%, #1e3a8a 48%, #1d4ed8 100%);
  --grad-soft: linear-gradient(135deg, #edf2ff 0%, #f3f6ff 55%, #fff8e6 100%);
  --pilot-glow: rgba(251, 191, 36, .28);
  --ill-halo: #e3ebff; --ill-card: #ffffff; --ill-card-2: #eef3ff; --ill-card-3: #fff6dc;
  --ill-line: #e2e8f5; --ill-line-strong: #c5d3f0; --ill-accent: #1d4ed8; --ill-pink: #f59e0b; --ill-amber: #fbbf24;
  --ill-green: #22c55e; --ill-stroke: #d3ddf3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grad-soft: linear-gradient(135deg, #13234a 0%, #15295a 60%, #1b2f5c 100%); --pilot-glow: rgba(251, 191, 36, .1);
    --ill-halo: #182a52; --ill-card: #15203a; --ill-card-2: #1a2850; --ill-card-3: #2b2614;
    --ill-line: #283a5f; --ill-line-strong: #3f5a93; --ill-accent: #60a5fa; --ill-stroke: #2d4170;
  }
}
:root[data-theme="dark"] {
  --brand-ink: #ffffff; --brand-pilot: #fbbf24;
  --grad-soft: linear-gradient(135deg, #13234a 0%, #15295a 60%, #1b2f5c 100%); --pilot-glow: rgba(251, 191, 36, .1);
  --ill-halo: #182a52; --ill-card: #15203a; --ill-card-2: #1a2850; --ill-card-3: #2b2614;
  --ill-line: #283a5f; --ill-line-strong: #3f5a93; --ill-accent: #60a5fa; --ill-stroke: #2d4170;
}

/* Illustration parts */
svg.ill { width: 100%; height: auto; display: block; overflow: visible; }
.ill-halo { fill: var(--ill-halo); }
.ill-card { fill: var(--ill-card); stroke: var(--ill-stroke); stroke-width: 1.5; filter: drop-shadow(0 10px 18px rgba(30, 58, 138, .14)); }
.ill-card-back { fill: var(--ill-card-3); }
.ill-card-mid { fill: var(--ill-card-2); }
.ill-line { fill: var(--ill-line); }
.ill-line-strong { fill: var(--ill-line-strong); }
.ill-accent { fill: var(--ill-accent); }
.ill-check { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ill-pill { fill: var(--ill-pink); opacity: .85; }
.ill-plane { fill: #fff; stroke: var(--ill-accent); stroke-width: 2; stroke-linejoin: round; }
.ill-plane-fold { fill: none; stroke: var(--ill-accent); stroke-width: 2; stroke-linecap: round; }
.ill-trail { fill: none; stroke: var(--ill-accent); stroke-width: 2; stroke-dasharray: 4 7; opacity: .55; stroke-linecap: round; }
.ill-star { fill: var(--ill-amber); }
.ill-dot { fill: var(--ill-pink); }
.ill-brief-handle { fill: none; stroke: var(--ill-line-strong); stroke-width: 6; }
.ill-brief-band { fill: var(--ill-line); }
.ill-lens { fill: rgba(255, 255, 255, .55); }
.ill-lens-ring { fill: none; stroke: var(--ill-accent); stroke-width: 7; }
.ill-lens-handle { stroke: var(--ill-accent); stroke-width: 10; stroke-linecap: round; }
.ill-pin { fill: var(--ill-pink); }
.ill-pin-dot { fill: #fff; }
.ill-bar { fill: var(--ill-line-strong); }
.ill-trend { fill: none; stroke: var(--ill-pink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 1.6s .4s ease forwards; }
.ill-desk { fill: var(--ill-line-strong); }
.ill-leaf { fill: var(--ill-green); opacity: .8; }
.ill-leaf.l2 { opacity: .6; }
.ill-pot { fill: var(--ill-amber); opacity: .85; }

/* Motion */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes fly { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-10px, 8px) rotate(-4deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
@keyframes blob { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.08); } 66% { transform: translate(-20px, 20px) scale(.95); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.float { animation: float 6s ease-in-out infinite; transform-box: fill-box; }
.float.d2 { animation-delay: -2s; animation-duration: 7s; }
.float.d3 { animation-delay: -4s; animation-duration: 8s; }
.twinkle { animation: twinkle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.twinkle.d2 { animation-delay: -1s; } .twinkle.d3 { animation-delay: -2s; }
.plane { animation: fly 5s ease-in-out infinite; transform-box: fill-box; }
.bar-grow { transform-box: fill-box; transform-origin: bottom; animation: grow 1s .3s ease-out both; }

.view.animate { animation: fade .18s var(--ease-out) both; }
/* Staggered entrance only right after a page opens or new results arrive (.animate is set briefly) */
:not(.view).animate .kpi, :not(.view).animate .card, :not(.view).animate .rrow, :not(.view).animate .trow:not(.thead), :not(.view).animate .mini-item, :not(.view).animate .kcard { animation: rise .3s var(--ease-out) both; }
:not(.view).animate .kpis > :nth-child(2), :not(.view).animate .rrow:nth-child(2), :not(.view).animate .trow:nth-child(3), :not(.view).animate .mini-item:nth-child(2) { animation-delay: 30ms; }
:not(.view).animate .kpis > :nth-child(3), :not(.view).animate .rrow:nth-child(3), :not(.view).animate .trow:nth-child(4), :not(.view).animate .mini-item:nth-child(3) { animation-delay: 70ms; }
:not(.view).animate .kpis > :nth-child(4), :not(.view).animate .rrow:nth-child(4), :not(.view).animate .trow:nth-child(5), :not(.view).animate .mini-item:nth-child(4) { animation-delay: 100ms; }
:not(.view).animate .kpis > :nth-child(5), :not(.view).animate .rrow:nth-child(5), :not(.view).animate .trow:nth-child(6), :not(.view).animate .mini-item:nth-child(5) { animation-delay: 120ms; }
:not(.view).animate .kpis > :nth-child(n+6), :not(.view).animate .rrow:nth-child(n+6), :not(.view).animate .trow:nth-child(n+7), :not(.view).animate .mini-item:nth-child(n+6) { animation-delay: 140ms; }
.rrow { transition: background .15s ease; }
.rrow:hover { background: var(--surface-2); }
/* ---- Buttons ---- */
.btn { transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease, transform .16s var(--ease-out), box-shadow .2s ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.btn:disabled { cursor: not-allowed; filter: saturate(.6); }
/* Primary: brand gradient, a lit top edge and a soft tinted drop shadow */
.btn:not(.secondary):not(.ghost):not(.danger) { background-image: var(--grad); border-color: transparent; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(15, 23, 42, .12), 0 6px 16px -6px rgba(30, 58, 138, .55); }
.btn:not(.secondary):not(.ghost):not(.danger):focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.btn.secondary { box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.btn.ghost:active:not(:disabled) { background: var(--surface-3); }
/* Hover only where a real pointer hovers: taps on phones never leave a sticky hover */
.btn:not(.secondary):not(.ghost):not(.danger):hover { filter: none; }
.btn.secondary:hover { background: var(--surface); }
.btn.ghost:hover { background: transparent; color: var(--ink-2); }
.btn.danger:hover { background: var(--surface); }
@media (hover: hover) and (pointer: fine) {
  .btn:not(.secondary):not(.ghost):not(.danger):not(:disabled):hover { filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(15, 23, 42, .12), 0 10px 22px -8px rgba(30, 58, 138, .6); }
  .btn.secondary:not(:disabled):hover { background: var(--surface-2); border-color: var(--muted); }
  .btn.ghost:not(:disabled):hover { background: var(--surface-2); color: var(--ink); }
  .btn.danger:not(:disabled):hover { background: var(--danger-soft); border-color: var(--danger); }
}

/* ---- Motion: tabs, presses, logos ---- */
/* Sliding tab highlight: one pill behind the tabs, revealed over the active tab with clip-path
   (transform-free, so the rounded corners never stretch). app.js positions it. */
.find-tabs, .seg { position: relative; isolation: isolate; }
.tab-pill { position: absolute; z-index: -1; pointer-events: none; border-radius: inherit; clip-path: inset(0 100% 0 0); }
.tab-pill.ready { transition: clip-path 240ms var(--ease-in-out); }
.find-tabs > .tab-pill { inset: 4px; background: var(--grad); }
.seg > .tab-pill { inset: 3px; background: var(--surface); }
.find-tabs.has-pill button[aria-selected="true"] { background: none; box-shadow: none; }
/* .find-tabs: the pill sits above the tabs and carries white copies of the labels (see initTabPills);
   the real labels underneath stay dark, so no label ever fades through grey */
.find-tabs > .tab-pill { z-index: 1; overflow: hidden; }
.tab-ghost { position: absolute; inset: -4px; display: flex; align-items: stretch; gap: 4px; padding: 4px; }
.find-tabs .tab-ghost button { color: #fff; background: none; box-shadow: none; transition: none; }
.find-tabs .tab-ghost .count { background: rgba(255, 255, 255, .25); color: #fff; }
.find-tabs .tab-ghost .tab-add { visibility: hidden; }
.find-tabs.has-pill > button[aria-selected="true"] { color: var(--ink-2); }
.find-tabs.has-pill > button[aria-selected="true"] .count { background: var(--surface-3); color: var(--ink-2); }
.seg.has-pill button[aria-pressed="true"] { background: none; box-shadow: none; }
.seg button { transition: color 220ms var(--ease-in-out), transform 160ms var(--ease-out); }

/* Press feedback on everything pressable, not just .btn */
.find-tabs button:active, .seg button:active, .pchip:active, .choice:active { transform: scale(.97); }
.nav-item, .mini-item { transition: background .15s, color .15s, transform 160ms var(--ease-out); }
.nav-item:active, .mini-item:active { transform: scale(.98); }
.btn.icon:active:not(:disabled) { transform: scale(.94); }

/* Brand mark (inline SVG): a page and a paper plane. Once per visit the page lines write themselves
   and the plane glides in; when an application is submitted the plane flies off and comes back. */
.brand-mark { overflow: hidden; border-radius: 25%; }
.bm-tile { fill: url(#bm-grad); }
.auth-art .bm-tile { stroke: rgba(255, 255, 255, .28); stroke-width: 2; }
.bm-page path, .bm-line { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bm-line { transform-box: fill-box; transform-origin: left center; }
.bm-wing { fill: #fbbf24; stroke: #1e40af; stroke-width: 1.2; stroke-linejoin: round; paint-order: stroke; }
.bm-fold { fill: none; stroke: #d97706; stroke-width: 1.4; stroke-linecap: round; }
.bm-plane { transform-box: fill-box; transform-origin: center; transition: transform 220ms var(--ease-out); }
.brand-name { transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) { .brand:hover .bm-plane { transform: translate(1.5px, -1.5px); } }

.sidebar .bm-tile, .auth-art .bm-tile { animation: bm-tile 420ms var(--ease-out) both; transform-box: fill-box; transform-origin: center; }
.sidebar .bm-line, .auth-art .bm-line { animation: bm-write 360ms 140ms var(--ease-out) both; }
.sidebar .bm-line.l2, .auth-art .bm-line.l2 { animation-delay: 190ms; }
.sidebar .bm-line.l3, .auth-art .bm-line.l3 { animation-delay: 240ms; }
.sidebar .bm-plane, .auth-art .bm-plane { animation: bm-glide 420ms 260ms cubic-bezier(0.25, 1, 0.5, 1) both; }
.brand-mark.hop .bm-plane { animation: bm-fly 640ms; }
@keyframes bm-tile { from { opacity: 0; transform: scale(.9); } }
@keyframes bm-write { from { transform: scaleX(0); opacity: 0; } }
@keyframes bm-glide { from { opacity: 0; transform: translate(-9px, 7px) rotate(-8deg); } }
@keyframes bm-fly {
  0% { transform: none; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  40% { opacity: 1; transform: translate(14px, -12px) rotate(6deg); }
  41% { opacity: 0; transform: translate(14px, -12px); }
  42% { opacity: 0; transform: translate(-10px, 8px); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  100% { opacity: 1; transform: none; }
}

/* Sidebar / bottom nav: one sliding highlight shared by every page link (same pill as the tabs) */
.nav { position: relative; isolation: isolate; }
.nav > .tab-pill { inset: 0; background: var(--accent-soft); border-radius: var(--radius-sm); }
.nav.has-pill .nav-item[aria-current="page"] { background: none; box-shadow: none; }
/* Label colour follows the pill's timing; no weight swap, so the text never changes ahead of the pill */
.nav-item { transition: color 240ms var(--ease-in-out), background-color .15s ease, transform 160ms var(--ease-out); }
.nav.has-pill .nav-item[aria-current="page"] { transition-delay: 60ms, 0s, 0s; }
.nav-item svg.i { transition: transform 220ms var(--ease-out); }
.nav.has-pill .nav-item:hover { background: none; }
@media (hover: hover) and (pointer: fine) {
  .nav-item:not([aria-current="page"]):hover { color: var(--ink); }
  .nav-item:not([aria-current="page"]):hover svg.i { transform: translateX(1px); }
  .nav.has-pill .nav-item:not([aria-current="page"]):hover { background: var(--surface-2); }
}
.nav-item .count { transition: background-color .2s ease, color .2s ease; }

/* Tabs: hover and focus for the tabs that are not selected, and a divider before the add action */
.find-tabs button:focus-visible, .seg button:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .find-tabs button[role="tab"]:not([aria-selected="true"]):hover, .seg button:not([aria-pressed="true"]):hover { color: var(--ink); background: var(--surface-2); }
}
.find-tabs .tab-add { position: relative; }
.find-tabs .tab-add::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }
.find-tabs .count { transition: background-color .2s ease, color .2s ease; font-variant-numeric: tabular-nums; }

/* Dialogs: a soft scale-and-fade in, a quicker fade out (modals stay centred) */
dialog { opacity: 1; transform: none;
  transition: opacity 160ms ease, transform 160ms var(--ease-out), overlay 160ms allow-discrete, display 160ms allow-discrete; }
dialog:not([open]) { opacity: 0; transform: scale(.98); }
dialog[open] { transition-duration: 240ms; }
dialog::backdrop { opacity: 0; transition: opacity 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style {
  dialog[open] { opacity: 0; transform: translateY(8px) scale(.97); }
  dialog[open]::backdrop { opacity: 0; }
}

/* Company logos fetched from the web fade in instead of popping in over the initials */
.rrow .logo-sq img { opacity: 0; transition: opacity 200ms var(--ease-out); }
.rrow .logo-sq img.loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .tab-pill.ready { transition: none; }
  .find-tabs button:active, .seg button:active, .pchip:active, .choice:active,
  .nav-item:active, .mini-item:active, .btn.icon:active:not(:disabled) { transform: none; }
  .brand-mark.hop .bm-plane { animation: none; }
  .sidebar .bm-line, .auth-art .bm-line, .sidebar .bm-plane, .auth-art .bm-plane, .sidebar .bm-tile, .auth-art .bm-tile { animation-name: fade; }
  .brand:hover .bm-plane, .nav-item:hover svg.i { transform: none; }
  dialog { transition-property: opacity, overlay, display; }
  dialog, dialog:not([open]) { transform: none; }
  /* The pill jumps, so labels and badges switch in the same frame instead of trailing it */
  .find-tabs button, .seg button, .find-tabs .count, .nav-item, .nav-item .count { transition-property: transform; transition-delay: 0s; }
}

/* Shell accents */
.nav-item[aria-current="page"] { background: var(--grad-soft); position: relative; box-shadow: inset 0 0 0 1px var(--accent-line); }
.topbar { backdrop-filter: saturate(1.4) blur(10px); }

/* Hero banners */
.hero, .find-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .9fr); align-items: center; gap: 20px;
  background: var(--grad-soft); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; margin-bottom: 22px; }
.hero::after, .find-hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, var(--pilot-glow), transparent 65%); pointer-events: none; }
.hero h2, .find-hero h2 { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.02em; }
.hero-text p { color: var(--ink-2); margin-top: 6px; max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-art { max-width: 340px; justify-self: end; width: 100%; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero-chips span { font-size: 0.78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.find-hero { margin-bottom: 18px; }

/* Find & Apply tabs */
.find-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.find-tabs button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border: 0; background: none; font: 600 0.9rem inherit; font-family: inherit; color: var(--ink-2); padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: background .2s, color .2s; }
.find-tabs button[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(30, 58, 138, .7); }
.find-tabs button { transition: color 220ms var(--ease-in-out), background .2s, transform 160ms var(--ease-out); }
.find-tabs .count { font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.find-tabs button[aria-selected="true"] .count { background: rgba(255, 255, 255, .25); color: #fff; }
.rrow .acts { align-items: center; gap: 6px; }
.apply-btn { padding: 0 14px; }

.find-tabs .tab-add { margin-left: 6px; color: var(--accent); }
.find-tabs .tab-add:hover { background: var(--accent-soft); }
.toolbar-add { margin-left: auto; }

/* Search modes and platforms */
.search-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-mode button { display: inline-flex; align-items: center; gap: 6px; }
.id-form { grid-template-columns: 1fr 1fr; }
.platforms { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.platforms-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); padding-top: 6px; }
.platform-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.pchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px 5px 8px; font: 500 0.82rem inherit; font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.pchip .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.pchip .dot svg.i { width: 11px; height: 11px; stroke-width: 3; color: #fff; opacity: 0; }
.pchip[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.pchip[aria-pressed="true"] .dot { background: var(--accent); border-color: var(--accent); }
.pchip[aria-pressed="true"] .dot svg.i { opacity: 1; }
.pchip[aria-disabled="true"] { opacity: .55; cursor: help; }
.pchip .need { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.adzuna-credit { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 116px; min-height: 23px; padding: 2px 8px;
  border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 0.75rem; text-decoration: none; }
.adzuna-credit b { color: var(--ink); }
.adzuna-credit:hover { border-color: var(--accent); }
.ref-tag { font-variant-numeric: tabular-nums; }

/* Loading skeleton */
.skel { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr 60px; gap: 14px; align-items: center; }
.skel:first-child { border-top: 0; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 0, var(--surface-3) 40%, var(--surface-2) 80%) 0 0 / 800px 100%; animation: shimmer 1.3s linear infinite; }
.skel i.sq { width: 36px; height: 36px; border-radius: 9px; }
.skel .lines { display: grid; gap: 8px; }
.skel .lines i:last-child { width: 60%; }

/* Sign-in: art panel + card */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 0; align-items: stretch; }
.auth-art { position: relative; overflow: hidden; background: var(--grad-deep); color: #fff; display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-art .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; animation: blob 14s ease-in-out infinite; }
.auth-art .b1 { width: 320px; height: 320px; background: #3b82f6; top: -80px; left: -60px; }
.auth-art .b2 { width: 280px; height: 280px; background: #38bdf8; bottom: -60px; right: -40px; animation-delay: -5s; }
.auth-art .b3 { width: 200px; height: 200px; background: #fbbf24; top: 45%; left: 55%; opacity: .3; animation-delay: -9s; }
.auth-art-inner { position: relative; max-width: 440px; width: 100%; }
.auth-art-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; margin-bottom: 18px; }
.auth-art-brand .brand-name { color: #fff; }
.auth-art-brand .brand-pilot { color: #fbbf24; }
.auth-art svg.ill { max-width: 380px; margin: 0 auto 14px; --ill-halo: rgba(255, 255, 255, .14); --ill-stroke: rgba(255, 255, 255, .5); }
.auth-art .ill-card { filter: drop-shadow(0 14px 24px rgba(5, 15, 50, .4)); }
.auth-art h2 { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 14px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; opacity: .95; animation: rise .5s ease both; }
.auth-points li:nth-child(2) { animation-delay: .1s; } .auth-points li:nth-child(3) { animation-delay: .2s; }
.auth-points svg.i { margin-top: 1px; background: rgba(255, 255, 255, .18); border-radius: 6px; padding: 3px; width: 22px; height: 22px; }
.auth > .auth-card { align-self: center; justify-self: center; margin: 32px 24px; animation: pop .35s var(--ease-out) both; box-shadow: var(--shadow-lg); }
.auth-form:not([hidden]) { animation: fade .2s var(--ease-out) both; }
.auth-brand { display: none; }

.notice.info { border-color: var(--accent-line); background: var(--grad-soft); align-items: center; }
.notice.info svg.i { color: var(--accent); }
.notice-x { margin-left: auto; flex: none; }
.apply-queue .mini-item .match { flex: none; margin-left: 4px; }
.apply-queue .mini-item .t { min-width: 0; }

.download-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ats-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.ats-note svg.i { width: 15px; height: 15px; color: var(--s-offer-fg); }
#tailoredOut { min-height: 320px; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 18px; }
.bars .b { flex: 1; min-width: 4px; background: var(--grad); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; transition: height .5s ease; }
.bars .b.zero { background: var(--surface-3); }
.bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--ink); color: var(--surface); font-size: 0.72rem; padding: 3px 7px; border-radius: 6px; z-index: 2; }
.bars-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin-top: 6px; }
.admin-table .trow { grid-template-columns: minmax(200px, 2fr) 90px 100px 110px 110px 140px 70px; }
.admin-table .trow .role .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge.s-Admin { background: var(--accent-soft); color: var(--accent); }
.badge.s-Disabled { background: var(--s-rejected-bg); color: var(--s-rejected-fg); }
.badge.s-Active { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: 0.88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.udlg-sec { margin-top: 18px; }
.udlg-sec h3 { font-size: 0.95rem; margin-bottom: 8px; }
.udlg-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mini-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mini-table th, .mini-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini-table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.scroll-x { overflow-x: auto; }
#adminRecent { max-height: 460px; overflow-y: auto; }
.mini-item .t b .tag { display: inline-flex; margin-left: 6px; vertical-align: middle; }
.activity-list { max-height: 260px; overflow-y: auto; }
.resume-preview { white-space: pre-wrap; font-size: 0.8rem; background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); max-height: 220px; overflow-y: auto; }

/* Celebration */
.confetti { position: fixed; z-index: 200; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; animation: confetti 1.2s cubic-bezier(.2, .7, .3, 1) forwards; }

@media (max-width: 1080px) {
  .hero-art { max-width: 260px; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-auto-rows: max-content; }
  .auth-art { padding: 28px 20px 24px; }
  .auth-art svg.ill { max-width: 220px; }
  .auth-art h2 { font-size: 1.3rem; }
  .auth-points { display: none; }
  .auth > .auth-card { margin: -18px 16px 28px; width: auto; max-width: none; position: relative; }
  .hero, .find-hero { grid-template-columns: 1fr; padding: 20px; }
  .hero-art { max-width: 220px; justify-self: center; order: -1; }
  .find-hero .hero-art { display: none; }
  .find-tabs { display: flex; }
  .find-tabs button { flex: 1; justify-content: center; padding: 9px 8px; font-size: 0.84rem; }
  .find-tabs .tab-add { flex: 0 0 auto; padding: 9px 12px; }
  .find-tabs .tab-add-label { display: none; }
  .toolbar-add { margin-left: 0; width: 100%; justify-content: center; }
  .nav-item[aria-current="page"]::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .ill-trend { stroke-dashoffset: 0; } }

/* ============ Admin mode ============ */
/* Admins only get the Admin dashboard and their Profile; job-seeker pages are hidden. */
body.admin-mode .nav-item[data-view="dashboard"], body.admin-mode .nav-item[data-view="find"],
body.admin-mode .nav-item[data-view="applications"], body.admin-mode .nav-item[data-view="builder"],
body.admin-mode .sidebar-foot .privacy { display: none; }
body.admin-mode #navAdmin { order: -1; }
.chart-total { white-space: nowrap; margin-left: 8px; font-size: 0.78rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; vertical-align: 2px; }
.bars-pilot .b:not(.zero) { background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%); }
.admin-funnel-card { margin-top: 18px; }
.funnel { display: grid; gap: 14px; }
.fhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.88rem; margin-bottom: 6px; }
.fname { color: var(--ink-2); font-weight: 600; }
.fnum { font-weight: 700; font-variant-numeric: tabular-nums; }
.fpct { font-weight: 500; color: var(--muted); font-size: 0.8rem; margin-left: 6px; }
.ftrack { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ffill { height: 100%; border-radius: 999px; background: var(--grad); transition: width .5s ease; }
.fstep:last-child .ffill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.admin-recent { max-height: 420px; overflow-y: auto; }
.setup-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.setup-status li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.setup-status li:last-child { border-bottom: 0; }
.setup-status .mk { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.setup-status .mk svg.i { width: 12px; height: 12px; }
.setup-status .mk.ok { background: var(--s-offer-bg); color: var(--s-offer-fg); }
.setup-status .mk.bad { background: var(--surface-3); color: var(--muted); }
.setup-status .sval { color: var(--muted); text-align: right; overflow-wrap: anywhere; max-width: 240px; }
#adminProfile .kv { grid-template-columns: 130px 1fr; }

/* ============ Page header: brand band, page icon, display title ============ */
.topbar { position: sticky; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line);
  background: var(--grad-soft); backdrop-filter: none; --page: #1d4ed8; --page-2: #3b82f6; }
.topbar[data-page="find"] { --page: #c2410c; --page-2: #f59e0b; }
.topbar[data-page="applications"] { --page: #6d28d9; --page-2: #8b5cf6; }
.topbar[data-page="builder"] { --page: #0f766e; --page-2: #14b8a6; }
.topbar[data-page="profile"] { --page: #be185d; --page-2: #ec4899; }
.topbar[data-page="admin"] { --page: #334155; --page-2: #64748b; }
/* a thin brand rule along the bottom edge, in the page colour */
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; z-index: 1;
  background: linear-gradient(90deg, var(--page), var(--page-2) 40%, transparent 85%); transition: background .3s ease; }
.topbar-inner { position: relative; z-index: 1; padding: 20px 32px 18px; gap: 16px; }
.page-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--page), var(--page-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 18px -8px var(--page); transition: background .3s ease, box-shadow .3s ease; }
.page-icon svg.i { width: 24px; height: 24px; stroke-width: 2; }
.page-head { min-width: 0; }
.page-date { font-size: 0.72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--page); margin-bottom: 2px; }
.topbar h1 { font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif; font-size: 1.95rem; font-weight: 800; line-height: 1.08;
  letter-spacing: -0.025em; color: var(--ink); font-variation-settings: "opsz" 72; }
.topbar .sub { font-size: 0.92rem; color: var(--ink-2); margin-top: 4px; }
.hero h2, .find-hero h2 { font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; font-variation-settings: "opsz" 48; }

/* decorative flight path on the right, tinted with the page colour */
.topbar-art { position: absolute; z-index: 0; right: 0; top: 0; height: 100%; width: min(560px, 55%); pointer-events: none; color: var(--page-2); }
.ta-glow { fill: var(--pilot-glow); }
.ta-path { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .55; }
.ta-dot { fill: currentColor; opacity: .35; }
.ta-star { fill: #f59e0b; opacity: .8; }
.ta-plane { transform-box: fill-box; transform-origin: center; }
.ta-plane-body { fill: var(--surface); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ta-plane-fold { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.topbar.enter .ta-plane { animation: ta-glide 520ms var(--ease-out) both; }
.topbar.enter .page-icon { animation: ta-icon 260ms var(--ease-out) both; }
.topbar.enter .page-head { animation: rise .26s var(--ease-out) both; }
@keyframes ta-glide { from { opacity: 0; transform: translate(-26px, 14px) rotate(-8deg); } }
@keyframes ta-icon { from { opacity: .4; transform: scale(.9); } }

@media (max-width: 860px) {
  .topbar-inner { padding: 14px 16px 13px; gap: 12px; }
  .page-icon { width: 40px; height: 40px; border-radius: 12px; }
  .page-icon svg.i { width: 20px; height: 20px; }
  .page-date { font-size: 0.7rem; }
  .topbar h1 { font-size: 1.45rem; }
  .topbar-art { width: 70%; opacity: .7; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar.enter .ta-plane, .topbar.enter .page-icon, .topbar.enter .page-head { animation: none; }
}
/* dark: the page colour is too deep for small text on the navy band, so the date takes a lighter tint */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-date { color: color-mix(in srgb, var(--page-2) 65%, #fff); } }
:root[data-theme="dark"] .page-date { color: color-mix(in srgb, var(--page-2) 65%, #fff); }

/* ---------- Phones (iPhone and others) ---------- */
/* Grid columns of 1fr can't shrink below their longest word: a long skill, email or link
   pushed whole pages wider than the screen. minmax(0, 1fr) lets them shrink and wrap. */
@media (max-width: 1080px) {
  .dash-grid, .profile-grid, .apply-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .builder-grid, .two-col, .grid-2, .choice-grid, .find-form, .find-terms, .id-form, .tailor-grid, .tailor-notes,
  .admin-grid, .kv { grid-template-columns: minmax(0, 1fr); }
  main, .content, .card, .card-body, .field { min-width: 0; }
  .card-body, .chip, .tag, .inline-note, .notice, .hint, .ritem .t span, .auth-alert, .trow .role .t > span { overflow-wrap: anywhere; }
  .trow .role, .trow .role .t { min-width: 0; }
  /* iOS Safari zooms in on any text field under 16px when it's tapped, and stays zoomed. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea { font-size: 16px !important; }
  /* Room for the notch and rounded corners when installed to the home screen or turned sideways. */
  .topbar-inner { padding-top: calc(14px + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .content { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .auth-art { padding-top: calc(28px + env(safe-area-inset-top)); }
}
/* 100vh on iPhone includes the area behind the browser bars, so dialogs ran off the bottom. */
@supports (height: 100dvh) {
  .shell { min-height: 100dvh; }
  dialog { max-height: calc(100dvh - 32px); }
  .dlg-body { max-height: calc(100dvh - 200px); }
}
.code-input { letter-spacing: .35em; font-variant-numeric: tabular-nums; font-size: 1.2rem; text-align: center; }

/* ---------- Dark mode switch ---------- */
.theme-toggle { margin-left: auto; position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.theme-toggle svg.i { width: 16px; height: 16px; }
.tt-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color .2s var(--ease-out); }
.tt-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .35); transition: transform .2s var(--ease-out); }
.theme-toggle[aria-checked="true"] .tt-track { background: var(--accent); box-shadow: none; }
.theme-toggle[aria-checked="true"] .tt-thumb { transform: translateX(14px); }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); } }
/* Sign-in screen: pinned to the top-right corner, over the illustration on phones. */
.auth-theme { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); z-index: 2; box-shadow: var(--shadow-sm); }
@media (max-width: 860px) {
  .theme-toggle { height: 40px; padding: 0 7px 0 10px; }
  .tt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .tt-track, .tt-thumb { transition: none; } }

/* ---------- Dark theme, flat: neutral greys, solid fills, no gradients or glows ---------- */
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #16191e; --surface-2: #1c2026; --surface-3: #252a31;
  --ink: #e7e9ec; --ink-2: #bfc4cc; --muted: #8a909a; --line: #262b32; --line-strong: #353b44;
  --accent: #7aa7f7; --accent-hover: #a3c2fa; --accent-ink: #0f1115; --accent-soft: #1b2230; --accent-line: #2e3b52; --bar: #7aa7f7;
  --pilot-soft: #2a2416; --danger-soft: #2e1c16;
  --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  --grad: linear-gradient(#2f63d0, #2f63d0); --grad-deep: linear-gradient(#12151a, #12151a); --grad-soft: linear-gradient(var(--surface), var(--surface));
  --pilot-glow: transparent;
  --ill-halo: #1c2026; --ill-card: #1f232a; --ill-card-2: #232833; --ill-card-3: #2a2618;
  --ill-line: #2f343d; --ill-line-strong: #3f4652; --ill-accent: #7aa7f7; --ill-stroke: #353b44;
}
:root[data-theme="dark"] .btn:not(.secondary):not(.ghost):not(.danger), :root[data-theme="dark"] .btn:not(.secondary):not(.ghost):not(.danger):not(:disabled):hover, :root[data-theme="dark"] .find-tabs button[aria-selected="true"] { box-shadow: none; }
:root[data-theme="dark"] .nav-item[aria-current="page"] { background: var(--surface-2); box-shadow: none; }
:root[data-theme="dark"] .topbar { background: var(--bg); }
:root[data-theme="dark"] .topbar::after, :root[data-theme="dark"] .ta-glow, :root[data-theme="dark"] .hero::after, :root[data-theme="dark"] .find-hero::after, :root[data-theme="dark"] .auth-art .blob { display: none; }
:root[data-theme="dark"] .ta-path { opacity: .3; }
:root[data-theme="dark"] .ta-dot, :root[data-theme="dark"] .ta-star { opacity: .25; }
:root[data-theme="dark"] .page-icon { background: var(--surface-2); color: var(--page-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
:root[data-theme="dark"] .ill-card, :root[data-theme="dark"] .auth-art .ill-card { filter: none; }
:root[data-theme="dark"] .auth-art { border-right: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --bg: #0f1115; --surface: #16191e; --surface-2: #1c2026; --surface-3: #252a31;
  --ink: #e7e9ec; --ink-2: #bfc4cc; --muted: #8a909a; --line: #262b32; --line-strong: #353b44;
  --accent: #7aa7f7; --accent-hover: #a3c2fa; --accent-ink: #0f1115; --accent-soft: #1b2230; --accent-line: #2e3b52; --bar: #7aa7f7;
  --pilot-soft: #2a2416; --danger-soft: #2e1c16;
  --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  --grad: linear-gradient(#2f63d0, #2f63d0); --grad-deep: linear-gradient(#12151a, #12151a); --grad-soft: linear-gradient(var(--surface), var(--surface));
  --pilot-glow: transparent;
  --ill-halo: #1c2026; --ill-card: #1f232a; --ill-card-2: #232833; --ill-card-3: #2a2618;
  --ill-line: #2f343d; --ill-line-strong: #3f4652; --ill-accent: #7aa7f7; --ill-stroke: #353b44;
}
:root:not([data-theme="light"]) .btn:not(.secondary):not(.ghost):not(.danger), :root:not([data-theme="light"]) .btn:not(.secondary):not(.ghost):not(.danger):not(:disabled):hover, :root:not([data-theme="light"]) .find-tabs button[aria-selected="true"] { box-shadow: none; }
:root:not([data-theme="light"]) .nav-item[aria-current="page"] { background: var(--surface-2); box-shadow: none; }
:root:not([data-theme="light"]) .topbar { background: var(--bg); }
:root:not([data-theme="light"]) .topbar::after, :root:not([data-theme="light"]) .ta-glow, :root:not([data-theme="light"]) .hero::after, :root:not([data-theme="light"]) .find-hero::after, :root:not([data-theme="light"]) .auth-art .blob { display: none; }
:root:not([data-theme="light"]) .ta-path { opacity: .3; }
:root:not([data-theme="light"]) .ta-dot, :root:not([data-theme="light"]) .ta-star { opacity: .25; }
:root:not([data-theme="light"]) .page-icon { background: var(--surface-2); color: var(--page-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
:root:not([data-theme="light"]) .ill-card, :root:not([data-theme="light"]) .auth-art .ill-card { filter: none; }
:root:not([data-theme="light"]) .auth-art { border-right: 1px solid var(--line); }
}

/* Tagline under the logo */
.brand-name .brand-tag { margin-top: 2px; font-size: 0.74rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.auth-art-brand .brand-tag { display: block; color: rgba(255, 255, 255, .72); }

/* Careers-site account form in the run panel */
.run-account .acct-mode { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.run-account .input-btn { display: flex; gap: 6px; align-items: center; }
.run-account .input-btn .input { flex: 1; min-width: 0; }
.run-account .acct-create[hidden] { display: none; }
.run-account .hint svg.i { width: 14px; height: 14px; vertical-align: -2px; }
