/* Kestrel - design system + layout */

/* ---------------------------------------------------------------- tokens */
:root {
  /* blue & white, the landing page palette (landing.css), used across the whole app: primary #2563eb, slate neutrals */
  --brand-50: #eff6ff; --brand-100: #dbeafe; --brand-200: #bfdbfe; --brand-400: #60a5fa;
  --brand-500: #3b82f6; --brand-600: #2563eb; --brand-700: #1d4ed8; --brand-900: #1e3a8a;
  --accent: #60a5fa;

  --bg: #f8fafc; --bg-soft: #f1f5f9; --surface: #ffffff; --surface-2: #f8fafc;
  --border: #e2e8f0; --border-strong: #cbd5e1;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --primary: var(--brand-600); --primary-hover: var(--brand-700); --primary-soft: #eef3ff; --on-primary: #fff;
  --success: #2f8a4c; --success-soft: #e7f4ea; --warning: #b7700a; --warning-soft: #fdf3e1;
  --danger: #c43b2c; --danger-soft: #fbeae7; --info: #2d6cc0; --info-soft: #e9f0fb;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 34px; --fs-hero: clamp(36px, 5.2vw, 60px);

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-full: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px -4px rgba(15, 23, 42, .10), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .22);
  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar-w: 248px;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --bg-soft: #0f172a; --surface: #111a2e; --surface-2: #16213a;
  --border: #1e293b; --border-strong: #334155;
  --text: #e2e8f0; --text-2: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --primary: #60a5fa; --primary-hover: #93c5fd; --primary-soft: #172554; --on-primary: #0b1220; --accent: #93c5fd;
  --success: #4ade80; --success-soft: #10261a; --warning: #fbbf24; --warning-soft: #2c230d;
  --danger: #f87171; --danger-soft: #2e1417; --info: #7cb4ff; --info-soft: #111f36;
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, .55); --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .65);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --bg-soft: #0f172a; --surface: #111a2e; --surface-2: #16213a;
  --border: #1e293b; --border-strong: #334155;
  --text: #e2e8f0; --text-2: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --primary: #60a5fa; --primary-hover: #93c5fd; --primary-soft: #172554; --on-primary: #0b1220; --accent: #93c5fd;
  --success: #4ade80; --success-soft: #10261a; --warning: #fbbf24; --warning-soft: #2c230d;
  --danger: #f87171; --danger-soft: #2e1417; --info: #7cb4ff; --info-soft: #111f36;
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, .55); --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .65);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 650; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-soft); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; } svg.i.lg { width: 22px; height: 22px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.row { display: flex; align-items: center; gap: var(--sp-2); } .row.wrap { flex-wrap: wrap; } .row.gap-3 { gap: var(--sp-3); } .row.gap-4 { gap: var(--sp-4); }
.col { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack { display: grid; gap: var(--sp-4); } .stack-2 { display: grid; gap: var(--sp-2); } .stack-6 { display: grid; gap: var(--sp-6); }
.grow { flex: 1; min-width: 0; } .nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 550 var(--fs-md)/1 var(--font); cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(74, 71, 224, .25), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.danger { color: var(--danger); } .btn.danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.btn.lg { height: 48px; padding: 0 22px; font-size: var(--fs-lg); border-radius: var(--r-md); }
.btn.icon { width: 38px; padding: 0; } .btn.icon.sm { width: 32px; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card.pad { padding: var(--sp-6); } .card.pad-sm { padding: var(--sp-4); }
.card.hover { transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.card.hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.section-title h2 { font-size: var(--fs-lg); }
.eyebrow { font-size: var(--fs-xs); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }

/* ---------------------------------------------------------------- badges / status / tags */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600;
  background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge.success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.connected { background: var(--success); } .dot.syncing { background: var(--warning); animation: pulse 1.2s infinite; }
.dot.error { background: var(--danger); } .dot.disabled, .dot.not_configured { background: var(--faint); }
@keyframes pulse { 50% { opacity: .35; } }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-sm); background: var(--bg-soft); color: var(--text-2); font-size: var(--fs-xs); font-weight: 550; border: 1px solid var(--border); }
.tag.hit { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.tag.miss { background: transparent; color: var(--muted); border-style: dashed; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- avatar / logos */
.avatar { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; flex: none; letter-spacing: -.02em; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; } .avatar.lg { width: 56px; height: 56px; font-size: 19px; border-radius: 14px; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .err { font-size: var(--fs-xs); color: var(--danger); display: none; }
.field.invalid .err { display: block; }
.field.invalid .input, .field.invalid .chips-input { border-color: var(--danger); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: 400 var(--fs-md) var(--font); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input::placeholder { color: var(--faint); }
.input-icon { position: relative; } .input-icon > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* chips input (multi-value with suggestions) */
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); position: relative; cursor: text; }
.chips-input:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.chips-input input:focus-visible { box-shadow: none; }
.chips-input input { border: 0; outline: none; background: transparent; color: var(--text); font: inherit; flex: 1; min-width: 120px; height: 28px; }
.chip-v { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 10px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary); font-size: var(--fs-sm); font-weight: 550; }
.chip-v button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; padding: 0; }
.chip-v button:hover { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.suggest { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 30; max-height: 240px; overflow: auto; padding: 4px; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; }
.suggest button:hover, .suggest button.active { background: var(--bg-soft); }

/* toggle chips (single/multi select) */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice button { height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 550 var(--fs-sm) var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all .15s var(--ease); }
.choice button:hover { border-color: var(--border-strong); }
.choice button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* switch */
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: var(--r-full); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* dropzone */
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: var(--sp-8); text-align: center; background: var(--surface-2); cursor: pointer; transition: all .2s var(--ease); display: grid; justify-items: center; gap: 8px; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.filecard { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.progress { height: 6px; background: var(--bg-soft); border-radius: var(--r-full); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--brand-400)); border-radius: inherit; transition: width .3s var(--ease); }

/* ---------------------------------------------------------------- skeleton / empty / error */
.skel { background: linear-gradient(90deg, var(--bg-soft) 25%, color-mix(in srgb, var(--bg-soft) 50%, var(--surface)) 37%, var(--bg-soft) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: var(--sp-12) var(--sp-6); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 4px; }
.empty.error .ic { background: var(--danger-soft); color: var(--danger); }
.empty h3 { font-size: var(--fs-lg); } .empty p { color: var(--muted); max-width: 420px; }

/* ---------------------------------------------------------------- toast / modal / drawer */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; width: min(380px, calc(100vw - 32px)); }
@media (max-width: 760px) { .toasts { bottom: 84px; right: 16px; } }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); animation: toastIn .3s var(--ease); }
.toast .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--info-soft); color: var(--info); }
.toast.success .ic { background: var(--success-soft); color: var(--success); } .toast.error .ic { background: var(--danger-soft); color: var(--danger); }
.toast .t { font-weight: 600; } .toast .m { color: var(--muted); font-size: var(--fs-sm); }
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.overlay { position: fixed; inset: 0; background: rgba(10, 12, 22, .45); backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; animation: pop .25s var(--ease); }
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 0; } .modal-b { padding: 16px 24px; } .modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 8px 24px 22px; flex-wrap: wrap; }
.drawer-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(10, 12, 22, .35); animation: fade .2s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: auto; animation: slideIn .3s var(--ease); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }

/* ---------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.shell.collapsed { --sidebar-w: 76px; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: -.02em; color: var(--text); text-decoration: none !important; white-space: nowrap; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand small { color: var(--primary); font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 550; text-decoration: none !important; white-space: nowrap; transition: background .15s; position: relative; }
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--bg-soft); color: var(--muted); padding: 1px 8px; border-radius: var(--r-full); }
.nav a.active .count { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.nav .sep { height: 1px; background: var(--border); margin: 10px 8px; }
.shell.collapsed .nav a span, .shell.collapsed .nav a .count, .shell.collapsed .brand span, .shell.collapsed .side-foot .lbl { display: none; }
.shell.collapsed .nav a { justify-content: center; padding: 0; }
.side-foot { margin-top: auto; display: grid; gap: 4px; }
.side-foot button { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; background: none; color: var(--muted); border-radius: var(--r-sm); cursor: pointer; font: 550 var(--fs-sm) var(--font); white-space: nowrap; }
.side-foot button:hover { background: var(--bg-soft); color: var(--text); }
.shell.collapsed .side-foot button { justify-content: center; padding: 0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .input-icon { width: min(440px, 100%); }
.page { padding: 8px 28px 48px; max-width: 1320px; width: 100%; margin: 0 auto; animation: pageIn .35s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; }
.bottomnav { display: none; }
.mobile-only { display: none; }

@media (max-width: 1024px) { .shell { --sidebar-w: 76px; } .shell .nav a span, .shell .nav a .count, .shell .brand span, .side-foot .lbl { display: none; } .shell .nav a, .side-foot button { justify-content: center; padding: 0; } .collapse-btn { display: none !important; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; height: 58px; }
  .page { padding: 4px 16px 96px; }
  .mobile-only { display: inline-flex; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; border-radius: 10px; }
  .bottomnav a.active { color: var(--primary); }
}

/* ---------------------------------------------------------------- dashboard */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 18px; display: grid; gap: 10px; text-decoration: none !important; color: inherit; }
.kpi .top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: var(--fs-sm); font-weight: 550; }
.kpi .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.kpi .s { font-size: var(--fs-xs); color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.greet { font-size: clamp(24px, 3vw, 30px); }

/* ---------------------------------------------------------------- job cards */
.jobs-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .jobs-layout { grid-template-columns: 1fr; } .filters.card { display: none; } .filters.card.open { display: block; } }
.filters { padding: 18px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.jobs-layout { transition: grid-template-columns .25s ease; }
.jobs-layout.collapsed { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.jobs-layout.collapsed > .filters { visibility: hidden; opacity: 0; padding: 0; border: 0; overflow: hidden; pointer-events: none; }
.filters { transition: opacity .2s ease; }
#fToggle { gap: 6px; }
#fToggle.is-open { border-color: var(--primary); color: var(--primary); }
.filters h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; font-weight: 650; }
.filters h4:first-child { margin-top: 0; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 2px; cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); }
.check input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.check .n { margin-left: auto; color: var(--faint); font-size: var(--fs-xs); }
.job-list { display: grid; gap: 12px; }
.job { padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; cursor: pointer; }
.job .title { font-weight: 650; font-size: 15.5px; color: var(--text); letter-spacing: -.01em; }
.job .company { color: var(--text-2); font-weight: 550; font-size: var(--fs-sm); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: var(--fs-sm); margin-top: 8px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.job .side { display: grid; justify-items: end; gap: 10px; }
.job .acts { display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) { .job { grid-template-columns: auto minmax(0, 1fr); } .job .side { grid-column: 1 / -1; justify-items: stretch; } .job .acts { justify-content: flex-end; } }
.score { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); }
.ring { --v: 0; --c: var(--primary); width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--bg-soft) 0); display: grid; place-items: center; flex: none; }
.ring::before { content: attr(data-v); width: 32px; height: 32px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--text); }
.ring.lg { width: 76px; height: 76px; } .ring.lg::before { width: 62px; height: 62px; font-size: 20px; content: attr(data-v) "%"; }
.save-btn[aria-pressed="true"] { color: #e11d48; } .save-btn[aria-pressed="true"] svg { fill: currentColor; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* job detail */
.detail-hero { padding: 28px 28px 20px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.detail-body { padding: 24px 28px 40px; display: grid; gap: 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fact { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.fact .k { font-size: var(--fs-xs); color: var(--muted); font-weight: 550; } .fact .v { font-weight: 600; margin-top: 2px; }
.prose { color: var(--text-2); line-height: 1.7; } .prose h4 { color: var(--text); margin: 18px 0 6px; font-size: 15px; }
.prose ul { padding-left: 20px; margin: 6px 0; } .prose p { margin: 8px 0; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 96px 1fr 44px; gap: 12px; align-items: center; font-size: var(--fs-sm); }
.bar .progress { height: 8px; } .bar b { text-align: right; }

/* ---------------------------------------------------------------- platforms */
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.plat { padding: 20px; display: grid; gap: 16px; }
.plat .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plat .stats > div { padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.plat .stats .k { font-size: 11px; color: var(--muted); font-weight: 550; } .plat .stats .v { font-weight: 650; font-size: var(--fs-sm); margin-top: 2px; }
.plat .err-line { font-size: var(--fs-xs); color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: var(--r-sm); }
.pipeline { display: flex; align-items: center; gap: 0; margin: 4px 0; }
.pipeline .st { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--faint); font-weight: 600; white-space: nowrap; }
.pipeline .st i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-style: normal; }
.pipeline .st.done { color: var(--success); } .pipeline .st.done i { border-color: var(--success); background: var(--success); color: #fff; }
.pipeline .st.cur { color: var(--primary); } .pipeline .st.cur i { border-color: var(--primary); border-top-color: transparent; animation: spin 1s linear infinite; }
.pipeline .ln { flex: 1; height: 2px; background: var(--border); margin: 0 6px; min-width: 8px; } .pipeline .ln.done { background: var(--success); }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.catalog button { text-align: left; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer; display: grid; gap: 10px; font: inherit; color: inherit; transition: all .15s var(--ease); }
.catalog button:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.catalog button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; border-color: var(--border); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: 600 var(--fs-md) var(--font); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.logbox { font-family: var(--mono); font-size: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; max-height: 280px; overflow: auto; white-space: pre-wrap; color: var(--text-2); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- applications kanban */
.board { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 180px; }
.lane-h { display: flex; align-items: center; justify-content: space-between; font-weight: 650; font-size: var(--fs-sm); padding: 2px 4px 6px; }
.app-card { padding: 14px; display: grid; gap: 8px; cursor: pointer; }
.app-note { color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: grid; gap: 14px; max-height: 320px; overflow-y: auto; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-soft); border: 2px solid var(--border); }
.tl-note { margin: 6px 0 0; font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------------------------------------- assistant chat */
.chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.sess { display: grid; gap: 2px; padding: 8px; max-height: 70vh; overflow: auto; }
.sess button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; font: inherit; color: inherit; display: grid; gap: 2px; }
.sess button:hover { background: var(--bg-soft); } .sess button.active { background: var(--primary-soft); }
.chat { display: flex; flex-direction: column; min-height: 72vh; }
.chat-body { flex: 1; padding: 20px; display: grid; gap: 12px; align-content: start; overflow: auto; max-height: 64vh; }
.msg { max-width: 100%; overflow-x: auto; }
.msg.user { justify-self: end; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; max-width: 85%; }
.msg.text { background: var(--surface-2); border: 1px solid var(--border); padding: 12px 16px; border-radius: 14px 14px 14px 4px; }
.msg.tool { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding: 2px 10px; border-left: 2px solid var(--border-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.error { color: var(--danger); background: var(--danger-soft); padding: 10px 14px; border-radius: var(--r-md); white-space: pre-wrap; font-size: var(--fs-sm); }
.msg.result { color: var(--muted); font-size: var(--fs-sm); }
.msg h2, .msg h3, .msg h4 { margin: 12px 0 6px; font-size: 15px; } .msg p { margin: 6px 0; } .msg ul { margin: 6px 0; padding-left: 20px; }
.msg table { border-collapse: collapse; margin: 8px 0; font-size: 13px; } .msg td, .msg th { border: 1px solid var(--border); padding: 5px 9px; text-align: left; }
.composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.composer textarea { flex: 1; min-height: 44px; }
.typing { display: inline-flex; gap: 4px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; width: fit-content; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: bounce 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 30% { transform: translateY(-4px); background: var(--primary); } }

/* ---------------------------------------------------------------- settings */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .settings { grid-template-columns: 1fr; } }
.settings nav { display: grid; gap: 2px; position: sticky; top: 80px; }
@media (max-width: 860px) { .settings nav { position: static; display: flex; overflow-x: auto; } }
.settings nav a { padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 550; text-decoration: none !important; white-space: nowrap; }
.settings nav a.active { background: var(--primary-soft); color: var(--primary); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- onboarding */
.onb { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: radial-gradient(1200px 500px at 50% -120px, color-mix(in srgb, var(--primary) 12%, transparent), transparent), var(--bg); }
.onb-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; }
.stepper { display: flex; align-items: center; gap: 0; justify-content: center; margin: 8px auto 28px; max-width: 760px; width: 100%; padding: 0 16px; }
.stepper .s { display: flex; align-items: center; gap: 10px; color: var(--faint); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; }
.stepper .s b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); font-size: 12px; background: var(--surface); transition: all .25s var(--ease); }
.stepper .s.cur { color: var(--text); } .stepper .s.cur b { border-color: var(--primary); color: var(--primary); box-shadow: var(--ring); }
.stepper .s.done { color: var(--text-2); } .stepper .s.done b { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stepper .ln { flex: 1; height: 2px; background: var(--border); margin: 0 12px; min-width: 16px; border-radius: 2px; }
.stepper .ln.done { background: var(--primary); }
@media (max-width: 720px) { .stepper .s span { display: none; } .stepper .s.cur span { display: inline; } }
.onb-card { width: min(760px, calc(100% - 32px)); margin: 0 auto 48px; padding: 36px; }
@media (max-width: 640px) { .onb-card { padding: 22px; } }
.onb-card .head { margin-bottom: 28px; } .onb-card .head p { color: var(--muted); margin-top: 8px; }
.onb-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); gap: 12px; }
.review { display: grid; gap: 14px; }
.review .blk { border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; }
.review .blk h4 { font-size: var(--fs-sm); display: flex; justify-content: space-between; margin-bottom: 8px; }
.review dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; margin: 0; font-size: var(--fs-sm); }
.review dt { color: var(--muted); } .review dd { margin: 0; }
@media (max-width: 560px) { .review dl { grid-template-columns: 1fr; } .review dt { margin-top: 6px; } }
.done-hero { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 12px 0; }
.done-hero .ok { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; animation: pop .5s var(--ease); }

/* ---------------------------------------------------------------- landing */
.lp { background: var(--bg); overflow-x: hidden; }
.lp-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 14px max(20px, calc((100vw - 1180px) / 2)); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.lp-nav .links { display: flex; gap: 24px; margin-left: 24px; } .lp-nav .links a { color: var(--text-2); font-weight: 550; font-size: var(--fs-sm); }
@media (max-width: 760px) { .lp-nav .links { display: none; } }
.lp-sec { padding: 88px 20px; max-width: 1180px; margin: 0 auto; }
.lp-sec .sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; display: grid; gap: 12px; }
.lp-sec .sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -.03em; }
.lp-sec .sec-head p { color: var(--muted); font-size: var(--fs-lg); }
.hero { position: relative; padding: 72px 20px 40px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: -200px 0 auto; height: 720px; background:
  radial-gradient(600px 300px at 50% 30%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
  radial-gradient(400px 220px at 75% 55%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); z-index: -1; pointer-events: none; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); box-shadow: var(--shadow-sm); }
