/* Hire MSC design system: tokens, base elements, components, the shared app bar and the page layouts of
   /login, /signup, /jobs and /jobs/new. Components are prefixed ui-, the shell and page frame app-.
   Token names match talent.css so talent/projects styles can move onto this file unchanged.
   Light by default; dark via html[data-theme="dark"] or the OS preference. Text never below 13px. */

/* ---------------------------------------------------------------------------
   Tokens */

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fbfe;
  --sunken: #eef3fa;
  --ink: #142644;
  --muted: #4d607b;
  --faint: #596e8b;
  --line: #dce4f0;
  --line-strong: #c3d0e2;
  --accent: #234f91;
  --accent-hover: #183b73;
  --accent-soft: #e9f0fb;
  --accent-line: #b9cdea;
  --on-accent: #ffffff;
  --navy: #112b4b;
  --navy-2: #1b3d65;
  --navy-3: #2c5585;
  --on-navy: #edf4ff;
  --on-navy-muted: #bdcee5;
  --success: #1c6541;
  --success-bg: #e5f3eb;
  --success-line: #b6dcc6;
  --warning: #7d5a17;
  --warning-bg: #fbf3e0;
  --warning-line: #ecd7a4;
  --danger: #b0333c;
  --danger-hover: #8f2830;
  --on-danger: #ffffff;
  --danger-bg: #fbeced;
  --danger-line: #efc2c6;
  --violet: #5a3ea6;
  --violet-bg: #f0ebfb;
  --violet-line: #d3c6f1;
  --mark-bg: #ffe9a3;
  --mark-ink: #2d2200;
  /* "Shared with HR" star on /jobs: an amber fill inside an outline that keeps 3:1 on white and the selected row. */
  --star-fill: #f5b301;
  --star-line: #a86a00;
  --backdrop: rgba(9, 22, 42, 0.46);
  --shadow-sm: 0 1px 2px rgba(19, 42, 76, 0.06);
  --shadow: 0 1px 2px rgba(19, 42, 76, 0.04), 0 8px 24px rgba(19, 42, 76, 0.07);
  --shadow-lg: 0 24px 72px rgba(9, 24, 48, 0.22);
  --focus: color-mix(in srgb, var(--accent) 45%, transparent);

  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Manrope', 'DM Sans', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --text-xs: 13px;
  --text-sm: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 38px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --bar-h: 64px;
  --page-max: 1320px;
  --gutter: 24px;
  --z-bar: 40;
  --z-menu: 60;
  --z-modal: 100;
  --z-toast: 150;
  --z-block: 300;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 120ms;
  --normal: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1728;
    --surface: #14223a;
    --surface-2: #172841;
    --sunken: #101c30;
    --ink: #edf3ff;
    --muted: #b5c4da;
    --faint: #a7b8d0;
    --line: #2a3b55;
    --line-strong: #3a5070;
    --accent: #97baff;
    --accent-hover: #c0d3ff;
    --accent-soft: #1d365b;
    --accent-line: #3a5d8f;
    --on-accent: #0d1728;
    --navy: #0a1424;
    --navy-2: #1d365b;
    --navy-3: #2c5585;
    --on-navy: #edf3ff;
    --on-navy-muted: #b5c4da;
    --success: #8fdcb1;
    --success-bg: #173a2b;
    --success-line: #2e6a4c;
    --warning: #ecc97f;
    --warning-bg: #372d17;
    --warning-line: #5d4a22;
    --danger: #ff9ca4;
    --danger-hover: #ffbcc1;
    --on-danger: #2a0d11;
    --danger-bg: #3d1d24;
    --danger-line: #6e3440;
    --violet: #cbb9ff;
    --violet-bg: #2a2150;
    --violet-line: #4d3f86;
    --mark-bg: #6b5410;
    --mark-ink: #fff6d6;
    --star-fill: #f6c445;
    --star-line: #f6c445;
    --backdrop: rgba(2, 8, 18, 0.66);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1728;
  --surface: #14223a;
  --surface-2: #172841;
  --sunken: #101c30;
  --ink: #edf3ff;
  --muted: #b5c4da;
  --faint: #a7b8d0;
  --line: #2a3b55;
  --line-strong: #3a5070;
  --accent: #97baff;
  --accent-hover: #c0d3ff;
  --accent-soft: #1d365b;
  --accent-line: #3a5d8f;
  --on-accent: #0d1728;
  --navy: #0a1424;
  --navy-2: #1d365b;
  --navy-3: #2c5585;
  --on-navy: #edf3ff;
  --on-navy-muted: #b5c4da;
  --success: #8fdcb1;
  --success-bg: #173a2b;
  --success-line: #2e6a4c;
  --warning: #ecc97f;
  --warning-bg: #372d17;
  --warning-line: #5d4a22;
  --danger: #ff9ca4;
  --danger-hover: #ffbcc1;
  --on-danger: #2a0d11;
  --danger-bg: #3d1d24;
  --danger-line: #6e3440;
  --violet: #cbb9ff;
  --violet-bg: #2a2150;
  --violet-line: #4d3f86;
  --mark-bg: #6b5410;
  --mark-ink: #fff6d6;
  --star-fill: #f6c445;
  --star-line: #f6c445;
  --backdrop: rgba(2, 8, 18, 0.66);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------------------
   Base */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--text-sm)/1.55 var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.app-no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); letter-spacing: -0.2px; }
img, svg, video { max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

[hidden] { display: none !important; }

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

code, kbd, pre { font-family: var(--font-mono); font-size: var(--text-xs); }
code { padding: 0 5px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--sunken); }
mark { padding: 0 1px; border-radius: 3px; background: var(--mark-bg); color: var(--mark-ink); }
hr { height: 1px; margin: var(--space-4) 0; border: 0; background: var(--line); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ui-i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.ui-i.sm { width: 15px; height: 15px; }
.ui-i.lg { width: 22px; height: 22px; }
.ui-i.xl { width: 28px; height: 28px; stroke-width: 1.6; }

.ui-muted { color: var(--muted); }
.ui-faint { color: var(--faint); }
.ui-small { font-size: var(--text-xs); }
.ui-strong { font-weight: 600; color: var(--ink); }
.ui-nowrap { white-space: nowrap; }
.ui-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ui-num { font-variant-numeric: tabular-nums; }
.ui-list-reset { margin: 0; padding: 0; list-style: none; }
.ui-stack { display: grid; gap: var(--space-4); }
.ui-stack.tight { gap: var(--space-2); }
.ui-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ui-cluster.end { justify-content: flex-end; }
.ui-spacer { flex: 1; }

/* ---------------------------------------------------------------------------
   App bar (rendered by app-shell.js into <header data-app-shell>) */

[data-app-shell] {
  position: sticky;
  top: 0;
  z-index: var(--z-bar);
  min-height: var(--bar-h);
  background: var(--navy);
  color: var(--on-navy);
  border-bottom: 1px solid color-mix(in srgb, var(--navy-2) 80%, transparent);
}

.app-skip {
  position: absolute;
  top: -80px;
  left: var(--space-4);
  z-index: calc(var(--z-block) + 1);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}

.app-skip:focus { top: var(--space-2); }

.app-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: var(--page-max);
  height: var(--bar-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

[data-app-shell] :focus-visible { outline-color: #9cc3ff; }

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--on-navy);
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.app-brand:hover { text-decoration: none; }

.app-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  border: 1px solid #c6d9ee;
}

.app-brand-name { font: 800 18px/1 var(--font-head); letter-spacing: -0.3px; white-space: nowrap; }
.app-brand-tag { display: block; margin-top: 3px; font: 500 var(--text-xs)/1 var(--font); color: var(--on-navy-muted); letter-spacing: 0; }

.app-nav { min-width: 0; }
.app-nav ul { display: flex; align-items: center; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }

.app-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--on-navy-muted);
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  transition: background-color var(--fast), color var(--fast);
}

.app-nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.app-nav a[aria-current="page"] { background: var(--navy-2); color: #fff; }

.app-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: -12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #8fb6ec;
}

.app-nav .ui-i { width: 17px; height: 17px; opacity: 0.9; }

.app-bar-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }

.app-bar-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--on-navy-muted);
  transition: background-color var(--fast), color var(--fast);
}

