/* ============================================================
   JobTracker — Apple-style design system
   Light-dominant: white/parchment canvases, alternating near-black
   tiles, one Action Blue accent, no decorative chrome.
   Accent + status hues come from public/css/apple-tokens.css
   (Apple HIG system colors); see docs/design-system.md.
   ============================================================ */

:root {
  /* Accent — Apple systemBlue (light #007AFF / dark #0A84FF). */
  --blue: var(--apple-blue);
  --blue-hover: #0077ed;
  --blue-focus: #0071e3;
  --blue-on-dark: #2997ff;

  /* Surfaces */
  --canvas: var(--apple-system-background);
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --tile-1: #272729;
  --tile-2: #2a2a2c;
  --tile-3: #252527;
  --black: #000000;

  /* Text */
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-faint: #86868b;
  --on-dark: #ffffff;
  --on-dark-muted: #cccccc;

  /* Hairlines */
  --hairline: var(--apple-gray-4);
  --hairline-soft: rgba(0, 0, 0, 0.08);

  /* Component surfaces & states */
  --btn-primary-bg: var(--apple-blue);
  --btn-primary-hover: #0077ed;
  --ghost-hover-bg: rgba(0, 122, 255, 0.06);
  --card: var(--apple-system-background);
  --card-high: var(--apple-system-background);
  --chip-bg: #f5f5f7;
  --pearl-ink: #333333;
  --pearl-hover-bg: #ffffff;
  --pearl-hover-border: #a1a1a6;
  --hover-bg: rgba(0, 0, 0, 0.05);
  --hover-border: rgba(0, 0, 0, 0.2);
  --hover-border-strong: rgba(0, 0, 0, 0.24);
  --ring-soft: rgba(0, 122, 255, 0.2);
  --drop-bg: rgba(0, 122, 255, 0.04);
  --danger: var(--apple-red);
  --danger-bg: rgba(255, 59, 48, 0.08);
  --danger-float-bg: #fff0ef;
  /* Match ring bands (Apple system colors) */
  --m-red: var(--apple-red);
  --m-orange: var(--apple-orange);
  --m-yellow: var(--apple-yellow);
  --m-green: var(--apple-green);
  --seg-bg: #e8e8ed;
  --seg-on: #ffffff;
  --spinner-track: rgba(0, 0, 0, 0.12);
  --toast-bg: #1d1d1f;
  --toast-ink: #ffffff;
  --subnav-bg: rgba(245, 245, 247, 0.8);

  /* CV upload component */
  --cv-bg: #ffffff;
  --cv-bg-hover: rgba(0, 0, 0, 0.04);
  --cv-border: rgba(0, 0, 0, 0.08);
  --cv-border-hover: rgba(0, 0, 0, 0.2);
  --cv-drag-bg: rgba(0, 0, 0, 0.02);
  --cv-drag-border: rgba(0, 0, 0, 0.25);
  --cv-text: #6e6e73;
  --cv-accent: var(--apple-blue);
  --cv-accent-bg: rgba(0, 122, 255, 0.08);
  --cv-accent-border: rgba(0, 122, 255, 0.2);


  /* Phone surfaces (mobile design). iOS system fills, frosted bars. */
  --mfield-bg: #f5f5f7;
  --sliders-knob: #f5f5f7;
  --tabbar-bg: rgba(255, 255, 255, 0.82);
  --tabbar-line: rgba(0, 0, 0, 0.12);
  --tab-idle: var(--apple-gray);
  --sheet-bg: #f5f5f7;
  --sheet-foot-bg: rgba(245, 245, 247, 0.9);
  --sheet-grip: rgba(0, 0, 0, 0.18);
  --sheet-close-bg: rgba(120, 120, 128, 0.16);
  --mcard-border: rgba(0, 0, 0, 0.09);
  --minset-border: rgba(0, 0, 0, 0.06);
  --minset-line: rgba(0, 0, 0, 0.08);
  --ring-track: #ececf0;
  --slider-track: #e2e2e7;
  --empty-art-ink: var(--apple-gray-3);
  --mbar-bg: rgba(245, 245, 247, 0.92);

  /* Elevation — the single system shadow, product imagery only */
  --product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 18px;
  --r-pill: 9999px;

  /* Button shape system (Apple HIG): capsules for standalone CTAs and
     horizontal pairs, 12px rects for form/panel/vertical-stack buttons,
     circles for icon-only controls. */
  --button-radius-capsule: 9999px;
  --button-radius-standard: 12px;
  --button-height-compact: 36px;
  --button-height-large: 48px;

  --content-max: 1440px;
  --content-text: 980px;
  --control-h: 36px; /* uniform height: search, selects, segmented control, bar buttons */
  --section-pad: 80px;

  color-scheme: light;
}

/* Reusable button geometry. Components below map onto these tokens instead
   of assigning radii one by one. */
.button-capsule { border-radius: var(--button-radius-capsule); }
.button-rounded { border-radius: var(--button-radius-standard); }
.button-icon { border-radius: 50%; }

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Reserve scrollbar space so content never shifts sideways when
     the page grows (e.g. the form filling in after Fetch details) */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.022em; /* ≈ -0.374px at 17px — the Apple tight read */
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sticky footer: main grows so the footer always sits at the end of the page.
   min-width: 0 drops the automatic minimum size — without it a single nowrap
   descendant (long URL, long title) widens the page instead of ellipsising. */
main { flex: 1 0 auto; min-width: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 600; color: var(--ink); }

h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 12px; }

h2 {
  font-size: 21px; line-height: 1.19; letter-spacing: 0.011em;
  margin: 0 0 8px;
}

h3 { font-size: 17px; line-height: 1.24; letter-spacing: -0.022em; margin: 0 0 6px; }

p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a[class]:hover { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--blue-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: rgba(0, 102, 204, 0.25); }

/* ---------- Icons (SF Symbols style, 24px grid, 1.5 stroke) ---------- */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Global nav: pure black, 48px, quiet ---------- */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.gnav-brand:hover { color: #fff; text-decoration: none; }
.gnav-brand .icon {
  width: 18px;
  height: 18px;
}
.gnav-name { font-weight: 700; letter-spacing: 0.01em; }

/* Centered primary nav, Apple Business style */
.gnav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}
.gnav-link {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 6px 12px;
  white-space: nowrap;
}
.gnav-link:hover { color: #fff; text-decoration: none; }
.gnav-link.on { color: #fff; font-weight: 600; }
.gnav-tagline {
  transform: translateY(1px);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.gnav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gnav-signin { padding: 6px 16px; font-size: 12px; letter-spacing: -0.01em; }

/* User chip in the nav */
.usermenu { position: relative; }
.usermenu .usermenu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: var(--r-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.usermenu .usermenu-btn:hover { background: rgba(255, 255, 255, 0.2); text-decoration: none; }
.usermenu .usermenu-btn:active { transform: scale(0.95); }
.usermenu-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Context menu — translucent glass, 12px radius, 1px group dividers */
.usermenu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 240px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  transform-origin: top right;
  animation: menu-in 0.18s ease-out;
}
@keyframes menu-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
/* Exit animation mirrors the entrance; usermenu.js hides the list when done */
.usermenu-list.closing { animation: menu-out 0.35s ease-in forwards; }
@keyframes menu-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.96); }
}
.usermenu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--hairline-soft);
}
.usermenu-head-name { font-weight: 600; font-size: 15px; }
.usermenu-head-email { font-size: 13px; color: var(--muted); word-break: break-all; }
.usermenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}
.usermenu-item:hover { background: var(--hover-bg); text-decoration: none; }
.usermenu-item .icon { font-size: 15px; opacity: 0.7; }

/* Destructive actions sit at the very bottom, in system red */
.usermenu-item-danger { color: var(--danger); }
.usermenu-item-danger .icon { opacity: 1; }
.usermenu-item-danger:hover { background: var(--danger-bg); }

/* ---------- Sub-nav: frosted, 52px, sticks under the global nav ---------- */
.subnav {
  position: sticky;
  top: 48px;
  z-index: 90;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: var(--subnav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-soft);
}
.subnav-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.011em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subnav-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

/* Bar actions: uniform 36px height; the header CTA is a compact capsule so it
   speaks the same geometry as the empty-state CTA that opens the same flow.
   Specificity (.btn.btn-*) beats the base .btn rule below so the label
   stays white; background tracks the primary button token. */
.btn.btn-primary-sm {
  background: var(--btn-primary-bg);
  color: #fff;
  height: var(--button-height-compact);
  padding: 7px 16px;
  font-size: 15px;
  border-radius: var(--button-radius-capsule);
}
.btn.btn-primary-sm:hover { background: var(--btn-primary-hover); color: #fff; }
.subnav .btn-utility {
  height: var(--control-h);
  padding: 7px 14px;
  border-radius: var(--button-radius-capsule);
}

/* ---------- Buttons ----------
   Capsule by default: standalone CTAs and horizontal pairs. Panel, form and
   vertical-stack buttons opt into the 12px rect; icon-only goes circular. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--button-radius-capsule);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
  line-height: 1.29;
  background: none;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.95); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* Signature blue pill */
.btn-primary {
  background: var(--btn-primary-bg);
  color: #fff;
  padding: 11px 22px;
  font-size: 17px;
  line-height: 1;
}
.btn-primary:hover { background: var(--btn-primary-hover); }
/* Empty-state primary CTAs pair with the header button: same capsule
   language, one step larger for hierarchy. */
.empty .btn-primary {
  min-height: var(--button-height-large);
  padding-inline: 24px;
}

/* Ghost pill — the second CTA beside a filled pill */
.btn-ghost {
  color: var(--blue);
  border-color: var(--blue);
  padding: 11px 22px;
  font-size: 17px;
  line-height: 1;
  background: transparent;
}
.btn-ghost:hover { background: var(--ghost-hover-bg); }
.tile-dark .btn-ghost {
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.7);
}
.tile-dark .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Quiet utility link-button */
.btn-utility {
  color: var(--blue);
  padding: 8px 14px;
  min-height: 36px;
  font-size: 14px;
}
.btn-utility:hover { text-decoration: underline; }

/* Pearl 12px rect — secondary actions that live inside forms and cards */
.btn-pearl {
  background: var(--pearl);
  color: var(--pearl-ink);
  border: 1px solid var(--hairline);
  border-radius: var(--button-radius-standard);
  padding: 8px 14px;
  font-size: 14px;
}
.btn-pearl:hover { border-color: var(--pearl-hover-border); background: var(--pearl-hover-bg); }

/* Muted utility — destructive-ish actions stay monochrome */
.btn-muted {
  color: var(--muted);
  padding: 6px 12px;
  font-size: 14px;
}
.btn-muted:hover { color: var(--ink); background: var(--hover-bg); }

/* Destructive: red text per HIG menus guidance; confirm() asked before acting */
.btn-danger {
  color: var(--danger);
  padding: 8px 14px;
  min-height: 36px;
  font-size: 14px;
}
.btn-danger:hover { background: var(--danger-bg); }
/* Filled destructive action — the explicit Delete in confirmation alerts */
.btn-danger-solid {
  background: var(--danger);
  color: #fff;
  padding: 8px 16px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 600;
}
.btn-danger-solid:hover { filter: brightness(1.08); }

/* Icon-only quiet button — circular; 44px hit target on touch, 36px on pointer */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 15px;
}
.btn-icon:hover { color: var(--ink); background: rgba(0, 0, 0, 0.06); }
.btn-icon:active { transform: scale(0.95); }

/* ---------- Layout ---------- */
.container {
  /* min(...) matters: <main> is a flex item of the body column, so without an
     upper bound it is sized to its max-content and one long unbreakable string
     (a job URL) widens the whole page instead of ellipsising inside its row. */
  max-width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: 0 22px;
}
.page { padding-top: 40px; padding-bottom: 96px; }
.page-narrow { max-width: min(var(--content-text), 100%); }
.page-narrow h2 { margin-top: 28px; }
.page-narrow code {
  background: var(--parchment);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 15px;
}

/* Full-bleed tile sections (landing) */
.tile { padding: var(--section-pad) 22px; }
.tile > .container { max-width: var(--content-text); }
.tile-light { background: var(--canvas); }
.tile-parchment { background: var(--parchment); }
.tile-dark { background: var(--tile-1); color: var(--on-dark); }
.tile-dark h1, .tile-dark h2, .tile-dark h3 { color: var(--on-dark); }
.tile-dark .muted { color: var(--on-dark-muted); }
.tile-dark a:not([class]) { color: var(--blue-on-dark); }

.tile-head {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 12px;
}
.tile-sub {
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.011em;
  color: var(--muted);
  text-align: center;
  margin: 0 0 32px;
}
.tile-dark .tile-sub { color: var(--on-dark-muted); }

/* ---------- Landing hero ---------- */
.hero { text-align: center; padding: 88px 0 72px; }
.hero-title {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.015em;
  margin: 0 auto;
  max-width: 18ch;
}
.hero-lead {
  font-size: 28px;
  line-height: 1.14;
  letter-spacing: 0.007em;
  color: var(--muted);
  max-width: 34ch;
  margin: 16px auto 0;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 22px;
}
.landing-preview {
  max-width: 1000px;
  margin: 48px auto 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background: var(--parchment);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}
.landing-preview-toolbar {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #171719;
  color: #fff;
  font-size: 11px;
}
.landing-preview-brand { font-weight: 700; letter-spacing: 0.06em; }
.landing-preview-title { color: rgba(255,255,255,.82); font-weight: 600; }
.landing-preview-action {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--apple-blue);
  font-weight: 600;
}
.landing-preview-stats {
  display: flex;
  gap: 8px;
  padding: 14px 16px 2px;
  color: var(--muted);
  font-size: 10px;
}
.landing-preview-stats span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 8px; background: var(--card); }
.landing-preview-stats b { color: var(--ink); font-size: 11px; }
.landing-preview-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 16px 16px;
}
.landing-preview-column {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--card);
}
.landing-preview-column h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.landing-preview-column h2 span {
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--hover-bg);
  color: var(--muted);
  font-size: 9px;
}
.landing-preview-column article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 7px;
  padding: 9px;
  border: 1px solid var(--hairline-soft);
  border-radius: 9px;
  background: var(--card-high);
}
.landing-preview-column article small { color: var(--muted); font-size: 9px; }
.landing-preview-column article b { color: var(--ink); font-size: 10px; line-height: 1.3; }
.landing-preview-column article > span { color: var(--muted); font-size: 9px; }
.landing-preview figcaption { padding: 0 16px 14px; color: var(--muted); font-size: 10px; text-align: center; }
.landing-reassurance {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 28px 22px;
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--pearl);
  text-align: center;
}
.landing-reassurance p { margin: 0; color: var(--muted); font-size: 14px; }
.landing-reassurance strong { color: var(--ink); }
.landing-reassurance a { font-size: 14px; font-weight: 600; }

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.feature {
  background: var(--card-high);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 32px;
  margin-bottom: 14px;
}
.feature h3 { font-size: 19px; line-height: 1.19; letter-spacing: 0.011em; margin: 0 0 8px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Pipeline strip (landing dark tile) ---------- */
.pipeline-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 32px;
}
.pipeline-chip {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-dark);
}