.hero .pill b { background: var(--primary-soft); color: var(--primary); padding: 2px 10px; border-radius: var(--r-full); font-size: 12px; }
.hero h1 { font-size: var(--fs-hero); font-weight: 750; letter-spacing: -.045em; line-height: 1.04; margin: 22px auto 18px; max-width: 900px; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--brand-700), var(--brand-500) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 620px; margin: 0 auto 32px; }
.hero .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mock { margin: 56px auto 0; max-width: 1080px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 40px 80px -30px rgba(40, 40, 120, .35), var(--shadow-md); overflow: hidden; text-align: left; animation: rise .8s var(--ease) both .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.mock-body { display: grid; grid-template-columns: 190px 1fr; min-height: 360px; }
.mock-side { border-right: 1px solid var(--border); padding: 16px 12px; display: grid; gap: 6px; align-content: start; }
.mock-side div { height: 30px; border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.mock-side div.on { background: var(--primary-soft); color: var(--primary); }
.mock-main { padding: 20px; display: grid; gap: 14px; align-content: start; }
.mock-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mock-kpis div { border: 1px solid var(--border); border-radius: 12px; padding: 12px; } .mock-kpis b { display: block; font-size: 20px; letter-spacing: -.02em; } .mock-kpis span { font-size: 11.5px; color: var(--muted); }
.mock-job { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.mock-job .t { font-weight: 650; font-size: 13.5px; } .mock-job .c { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .mock-body { grid-template-columns: 1fr; } .mock-side { display: none; } .mock-kpis { grid-template-columns: repeat(2, 1fr); } }
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 960px) { .steps4 { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 560px) { .steps4 { grid-template-columns: 1fr; } }
.step4 { padding: 24px; display: grid; gap: 12px; position: relative; }
.step4 .n { position: absolute; top: 18px; right: 20px; font-size: 40px; font-weight: 800; color: var(--bg-soft); letter-spacing: -.04em; line-height: 1; }
.feat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 24px; display: grid; gap: 10px; } .feature p, .step4 p { color: var(--muted); font-size: var(--fs-sm); }
.cta-band { margin: 0 auto; max-width: 1180px; border-radius: 28px; padding: 64px 24px; text-align: center; color: #fff; background:
  radial-gradient(500px 240px at 20% 0%, rgba(255,255,255,.18), transparent 60%), linear-gradient(135deg, #1e3a8a, #2563eb 50%, #60a5fa); display: grid; justify-items: center; gap: 16px; }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.03em; } .cta-band p { opacity: .85; max-width: 520px; }
.cta-band .btn.primary { background: #fff; color: #3730a3; border-color: #fff; }
.lp-foot { padding: 40px 20px; text-align: center; color: var(--faint); font-size: var(--fs-sm); }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 760px) { .hide-sm { display: none; } }
@media (max-width: 760px) {
  #gsearch { display: none; }
  .job .side { display: flex; justify-content: space-between; align-items: center; }
}
.topbar.no-search #gsearch { visibility: hidden; }
.plat .row.wrap [data-rm] { margin-left: auto; }

/* ---------------------------------------------------------------- admin announcement / maintenance banner */
.announce { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: var(--fs-sm); font-weight: 600; border-bottom: 1px solid var(--border); background: var(--info-soft); color: var(--info); }
.announce.success { background: var(--success-soft); color: var(--success); }
.announce.warning { background: var(--warning-soft); color: var(--warning); }

/* ---------------------------------------------------------------- sync console */
.sdock { --sd-bg: #17120d; --sd-line: rgba(255,255,255,.09); --sd-text: #f3ede3; --sd-muted: #a99d8c;
  position: fixed; right: 20px; bottom: 20px; z-index: 95; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--sd-bg); color: var(--sd-text); border: 1px solid var(--sd-line); border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.2); overflow: hidden; animation: sdIn .45s var(--ease) both; }
.sdock.out { animation: sdOut .3s var(--ease) forwards; }
@keyframes sdIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes sdOut { to { opacity: 0; transform: translateY(16px) scale(.97); } }
.sd-h { display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px 16px; }
.sd-h .btn { color: var(--sd-muted); } .sd-h .btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sd-title { font: 600 17px/1.2 var(--serif, var(--font)); letter-spacing: -.01em; }
.sd-sub { font-size: 12.5px; color: var(--sd-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-radar { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.sd-radar b { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; }
.sd-radar b svg { animation: spin 1.6s linear infinite; }
.sd-radar i { position: absolute; inset: 5px; border-radius: 50%; border: 2px solid var(--primary); animation: sdPing 1.8s ease-out infinite; }
.sd-radar i + i { animation-delay: .9s; }
@keyframes sdPing { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.sdock.done .sd-radar i { display: none; } .sdock.done .sd-radar b { background: var(--success); } .sdock.done .sd-radar b svg { animation: none; }
.sd-overall { padding: 0 16px 12px; }
.sd-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.sd-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .7s var(--ease);
  background: linear-gradient(90deg, var(--primary), var(--brand-400, #60a5fa), var(--primary)); background-size: 200% 100%; animation: sdShine 1.6s linear infinite; }
.sdock.done .sd-bar i { background: var(--success); animation: none; }
@keyframes sdShine { to { background-position: -200% 0; } }
.sd-meta { display: flex; justify-content: space-between; margin-top: 7px; font: 500 11.5px/1 var(--mono); color: var(--sd-muted); }
.sd-list { list-style: none; margin: 0; padding: 4px 8px 8px; overflow-y: auto; border-top: 1px solid var(--sd-line); display: grid; gap: 2px; }
.sd-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 12px; transition: background .3s, opacity .3s; }
.sd-list li.s-queued { opacity: .5; }
.sd-list li:not(.s-queued):not(.s-completed):not(.s-failed) { background: rgba(255,255,255,.06); }
.sd-row { min-width: 0; display: grid; gap: 5px; }
.sd-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 13.5px; }
.sd-top b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--sd-muted); white-space: nowrap; }
.s-completed .sd-st { color: #6ee7a1; } .s-failed .sd-st { color: #fca5a5; }
.sd-mini { height: 3px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.sd-mini i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .7s var(--ease); }
.s-completed .sd-mini i { background: #4ade80; } .s-failed .sd-mini i { background: #f87171; }
.sd-log { font: 400 11px/1.3 var(--mono); color: var(--sd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--sd-line); }
.sd-f .btn.ghost { color: var(--sd-muted); } .sd-f .btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.sdock.min .sd-list, .sdock.min .sd-f { display: none; }
.sdock.min [data-min] svg { transform: rotate(180deg); }
@media (max-width: 760px) { .sdock { right: 12px; left: 12px; width: auto; bottom: 76px; } }
@media (prefers-reduced-motion: reduce) { .sd-radar i, .sd-bar i, .sd-radar b svg { animation: none !important; } }

/* ---------------------------------------------------------------- quick job preferences: guided 4-step dialog */
.qp-ov { display: grid; place-items: center; padding: 20px; backdrop-filter: blur(8px); }
.qp-ov.out { animation: fade .2s reverse forwards; }
.qp { position: relative; display: grid; grid-template-columns: 292px minmax(0, 1fr); width: min(1000px, 100%); height: min(700px, calc(100vh - 40px)); background: var(--surface); border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(40, 20, 5, .55), 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent); animation: qpIn .35s var(--ease); }
@keyframes qpIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.qp.shake { animation: qpShake .35s; }
@keyframes qpShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* left: stepper + live summary */
.qp-side { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 26px 20px 22px; color: #eff6ff; overflow: hidden;
  background: radial-gradient(130% 70% at 0% 0%, #1d4ed8 0%, transparent 60%), radial-gradient(90% 60% at 100% 100%, color-mix(in srgb, var(--brand-500) 35%, transparent), transparent 70%), #0b1f4d; }
.qp-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 0 6px; }
.qp-brand svg { color: var(--brand-400); }
.qp-brand em { margin-left: auto; font: 500 11px/1 var(--mono); font-style: normal; color: #bfdbfe; letter-spacing: .04em; }
.qp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: relative; }
.qp-steps li { position: relative; }
.qp-steps li + li::before { content: ""; position: absolute; left: 25px; top: -10px; height: 16px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.qp-steps li.ok + li::before { background: var(--brand-400); }
.qp-st { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .2s; }
.qp-st:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.qp-st:disabled { cursor: default; opacity: .55; }
.qp-steps li.cur .qp-st { background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.qp-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .18); color: #cbd5e1; font: 700 13px/1 var(--font); transition: all .25s var(--ease); }
.qp-dot svg { display: none; width: 15px; height: 15px; }
.qp-steps li.cur .qp-dot { border-color: var(--brand-400); color: #fff; background: color-mix(in srgb, var(--brand-500) 35%, transparent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-500) 18%, transparent); }
.qp-steps li.ok .qp-dot { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.qp-steps li.ok .qp-dot b { display: none; }
.qp-steps li.ok .qp-dot svg { display: block; }
.qp-st-t { display: grid; gap: 2px; min-width: 0; }
.qp-st-t strong { font-size: 13.5px; font-weight: 650; }
.qp-st-t small { font-size: 12px; color: #bfdbfe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp-steps li.ok .qp-st-t small { color: #bfdbfe; }
.qp-radar-card { margin-top: auto; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.qp-kicker { font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-400); }
.qp-preview { margin: 10px 0 14px; font: 400 17px/1.4 var(--serif); letter-spacing: -.01em; min-height: 72px; }
.qp-preview b { font-weight: 600; color: #fff; background: color-mix(in srgb, var(--brand-500) 32%, transparent); padding: 0 5px; border-radius: 5px; transition: background .3s; }
.qp-plats { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.qp-plats > span > * { width: 24px !important; height: 24px !important; border-radius: 7px !important; font-size: 9.5px !important; box-shadow: 0 0 0 2px #0b1f4d; }
.qp-plats .more { font-size: 11px; color: #cfc6b8; padding: 0 4px; }
.qp-plats small { flex-basis: 100%; margin-top: 6px; font-size: 11.5px; color: #b8ab98; }

/* right: question + pane */
.qp-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.qp-prog { height: 4px; background: var(--bg-soft); flex: none; }
.qp-prog i { display: block; height: 100%; width: 25%; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, var(--brand-400), var(--primary)); transition: width .45s var(--ease); }
.qp-x { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-soft); color: var(--muted); display: grid; place-items: center; cursor: pointer; z-index: 3; transition: all .15s; }
.qp-x:hover { background: var(--border); color: var(--text); transform: rotate(90deg); }
.qp-head { padding: 26px 34px 6px; }
.qp-eyebrow { display: inline-block; font: 600 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.qp-head h2 { margin: 12px 44px 6px 0; font: 600 clamp(22px, 2.6vw, 29px)/1.15 var(--serif); letter-spacing: -.02em; }
.qp-head p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.qp-body { flex: 1; padding: 16px 34px 18px; overflow-y: auto; min-height: 0; }
.qp-body.fade-t { -webkit-mask: linear-gradient(transparent, #000 22px); mask: linear-gradient(transparent, #000 22px); }
.qp-body.fade-b { -webkit-mask: linear-gradient(#000 calc(100% - 26px), transparent); mask: linear-gradient(#000 calc(100% - 26px), transparent); }
.qp-body.fade-t.fade-b { -webkit-mask: linear-gradient(transparent, #000 22px, #000 calc(100% - 26px), transparent); mask: linear-gradient(transparent, #000 22px, #000 calc(100% - 26px), transparent); }
.qp-pane { display: none; gap: 14px; }
.qp-pane.on { display: grid; animation: qpPane .35s var(--ease); }
@keyframes qpPane { from { opacity: 0; transform: translateX(14px); } }
.qp-err { font-size: 13px; color: var(--danger); font-weight: 600; }
.qp-err:empty { display: none; }

/* searchable combobox */
#qpRole, #qpLoc { position: relative; }
.qc { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface-2); transition: all .18s; }
.qc:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.qc > svg { color: var(--muted); flex: none; }
.qc input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 500 15px var(--font); }
.qc input:focus-visible { box-shadow: none; }
.qc input::placeholder { color: var(--faint); }
.qc kbd, .qp-kbd kbd { font: 600 10.5px/1 var(--mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.qc kbd { opacity: 0; transition: opacity .15s; }
.qc:focus-within kbd { opacity: 1; }
.qc-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 300px; overflow: auto; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: qpIn .18s var(--ease); }
.qc-list[hidden] { display: none; }
.qc-g { padding: 8px 10px 4px; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.qc-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: 500 14px var(--font); text-align: left; cursor: pointer; }
.qc-list button svg { color: var(--muted); flex: none; }
.qc-list button small { margin-left: auto; font-size: 12px; color: var(--muted); }
.qc-list button:hover, .qc-list button.on { background: var(--primary-soft); }
.qc-list button.on svg { color: var(--primary); }
.qc-list mark { background: none; color: var(--primary); font-weight: 750; }
.qc-empty { padding: 12px; font-size: 13px; color: var(--muted); }

/* selected chips */
.qp-chosen { display: flex; flex-wrap: wrap; gap: 8px; }
.qp-chosen[hidden] { display: none; }
.qp-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 6px 0 12px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 13.5px; animation: qpPop .25s var(--ease); }
.qp-chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .2); color: inherit; cursor: pointer; }
.qp-chip button:hover { background: rgba(255, 255, 255, .35); }
@keyframes qpPop { from { transform: scale(.85); opacity: 0; } }

/* variations hint */
.qp-var { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--warning-soft); border: 1px dashed color-mix(in srgb, var(--warning) 35%, transparent); }
.qp-var[hidden] { display: none; }
.qp-var > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--warning); margin-right: 2px; }
.qp-var button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.qp-var button:hover { border-color: var(--primary); color: var(--primary); }

/* browse: tabs + pickable chips / city tiles */
.qp-browse { display: grid; gap: 12px; margin-top: 4px; }
.qp-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.qp-tabs::-webkit-scrollbar { display: none; }
.qp-tabs button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px 10px; border: 0; background: none; color: var(--muted); font: 600 13px var(--font); cursor: pointer; position: relative; }
.qp-tabs button:hover { color: var(--text); }
.qp-tabs button[aria-selected="true"] { color: var(--primary); }
.qp-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2.5px; border-radius: 2px; background: var(--primary); }
.qp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qp-pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; transition: all .15s var(--ease); }
.qp-pick svg { color: var(--muted); }
.qp-pick:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.qp-pick:hover svg, .qp-pick[aria-pressed="true"] svg { color: var(--primary); }
.qp-pick[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.qp-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.qp-city { position: relative; display: grid; gap: 2px; padding: 11px 34px 11px 13px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: all .15s var(--ease); }
.qp-city b { font-size: 13.5px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-city { min-width: 0; }
.qp-city small { font-size: 11.5px; color: var(--muted); }
.qp-city:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.qp-city[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }

/* selectable cards (experience, work style) */
.qp-card { position: relative; display: grid; justify-items: start; gap: 4px; padding: 16px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: all .2s var(--ease); }
.qp-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(15, 23, 42, .30); }
.qp-card b { font-size: 15px; font-weight: 700; }
.qp-card small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.qp-card-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); color: var(--text-2); margin-bottom: 6px; transition: all .2s; }
.qp-card-ic.lg { width: 48px; height: 48px; border-radius: 15px; }
.qp-tick { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; font-style: normal; transition: all .2s var(--ease); }
.qp-tick svg { width: 12px; height: 12px; }
.qp-city .qp-tick { top: 50%; margin-top: -10px; width: 20px; height: 20px; }
.qp-card[aria-checked="true"], .qp-card[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.qp-card[aria-checked="true"] .qp-card-ic, .qp-card[aria-pressed="true"] .qp-card-ic { background: var(--primary); color: var(--on-primary); }
.qp-card[aria-checked="true"] .qp-tick, .qp-card[aria-pressed="true"] .qp-tick, .qp-city[aria-pressed="true"] .qp-tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.qp-exp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qp-exact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 650; font-size: 14px; animation: qpPane .3s var(--ease); }
.qp-exact[hidden] { display: none; }
.qp-exact small { font-weight: 500; color: var(--muted); }
.qp-step-in { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.qp-step-in button { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--bg-soft); color: var(--text); font: 600 18px/1 var(--font); cursor: pointer; }
.qp-step-in button:hover { background: var(--primary-soft); color: var(--primary); }
.qp-step-in output { min-width: 82px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qp-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qp-mode { padding: 20px 18px; min-height: 190px; align-content: start; }
.qp-mode b { font-size: 17px; }
.qp-mode-t { font-size: 13px; font-weight: 650; color: var(--text-2); }
.qp-any { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1.5px dashed var(--border-strong); background: none; color: var(--text-2); font: 600 13px var(--font); cursor: pointer; }
.qp-any svg { opacity: 0; }
.qp-any.on { border-style: solid; border-color: var(--success); color: var(--success); background: var(--success-soft); }
.qp-any.on svg { opacity: 1; }
.qp-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--info-soft); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.qp-note svg { color: var(--info); flex: none; margin-top: 1px; }
.qp-note[hidden] { display: none; }
.qp-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; justify-self: start; }
.qp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qp-sw { width: 38px; height: 22px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.qp-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.qp-switch input:checked + .qp-sw { background: var(--primary); }
.qp-switch input:checked + .qp-sw::after { transform: translateX(16px); }
.qp-switch input:focus-visible + .qp-sw { box-shadow: var(--ring); }

/* footer */
.qp-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 24px 14px 26px; border-top: 1px solid var(--border); background: var(--surface-2); }
.qp-foot .grow { flex: 1; }
.qp-full { font-size: 13px; color: var(--muted); }
.qp-kbd { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.qp-go { min-width: 168px; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--brand-400, var(--primary))); border: 0; transition: transform .15s, box-shadow .2s; }
.qp-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 30px -12px var(--primary); }

/* responsive */
@media (max-width: 860px) {
  .qp { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 24px); }
  .qp-ov { padding: 12px; }
  .qp-side { flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; }
  .qp-brand, .qp-radar-card, .qp-st-t small { display: none; }
  .qp-steps { display: flex; flex: 1; gap: 4px; }
  .qp-steps li { flex: 1; }
  .qp-steps li + li::before { display: none; }
  .qp-st { flex-direction: column; gap: 4px; padding: 6px 2px; }
  .qp-st-t strong { font-size: 11.5px; text-align: center; }
  .qp-dot { width: 26px; height: 26px; font-size: 12px; }
  .qp-head { padding: 20px 20px 4px; }
  .qp-body { padding: 12px 20px 16px; }
  .qp-exp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qp-modes { grid-template-columns: 1fr; }
  .qp-mode { min-height: 0; grid-template-columns: auto 1fr; column-gap: 14px; }
  .qp-mode .qp-card-ic { grid-row: span 3; margin: 0; }
  .qp-kbd, .qp-full { display: none; }
  .qp-foot { padding: 12px 16px; }
}
@media (max-width: 480px) { .qp-exp .qp-card { padding: 12px 34px 12px 12px; } .qp-exp .qp-card-ic { display: none; } .qp-exp .qp-tick { top: 10px; right: 10px; } .qp-go { min-width: 0; flex: 1; } .qp-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .qp, .qp-pane.on, .qp-chip, .qc-list, .qp-exact { animation: none !important; } .qp-card, .qp-city, .qp-pick { transition: none; } }

/* ---------------------------------------------------------------- dashboard: experience filter */
.exp-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -4px 0 16px; }
.exp-l { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); }
.exp-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); }
.exp-seg button { position: relative; display: inline-flex; align-items: baseline; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: 600 var(--fs-sm) var(--font); cursor: pointer; align-items: center; transition: background .15s, color .15s; }
.exp-seg button small { font-size: 11px; font-weight: 500; color: var(--muted); }
.exp-seg button em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--surface); color: var(--muted); }
.exp-seg button:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.exp-seg button[aria-checked="true"] { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 0 0 1px var(--border); }
.exp-seg button[aria-checked="true"] em { background: var(--primary); color: var(--on-primary); }
.exp-seg .you { position: absolute; top: -7px; right: -4px; font: 700 9px/1 var(--font); letter-spacing: .03em; text-transform: uppercase; padding: 3px 5px; border-radius: 99px; background: var(--accent, var(--success)); color: #fff; }
.exp-u { padding: 0; }
.exp-u .n { margin-left: 0; }
@media (max-width: 760px) { .exp-seg button small { display: none; } .exp-seg { width: 100%; } .exp-seg button { flex: 1; justify-content: center; padding: 0 8px; } }

/* ---------------------------------------------------------------- job details drawer */
.dj-title { font: 600 24px/1.2 var(--serif); letter-spacing: -.015em; }
.dj-co { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 650; color: var(--text-2); }
.dj-co svg { color: var(--muted); }
.dj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.dj-loc { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: var(--fs-sm); }
.dj-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.dj-pill svg { color: var(--muted); }
.dj-pill.mode { background: var(--info-soft); border-color: transparent; color: var(--info); }
.dj-pill.mode svg { color: var(--info); }
.dj-pill.fresh { background: var(--success-soft); border-color: transparent; color: var(--success); }
.dj-pill.fresh svg { color: var(--success); }
.dj-h { display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.dj-h svg { color: var(--primary); }

/* key information grid */
.kfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kf { padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.kf-k { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kf-k svg { color: var(--primary); }
.kf-v { margin-top: 6px; font-weight: 700; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.kf-v.faint { color: var(--faint); font-weight: 600; }
.kf-s { margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.kf-exp { grid-column: 1 / -1; background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); padding: 16px 18px; }
.kf-v.big { font: 600 28px/1.1 var(--serif); letter-spacing: -.01em; color: var(--primary); }
.kf-exp .est { margin-left: 4px; text-transform: none; letter-spacing: 0; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--warning-soft); color: var(--warning); }
.kf-range { position: relative; height: 8px; margin: 14px 0 22px; border-radius: 99px; background: var(--bg-soft); }
.kf-range .band { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand-400, var(--primary)), var(--primary)); min-width: 8px; }
.kf-range .me { position: absolute; top: -5px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.kf-range span { position: absolute; top: 13px; transform: translateX(-50%); font: 600 10.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.kf-range span:first-of-type { transform: none; }
.kf-range span[style*="right"] { transform: none; }
.fit { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 4px 10px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.fit.ok { background: var(--success-soft); color: var(--success); }
.fit.warn { background: var(--warning-soft); color: var(--warning); }
.fit.info { background: var(--info-soft); color: var(--info); }
.kmini { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: var(--fs-xs); color: var(--text-2); }
.kmini b { color: var(--muted); font-weight: 600; margin-right: 6px; }

/* match card skill rows */
.sk-row { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: start; }
.sk-l { font-size: var(--fs-xs); font-weight: 650; color: var(--muted); padding-top: 5px; }

/* eligibility */
.dj-elig h3 { display: flex; align-items: center; gap: 8px; }
.dj-elig h3 svg { color: var(--success); }
.elig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.elig-i { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.elig-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.elig-i b { display: block; font-size: var(--fs-sm); }
.elig-i span { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }

/* description */
.dj-desc-head { display: grid; gap: 10px; margin-bottom: -6px; }
.dj-desc-head .dj-h { margin: 0; }
.dj-toc { display: flex; flex-wrap: wrap; gap: 6px; }
.dj-toc button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.dj-toc button:hover { border-color: var(--primary); color: var(--primary); }
.dj-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--muted); }
.dj-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dj-sec { scroll-margin-top: 230px; border-left: 3px solid var(--border-strong); }
.dj-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 16px; }
.dj-sec-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-soft); color: var(--text-2); }
.dj-sec.k-resp { border-left-color: var(--info); } .dj-sec.k-resp .dj-sec-ic { background: var(--info-soft); color: var(--info); }
.dj-sec.k-req, .dj-sec.k-skills, .dj-sec.k-elig { border-left-color: var(--primary); }
.dj-sec.k-req .dj-sec-ic, .dj-sec.k-skills .dj-sec-ic, .dj-sec.k-elig .dj-sec-ic { background: var(--primary-soft); color: var(--primary); }
.dj-sec.k-nice { border-left-color: var(--warning); } .dj-sec.k-nice .dj-sec-ic { background: var(--warning-soft); color: var(--warning); }
.dj-sec.k-perks { border-left-color: var(--success); } .dj-sec.k-perks .dj-sec-ic { background: var(--success-soft); color: var(--success); }
.dj-prose { font-size: 14.5px; line-height: 1.75; }
.dj-prose ul { list-style: none; padding-left: 0; display: grid; gap: 6px; }
.dj-prose li { position: relative; padding-left: 22px; }
.dj-prose li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .7; }
.dj-prose strong { color: var(--text); }
mark.kw { background: var(--bg-soft); color: var(--text); font-weight: 650; padding: 1px 5px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--border); }
mark.kw.hit { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
mark.kw.yrs { background: var(--warning-soft); color: var(--warning); box-shadow: none; }

@media (max-width: 640px) {
  .kfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .elig { grid-template-columns: 1fr; }
  .dj-title { font-size: 20px; }
  .sk-row { grid-template-columns: 1fr; gap: 4px; }
}
.dj-prose ul.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dj-prose ul.chips li { padding: 3px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; line-height: 1.5; }
.dj-prose ul.chips li::before { display: none; }
.dj-prose ul.chips mark.kw { padding: 0; box-shadow: none; background: none; }

/* ---------------------------------------------------------------- quick start: skills step, resume note, name */
.qp-resume { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: 99px; background: var(--info-soft); color: var(--info); font-size: 12.5px; font-weight: 600; }
.qp-name { display: grid; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.qp-name small { font-weight: 500; color: var(--faint); }
.qp-name .input { height: 44px; border-radius: 14px; }
.qp-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.qp-sub svg { color: var(--primary); }
/* Category step: search box, why a card matched, no-results state */
.qp-cat-search { position: relative; display: block; margin-bottom: 14px; }
.qp-cat-search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.qp-cat-search .input { width: 100%; padding-left: 36px; }
.qp-why { color: var(--primary); font-weight: 600; }
.qp-empty { display: flex; gap: 10px; align-items: flex-start; padding: 16px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--muted); }
.qp-empty b { display: block; color: var(--text); margin-bottom: 2px; }
.qp-empty span { font-size: 12.5px; }
/* "Choose industry" etc.: jumps back to the step a list depends on */
.qp-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--primary); text-decoration: underline; cursor: pointer; }
.qp-link:hover { color: var(--primary-hover); }
.qp-sub b { color: var(--text-2); }
.qp-meter { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.qp-meter-bar { flex: 0 0 120px; height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.qp-meter-bar i { display: block; height: 100%; border-radius: 99px; background: var(--danger); transition: width .3s var(--ease), background .3s; }
.qp-meter[data-level="2"] .qp-meter-bar i { background: var(--warning); }
.qp-meter[data-level="3"] .qp-meter-bar i { background: var(--success); }
.qp-meter[data-level="3"] { color: var(--success); }

/* ---------------------------------------------------------------- dashboard: complete your profile */
.finish { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 20px 22px; margin-bottom: 20px;
  background: linear-gradient(120deg, var(--primary-soft), var(--surface) 65%); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); animation: qpIn .35s var(--ease); }
.finish-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--bg-soft) 0); }
.finish-ring span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font: 700 14px var(--font); color: var(--primary); }
.finish-b h2 { font: 600 19px/1.25 var(--serif); letter-spacing: -.01em; }
.finish-b p { margin-top: 4px; font-size: var(--fs-sm); color: var(--muted); }
.finish-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.finish-step { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px; border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.finish-step:hover { border-color: var(--primary); color: var(--primary); }
.finish-step.ok { border-style: solid; border-color: transparent; background: var(--success-soft); color: var(--success); }
.finding { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.finding > svg { color: var(--primary); width: 22px; height: 22px; flex: none; }
@media (max-width: 760px) { .finish { grid-template-columns: auto 1fr; } .finish > .btn { grid-column: 1 / -1; justify-content: center; } }

/* ---- Jobs: technology categories and the profile banner */
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: thin; }
.cat-bar button, .cat-bar a { text-decoration: none; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cat-bar button span, .cat-bar a span { font-size: 11.5px; font-weight: 700; color: var(--text-2); background: var(--bg); border-radius: 999px; padding: 1px 7px; }
.cat-bar button.mine, .cat-bar a.mine { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.cat-bar button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-bar button[aria-selected="true"] span { background: rgba(255, 255, 255, .22); color: #fff; }
.cat-bar .cat-add { border-style: dashed; color: var(--accent); }
.nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.nudge-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex: none; }
.qp-cats .qp-card small { line-height: 1.35; }
/* Area cards: keep the role list clear of the tick in the corner (narrow screens lay the card out in a row). */
.qp-cats .qp-card { padding-right: 44px; }
/* the category row scrolls inside its column instead of widening the page */
.jobs-layout > *, .dash-grid > * { min-width: 0; }

/* ---- Email Reader panel (Job Alerts) */
.mail-acc { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.mail-list { display: grid; gap: 8px; }
.mail-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.mail-row details { margin-top: 4px; } .mail-row ul { margin: 6px 0 0 18px; display: grid; gap: 3px; }
.mail-row .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- sign-up / sign-in fields */
.au-f { display: grid; gap: 6px; }
.au-l { font-weight: 600; font-size: 14px; }
.au-hint { color: var(--text-2); font-size: 12.5px; }
.au-err { color: var(--danger); font-size: 12.5px; font-weight: 600; min-height: 0; }
.au-err:empty { display: none; }
.au-f.bad .input, .au-f.bad .pf { border-color: var(--danger); }
.au-f.bad .input:focus, .au-f.bad .pf:focus-within { box-shadow: 0 0 0 3px var(--danger-soft); }
/* phone: country button + number in one control */
.pf { position: relative; display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.pf:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pf .pf-num { border: 0; box-shadow: none !important; background: transparent; flex: 1; min-width: 0; }
.pf-cc { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border: 0; border-right: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: var(--r-sm) 0 0 var(--r-sm); white-space: nowrap; }
.pf-cc:hover { background: var(--bg-soft); }
.pf-cc:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pf-flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: none; }
.pf-car { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .6; }
.pf-cc[aria-expanded="true"] .pf-car { transform: rotate(180deg); }
.pf-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: min(340px, calc(100vw - 48px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 6px; }
.pf-pop[hidden] { display: none; }
.pf-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.pf-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; }
.pf-list li.act { background: var(--bg-soft); }
.pf-list li[aria-selected="true"] { font-weight: 700; }
.pf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-code { color: var(--text-2); font-variant-numeric: tabular-nums; }
.pf-list .pf-none { color: var(--text-2); cursor: default; }

/* Jobs: "Latest iOS jobs for you" heading (replaces the category tabs) */
.fy-head { min-width: 0; }
.fy-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.fy-sub { font-size: 15px; }
.fy-sub a { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- green & white polish (matches the landing page) */
.page-head h1, .fy-title, .section-title h2, .greet, .wz-head h1, .rs-hero h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -.025em; }
.page-head h1, .greet { font-size: clamp(28px, 3.2vw, 36px); }
.section-title h2 { font-size: 22px; }
.fy-title { font-weight: 500; }
/* sidebar: white, with a soft mint pill for the current page */
.sidebar { background: var(--surface); border-right: 1px solid var(--border); }
.nav a.active, .nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.nav a.active .i, .nav a[aria-current="page"] .i { color: var(--primary); }
/* buttons: deep green, pill-shaped like the landing CTAs */
.btn.primary { box-shadow: 0 10px 22px -14px var(--primary); }
.btn.primary:hover { box-shadow: 0 14px 26px -14px var(--primary); }
/* cards: crisp white on a faint mint page */
.card { border-color: var(--border); }
.card.hover:hover, .job-card:hover { border-color: var(--border-strong); box-shadow: 0 18px 36px -24px rgba(4, 80, 50, .35); }
.kpi .ic { background: var(--primary-soft); color: var(--primary); }

/* ---------------------------------------------------------------- sign-in / sign-up screens (auth.js), styled like the landing page */
.au-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); }
.au-art { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px clamp(28px, 5vw, 64px); color: #e2e8f0;
  background: radial-gradient(520px 320px at 15% 0%, rgba(37, 99, 235, .55), transparent 70%), radial-gradient(480px 300px at 95% 100%, rgba(124, 58, 237, .35), transparent 70%), #0b1220; }
.au-art::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, .05) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, .05) 39px 40px);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.au-art::after { content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; right: -120px; top: 30%; border-radius: 50%; background: rgba(96, 165, 250, .25); filter: blur(70px); animation: au-drift 16s ease-in-out infinite; }
.au-brand { display: inline-flex; align-items: center; gap: 10px; font: 750 20px/1 var(--font); letter-spacing: -.02em; color: inherit; text-decoration: none !important; }
.au-brand img { border-radius: 8px; }
.au-pitch { max-width: 480px; }
.au-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: rgba(255, 255, 255, .05);
  font: 600 12px/1 var(--mono); color: #cbd5e1; }