.app-bar-btn:hover { background: var(--navy-2); color: #fff; }
.app-bar-btn[aria-expanded="true"] { background: var(--navy-2); color: #fff; }

.app-bar-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.app-bar-link:hover { background: var(--navy-2); text-decoration: none; }
.app-bar-link.solid { background: #edf4ff; color: #112b4b; }
.app-bar-link.solid:hover { background: #fff; }

.app-menu-toggle { display: none; }

.app-account { position: relative; }

.app-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 2px 8px 2px 2px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-navy);
}

.app-avatar-btn:hover, .app-avatar-btn[aria-expanded="true"] { background: var(--navy-2); }
.app-avatar-btn .ui-i { width: 15px; height: 15px; color: var(--on-navy-muted); }

.app-avatar-btn .ui-avatar { background: var(--navy-3); color: #fff; border: 1px solid #52739a; }
.app-avatar-btn.pending .ui-avatar { background: #7d5a17; border-color: #b58a33; }
.app-avatar-placeholder { background: var(--navy-3); opacity: 0.35; }

.app-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: var(--z-menu);
  width: min(300px, calc(100vw - 24px));
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: ui-pop var(--normal) var(--ease);
}

.app-menu-head {
  display: grid;
  gap: 2px;
  padding: var(--space-2) var(--space-3) var(--space-3);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.app-menu-head strong { font-size: var(--text-md); }
.app-menu-head span { color: var(--muted); font-size: var(--text-xs); }

.app-menu a, .app-menu button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 42px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
}

.app-menu a:hover, .app-menu button:hover, .app-menu a:focus-visible, .app-menu button:focus-visible { background: var(--sunken); text-decoration: none; }
.app-menu .ui-i { color: var(--muted); }
.app-menu hr { margin: var(--space-1) 0; }
.app-menu .danger { color: var(--danger); }
.app-menu .danger .ui-i { color: var(--danger); }
.app-menu-note { padding: var(--space-2) var(--space-3); color: var(--muted); font-size: var(--text-xs); }

.app-mobile-nav {
  border-top: 1px solid var(--navy-2);
  background: var(--navy);
  padding: var(--space-2) var(--gutter) var(--space-4);
  animation: ui-drop var(--normal) var(--ease);
}

.app-mobile-nav ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

.app-mobile-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--on-navy);
  font-weight: 600;
  font-size: var(--text-md);
}

.app-mobile-nav a:hover { background: var(--navy-2); text-decoration: none; }
.app-mobile-nav a[aria-current="page"] { background: var(--navy-2); box-shadow: inset 3px 0 0 #8fb6ec; }
.app-mobile-nav .app-mobile-auth { display: flex; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--navy-2); }
.app-mobile-nav .app-mobile-auth a { flex: 1; justify-content: center; border: 1px solid var(--navy-3); }
.app-mobile-nav .app-mobile-auth a.solid { background: #edf4ff; color: #112b4b; border-color: #edf4ff; }

@media (max-width: 900px) {
  .app-bar-inner { gap: var(--space-3); }
  .app-nav { display: none; }
  .app-menu-toggle { display: inline-grid; }
  .app-bar-link:not(.keep) { display: none; }
  .app-avatar-btn > .ui-i { display: none; }
  .app-avatar-btn { padding: 2px; }
}

@media (min-width: 901px) {
  .app-mobile-nav { display: none !important; }
}

/* Blocking screen (signed out, no recruiter access) */

.app-block {
  position: fixed;
  inset: 0;
  z-index: var(--z-block);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: var(--bg);
}

.app-block-card {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  width: min(460px, 100%);
  padding: var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-block-card h2 { font-size: var(--text-2xl); line-height: 1.25; }
.app-block-card p { color: var(--muted); }
.app-block-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------------------------------------------------------------------------
   Page frame */

.app-main { padding: var(--space-8) var(--gutter) var(--space-16); }
main[tabindex="-1"]:focus { outline: none; }
.app-container { max-width: var(--page-max); margin: 0 auto; min-width: 0; }
.app-container.narrow { max-width: 880px; }

.app-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
}

.app-page-head > div:first-child { min-width: 0; }
.app-eyebrow { margin-bottom: var(--space-1); color: var(--accent); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.app-title { font-size: var(--text-3xl); font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; }
.app-subtitle { margin-top: var(--space-2); max-width: 64ch; color: var(--muted); font-size: var(--text-md); }
.app-page-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.app-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.app-crumbs a { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--muted); }
.app-crumbs a:hover { color: var(--accent); }
.app-crumbs [aria-current] { color: var(--ink); }

.app-section-title { font-size: var(--text-lg); font-weight: 750; line-height: 1.3; }

/* ---------------------------------------------------------------------------
   Buttons */

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast);
}

.ui-btn:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--sunken); text-decoration: none; }
.ui-btn:active:not(:disabled) { transform: translateY(1px); }
.ui-btn:disabled, .ui-btn[aria-disabled="true"] { opacity: 0.55; }
.ui-btn .ui-i { width: 17px; height: 17px; }

.ui-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.ui-btn.primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--accent-hover); border-color: var(--accent-hover); }
.ui-btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.ui-btn.ghost:hover:not(:disabled) { background: var(--accent-soft); }
.ui-btn.subtle { background: var(--sunken); border-color: transparent; }
.ui-btn.subtle:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.ui-btn.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.ui-btn.danger:hover:not(:disabled) { background: var(--danger-hover); border-color: var(--danger-hover); }
.ui-btn.danger-outline { color: var(--danger); border-color: var(--danger-line); }
.ui-btn.danger-outline:hover:not(:disabled) { background: var(--danger-bg); }
.ui-btn.sm { min-height: 34px; padding: 6px 12px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.ui-btn.sm .ui-i { width: 15px; height: 15px; }
.ui-btn.lg { min-height: 48px; padding: 12px 22px; font-size: var(--text-md); border-radius: var(--radius); }
.ui-btn.block { display: flex; width: 100%; }

.ui-btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.ui-btn[aria-busy="true"]::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-color: var(--on-accent) var(--on-accent) transparent transparent;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}
.ui-btn:not(.primary):not(.danger)[aria-busy="true"]::after { border-color: var(--accent) var(--accent) transparent transparent; }

.ui-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}

.ui-icon-btn:hover:not(:disabled) { background: var(--sunken); color: var(--ink); text-decoration: none; }
.ui-icon-btn.bordered { border-color: var(--line-strong); background: var(--surface); }
.ui-icon-btn.sm { width: 32px; height: 32px; }
.ui-icon-btn.sm .ui-i { width: 16px; height: 16px; }
.ui-icon-btn:disabled, .ui-icon-btn[aria-disabled="true"] { opacity: 0.45; }

.ui-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.ui-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------------------
   Form controls */

.ui-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ui-field + .ui-field { margin-top: var(--space-4); }
.ui-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); font-size: var(--text-sm); font-weight: 650; color: var(--ink); }
.ui-label .ui-req { color: var(--danger); font-weight: 700; margin-left: 2px; }
.ui-label .ui-optional { color: var(--faint); font-weight: 500; font-size: var(--text-xs); }
.ui-hint { color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }
.ui-legend { margin-bottom: var(--space-2); }
.ui-error-text { color: var(--danger); font-size: var(--text-xs); font-weight: 600; }

.ui-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.4;
  transition: border-color var(--fast), box-shadow var(--fast), background-color var(--fast);
}

.ui-input:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); }
.ui-input:focus, .ui-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.ui-input:disabled { background: var(--sunken); color: var(--muted); cursor: not-allowed; }
.ui-input[aria-invalid="true"] { border-color: var(--danger); }
.ui-input.sm { min-height: 36px; padding: 6px 10px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
textarea.ui-input { min-height: 120px; resize: vertical; line-height: 1.55; }

select.ui-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7f9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.ui-input-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.ui-input-wrap > .ui-i { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.ui-input-wrap > .ui-i + .ui-input { padding-left: 42px; }
.ui-input-wrap > .ui-input:not(:last-child) { padding-right: 50px; }
.ui-input-wrap > .ui-icon-btn { position: absolute; right: 4px; }

.ui-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.45;
  cursor: pointer;
}

.ui-check input { flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.ui-check small { display: block; color: var(--muted); font-size: var(--text-xs); }

.ui-switch { display: inline-flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }

.ui-switch input {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color var(--fast);
}

.ui-switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--fast) var(--ease);
}

.ui-switch input:checked { background: var(--accent); }
.ui-switch input:checked::after { transform: translateX(18px); }

.ui-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--sunken);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.ui-seg::-webkit-scrollbar { display: none; }

.ui-seg > button, .ui-seg > a, .ui-seg label span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.ui-seg > button:hover, .ui-seg > a:hover { color: var(--ink); text-decoration: none; }
.ui-seg > [aria-pressed="true"], .ui-seg > [aria-selected="true"], .ui-seg > [aria-current="page"], .ui-seg input:checked + span { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.ui-seg label { position: relative; display: inline-flex; }
.ui-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ui-seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.ui-seg .ui-seg-count { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-seg [aria-pressed="true"] .ui-seg-count { color: inherit; opacity: 0.85; }

.ui-search { position: relative; display: flex; align-items: center; min-width: 0; }
.ui-search > .ui-i { position: absolute; left: 12px; color: var(--faint); pointer-events: none; }
.ui-search > .ui-input { padding-left: 40px; min-height: 40px; font-size: var(--text-sm); }

/* ---------------------------------------------------------------------------
   Chips, badges, counts, avatars */

.ui-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); min-width: 0; }
.ui-chips:empty { display: none; }

.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.3;
  transition: border-color var(--fast), color var(--fast), background-color var(--fast);
}

button.ui-chip:hover, a.ui-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.ui-chip[aria-pressed="true"], .ui-chip.selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ui-chip.soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.ui-chip .ui-chip-remove { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.ui-chip .ui-chip-remove:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}