/* ---------- Toasts ---------- */
#toast-wrap {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  background: var(--toast-bg);
  color: var(--toast-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Pipeline summary and board filters ---------- */
.pipeline-summary { margin-bottom: 18px; }
.board-section-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.016em;
}
.stat:hover { text-decoration: none; border-color: var(--hover-border); }
.stat.active {
  border: 2px solid var(--blue-focus);
  padding: 6px 13px;
  background: var(--ghost-hover-bg);
  box-shadow: 0 0 0 2px var(--ring-soft);
}
.stat-count { font-weight: 600; font-size: 15px; }
.stat-label { color: var(--muted); }
.stat.active .stat-label { color: var(--ink); }

/* ---------- Filters ---------- */
.filters {
  display: grid;
  grid-template-columns: minmax(240px, 420px) max-content minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

.search-wrap { position: relative; width: 100%; min-width: 0; }
.search-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: var(--control-h);
  padding: 0 36px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
  background: var(--card-high);
  font-family: inherit;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  outline: none;
  border-color: var(--blue-focus);
  box-shadow: 0 0 0 4px var(--ring-soft);
}
.search-wrap .search-icon { left: 12px; font-size: 15px; }
.search-wrap .spinner {
  position: absolute;
  top: 50%;
  right: 10px;
  margin-top: -9px;
}

.select {
  height: var(--control-h);
  padding: 0 30px 0 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
  background-color: var(--card-high);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 13px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.016em;
  color: var(--ink);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.select:focus {
  outline: none;
  border-color: var(--blue-focus);
  box-shadow: 0 0 0 4px var(--ring-soft);
}

/* Segmented control (Table / Kanban) — enclosed track, filled active thumb */
.seg {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 2px;
  height: var(--control-h);
  background: var(--seg-bg);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
}
.seg a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.seg a:hover { color: var(--ink); text-decoration: none; }
.seg a.on {
  background: var(--seg-on);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.seg .icon { font-size: 13px; opacity: 0.8; }

.filters-right {
  grid-column: 4;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Spinner — indeterminate activity indicator; keep moving, unlabeled */
/* Spinner — indeterminate activity indicator; keep moving, unlabeled.
   Grace delay (HIG progress indicators: never flash for quick operations):
   the search spinner fades in over the SwiftUI-default 0.35s only if the
   request outlasts 0.4s, so fast filters swap with no flicker. */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator {
  display: inline-block;
  animation:
    spinner-in 0.35s ease-out 0.4s both,
    spin 0.6s linear infinite;
}
@keyframes spinner-in { from { opacity: 0; } to { opacity: 1; } }
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-btn {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-width: 2px;
  vertical-align: -2px;
}
/* Icon-only white spinner for the round blue mobile fetch button — the
   "Fetching…" label would overflow its 32px circle. */
.spinner-fetch-m {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Long-load progress pill: centered rotating blue circle for operations
   slower than 2s (see long-load.js and the boot splash partial).
   pointer-events:none so it never blocks input while shown. */
.long-load {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.long-load-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 14px 16px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  animation: spinner-in 0.3s ease-out both;
}
.long-load-ring {
  width: 28px;
  height: 28px;
  flex: none;
  border: 3px solid var(--spinner-track);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ---------- Table ---------- */
.table-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  overflow-x: auto;
  overflow-y: hidden;
}
.board-table {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  letter-spacing: -0.016em;
}
.board-table.is-resized {
  min-width: 0;
}
.board-table th {
  position: relative;
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline-soft);
}
.board-table th .th-sort {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  vertical-align: top;
}
.board-table th,
.board-table td {
  min-width: 0;
}
.board-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-table td:not(.row-actions) { max-width: 0; }
.board-table tr:last-child td { border-bottom: none; }
.board-table tbody tr { transition: background-color 0.15s ease; }
.board-table tbody tr:hover { background: var(--hover-bg); }
.clickable-row { cursor: pointer; }
.company-link { font-weight: 600; color: var(--ink); }
.company-link:hover { color: var(--blue); }
.open-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 14px;
}
.open-link .icon { font-size: 13px; }
.skills-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.skills-more { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--hover-bg); color: var(--ink); font-size: 11px; font-weight: 600; }
.board-table col[data-locked] { width: 52px; }
.board-table th.col-actions,
.board-table td.row-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  padding: 0;
  overflow: hidden;
  text-align: center;
  vertical-align: middle;
  background: var(--card);
  box-shadow: -1px 0 0 var(--hairline-soft);
}
.board-table th.col-actions { z-index: 4; }
.board-table tbody tr:hover td.row-actions { background: var(--hover-bg); }
/* The delete target fills the whole sticky cell; hovering or focusing it
   turns the icon red so the destructive action is unmistakable. */
.row-actions form {
  margin: 0;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.row-actions .btn-icon {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.row-actions .btn-icon:hover,
.row-actions .btn-icon:focus-visible,
.row-actions .btn-icon:active {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Header-only column divider. Hover/drag thickens it (Sheets/Excel). */
.col-resizer {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}
.col-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 4px;
  width: 1px;
  background: var(--hairline);
  transition:
    background-color 0.2s ease,
    width 0.2s ease,
    top 0.2s ease,
    bottom 0.2s ease;
}
.col-resizer:focus-visible { outline: none; }
.col-resizer:hover::after,
.col-resizer:focus-visible::after {
  top: 12%;
  bottom: 12%;
  width: 2px;
  background: var(--blue-focus);
}
.col-resizer.resizing::after { opacity: 0; }
.col-resize-line {
  position: absolute;
  z-index: 5;
  width: 2px;
  margin-left: -1px;
  background: var(--blue-focus);
  border-radius: 1px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: center;
  transition: opacity 0.15s ease, transform 0.15s ease, width 0.15s ease;
}
.col-resize-line.on {
  opacity: 1;
  width: 3px;
  margin-left: -1.5px;
  transform: scaleX(1);
}
body.table-resizing { cursor: col-resize; user-select: none; }

/* ---------- Badges (monochrome) ---------- */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: var(--chip-bg);
  white-space: nowrap;
}
.type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--muted);
  border: 1px solid var(--hairline-soft);
  background: transparent;
  white-space: nowrap;
}

/* ---------- Kanban ---------- */
.kanban {
  display: grid;
  grid-template-columns: repeat(8, minmax(220px, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 0 16px;
  align-items: flex-start;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
  overscroll-behavior-inline: contain;
}
.kcol {
  min-width: 0;
  background: var(--parchment);
  border-radius: var(--r-lg);
  scroll-snap-align: start;
}
.kcol[data-empty="true"] { border: 1px dashed var(--hairline); background: var(--pearl); }
.kcol[data-empty="true"] .kcol-head { flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 8px; text-align: center; }
.kcol[data-empty="true"] .kcol-title { max-width: 100%; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.kcol[data-empty="true"] .kcol-title small { display: none; }
.kcol[data-empty="true"] .kcol-count { padding: 1px 7px; }
.kcol[data-empty="true"] .kcol-body { min-height: 96px; padding: 0 8px 8px; }
.kcol[data-empty="true"] .kcol-body:empty::after { content: "Drop here"; display: block; padding: 20px 0; color: var(--muted); font-size: 10px; text-align: center; }
.kcol-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 16px 16px 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--ink);
}
.kcol-count {
  background: var(--hover-bg);
  border-radius: var(--r-pill);
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.kcol-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 12px;
  min-height: 48px;
  border-radius: var(--r-md);
}
.kcard {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 14px 16px;
  background: var(--card-high);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: grab;
  transition: border-color 0.15s ease;
}
.kcard:hover { border-color: var(--hover-border-strong); }
.kcard.dragging { opacity: 0.4; cursor: grabbing; }
.kcard-link { display: block; flex: 1; min-width: 0; color: inherit; cursor: grab; -webkit-user-drag: none; }
.kcard.dragging .kcard-link { cursor: grabbing; }
.kcard-link:hover { color: inherit; text-decoration: none; }
.kcard-drag-preview {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.96;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: rotate(1deg) scale(1.02);
  cursor: grabbing;
}
.kcard.drop-before::before, .kcard.drop-after::after {
  position: absolute;
  right: 6px;
  left: 6px;
  height: 3px;
  border-radius: 3px;
  background: var(--blue);
  content: "";
  pointer-events: none;
}
.kcard.drop-before::before { top: -7px; }
.kcard.drop-after::after { bottom: -7px; }
.kcol-body.drop-target {
  outline: 2px dashed var(--blue);
  outline-offset: -2px;
  background: var(--drop-bg);
}
.kcard-company { font-size: 13px; color: var(--muted); letter-spacing: -0.01em; }
.kcard-title { font-weight: 600; font-size: 15px; letter-spacing: -0.016em; margin: 4px 0 10px; line-height: 1.3; }
.kcard-meta { display: flex; justify-content: space-between; align-items: center; }
.kcard-days { font-size: 12px; color: var(--muted); }
.kanban-help { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 80px 20px; }
.empty-title { font-size: 40px; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 12px; }
.empty-sub { color: var(--muted); font-size: 17px; max-width: 44ch; margin: 0 auto 24px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; align-items: center; }

/* ---------- Form ---------- */
.job-form {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 36px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-import {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 14px 24px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--ring-soft);
  border-radius: var(--r-md);
  background: var(--ghost-hover-bg);
}
.form-import-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 2px; }
.form-import-heading { display: inline-flex; align-items: center; gap: 6px; }
.form-import-head strong { font-size: 14px; }
.form-import-head span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.form-import label { font-size: 14px; }
.form-section-title {
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.form-grid > .form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-outside { margin-top: 24px; }
.job-form label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; min-width: 0; }
.job-form > label.full, .job-form > div.full { margin-top: 20px; }
.job-form label > span, .job-form .field-label {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.job-form input:not([type="checkbox"]), .job-form select, .job-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  font-size: 16px;
  font-family: inherit;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--card-high);
}
.job-form textarea { resize: none; overflow-y: auto; line-height: 1.47; }
.job-form textarea[name="description"] { height: 132px; }
.job-form textarea[name="notes"] { height: 88px; }
.job-form input:not([type="checkbox"]):focus, .job-form select:focus, .job-form textarea:focus {
  outline: none;
  border-color: var(--blue-focus);
  box-shadow: 0 0 0 4px var(--ring-soft);
}
.job-form input::placeholder, .mform input::placeholder { color: var(--muted-faint); opacity: 1; }
.job-form input[type="date"] { font-size: 14px; letter-spacing: 0; }

/* Celebration confetti — fixed full-viewport canvas, pointer-transparent */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

/* ---------- Date field: Apple-style calendar popover (HIG pickers) ---------- */
/* The native date input stays as the no-JS fallback; datepicker.js swaps it
   for a hidden field + this button + popover. */
.datefield { position: relative; display: block; }
.datefield-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--card-high);
  font: inherit;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.datefield-btn:hover { border-color: var(--hover-border-strong); }
.datefield-btn:focus-visible {
  outline: none;
  border-color: var(--blue-focus);
  box-shadow: 0 0 0 4px var(--ring-soft);
}
.datefield-value.is-set { color: var(--blue); }
.datefield-value:not(.is-set) { color: var(--muted-faint); }
.datefield-cal { font-size: 17px; color: var(--muted-faint); }
.datefield-btn.has-value .datefield-cal { color: var(--blue); }

.datepicker {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  width: 322px;
  max-width: calc(100vw - 32px);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 12px 14px 14px;
}
.datefield.up .datepicker { top: auto; bottom: calc(100% + 8px); }
.datefield.open .datepicker { animation: dp-in 0.18s ease-out; }
@keyframes dp-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.dp-title {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: none;
  padding: 4px 6px;
  margin-left: -6px;
  border-radius: 8px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  cursor: pointer;
}
.dp-title:hover { background: var(--hover-bg); }
.dp-title .icon { font-size: 15px; color: var(--blue); font-weight: 700; }
.dp-nav { display: inline-flex; align-items: center; gap: 4px; }
.dp-prev, .dp-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--blue);
  cursor: pointer;
}
.dp-prev:hover, .dp-next:hover { background: var(--hover-bg); }
.dp-prev .icon, .dp-next .icon { font-size: 20px; font-weight: 700; }
.dp-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted-faint);
  text-align: center;
}
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; justify-items: center; }
.dp-empty { width: 38px; height: 38px; }
.dp-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.dp-day:hover { background: var(--hover-bg); }
.dp-day.today { color: var(--blue); font-weight: 600; }
.dp-day.sel { background: var(--blue); color: #fff; font-weight: 600; }
.dp-day.sel:hover { background: var(--blue-hover); }
.form-actions { margin-top: 28px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Apple checkbox row for "Add next" — beats .job-form label column layout */
.job-form .check-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.job-form .check-row > span:not(.tip) {
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -0.022em;
  color: var(--ink);
}
/* Apple-style checkbox: 22px rounded square, blue + white check when on */
.job-form .apple-check {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: rgba(120, 120, 128, 0.16);
  cursor: pointer;
  position: relative;
  box-shadow: none;
  transition: background-color 0.15s ease;
}
.job-form .apple-check:checked { background: var(--blue); }
.job-form .apple-check:checked::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3.5px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.job-form .apple-check:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring-soft);
}

/* Question-circle tip — hover/focus bubble, Apple help style */
.tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted-faint);
  cursor: help;
  border-radius: 50%;
}
.tip:hover { color: var(--muted); }
.tip .icon { font-size: 15px; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: -10px;
  width: 220px;
  padding: 8px 10px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 60;
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; visibility: visible; }
.tip:focus-visible { outline: none; color: var(--blue); }
.tip-sites { flex: none; width: 24px; height: 24px; }
.tip-sites::after { top: calc(100% + 8px); bottom: auto; right: auto; left: -12px; font-weight: 400; }
.tip-sites:focus-visible { box-shadow: 0 0 0 3px var(--ring-soft); }

.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }
.link-row .btn { white-space: nowrap; }
#fetch-btn { width: 126px; flex: 0 0 126px; }

/* Skills tag input — the chip zone has a fixed size so the form keeps
   one size whether empty or filled by Fetch details; overflow scrolls */