.au-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.au-pitch h2 { margin: 0 0 28px; font: 800 clamp(30px, 3.4vw, 46px)/1.05 var(--font); letter-spacing: -.04em; color: #fff; }
.au-pitch h2 span { background: linear-gradient(100deg, #93c5fd, #60a5fa 50%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.au-pitch ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.au-pitch li { position: relative; padding-left: 34px; display: grid; gap: 2px; }
.au-pitch li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(96, 165, 250, .2); color: #93c5fd; font-size: 12px; font-weight: 800; }
.au-pitch li b { color: #fff; font-size: 15px; }
.au-pitch li span { color: #94a3b8; font-size: 14px; line-height: 1.5; }
.au-foot { margin: 0; font: 500 12px/1 var(--mono); color: #64748b; }

.au-side { display: grid; place-content: center; justify-items: center; gap: 16px; padding: 40px 16px; }
.au-card { width: min(420px, 100%); display: grid; gap: 14px; padding: 30px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  box-shadow: 0 40px 80px -40px rgba(30, 58, 138, .35), var(--shadow-md); animation: au-rise .5s var(--ease) both; }
.au-brand-sm { color: var(--text); font-size: 18px; margin-bottom: 4px; }
.au-h1 { margin: 0; font: 800 26px/1.15 var(--font); letter-spacing: -.03em; color: var(--text); }
.au-card .btn.primary { height: 48px; border-radius: 10px; box-shadow: 0 10px 24px -12px var(--primary); }
.au-card .input { height: 44px; border-radius: 10px; }
.au-msg { margin: 0; font-size: 14px; font-weight: 600; min-height: 1em; }
.au-back { font-size: 14px; text-align: center; }
.au-legal { margin: 0; max-width: 420px; text-align: center; font-size: 12.5px; color: var(--muted); }
.au-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .au-page { grid-template-columns: minmax(0, 1fr); }
  .au-art { display: none; }
}
@media (min-width: 901px) { .au-brand-sm { display: none; } }
@keyframes au-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes au-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 30px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .au-card, .au-art::after { animation: none; } }

/* sign-in panel: animated workflow diagram (auth.js FLOW) */
.au-pitch { max-width: 560px; }
.au-pitch h2 { margin-bottom: 22px; }
.au-flow { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.au-line { fill: none; stroke: url(#au-g-line); stroke-width: 1.6; stroke-dasharray: 4 5; animation: au-dash 1.2s linear infinite; }
.au-line.no { stroke: rgba(148, 163, 184, .35); }
.au-node rect { fill: rgba(255, 255, 255, .05); stroke: rgba(148, 163, 184, .28); }
.au-node text { fill: #e2e8f0; font-size: 12.5px; font-weight: 650; }
.au-node-dot { fill: #60a5fa; animation: au-blink 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .45s); }
.au-node { animation: au-in .6s var(--ease) both; animation-delay: calc(.1s + var(--i) * .1s); }
.au-hub-ring { fill: none; stroke: rgba(147, 197, 253, .55); stroke-width: 1.4; stroke-dasharray: 3 7; transform-origin: 250px 150px; animation: au-spin 14s linear infinite; }
.au-hub-pulse { fill: rgba(59, 130, 246, .35); transform-origin: 250px 150px; animation: au-pulse 2.4s ease-out infinite; }
.au-hub-t { fill: #fff; font-size: 13px; font-weight: 750; text-anchor: middle; }
.au-hub-s { fill: #94a3b8; font: 500 10.5px var(--mono); text-anchor: middle; }
.au-out rect:first-child { fill: rgba(255, 255, 255, .06); stroke: rgba(96, 165, 250, .45); }
.au-out { animation: au-in .6s var(--ease) both, au-glowcard 3.3s ease-in-out infinite; animation-delay: calc(.5s + var(--i) * .15s), calc(1.6s + var(--i) * .7s); }
.au-out-t { fill: #f1f5f9; font-size: 12px; font-weight: 650; }
.au-badge { fill: #2563eb; }
.au-badge-t { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; }
.au-out.no rect:first-child { fill: rgba(255, 255, 255, .03); stroke: rgba(148, 163, 184, .25); }
.au-out.no .au-out-t { fill: #64748b; text-decoration: line-through; }
.au-out.no .au-badge { fill: rgba(248, 113, 113, .2); }
.au-out.no .au-badge-t { fill: #fca5a5; }
.au-out.no { animation: au-in .6s var(--ease) both .8s, au-fade 4.4s ease-in-out infinite 2.4s; }
.au-dot { fill: #93c5fd; filter: drop-shadow(0 0 4px #60a5fa); }
.au-dot.ok { fill: #bfdbfe; }
.au-dot.no { fill: #94a3b8; filter: none; opacity: .7; }
.au-legend { display: flex !important; flex-wrap: wrap; gap: 8px 10px !important; margin-top: 20px !important; }
.au-legend li { padding: 6px 10px 6px 28px !important; border: 1px solid rgba(148, 163, 184, .22); border-radius: 8px; background: rgba(255, 255, 255, .04); color: #cbd5e1; font-size: 12.5px; font-weight: 600; display: block !important; }
.au-legend li::before { left: 8px !important; top: 50% !important; transform: translateY(-50%); width: 14px !important; height: 14px !important; font-size: 9px !important; border-radius: 4px !important; }

@keyframes au-dash { to { stroke-dashoffset: -18; } }
@keyframes au-blink { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes au-spin { to { transform: rotate(360deg); } }
@keyframes au-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes au-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes au-glowcard { 0%, 60%, 100% { filter: none; } 30% { filter: drop-shadow(0 0 8px rgba(96, 165, 250, .55)); } }
@keyframes au-fade { 0%, 40% { opacity: 1; } 65%, 85% { opacity: .3; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .au-flow *, .au-flow { animation: none !important; }
  .au-dots { display: none; }
}

/* sign-in screens, full-screen version: the workflow artwork fills the page; the form floats over it on the right */
.au-page { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 100vh; min-height: 100dvh; background: #0b1220; }
.au-art { position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: clamp(28px, 4vw, 48px) clamp(28px, 5vw, 72px); padding-right: calc(min(480px, 40vw) + clamp(28px, 5vw, 72px));
  background:
    radial-gradient(900px 560px at 18% 10%, rgba(37, 99, 235, .55), transparent 70%),
    radial-gradient(760px 520px at 70% 100%, rgba(124, 58, 237, .38), transparent 70%),
    radial-gradient(600px 420px at 100% 30%, rgba(14, 165, 233, .18), transparent 70%), #0b1220; }
.au-art::after { width: 620px; height: 620px; right: 28%; top: 22%; }
.au-pitch { max-width: 1040px; width: 100%; margin: 0 auto 0 0; }
.au-pitch h2 { font-size: clamp(34px, 4.4vw, 68px); margin-bottom: clamp(16px, 2.5vh, 30px); }
.au-kicker { font-size: 13px; padding: 7px 14px; }
.au-flow { width: 100%; max-width: 980px; max-height: 56vh; }
.au-legend { margin-top: clamp(14px, 2.5vh, 26px) !important; }
.au-legend li { font-size: 13.5px !important; padding-top: 8px !important; padding-bottom: 8px !important; }

.au-side { position: relative; z-index: 2; grid-column: 2; width: min(480px, 40vw); min-width: 380px; height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px;
  padding: 32px clamp(24px, 4vw, 56px); }
.au-card { width: 100%; max-width: 420px; padding: 32px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .04); }
.au-legal { color: #94a3b8; }
.au-legal a { color: #cbd5e1; }
.au-back { color: var(--primary); }

/* tablet & phone: the artwork stays as a dimmed backdrop; the form is centred and gets the width */
@media (max-width: 1080px) {
  .au-page { grid-template-columns: minmax(0, 1fr); }
  .au-art { display: flex; padding-right: clamp(28px, 5vw, 72px); }
  .au-pitch, .au-foot { display: none; }
  .au-side { grid-column: 1; width: 100%; min-width: 0; padding: 32px 16px; }
  .au-brand-sm { display: inline-flex; }
}
@media (min-width: 1081px) { .au-brand-sm { display: none; } }
@media (max-height: 700px) and (min-width: 1081px) { .au-legend { display: none !important; } .au-flow { max-height: 50vh; } }

/* phones: one logo only (the one in the card) */
@media (max-width: 1080px) { .au-art > .au-brand { display: none; } }

/* sign-in form, large premium version */
.au-side { width: min(560px, 44vw); min-width: 420px; }
.au-card { max-width: 500px; gap: 18px; padding: clamp(28px, 3vw, 40px); border-radius: 24px; background: var(--surface);
  box-shadow: 0 60px 120px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .6); position: relative; }
.au-card::before { content: ""; position: absolute; inset: 0 24px auto; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #2563eb, #60a5fa, #a78bfa); }

.au-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.au-tabs a { display: grid; place-items: center; height: 40px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none !important; transition: background .2s, color .2s, box-shadow .2s; }
.au-tabs a:hover { color: var(--text); }
.au-tabs a[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 4px 12px -6px rgba(15, 23, 42, .18); }
.au-tabs a:focus-visible { outline: none; box-shadow: var(--ring); }

.au-head { display: grid; gap: 6px; margin-top: 4px; }
.au-h1 { font-size: clamp(26px, 2.2vw, 32px); }
.au-sub { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.au-card .au-l { font-size: 14px; color: var(--text); }
.au-card .input { height: 52px; font-size: 15.5px; padding: 0 16px; border-radius: 12px; border-color: var(--border-strong); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.au-card .input:hover { border-color: var(--muted); }
.au-card .input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.au-f.bad .input { border-color: var(--danger); }

.au-go { height: 54px !important; font-size: 16px !important; font-weight: 750 !important; border-radius: 12px !important; gap: 10px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; box-shadow: 0 16px 30px -14px rgba(37, 99, 235, .8) !important; transition: transform .2s var(--ease), box-shadow .25s, filter .2s; }
.au-go::after { content: "→"; font-size: 18px; transition: transform .25s var(--ease); }
.au-go:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 20px 36px -14px rgba(37, 99, 235, .9) !important; }
.au-go:hover::after { transform: translateX(4px); }
.au-go:disabled { filter: saturate(.6); cursor: progress; }
.au-go:disabled::after { content: ""; }

.au-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.au-alt { display: grid; place-items: center; height: 48px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--text) !important; font-weight: 650; font-size: 14.5px; text-decoration: none !important; transition: border-color .15s, background .15s; }
.au-alt:hover { border-color: var(--primary); background: var(--primary-soft); }

.au-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 2px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.au-trust li::before { content: "✓"; margin-right: 6px; color: #059669; font-weight: 800; }
.au-msg:empty { display: none; }
.au-back { font-size: 13.5px; color: var(--muted) !important; }
.au-back:hover { color: var(--primary) !important; }

@media (max-width: 1080px) { .au-side { width: 100%; min-width: 0; } .au-card { max-width: 480px; } }
@media (max-width: 420px) { .au-card { padding: 24px 18px; border-radius: 20px; } .au-trust { justify-content: flex-start; } }

/* sign-in / register: larger form area (wider and taller) */
.au-art { padding-right: calc(min(720px, 50vw) + clamp(24px, 4vw, 56px)); }
.au-side { width: min(720px, 50vw); min-width: 480px; padding: clamp(24px, 4vh, 48px) clamp(24px, 4vw, 64px); }
.au-card { max-width: 620px; min-height: min(72vh, 760px); align-content: center; gap: 22px; padding: clamp(32px, 3.6vw, 52px) clamp(28px, 3.6vw, 52px); border-radius: 28px; }
.au-card::before { inset: 0 32px auto; height: 4px; }
.au-tabs { padding: 5px; border-radius: 14px; }
.au-tabs a { height: 48px; font-size: 15.5px; border-radius: 10px; }
.au-head { gap: 8px; }
.au-h1 { font-size: clamp(30px, 2.6vw, 40px); }
.au-sub { font-size: 16.5px; }
.au-card .au-f { gap: 8px; }
.au-card .au-l { font-size: 15px; }
.au-card .au-hint, .au-card .au-err { font-size: 13.5px; }
.au-card .input { height: 58px; font-size: 16.5px; padding: 0 18px; border-radius: 14px; }
.au-go { height: 60px !important; font-size: 17px !important; border-radius: 14px !important; }
.au-alt { height: 54px; font-size: 15.5px; border-radius: 14px; }
.au-or { font-size: 13px; }
.au-trust { font-size: 13.5px; gap: 8px 20px; padding-top: 18px; }
.au-back { font-size: 14.5px; }
.au-legal { max-width: 620px; font-size: 13.5px; }

/* register: full name and username side by side, everything else full width */
.au-card.au-signup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
.au-card.au-signup > * { grid-column: 1 / -1; }
.au-card.au-signup > [data-f="fullName"], .au-card.au-signup > [data-f="username"] { grid-column: auto; }

/* phone-number field in the larger form */
.au-card .pf { border-radius: 14px; border-color: var(--border-strong); overflow: hidden; }
.au-card .pf:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.au-card .pf .pf-num { height: 56px; }
.au-card .pf-cc { padding: 0 12px 0 14px; font-size: 15.5px; }
.au-card .pf-flag { width: 24px; height: 18px; }

@media (max-width: 1280px) { .au-side { width: min(600px, 50vw); min-width: 440px; } .au-art { padding-right: calc(min(600px, 50vw) + 40px); } }
@media (max-width: 1080px) {
  .au-side { width: 100%; min-width: 0; padding: 28px 16px; }
  .au-card { max-width: 600px; min-height: 0; }
}
@media (max-width: 560px) {
  .au-card { padding: 28px 20px; border-radius: 22px; gap: 18px; }
  .au-card.au-signup { grid-template-columns: minmax(0, 1fr); }
  .au-h1 { font-size: 28px; }
}

/* register: align the side-by-side fields at the top (the username hint makes that column taller) */
.au-card.au-signup { align-items: start; gap: 18px; row-gap: 18px; }

/* sign-in / register: fit and scale (15" laptops to 24" monitors). Overrides the layers above.
   Sizes follow the viewport's width and height (clamp), so the whole form fits one screen on a 1440x800
   laptop window without scrolling, and a 24" screen gets a balanced, centred composition: the artwork column and
   the form share one max-width frame instead of sitting at the far edges, and the diagram stops growing. */
@media (min-width: 1081px) {
  .au-page { --au-frame: max(clamp(28px, 4vw, 72px), calc((100vw - 1680px) / 2)); --au-side: clamp(460px, 34vw, 600px); }
  .au-art { padding: clamp(24px, 4vh, 48px) calc(var(--au-side) + var(--au-frame) + clamp(24px, 3vw, 64px)) clamp(22px, 3.5vh, 44px) var(--au-frame); gap: clamp(16px, 3vh, 32px); }
  .au-side { width: calc(var(--au-side) + var(--au-frame)); min-width: 0; padding: clamp(20px, 3vh, 40px) var(--au-frame) clamp(20px, 3vh, 40px) 0; gap: 14px; }
  .au-pitch { max-width: 760px; }
  .au-pitch h2 { font-size: clamp(34px, 2.4vw + 8px, 58px); line-height: 1.04; max-width: 13em; margin-bottom: clamp(14px, 2.4vh, 28px); }
  .au-flow { max-width: clamp(440px, 34vw, 640px); max-height: 44vh; }
  .au-legend { margin-top: clamp(12px, 2vh, 22px) !important; }
  .au-legend li { font-size: 13px !important; padding-top: 6px !important; padding-bottom: 6px !important; }
}
.au-kicker, .au-foot { font-family: var(--font); letter-spacing: .01em; }
.au-kicker { font-size: 12.5px; font-weight: 650; }
.au-foot { font-size: 12.5px; color: #8391a7; }

/* the card: content height, not a forced 72vh, with spacing and controls that shrink a little on short screens */
.au-card { min-height: 0; max-width: 560px; gap: clamp(14px, 1.9vh, 20px); padding: clamp(26px, 3.6vh, 44px) clamp(24px, 2.6vw, 44px); border-radius: 24px; }
.au-card::before { inset: 0 28px auto; height: 3px; }
.au-tabs { padding: 4px; border-radius: 12px; }
.au-tabs a { height: clamp(40px, 4.6vh, 46px); font-size: 14.5px; border-radius: 9px; }
.au-head { gap: 6px; margin-top: 2px; }
.au-h1 { font-size: clamp(26px, 1.1vw + 12px, 35px); line-height: 1.12; letter-spacing: -.032em; }
.au-sub { font-size: clamp(14.5px, .2vw + 12.2px, 16px); line-height: 1.55; }
.au-card .au-f { gap: 6px; }
.au-card .au-l { font-size: 14px; font-weight: 650; }
.au-card .au-hint, .au-card .au-err { font-size: 12.5px; line-height: 1.45; }
.au-card .input { height: clamp(46px, 5.4vh, 52px); font-size: 15.5px; padding: 0 16px; border-radius: 12px; }
.au-card .pf { border-radius: 12px; }
.au-card .pf .pf-num { height: calc(clamp(46px, 5.4vh, 52px) - 2px); font-size: 15.5px; }
.au-card .pf-cc { font-size: 15px; }
.au-go { height: clamp(48px, 5.8vh, 54px) !important; font-size: 15.5px !important; border-radius: 12px !important; }
.au-alt { height: clamp(44px, 5vh, 48px); font-size: 14.5px; border-radius: 12px; }
.au-or { font-size: 12px; }
.au-trust { font-size: 12.5px; gap: 6px 16px; padding-top: clamp(10px, 1.6vh, 14px); }
.au-back { font-size: 13.5px; }
.au-legal { font-size: 12.5px; max-width: 520px; }
.au-card.au-signup { column-gap: 14px; row-gap: clamp(12px, 1.7vh, 18px); }
/* short laptop windows: drop the duplicate reassurance row (the art panel says the same) */
@media (min-width: 1081px) and (max-height: 860px) { .au-card.au-signup .au-trust { display: none; } }

@media (max-width: 1080px) {
  .au-side { padding: clamp(20px, 4vh, 32px) 16px; }
  .au-card { max-width: 520px; }
}
@media (max-width: 560px) {
  .au-card { padding: 24px 18px; border-radius: 20px; gap: 14px; }
  .au-card.au-signup { grid-template-columns: minmax(0, 1fr); }
  .au-h1 { font-size: 26px; }
}

/* Plans page (pages/plans.js) */
.pl-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-bottom: 20px; }
.pl-mine > div { flex: 1 1 240px; }
.pl-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.pl-mine h2 { margin: 4px 0 2px; font-size: 22px; }
.pl-mine .btn { margin-top: 8px; }
.pl-use { flex: 1 1 320px; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-use li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 64px; align-items: center; gap: 10px; font-size: 13px; }
.pl-use i { position: relative; height: 6px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.pl-use i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--primary); border-radius: inherit; }
.pl-use i.hot::after { background: var(--warning); }
.pl-use b { text-align: right; font: 600 12px var(--mono); }
.pl-filter { display: flex; gap: 4px; width: max-content; max-width: 100%; margin-bottom: 18px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pl-filter:empty { display: none; }
.pl-filter button { height: 36px; padding: 0 16px; border: 0; border-radius: 9px; background: none; font: 650 13.5px var(--font); color: var(--text-2); cursor: pointer; }
.pl-filter button[aria-selected="true"] { background: var(--primary); color: #fff; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.pl-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; transition: transform .2s, box-shadow .2s; }
.pl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pl-card.hl { border: 2px solid var(--primary); }
.pl-card.cur { outline: 2px dashed var(--success); outline-offset: 3px; }
.pl-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pl-card h3 { margin: 0; font-size: 19px; }
.pl-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-price b { font-size: 32px; letter-spacing: -.02em; }
.pl-price s, .pl-price span { color: var(--muted); font-size: 14px; }
.pl-save { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--success); }
.pl-feat { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 13.5px; }
.pl-feat li { display: flex; gap: 9px; color: var(--text-2); }
.pl-feat li > span:first-child { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; font-weight: 800; background: var(--success-soft); color: var(--success); }
.pl-feat li.no { color: var(--faint); }
.pl-feat li.no > span:first-child { background: var(--bg-soft); color: var(--faint); }

/* ================================================================ app pages: responsive scale (15" laptops to 24" monitors)
   One fluid layer over everything above, design only. Type, sidebar, page width and spacing grow smoothly with the
   viewport (clamp) so a 24" screen uses its width instead of a 1320px column, and a 15" laptop keeps today's
   proportions. Headings use the same Manrope display style as the landing and sign-in pages. */
:root {
  --fs-xs: clamp(12px, .06vw + 11.2px, 12.5px);
  --fs-sm: clamp(13px, .1vw + 11.6px, 14px);
  --fs-md: clamp(14px, .15vw + 11.9px, 15px);
  --fs-lg: clamp(16px, .2vw + 13.2px, 17.5px);
  --fs-xl: clamp(19px, .35vw + 14px, 22px);
  --fs-2xl: clamp(24px, .6vw + 15.5px, 29px);
  --fs-3xl: clamp(30px, .9vw + 17px, 38px);
  --sidebar-w: clamp(232px, 12.5vw, 268px);
  --page-pad: clamp(20px, 2vw, 44px);
}

/* shell: page and top bar share one width and gutter, so the search box lines up with the content */
/* the top bar's gutter follows the centred page column (padding % = width of .main), so search lines up with the content */
.topbar { padding-inline: max(var(--page-pad), calc((100% - clamp(1180px, 82vw, 1680px)) / 2 + var(--page-pad))); height: clamp(60px, 3.6vw, 68px); }
.topbar .input-icon { width: min(clamp(380px, 28vw, 560px), 100%); }
.page { max-width: clamp(1180px, 82vw, 1680px); padding: 8px var(--page-pad) clamp(40px, 3vw, 64px); }
.nav a { font-size: var(--fs-md); }
.brand { font-family: var(--font); font-weight: 800; letter-spacing: -.03em; }

/* typography hierarchy: page title > section title > card title > body > meta */
.page-head h1, .greet, .fy-title, .wz-head h1, .rs-hero h1 {
  font-family: var(--font); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.page-head h1, .greet { font-size: clamp(27px, .9vw + 14px, 35px); }
.fy-title { font-size: clamp(28px, 1vw + 14px, 38px); }
.section-title h2, .dj-title, .finish-b h2, .qp-head h2 { font-family: var(--font); font-weight: 750; letter-spacing: -.025em; }
.section-title h2 { font-size: clamp(19px, .45vw + 12.5px, 23px); }
.dj-title { font-size: clamp(21px, .5vw + 14px, 26px); }
.finish-b h2 { font-size: clamp(17px, .3vw + 12.7px, 20px); }
.qp-head h2 { font-size: clamp(22px, 1vw + 10px, 28px); }
.qp-preview { font-family: var(--font); font-weight: 600; letter-spacing: -.015em; }
.kf-v.big { font-family: var(--font); font-weight: 800; letter-spacing: -.025em; }
.page-head { margin: clamp(10px, 1vw, 18px) 0 clamp(20px, 1.6vw, 30px); }
.page-head p, .fy-sub { font-size: var(--fs-md); line-height: 1.55; }
h3 { letter-spacing: -.01em; }

/* dashboard */
.kpis { gap: clamp(12px, 1vw, 20px); margin-bottom: clamp(22px, 1.8vw, 34px); }
.dash-grid { grid-template-columns: minmax(0, 1fr) clamp(320px, 21vw, 420px); gap: clamp(20px, 1.6vw, 32px); }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
/* side cards keep to their column: long titles (recent applications) truncate instead of widening the card past it */
.dash-grid > *, .dash-grid .stack > *, .dash-grid .stack .row > .grow { min-width: 0; }
/* a long platform list scrolls inside its card instead of stretching the page */
#plats { max-height: clamp(420px, 52vh, 620px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* jobs: the filter column scales with the page */
.jobs-layout { gap: clamp(18px, 1.5vw, 30px); }
@media (min-width: 1101px) {
  .jobs-layout { grid-template-columns: clamp(250px, 16vw, 300px) minmax(0, 1fr); }
  .jobs-layout.collapsed { grid-template-columns: 0 minmax(0, 1fr); gap: 0; } /* same collapse as before, just after the new width */
}

/* applications board: cards fit their column (long titles truncate instead of pushing the card under the next lane) */
.lane, .lane > *, .app-card, .app-card > *, .app-card .grow { min-width: 0; }
.app-card .row.wrap { min-width: 0; }
.app-card select { max-width: 100%; }
.board { gap: clamp(12px, 1vw, 18px); grid-template-columns: repeat(6, minmax(clamp(220px, 13vw, 280px), 1fr)); }

/* cards and controls breathe a little more on large screens */
.card.pad { padding: clamp(18px, 1.4vw, 26px); }
.btn { font-size: var(--fs-sm); }
.input, select.input { font-size: var(--fs-md); }

/* ================================================================ phones: overflow fixes (design only) */
@media (max-width: 860px) {
  /* settings: the section tabs scroll sideways inside the column instead of widening it past the screen */
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings > * { min-width: 0; }
}
@media (max-width: 560px) {
  /* Resume Studio header: wrap the buttons under the logo instead of running off the screen */
  .lp-nav { flex-wrap: wrap; row-gap: 10px; padding-inline: 16px; }
  .lp-nav .rs-brand small { display: none; }
}
@media (max-width: 640px) {
  /* job cards: the save / view / apply buttons wrap onto a second line instead of overflowing the card */
  .job .side, .job .acts { flex-wrap: wrap; row-gap: 8px; }
  .job .acts { min-width: 0; }
}
@media (max-width: 480px) {
  /* setup: five steps plus the current label fit a phone width */
  .stepper { padding: 0 12px; }
  .stepper .s { gap: 6px; }
  .stepper .ln { margin: 0 6px; min-width: 8px; }
}