.ui-badge .ui-i { width: 13px; height: 13px; }
.ui-badge.accent, .ui-badge[data-tone="accent"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.ui-badge.success, .ui-badge[data-tone="success"] { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.ui-badge.warning, .ui-badge[data-tone="warning"] { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
.ui-badge.danger, .ui-badge[data-tone="danger"] { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.ui-badge.violet, .ui-badge[data-tone="violet"] { background: var(--violet-bg); border-color: var(--violet-line); color: var(--violet); }
.ui-badge.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.ui-count {
  display: inline-block;
  min-width: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--sunken);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ui-count:empty { display: none; }

.ui-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font: 750 var(--text-xs)/1 var(--font-head);
  letter-spacing: 0.3px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.ui-avatar.lg { width: 52px; height: 52px; border-radius: 16px; font-size: var(--text-lg); }
.ui-avatar.sm { width: 30px; height: 30px; }

.ui-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--text-xs);
  line-height: 1.6;
}

/* ---------------------------------------------------------------------------
   Cards, stats */

.ui-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ui-card.pad { padding: var(--space-6); }
.ui-card.raised { box-shadow: var(--shadow); }
.ui-card-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--line); }
.ui-card-head h2, .ui-card-head h3 { font-size: var(--text-lg); font-weight: 750; line-height: 1.3; margin-right: auto; }
.ui-card-body { padding: var(--space-5); }
.ui-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }
a.ui-card:hover, .ui-card.interactive:hover { border-color: var(--line-strong); box-shadow: var(--shadow); text-decoration: none; }

.ui-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); }

.ui-stat {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.ui-stat-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.ui-stat-icon[data-tone="success"] { background: var(--success-bg); color: var(--success); }
.ui-stat-icon[data-tone="violet"] { background: var(--violet-bg); color: var(--violet); }
.ui-stat-icon[data-tone="warning"] { background: var(--warning-bg); color: var(--warning); }
.ui-stat-value { display: block; font: 800 var(--text-2xl)/1.1 var(--font-head); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.ui-stat-label { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-xs); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Tables */

.ui-table-wrap { width: 100%; overflow-x: auto; }

.ui-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }

.ui-table th {
  position: sticky;
  top: 0;
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.ui-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.ui-table tbody tr { transition: background-color var(--fast); }
.ui-table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ui-table .actions { text-align: right; white-space: nowrap; }
.ui-table.compact td { padding: var(--space-2) var(--space-3); }

/* A .stack table turns into one card per row on phones (.stack-lg: below 1024px); td[data-label] names its column. */
@media (max-width: 760px) {
  .ui-table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ui-table.stack, .ui-table.stack tbody, .ui-table.stack tr, .ui-table.stack td { display: block; width: 100%; }
  .ui-table.stack tr { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .ui-table.stack tbody tr:last-child { border-bottom: 0; }
  .ui-table.stack td { display: flex; gap: var(--space-3); padding: 3px 0; border: 0; }
  .ui-table.stack td[data-label]::before { content: attr(data-label); flex: 0 0 104px; color: var(--muted); font-size: var(--text-xs); font-weight: 600; padding-top: 1px; }
  .ui-table.stack td.actions { justify-content: flex-start; padding-top: var(--space-2); }
}

@media (max-width: 1024px) {
  .ui-table.stack-lg thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ui-table.stack-lg, .ui-table.stack-lg tbody, .ui-table.stack-lg tr, .ui-table.stack-lg td { display: block; width: 100%; }
  .ui-table.stack-lg tr { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); }
  .ui-table.stack-lg tbody tr:last-child { border-bottom: 0; }
  .ui-table.stack-lg td { display: flex; gap: var(--space-3); padding: 3px 0; border: 0; }
  .ui-table.stack-lg td[data-label]::before { content: attr(data-label); flex: 0 0 104px; color: var(--muted); font-size: var(--text-xs); font-weight: 600; padding-top: 1px; }
  .ui-table.stack-lg td.actions { justify-content: flex-start; padding-top: var(--space-2); }
}

/* ---------------------------------------------------------------------------
   Tabs */

.ui-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ui-tabs::-webkit-scrollbar { display: none; }

.ui-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
  white-space: nowrap;
}

.ui-tab:hover { color: var(--ink); }
.ui-tab[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.ui-tabpanel:focus-visible { outline-offset: -3px; }

/* ---------------------------------------------------------------------------
   Dialogs and drawers (.ui-modal is the full-screen layer, shown by removing [hidden]) */

.ui-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: var(--backdrop);
  animation: ui-fade var(--normal) var(--ease);
}

.ui-dialog {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: ui-pop var(--normal) var(--ease);
}

.ui-dialog.sm { width: min(440px, 100%); }
.ui-dialog.lg { width: min(820px, 100%); }
.ui-dialog:focus { outline: none; }

.ui-dialog-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-4) var(--space-6); border-bottom: 1px solid var(--line); }
.ui-dialog-head h2 { flex: 1; min-width: 0; font-size: var(--text-xl); font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.ui-dialog-head p { margin-top: var(--space-1); color: var(--muted); }
/* The body scrolls inside the dialog's height (a flex item would otherwise grow past it). */
.ui-dialog-body { flex: 1 1 auto; min-height: 0; padding: var(--space-5) var(--space-6); overflow-y: auto; min-width: 0; }
.ui-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); }

.ui-modal.drawer { place-items: stretch end; padding: 0; }

.ui-drawer {
  display: flex;
  flex-direction: column;
  width: min(760px, 100vw);
  height: 100%;
  min-width: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: ui-slide var(--normal) var(--ease);
}

.ui-drawer:focus { outline: none; }

@media (max-width: 640px) {
  .ui-modal:not(.drawer) { place-items: end stretch; padding: 0; }
  .ui-modal:not(.drawer) .ui-dialog { width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation-name: ui-sheet; }
  .ui-dialog-head { padding: var(--space-4) var(--space-4) var(--space-3) var(--space-5); }
  .ui-dialog-body { padding: var(--space-4) var(--space-5); }
  .ui-dialog-foot { padding: var(--space-3) var(--space-5); }
  .ui-dialog-foot .ui-btn { flex: 1; }
}

.ui-option-list { display: grid; gap: var(--space-2); }

.ui-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--fast), background-color var(--fast);
}

.ui-option:hover { border-color: var(--line-strong); }
.ui-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ui-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.ui-option:has(input:disabled) { opacity: 0.6; cursor: not-allowed; }
.ui-option input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.ui-option-text { display: grid; gap: 2px; min-width: 0; }
.ui-option-text strong { font-weight: 650; overflow-wrap: anywhere; }
.ui-option-text small { color: var(--muted); font-size: var(--text-xs); }

/* ---------------------------------------------------------------------------
   Alerts, toasts */

.ui-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: var(--text-sm);
}

.ui-alert > .ui-i { margin-top: 1px; color: var(--accent); }
.ui-alert-body { flex: 1; min-width: 0; display: grid; gap: var(--space-1); }
.ui-alert.success { border-color: var(--success-line); background: var(--success-bg); }
.ui-alert.success > .ui-i { color: var(--success); }
.ui-alert.warning { border-color: var(--warning-line); background: var(--warning-bg); }
.ui-alert.warning > .ui-i { color: var(--warning); }
.ui-alert.danger { border-color: var(--danger-line); background: var(--danger-bg); }
.ui-alert.danger > .ui-i { color: var(--danger); }
.ui-alert:empty { display: none; }

.ui-toasts {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-2);
  width: min(480px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.ui-toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius);
  background: #142644;
  color: #f2f6ff;
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  pointer-events: auto;
  animation: ui-rise var(--normal) var(--ease);
}

.ui-toast > .ui-i { color: #9cc3ff; }
.ui-toast.success > .ui-i { color: #8fdcb1; }
.ui-toast.error { background: #7d1f27; }
.ui-toast.error > .ui-i, .ui-toast.warning > .ui-i { color: #ffd1d5; }
.ui-toast.warning { background: #5c4410; }
.ui-toast-text { flex: 1; min-width: 0; padding: 6px 0; overflow-wrap: anywhere; }
.ui-toast a, .ui-toast .ui-toast-action { padding: 6px 8px; border: 0; border-radius: var(--radius-xs); background: transparent; color: #bcd4ff; font-weight: 700; white-space: nowrap; }
.ui-toast a:hover, .ui-toast .ui-toast-action:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.ui-toast .ui-icon-btn { color: #c9d7ee; }
.ui-toast .ui-icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.ui-toast :focus-visible { outline-color: #9cc3ff; }

/* ---------------------------------------------------------------------------
   Loading, empty states, pagination */

.ui-skel {
  display: block;
  height: 14px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--sunken) 0%, color-mix(in srgb, var(--line) 70%, var(--sunken)) 50%, var(--sunken) 100%);
  background-size: 200% 100%;
  animation: ui-shimmer 1.3s ease-in-out infinite;
}

.ui-skel + .ui-skel { margin-top: var(--space-2); }
.ui-skel.title { height: 18px; width: 45%; }
.ui-skel.w80 { width: 80%; }
.ui-skel.w60 { width: 60%; }
.ui-skel.w40 { width: 40%; }
.ui-skel.block { height: 88px; border-radius: var(--radius); }
.ui-skel.circle { width: 36px; height: 36px; border-radius: 50%; }

.ui-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ui-spin 0.8s linear infinite;
  vertical-align: middle;
}

.ui-progress { position: relative; height: 3px; overflow: hidden; border-radius: 3px; background: var(--accent-soft); }
.ui-progress::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--accent); animation: ui-indeterminate 1.1s ease-in-out infinite; }

.ui-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-6);
  text-align: center;
}

.ui-empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); }
.ui-empty h3 { font-size: var(--text-lg); font-weight: 750; }
.ui-empty p { max-width: 46ch; color: var(--muted); }
.ui-empty .ui-cluster { justify-content: center; margin-top: var(--space-1); }