.skill-widget {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--card-high);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  height: 68px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--chip-bg);
  border: 1px solid var(--hairline-soft);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 4px 6px 4px 14px;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.skill-chip .skill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  border-radius: 50%;
}
.skill-chip .skill-remove:hover { background: var(--hover-bg); color: var(--ink); }
.skill-add { display: flex; gap: 8px; }
.skill-add input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: var(--r-sm);
  font-size: 15px;
  background: var(--parchment);
  color: var(--ink);
}
.skill-add input:focus { outline: none; box-shadow: 0 0 0 3px var(--ring-soft); }
.skill-add .btn { white-space: nowrap; }
.skill-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.skill-list .skill-chip { padding-right: 14px; }

/* ---------- CV upload component (macOS HIG: 36px, 8px, glass surface) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.cv-upload { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 28rem; }
.cv-upload [hidden] { display: none !important; }
.cv-upload-field-wrap { position: relative; }
.cv-upload-field {
  display: flex;
  align-items: center;
  height: var(--control-h);
  padding: 0 12px;
  background: var(--cv-bg);
  border: 1px solid var(--cv-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease-out;
}
.cv-upload-field:hover {
  background: var(--cv-bg-hover);
  border-color: var(--cv-border-hover);
}
.cv-upload-field:active { transform: scale(0.99); }
.cv-upload input:focus-visible ~ .cv-upload-field {
  outline: 2px solid var(--blue-focus);
  outline-offset: 2px;
}
.cv-upload.dragover .cv-upload-field {
  border: 1px dashed var(--cv-drag-border);
  background: var(--cv-drag-bg);
}
.cv-upload.has-file .cv-upload-field { padding-right: 40px; }
.cv-upload-field.has-error { border-color: var(--danger); }

.cv-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cv-upload-idle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cv-text);
}
.cv-upload-idle .icon { font-size: 15px; opacity: 0.6; flex: none; }
.cv-upload-selected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.cv-upload-selected .icon { font-size: 15px; color: var(--muted); flex: none; }
.cv-upload-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-upload-size { font-size: 12px; color: var(--muted); flex: none; }

/* Right-aligned system-blue action pill */
.cv-upload-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--cv-accent);
  background: var(--cv-accent-bg);
  border: 1px solid var(--cv-accent-border);
  transition: background-color 0.2s ease, transform 0.15s ease-out;
}
.cv-upload-field:hover .cv-upload-action { background: var(--cv-accent-bg); }
.cv-upload-action:active { transform: scale(0.95); }

/* Red clear button (appears when a file is selected) */
.cv-upload-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  margin-top: -13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}
.cv-upload-clear:hover { background: var(--danger-bg); }
.cv-upload-clear:active { transform: scale(0.9); }

.cv-upload-hint { margin: 0; font-size: 12px; letter-spacing: -0.01em; color: var(--muted); }
.cv-upload-error {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--danger);
}
.cv-upload-error .icon { font-size: 13px; flex: none; }

/* Inside the job form, keep the component row intact */
.job-form .cv-upload-field { flex-direction: row; align-items: center; }

/* Board content owns its horizontal scrolling; it never changes toolbar geometry. */
.board-page { width: 100%; max-width: none; min-width: 0; }
.board-page #board-results { width: 100%; min-width: 0; }

/* ---------- Detail ---------- */
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.detail-title { font-size: 40px; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 12px; }
.detail-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.company-name { font-size: 17px; font-weight: 600; letter-spacing: -0.022em; }
.detail-actions { display: flex; gap: 6px; align-items: center; }
.detail-actions form { margin: 0; }
.muted { color: var(--muted); font-size: 14px; letter-spacing: -0.01em; }
.muted .icon { font-size: 13px; vertical-align: -2px; margin-right: 2px; }

/* Pipeline steps */
.pipeline { display: flex; gap: 8px; margin: 0 0 20px; overflow-x: auto; padding-bottom: 8px; }
.step {
  flex: 1;
  min-width: 120px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md);
  opacity: 0.45;
}
.step.reached { opacity: 1; }
.step.current {
  opacity: 1;
  /* True 2px border ring (not outline/shadow): uniform on all four sides and
     follows the corner radius exactly. Padding shrinks 1px to hold outer size. */
  border: 2px solid var(--blue);
  padding: 13px 15px;
}
.step-name { font-weight: 600; font-size: 14px; letter-spacing: -0.016em; color: var(--ink); }
.step-date { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 16px; }

.detail-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stage-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.stage-controls form { margin: 0; min-width: 0; }
.stage-form { display: block; }
/* macOS pop-up button: content-sized, never stretched to the column */
.stage-form .select { width: auto; max-width: 100%; height: var(--control-h); }
.stage-controls .btn-primary {
  height: var(--control-h);
  padding: 0 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
  align-items: start;
}
.detail-grid section {
  background: var(--card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-lg);
  padding: 24px 28px 28px;
  min-width: 0;
}
.detail-grid h2 { margin-top: 20px; }
.detail-grid h2:first-child { margin-top: 0; }
dl { margin: 0; }
dt {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 14px;
}
dt:first-child { margin-top: 0; }
dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 15px; letter-spacing: -0.016em; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.description-content { max-height: 18em; overflow: hidden; white-space: normal; line-height: 1.6; }
.description-content p { margin: 0 0 12px; }
.description-content p:last-child { margin-bottom: 0; }
.description-content ul { margin: 0 0 12px; padding-left: 22px; }
.description-content li + li { margin-top: 4px; }
.description-clamp.open .description-content,
.description-clamp.clamp-off .description-content { max-height: none; overflow: visible; }
.description-more {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.description-more[hidden], .mprose-more[hidden] { display: none !important; }

.cv-actions-row {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(220px, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}
.cv-current { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
/* Empty state: vertically centered against the 36px upload field */
.cv-empty-note { display: inline-flex; align-items: center; min-height: var(--control-h); }
.cv-download {
  height: var(--control-h);
  padding: 0 12px;
  border-radius: var(--button-radius-standard);
}
.cv-form { display: block; width: 100%; min-width: 0; margin: 0; }
.cv-form .cv-upload { max-width: none; }
.cv-name { overflow-wrap: anywhere; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; gap: 10px; align-items: center; padding: 5px 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--parchment);
  border-top: 1px solid var(--hairline-soft);
  padding: 24px 22px 32px;
}
.footer-inner { max-width: var(--content-max); margin: 0 auto; }
.footer-fine {
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--muted-faint);
}
.footer-copyright { color: var(--muted); }
.footer-copyright a { color: inherit !important; text-decoration: none; }
.footer-copyright a:hover { text-decoration: underline; }

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
}
.footer-legal a { color: var(--ink); }
.footer-legal a:hover { color: var(--ink); text-decoration: underline; }
.footer-sep { color: var(--hairline); user-select: none; }