.ui-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }
.ui-pager-status { color: var(--muted); font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------
   Formatted text (job descriptions) */

.ui-prose { color: var(--ink); font-size: var(--text-sm); line-height: 1.65; overflow-wrap: anywhere; }
.ui-prose > * + * { margin-top: var(--space-3); }
.ui-prose h1, .ui-prose h2, .ui-prose h3 { font-size: var(--text-md); font-weight: 750; line-height: 1.35; }
.ui-prose ul, .ui-prose ol { padding-left: 22px; }
.ui-prose li + li { margin-top: 4px; }
.ui-prose blockquote { padding: var(--space-2) var(--space-3); border-left: 3px solid var(--accent-line); background: var(--surface-2); color: var(--muted); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.ui-prose .ui-placeholder { color: var(--faint); font-style: italic; }

/* ---------------------------------------------------------------------------
   Animations */

@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-fade { from { opacity: 0; } }
@keyframes ui-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes ui-drop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes ui-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes ui-slide { from { transform: translateX(32px); opacity: 0; } }
@keyframes ui-sheet { from { transform: translateY(40px); opacity: 0; } }
@keyframes ui-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes ui-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ===========================================================================
   Page: /login and /signup */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  min-height: calc(100vh - var(--bar-h));
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-12) clamp(32px, 6vw, 88px);
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(143, 182, 236, 0.22), transparent 60%),
    radial-gradient(700px 420px at 100% 100%, rgba(80, 130, 200, 0.24), transparent 60%),
    linear-gradient(160deg, #112b4b 0%, #0c2340 55%, #0a1d36 100%);
  color: #edf4ff;
}

.auth-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}