/* Language picker: English only for now; future languages plug in as options */
.lang-select {
  margin-left: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-select select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 16px 4px 4px;
  cursor: pointer;
}
.lang-select select:focus-visible {
  outline: 2px solid var(--blue-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.lang-select .icon {
  position: absolute;
  right: 0;
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  .tile { padding: 64px 22px; }
  .hero { padding: 72px 0 56px; }
  .hero-title { font-size: 48px; }
}

@media (max-width: 833px) {
  .container { padding: 0 16px; }
  .global-nav { padding: 0 16px; }
  .subnav { padding: 0 16px; }
  .usermenu-name { max-width: 120px; }
  .filters { grid-template-columns: minmax(0, 1fr) max-content max-content; }
  .search-wrap { grid-column: 1 / -1; }
  .filters-right { grid-column: 3; grid-row: 2; margin: 0; justify-self: end; width: auto; }
  .kanban { grid-template-columns: repeat(8, minmax(260px, 42vw)); }
  .detail-toolbar { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .page { padding-top: 28px; }
}

@media (max-width: 734px) {
  .tile { padding: 48px 16px; }
  .hero { padding: 56px 0 40px; }
  .hero-title { font-size: 40px; }
  .hero-lead { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-import { grid-template-columns: 1fr; gap: 10px; }
  .job-form { padding: 24px; }
  .detail-title { font-size: 34px; }
  .page { padding-bottom: 64px; }
  .skill-profile-page .mtitle { font-size: 34px; }
  .skill-profile-page .settings-intro { font-size: 14px; }
  .skill-profile-page .settings-actions .btn { width: 100%; }
  .existing-cv-form { flex-direction: column; align-items: stretch; }
}

/* ============================================================
   Desktop match + profile handoff (designs 2b-2d / 3b-3c)
   ============================================================ */

.profile-desktop-only,
.profile-avg-ring,
.skills-average { display: none; }

.skills-card-foot,
.cv-card-actions,
.existing-cv-controls { display: flex; align-items: center; }
.skills-card-foot { justify-content: flex-end; margin-top: 14px; }
.existing-cv-form > p { margin: 0; color: var(--muted-faint); font-size: 12px; line-height: 1.4; }
.skills-card-foot .btn { flex: none; height: var(--control-h); border-radius: var(--button-radius-standard); }
.cv-card-actions { gap: 8px; margin-top: 14px; }
.cv-card-actions form { flex: 1; margin: 0; }
.cv-card-actions .btn { width: 100%; height: var(--control-h); border-radius: var(--button-radius-standard); }
.cv-replace-form { position: relative; }
.cv-more { align-self: center; color: var(--blue); font-size: 12px; font-weight: 600; }
.existing-cv-form { flex-direction: column; align-items: stretch; }
.existing-cv-controls { gap: 8px; margin-top: 8px; }
.existing-cv-controls .select { flex: 1; min-width: 0; }

@media (min-width: 735px) {
  .profile-phone-only { display: none !important; }
  .profile-desktop-only { display: block; }

  /* Board filter and match sort */
  .board-table td { padding: 10px 16px; }
  /* Column sorting: the caret sits right of the column name and shows only
     on the actively sorted column; one column sorts at a time. */
  .th-sort {
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .th-sort:hover { color: var(--ink); }
  .th-sort:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 3px; border-radius: 3px; }
  .th-sort .th-caret { display: none; font-size: 9px; color: var(--blue); }
  th[aria-sort="descending"] .th-caret { display: inline; }
  th[aria-sort="ascending"] .th-caret { display: inline-block; transform: rotate(180deg); }
  th[aria-sort="ascending"] .th-sort,
  th[aria-sort="descending"] .th-sort { color: var(--blue); }
  .table-match { text-align: center; }
  .mring-table { width: 28px; height: 28px; margin: 0 auto; }
  .mring-table .mring-track, .mring-table .mring-fill { stroke-width: 5; }
  .mring-table .mring-value { font-size: 12px; }
  /* "100" steps back down so three digits stay inside the stroke. */
  .mring-table .mring-value.full { font-size: 10px; }

  /* Kanban rings and two-line headers */
  .kcol-title { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  .kcol-title small { margin-top: 3px; color: var(--muted-faint); font-size: 11px; font-weight: 400; }
  .kcol-head { align-items: flex-start; }
  .kcard-top { display: flex; align-items: flex-start; gap: 10px; }
  .kcard-copy { min-width: 0; flex: 1; }
  .kcard-title { margin-bottom: 0; }
  .mring-kanban { width: 34px; height: 34px; }
  .mring-kanban .mring-track, .mring-kanban .mring-fill { stroke-width: 4; }
  .mring-kanban .mring-value { font-size: 11px; }
  .kcard-meta { margin-top: 10px; }
  .kcard-days { width: 34px; flex: none; text-align: center; }

  /* Desktop detail rail */
  .detail-actions { flex-wrap: wrap; justify-content: flex-end; }
  .detail-actions .stage-form .select,
  .detail-advance { height: var(--control-h); }
  .detail-advance { padding: 0 16px; border-radius: var(--button-radius-capsule); font-size: 14px; }
  .detail-icon-action { width: var(--control-h); height: var(--control-h); border-radius: 50%; }
  .detail-icon-action.danger { color: var(--danger); }
  .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
  .detail-main, .detail-rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .detail-pipeline { margin: 0; padding-bottom: 0; }
  .detail-pipeline .step { min-width: 92px; padding: 12px 14px; }
  .detail-pipeline .step.current { padding: 11px 13px; }
  .detail-pipeline .step-name { font-size: 13px; }
  .detail-pipeline .step-date { font-size: 11px; min-height: 14px; }
  .detail-card,
  .detail-rail-card { background: var(--card); border: 1px solid var(--hairline-soft); border-radius: var(--r-lg); min-width: 0; }
  .detail-card { padding: 24px 28px 28px; }
  .detail-rail-card { padding: 22px; }
  .detail-card h2 { margin-top: 20px; }
  .detail-card h2:first-child { margin-top: 0; }
  .detail-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; }
  .detail-facts > div { min-width: 0; }
  .detail-fact-wide { grid-column: 1 / -1; }
  .detail-rail-card > h3,
  .match-card h3 { margin: 0 0 9px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .match-card-head { display: flex; align-items: center; gap: 16px; }
  .match-card-head h2 { margin: 0 0 3px; font-size: 17px; letter-spacing: -.022em; }
  .match-card-head p { margin: 0; color: var(--muted-faint); font-size: 13px; line-height: 1.4; }
  .mring-detail { width: 76px; height: 76px; }
  .mring-detail .mring-track, .mring-detail .mring-fill { stroke-width: 3.4; }
  .mring-detail .mring-value { gap: 2px; font-size: 22px; letter-spacing: -.03em; }
  /* Three digits ("100") step down so the number stays inside the ring, and the
     full arc loses its round caps — they would overlap into a bump. */
  .mring-detail .mring-value.full { font-size: 17px; letter-spacing: -.02em; }
  .mring-detail .mring-fill.full { stroke-linecap: butt; }
  .match-card-divider { height: 1px; background: var(--hairline-soft); margin: 18px 0; }
  .match-card h3:not(:first-child) { margin-top: 16px; }
  .match-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
  .match-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; }
  .match-chip.covered { color: var(--blue); background: var(--cv-accent-bg); border: 1px solid var(--cv-accent-border); }
  .match-chip.covered .icon { width: 11px; height: 11px; stroke-width: 2.6; }
  .match-chip.missing { color: var(--muted); background: var(--card); border: 1px dashed var(--hairline); }
  .match-add-form { margin-top: 16px; }
  .match-add-form .btn { width: 100%; height: var(--control-h); border-radius: var(--button-radius-standard); color: var(--blue); }
  .match-add-form .icon { width: 13px; height: 13px; }
  .match-card-foot { margin: 10px 0 0; color: var(--muted-faint); font-size: 12px; line-height: 1.4; }

  /* Profile reading column */
  .profile-page { margin-left: auto; margin-right: auto; }
  .profile-page:not(.skill-profile-page) { max-width: 1000px; }
  .profile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-top: 8px; }
  .profile-settings-grid > section { min-width: 0; }
  .profile-settings-grid .group-label { margin-top: 16px; }
  .profile-settings-grid .profile-phone-only { display: none !important; }
  .profile-avg-ring { display: block; width: 52px; height: 52px; }
  .profile-avg-ring .mring-value { flex-direction: column; font-size: 14px; line-height: 1; }
  .profile-avg-ring .mring-unit { margin-top: 3px; color: var(--muted-faint); font-size: 7px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
  .stat-tiles { display: none; }
  .match-panel { padding: 14px; }
  .match-seg button span { margin-left: 5px; color: var(--muted); }
  .match-source-skills { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; margin-top: 14px; }
  .match-source-skills > span:not([data-match-rest]),
  .match-source-skills [data-match-rest] > span { padding: 4px 12px; border: 1px solid var(--hairline-soft); border-radius: var(--r-pill); background: var(--chip-bg); font-size: 13px; }
  .match-source-skills a { align-self: center; font-size: 13px; font-weight: 600; }
  /* The revealed batch must join the outer wrap, not become one long item. */
  .match-source-skills [data-match-rest] { display: contents; }
  .match-source-skills [data-match-rest][hidden] { display: none; }
  .match-source-expand {
    align-self: center;
    border: 0;
    background: none;
    color: var(--blue);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
  }
  .match-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--minset-line); }
  .match-panel-foot p { margin: 0; color: var(--muted-faint); font-size: 12px; line-height: 1.4; }
  .match-panel-foot strong { color: var(--ink); }
  .match-panel-foot a { flex: none; font-size: 13px; font-weight: 500; }
  .verified-pill { padding: 3px 8px; border-radius: var(--r-pill); background: var(--chip-bg); color: var(--muted-faint); font-size: 12px; }
  .account-list .inset-action[aria-disabled="true"] { cursor: default; }
  .preferences-list .inset-row { padding: 11px 14px; }
  .preference-seg { flex: 0 0 220px; height: 30px; }
  .date-preference-seg { flex-basis: 260px; }
  .date-preference-seg button { font-size: 11px; }

  /* Profile Skills workbench */
  .skill-profile-page { max-width: 1000px; }
  .skills-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .skills-page-head .settings-intro { margin-bottom: 0; }
  .skills-average { display: flex; align-items: center; gap: 10px; flex: none; padding-top: 3px; }
  .skills-average > span { display: flex; flex-direction: column; color: var(--muted-faint); font-size: 13px; line-height: 1.35; }
  .skills-average small { font-size: 12px; }
  .mring-skills-head { width: 44px; height: 44px; }
  .mring-skills-head .mring-track, .mring-skills-head .mring-fill { stroke-width: 3.6; }
  .mring-skills-head .mring-value { font-size: 13px; }
  .skills-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
  .skills-workbench .group-label { margin-top: 20px; }
  .skills-workbench-rail { display: flex; flex-direction: column; gap: 12px; }
  .skills-workbench-rail section { min-width: 0; }
  .profile-skills-card { padding: 20px; }
  .profile-skills-card .skill-chips { max-height: none; overflow: visible; }
  .profile-skills-card .skill-add { margin-bottom: 14px; }
  .suggestion-card, .cv-skills-card, .existing-cv-form { padding: 16px; }
  .suggestion-chips { margin-top: 0; }
}

@media (min-width: 735px) and (max-width: 1068px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-rail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (min-width: 735px) and (max-width: 833px) {
  .filters { grid-template-columns: minmax(0, 1fr) max-content; }
  .search-wrap { grid-column: 1 / -1; }
  .filters-right { grid-column: 2; grid-row: 2; }
  .skills-workbench { grid-template-columns: 1fr; }
  .skills-workbench-rail { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .skills-workbench-rail section:last-child { grid-column: 1 / -1; }
}

@media (max-width: 734px) {
  .profile-skills-card .skill-widget { display: flex; flex-direction: column; }
  .profile-skills-card .skill-chips { order: 1; }
  .profile-skills-card .skill-add { order: 2; margin-top: 10px; }
  .skills-card-foot { display: block; }
  .skills-card-foot .btn { width: 100%; }
  .skills-workbench-rail .group-label { margin-top: 24px; }
  .profile-skills-card .skill-add { margin-bottom: 10px; }
  .cv-card-actions { flex-direction: column; }
  .existing-cv-controls { flex-direction: column; align-items: stretch; }
}

@media (max-width: 640px) {
  .gnav-tagline { display: none; }
  .gnav-center { display: none; }
  .btn-label { display: none; }
  .hero-title { font-size: 34px; }
  .tile-head { font-size: 34px; }
  .empty-title { font-size: 34px; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .select { width: 100%; min-width: 0; }
  .filters-right { grid-column: 1 / -1; grid-row: auto; justify-self: end; }
  .kanban { grid-template-columns: repeat(8, minmax(260px, 82vw)); }
  .stage-controls .btn-primary, .stage-form { width: 100%; }
  .stage-form .select { width: 100%; }
  .cv-actions-row { grid-template-columns: 1fr; }
  .btn-lg-label { display: none; }
  .form-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 419px) {
  .hero-title { font-size: 28px; }
  .tile-head { font-size: 28px; }
  .empty-title { font-size: 28px; }
  .job-form { padding: 20px; }
}

/* ---------- Motion (HIG): fast, smooth, reduced-motion aware ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Landing hero — CSS-only staggered entrance (light hero tile only) */
html.js .hero .hero-title { animation: rise-in 0.45s ease-out both; }
html.js .hero .hero-lead { animation: rise-in 0.45s ease-out 0.06s both; }
html.js .hero .hero-cta { animation: rise-in 0.45s ease-out 0.12s both; }
html.js .hero .hero-note { animation: rise-in 0.45s ease-out 0.18s both; }

/* Scroll reveals (IntersectionObserver adds .in-view; --d staggers) */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.55s ease-out var(--d, 0s),
    transform 0.55s ease-out var(--d, 0s);
}
html.js [data-reveal].in-view { opacity: 1; transform: none; }

/* Board content — entrance after every HTMX swap (never on page load).
   Table/kanban settle fast (0.3s ease-out for entering); the empty state takes
   the stage with a slower staggered entrance (0.55s + 0.08s steps). */
.swap-anim > *:not(.empty) { animation: rise-in 0.3s ease-out both; }
.swap-anim .empty > * { animation: rise-in 0.55s ease-out both; }
.swap-anim .empty > *:nth-child(2) { animation-delay: 0.08s; }
.swap-anim .empty > *:nth-child(3) { animation-delay: 0.16s; }

/* HTMX board swap — crossfade instead of a hard cut: the old content eases
   out during the 120ms swap delay, the new content rises in on settle. */
#board-results { transition: opacity 0.12s ease-in; }
#board-results.htmx-swapping { opacity: 0; }
#board-results.htmx-settling { opacity: 1; transition: opacity 0.3s ease-out; }

/* Interaction polish — instant response, smooth settle */
a { transition: color 0.2s ease; }
.btn, .btn-primary, .btn-ghost, .btn-pearl, .btn-utility, .btn-danger, .btn-muted,
.btn-icon, .usermenu-item, .seg a {
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease-out;
}
.stat, .kcard {
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease-out;
}
.search-input, .select, .job-form input:not([type="checkbox"]), .job-form select, .job-form textarea,
.skill-add input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ---------- Modal (dialog over blurred page) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 32px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  animation: modal-fade 0.2s ease-out;
}
.modal-backdrop[hidden] { display: none; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-fade-out { from { opacity: 1; } to { opacity: 0; } }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  animation: modal-rise 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
@keyframes modal-rise-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(12px) scale(0.99); }
}
/* Exit animation mirrors the entrance */
.modal-backdrop.closing { animation: modal-fade-out 0.2s ease-in forwards; }
.modal-backdrop.closing .modal-card { animation: modal-rise-out 0.2s ease-in forwards; }
.modal-card .job-form { margin: 0; max-width: none; }

/* ---------- Alert (HIG): centered confirmation, safe default focused ---------- */
.alert-card {
  width: 100%;
  max-width: 400px;
  /* Solid surface in light theme — no frosted transparency. Dark theme
     overrides this with a translucent blurred surface below. */
  background: #ffffff;
  border: 0.5px solid var(--hairline);
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  padding: 24px 24px 20px;
  animation: alert-in 0.2s ease-out;
}
@keyframes alert-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}
/* Exit mirrors the entrance; confirm-dialog.js hides the backdrop when done */
.modal-backdrop.closing .alert-card { animation: alert-out 0.2s ease-in forwards; }
@keyframes alert-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: scale(0.96); }
}
.alert-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.alert-msg { margin: 0 0 20px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.alert-target {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* The confirm dialog is always a centred alert, unlike the top-aligned
   add-application modal that shares the backdrop. */
#confirm-dialog { align-items: center; }
.alert-actions { display: flex; justify-content: flex-end; gap: 8px; }
/* Delete variant: Apple permission-style — two equal pills side by side,
   destructive action left, blue dismiss right. */
.is-delete .alert-actions { gap: 12px; }
.is-delete .alert-actions .btn {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border-radius: var(--r-pill);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0 12px;
  text-decoration: none;
}
.is-delete .alert-actions [data-confirm-ok] { order: -1; }
/* Transparent destructive pill: red outline + red text, fills faintly on hover */
.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger);
}
.btn-danger-outline:hover { background: var(--danger-bg); }
.btn-danger-outline:focus-visible {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

/* Form header: title and trailing close share one row, vertically centered */
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
}
.form-head h1 { margin: 0; min-width: 0; }
.form-head .btn-icon { flex: none; }
body.modal-open { overflow: hidden; }

/* ---------- Touch hit targets (HIG: ≥44×44) ---------- */
@media (pointer: coarse) {
  .btn-icon { width: 44px; height: 44px; }
  .btn-utility, .btn-danger, .btn-muted { min-height: 44px; }
}

/* ---------- Motion (HIG): short, purpose-driven; degrade with Reduce Motion ---------- */
/* The spinner is the exception — it must keep moving to signal progress. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn-icon, .btn-pearl, .btn-utility, .btn-danger, .btn-muted,
  .stat, .seg a, .kcard, .board-table tbody tr,
  .usermenu-item, .skill-chip .skill-remove,
  .datefield-btn, .dp-day, .apple-check, .tip::after,
  .col-resizer::after, .col-resize-line {
    transition: none;
  }
  .col-resize-line { transform: none; }
  .btn:active, .btn-icon:active,
  .cv-upload-field:active, .cv-upload-action:active,
  .cv-upload-clear:active { transform: none; }
  .cv-upload-field, .cv-upload-action, .cv-upload-clear { transition: none; }
  .usermenu-list { animation: none; }
  .modal-backdrop, .modal-card, .alert-card { animation: none; }
  .modal-backdrop.closing .alert-card { animation: none; }
  .datefield.open .datepicker { animation: none; }
  .toast { transform: none; transition: opacity 0.2s ease; }
  html.js .hero .hero-title, html.js .hero .hero-lead,
  html.js .hero .hero-cta, html.js .hero .hero-note { animation: none; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .swap-anim > *, .swap-anim .empty > * { animation: none; }
  #board-results, #board-results.htmx-swapping, #board-results.htmx-settling {
    transition: none;
    opacity: 1;
  }
}

/* ---------- Dark theme (Apple-style) ---------- */
/* Follows the system by default (data-theme="system"); the profile menu
   can pin it to light or dark. */