.auth-aside > * { position: relative; z-index: 1; max-width: 520px; }
.auth-kicker { display: inline-flex; align-items: center; gap: var(--space-2); color: #a9c7f0; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.auth-aside h2 { margin-top: var(--space-3); color: #fff; font-size: clamp(28px, 3vw, var(--text-4xl)); font-weight: 800; line-height: 1.12; letter-spacing: -0.8px; }
.auth-aside h2 em { font-style: normal; color: #9cc3ff; }
.auth-lede { margin-top: var(--space-4); color: #c3d4ec; font-size: var(--text-md); line-height: 1.6; }

.auth-points { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.auth-points li { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); align-items: start; }
.auth-points .auth-point-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(156, 195, 255, 0.14); border: 1px solid rgba(156, 195, 255, 0.24); color: #b9d4ff; }
.auth-points strong { display: block; color: #fff; font-size: var(--text-md); font-weight: 700; }
.auth-points span { display: block; margin-top: 2px; color: #bccde6; font-size: var(--text-sm); line-height: 1.5; }

.auth-trust { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border: 1px solid rgba(156, 195, 255, 0.2); border-radius: var(--radius); background: rgba(8, 20, 38, 0.35); color: #c3d4ec; font-size: var(--text-xs); line-height: 1.55; }
.auth-trust .ui-i { color: #8fdcb1; }

.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-10) var(--gutter); }
.auth-card { width: min(460px, 100%); }
.auth-back { display: inline-flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); color: var(--muted); font-weight: 600; font-size: var(--text-sm); }
.auth-back:hover { color: var(--accent); }
.auth-title { font-size: var(--text-3xl); font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; }
.auth-subtitle { margin-top: var(--space-2); color: var(--muted); font-size: var(--text-md); }
.auth-form { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.auth-form .ui-field + .ui-field { margin-top: 0; }
.auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.auth-switch { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.auth-switch a { font-weight: 700; }
.auth-guest { margin-top: var(--space-5); color: var(--muted); font-size: var(--text-sm); text-align: center; }
.auth-guest a { font-weight: 700; }
.auth-foot { margin-top: var(--space-6); color: var(--faint); font-size: var(--text-xs); text-align: center; }

.auth-success { display: grid; gap: var(--space-4); margin-top: var(--space-6); padding: var(--space-6); border: 1px solid var(--success-line); border-radius: var(--radius-lg); background: var(--success-bg); }
.auth-success-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface); color: var(--success); }
.auth-success h2 { font-size: var(--text-xl); font-weight: 800; }
.auth-success h2:focus { outline: none; }
.auth-success p { color: var(--ink); overflow-wrap: anywhere; }
.auth-success ul { display: grid; gap: var(--space-2); margin: 0; padding-left: 20px; color: var(--muted); }

.auth-mobile-points { display: none; }

/* Quick signup (hirer-common.js QuickSignup): the /signup form and the search page's signup sheet. */
.ui-alert.stack { flex-direction: column; align-items: stretch; gap: var(--space-2); }
.qs-consent { color: var(--muted); font-size: var(--text-xs); line-height: 1.5; text-align: center; }
.qs-consent a { font-weight: 600; }
.qs-inbox { gap: var(--space-3); }
.qs-inbox h2, .qs-inbox h3 { font-size: var(--text-xl); font-weight: 800; }
.qs-inbox h2:focus, .qs-inbox h3:focus { outline: none; }
.qs-resend { display: grid; justify-items: start; gap: var(--space-1); }
.qs-resend .ui-btn { background: var(--surface); }
.qs-resend-status:empty { display: none; }
.qs-inbox-links, .qs-alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.ui-alert .qs-resend .ui-btn { min-height: 36px; }

/* "Continue with Google" (hirer-common.js createGoogleSignIn) above the email form on /login, /signup and the signup
   sheet: Google's standard light button (white, grey outline, dark label, the four-colour G) in both themes. */
.auth-google { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.auth-google + .auth-form, .auth-google-mount + .auth-form { margin-top: var(--space-4); }
.ui-btn.google-btn { gap: var(--space-3); border-color: #747775; background: #ffffff; color: #1f1f1f; box-shadow: none; }
.ui-btn.google-btn:hover:not(:disabled):not([aria-disabled="true"]) { background: #f6f8fa; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
.google-mark { display: inline-flex; flex: none; }
.google-mark svg { display: block; width: 20px; height: 20px; }
.ui-btn.google-btn[aria-busy="true"] .google-mark { visibility: hidden; }
.ui-btn.google-btn:not(.primary)[aria-busy="true"]::after { border-color: #1f1f1f #1f1f1f transparent transparent; }
.auth-or { display: flex; align-items: center; gap: var(--space-3); color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Pages a free account cannot use (/jobs, /jobs/new). */
.company-only { display: grid; justify-items: start; gap: var(--space-4); margin-top: var(--space-8); padding: var(--space-8); }
.company-only-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.company-only .app-title:focus { outline: none; }
.company-only p { max-width: 60ch; }
@media (max-width: 640px) { .company-only { padding: var(--space-6) var(--space-4); margin-top: var(--space-4); } }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { justify-content: flex-start; padding-top: var(--space-8); }
  .auth-mobile-points { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-6); }
}

@media (max-width: 640px) {
  .auth-title { font-size: var(--text-2xl); }
  .auth-main { padding: var(--space-6) var(--space-4) var(--space-10); }
}

/* ===========================================================================
   Page: /jobs (vacancies + applicants) */

#dashboardErrorBanner { margin-bottom: var(--space-5); }
.jobs-stats { margin-bottom: var(--space-6); }
.jobs-load-error .ui-empty-icon { background: var(--danger-bg); color: var(--danger); }

.jobs-layout { display: grid; grid-template-columns: clamp(280px, 24vw, 330px) minmax(0, 1fr); gap: var(--space-6); align-items: start; }

.jobs-rail { position: sticky; top: calc(var(--bar-h) + var(--space-4)); display: flex; flex-direction: column; max-height: calc(100vh - var(--bar-h) - var(--space-8)); overflow: hidden; }
.jobs-rail .ui-card-head { flex-shrink: 0; }
.jobs-vacancies { overflow-y: auto; overscroll-behavior: contain; padding: var(--space-2); }
.jobs-vacancies ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.jobs-vacancies li { position: relative; }

.jobs-vacancy {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.jobs-vacancy:hover { background: var(--surface-2); border-color: var(--line); }
.jobs-vacancy[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); }
/* The company is the title (as on MSC Portal's job cards); its first line clears the three tools on the right, and the
   role, place and pay below use the full width. */
.jobs-vacancy-title { display: flex; align-items: center; min-height: 32px; padding-right: 100px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.jobs-vacancy-meta { color: var(--muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.jobs-vacancy-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); margin-top: 4px; color: var(--faint); font-size: var(--text-xs); }
.jobs-vacancy-count { color: var(--ink); font-weight: 700; }
.jobs-vacancy-all .jobs-vacancy-title { justify-content: space-between; gap: var(--space-2); min-height: 0; padding-right: 0; }
/* "Shared with HR" (§12), Share with recruiter and Edit (§13), beside each vacancy, level with its company name. */
.jobs-vacancy-tools { position: absolute; top: var(--space-3); right: var(--space-2); display: flex; gap: 2px; }
.jobs-vacancies-none { padding: var(--space-3); }

/* "Shared with HR" (docs/hiring-search-v3.md §12): an outline star until the vacancy is marked, then a filled amber one,
   on the rail and on the chosen vacancy's banner. */
.ui-icon-btn.jobs-vacancy-star[aria-pressed="true"], .ui-icon-btn.jobs-vacancy-star[aria-pressed="true"]:hover:not(:disabled) { color: var(--star-line); }
.jobs-vacancy-star[aria-pressed="true"] .ui-i, .jobs-star-btn[aria-pressed="true"] .ui-i, .jobs-star-filter [data-star-filter="shared"] .ui-i { fill: var(--star-fill); }
.jobs-star-btn[aria-pressed="true"] { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning); }
.jobs-star-btn[aria-pressed="true"] .ui-i { color: var(--star-line); }
.jobs-vacancy-star[aria-busy="true"], .jobs-star-btn[aria-busy="true"] { cursor: progress; }
.jobs-vacancy-star[aria-disabled="true"], .jobs-star-btn[aria-disabled="true"] { opacity: 0.45; }
/* All · Shared with HR · Not shared yet, above the rail (wraps on a narrow rail). */
.jobs-star-filter { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; padding: var(--space-3) var(--space-3) 0; }
.jobs-star-filter[hidden] { display: none; }
.jobs-star-filter .ui-chip { min-height: 30px; padding: 3px 10px; }
.jobs-star-filter .ui-chip .ui-i { color: var(--star-line); }
.jobs-star-filter-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.jobs-star-filter [aria-pressed="true"] .jobs-star-filter-n { color: inherit; opacity: 0.85; }
.jobs-rail-foot { flex-shrink: 0; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
/* The rail's search (team request, 2026-10-06): under the heading, the width of the rail; our × replaces the
   browser's own. While it searches, a company with more than one vacancy found is named above them. */
.jobs-rail-head { flex-wrap: wrap; row-gap: var(--space-3); }
.jobs-rail-search { flex: 1 1 100%; }
.jobs-rail-search > .ui-input { width: 100%; padding-right: 42px; }
.jobs-rail-search > .ui-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.jobs-rail-search-clear { position: absolute; right: 4px; }
.jobs-vacancies-group { padding: var(--space-2) var(--space-2) 2px; }
.jobs-vacancies-group span { display: inline-flex; align-items: center; padding: 1px 10px; border: 1px solid var(--warning-line); border-radius: var(--radius-pill); background: var(--warning-bg); color: var(--warning); font-size: var(--text-xs); font-weight: 700; }
.jobs-vacancies-group:not(:nth-child(2)) { margin-top: var(--space-2); }
.jobs-vacancy-posted { color: var(--muted); font-weight: 600; }
.jobs-search-none .ui-cluster { margin-top: var(--space-3); }

.jobs-applicants { min-width: 0; overflow: hidden; }
.jobs-applicants:focus { outline: none; }
.jobs-applicants-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); padding: var(--space-5) var(--space-5) var(--space-3); }
.jobs-applicants-head h2 { font-size: var(--text-xl); font-weight: 750; line-height: 1.25; }
.jobs-applicants-head .ui-search { flex: 0 1 320px; }
.jobs-scope { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 var(--space-5) var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--accent-soft); font-size: var(--text-sm); }
.jobs-scope strong { overflow-wrap: anywhere; }
.jobs-scope-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-left: auto; }
.jobs-filters { padding: 0 var(--space-5) var(--space-4); border-bottom: 1px solid var(--line); }

/* Applicants (docs/hiring-search-v3.md §12): the Hire MSC Search cards (talent.css .t-row, talent-core.js
   candidateCard) with the application around them: vacancy and applied time on top, status in the actions column,
   the private note below the requirements. "Matched against" shows what the vacancy in scope asks for. */

.jobs-fit { display: grid; gap: var(--space-2); margin: 0 var(--space-5) var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: var(--text-sm); }
.jobs-fit-title { color: var(--muted); font-weight: 650; }
.jobs-fit-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.jobs-fit-nice { margin-left: var(--space-2); color: var(--muted); font-size: var(--text-xs); font-weight: 650; }
.jobs-fit-counts { color: var(--muted); }
.jobs-fit-count strong { font-weight: 750; }
.jobs-fit-count.strong strong { color: var(--success); }
.jobs-fit-count.good strong { color: var(--good, var(--accent)); }
.jobs-fit-count.close strong { color: var(--warning); }
.jobs-fit-count.none strong { color: var(--ink); }

.jobs-applicants .jobs-tools { padding: var(--space-3) var(--space-5) 0; }
.jobs-applicant-list { padding: var(--space-3) var(--space-5) var(--space-5); }
.jobs-applicant-list .ui-empty, .jobs-applicant-list .t-skel-list { margin: 0; }
.jobs-cards { margin: 0; padding: 0; list-style: none; }
.jobs-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.jobs-applied .t-svg { width: 14px; height: 14px; color: var(--faint); margin-right: 2px; }
.jobs-applied strong { color: var(--ink); font-weight: 650; }
.jobs-applicant.missing .t-name { color: var(--muted); }

.jobs-status { min-width: 0; }
.t-row-actions .jobs-status { width: 188px; }
.jobs-status select { width: 100%; min-height: 36px; padding: 6px 30px 6px 10px; background-position: right 9px center; font-size: var(--text-sm); font-weight: 600; }
.jobs-status select[data-tone="accent"] { border-color: var(--accent-line); background-color: var(--accent-soft); color: var(--accent); }
.jobs-status select[data-tone="success"] { border-color: var(--success-line); background-color: var(--success-bg); color: var(--success); }
.jobs-status select[data-tone="violet"] { border-color: var(--violet-line); background-color: var(--violet-bg); color: var(--violet); }
.jobs-status select[data-tone="warning"] { border-color: var(--warning-line); background-color: var(--warning-bg); color: var(--warning); }
.jobs-status select[data-tone="danger"] { border-color: var(--danger-line); background-color: var(--danger-bg); color: var(--danger); }
/* Saving: the select keeps focus but is marked busy (hirer-dashboard.js updateApplicationStatus). */
.jobs-status select[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
/* A share link that may not change statuses shows the status as a pill (docs/hiring-search-v3.md §13). */
.jobs-status-read { display: inline-flex; align-items: center; min-height: 32px; margin: 0; padding: 4px 12px; border: 1px solid var(--accent-line); border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--text-sm); font-weight: 650; }
.jobs-status-read[data-tone="success"] { border-color: var(--success-line); background: var(--success-bg); color: var(--success); }
.jobs-status-read[data-tone="violet"] { border-color: var(--violet-line); background: var(--violet-bg); color: var(--violet); }
.jobs-status-read[data-tone="warning"] { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning); }
.jobs-status-read[data-tone="danger"] { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger); }
.t-row-actions .jobs-status-read { width: auto; }

.jobs-note { display: grid; gap: 6px; min-width: 0; }
.jobs-note-text { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 6px 10px; border-left: 3px solid var(--warning-line); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.jobs-note-text .t-svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px; color: var(--warning); }
.jobs-note-text span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jobs-note-edit summary { width: max-content; max-width: 100%; color: var(--accent); font-size: 13px; font-weight: 650; cursor: pointer; }
.jobs-note-edit[open] summary { margin-bottom: 6px; }
.jobs-note-input { width: 100%; min-height: 76px; resize: vertical; }
.jobs-notes-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }

.jobs-drawer-application { display: grid; gap: var(--space-2); margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.jobs-drawer-application .jobs-status { max-width: 260px; }
.jobs-vacancy-fit { color: var(--success); font-weight: 650; }
/* The bulk bar (talent.css .t-bulk) sits at the bottom: toasts and the last card stay clear of it. */
body:has(#applicantBulkBar:not([hidden])) .ui-toasts { bottom: 96px; }
body:has(#applicantBulkBar:not([hidden])) .jobs-applicant-list { padding-bottom: 96px; }
.jobs-skel-list { padding: var(--space-2); }

@media (max-width: 1100px) {
  .jobs-layout { grid-template-columns: 1fr; }
  .jobs-rail { position: static; max-height: none; }
  .jobs-vacancies { max-height: 340px; }
}

@media (max-width: 760px) {
  .jobs-applicants-head { padding: var(--space-4) var(--space-4) var(--space-3); }
  .jobs-applicants-head .ui-search { flex: 1 1 100%; }
  .jobs-scope { margin: 0 var(--space-4) var(--space-3); }
  .jobs-filters { padding: 0 var(--space-4) var(--space-3); }
  .jobs-fit { margin: 0 var(--space-4) var(--space-3); padding: var(--space-3); }
  .jobs-applicants .jobs-tools { padding: var(--space-3) var(--space-4) 0; }
  .jobs-applicant-list { padding: var(--space-3) var(--space-4) var(--space-4); }
}

/* Phones: the card's actions wrap under it, the status first and full width. */
@media (max-width: 720px) {
  .jobs-applicant .t-row-actions { flex-wrap: wrap; gap: 8px; }
  .jobs-applicant .t-row-actions .jobs-status { order: -1; width: 100%; }
  body:has(#applicantBulkBar:not([hidden])) .ui-toasts { bottom: 168px; }
  body:has(#applicantBulkBar:not([hidden])) .jobs-applicant-list { padding-bottom: 168px; }
}

/* ===========================================================================
   Vacancy share links (docs/hiring-search-v3.md §13): the owner's dialog (/jobs, /jobs/new) and the /share page */

.share-dialog { width: min(620px, 100%); }
.share-dialog-body { display: grid; gap: var(--space-4); }
.share-dialog-content { display: grid; gap: var(--space-5); min-width: 0; }
.share-dialog-title { flex: 1; min-width: 0; }
.share-dialog-title p { overflow-wrap: anywhere; }
.share-explain { margin: 0; }
.share-status:empty { display: none; }
.share-loading { display: grid; gap: var(--space-2); }
.share-panel { display: grid; gap: var(--space-3); min-width: 0; padding: var(--space-4); border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--accent-soft); }
.share-panel h3 { font-size: var(--text-md); font-weight: 750; }
.share-url { display: flex; gap: var(--space-2); min-width: 0; }
.share-url .ui-input { flex: 1; min-width: 0; background: var(--surface); font-family: var(--font-mono); font-size: var(--text-xs); }
.share-send, .share-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.share-facts { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.6; overflow-wrap: anywhere; }
.share-none { margin: 0; color: var(--muted); }
.share-form { display: grid; gap: var(--space-4); min-width: 0; }
.share-form fieldset { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.share-form .ui-field + .ui-field { margin-top: 0; }
.share-expiry { width: max-content; }
.share-confirm strong { font-weight: 750; }
.post-share { display: grid; gap: var(--space-2); padding: 0 var(--space-6) var(--space-5); text-align: left; }

.share-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-4) var(--space-8); margin-bottom: var(--space-6); }
.share-head-main { display: grid; flex: 1 1 460px; gap: var(--space-2); min-width: 0; }
.share-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--muted); font-size: var(--text-xs); font-weight: 650; }
.share-title { overflow-wrap: anywhere; }
.share-title.loading { color: var(--faint); }
.share-meta { display: flex; flex-wrap: wrap; gap: 4px var(--space-5); color: var(--muted); font-size: var(--text-sm); }
.share-meta > span { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.share-meta .ui-i { flex-shrink: 0; color: var(--faint); }
.share-counts { color: var(--ink); font-size: var(--text-sm); font-weight: 650; }
.share-counts:empty { display: none; }
.share-head-side { display: grid; flex: 0 1 300px; justify-items: end; gap: var(--space-2); min-width: 0; text-align: right; }
.share-expiry .ui-i { width: 14px; height: 14px; }
.share-head-side .ui-hint { max-width: 300px; }
.share-ended { display: grid; justify-items: start; gap: var(--space-4); margin-top: var(--space-8); padding: var(--space-8); }
.share-ended h1:focus { outline: none; }
.share-ended-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--warning-bg); color: var(--warning); }

@media (max-width: 760px) {
  .share-head { gap: var(--space-4); margin-bottom: var(--space-4); }
  .share-head-side { flex-basis: 100%; justify-items: start; text-align: left; }
  .share-ended { padding: var(--space-5); margin-top: var(--space-4); }
}

@media (max-width: 640px) {
  .share-url { flex-direction: column; }
  .share-url .ui-btn, .share-send .ui-btn, .share-actions .ui-btn { flex: 1 1 auto; justify-content: center; }
  .post-share { padding: 0 var(--space-5) var(--space-4); }
}

/* ===========================================================================
   Page: /jobs/new (post or edit a job) */

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-6); align-items: start; }
.post-main { display: grid; gap: var(--space-5); min-width: 0; }
.post-section { padding: var(--space-6); }
.post-section-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.post-section-head h2 { font-size: var(--text-lg); font-weight: 750; }
.post-section-head p { color: var(--muted); font-size: var(--text-xs); }
.post-step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 800 var(--text-xs)/1 var(--font-head); flex-shrink: 0; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); align-items: start; }
.post-grid > .full { grid-column: 1 / -1; }
.post-grid .ui-field + .ui-field { margin-top: 0; }
/* Location with "Joining by" under it, in one cell of the grid (team request, 2026-10-06): Immediate / Custom (a short
   text), neither = not stated. */