[data-theme="dark"] {
  color-scheme: dark;
  --blue: var(--apple-blue);
  --blue-hover: #47a9ff;
  --blue-focus: var(--apple-blue);
  --btn-primary-bg: #0071e3;
  --btn-primary-hover: #2b8cf0;
  --ghost-hover-bg: rgba(10, 132, 255, 0.12);
  --canvas: var(--apple-system-background);
  --parchment: #161617;
  --pearl: #2c2c2e;
  --pearl-ink: #f5f5f7;
  --pearl-hover-bg: #3a3a3c;
  --pearl-hover-border: #6e6e73;
  --tile-1: #000000;
  --tile-2: #1d1d1f;
  --tile-3: #131315;
  --card: var(--apple-secondary-system-background);
  --card-high: var(--apple-tertiary-system-background);
  --chip-bg: #2a2a2c;
  --ink: #ffffff;
  --muted: #98989d;
  --muted-faint: #8e8e93;
  --hairline: #424245;
  --hairline-soft: rgba(84, 84, 88, 0.6);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --hover-border: rgba(255, 255, 255, 0.3);
  --hover-border-strong: rgba(255, 255, 255, 0.36);
  --ring-soft: rgba(10, 132, 255, 0.3);
  --drop-bg: rgba(10, 132, 255, 0.1);
  --danger: var(--apple-red);
  --danger-bg: rgba(255, 69, 58, 0.12);
  --danger-float-bg: #3a1c1b;
  --m-red: var(--apple-red);
  --m-orange: var(--apple-orange);
  --m-yellow: var(--apple-yellow);
  --m-green: var(--apple-green);
  --seg-bg: #26262a;
  --seg-on: #404040;
  --spinner-track: rgba(255, 255, 255, 0.2);
  --toast-bg: #2c2c2e;
  --subnav-bg: rgba(29, 29, 31, 0.8);
  --cv-bg: rgba(255, 255, 255, 0.06);
  --cv-bg-hover: rgba(255, 255, 255, 0.1);
  --cv-border: rgba(255, 255, 255, 0.1);
  --cv-border-hover: rgba(255, 255, 255, 0.2);
  --cv-drag-bg: rgba(255, 255, 255, 0.02);
  --cv-drag-border: rgba(255, 255, 255, 0.15);
  --cv-text: #98989d;
  --cv-accent: var(--apple-blue);
  --cv-accent-bg: rgba(10, 132, 255, 0.12);
  --cv-accent-border: rgba(10, 132, 255, 0.25);
  --mfield-bg: rgba(120, 120, 128, 0.24);
  --sliders-knob: #2e2e30;
  --tabbar-bg: rgba(22, 22, 24, 0.86);
  --tabbar-line: rgba(255, 255, 255, 0.14);
  --tab-idle: rgba(235, 235, 245, 0.55);
  --sheet-bg: #1c1c1e;
  --sheet-foot-bg: rgba(28, 28, 30, 0.9);
  --sheet-grip: rgba(255, 255, 255, 0.25);
  --sheet-close-bg: rgba(120, 120, 128, 0.32);
  --mcard-border: rgba(255, 255, 255, 0.08);
  --minset-border: rgba(255, 255, 255, 0.08);
  --minset-line: rgba(255, 255, 255, 0.12);
  --ring-track: rgba(255, 255, 255, 0.14);
  --slider-track: rgba(120, 120, 128, 0.32);
  --empty-art-ink: var(--apple-gray-3);
  --mbar-bg: rgba(22, 22, 24, 0.92);
}
[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
[data-theme="dark"] .usermenu-list {
  background: rgba(23, 23, 23, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .search-input,
[data-theme="dark"] .select {
  background-color: rgba(38, 38, 40, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .seg a.on {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .datepicker {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
/* Frosted Apple-style alert surface, dark theme only. */
[data-theme="dark"] .alert-card {
  background: color-mix(in srgb, var(--card) 72%, transparent);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue: var(--apple-blue);
    --blue-hover: #47a9ff;
    --blue-focus: var(--apple-blue);
    --btn-primary-bg: #0071e3;
    --btn-primary-hover: #2b8cf0;
    --ghost-hover-bg: rgba(10, 132, 255, 0.12);
    --canvas: var(--apple-system-background);
    --parchment: #161617;
    --pearl: #2c2c2e;
    --pearl-ink: #f5f5f7;
    --pearl-hover-bg: #3a3a3c;
    --pearl-hover-border: #6e6e73;
    --tile-1: #000000;
    --tile-2: #1d1d1f;
    --tile-3: #131315;
    --card: var(--apple-secondary-system-background);
    --card-high: var(--apple-tertiary-system-background);
    --chip-bg: #2a2a2c;
    --ink: #ffffff;
    --muted: #98989d;
    --muted-faint: #8e8e93;
    --hairline: #424245;
    --hairline-soft: rgba(84, 84, 88, 0.6);
    --hover-bg: rgba(255, 255, 255, 0.08);
    --hover-border: rgba(255, 255, 255, 0.3);
    --hover-border-strong: rgba(255, 255, 255, 0.36);
    --ring-soft: rgba(10, 132, 255, 0.3);
    --drop-bg: rgba(10, 132, 255, 0.1);
    --danger: var(--apple-red);
    --danger-bg: rgba(255, 69, 58, 0.12);
    --danger-float-bg: #3a1c1b;
    --m-red: var(--apple-red);
    --m-orange: var(--apple-orange);
    --m-yellow: var(--apple-yellow);
    --m-green: var(--apple-green);
    --seg-bg: #26262a;
    --seg-on: #404040;
    --spinner-track: rgba(255, 255, 255, 0.2);
    --toast-bg: #2c2c2e;
    --subnav-bg: rgba(29, 29, 31, 0.8);
    --cv-bg: rgba(255, 255, 255, 0.06);
    --cv-bg-hover: rgba(255, 255, 255, 0.1);
    --cv-border: rgba(255, 255, 255, 0.1);
    --cv-border-hover: rgba(255, 255, 255, 0.2);
    --cv-drag-bg: rgba(255, 255, 255, 0.02);
    --cv-drag-border: rgba(255, 255, 255, 0.15);
    --cv-text: #98989d;
    --cv-accent: var(--apple-blue);
    --cv-accent-bg: rgba(10, 132, 255, 0.12);
    --cv-accent-border: rgba(10, 132, 255, 0.25);
    --mfield-bg: rgba(120, 120, 128, 0.24);
    --sliders-knob: #2e2e30;
    --tabbar-bg: rgba(22, 22, 24, 0.86);
    --tabbar-line: rgba(255, 255, 255, 0.14);
    --tab-idle: rgba(235, 235, 245, 0.55);
    --sheet-bg: #1c1c1e;
    --sheet-foot-bg: rgba(28, 28, 30, 0.9);
    --sheet-grip: rgba(255, 255, 255, 0.25);
    --sheet-close-bg: rgba(120, 120, 128, 0.32);
    --mcard-border: rgba(255, 255, 255, 0.08);
    --minset-border: rgba(255, 255, 255, 0.08);
    --minset-line: rgba(255, 255, 255, 0.12);
    --ring-track: rgba(255, 255, 255, 0.14);
    --slider-track: rgba(120, 120, 128, 0.32);
    --empty-art-ink: var(--apple-gray-3);
    --mbar-bg: rgba(22, 22, 24, 0.92);
  }
  :root:not([data-theme="light"]) .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  }
  :root:not([data-theme="light"]) .salary-row .salary-currency {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  }
  :root:not([data-theme="light"]) .usermenu-list {
    background: rgba(23, 23, 23, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  }
  :root:not([data-theme="light"]) .search-input,
  :root:not([data-theme="light"]) .select {
    background-color: rgba(38, 38, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
  }
  :root:not([data-theme="light"]) .seg a.on {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
  :root:not([data-theme="light"]) .datepicker {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
  :root:not([data-theme="light"]) .alert-card {
    background: color-mix(in srgb, var(--card) 72%, transparent);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
  }
}

/* ============================================================
   Phone layouts (JAMT mobile design, iPhone 16 Pro 402x874)
   Board cards, bottom tab bar, filter sheet and the iOS grouped
   lists. Everything here is off above 734px: the desktop table,
   kanban and global nav keep that range.
   ============================================================ */

.mtitle,
.mboard,
.tabbar,
.mfilter,
.mseg-view,
.sheet-backdrop { display: none; }

/* ---------- Large title ---------- */
.mtitle {
  font-size: 34px;
  font-weight: 700;
  line-height: 41px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 12px;
}

/* ---------- Toolbar: filter button + layout switch ---------- */
.mfilter {
  width: var(--control-h);
  height: var(--control-h);
  flex: none;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 0;
  border-radius: 50%;
  background: var(--mfield-bg);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.mfilter .icon { width: 17px; height: 17px; stroke-width: 1.7; }
.mfilter-label { display: none; }
/* Active-filter dot, punched out of the button's own fill like the mockup. */
.mfilter.has-filters::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  border: 1.5px solid var(--mfield-bg);
}

.mseg-view {
  height: var(--control-h);
  flex: none;
  border-radius: 10px;
  background: var(--seg-bg);
  padding: 2px;
  gap: 2px;
}
.mtoggle {
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted-faint);
}
.mtoggle .icon { width: 16px; height: 16px; stroke-width: 1.7; }
.mtoggle.on {
  background: var(--seg-on);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ---------- Stage groups ---------- */
.mgroup + .mgroup { margin-top: 24px; }
.mgroup-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 0 10px;
}
.mgroup-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.mgroup-count { font-size: 13px; color: var(--muted-faint); }

/* ---------- Card (shared by both layouts) ---------- */
.mcards { display: grid; gap: 12px; }
.mboard[data-mview="grid"] .mcards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mboard[data-mview="list"] .mcards { grid-template-columns: minmax(0, 1fr); }

.mcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--mcard-border);
  border-radius: var(--r-lg);
  padding: 12px;
  color: var(--ink);
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.mcard:active { background: var(--hover-bg); }

.mcard-stage-age { display: flex; align-items: center; gap: 7px; color: var(--muted-faint); font-size: 10px; line-height: 1.2; }
.mcard-stage { color: var(--blue); font-weight: 600; }
.mcard-head { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.mcard-ident { min-width: 0; flex: 1; }
.mcard-company {
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.mcard-title { color: var(--ink); display: block; }
.mcard-mode {
  flex: none;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--chip-bg);
  border-radius: var(--r-pill);
  padding: 3px 7px;
  line-height: 1.2;
}
.mcard-date { font-size: 11px; color: var(--muted-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-loc { overflow: hidden; text-overflow: ellipsis; }
.mcard-skills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1px; }
.mchip {
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--muted);
  background: var(--chip-bg);
  border-radius: var(--r-pill);
  padding: 3px 7px;
}
.mcard-more { font-size: 10.5px; line-height: 1.2; color: var(--muted-faint); padding: 3px 2px; }
.mcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.mcard-salary-amount { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.mcard-salary-unit { color: var(--muted-faint); }

/* Grid: company fades out on one line, mode pill pinned, card never grows.
   The ring sits in the foot row at the bottom-right corner. */
.mboard[data-mview="grid"] .mcard { min-height: 176px; }
.mboard[data-mview="grid"] .mcard-ident { position: relative; overflow: hidden; margin-right: 56px; }
.mboard[data-mview="grid"] .mcard-ident::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, var(--card) 100%);
  pointer-events: none;
}
.mboard[data-mview="grid"] .mcard-company {
  font-size: 15px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  white-space: nowrap;
}
.mboard[data-mview="grid"] .mcard-title {
  font-size: 12.5px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mboard[data-mview="grid"] .mcard-mode { position: absolute; top: 12px; right: 12px; }
.mboard[data-mview="grid"] .mcard-skills .mchip:nth-of-type(n + 4) { display: none; }
.mboard[data-mview="grid"] .mcard-foot { margin-top: auto; }
.mboard[data-mview="grid"] .mcard-salary { display: flex; flex-direction: column; }
.mboard[data-mview="grid"] .mcard-salary-unit { font-size: 10.5px; }

/* List: company and role share a line; a long name takes the line for itself
   and the role drops beneath it (the role's flex-basis cannot fit). */
.mboard[data-mview="list"] .mcard { padding: 13px 14px; }
.mboard[data-mview="list"] .mcard-ident { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.mboard[data-mview="list"] .mcard-company {
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  flex: 0 1 auto;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.mboard[data-mview="list"] .mcard-title {
  font-size: 13px;
  line-height: 1.3;
  flex: 1 1 9ch;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mboard[data-mview="list"] .mcard-date { font-size: 11.5px; }
.mboard[data-mview="list"] .mcard-more { display: none; }
/* The ring rides the trailing edge instead of sitting in a row of its own:
   a card with a match but no salary would otherwise leave 52px of dead space. */
.mboard[data-mview="list"] .mcard { position: relative; }
.mboard[data-mview="list"] .mcard:has(.mring) { padding-right: 76px; }
.mboard[data-mview="list"] .mcard-foot { margin-top: 2px; display: block; }
.mboard[data-mview="list"] .mcard-foot:has(.mcard-salary:empty) { margin-top: 0; }
.mboard[data-mview="list"] .mring { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.mboard[data-mview="list"] .mcard-salary-unit { font-size: 11.5px; font-weight: 400; }

/* ---------- Match ring ---------- */
.mring { position: relative; width: 52px; height: 52px; flex: none; }
.mring svg { width: 100%; height: 100%; display: block; }
.mring-track { fill: none; stroke: var(--ring-track); stroke-width: 3; }
.mring-fill { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
/* Match color bands: gray 0, red 1–20, orange 21–49, yellow 50–65,
   green 66–99, blue 100. Zero keeps the gray track with a muted number. */
.mring.m-red .mring-fill { stroke: var(--m-red); }
.mring.m-orange .mring-fill { stroke: var(--m-orange); }
.mring.m-yellow .mring-fill { stroke: var(--m-yellow); }
.mring.m-green .mring-fill { stroke: var(--m-green); }
.mring.m-blue .mring-fill { stroke: var(--blue); }
.mring.m-zero .mring-value { color: var(--muted-faint); }
/* No comparable skills at all: gray track with a muted minus, same anatomy. */
.mring.m-null .mring-value { color: var(--muted-faint); }
.mring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- Bottom tab bar: floating Instagram-like pill ---------- */

/* ---------- Bottom tab bar: floating Instagram-like pill ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  width: min(430px, calc(100% - 32px));
  align-items: stretch;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 30px;
  background: var(--card);
  border: 1px solid var(--mcard-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: width 0.25s ease, padding 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 6px;
  min-height: 48px;
  border-radius: 22px;
  color: var(--tab-idle);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, padding 0.25s ease, min-height 0.25s ease;
}
.tab .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
  transition: width 0.25s ease, height 0.25s ease;
}
.tab-label {
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.006em;
  max-height: 12px;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.25s ease;
}
.tab.on { color: var(--blue); background: var(--hover-bg); }
.tab.on .tab-label { font-weight: 600; }

/* Compact mode while scrolling: narrower pill, icons only, tighter padding —
   mirrors the Instagram bar shrinking after the user leaves the top. */
.tabbar.is-compact {
  width: min(340px, calc(100% - 48px));
  padding: 5px 10px;
  border-radius: 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 1px 6px rgba(0, 0, 0, 0.1);
}
.tabbar.is-compact .tab { min-height: 40px; padding: 6px 0; }
.tabbar.is-compact .tab .icon { width: 22px; height: 22px; }
.tabbar.is-compact .tab-label { opacity: 0; max-height: 0; }

@media (prefers-reduced-motion: reduce) {
  .tabbar, .tab, .tab .icon, .tab-label { transition: none; }
}

/* ---------- Filter sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.35);
  align-items: flex-end;
}
.sheet {
  width: 100%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--sheet-bg);
  border-radius: 26px 26px 0 0;
}
.sheet-grip {
  width: 36px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--sheet-grip);
  margin: 8px auto 0;
  touch-action: none;
}
.sheet-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 16px 14px;
}
.sheet-reset { font-size: 15px; color: var(--blue); justify-self: start; }
.sheet-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.sheet-close {
  justify-self: end;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--sheet-close-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.sheet-close .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.sheet-body { flex: 1; overflow: auto; padding: 0 16px 24px; -webkit-overflow-scrolling: touch; }
.sheet-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-faint);
  padding: 22px 4px 8px;
}
.sheet-body > .sheet-label:first-child { padding-top: 6px; }
.sheet-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 22px));
  background: var(--sheet-foot-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--minset-line);
}

/* Chips, picks and segmented controls inside the sheet */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--minset-line);
  color: var(--ink);
  cursor: pointer;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip:has(input:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: 2px; }

.pick-row { display: flex; gap: 8px; }
.pick {
  position: relative;
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 9px 0;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--minset-line);
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 500; }
.pick:has(input:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: 2px; }

.mseg {
  height: 34px;
  border-radius: 9px;
  background: var(--seg-bg);
  padding: 2px;
  display: flex;
  gap: 2px;
}
.mseg-item {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  min-width: 0;
}
.mseg-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mseg-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.mseg-item:has(input:checked) {
  background: var(--seg-on);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.mseg-item:has(input:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: 2px; }

/* Minimum-match slider */
.slider-card {
  background: var(--card);
  border: 1px solid var(--minset-border);
  border-radius: 14px;
  padding: 14px 16px 10px;
}
.slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.slider-value { color: var(--ink); font-weight: 600; }
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: none;
  margin: 0;
}
.slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--blue) var(--fill, 0%), var(--slider-track) var(--fill, 0%));
}
.slider::-moz-range-track { height: 4px; border-radius: var(--r-pill); background: var(--slider-track); }
.slider::-moz-range-progress { height: 4px; border-radius: var(--r-pill); background: var(--blue); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  border: 0;
}
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  border: 0;
}

/* Full-width pill CTA used by the sheet, the empty state and the detail bar */
.btn-pill-lg {
  width: 100%;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- Sheet + card motion ---------- */
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { from { transform: none; } to { transform: translateY(100%); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }

html.js .sheet-backdrop:not([hidden]) { animation: backdrop-in 0.24s ease-out both; }
html.js .sheet-backdrop:not([hidden]) .sheet { animation: sheet-in 0.32s cubic-bezier(0.32, 0.72, 0, 1) both; }
html.js .sheet-backdrop.closing { animation: backdrop-out 0.24s ease-in both; }
html.js .sheet-backdrop.closing .sheet { animation: sheet-out 0.24s ease-in both; }

/* ---------- Phone breakpoint: swap the desktop board for the mobile one ---------- */
@media (max-width: 734px) {
  .mtitle { display: block; }
  .mboard { display: block; }
  /* No global nav on phones: identity lives on the Profile tab, navigation on
     the tab bar, and the detail page brings its own back bar. */
  body:has(.tabbar) .global-nav { display: none; }
  .tabbar { display: flex; }
  .mfilter { display: inline-flex; }
  .mseg-view { display: flex; }
  .sheet-backdrop:not([hidden]) { display: flex; }

  /* Desktop board furniture is off: stage stats, selects, view switch, table,
     kanban and the black global nav's links all live on the tab bar or in the
     filter sheet now. */
  .board-page .pipeline-summary,
  .board-page .stats,
  .board-page .filters-right,
  .board-page .table-wrap,
  .board-page .kanban { display: none; }

  .board-page .filters {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    gap: 8px;
    align-items: center;
  }
  .board-page .search-wrap { grid-column: 1; }
  .board-page .search-input {
    height: var(--control-h);
    border-radius: 10px;
    border: 0;
    background: var(--mfield-bg);
    font-size: 15px;
    letter-spacing: -0.01em;
  }

  .page.board-page { padding-top: 14px; }

  /* Room for the floating tab bar, and no desktop footer under it. */
  body:has(.tabbar) main { padding-bottom: calc(104px + env(safe-area-inset-bottom, 34px)); }
  body:has(.tabbar) .footer { display: none; }

  /* Empty state (design 1h) */
  .empty-first { min-height: 60vh; justify-content: center; }
  .empty-art {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: var(--chip-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--empty-art-ink);
  }
  .empty-art .icon { width: 40px; height: 40px; stroke-width: 1.4; }
  .empty-first .empty-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
  .empty-first .empty-sub { font-size: 15px; line-height: 1.4; max-width: 280px; }
  .empty-first .btn-primary {
    height: 50px;
    padding: 0 26px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 14px;
  }
  .empty-alt { font-size: 15px; color: var(--blue); margin-top: 6px; }
}

@media (min-width: 735px) {
  .empty-art, .empty-alt { display: none; }
}

/* ============================================================
   Profile & settings — iOS grouped lists (design 1g)
   Phone-first; on wide screens the same cards sit in a reading column.
   ============================================================ */

.profile-page { width: 100%; max-width: 640px; }
.mtitle-always { display: block; }

.group-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-faint);
  margin: 24px 4px 8px;
}
.group-note { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 0 0 12px; }

.inset-card,
.inset-list {
  background: var(--card);
  border: 1px solid var(--minset-border);
  border-radius: 14px;
}
.inset-card { padding: 14px; }
.inset-list { overflow: hidden; }

.identity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 16px;
}
.avatar {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--canvas);
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.identity-text { flex: 1; min-width: 0; }
.identity-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.identity-email { font-size: 13px; color: var(--muted-faint); overflow: hidden; text-overflow: ellipsis; }
.identity-go { color: var(--muted-faint); display: flex; align-items: center; min-height: 44px; }
.identity-go .icon { width: 16px; height: 16px; stroke-width: 2; }

.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat-tile {
  background: var(--card);
  border: 1px solid var(--minset-border);
  border-radius: 14px;
  padding: 12px;
}
.stat-tile-num { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.stat-tile-num.accent { color: var(--blue); }
.stat-tile-label { font-size: 11px; color: var(--muted-faint); }


/* Appearance: iOS segmented control (enclosed track, filled active thumb) */
.theme-seg {
  display: flex;
  gap: 2px;
  height: 34px;
  padding: 2px;
  border-radius: 9px;
  background: var(--seg-bg);
}
.theme-seg button {
  flex: 1;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.theme-seg button.active {
  background: var(--seg-on);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.theme-seg button:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 2px; }
.theme-seg button:disabled { opacity: 0.42; cursor: not-allowed; }
.setting-note { margin: 10px 2px 0; color: var(--muted-faint); font-size: 12px; line-height: 1.4; }
.setting-note-top { margin-top: 0; }

/* Profile → Salary currency: mode switch plus the global default. */
.salary-card { padding: 16px; }
.salary-currency-row { margin-top: 12px; }
.salary-currency-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.salary-currency-label .select { flex: none; min-width: 150px; }

/* Profile Skills uses the same grouped settings language as Profile: inset
   surfaces, compact controls and one blue action hierarchy. */
.settings-intro { color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 520px; }
.selected-skill-count { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.profile-skills-card .skill-chips { height: auto; min-height: 34px; max-height: 150px; }
.settings-actions { display: flex; justify-content: flex-end; margin: 12px 0 0; }
.suggestion-chips, .cv-skill-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.suggestion-chips { margin-top: 12px; }
.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-pill);
  background: var(--pearl);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.suggestion-chip .icon { width: 13px; height: 13px; color: var(--blue); stroke-width: 2; }
.suggestion-chip span { color: var(--muted-faint); font-size: 10px; }
.suggestion-chip:hover { border-color: var(--blue); background: var(--ghost-hover-bg); }
.suggestion-chip:disabled { opacity: 0.42; cursor: default; }
.board-suggestions-details { margin-top: 2px; }
.board-suggestions-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.board-suggestions-details summary::-webkit-details-marker { display: none; }
.board-suggestions-details summary::after { content: "+"; color: var(--blue); font-size: 18px; }
.board-suggestions-details[open] summary::after { content: "−"; }
.board-suggestions-details summary span { margin-left: auto; color: var(--muted-faint); font-size: 11px; }
.board-suggestions-details .suggestion-card { margin-top: 4px; }
.cv-workflow-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.cv-workflow-note strong { color: var(--ink); }
.attached-cv-section .existing-cv-form { border-style: dashed; background: var(--pearl); }
.cv-skills-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cv-skills-head > .icon { width: 22px; height: 22px; color: var(--blue); }
.cv-skills-head > span { min-width: 0; display: flex; flex-direction: column; }
.cv-skills-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cv-skills-head small { color: var(--muted-faint); font-size: 11px; }
.cv-skill-chips { margin-top: 12px; }
.cv-skill-chips .skill-chip { padding-right: 14px; }
.cv-source-list { margin-top: 10px; }
.existing-cv-form { display: flex; gap: 10px; align-items: center; }
.existing-cv-form .select { flex: 1; min-width: 0; }
.existing-cv-form .btn { flex: none; border-radius: var(--button-radius-standard); }

/* Grouped rows: 44px minimum, hairline between, tappable whole row */
.inset-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  min-height: 48px;
  color: var(--ink);
  border-bottom: 0.5px solid var(--minset-line);
  margin: 0;
  position: relative;
}
.inset-list > *:last-child { border-bottom: 0; }
.inset-row-tap { cursor: pointer; }
.inset-row:active { background: var(--hover-bg); }
.inset-main { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.inset-title { font-size: 15px; color: var(--ink); }
.inset-sub { font-size: 12px; color: var(--muted-faint); }
.inset-detail { font-size: 13px; color: var(--muted-faint); flex: none; }
.inset-icon { width: 20px; height: 20px; flex: none; color: var(--blue); }
.inset-icon.danger, .inset-title.danger { color: var(--danger); }
.inset-go { width: 14px; height: 14px; flex: none; color: var(--muted-faint); stroke-width: 2; }
.inset-action {
  flex: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px 0;
  min-height: 32px;
}
.inset-action.danger { color: var(--danger); }
/* The radio is the row: it drives the checkmark and stays reachable by keyboard. */
.inset-row input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.inset-check { width: 15px; height: 15px; flex: none; color: var(--blue); stroke-width: 2.6; visibility: hidden; }
.inset-row:has(input:checked) .inset-check { visibility: visible; }
.inset-row:has(input:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: -2px; }
/* File input is invisible but still the control; the label is what you see. */
.inset-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inset-row:has(.inset-file:focus-visible) { outline: 2px solid var(--blue-focus); outline-offset: -2px; }
/* The focus outline follows the row's own shape, so edge rows need the card's
   corner radii — otherwise the outline's square corners poke outside the
   rounded card, as seen on the mobile form's first row. */
.inset-list > .inset-row:first-child {
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
}
.inset-list > .inset-row:last-child {
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 13px;
}

.signout-card {
  display: block;
  text-align: center;
  font-size: 15px;
  color: var(--danger);
  margin-top: 24px;
  min-height: 48px;
  line-height: 20px;
}
.profile-fine { text-align: center; font-size: 11px; color: var(--muted-faint); padding: 14px 0 0; }

/* ============================================================
   Job detail — phone arrangement (design 3c/3d)
   ============================================================ */

.mdetail { display: none; }

.mdetail-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px;
  padding: 10px 16px;
  background: var(--mbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--minset-border);
}
.mdetail-back { display: flex; align-items: center; gap: 4px; color: var(--blue); font-size: 17px; min-height: 44px; }
.mdetail-back .icon { width: 17px; height: 17px; stroke-width: 2.4; }
.mdetail-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--blue);
}
.mdetail-edit .icon { width: 18px; height: 18px; stroke-width: 1.7; }

.mdetail-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 16px;
}
.mdetail-hero-text { flex: 1; min-width: 0; }
/* Match ring on the right of the header, vertically centered, 64px. The arc
   stays Action Blue here; bare number over a MATCH caption, never a %. */
.mring-dhero { width: 64px; height: 64px; flex: none; }
.mring-dhero .mring-value { flex-direction: column; font-size: 17px; line-height: 1; letter-spacing: -0.02em; }
.mring-dhero .mring-unit {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-faint);
}
.mdetail-company { font-size: 13px; color: var(--muted-faint); }
.mdetail-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 2px 0 0;
}
.mdetail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mdetail-chip,
.mdetail-stage select {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--chip-bg);
  border: 0;
  border-radius: var(--r-pill);
  padding: 4px 9px;
  line-height: 1.4;
}
/* The current stage doubles as the stage picker: an accent chip that opens the
   native list, so every stage stays reachable on a phone. The select is
   transparent and stretched over the chip, so the chip's width follows the
   current stage instead of the longest option. */
.mdetail-stage { position: relative; display: inline-flex; margin: 0; }
.mdetail-chip-stage { background: var(--blue); color: #fff; }
.mdetail-stage select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  font: inherit;
  cursor: pointer;
}
.mdetail-stage:has(select:focus-visible) .mdetail-chip-stage {
  outline: 2px solid var(--blue-focus);
  outline-offset: 2px;
}
.mdetail-loc { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted-faint); margin-top: 8px; }
.mdetail-loc .icon { width: 13px; height: 13px; }

.mtiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.mtile { background: var(--card); border: 1px solid var(--minset-border); border-radius: 14px; padding: 12px; }
.mtile-label { font-size: 11px; color: var(--muted-faint); }
.mtile-value { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-top: 2px; }
.mtile-note { font-size: 11px; color: var(--muted-faint); }

/* Pipeline timeline: dot rail on the left, connector between dots.
   The rail is 3px wider than the dot on each side so the current step's
   halo (box-shadow 3px) is never sliced by the window's overflow clip;
   the gap is tightened by the same 6px so the text column stays put. */
.mtimeline { padding: 14px 16px 2px; }
.mstep { display: flex; gap: 6px; align-items: stretch; }
.mstep-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 24px; }
.mstep-dot {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ring-track);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.mstep-dot .icon { width: 10px; height: 10px; stroke-width: 3.4; }
.mstep-line { flex: 1; width: 1.5px; min-height: 22px; background: var(--ring-track); }
.mstep.current .mstep-dot { border-color: var(--blue); box-shadow: 0 0 0 3px var(--ring-soft); }
.mstep-text { flex: 1; padding-bottom: 12px; }
.mstep-name { font-size: 14.5px; line-height: 1.2; color: var(--ink); }
.mstep.current .mstep-name { font-weight: 600; }
.mstep:not(.reached) .mstep-name { color: var(--muted); }
.mstep-date { font-size: 11.5px; color: var(--muted-faint); margin-top: 2px; }

/* Collapsible pipeline: half the path shows behind a pure gradient fade —
   no box-shadows. Early anchor → first steps with the fade at the bottom
   above the toggle strip; late anchor → last steps with the fade on top.
   The 34px toggle strip stays pinned at the bottom. */
.mtimeline { position: relative; overflow: hidden; padding: 14px 16px 0; }
.mtimeline-window { overflow: hidden; }
/* First/last breathing room for the current halo at the clipped edges. */
.mtimeline-window > .mstep:first-child { padding-top: 4px; }
.mtimeline-window > .mstep:last-child { padding-bottom: 4px; }
.mtimeline-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 70px;
  pointer-events: none;
}
.mtimeline[data-pos="start"] .mtimeline-fade {
  bottom: 34px;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--card) 0%, transparent),
    color-mix(in srgb, var(--card) 60%, transparent) 45%,
    color-mix(in srgb, var(--card) 92%, transparent) 78%,
    var(--card));
}
.mtimeline[data-pos="end"] .mtimeline-fade {
  top: 0;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--card) 0%, transparent),
    color-mix(in srgb, var(--card) 60%, transparent) 45%,
    color-mix(in srgb, var(--card) 92%, transparent) 78%,
    var(--card));
}
.mtimeline.open .mtimeline-fade { display: none; }
.mtimeline-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  border: 0;
  background: var(--card);
  color: var(--blue);
  cursor: pointer;
  padding: 0;
}
.mtimeline-toggle .icon { width: 18px; height: 18px; stroke-width: 2.4; transition: transform 0.2s ease; }
.mtimeline.open .mtimeline-toggle .icon { transform: rotate(180deg); }

.mskills { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.mskill {
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--muted);
  background: var(--chip-bg);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 5px 10px;
}
/* Skills the profile covers — this is what the match ring counted. */
.mskill.on { color: var(--blue); background: var(--ghost-hover-bg); border-color: var(--ring-soft); }
.mskills-note { margin: 8px 4px 0; }