.post-stack { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.post-stack .ui-field + .ui-field { margin-top: 0; }
.post-joining-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.post-joining-seg > button { min-height: 32px; padding: 4px 14px; font-size: var(--text-sm); }
.post-joining-custom { min-width: 0; }
.post-joining .ui-hint { margin: 0; }
.post-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.post-suggest .ui-chip { min-height: 28px; padding: 2px 10px; font-weight: 500; }
/* An old domain name on an edited vacancy or a draft (§12 "Domains"): why, then the closest current domains to pick. */
.post-domain-hint { margin: 0; padding: 8px 10px; border: 1px solid var(--warning-line); border-radius: var(--radius-sm); background: var(--warning-bg); color: var(--ink); }
.post-domain-hint .post-domain-choices { margin-top: 6px; }

.post-portals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }

.post-portal {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--fast), background-color var(--fast), box-shadow var(--fast);
}

.post-portal:hover { border-color: var(--accent-line); }
.post-portal input { position: absolute; top: var(--space-3); right: var(--space-3); width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.post-portal:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.post-portal:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.post-portal:has(input:disabled:not(:checked)) { opacity: 0.5; cursor: not-allowed; }
.post-portal-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 4px; border-radius: 10px; background: var(--sunken); color: var(--accent); }
.post-portal strong { padding-right: 20px; font-family: var(--font-head); font-size: var(--text-md); line-height: 1.3; }
.post-portal small { color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }

.post-editor { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.post-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.post-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.post-toolbar .ui-icon-btn { width: 34px; height: 34px; }
.post-editor textarea.ui-input { min-height: 280px; border: 0; border-radius: 0; box-shadow: none; }
.post-editor textarea.ui-input:focus { box-shadow: none; }
.post-template { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.post-template select { flex: 1 1 220px; width: auto; }

.post-preview { position: sticky; top: calc(var(--bar-h) + var(--space-4)); display: grid; gap: var(--space-3); }
.post-preview-label { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.post-preview-card { overflow: hidden; }
.post-preview-top { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-5) var(--space-5) var(--space-4); }
.post-logo { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: #fff; font: 800 var(--text-lg)/1 var(--font-head); flex-shrink: 0; }
.post-preview-titles { flex: 1; min-width: 0; display: grid; gap: 2px; }
.post-preview-titles h3 { font-size: var(--text-md); font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.post-preview-titles p { color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.post-preview-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--space-5) var(--space-4); }
.post-preview-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--space-5) var(--space-4); }
.post-preview-desc { max-height: 360px; overflow-y: auto; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }
.post-preview-foot { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); background: var(--surface-2); }
.post-preview-note { display: flex; gap: var(--space-2); color: var(--muted); font-size: var(--text-xs); }

.post-actionbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0 calc(var(--space-2) * -1);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 -8px 24px rgba(19, 42, 76, 0.08);
}

.post-actionbar .post-draft { flex: 1 1 200px; color: var(--muted); font-size: var(--text-xs); }
.post-review dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-5); margin-bottom: var(--space-4); }
.post-review dt { color: var(--muted); font-size: var(--text-xs); font-weight: 600; padding-top: 2px; }
.post-review dd { overflow-wrap: anywhere; }
.post-review .ui-prose { max-height: 38vh; overflow-y: auto; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.post-success { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-8) var(--space-6) var(--space-6); text-align: center; }
.post-success .ui-empty-icon { background: var(--success-bg); color: var(--success); }

@media (max-width: 1180px) {
  .post-portals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-preview { position: static; }
}

@media (max-width: 640px) {
  .post-section { padding: var(--space-4); }
  .post-grid { grid-template-columns: 1fr; }
  .post-portals { grid-template-columns: 1fr; gap: var(--space-2); }
  .post-portal { grid-template-columns: 36px 1fr; column-gap: var(--space-3); padding: var(--space-3); }
  .post-portal-icon { grid-row: span 2; margin: 0; }
  .post-actionbar { margin: 0 calc(var(--space-4) * -1); border-radius: 0; border-left: 0; border-right: 0; }
  .post-actionbar .ui-btn.primary { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------------------
   Responsive frame, motion, print */

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .app-main { padding-top: var(--space-6); }
  .app-title { font-size: var(--text-2xl); }
}

/* ===========================================================================
   One-click share (docs/hiring-search-v3.md §13, owner feedback 2026-10-05): the recruiter message as it will read, the
   link highlighted; Copy again, WhatsApp and Email; Turn off link and Copy link only kept small. */

.share-message { display: grid; gap: var(--space-2); max-height: 260px; overflow-y: auto; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: var(--text-sm); line-height: 1.55; overflow-wrap: anywhere; }
.share-message p { margin: 0; }
.share-message-link mark { padding: 1px 4px; border-radius: 4px; background: var(--mark-bg); color: var(--mark-ink); font-family: var(--font-mono); font-size: var(--text-xs); }
.share-message-text { width: 100%; min-height: 180px; font-size: var(--text-xs); line-height: 1.5; }
.share-manual-hint[hidden], .share-message-text[hidden], .share-message[hidden] { display: none; }
.share-tertiary { display: flex; justify-content: flex-start; }
.share-dialog-foot { justify-content: space-between; }
.share-foot-secondary { display: flex; gap: var(--space-2); margin-right: auto; }
.share-foot-secondary .ui-btn[hidden] { display: none; }
/* Send straight to HR (§14). */
.share-hr { display: grid; gap: var(--space-2); min-width: 0; padding: var(--space-4); border: 1px solid var(--warning-line); border-radius: var(--radius); background: var(--warning-bg); }
.share-hr h3 { font-size: var(--text-md); font-weight: 750; }
.share-hr.none { border-style: dashed; background: var(--surface-2); }
.share-hr .ui-hint { margin: 0; }
/* /share's head: the company is the heading, the role domain the line under it. */
.share-role { margin: 0; color: var(--ink); font-size: var(--text-lg); font-weight: 650; overflow-wrap: anywhere; }

/* ===========================================================================
   Vacancy filters (vacancy-filters.js, §12): "Edit filters" on Matched against, and the editor. */

.jobs-fit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.jobs-fit-edit { flex-shrink: 0; }
.jobs-fit-edited { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: var(--text-xs); }
.jobs-fit-edited .t-svg { width: 14px; height: 14px; }
/* The city switch beside the chips (owner, 2026-10-16): "City: Current city · Preferred city · Either", saved at once. */
.jobs-fit-city { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); min-width: 0; }
.jobs-fit-city-label { color: var(--muted); font-size: var(--text-xs); font-weight: 650; }
.jobs-fit-cityseg.ui-seg > label span, .vf-cityseg.ui-seg > label span { min-height: 30px; padding: 3px 10px; font-size: var(--text-xs); }
.jobs-fit-cityseg input:disabled + span { cursor: progress; opacity: 0.6; }
.jobs-fit-cityseg[aria-busy="true"] input:checked + span { cursor: progress; }
/* "Hide not a match": the toggle beside Sort, and the line under the list that says how many it hides. */
.jobs-hidden-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: var(--text-sm); }
.jobs-hidden-note p, .jobs-none-hidden p { margin: 0; }
.jobs-none-hidden .ui-btn { margin-top: var(--space-2); }