.mprose { position: relative; font-size: 14px; line-height: 1.5; color: var(--ink); padding: 14px; }
.mprose .prewrap {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mprose .description-content {
  display: block;
  max-height: 9em;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}
.mprose.open .description-content,
.mprose.clamp-off .description-content { max-height: none; overflow: visible; }
.mprose.open .prewrap { display: block; overflow: visible; }
.mprose-more {
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  padding: 4px 0 0;
  cursor: pointer;
  min-height: 32px;
}
.mprose.clamp-off .prewrap { display: block; overflow: visible; }

/* Floating detail actions: same Instagram-like pill treatment as the tab bar —
   full-size at the top of the page, compact once the user scrolls. */
.mdetail-actions {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 45;
  width: min(430px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 30px;
  background: var(--card);
  border: 1px solid var(--mcard-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: width 0.25s ease, padding 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease;
}
.mdetail-actions.is-compact {
  width: min(340px, calc(100% - 48px));
  padding: 5px 8px;
  border-radius: 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 1px 6px rgba(0, 0, 0, 0.1);
}
.mdetail-actions.is-compact .btn-pill-lg { height: 42px; font-size: 15px; }
.mdetail-actions.is-compact .mdetail-delete { width: 42px; height: 42px; }
.mdetail-actions.is-compact .mdetail-final { height: 42px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .mdetail-actions, .mdetail-actions .btn-pill-lg, .mdetail-delete, .mdetail-final { transition: none; }
}
.mdetail-advance { flex: 1; margin: 0; }
.mdetail-advance .btn,
.mdetail-final,
.mdetail-delete {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.12);
}
.mdetail-final {
  flex: 1;
  height: 50px;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mdetail-delete {
  width: 50px;
  height: 50px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--danger-float-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.mdetail-delete .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.mdetail-actions .btn-pill-lg, .mdetail-delete, .mdetail-final {
  transition: height 0.25s ease, font-size 0.25s ease, width 0.25s ease;
}

.inset-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 734px) {
  /* Phone browsers use overlay scrollbars; don't reserve a desktop scrollbar
     gutter that makes every mobile panel narrower and visually off-center. */
  html { scrollbar-gutter: auto; }
  .mdetail { display: block; }
  /* Desktop detail furniture off — the phone layout carries all of it. */
  .detail-page .detail { display: none; }
  /* Auto side margins otherwise shrink this flex child to its content width. */
  .detail-page.page { width: 100%; padding-top: 0; }
  /* The tab bar is replaced by the detail action bar on this page. */
  body:has(.mdetail) .tabbar { display: none; }
  body:has(.mdetail) main { padding-bottom: calc(104px + env(safe-area-inset-bottom, 34px)); }
}

/* ---------- Salary field (both layouts) ---------- */
.salary-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.salary-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.salary-row input[type="text"] { flex: 1; min-width: 0; }
.salary-seg { flex: none; width: 162px; height: 32px; border-radius: 8px; }
.salary-seg .mseg-item { border-radius: 6px; font-size: 12px; }
/* Per-job currency dropdown sits between the amount and the period segment. */
.salary-currency { flex: none; }
.salary-row .salary-currency { width: auto; min-width: 66px; height: 32px; font-size: 13px; padding: 0 20px 0 8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-position: right 4px center; background-repeat: no-repeat; background-size: 11px; }
/* Themed chevron to match .select in dark mode (same ink as its override). */
[data-theme="dark"] .salary-row .salary-currency { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
/* Four controls live in this row now (amount, currency, period, egg). */
.salary-field { grid-column: 1 / -1; }

/* Golden egg: hatches a face for magic monthly numbers, hidden otherwise. */
.salary-egg {
  display: none;
  flex: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  white-space: nowrap;
  background: radial-gradient(circle at 32% 28%, #ffe9a8 0%, #f7c948 45%, #d99406 100%);
  border: 1px solid rgba(146, 96, 0, 0.35);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(146, 96, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.55);
  cursor: default;
  user-select: none;
}
.salary-egg.on { display: inline-flex; animation: egg-pop 0.25s ease-out; }
@keyframes egg-pop {
  from { transform: scale(0.6); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .salary-egg.on { animation: none; }
}

/* ============================================================
   Add / edit form on phones — the designed sheet (design 1f)
   Its own markup (views/partials/mobile-form.ejs) rather than a reflow of the
   desktop form: segmented controls, grouped sections and a Cancel/Save header
   cannot be produced from the desktop field order with CSS alone.
   ============================================================ */

.mform { display: none; }

@media (max-width: 734px) {
  .mform { display: block; }
  /* The sheet carries its own Cancel/Save bar, so the tab bar steps aside —
     the same rule the detail page's action bar uses. */
  body:has(.form-page .mform) .tabbar { display: none; }
  body:has(.form-page .mform) main { padding-bottom: 24px; }
  .form-page.page { padding-top: 0; }
  /* The desktop form is a separate <form>, so hiding it also takes its
     required fields out of validation. */
  .form-page .job-form,
  #add-modal .job-form { display: none; }

  .mform-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin: 0 -16px;
    padding: 10px 16px;
    background: var(--mbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--minset-border);
  }
  .mform-cancel,
  .mform-save {
    border: 0;
    background: none;
    font: inherit;
    font-size: 17px;
    color: var(--blue);
    cursor: pointer;
    padding: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .mform-cancel { justify-self: start; }
  .mform-cancel:hover { text-decoration: none; }
  .mform-save { justify-self: end; font-weight: 600; }
  .mform-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }

  .mform-body { padding-bottom: 40px; }

  /* Paste-a-link row with the fetch button on the trailing edge */
  .mlink {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--minset-border);
    border-radius: 14px;
  }
  .mlink-icon { width: 18px; height: 18px; flex: none; color: var(--muted-faint); }
  .mlink input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    text-overflow: ellipsis;
  }
  .mlink input:focus { outline: none; }
  .mlink-fetch {
    flex: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
  }
  .mlink-fetch .icon { width: 17px; height: 17px; stroke-width: 1.6; }
  .mlink-fetch[disabled] { opacity: 0.5; }
  .mform-hint { font-size: 12px; line-height: 1.45; color: var(--muted-faint); margin: 8px 4px 0; }
  .mform-sites { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; white-space: nowrap; }
  .mform-sites .tip-sites::after { left: -160px; right: auto; box-sizing: border-box; width: min(220px, calc(100vw - 48px)); white-space: normal; }

  /* Grouped rows: label leading, value trailing */
  .mform-group .mrow { gap: 10px; }
  .mrow-label { flex: none; width: 84px; font-size: 15px; color: var(--muted); }
  .mrow > input[type="text"],
  .mrow > input[type="url"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
  }
  .mrow > input:focus { outline: none; }
  .mrow .mseg-tiny { flex: none; width: 120px; height: 28px; border-radius: 8px; }
  .mrow .mseg-tiny .mseg-item { border-radius: 6px; font-size: 12px; }
  /* Salary carries amount + currency + 3-way period + egg: two lines on phones. */
  .mrow-salary { flex-wrap: wrap; row-gap: 10px; }
  .mrow-salary .salary-currency { margin-left: auto; }
  .mrow .salary-currency {
    flex: none;
    height: 28px;
    max-width: 76px;
    padding: 0 20px 0 8px;
    border: 1px solid var(--hairline-soft);
    border-radius: 8px;
    background-color: var(--card-high);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 10px;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  .mform-hint .icon { width: 12px; height: 12px; stroke-width: 2.2; vertical-align: -1px; }

  /* Stage: native picker, value right-aligned with a chevron after it */
  .mrow-picker select {
    flex: 1;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--muted);
    text-align: right;
    text-align-last: right;
    cursor: pointer;
  }
  .mrow-chevron { width: 13px; height: 13px; flex: none; color: rgba(120, 120, 128, 0.6); stroke-width: 2; }

  /* Dates read as tinted value pills, per the design */
  .mrow-date { justify-content: space-between; }
  .mrow-date .datefield { flex: none; }
  .mrow-date .datefield-btn {
    border: 0;
    background: var(--cv-accent-bg);
    color: var(--blue);
    border-radius: 7px;
    padding: 3px 9px;
    min-height: 28px;
    font-size: 15px;
    justify-content: flex-end;
  }
  .mrow-date .datefield-btn .icon { display: none; }
  .mrow-date input[type="date"] {
    flex: none;
    border: 0;
    background: var(--cv-accent-bg);
    color: var(--blue);
    border-radius: 7px;
    padding: 3px 9px;
    font: inherit;
    font-size: 15px;
  }

  /* Work: label + segmented control per row */
  .mform-work { display: flex; flex-direction: column; gap: 12px; }
  .mrow-seg { display: flex; align-items: center; gap: 10px; margin: 0; }
  .mrow-seg .mseg { flex: 1; min-width: 0; height: 32px; border-radius: 9px; }
  .mrow-seg .mseg-item { font-size: 12.5px; }
  .mrow-seg-text input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
  }
  .mrow-seg-text .mrow-label {
    flex: 0 1 45%;
    width: auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }
  .mrow-seg-text input:focus { outline: none; }

  /* Skills: chips with a remove ×, then an inline "Add skill…" field */
  .mskills-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; }
  .mskills-edit .skill-chips { display: contents; }
  .mskill-add {
    flex: 1;
    min-width: 96px;
    border: 0;
    background: none;
    padding: 5px 2px;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
  }
  .mskill-add:focus { outline: none; }

  .mform-prose { display: flex; flex-direction: column; gap: 14px; }
  .mform-prose label { display: block; }
  .mprose-label {
    display: block;
    font-size: 12px;
    color: var(--muted-faint);
    margin-bottom: 4px;
  }
  .mform-prose textarea {
    width: 100%;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    resize: vertical;
  }
  .mform-prose textarea:focus { outline: none; }

  .mcv .cv-upload-field {
    border-style: dashed;
    border-radius: 14px;
    padding: 14px;
  }

  /* The add-application modal becomes a full-screen sheet. Scoped to #add-modal
     on purpose: the confirm alert shares .modal-backdrop and must stay a
     centred alert box. */
  #add-modal { padding: 0; align-items: stretch; }
  #add-modal .modal-card {
    max-width: none;
    height: 100%;
    overflow: auto;
    background: var(--parchment);
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
  }
  body:has(#add-modal:not([hidden])) .tabbar { display: none; }
  /* Alert stays an alert: centred, hugging its content. */
  #confirm-dialog { align-items: center; padding: 16px; }
  #confirm-dialog .alert-card { max-width: 340px; }
}

/* ============================================================
   Sign in / sign up / reset (design 4b, 4d, 4e)
   Standalone pages: no global nav, no tab bar — one column, centred.
   ============================================================ */

.auth-body { background: var(--canvas); }
.auth-page {
  width: 100%;
  max-width: 402px;
  margin: 0 auto;
  padding: 72px 20px 40px;
}
.auth-wordmark {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.auth-wordmark:hover { text-decoration: none; }
.auth-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 44px 0 0;
}
.auth-lead { font-size: 15px; color: var(--muted); margin: 8px 0 0; }

/* Federated buttons. Apple keeps its black-on-white / white-on-black rule.
   Vertical full-width stack, so the 12px rect rather than the capsule. */
.auth-sso { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.sso {
  position: relative;
  height: 52px;
  border-radius: var(--button-radius-standard);
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.sso:hover { text-decoration: none; }
.sso span { flex: 1; text-align: center; padding: 0 34px; }
.sso-mark { position: absolute; left: 18px; width: 22px; height: 22px; }
.sso-apple { background: #000; color: #fff; border: 1px solid #000; }
.sso-apple .sso-mark { color: #fff; }
.sso-google { background: #fff; color: #1d1d1f; border: 1px solid rgba(0, 0, 0, 0.2); }
.sso-other { background: var(--card); color: var(--ink); border: 1px solid var(--hairline); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--minset-line); }
.auth-divider span { font-size: 12px; color: var(--muted-faint); }

.auth-notice,
.auth-error {
  font-size: 13px;
  line-height: 1.45;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 18px 0 0;
}
.auth-notice { background: var(--ghost-hover-bg); color: var(--blue); }
.auth-error { background: var(--danger-bg); color: var(--danger); }

.auth-form { margin-top: 26px; }

/* Grouped field card: caption above the value, hairline between rows */
.field-card {
  background: var(--card);
  border: 1px solid var(--minset-line);
  border-radius: 14px;
  overflow: hidden;
}
.field-row {
  display: block;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--minset-line);
}
.field-card > *:last-child { border-bottom: 0; }
.password-guidance {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 0.5px solid var(--minset-line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.field-name { display: block; font-size: 11px; color: var(--muted-faint); }
.field-inline-error {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}
.field-inline-error-block { padding: 0 14px 10px; margin-top: 0; }
.field-row input[aria-invalid="true"] { color: var(--danger); }
.field-row input {
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  margin-top: 2px;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  min-height: 24px;
}
.field-row input:focus { outline: none; }
.field-row:focus-within { background: var(--hover-bg); }
.field-static { display: block; font-size: 17px; color: var(--muted); margin-top: 2px; }
.field-row-pw { display: flex; align-items: flex-end; gap: 10px; }
.field-row-pw .field-row-main { flex: 1; min-width: 0; }
.pw-eye {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.pw-eye .icon { width: 20px; height: 20px; stroke-width: 1.6; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 14px;
}
.auth-check { display: flex; align-items: center; gap: 8px; color: var(--ink); cursor: pointer; }
.auth-row a { font-size: 14px; }
.auth-fine { font-size: 12px; line-height: 1.5; color: var(--muted-faint); margin: 12px 4px 0; }

/* Auth screens stack their buttons vertically, so both tiers take the 12px
   rect instead of the capsule — same rule as the SSO buttons below. */
.auth-cta { margin-top: 22px; border-radius: var(--button-radius-standard); }
.auth-alt {
  display: flex;
  margin-top: 22px;
  border: 1px solid var(--hover-border);
  border-radius: var(--button-radius-standard);
  color: var(--blue);
  font-weight: 500;
  background: none;
}
.auth-alt:hover { background: var(--ghost-hover-bg); text-decoration: none; }
.auth-textbtn {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 15px;
  padding: 14px 0 0;
  cursor: pointer;
  min-height: 44px;
}
.auth-legal {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 13px;
  margin-top: 40px;
}
.auth-legal a { color: var(--muted); }

/* ---------- Not found ---------- */
.not-found-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
  padding-block: clamp(72px, 14vh, 180px);
}
.not-found-content { max-width: 980px; text-align: center; }
.not-found-content h1 {
  margin: 0;
  font-size: clamp(36px, 6.1vw, 88px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.not-found-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 500;
}
.not-found-home .icon { width: 1em; height: 1em; stroke-width: 1.8; }
.not-found-links { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; margin-top: clamp(40px, 8vh, 96px); }
.not-found-secondary-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px 26px; }
.not-found-secondary { color: var(--blue); font-size: 16px; font-weight: 500; }
.faq-support { margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.faq-support h2 { margin-bottom: 6px; }
.faq-support p { margin: 0; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sso-apple { background: #000; border-color: rgba(255, 255, 255, 0.35); }
  :root:not([data-theme="light"]) .sso-google { background: #131314; color: #fff; border-color: rgba(255, 255, 255, 0.2); }
}
[data-theme="dark"] .sso-apple { background: #000; border-color: rgba(255, 255, 255, 0.35); }
[data-theme="dark"] .sso-google { background: #131314; color: #fff; border-color: rgba(255, 255, 255, 0.2); }

/* ---------- Marketing site on phones (design 4a / 4c) ---------- */
@media (max-width: 734px) {
  .tile-light .hero { padding: 26px 0 40px; text-align: left; }
  .hero-title { font-size: 36px; letter-spacing: -0.025em; line-height: 1.08; }
  .hero-lead { font-size: 17px; line-height: 1.45; margin-top: 14px; }
  /* Stacked full-width pills, primary first — the phone CTA pattern. */
  .hero-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
  .hero-cta .btn {
    width: 100%;
    height: 50px;
    padding: 0 22px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .hero-cta .btn-ghost { font-weight: 500; border: 1px solid var(--hover-border); }
  .tile-dark .hero-cta .btn-ghost { border-color: rgba(255, 255, 255, 0.28); color: var(--blue-on-dark); }
  .landing-preview { margin-top: 30px; border-radius: 16px; }
  .landing-preview-toolbar { min-height: 40px; grid-template-columns: 1fr auto 1fr; gap: 6px; padding: 0 10px; font-size: 9px; }
  .landing-preview-action { padding: 5px 7px; }
  .landing-preview-stats { gap: 5px; padding: 10px 10px 2px; font-size: 9px; }
  .landing-preview-stats span { gap: 4px; padding: 4px 6px; }
  .landing-preview-board { grid-template-columns: 1fr; gap: 6px; padding: 8px 10px 12px; }
  .landing-preview-column { display: grid; grid-template-columns: 66px repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px; padding: 6px; }
  .landing-preview-column h2 { margin: 0; font-size: 9px; }
  .landing-preview-column article { min-height: 48px; margin: 0; padding: 6px; }
  .landing-preview-column article b { font-size: 9px; }
  .landing-preview-column article small, .landing-preview-column article > span { font-size: 8px; }
  .landing-preview figcaption { padding: 0 10px 10px; font-size: 9px; }
  .landing-reassurance { flex-direction: column; gap: 8px; padding: 22px 18px; }
  .landing-reassurance p, .landing-reassurance a { font-size: 13px; line-height: 1.45; }
  .not-found-links { gap: 16px; margin-top: 36px; }
  .not-found-home { font-size: 20px; }
  .not-found-secondary-links { gap: 12px 20px; }
  .not-found-secondary { font-size: 14px; }

  .tile-head { font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; }
  .tile-sub { font-size: 15px; margin-top: 6px; }

  /* Feature cards: white tiles on the parchment band */
  .features { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
  .feature {
    background: var(--card);
    border: 1px solid var(--hairline-soft);
    border-radius: var(--r-lg);
    padding: 16px;
  }
  .feature h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
  .feature p { font-size: 14px; line-height: 1.45; margin: 0; }

  .pipeline-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
  .pipeline-chip { font-size: 13px; padding: 7px 13px; }
}

/* Keep the desktop handoff overrides after the phone-first profile rules. */
@media (min-width: 735px) {
  .profile-page.skill-profile-page { max-width: 1000px; }
  .profile-page .stat-tiles { display: none; }
  .profile-skills-card .skill-chips { max-height: none; overflow: visible; }
  .skills-workbench .existing-cv-form { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
}

@media (min-width: 735px) and (max-width: 833px) {
  .filters { grid-template-columns: minmax(0, 1fr) max-content; }
  .filters-right { grid-column: 2; grid-row: 2; }
}

/* MCP account settings and temporary CV transfers. */
.mcp-page { width:100%; max-width:680px; margin-inline:auto; }
.mcp-card { display:block; padding:24px; margin-block:20px; }
.mcp-card h2 { font-size:20px; margin-bottom:12px; }
.mcp-card p { margin-block:12px; line-height:1.5; overflow-wrap:anywhere; }
.mcp-card select, .mcp-card textarea { display:block; width:100%; max-width:100%; margin-block:12px; }
.mcp-card textarea { font-family:ui-monospace,monospace; font-size:12px; padding:12px; resize:vertical; }
.mcp-actions { display:flex; gap:12px; flex-wrap:wrap; }
.mcp-card form input { display:block; max-width:100%; margin-block:16px; }
@media(max-width:734px) { .mcp-card {padding:18px;} }

.profile-page.mcp-page { max-width:680px; }
.mcp-card select, .mcp-card textarea { background:var(--mfield-bg); color:var(--ink); border:1px solid var(--hairline); border-radius:12px; }
.mcp-card select { min-height:44px; padding:10px 12px; font:inherit; }
.mcp-card :is(select, textarea):focus-visible { outline:2px solid var(--blue-focus); outline-offset:3px; }

/* The shared filter sheet replaces the three desktop dropdowns. */
@media (min-width: 735px) {
  .board-page .filters {
    grid-template-columns: minmax(240px, 420px) max-content minmax(0, 1fr) max-content;
  }
  .board-page .filters-right { grid-column: 4; }
  .board-page .mfilter {
    display: inline-flex;
    width: auto;
    gap: 8px;
    padding: 0 14px;
    border-radius: var(--r-pill);
  }
  .board-page .mfilter-label { display: inline; font-size: 14px; font-weight: 600; }
  .board-page .sheet-backdrop:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .board-page .sheet {
    width: min(100%, 520px);
    max-height: min(82vh, 760px);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  }
}
@media (min-width: 735px) and (max-width: 833px) {
  .board-page .filters { grid-template-columns: minmax(0, 1fr) max-content; }
  .board-page .search-wrap { grid-column: 1 / -1; }
  .board-page .filters-right { grid-column: 2; grid-row: 2; }
}

/* The language menu uses native names and remains usable without JavaScript. */
.language-select { margin: 0; position: relative; }
.language-select label { display: flex; align-items: center; gap: 12px; }
.language-select:not(.language-select-settings) select {
  height: var(--control-h);
  max-width: 180px;
  padding: 0 32px 0 13px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-pill);
  background-color: var(--seg-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.language-select:not(.language-select-settings) select:hover { border-color: var(--hover-border); background-color: var(--seg-on); }
.language-select:not(.language-select-settings) select:focus-visible { outline: none; border-color: var(--blue-focus); box-shadow: 0 0 0 3px var(--ring-soft); }
@media (max-width: 734px) { .gnav-tagline { display: none; } .theme-seg.preference-seg { flex-wrap: wrap; } }

.mobile-language-card { margin-top: 24px; padding: 16px; }
.mobile-language-card .language-select { width: 100%; }
.mobile-language-card .language-select label { justify-content: space-between; font-size: 14px; color: var(--muted); }
.mobile-language-card .language-select select { flex: none; min-width: 150px; max-width: 55%; }

.footer-legal .language-select label > span { display: none; }
.footer-legal .language-select { margin-left: auto; }
.footer-legal .language-select select { font-size: 13px; }
@media (max-width: 833px) { .footer-legal .language-select { display: none; } }

/* Longer employment labels wrap within the existing mobile segmented controls. */
.mseg-item:has(input[name="work_type"]) > span { white-space: normal; text-overflow: clip; overflow: visible; line-height: 1.2; }
.mseg-item:has(input[name="work_type"]) { min-height: 32px; height: auto; }
@media (max-width: 833px) {
  .mrow-seg:has(input[name="work_type"]) { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .mrow-seg:has(input[name="work_type"]) .mseg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
  .mrow-seg:has(input[name="work_type"]) .mseg-item { min-height: 30px; }
}

/* Security settings reuse Profile inset cards and auth controls. */
.security-enrollment { padding: 20px; margin-top: 20px; }
.security-enrollment h2 { font-size: 20px; margin: 0 0 12px; }
.security-enrollment p { color: var(--muted); line-height: 1.5; }
.security-qr { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 12px; background: white; }
.security-secret { display: block; overflow-wrap: anywhere; user-select: all; font-size: 16px; padding: 12px 0; }
.security-otp { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.security-primary { width: 100%; margin-top: 16px; white-space: normal; }
.security-page .inset-row { gap: 12px; }
.security-page .inset-action { flex-shrink: 0; }
.security-page .inset-title, .security-page .inset-sub { overflow-wrap: anywhere; }
@media (max-width: 390px) { .security-page .inset-row { flex-wrap: wrap; } }

/* Email-first sign-in: progressive disclosure in JAMT's grouped field card. */
.auth-staged .field-row { min-height: 64px; }
.auth-staged .field-row-invalid { background: var(--danger-bg); box-shadow: inset 0 0 0 1px var(--danger); }
.auth-staged .field-row:focus-within { box-shadow: inset 0 0 0 2px var(--blue-focus); }
.auth-staged .field-row-invalid:focus-within { box-shadow: inset 0 0 0 2px var(--danger); }
.auth-staged .field-row:first-child { border-radius: 13px 13px 0 0; }
.auth-staged .field-row:last-child { border-radius: 0 0 13px 13px; }
.auth-staged .field-row:only-child { border-radius: 13px; }
.auth-staged .pw-eye { width: 44px; height: 44px; margin: -4px -6px; }
.auth-staged .auth-row { flex-wrap: wrap; }
.auth-staged .auth-row a { min-height: 44px; display: inline-flex; align-items: center; }
.auth-staged .auth-textbtn { padding: 10px 0; text-align: left; display: flex; align-items: center; }
.auth-staged-error { display: flex; align-items: flex-start; gap: 8px; background: none; padding: 0; margin: 10px 0 0; color: var(--apple-label); }
.auth-staged-error .icon { color: var(--danger); flex: none; width: 18px; height: 18px; }
.auth-staged-error[hidden] { display: none; }
[data-signin-flow] .auth-cta, [data-signin-flow] .auth-alt { width: 100%; white-space: normal; text-align: center; height: auto; min-height: 50px; padding: 12px 18px; }
[data-signin-flow] > .auth-textbtn { text-align: center; padding: 14px 0; }
[data-signin-flow] .auth-lead { line-height: 1.5; }
.auth-staged[aria-busy="true"] [data-signin-continue] { cursor: progress; }

[data-signin-password-fallback][hidden] { display: none; }

/* Settings keeps account, preferences, integrations and data in reading order. */
.settings-page.profile-page:not(.skill-profile-page) { max-width: 640px; }
.settings-page .identity-name { overflow-wrap: anywhere; }
.settings-page .stat-tiles { display: grid; }
.settings-page .settings-block { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
.settings-label { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.settings-page .theme-seg { height: 44px; }
.settings-page .theme-seg button { min-width: 0; padding: 0 5px; overflow-wrap: anywhere; }
.settings-page .setting-note { margin: 0; }
.settings-page .salary-currency-row { margin: 0; }
.settings-page .settings-language-row { padding: 16px; }
.settings-language-row .language-select-settings { width: 100%; margin: 0; }
.settings-page .settings-name-row,
.settings-page .settings-email-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.settings-name-row .inset-detail,
.settings-email-row .inset-detail { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.settings-page .verified-pill { padding: 3px 8px; border-radius: var(--r-pill); background: var(--chip-bg); color: var(--muted-faint); font-size: 12px; }
.settings-page .inset-action,
.settings-manage { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.settings-manage { gap: 6px; color: var(--blue); font-size: 14px; align-self: flex-start; }
.settings-manage .icon { width: 14px; height: 14px; }
.settings-manage[hidden] { display: none; }
.settings-name-editor { padding: 12px 16px 16px; border-bottom: 1px solid var(--minset-line); }
.settings-name-editor[hidden] { display: none; }
.settings-name-editor .field-card { margin: 0; }
.settings-name-editor .field-row { padding: 6px 12px; }
.settings-name-editor .field-row input { font-size: 16px; min-height: 22px; }
.settings-name-editor .auth-error { margin: 10px 0 0; }
.settings-name-editor .settings-actions { justify-content: flex-end; gap: 8px; }
/* Compact visuals retain a 44px hit area for touch and pointer use. */
.settings-name-editor .settings-actions .btn { position: relative; min-height: 36px; min-width: 44px; padding: 8px 12px; font-size: 14px; border-radius: var(--button-radius-standard); }
.settings-name-editor .settings-actions .btn::before { content: ''; position: absolute; inset: -4px 0; }
.settings-match-heading { position: relative; }
.settings-match-heading .settings-label { display: flex; align-items: center; min-height: 24px; padding-right: 40px; }
.settings-match-help summary { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: var(--muted); cursor: pointer; border-radius: 50%; list-style: none; }
.settings-match-help summary::-webkit-details-marker { display: none; }
.settings-match-help summary::before { content: ''; position: absolute; inset: -10px; }
.settings-match-help summary .icon { font-size: 16px; }
.settings-match-help summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.settings-match-help[open] summary { color: var(--blue); }
.settings-match-help .setting-note { margin-top: 10px; padding: 12px; border-radius: var(--r-md); background: var(--card-high); color: var(--muted); }
.settings-page .date-settings-seg button { font-size: 12px; }
.settings-language-row .language-select label { justify-content: space-between; font-size: 14px; color: var(--ink); }
.settings-language-row .language-select label > span { font-size: 14px; font-weight: 500; color: var(--ink); }
.settings-language-row .language-select select { flex: none; min-width: 150px; max-width: 60%; }
.settings-page .match-source-skills { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; margin: 0; }
.settings-page .match-source-skills > span:not([data-match-rest]),
.settings-page .match-source-skills [data-match-rest] > span { padding: 4px 12px; border: 1px solid var(--hairline-soft); border-radius: var(--r-pill); background: var(--chip-bg); font-size: 13px; }
.settings-page .match-source-skills [data-match-rest] { display: contents; }
.settings-page .match-source-skills [data-match-rest][hidden] { display: none; }
.settings-page .match-source-expand { border: 0; background: none; color: var(--blue); font: inherit; font-size: 13px; min-height: 44px; cursor: pointer; }