.vf-dialog { width: min(860px, 100%); }
.vf-title { flex: 1; min-width: 0; }
.vf-title p { overflow-wrap: anywhere; }
.vf-body { display: grid; gap: var(--space-5); align-content: start; }
.vf-prompt { display: grid; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--accent-soft); }
.vf-prompt-input { width: 100%; min-height: 64px; resize: vertical; background: var(--surface); }
.vf-prompt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.vf-prompt-row .ui-hint { flex: 1 1 260px; margin: 0; }
.vf-current { display: grid; gap: var(--space-3); }
.vf-edited { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--text-xs); font-weight: 650; color: var(--ink); }
.vf-edited.muted { color: var(--muted); font-weight: 500; }
.vf-edited .t-svg { width: 14px; height: 14px; }
.vf-side-block { display: grid; gap: 6px; }
.vf-side-block h3 { font-size: var(--text-sm); font-weight: 750; color: var(--muted); }
.vf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vf-all-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.vf-all-head .ui-hint { flex: 1 1 240px; margin: 0; }
.vf-all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.vf-all[hidden] { display: none; }
.vf-group { display: grid; gap: var(--space-2); align-content: start; min-width: 0; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.vf-group.set { border-color: var(--accent-line); }
.vf-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.vf-group-head h4 { font-size: var(--text-sm); font-weight: 750; }
.vf-side.ui-seg > label span { min-height: 28px; padding: 3px 10px; font-size: var(--text-xs); }
.vf-mustonly { font-size: var(--text-xs); }
.vf-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px var(--space-2); max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.vf-option { min-height: 32px; padding: 4px 2px; font-size: var(--text-sm); font-weight: 500; }
.vf-searchable { display: grid; gap: var(--space-2); }
.vf-find { max-width: 280px; }
.vf-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.vf-number { width: 120px; }
.vf-date { width: 180px; }
/* How the city is matched (owner, 2026-10-16): Current city / Preferred city / Either, in the Location group with a line
   saying what it means, and as one compact row under a side's chips. */
.vf-citymode { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.vf-citymode-label { margin: 0; color: var(--muted); font-weight: 650; }
.vf-citynote { margin: 0; }
.vf-cityquick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); min-width: 0; }
.vf-cityquick-label { color: var(--muted); font-size: var(--text-xs); font-weight: 650; overflow-wrap: anywhere; }
/* The joining window: a whole month in one click, else From / To (either alone). */
.vf-range { display: grid; gap: var(--space-2); min-width: 0; }
.vf-range-sub { margin: 0; color: var(--muted); font-weight: 650; }
.vf-range .ui-hint { margin: 0; }
.vf-range-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3); }
.vf-range-end { display: grid; gap: 4px; flex: 1 1 150px; max-width: 200px; min-width: 0; }
.vf-range-end .vf-date { width: 100%; min-width: 0; }
.vf-foot { align-items: center; }
.vf-foot-start { margin-right: auto; }
.vf-foot .vf-reset[hidden] { display: none; }
.vf-status { flex: 1 1 200px; margin: 0; text-align: right; }
.vf-status:empty { display: none; }
.vf-discard strong { font-weight: 750; }
/* Class X / XII minimums: the number and its quick presets. */
.vf-number-block { display: grid; gap: var(--space-2); }
.vf-presets { gap: 6px; }
.vf-presets button { min-height: 32px; padding: 2px 12px; font-size: var(--text-xs); }
/* The CA Final attempt window: From / By, each a month and a year. */
.vf-months { display: grid; gap: var(--space-2); }
.vf-months .ui-hint { margin: 0; }
.vf-month-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--space-2); max-width: 420px; }
.vf-month, .vf-year { width: 100%; min-width: 0; }
@media (max-width: 480px) {
  /* A phone: the label on its own line, the month and year side by side under it. */
  .vf-month-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px var(--space-2); }
  .vf-month-label { grid-column: 1 / -1; }
}
/* Whose filters these are (one share link's own, or on /share the holder's link only). */
.vf-scope { margin: 0; }
.vf-edited.vf-scope { align-items: flex-start; font-weight: 600; line-height: 1.45; }
.vf-edited.vf-scope.muted { font-weight: 500; }
.vf-edited.vf-scope .t-svg { flex-shrink: 0; margin-top: 2px; }

/* The share dialog's links: one per HR person, each with its own filters (docs/hiring-search-v3.md §13). */
.share-links { display: grid; gap: var(--space-3); min-width: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.share-links-head { display: grid; gap: 4px; }
.share-links-head h3 { font-size: var(--text-md); font-weight: 750; }
.share-links-head .ui-hint, .share-links-loading { margin: 0; }
.share-link-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.share-link-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); align-items: start; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.share-link-item.own { border-color: var(--accent-line); }
.share-link-main { display: grid; gap: 2px; min-width: 0; }
.share-link-main p { margin: 0; overflow-wrap: anywhere; }
.share-link-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--text-sm); }
.share-link-name strong { font-weight: 750; }
.share-link-badge { font-size: 11px; }
.share-link-facts { color: var(--muted); font-size: var(--text-xs); }
.share-link-filters { color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.share-link-item.own .share-link-filters { color: var(--ink); font-weight: 600; }
.share-link-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.share-link-off { margin-left: auto; color: var(--danger); }
.share-link-new { display: flex; }
.share-link-form { display: grid; gap: var(--space-2); width: 100%; min-width: 0; padding: var(--space-3); border: 1px dashed var(--accent-line); border-radius: var(--radius); background: var(--accent-soft); }
.share-link-form .ui-hint { margin: 0; }
.share-link-label { max-width: 360px; background: var(--surface); }
/* "Email CVs to HR" in the share dialog: for HR whose company blocks links. */
.share-cvpack { display: grid; gap: var(--space-2); min-width: 0; }
.share-cvpack .ui-hint { margin: 0; }

/* ===========================================================================
   Email CVs to HR (vacancy-cv-pack.js): the candidates, one PDF, then the email in the team's own mail. /jobs only. */
.cvpack-dialog { width: min(720px, 100%); }
.cvpack-title { flex: 1; min-width: 0; }
.cvpack-title p { overflow-wrap: anywhere; }
.cvpack-body { display: grid; gap: var(--space-5); align-content: start; }
.cvpack-intro { margin: 0; }
.cvpack-step { display: grid; gap: var(--space-3); min-width: 0; }
.cvpack-step + .cvpack-step { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.cvpack-step h3 { font-size: var(--text-md); font-weight: 750; }
.cvpack-step .ui-hint { margin: 0; }
.cvpack-scope { display: flex; gap: var(--space-2); margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; overflow-wrap: anywhere; }
.cvpack-scope.warn { padding: var(--space-2) var(--space-3); border: 1px solid var(--warning-line); border-radius: var(--radius-sm); background: var(--warning-bg); color: var(--ink); }
.cvpack-scope .t-svg { width: 16px; height: 16px; margin-top: 2px; color: var(--warning); }
.cvpack-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.cvpack-tools-actions { display: flex; gap: 4px; }
.cvpack-count { margin: 0; font-size: var(--text-sm); font-weight: 650; }
.cvpack-list { display: grid; gap: 2px; max-height: min(46vh, 420px); margin: 0; padding: 4px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); list-style: none; }
.cvpack-item { min-width: 0; border-radius: var(--radius-sm); }
.cvpack-item:hover { background: var(--surface); }
.cvpack-check { padding: var(--space-2) var(--space-3); }
.cvpack-check:has(input:disabled) { cursor: not-allowed; opacity: 0.65; }
.cvpack-who { display: grid; gap: 2px; min-width: 0; }
.cvpack-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; }
.cvpack-name strong { font-weight: 700; }
.cvpack-who small { overflow-wrap: anywhere; }
.cvpack-fit, .cvpack-nocv { font-size: 11px; }
.cvpack-fit.strong { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.cvpack-fit.good { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.cvpack-fit.close { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
.cvpack-build { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cvpack-file { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.cvpack-file.done { border-color: var(--success-line); background: var(--success-bg); }
.cvpack-file > .t-svg { color: var(--muted); }
.cvpack-file.done > .t-svg { color: var(--success); }
.cvpack-file-name { display: grid; flex: 1; gap: 2px; min-width: 0; font-size: var(--text-sm); }
.cvpack-file-name strong { font-weight: 650; overflow-wrap: anywhere; }
.cvpack-file-name small { color: var(--muted); font-size: var(--text-xs); }
.cvpack-field { display: grid; gap: 6px; max-width: 420px; }
.cvpack-attach { align-items: flex-start; }
.cvpack-attach > .t-svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: var(--accent); }
.cvpack-attach.warning > .t-svg { color: var(--warning); }
.cvpack-attach strong { font-weight: 750; }
.cvpack-send { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cvpack-foot { align-items: center; justify-content: space-between; }
.cvpack-status { flex: 1 1 220px; margin: 0; }
.cvpack-status:empty { visibility: hidden; }

/* ===========================================================================
   HR contacts and follow-ups (vacancy-hr.js, docs/hiring-search-v3.md §14): team only, on /jobs and /jobs/new. */

.hr-form-body { display: grid; gap: var(--space-3); }
.hr-fields { display: grid; gap: var(--space-3); }
.hr-fields .ui-field + .ui-field { margin-top: 0; }
.hr-internal { align-items: center; }
.ui-field-error { margin: 0; color: var(--danger); font-size: var(--text-xs); font-weight: 600; }
.ui-field-error[hidden] { display: none; }
.post-hr-fields .hr-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.post-hr .post-section-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* The rail: an HR contact tool beside Share (a warning dot while it is missing) and "Follow up with HR" when due. */
.jobs-vacancies li.has-hr-tools .jobs-vacancy-title { padding-right: 134px; }
.jobs-vacancy-hr { position: relative; }
.jobs-hr-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--warning-line); box-shadow: 0 0 0 1px var(--warning); }
.jobs-vacancy[aria-pressed="true"] + .jobs-vacancy-tools .jobs-hr-dot { border-color: var(--accent-soft); }
/* "Follow up with HR" sits inside the vacancy's box, under its facts (the box makes room for it). */
.jobs-vacancies li.has-flags .jobs-vacancy { padding-bottom: 46px; }
.jobs-vacancy-flags { position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-3); display: flex; flex-wrap: wrap; gap: 6px; }
/* The last card scrolls clear of the AI Assist button. */
body:has(.va-fab:not([hidden])):not(:has(#applicantBulkBar:not([hidden]))) .jobs-applicant-list { padding-bottom: 88px; }
.ui-chip.jobs-followup { min-height: 28px; padding: 2px 10px; }
.ui-chip.jobs-followup.due { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning); }
.ui-chip.jobs-followup.done { border-color: var(--success-line); background: var(--success-bg); color: var(--success); }
/* "Reminder on 9 Oct": a snoozed follow-up, quiet until it is due again. */
.ui-chip.jobs-followup.remind { border-style: dashed; color: var(--muted); }
.ui-chip.jobs-followup .ui-i { width: 14px; height: 14px; }
.jobs-star-filter [data-star-filter="followup"].due:not([aria-pressed="true"]) { border-color: var(--warning-line); color: var(--warning); }
.jobs-star-filter [data-star-filter="followup"] .ui-i { color: var(--warning); }
.jobs-star-filter .ui-chip[hidden] { display: none; }
.jobs-hr-btn.missing { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning); }
.jobs-hr-btn[hidden] { display: none; }
.jobs-followup-slot { display: contents; }

.followup-body { display: grid; gap: var(--space-4); }
.followup-body > .ui-hint { margin: 0; }
.followup-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.followup-state.done { color: var(--success); font-weight: 650; }
.followup-state.done .ui-i { color: var(--success); }
.followup-remind { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }

/* The count on the app bar's Jobs item (follow-ups due). */
.app-menu-toggle.has-badge { position: relative; }
.app-menu-toggle.has-badge::after { content: ''; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--warning-line); box-shadow: 0 0 0 2px var(--navy); }
.app-nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 2px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--warning-line); color: #2d2200; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }

/* ===========================================================================
   AI Assist (vacancy-assist.js): a floating button and a side panel (a full-screen sheet on a phone). */

.va-fab { position: fixed; right: max(var(--space-5), env(safe-area-inset-right)); bottom: max(var(--space-5), env(safe-area-inset-bottom)); z-index: 79; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-5) 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow-lg); font-weight: 700; cursor: pointer; }
.va-fab:hover { background: var(--navy-2); }
.va-fab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.va-fab .t-svg { width: 20px; height: 20px; color: var(--star-fill); }
.va-fab[hidden], .va-panel[hidden] { display: none; }
body:has(#applicantBulkBar:not([hidden])) .va-fab { bottom: 96px; }
.va-panel { position: fixed; right: var(--space-5); bottom: calc(var(--space-5) + 60px); z-index: 80; display: flex; flex-direction: column; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100vh - var(--bar-h) - 110px)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.va-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) var(--space-3) var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.va-head-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: var(--star-fill); }
.va-head-icon .t-svg { width: 18px; height: 18px; }
.va-head-text { flex: 1; min-width: 0; }
.va-head h2 { font-size: var(--text-lg); font-weight: 750; }
.va-sub { margin: 2px 0 0; color: var(--muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.va-note { display: flex; align-items: center; gap: 6px; margin: 0; padding: var(--space-2) var(--space-4); background: var(--warning-bg); color: var(--warning); font-size: var(--text-xs); font-weight: 600; }
.va-note .t-svg { width: 14px; height: 14px; flex-shrink: 0; }
.va-log { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); overflow-y: auto; overscroll-behavior: contain; }
.va-log:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.va-empty { display: grid; gap: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.va-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.va-suggest .ui-chip { text-align: left; }
.va-msg { max-width: 92%; padding: var(--space-2) var(--space-3); border-radius: var(--radius); font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.va-msg p { margin: 0; }
.va-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.va-msg.bot { align-self: flex-start; display: grid; gap: var(--space-2); border: 1px solid var(--line); background: var(--surface-2); border-bottom-left-radius: 4px; }
.va-msg.bot.notice { border-color: var(--warning-line); background: var(--warning-bg); }
.va-msg.pending { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--muted); }
.va-msg.pending .t-spinner { width: 14px; height: 14px; }
.va-text { display: grid; gap: 6px; }
.va-text ul, .va-text ol { margin: 0; padding-left: 20px; list-style: disc; }
.va-text ol { list-style: decimal; }
.va-mentions { display: flex; flex-wrap: wrap; gap: 6px; }
.va-mention { min-height: 28px; padding: 2px 10px; }
.va-mention .t-svg { width: 14px; height: 14px; }
.va-apply { display: grid; gap: 6px; padding-top: var(--space-2); border-top: 1px solid var(--line); }
.va-apply p { margin: 0; color: var(--muted); }
.va-form { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4) var(--space-4); border-top: 1px solid var(--line); }
.va-input { width: 100%; min-height: 48px; max-height: 160px; resize: vertical; }
.va-form-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.va-remaining { margin: 0; }

@media (max-width: 640px) {
  .vf-modal.ui-modal { place-items: stretch; }
  .vf-modal .ui-dialog.vf-dialog { width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; animation-name: ui-fade; }
  .vf-all { grid-template-columns: minmax(0, 1fr); }
  .vf-status { text-align: left; flex-basis: 100%; order: -1; }
  .vf-foot-start { flex-basis: 100%; }
  /* Comfortable touch targets for the city switches. */
  .jobs-fit-cityseg.ui-seg > label span, .vf-cityseg.ui-seg > label span { min-height: 36px; }
  .post-hr-fields .hr-fields { grid-template-columns: minmax(0, 1fr); }
  .va-fab { right: 16px; bottom: 16px; padding: 0 var(--space-4); }
  body:has(#applicantBulkBar:not([hidden])) .va-fab { bottom: 168px; }
  .va-panel { inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
  .share-dialog-foot { justify-content: flex-end; }
  .share-link-actions .ui-btn { flex: 1 1 auto; justify-content: center; }
  .share-link-label { max-width: none; }
  .cvpack-list { max-height: none; overflow: visible; }
  .cvpack-send .ui-btn, .cvpack-build .ui-btn { flex: 1 1 auto; justify-content: center; }
  .cvpack-field { max-width: none; }
  .cvpack-foot .cvpack-status { flex-basis: 100%; }
  .cvpack-file { flex-wrap: wrap; }
  .cvpack-file .ui-btn { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .app-main { padding: var(--space-5) var(--gutter) var(--space-12); }
  .app-page-head { align-items: stretch; }
  .app-page-actions { width: 100%; }
  .app-page-actions > .ui-btn.primary { flex: 1; }
  .app-brand-tag { display: none; }
  .ui-input, select.ui-input, textarea.ui-input { font-size: 16px; }
  .ui-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .ui-stat { padding: var(--space-3); gap: var(--space-2); }
  .ui-stat-icon { width: 34px; height: 34px; }
  .ui-stat-value { font-size: var(--text-xl); }
  .ui-toasts { bottom: var(--space-4); }
}

@media (max-width: 380px) {
  .app-brand-name { font-size: 16px; }
  .app-brand img { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  [data-app-shell], .app-skip, .ui-toasts, .post-actionbar, .app-page-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .ui-card { box-shadow: none; border-color: #ccc; }
}
