/* ==========================================================================
   Ideas Careers — redesign stylesheet
   Ported from the "Ideas Production Management" design system, with the
   careers-site overrides from the redesign mockup:
     · accent ramp  = Ideas logo green (the mockup redefines the teal ramp)
     · display font = Playfair Display   · body font = Mulish
   Self-contained: this file replaces Bootstrap on pages using the
   `frontend.layouts.careers` layout. Do not load alongside bootstrap.min.css.
   ========================================================================== */

/* Playfair Display and Mulish are loaded by <link> in the page head — see
   frontend.careers.partials.fonts. They are deliberately NOT @imported here: an
   @import at the top of a stylesheet delays that stylesheet's own application
   until the imported sheet resolves, which on mobile showed as a flash of
   entirely unstyled page. */

/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
  /* Accent — Ideas logo green */
  --green-50:  #f4faea;
  --green-100: #e3f3cb;
  --green-200: #cbe89d;
  --green-300: #b0da6d;
  --green-400: #9ecf4f;
  --green-500: #8cc73a;   /* logo green */
  --green-600: #77ac2f;
  --green-700: #5f8a26;
  --green-800: #48671d;
  --green-900: #334a15;

  /* Neutrals — cool gray ramp */
  --gray-0:   #ffffff;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #0b0f17;

  /* Semantic hues */
  --red-50:  #fef2f2;  --red-100: #fee2e2;  --red-500: #ef4444;
  --red-600: #dc2626;  --red-700: #b91c1c;
  --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-500: #f59e0b;
  --amber-600: #d97706; --amber-700: #b45309;
  --blue-50: #eff6ff;  --blue-100: #dbeafe;  --blue-500: #3b82f6;
  --blue-600: #2563eb;

  /* Surfaces */
  --surface-page:    var(--gray-50);
  --surface-card:    var(--gray-0);
  --surface-sunken:  var(--gray-100);
  --surface-hover:   var(--gray-100);
  --surface-inverse: var(--gray-950);
  --surface-overlay: rgba(17, 24, 39, .55);

  /* Text */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted:     var(--gray-400);
  --text-inverse:   var(--gray-50);
  --text-on-accent: #ffffff;
  --text-link:      var(--green-700);

  /* Borders */
  --border-subtle:  var(--gray-100);
  --border-default: var(--gray-200);
  --border-strong:  var(--gray-300);
  --border-focus:   var(--green-500);

  /* Accent aliases */
  --accent:             var(--green-500);
  --accent-hover:       var(--green-600);
  --accent-active:      var(--green-700);
  --accent-soft:        var(--green-50);
  --accent-soft-border: var(--green-100);
  --accent-text:        var(--green-700);

  /* Feedback */
  --success: var(--green-600); --success-bg: var(--green-50);
  --warning: var(--amber-500); --warning-bg: var(--amber-50);
  --danger:  var(--red-500);   --danger-bg:  var(--red-50);
  --info:    var(--blue-600);  --info-bg:    var(--blue-50);

  --ring: 0 0 0 3px rgba(140, 199, 58, .32);

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Mulish', system-ui, -apple-system, sans-serif;
  --font-mono:    'Mulish', system-ui, sans-serif;

  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;

  --text-2xs: .6875rem; --text-xs: .75rem;  --text-sm: .8125rem;
  --text-base: .875rem; --text-md: 1rem;    --text-lg: 1.125rem;
  --text-xl: 1.375rem;  --text-2xl: 1.75rem; --text-3xl: 2.25rem;
  --text-4xl: 3rem;     --text-5xl: 3.75rem;

  --lh-tight: 1.1; --lh-snug: 1.25; --lh-normal: 1.45; --lh-relaxed: 1.6;
  --ls-tighter: -.02em; --ls-tight: -.01em; --ls-normal: 0;
  --ls-wide: .02em; --ls-wider: .06em;

  --type-hero:     var(--fw-bold)     var(--text-5xl)/var(--lh-tight) var(--font-display);
  --type-display:  var(--fw-bold)     var(--text-4xl)/var(--lh-tight) var(--font-display);
  --type-title:    var(--fw-semibold) var(--text-2xl)/var(--lh-snug)  var(--font-display);
  --type-heading:  var(--fw-semibold) var(--text-xl)/var(--lh-snug)   var(--font-display);
  --type-subtitle: var(--fw-medium)   var(--text-lg)/var(--lh-snug)   var(--font-sans);
  --type-body:     var(--fw-regular)  var(--text-md)/var(--lh-normal) var(--font-sans);
  --type-ui:       var(--fw-medium)   var(--text-base)/var(--lh-normal) var(--font-sans);
  --type-caption:  var(--fw-regular)  var(--text-xs)/var(--lh-normal) var(--font-sans);
  --type-mono:     var(--fw-medium)   var(--text-sm)/var(--lh-snug)   var(--font-mono);

  /* Space · radii · shadows · motion */
  --space-1: .25rem; --space-2: .5rem;  --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem;  --space-10: 2.5rem;
  --space-12: 3rem;  --space-16: 4rem;  --space-20: 5rem;  --space-24: 6rem;

  --radius-xs: 3px; --radius-sm: 5px; --radius-md: 8px; --radius-lg: 12px;
  --radius-xl: 16px; --radius-2xl: 22px; --radius-pill: 999px; --radius-full: 50%;

  --border-width: 1px; --border-width-strong: 1.5px;

  --shadow-xs: 0 1px 2px rgba(17,24,39,.05);
  --shadow-sm: 0 1px 2px rgba(17,24,39,.06), 0 1px 3px rgba(17,24,39,.08);
  --shadow-md: 0 2px 4px rgba(17,24,39,.05), 0 4px 12px rgba(17,24,39,.08);
  --shadow-lg: 0 4px 8px rgba(17,24,39,.06), 0 12px 28px rgba(17,24,39,.12);
  --shadow-xl: 0 8px 16px rgba(17,24,39,.08), 0 24px 56px rgba(17,24,39,.16);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 120ms; --dur-base: 180ms; --dur-slow: 280ms;

  --shell-max: 100%;
  --shell-pad: 40px;
}

/* ── Base ─────────────────────────────────────────────────────────────────
   Split deliberately:
     · GLOBAL rules are safe next to Bootstrap and give legacy pages the new
       typeface, colours and surfaces.
     · The margin/size resets are scoped to `.c-body` — pages built for this
       design system. Applying them globally would collapse paragraph and
       heading spacing inside the legacy views and the CMS WYSIWYG content.
   ────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: var(--type-body);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display face + colour everywhere; sizes and margins stay Bootstrap's. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* Pages authored against this design system opt into the full reset. */
.c-body h1, .c-body h2, .c-body h3,
.c-body h4, .c-body h5, .c-body h6 { margin: 0; }
.c-body h1 { font: var(--type-display); }
.c-body h2 { font: var(--type-title); }
.c-body h3 { font: var(--type-heading); }
.c-body p  { margin: 0; text-wrap: pretty; }
.c-body ul { margin: 0; }
.c-body img { display: block; }

.num, .tabular { font-variant-numeric: tabular-nums; }

.c-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent-text);
}
.c-eyebrow--ondark { color: var(--green-300); }

.c-shell { max-width: var(--shell-max); margin: 0 auto; }
.c-pad   { padding-left: var(--shell-pad); padding-right: var(--shell-pad); }

.c-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.ipm-btn {
  --_bg: var(--accent); --_fg: var(--text-on-accent); --_bd: transparent;
  --_bgh: var(--accent-hover); --_bga: var(--accent-active);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight);
  border: var(--border-width) solid var(--_bd); border-radius: var(--radius-md);
  background: var(--_bg); color: var(--_fg); cursor: pointer; white-space: nowrap;
  text-decoration: none; user-select: none;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  padding:5px 10px;    
}
.ipm-btn:hover  { background: var(--_bgh); color: var(--_fg); }
.ipm-btn:active { background: var(--_bga); transform: translateY(.5px); }
.ipm-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.ipm-btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

.ipm-btn--secondary { --_bg: var(--surface-card); --_fg: var(--text-primary); --_bd: var(--border-strong); --_bgh: var(--surface-hover); --_bga: var(--gray-200); }
.ipm-btn--ghost     { --_bg: transparent; --_fg: var(--text-secondary); --_bd: transparent; --_bgh: var(--surface-hover); --_bga: var(--gray-200); }
.ipm-btn--subtle    { --_bg: var(--accent-soft); --_fg: var(--accent-text); --_bd: transparent; --_bgh: var(--green-100); --_bga: var(--green-200); }
/* on dark panels */
.ipm-btn--onDark    { --_bg: transparent; --_fg: #fff; --_bd: rgba(255,255,255,.28); --_bgh: rgba(255,255,255,.10); --_bga: rgba(255,255,255,.16); }

.ipm-btn--sm { height: 32px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.ipm-btn--md { height: 40px; padding: 0 var(--space-4); font-size: var(--text-base); }
.ipm-btn--lg { height: 48px; padding: 0 var(--space-6); font-size: var(--text-md); }
.ipm-btn--full { width: 100%; }
.ipm-btn__icon { display: inline-flex; flex: 0 0 auto; }
.ipm-btn__icon svg { display: block; width: 1.15em; height: 1.15em; }

/* ── Fields ───────────────────────────────────────────────────────────── */
.ipm-field { display: flex; flex-direction: column; gap: var(--space-2); font-family: var(--font-sans); }
.ipm-field__label {
  font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-primary);
  display: flex; gap: var(--space-1); align-items: center;
}
.ipm-field__req  { color: var(--danger); }
.ipm-field__hint { font-size: var(--text-xs); color: var(--text-muted); }

.ipm-input-wrap { position: relative; display: flex; align-items: center; }
.ipm-input-wrap__icon {
  position: absolute; left: var(--space-3); display: inline-flex;
  color: var(--text-muted); pointer-events: none;
}
.ipm-input-wrap__icon svg { width: 16px; height: 16px; display: block; }

.ipm-input, .ipm-select {
  width: 100%; height: 40px; box-sizing: border-box;
  font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-primary);
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md); padding: 0 var(--space-3);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.ipm-input::placeholder { color: var(--text-muted); }
.ipm-input:hover, .ipm-select:hover { border-color: var(--border-strong); }
.ipm-input:focus, .ipm-select:focus { outline: none; border-color: var(--border-focus); box-shadow: var(--ring); }
.ipm-input--with-icon { padding-left: calc(var(--space-3) + 22px); }
.ipm-input--lg, .ipm-select--lg { height: 48px; font-size: var(--text-md); }
.ipm-input--sm, .ipm-select--sm { height: 32px; font-size: var(--text-sm); }

.ipm-select-shell { position: relative; display: flex; align-items: center; }
.ipm-select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: calc(var(--space-3) + 22px);
}
.ipm-select__chevron {
  position: absolute; right: var(--space-3); pointer-events: none;
  color: var(--text-muted); display: inline-flex;
}
.ipm-select__chevron svg { width: 16px; height: 16px; display: block; }

/* ── Tag ──────────────────────────────────────────────────────────────── */
.ipm-tag {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-sans);
  font-size: var(--text-xs); font-weight: var(--fw-medium); line-height: 1;
  padding: 4px var(--space-2); border-radius: var(--radius-sm);
  background: var(--surface-sunken); color: var(--text-secondary);
  border: var(--border-width) solid var(--border-default);
}
.ipm-tag svg { width: 12px; height: 12px; }
.ipm-tag--accent { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-soft-border); }
.ipm-tag--warn   { background: var(--warning-bg); color: var(--amber-700); border-color: var(--amber-100); }
.ipm-tag--info   { background: var(--info-bg); color: var(--blue-600); border-color: var(--blue-100); }
.ipm-tag--pill   { border-radius: var(--radius-pill); padding: 6px 11px; }
a.ipm-tag { color: var(--text-secondary); transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
a.ipm-tag:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

/* ── Avatar ───────────────────────────────────────────────────────────── */
.ipm-avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; font-family: var(--font-display); font-weight: var(--fw-semibold);
  color: #fff; background: var(--green-600); border-radius: 50%; user-select: none;
}
.ipm-avatar--sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.ipm-avatar--md { width: 40px; height: 40px; font-size: var(--text-base); }

/* ==========================================================================
   Careers site chrome
   ========================================================================== */

/* ── Header ───────────────────────────────────────────────────────────── */
.c-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
}
.c-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 15px; padding-bottom: 15px;
}
.c-header__left { display: flex; align-items: center; gap: 40px; }
.c-header__logo img { height: 24px; width: auto; }
.c-nav { display: flex; gap: 28px; font: var(--type-ui); }
.c-nav a { color: var(--text-secondary); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.c-nav a:hover { color: var(--text-primary); }
.c-nav a.is-active {
  color: var(--text-primary); font-weight: var(--fw-semibold);
  border-bottom-color: var(--accent);
}
.c-header__right { display: flex; align-items: center; gap: 16px; }
.c-header__signin { font: var(--type-ui); color: var(--text-secondary); }
.c-header__signin:hover { color: var(--text-primary); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.c-hero {
  background: var(--gray-950);
  padding: 70px 0 96px;
  position: relative; overflow: hidden;
}
.c-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: end; }
.c-hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 64px; line-height: var(--lh-tight); letter-spacing: var(--ls-tighter);
  color: #fff; text-wrap: balance;
}
.c-hero__eyebrow { margin-bottom: 20px; }
.c-hero__sub {
  margin: 20px 0 0; font-family: var(--font-sans); font-size: 17px; line-height: 1.6;
  color: var(--gray-400); max-width: 52ch;
}
.c-hero__photos { display: flex; gap: 12px; height: 280px; }
.c-hero__photos-main { flex: 1.4; }
.c-hero__photos-side { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.c-hero__photos-side > * { flex: 1; min-height: 0; height: auto; }

.c-photo {
  border-radius: var(--radius-lg); overflow: hidden;
  background: #e9e7e2; height: 100%; position: relative;
}
.c-photo img { width: 100%; height: 100%; object-fit: cover; }
.c-photo--empty::after {
  content: attr(data-label);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 12px; text-align: center;
  font: var(--type-caption); color: var(--gray-500);
}

/* ── Search bar (overlaps the hero) ───────────────────────────────────── */
.c-searchwrap { margin-top: -48px; position: relative; z-index: 2; }
.c-searchbar {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(17,24,39,.04), 0 18px 40px -22px rgba(17,24,39,.35);
  padding: 18px;
}
.c-searchbar__row { display: grid; grid-template-columns: 2fr 1.1fr 1.2fr auto; gap: 14px; align-items: end; }
.c-searchbar__foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--border-subtle);
}
.c-searchbar__foot-label { font: var(--type-caption); color: var(--text-muted); }
.c-searchbar__count { margin-left: auto; font: var(--type-caption); color: var(--text-secondary); }
.c-searchbar__count strong { color: var(--text-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Stats strip ──────────────────────────────────────────────────────── */
.c-stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 32px var(--shell-pad) 0;
  padding: 44px 0 40px;
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}
.c-stat { padding: 0 24px; border-left: 1px solid var(--border-default); }
.c-stat:first-child { padding-left: 0; border-left: 0; }
.c-stat:last-child  { padding-right: 0; }
.c-stat__value {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 34px; line-height: var(--lh-tight); letter-spacing: var(--ls-tighter);
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.c-stat__label { font: var(--type-caption); color: var(--text-secondary); margin-top: 5px; }

/* ── Section headers ──────────────────────────────────────────────────── */
.c-section { padding-top: 56px; }
.c-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 22px;
}
.c-section__title {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 30px; line-height: var(--lh-snug); letter-spacing: var(--ls-tighter);
  color: var(--text-primary);
}
.c-section__link { font: var(--type-ui); color: var(--accent-text); white-space: nowrap; }

/* ── Department cards ─────────────────────────────────────────────────── */
.c-dept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.c-dept {
  display: block;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 18px 18px 16px;
  color: inherit;
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.c-dept:hover {
  border-color: var(--border-strong); transform: translateY(-1px);
  box-shadow: var(--shadow-md); color: inherit;
}
.c-dept__icon { color: var(--accent); margin-bottom: 26px; display: block; }
.c-dept__icon svg { width: 20px; height: 20px; }
.c-dept__name { font: var(--type-subtitle); color: var(--text-primary); }
.c-dept__blurb { font: var(--type-caption); color: var(--text-secondary); margin-top: 4px; }
.c-dept__count {
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-semibold);
  color: var(--accent-text); margin-top: 12px;
}

/* ── Job cards ────────────────────────────────────────────────────────── */
.c-jobs { display: flex; flex-direction: column; gap: 10px; }
.c-job {
  position: relative;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px 22px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.c-job__save { position: absolute; top: 14px; right: 14px; }

.c-jobs__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.c-job--grid {
  grid-template-columns: 1fr; padding-right: 48px; /* clears the corner save button */
}
.c-job--grid .c-job__actions--column { margin-top: 16px; }
.c-job:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.c-job__tags { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.c-job__ref { font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold); color: var(--text-muted); letter-spacing: var(--ls-wide); }
.c-job__title {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 20px; line-height: var(--lh-snug); color: var(--text-primary);
}
.c-job__title a { color: inherit; }
.c-job__title a:hover { color: var(--accent-text); }
.c-job__meta {
  display: flex; gap: 18px; margin-top: 9px; flex-wrap: wrap;
  font: var(--type-caption); color: var(--text-secondary); align-items: center;
}
.c-job__meta span { display: inline-flex; align-items: center; gap: 5px; }
.c-job__meta svg { width: 13px; height: 13px; flex: 0 0 auto; }
.c-job__actions { display: flex; align-items: center; gap: 10px; }

.c-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-md);
  border: 1px solid transparent; background: transparent; color: var(--text-secondary);
  cursor: pointer; padding: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.c-iconbtn:hover { background: var(--surface-hover); color: var(--text-primary); }
.c-iconbtn svg { width: 16px; height: 16px; }

/* ── Life at Ideas ────────────────────────────────────────────────────── */
.c-life { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.c-life h2 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 40px; line-height: var(--lh-tight); letter-spacing: var(--ls-tighter);
  color: var(--text-primary); text-wrap: balance;
}
.c-life__body {
  margin: 18px 0 0; font-size: 16px; line-height: 1.65;
  color: var(--text-secondary); max-width: 56ch;
}
.c-life__actions { display: flex; gap: 10px; margin-top: 24px; }
.c-life__collage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 130px 130px; gap: 12px;
}
.c-life__collage > :first-child { grid-row: 1 / 3; }

/* ── Testimonials ─────────────────────────────────────────────────────── */
.c-quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 44px; }
.c-quote {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-top: 3px solid var(--accent); border-radius: var(--radius-lg); padding: 22px;
}
.c-quote__icon { color: var(--accent); margin-bottom: 12px; display: block; }
.c-quote__icon svg { width: 18px; height: 18px; }
.c-quote__text { margin: 0; font-size: var(--text-md); color: var(--text-primary); line-height: 1.6; }
.c-quote__who { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.c-quote__name { font: var(--type-ui); color: var(--text-primary); }
.c-quote__role { font: var(--type-caption); color: var(--text-muted); }

/* ── Early careers (dark panel) ───────────────────────────────────────── */
.c-early {
  margin: 56px var(--shell-pad) 0;
  background: var(--gray-950); border-radius: var(--radius-xl); padding: 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center;
}
.c-early h2 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 30px; line-height: var(--lh-snug); letter-spacing: var(--ls-tighter); color: #fff;
}
.c-early__body { margin: 14px 0 0; color: var(--gray-400); line-height: 1.6; max-width: 48ch; }
.c-early__actions { display: flex; gap: 10px; margin-top: 22px; }
.c-early__cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.c-early__card {
  background: var(--gray-900); border: 1px solid var(--gray-800);
  border-radius: var(--radius-lg); padding: 18px;
}
.c-early__card--wide { grid-column: 1 / -1; }
.c-early__card-value {
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 28px;
  line-height: var(--lh-tight); color: #fff; font-variant-numeric: tabular-nums;
}
.c-early__card-title { font: var(--type-ui); color: #fff; }
.c-early__card-label { font: var(--type-caption); color: var(--gray-400); margin-top: 6px; }

/* ── Hiring process ───────────────────────────────────────────────────── */
.c-process { display: grid; grid-template-columns: repeat(var(--steps, 7), minmax(0, 1fr)); position: relative; }
.c-process::before {
  content: ''; position: absolute; left: 0; right: 0; top: 15px;
  height: 1px; background: var(--border-default);
}
.c-process__step { position: relative; padding-right: 14px; }
.c-process__step:last-child { padding-right: 0; }
.c-process__num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-card); border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-semibold);
  position: relative; z-index: 1;
}
.c-process__step--first .c-process__num { background: var(--accent); border-color: var(--accent); color: #fff; }
.c-process__title { font: var(--type-ui); color: var(--text-primary); margin-top: 14px; }
.c-process__meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 4px; }

/* ── Closing CTA ──────────────────────────────────────────────────────── */
.c-cta {
  margin: 56px var(--shell-pad) 0;
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-xl); padding: 32px 36px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center;
}
.c-cta h3 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 22px; line-height: var(--lh-snug); color: var(--text-primary);
}
.c-cta__body { margin: 8px 0 0; color: var(--text-secondary); }
.c-cta__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.c-cta__form { display: flex; gap: 10px; align-items: flex-end; }
.c-cta__input { width: 300px; }
.c-cta__hint { font: var(--type-caption); color: var(--text-secondary); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.c-footer { margin-top: 64px; background: var(--gray-950); padding: 44px 0 26px; }
.c-footer__grid {
  display: grid; grid-template-columns: 1.4fr minmax(0, 1fr) minmax(0, 1fr) 1.2fr; gap: 36px;
  padding-bottom: 32px; border-bottom: 1px solid var(--gray-800);
}
.c-footer__logo img { height: 24px; width: auto; }
.c-footer__blurb { margin: 16px 0 0; font: var(--type-caption); color: var(--gray-400); line-height: 1.6; max-width: 34ch; }
.c-footer__social { display: flex; gap: 8px; margin-top: 18px; }
.c-footer__social a {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  border: 1px solid var(--gray-700); display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
}
.c-footer__social a:hover { color: #fff; border-color: var(--gray-500); }
.c-footer__social svg { width: 15px; height: 15px; }
.c-footer__col { display: flex; flex-direction: column; gap: 9px; }
.c-footer__coltitle {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--gray-500); margin-bottom: 4px;
}
.c-footer__col a, .c-footer__col span { font: var(--type-caption); color: var(--gray-300); }
.c-footer__col a:hover { color: #fff; }
.c-footer__contact { display: flex; gap: 16px; }
.c-footer__phone { font-family: var(--font-mono); font-size: 13px; font-weight: var(--fw-semibold); color: #fff; }
.c-footer__address { margin: 12px 0 0; font: var(--type-caption); color: var(--gray-400); line-height: 1.6; }
.c-footer__bottom {
  display: flex; justify-content: space-between; padding-top: 20px;
  font: var(--type-caption); color: var(--gray-500);
}

/* ── Flash messages ───────────────────────────────────────────────────── */
.c-flash { margin: 20px var(--shell-pad) 0; }
.c-alert {
  display: flex; gap: var(--space-3); padding: var(--space-4);
  border-radius: var(--radius-md); border: 1px solid; font-size: var(--text-base);
}
.c-alert--success { background: var(--success-bg); border-color: var(--green-100); color: var(--green-800); }
.c-alert--danger  { background: var(--danger-bg);  border-color: var(--red-100);   color: var(--red-700); }
.c-alert ul { margin: 0; padding-left: 18px; }

/* ==========================================================================
   JOB SEARCH RESULTS (mockup 1b)
   ========================================================================== */

.c-jobsearch {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
  padding: 26px 0 20px;
}
.c-jobsearch__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px 220px auto;
  gap: 12px;
  align-items: end;
  margin: 0;
}

.c-results {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  align-items: start;
}

/* ── Facet sidebar ────────────────────────────────────────────────────── */
.c-facets {
  padding: 26px 24px 40px;
  border-right: 1px solid var(--border-default);
  background: var(--surface-card);
  min-height: 900px;
}
.c-facets__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
}
.c-facets__title { font: var(--type-ui); font-weight: var(--fw-semibold); color: var(--text-primary); }
.c-facets__reset { font: var(--type-caption); color: var(--accent-text); }
.c-facets__apply { margin-top: var(--space-5); }

.c-facet { padding-bottom: 18px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 18px; }
.c-facet--last { border-bottom: 0; margin-bottom: 0; }
.c-facet__label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 11px;
}
.c-facet__options { display: flex; flex-direction: column; gap: 9px; }

/* Checkbox / radio rows with counts */
.c-check {
  display: flex; align-items: center; gap: var(--space-2);
  cursor: pointer; user-select: none; margin: 0;
}
.c-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.c-check__box {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-strong); background: var(--surface-card);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.c-check__box--radius, .c-check__box--radio { border-radius: 50%; }
.c-check__box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: all var(--dur-fast) var(--ease-out); }
.c-check:hover .c-check__box { border-color: var(--accent); }
.c-check input:checked + .c-check__box { background: var(--accent); border-color: var(--accent); }
.c-check input:checked + .c-check__box svg { opacity: 1; transform: scale(1); }
.c-check__box--radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  opacity: 0; transition: opacity var(--dur-fast) var(--ease-out);
}
.c-check input:checked + .c-check__box--radio::after { opacity: 1; }
.c-check input:focus-visible + .c-check__box { box-shadow: var(--ring); }
.c-check__label { font: var(--type-ui); color: var(--text-primary); flex: 1 1 auto; }
.c-check__count {
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}

.c-facets__alert {
  margin-top: 24px; padding: 16px;
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-lg);
}
.c-facets__alert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.c-facets__alert-head svg { width: 15px; height: 15px; color: var(--accent-text); }
.c-facets__alert-head span { font: var(--type-ui); color: var(--text-primary); }
.c-facets__alert p { margin: 0 0 12px; font: var(--type-caption); color: var(--text-secondary); line-height: 1.5; }

/* ── Result column ────────────────────────────────────────────────────── */
.c-results__main { padding: 26px 40px 48px; min-width: 0; }
.c-results__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 16px;
}
.c-results__title {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 26px; line-height: var(--lh-snug); letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}
.c-results__count { font: var(--type-caption); color: var(--text-secondary); margin-top: 6px; }
.c-results__count strong { font-family: var(--font-mono); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.c-sort { margin: 0; width: 180px; flex: 0 0 auto; }

.c-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.c-chips__label { font: var(--type-caption); color: var(--text-muted); }

/* Stacked variant of the job card used in the result list */
.c-job__actions--column { flex-direction: column; align-items: stretch; gap: 8px; min-width: 168px; }

.c-pagination { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-default); }
.c-pagination .pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.c-pagination .page-item .page-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: var(--surface-card); color: var(--text-secondary);
  font: var(--type-caption); font-family: var(--font-mono);
}
.c-pagination .page-item.active .page-link {
  background: var(--accent); border-color: var(--accent); color: var(--text-on-accent);
}
.c-pagination .page-item.disabled .page-link { opacity: .45; }
.c-pagination .page-link:hover { background: var(--surface-hover); color: var(--text-primary); }
.c-pagination svg { width: 14px; height: 14px; }

/* ── Empty state ──────────────────────────────────────────────────────── */
.c-empty {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 56px 40px; text-align: center;
}
.c-empty__icon { display: inline-flex; color: var(--text-muted); margin-bottom: var(--space-4); }
.c-empty__icon svg { width: 28px; height: 28px; }
.c-empty h2 {
  margin: 0; font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: var(--fw-semibold); color: var(--text-primary);
}
.c-empty p { margin: var(--space-3) 0 0; color: var(--text-secondary); }
.c-empty__actions { display: flex; gap: 10px; justify-content: center; margin-top: var(--space-6); }

/* ==========================================================================
   JOB DETAIL (mockup 1c)
   ========================================================================== */

.c-jobdetail {
  display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 32px;
  align-items: start; padding: 22px 0 48px;
}
.c-breadcrumb {
  display: flex; gap: 7px; align-items: center; flex-wrap: wrap;
  padding: 20px 0 0; font: var(--type-caption); color: var(--text-muted);
}
.c-breadcrumb a { color: var(--text-muted); }
.c-breadcrumb a:hover { color: var(--text-primary); }
.c-breadcrumb svg { width: 12px; height: 12px; }
.c-breadcrumb__current { color: var(--text-primary); }

.c-panel {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 28px 30px;
}
.c-panel + .c-panel { margin-top: 14px; }

.c-jobhero__tags { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.c-jobhero h1 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 38px; line-height: var(--lh-tight); letter-spacing: var(--ls-tighter);
  color: var(--text-primary);
}
.c-jobhero__meta {
  display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--border-subtle);
  font: var(--type-caption); color: var(--text-secondary);
}
.c-jobhero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.c-jobhero__meta svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; }

/* Job description prose — the responsibility/requirement fields are HTML from
   the admin editor, so this styles arbitrary markup. */
.c-panel h2 {
  margin: 0 0 10px; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--text-xl); color: var(--text-primary);
}
.c-panel h2 + * { margin-top: 0; }
.c-panel section + section { margin-top: 28px; }
.c-prose { font-size: var(--text-md); color: var(--text-secondary); line-height: 1.7; }
.c-prose p { margin: 0 0 var(--space-3); }
.c-prose p:last-child { margin-bottom: 0; }
.c-prose ul, .c-prose ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.c-prose li { line-height: 1.7; }
.c-prose strong, .c-prose b { color: var(--text-primary); font-weight: var(--fw-semibold); }
.c-prose a { color: var(--accent-text); text-decoration: underline; }

.c-benefits { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.c-benefit {
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.c-benefit svg { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; flex: 0 0 auto; }
.c-benefit__name { font: var(--type-ui); color: var(--text-primary); }

/* Hiring process for this role */
.c-steps { display: flex; flex-direction: column; }
.c-step {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
}
.c-step:last-child { border-bottom: 0; }
.c-step__num {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
}
.c-step--first .c-step__num { background: var(--accent); border-color: var(--accent); color: #fff; }
.c-step__title { font: var(--type-ui); color: var(--text-primary); }
.c-step__meta { font: var(--type-caption); color: var(--text-muted); }

/* Similar roles */
.c-similar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.c-similar__card {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 18px; display: block; color: inherit;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.c-similar__card:hover { border-color: var(--border-strong); transform: translateY(-1px); color: inherit; }
.c-similar__name { font: var(--type-subtitle); color: var(--text-primary); }
.c-similar__meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 6px; }

/* ── Apply rail ───────────────────────────────────────────────────────── */
.c-rail { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.c-rail__apply {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-top: 3px solid var(--accent); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: 0 1px 2px rgba(17,24,39,.04), 0 14px 32px -20px rgba(17,24,39,.3);
}
.c-rail__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.c-rail__head span:first-child { font: var(--type-subtitle); color: var(--text-primary); }
.c-rail__minutes { font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold); color: var(--accent-text); }
.c-rail__note { font: var(--type-caption); color: var(--text-secondary); line-height: 1.6; margin: 14px 0 16px; }
.c-rail__secondary { display: flex; gap: 8px; margin-top: 10px; }
.c-rail__share { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.c-rail__share-label { font: var(--type-caption); color: var(--text-muted); margin-bottom: 9px; }
.c-rail__share-row { display: flex; gap: 8px; }
.c-rail__share-row a {
  flex: 1; height: 34px; border: 1px solid var(--border-default); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font: var(--type-caption); color: var(--text-secondary);
}
.c-rail__share-row a:hover { border-color: var(--border-strong); color: var(--text-primary); }
.c-rail__share-row svg { width: 14px; height: 14px; }

.c-job__save-btn {
  width: 34px; height: 34px; flex: 0 0 auto;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-card); color: var(--text-secondary);
  cursor: pointer; padding: 0;
}
.c-job__save-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.c-job__save-btn svg { width: 16px; height: 16px; }
.c-job__save-btn.is-saved {
  border-color: var(--accent-soft-border); background: var(--accent-soft); color: var(--accent-text);
}
.c-job__save-btn.is-saved svg { fill: currentColor; }

.c-rail__facts {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px;
}
.c-rail__facts-title {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
}
.c-rail__fact { display: flex; justify-content: space-between; gap: 12px; font: var(--type-caption); }
.c-rail__fact + .c-rail__fact { margin-top: 10px; }
.c-rail__fact dt { color: var(--text-secondary); margin: 0; }
.c-rail__fact dd { color: var(--text-primary); margin: 0; text-align: right; }

.c-rail__applied {
  background: var(--success-bg); border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-md); padding: 14px;
  font: var(--type-ui); color: var(--green-800);
  display: flex; gap: 10px; align-items: flex-start;
}
.c-rail__applied svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }

/* ==========================================================================
   LIFE AT IDEAS (mockup 1f)
   ========================================================================== */

.c-lifehero {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
  padding: 64px 0 52px;
}
.c-lifehero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.c-lifehero h1 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 52px; line-height: var(--lh-tight); letter-spacing: var(--ls-tighter);
  color: var(--text-primary); text-wrap: balance;
}
.c-lifehero__body {
  margin: 20px 0 0; font-size: 16.5px; line-height: 1.7;
  color: var(--text-secondary); max-width: 58ch;
}
.c-lifehero__photo { height: 340px; border-radius: var(--radius-xl); overflow: hidden; }

/* Vision / mission */
.c-visionband { background: var(--surface-card); border-bottom: 1px solid var(--border-default); padding: 40px 0; }
.c-visionband__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.c-visioncard {
  border: 1px solid var(--border-default); border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg); padding: 26px 28px;
}
.c-visioncard__label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
}
.c-visioncard__heading {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 26px; line-height: var(--lh-snug); letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}
.c-visioncard__body { font-size: 17px; line-height: 1.6; color: var(--text-primary); }

/* Values */
.c-values { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 12px; }
.c-value {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px;
}
.c-value__icon { color: var(--accent); display: block; }
.c-value__icon svg { width: 19px; height: 19px; }
.c-value__title { font: var(--type-subtitle); color: var(--text-primary); margin-top: 18px; }
.c-value__body { font: var(--type-caption); color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }

/* Careers by function — dark panel */
.c-funcband { background: var(--gray-950); border-radius: var(--radius-xl); padding: 36px 40px; }
.c-funcband h2 {
  margin: 0 0 6px; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 28px; letter-spacing: var(--ls-tighter); color: #fff;
}
.c-funcband__lede { margin: 0 0 26px; color: var(--gray-400); }
.c-funcgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.c-func {
  background: var(--gray-900); border: 1px solid var(--gray-800);
  border-radius: var(--radius-lg); padding: 20px; display: block; color: inherit;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.c-func:hover { border-color: var(--gray-600); transform: translateY(-1px); color: inherit; }
.c-func__head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.c-func__icon { color: var(--green-300); display: inline-flex; }
.c-func__icon svg { width: 17px; height: 17px; }
.c-func__name { font: var(--type-subtitle); color: #fff; }
.c-func__list { font: var(--type-caption); color: var(--gray-400); line-height: 1.75; }
.c-func__count {
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-semibold);
  color: var(--green-300); margin-top: 12px;
}

/* Photo strip */
.c-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.c-strip > * { height: 220px; }

/* Why + proof stats */
.c-whycard {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 36px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center;
}
.c-whycard__body { margin: 14px 0 0; color: var(--text-secondary); line-height: 1.7; }
.c-proofgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.c-proof { border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 16px; }
.c-proof__value {
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 26px;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.c-proof__label { font: var(--type-caption); color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }

/* ==========================================================================
   CANDIDATE DASHBOARD (mockup 1e)
   ========================================================================== */

.c-dash { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; }

.c-dash__side {
  padding: 26px 20px 40px;
  border-right: 1px solid var(--border-default);
  background: var(--surface-card);
  min-height: 800px;
  display: flex; flex-direction: column; gap: 4px;
}
.c-dash__nav {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-secondary); font: var(--type-ui);
}
.c-dash__nav svg { width: 16px; height: 16px; flex: 0 0 auto; }
.c-dash__nav:hover { background: var(--surface-hover); color: var(--text-primary); }
.c-dash__nav.is-active { background: var(--accent-soft); color: var(--accent-text); }
.c-dash__nav-count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.c-dash__nav--muted { color: var(--text-muted); cursor: not-allowed; }
.c-dash__nav--muted:hover { background: none; color: var(--text-muted); }

.c-dash__strength {
  margin-top: 22px; padding: 16px;
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
}
.c-dash__strength-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.c-dash__strength-head span:first-child { font: var(--type-ui); color: var(--text-primary); }
.c-dash__strength-pct { font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-semibold); color: var(--accent-text); }
.c-dash__strength p { margin: 10px 0 0; font: var(--type-caption); color: var(--text-secondary); line-height: 1.5; }

.c-meter { height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.c-meter__fill { height: 100%; border-radius: var(--radius-pill); background: var(--accent); transition: width var(--dur-slow) var(--ease-out); }

.c-dash__main { padding: 28px 40px 48px; min-width: 0; }
.c-dash__welcome {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 28px; letter-spacing: var(--ls-tight); color: var(--text-primary);
}
.c-dash__sub { margin: 7px 0 22px; color: var(--text-secondary); }

.c-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.c-tile {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.c-tile--accent { border-top: 3px solid var(--accent); }
.c-tile__label { font: var(--type-ui); color: var(--text-secondary); }
.c-tile__value {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--text-3xl); line-height: 1; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.c-tile__sub { font: var(--type-caption); color: var(--text-muted); }

.c-banner {
  background: var(--info-bg); border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg); padding: 16px 18px;
  display: flex; gap: 12px; align-items: center; margin-bottom: 20px;
}
.c-banner svg { width: 18px; height: 18px; color: var(--info); flex: 0 0 auto; }
.c-banner__body { flex: 1 1 auto; }
.c-banner__title { font: var(--type-ui); color: var(--text-primary); }
.c-banner__meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 3px; }

.c-listcard {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden;
}
.c-listcard__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-default);
}
.c-listcard__title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 17px; color: var(--text-primary); }
.c-listcard__row {
  padding: 18px 20px; border-bottom: 1px solid var(--border-subtle);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}
.c-listcard__row:last-child { border-bottom: 0; }
.c-listcard__empty { padding: 40px 20px; text-align: center; color: var(--text-secondary); }

.c-appl__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.c-appl__title { font: var(--type-subtitle); color: var(--text-primary); margin-top: 6px; }
.c-appl__title a { color: inherit; }
.c-appl__title a:hover { color: var(--accent-text); }
.c-appl__meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 4px; }

/* Status pill, coloured by outcome */
.c-status {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: var(--fw-semibold); line-height: 1;
  padding: 5px var(--space-3) 5px var(--space-2);
  border-radius: var(--radius-pill); border: 1px solid transparent; white-space: nowrap;
}
.c-status__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.c-status--progress { color: var(--green-700); background: var(--green-50);  border-color: var(--green-100); }
.c-status--waiting  { color: var(--blue-600);  background: var(--blue-50);   border-color: var(--blue-100); }
.c-status--action   { color: var(--amber-700); background: var(--amber-50);  border-color: var(--amber-100); }
.c-status--closed   { color: var(--red-700);   background: var(--red-50);    border-color: var(--red-100); }
.c-status--neutral  { color: var(--text-secondary); background: var(--surface-sunken); border-color: var(--border-default); }

.c-dash__content {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 24px 26px; margin-top: 14px;
}
.c-dash__content h2 {
  margin: 0 0 12px; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--text-xl); color: var(--text-primary);
}
.c-dash__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 14px; }

/* ==========================================================================
   CENTRED CONTENT PAGE (refer a candidate 1h, and other narrow forms)
   ========================================================================== */

.c-page { max-width: 1000px; margin: 0 auto; padding: 46px 40px 56px; }
.c-page--wide { max-width: 1180px; }
.c-page__head { text-align: center; margin-bottom: 34px; }
.c-page__head--left { text-align: left; }
.c-page__head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 40px;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tighter);
  color: var(--text-primary);
  text-wrap: balance;
}
.c-page__lede {
  margin: 12px auto 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 60ch;
}
.c-page__head--left .c-page__lede { margin-left: 0; }
.c-page__eyebrow { margin-bottom: 14px; }

/* Numbered "how it works" cards */
.c-stepcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.c-stepcard {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px;
}
.c-stepcard__num {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
  margin-bottom: 14px;
}
.c-stepcard--first .c-stepcard__num { background: var(--accent); border-color: var(--accent); color: #fff; }
.c-stepcard__title { font: var(--type-subtitle); color: var(--text-primary); }
.c-stepcard__body { font: var(--type-caption); color: var(--text-secondary); margin-top: 5px; line-height: 1.55; }

/* Form card with grouped fields */
.c-formcard {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 30px 32px;
}
.c-formgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 20px; }
.c-formgrid__full { grid-column: 1 / -1; }
.c-formgrid__legend {
  grid-column: 1 / -1;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--text-muted); margin: 0;
}
.c-formgrid__rule { grid-column: 1 / -1; height: 1px; background: var(--border-subtle); }
.c-formcard__actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border-subtle);
}
.c-formcard__note { font: var(--type-caption); color: var(--text-muted); }

/* ==========================================================================
   AUTH — split screen (mockup 1i)
   ========================================================================== */

.c-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* Left: dark brand panel */
.c-auth__aside {
  background: var(--gray-950);
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-8);
}
.c-auth__logo img { height: 26px; width: auto; }
.c-auth__aside h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 38px;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tighter);
  color: #fff;
  text-wrap: balance;
}
.c-auth__points { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.c-auth__point { display: flex; gap: 11px; align-items: flex-start; }
.c-auth__point svg { width: 16px; height: 16px; color: var(--green-300); flex: 0 0 auto; margin-top: 3px; }
.c-auth__point span { font-size: var(--text-md); color: var(--gray-300); line-height: 1.5; }
.c-auth__photo { height: 170px; border-radius: var(--radius-lg); overflow: hidden; background: #e9e7e2; }
.c-auth__photo img { width: 100%; height: 100%; object-fit: cover; }

/* Right: the form */
.c-auth__main {
  background: var(--surface-card);
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}
.c-auth__inner { width: 100%; max-width: 460px; margin: 0 auto; }
.c-auth__inner--wide { max-width: 560px; }

.c-auth__tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 28px;
}
.c-auth__tabs a {
  padding: 10px 2px 12px;
  font: var(--type-subtitle);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.c-auth__tabs a:hover { color: var(--text-secondary); }
.c-auth__tabs a.is-active { color: var(--text-primary); border-bottom-color: var(--accent); }

.c-auth h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 26px;
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}
.c-auth__lede { margin: 0 0 24px; font: var(--type-caption); font-size: var(--text-base); color: var(--text-secondary); }

.c-auth__fields { display: flex; flex-direction: column; gap: 16px; }
.c-auth__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.c-auth__row--mobile { grid-template-columns: 120px minmax(0, 1fr); }

.c-auth__meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin: 16px 0 22px;
}
.c-auth__forgot { font: var(--type-caption); color: var(--accent-text); }

.c-auth__divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.c-auth__divider::before, .c-auth__divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-default);
}
.c-auth__divider span { font: var(--type-caption); color: var(--text-muted); }

.c-auth__social { display: flex; gap: 10px; }
.c-auth__social .ipm-btn { flex: 1; }
.c-auth__foot { margin: 26px 0 0; font: var(--type-caption); color: var(--text-muted); line-height: 1.6; }
.c-auth__foot a { color: var(--accent-text); }

.c-auth__error { margin-bottom: var(--space-4); }

/* Field error text under an input */
.c-field-error { font-size: var(--text-xs); color: var(--danger); }

/* CV drop zone, reusing the ids and classes the upload script binds to */
.c-auth .file-wrapper,
.c-dropzone {
  display: block;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-page);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.c-auth .file-wrapper.is-dragover,
.c-dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.c-dropzone__icon { color: var(--accent); }
.c-dropzone__icon svg { width: 24px; height: 24px; }
.c-dropzone__title { font: var(--type-subtitle); color: var(--text-primary); margin-top: 10px; }
.c-dropzone__hint { font: var(--type-caption); color: var(--text-secondary); margin-top: 5px; }
.c-dropzone .box__dragndrop.disable { display: none; }
.c-dropzone .dropped_file_name h2 {
  font: var(--type-ui); color: var(--text-primary); margin: 0;
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.c-dropzone input[type="file"] { display: none; }
.c-dropzone__browse {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 var(--space-3); margin-top: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-card); color: var(--text-primary);
  font: var(--type-ui); font-weight: var(--fw-semibold); cursor: pointer;
}
.c-dropzone__browse:hover { background: var(--surface-hover); }

/* select2 inside the new forms */
.c-auth .select2-container--default .select2-selection--multiple,
.c-form .select2-container--default .select2-selection--multiple,
.c-auth .select2-container--default .select2-selection--single,
.c-form .select2-container--default .select2-selection--single {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  min-height: 40px;
  font-family: var(--font-sans);
}
.c-auth .select2-container--default.select2-container--focus .select2-selection--multiple,
.c-form .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--border-focus);
  box-shadow: var(--ring);
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}
.select2-dropdown {
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--accent); }

/* ==========================================================================
   CMS PAGES
   Admin-authored content — contact us, privacy policy and anything else added in
   admin. The markup is a WYSIWYG dump we do not control, so this styles arbitrary
   tags rather than classes, and only ever narrows or re-spaces: nothing here can
   break authored layout.
   ========================================================================== */

.c-cms { padding: 30px 34px; }

/* The editor emits h1–h6 at whatever level the author picked, plus bare <div>s
   and <span>s wrapping paragraphs. Give them the display face and real spacing. */
.c-cms .c-prose h1,
.c-cms .c-prose h2,
.c-cms .c-prose h3,
.c-cms .c-prose h4,
.c-cms .c-prose h5,
.c-cms .c-prose h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin: var(--space-8) 0 var(--space-3);
}
.c-cms .c-prose > :first-child { margin-top: 0; }
.c-cms .c-prose h1 { font-size: var(--text-2xl); }
.c-cms .c-prose h2 { font-size: var(--text-xl); }
.c-cms .c-prose h3 { font-size: var(--text-lg); }
.c-cms .c-prose h4,
.c-cms .c-prose h5,
.c-cms .c-prose h6 { font-size: var(--text-md); }

/* Authored content leans on <div> and <span> for paragraphs, so they need the
   paragraph rhythm too — but only when they hold text rather than layout. */
.c-cms .c-prose div:not([class]) { margin-bottom: var(--space-3); }
.c-cms .c-prose div:not([class]):last-child { margin-bottom: 0; }
.c-cms .c-prose ul,
.c-cms .c-prose ol { margin-bottom: var(--space-4); }
.c-cms .c-prose br + br { display: none; }   /* double <br> used as a paragraph gap */

.c-cms .c-prose img { border-radius: var(--radius-md); height: auto; }

.c-cms .c-prose table {
  width: 100%; border-collapse: collapse; margin: var(--space-4) 0;
  font-size: var(--text-base);
}
.c-cms .c-prose th,
.c-cms .c-prose td {
  border: 1px solid var(--border-default);
  padding: var(--space-3) var(--space-4);
  text-align: left; vertical-align: top;
}
.c-cms .c-prose th {
  background: var(--surface-sunken); color: var(--text-secondary);
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
}

/* Embedded map. The vendor snippet ships fixed pixel dimensions and a wrapper
   with its own inline styles, so this overrides the size and gives the frame the
   card treatment rather than letting it sit as a raw grey rectangle. */
.c-cms .mapouter,
.c-cms .gmap_canvas {
  position: relative; width: 100% !important; max-width: 100%;
  height: auto !important; overflow: hidden;
  border-radius: var(--radius-lg);
}
.c-cms .mapouter { margin-top: var(--space-6); border: 1px solid var(--border-default); }
.c-cms iframe {
  display: block; width: 100% !important; max-width: 100%;
  min-height: 320px; border: 0;
}

.c-cms__foot {
  display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-6);
}

/* ==========================================================================
   CANDIDATE ACCOUNT AREA
   Every signed-in screen — dashboard, applications history, profile view and the
   ten profile-builder forms. They all sit in the same `.c-dash` two-column shell
   the dashboard introduced, so the account reads as one product; what changes is
   what the sidebar lists and what fills `.c-dash__main`.

   These pages still load Bootstrap (their forms and scripts are legacy), so the
   selectors here are deliberately specific enough to win, and the `.c-form`
   scope restyles native controls so the rebuilt markup does not have to carry a
   utility class on every input.
   ========================================================================== */

/* ── Page head inside the account main column ─────────────────────────── */
.c-acct__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-6); margin-bottom: var(--space-5);
}
.c-acct__head-text { min-width: 0; }
.c-acct__title {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 28px; line-height: var(--lh-snug); letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}
.c-acct__lede { margin: 7px 0 0; color: var(--text-secondary); max-width: 68ch; }
.c-acct__actions { display: flex; gap: var(--space-2); flex: 0 0 auto; flex-wrap: wrap; }

/* Progress rail under the profile-builder head */
.c-acct__progress {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.c-acct__progress .c-meter { flex: 1 1 auto; }
.c-acct__progress-pct {
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-semibold);
  color: var(--accent-text); font-variant-numeric: tabular-nums; flex: 0 0 auto;
}

/* ── Sidebar section nav (profile builder) ────────────────────────────────
   A checklist rather than a menu: the tick is the whole point, so a candidate
   can see at a glance which of the ten sections still need filling in. */
.c-secnav { display: flex; flex-direction: column; gap: 1px; }
.c-secnav__label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--text-muted); padding: 0 var(--space-3) var(--space-2);
}
.c-secnav__item {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--space-3);
  align-items: center; padding: 9px var(--space-3);
  border-radius: var(--radius-md); color: var(--text-secondary); font: var(--type-ui);
}
.c-secnav__item:hover { background: var(--surface-hover); color: var(--text-primary); }
.c-secnav__item.is-active {
  background: var(--accent-soft); color: var(--accent-text); font-weight: var(--fw-semibold);
}
.c-secnav__tick {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  border: 1.5px solid var(--border-strong); background: var(--surface-card);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.c-secnav__tick svg { width: 11px; height: 11px; opacity: 0; }
.c-secnav__item.is-done .c-secnav__tick { background: var(--accent); border-color: var(--accent); }
.c-secnav__item.is-done .c-secnav__tick svg { opacity: 1; }
.c-secnav__sub { padding-left: calc(18px + var(--space-3)); }
.c-secnav__sub .c-secnav__item { grid-template-columns: minmax(0, 1fr); font-size: var(--text-sm); }

/* ── Form scope ───────────────────────────────────────────────────────────
   `.c-form` restyles the native controls the rebuilt account forms use, so the
   markup stays readable and no `.ipm-input` class is needed on 200 inputs. */
.c-form { display: block; }
.c-form input[type="text"],
.c-form input[type="email"],
.c-form input[type="tel"],
.c-form input[type="url"],
.c-form input[type="number"],
.c-form input[type="password"],
.c-form input[type="date"],
.c-form input[type="month"],
.c-form select:not(.select2-hidden-accessible),
.c-form textarea {
  width: 100%; box-sizing: border-box;
  font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-primary);
  background: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3); height: 40px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.c-form textarea { height: auto; min-height: 84px; padding: 10px var(--space-3); line-height: 1.6; resize: vertical; }

/* select2 moves the real <select> out of view but keeps it in the DOM. The build
   shipped here declares its 1px clamp WITHOUT !important, so any rule that sets a
   width on `select` re-inflates it: absolutely positioned and clipped, invisible,
   but still widening the scroll area (measured: 36px of sideways scroll on the
   qualification and competency screens). Belt and braces — the selectors above
   exclude it, and this pins it shut whatever else matches. */
.select2-hidden-accessible {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; border: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important; white-space: nowrap !important;
}

.c-form select:not(.select2-hidden-accessible) {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 34px;
  /* Inline chevron: these selects are generated in a dozen places, so the arrow
     travels with the control rather than needing a wrapper element. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.c-form input::placeholder, .c-form textarea::placeholder { color: var(--text-muted); }
.c-form input:hover, .c-form select:hover, .c-form textarea:hover { border-color: var(--border-strong); }
.c-form input:focus, .c-form select:focus, .c-form textarea:focus {
  outline: none; border-color: var(--border-focus); box-shadow: var(--ring);
}
.c-form input[disabled], .c-form select[disabled], .c-form textarea[disabled] {
  background: var(--surface-sunken); color: var(--text-muted); cursor: not-allowed;
}
.c-form input[readonly] { background: var(--surface-sunken); }

/* ── Fieldsets replace the old red <hr> dividers ──────────────────────── */
.c-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.c-fieldset + .c-fieldset {
  margin-top: var(--space-8); padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.c-fieldset__legend { padding: 0; margin: 0 0 var(--space-5); }
.c-fieldset__title {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--text-lg); letter-spacing: var(--ls-tight); color: var(--text-primary);
}
.c-fieldset__hint { font: var(--type-caption); color: var(--text-secondary); margin-top: 4px; line-height: 1.55; }

/* ── Field grid ───────────────────────────────────────────────────────────
   Replaces the `col-sm-3` label / `col-sm-9` field pairs: labels sit above their
   inputs, which is what makes the rebuilt forms readable at every width. */
.c-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); }
.c-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-fields--1 { grid-template-columns: minmax(0, 1fr); }
.c-fields__full { grid-column: 1 / -1; }
.c-fields__half { grid-column: span 1; }

.c-fld { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.c-fld__label {
  display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
  font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-primary);
}
.c-fld__req { color: var(--danger); }
.c-fld__opt { font-size: var(--text-xs); font-weight: var(--fw-regular); color: var(--text-muted); }
.c-fld__hint { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.c-fld__err { font-size: var(--text-xs); color: var(--danger); line-height: 1.5; }
/* A saved value shown instead of an input (email and mobile are not editable
   here — they identify the account). */
.c-fld__static {
  display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-3);
  background: var(--surface-sunken); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); color: var(--text-secondary); font-size: var(--text-base);
}
/* Two or three controls that together make one field (area code + number). */
.c-fld__row { display: flex; gap: var(--space-2); align-items: flex-start; }
.c-fld__row > * { min-width: 0; flex: 1 1 0; }
.c-fld__row--tight > .c-fld__row-fixed { flex: 0 0 110px; }

/* ── Choice chips (radio / checkbox groups) ───────────────────────────── */
.c-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.c-choices--stack { flex-direction: column; align-items: stretch; }
.c-choice {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 8px var(--space-3); margin: 0;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: var(--surface-card); color: var(--text-primary);
  font: var(--type-ui); cursor: pointer; user-select: none;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.c-choice:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.c-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer; }
.c-choice:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text);
  font-weight: var(--fw-semibold);
}
.c-choice:focus-within { box-shadow: var(--ring); }

/* ── Saved-entry cards (education, experience, diplomas, certifications) ──
   Replaces the Bootstrap carousel: a plain wrapping grid shows every saved row
   at once, which is what candidates actually want when re-checking a CV. */
.c-entries {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px; margin-bottom: var(--space-8);
}
.c-entry {
  position: relative; display: block; padding: 16px 40px 16px 16px;
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  background: var(--surface-card); color: inherit;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.c-entry:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: inherit; }
.c-entry.is-editing { border-color: var(--accent); background: var(--accent-soft); }
.c-entry__title { font: var(--type-ui); font-weight: var(--fw-semibold); color: var(--text-primary); }
.c-entry__meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 3px; }
.c-entry__dates {
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
  color: var(--text-muted); margin-top: 8px; letter-spacing: var(--ls-wide);
}
.c-entry__edit { font: var(--type-caption); color: var(--accent-text); margin-top: 8px; display: block; }
.c-entry__del {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; color: var(--text-muted);
  cursor: pointer; padding: 0; line-height: 0;
}
.c-entry__del:hover { background: var(--danger-bg); border-color: var(--red-100); color: var(--danger); }
.c-entry__del svg { width: 14px; height: 14px; }

/* ── Key/value display rows (profile view) ────────────────────────────── */
.c-kv { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 10px var(--space-4); margin: 0; }
.c-kv dt { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.c-kv dd { margin: 0; font-size: var(--text-base); color: var(--text-primary); overflow-wrap: anywhere; }
.c-kv dd:empty::after, .c-kv dd.is-empty::after { content: '—'; color: var(--text-muted); }

/* ── Profile view section cards ───────────────────────────────────────── */
.c-pcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.c-pcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.c-pcard {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px 22px;
}
.c-pcard__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-4); padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.c-pcard__title {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 17px; letter-spacing: var(--ls-tight); color: var(--text-primary);
}
.c-pcard__count {
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
  color: var(--text-muted); font-variant-numeric: tabular-nums; margin-left: 7px;
}
.c-pcard__empty {
  font: var(--type-caption); color: var(--text-muted);
  display: flex; align-items: center; gap: var(--space-2);
}
.c-pcard__empty svg { width: 16px; height: 16px; flex: 0 0 auto; }
.c-pcard__more {
  font: var(--type-caption); color: var(--accent-text); background: none; border: 0;
  padding: 0; cursor: pointer; margin-top: var(--space-3);
  display: inline-flex; align-items: center; gap: 5px;
}
.c-pcard__more svg { width: 13px; height: 13px; }

/* Dated list inside a profile card (roles, degrees, diplomas) */
.c-tl { display: flex; flex-direction: column; }
.c-tl__item { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.c-tl__item:first-child { padding-top: 0; }
.c-tl__item:last-child { border-bottom: 0; padding-bottom: 0; }
.c-tl__title { font: var(--type-ui); font-weight: var(--fw-semibold); color: var(--text-primary); }
.c-tl__org { font-size: var(--text-base); color: var(--text-secondary); margin-top: 2px; }
.c-tl__dates {
  font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold);
  color: var(--text-muted); margin-top: 6px; letter-spacing: var(--ls-wide);
}
.c-chiplist { display: flex; flex-wrap: wrap; gap: 6px; }

/* People rows (family details, references) */
.c-person { display: flex; align-items: center; gap: var(--space-3); padding: 11px 0; border-bottom: 1px solid var(--border-subtle); }
.c-person:first-child { padding-top: 0; }
.c-person:last-child { border-bottom: 0; padding-bottom: 0; }
.c-person__photo {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: var(--surface-sunken);
}
.c-person__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-person__body { min-width: 0; flex: 1 1 auto; }
.c-person__name { font: var(--type-ui); color: var(--text-primary); }
.c-person__meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 2px; }

/* ── Applications history: list beside a detail pane ──────────────────── */
.c-hist { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 16px; align-items: start; }
.c-hist__list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 74vh; overflow-y: auto; padding-right: 4px;
}
.c-hist__item {
  display: block; text-align: left; width: 100%; cursor: pointer;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-left: 3px solid transparent; border-radius: var(--radius-lg);
  padding: 14px 16px; color: inherit; font-family: var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.c-hist__item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.c-hist__item.is-active { border-color: var(--accent-soft-border); border-left-color: var(--accent); background: var(--accent-soft); }
.c-hist__item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.c-hist__item-title {
  font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 16px;
  line-height: var(--lh-snug); color: var(--text-primary);
}
.c-hist__item-meta { font: var(--type-caption); color: var(--text-secondary); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.c-hist__item-meta span { display: inline-flex; align-items: center; gap: 5px; }
.c-hist__item-meta svg { width: 12px; height: 12px; flex: 0 0 auto; }
.c-hist__pane { position: sticky; top: 20px; min-width: 0; }
/* The pane receives the AJAX fragment, which brings its own card. */
.c-hist__loading {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 40px; text-align: center;
  font: var(--type-caption); color: var(--text-muted);
}

/* Compact job panel used inside the history pane (no apply rail) */
.c-histjob {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-top: 3px solid var(--accent); border-radius: var(--radius-lg);
  padding: 24px 26px;
}
.c-histjob h2 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 24px; line-height: var(--lh-snug); letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}
.c-histjob__meta {
  display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--border-subtle);
  font: var(--type-caption); color: var(--text-secondary);
}
.c-histjob__meta span { display: inline-flex; align-items: center; gap: 6px; }
.c-histjob__meta svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; }
.c-histjob__section { margin-top: var(--space-6); }
.c-histjob__section h3 {
  margin: 0 0 var(--space-2); font-family: var(--font-display);
  font-weight: var(--fw-semibold); font-size: var(--text-lg); color: var(--text-primary);
}
.c-histjob__actions {
  display: flex; gap: var(--space-2); flex-wrap: wrap;
  margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border-subtle);
}

/* ── Repeater rows (extra mobile numbers) ─────────────────────────────── */
.c-repeat { display: flex; flex-direction: column; gap: var(--space-2); }
.c-repeat__row { display: flex; gap: var(--space-2); align-items: flex-start; }
.c-repeat__row > .c-repeat__code { flex: 0 0 118px; }
.c-repeat__row > .c-repeat__num { flex: 1 1 auto; min-width: 0; }
.c-repeat__btns { display: flex; gap: 6px; flex: 0 0 auto; }
.c-iconbtn--square {
  width: 40px; height: 40px; border: 1px solid var(--border-strong);
  background: var(--surface-card); border-radius: var(--radius-md);
}
.c-iconbtn--square:hover { background: var(--surface-hover); }
.c-iconbtn--danger:hover { background: var(--danger-bg); border-color: var(--red-100); color: var(--danger); }

/* ── Document / attachment rows ───────────────────────────────────────── */
.c-docs { display: flex; flex-direction: column; gap: 10px; }
.c-doc {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: var(--space-3);
  align-items: center; padding: 14px 16px;
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.c-doc__icon {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.c-doc__icon svg { width: 16px; height: 16px; }
.c-doc__name { font: var(--type-ui); color: var(--text-primary); overflow-wrap: anywhere; }
.c-doc__meta { font: var(--type-caption); color: var(--text-muted); margin-top: 2px; }
.c-doc__actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
/* The upload script rewrites this element's contents on success, so its children
   are styled by position rather than by class — the injected markup only carries
   the classes the script knows about. */
.c-doc__slot img {
  width: 34px; height: 34px; object-fit: cover; display: block;
  border-radius: var(--radius-sm); border: 1px solid var(--border-default);
}
.c-doc__slot .fa-remove { font-size: 13px; line-height: 1; }
.c-doc__slot label { margin: 0; }

/* ── Portfolio attachments ────────────────────────────────────────────────
   `.savedFiles` and `.file-box` are the class names the two upload scripts
   append to, so the names are kept and only the styling changed — the tiles used
   to be laid out by an inline <style> block in the portfolio view. */
.c-portfolio { display: block; }
.c-portfolio > * + * { margin-top: var(--space-5); }
.savedFiles { display: block; margin: 0; }
.savedFiles:empty { display: none; }
.file-box {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  vertical-align: top; gap: 8px; width: 108px; padding: 12px 10px 10px; margin: 0 12px 12px 0;
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.file-box img {
  width: 100%; height: 66px; object-fit: cover; display: block;
  border-radius: var(--radius-sm); background: var(--surface-sunken);
}
.file-box .close-btn {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-700); color: #fff; font-size: 11px; line-height: 1;
  border: 2px solid var(--surface-card); text-decoration: none;
}
.file-box .close-btn:hover { background: var(--danger); color: #fff; }
.file-box .download-btn {
  display: block; width: 100%; text-align: center;
  padding: 5px 8px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  color: var(--accent-text); font: var(--type-caption);
  font-weight: var(--fw-semibold); text-decoration: none;
}
.file-box .download-btn:hover { background: var(--green-100); color: var(--accent-text); }

/* ── Form card footer actions ─────────────────────────────────────────── */
.c-formfoot {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  margin-top: var(--space-8); padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}
.c-formfoot__spacer { margin-left: auto; }
.c-formfoot__note { font: var(--type-caption); color: var(--text-muted); }

/* ── Inline notice inside the account main column ─────────────────────── */
.c-notice {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid;
  font-size: var(--text-base); margin-bottom: var(--space-4);
}
.c-notice svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; }
.c-notice--info    { background: var(--info-bg);    border-color: var(--blue-100);  color: var(--blue-600); }
.c-notice--success { background: var(--success-bg); border-color: var(--green-100); color: var(--green-800); }
.c-notice--warn    { background: var(--warning-bg); border-color: var(--amber-100); color: var(--amber-700); }
.c-notice--danger  { background: var(--danger-bg);  border-color: var(--red-100);   color: var(--red-700); }
.c-notice ul { margin: 0; padding-left: 18px; }

/* ── Candidate identity header (replaces the cover-photo banner) ───────── */
.c-idcard {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px 22px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-5);
  align-items: center; margin-bottom: 14px;
}
.c-idcard__avatar {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: var(--green-600); position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 24px; color: #fff;
}
.c-idcard__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Profile photo with upload / remove affordances ───────────────────── */
.c-avatarup { position: relative; width: 76px; height: 76px; flex: 0 0 auto; }
.c-avatarup__img {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  background: var(--surface-sunken); border: 1px solid var(--border-default);
}
.c-avatarup__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-avatarup form { margin: 0; }
.c-avatarup__btn {
  position: absolute; bottom: -2px; right: 0; margin: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--text-on-accent);
  border: 2px solid var(--surface-card); cursor: pointer;
}
.c-avatarup__btn:hover { background: var(--accent-hover); }
.c-avatarup__btn svg { width: 13px; height: 13px; }
.c-avatarup__btn input[type="file"] { display: none; }
.c-avatarup__remove {
  position: absolute; top: -2px; right: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-700); color: #fff;
  border: 2px solid var(--surface-card);
}
.c-avatarup__remove:hover { background: var(--danger); color: #fff; }
.c-avatarup__remove svg { width: 11px; height: 11px; }
.c-idcard__name {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 22px; letter-spacing: var(--ls-tight); color: var(--text-primary);
}
.c-idcard__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font: var(--type-caption); color: var(--text-secondary); }
.c-idcard__meta span { display: inline-flex; align-items: center; gap: 5px; }
.c-idcard__meta svg { width: 13px; height: 13px; flex: 0 0 auto; }
.c-idcard__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; flex: 0 0 auto; }

/* ── Modal (change password) ──────────────────────────────────────────── */
.c-legacy .modal-title {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--text-lg); letter-spacing: var(--ls-tight); color: var(--text-primary);
}
.c-legacy .modal-header { padding: var(--space-4) var(--space-5); }
.c-legacy .modal-body { padding: var(--space-5); }
.c-legacy .modal-footer {
  padding: var(--space-4) var(--space-5); background: var(--surface-page);
  display: flex; justify-content: flex-end; gap: var(--space-2);
}
/* The change-password dialog is a single column of fields, so it does not need
   Bootstrap's default width — nor the 800px an inline <style> block used to force. */
.c-pwmodal { max-width: 460px; }
.c-legacy .modal-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }

/* ==========================================================================
   LEGACY BRIDGE
   Restyles the Bootstrap primitives the pre-redesign views use, so those pages
   adopt the new design language without a single change to their markup, form
   field names or JavaScript hooks.

   Loaded AFTER bootstrap.min.css / app.css / extended.css so it wins. Applies
   only inside `.c-legacy`, which the new legacy layouts put on <body> — so
   nothing here can leak into the fully redesigned pages.
   ========================================================================== */

.c-legacy {
  background: var(--surface-page);
  font: var(--type-body);
  color: var(--text-primary);
}

/* ── Page shell ───────────────────────────────────────────────────────── */
.c-legacy main { padding-bottom: var(--space-16); }

/* The gutter padding matters as much as the width: rows inside pull 12px out on
   each side, and with a zero-padding container that escaped the viewport and
   gave laptop widths ~12px of horizontal scroll (measured: doc 1036px at 1024).
   12px is Bootstrap's own container gutter. */
.c-legacy .container { max-width: var(--shell-max); padding-left: 12px; padding-right: 12px; }

/* The old layouts wrapped content in a plain white card; give it the new one. */
.c-legacy .card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.c-legacy .card-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-lg);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  padding: var(--space-4) var(--space-5);
}
.c-legacy .card-body { padding: var(--space-5); }
.c-legacy .card-footer {
  background: var(--surface-page);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-4) var(--space-5);
}
.c-legacy .bg-light { background: var(--surface-card) !important; }

/* ── Headings inside legacy content ───────────────────────────────────── */
.c-legacy h1 { font-size: var(--text-3xl); font-weight: var(--fw-bold); letter-spacing: var(--ls-tighter); }
.c-legacy h2 { font-size: var(--text-2xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tighter); }
.c-legacy h3 { font-size: var(--text-xl); font-weight: var(--fw-semibold); }
.c-legacy h4, .c-legacy h5, .c-legacy h6 { font-weight: var(--fw-semibold); }
.c-legacy .lead {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.c-legacy .btn {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  letter-spacing: var(--ls-tight);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 0 var(--space-4);
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-transform: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.c-legacy .btn-sm { height: 32px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.c-legacy .btn-lg { height: 48px; padding: 0 var(--space-6); font-size: var(--text-md); }

.c-legacy .btn-primary,
.c-legacy .btn-success {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--text-on-accent) !important;
}
.c-legacy .btn-primary:hover,
.c-legacy .btn-success:hover {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}
.c-legacy .btn-primary:active,
.c-legacy .btn-success:active { background-color: var(--accent-active) !important; }

.c-legacy .btn-secondary,
.c-legacy .btn-default,
.c-legacy .btn-light {
  background-color: var(--surface-card);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.c-legacy .btn-secondary:hover,
.c-legacy .btn-default:hover,
.c-legacy .btn-light:hover { background-color: var(--surface-hover); color: var(--text-primary); }

.c-legacy .btn-info {
  background-color: var(--accent-soft);
  border-color: var(--accent-soft-border);
  color: var(--accent-text);
}
.c-legacy .btn-info:hover { background-color: var(--green-100); color: var(--accent-text); }

.c-legacy .btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.c-legacy .btn-danger:hover { background-color: var(--red-600); border-color: var(--red-600); }

.c-legacy .btn:focus-visible { box-shadow: var(--ring); outline: none; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.c-legacy .form-label,
.c-legacy label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
}

.c-legacy .form-control,
.c-legacy .form-select,
.c-legacy select,
.c-legacy textarea,
.c-legacy input[type="text"],
.c-legacy input[type="email"],
.c-legacy input[type="password"],
.c-legacy input[type="number"],
.c-legacy input[type="tel"],
.c-legacy input[type="date"],
.c-legacy input[type="search"] {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: none;
}
.c-legacy .form-control:hover,
.c-legacy .form-select:hover { border-color: var(--border-strong); }
.c-legacy .form-control:focus,
.c-legacy .form-select:focus,
.c-legacy select:focus,
.c-legacy textarea:focus {
  border-color: var(--border-focus);
  box-shadow: var(--ring);
  outline: none;
}
.c-legacy .form-control::placeholder { color: var(--text-muted); }
.c-legacy .form-control-sm, .c-legacy .form-select-sm { font-size: var(--text-sm); }

.c-legacy .form-check-input {
  border: 1.5px solid var(--border-strong);
  background-color: var(--surface-card) !important;
}
.c-legacy .form-check-input:checked {
  background-color: var(--accent) !important;
  border-color: var(--accent);
}
.c-legacy .form-check-input:focus { box-shadow: var(--ring); border-color: var(--accent); }
.c-legacy .form-check-label { font-size: var(--text-base); color: var(--text-primary); }
.c-legacy .form-text, .c-legacy small { color: var(--text-secondary); }
.c-legacy .text-danger { color: var(--danger) !important; font-size: var(--text-xs); }
.c-legacy .invalid-feedback { color: var(--danger); }

/* ── Tables ───────────────────────────────────────────────────────────── */
.c-legacy .table {
  font-size: var(--text-base);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.c-legacy .table > :not(caption) > * > * {
  padding: var(--space-3) var(--space-4);
  border-color: var(--border-default);
}
.c-legacy .table th {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-sunken);
}
.c-legacy .table-bordered { border-radius: var(--radius-md); overflow: hidden; }

/* The candidate status banner's .title-bar is position:absolute with width:100%
   and no `left`, so it sized against whichever ancestor happened to be
   positioned — #timelineContainer is static, so that was <main> (or the
   viewport). Combined with the container's own padding as its static offset, it
   hung 12–16px past the right edge and gave the page horizontal scroll.
   Anchoring it to its own container makes the geometry width-independent. */
.c-legacy #timelineContainer { position: relative; }

/* app.css still ships Bootstrap 3, whose .row pulls 15px out on each side. The
   grid actually in charge is Bootstrap 5, whose gutter is 12px — so every row
   sat 3px wider per side than its container could absorb, and the page picked up
   a few pixels of horizontal scroll at tablet and laptop widths (measured:
   doc 1026px in a 1024px viewport). Align the pull with the gutter in use.
   Not inside a media query: the mismatch is width-independent. */
.c-legacy .row { margin-right: -12px; margin-left: -12px; }
.c-legacy .form-horizontal .form-group { margin-right: -12px; margin-left: -12px; }

/* CMS pages embed maps and videos with the vendor snippet's hardcoded pixel
   width (the contact page ships a 600px Google Maps iframe). The content is
   admin-authored HTML, so it gets constrained here rather than edited. max-width
   only ever narrows, so wide screens are unaffected. */
.c-legacy iframe,
.c-legacy embed,
.c-legacy object,
.c-legacy .mapouter,
.c-legacy .gmap_canvas { max-width: 100%; }
.c-legacy .mapouter, .c-legacy .gmap_canvas { overflow: hidden; }
.c-legacy .table tbody tr:hover { background: var(--surface-page); }

/* ── Lists (profile sidebar) ──────────────────────────────────────────── */
.c-legacy .list-group-item {
  border-color: var(--border-subtle);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
}
.c-legacy .list-group-item a { color: var(--text-secondary); }
.c-legacy .list-group-item:hover { background: var(--surface-hover); }
.c-legacy .list-group-item:hover a { color: var(--text-primary); }
.c-legacy .list-group-item.active,
.c-legacy .list-group-item.active:hover {
  background: var(--accent-soft) !important;
  border-color: var(--accent-soft-border);
  color: var(--accent-text);
}
.c-legacy .list-group-item.active > a { color: var(--accent-text); font-weight: var(--fw-semibold); }

/* ── Dropdowns, badges, alerts, pagination, modals ────────────────────── */
.c-legacy .dropdown-menu {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
}
.c-legacy .dropdown-item { border-radius: var(--radius-sm); font-size: var(--text-base); color: var(--text-secondary); }
.c-legacy .dropdown-item:hover { background: var(--surface-hover); color: var(--text-primary); }

.c-legacy .badge { font-weight: var(--fw-semibold); border-radius: var(--radius-pill); }
.c-legacy .bg-secondary { background: var(--surface-sunken) !important; color: var(--text-secondary) !important; }

.c-legacy .alert {
  border-radius: var(--radius-md);
  border-width: 1px;
  font-size: var(--text-base);
}
.c-legacy .alert-success { background: var(--success-bg); border-color: var(--green-100); color: var(--green-800); }
.c-legacy .alert-danger  { background: var(--danger-bg);  border-color: var(--red-100);   color: var(--red-700); }
.c-legacy .alert-warning { background: var(--warning-bg); border-color: var(--amber-100); color: var(--amber-700); }
.c-legacy .alert-info    { background: var(--info-bg);    border-color: var(--blue-100);  color: var(--blue-600); }

.c-legacy .page-link {
  color: var(--text-secondary);
  border-color: var(--border-default);
  font-size: var(--text-sm);
}
.c-legacy .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.c-legacy .page-link:hover { background: var(--surface-hover); color: var(--text-primary); }

.c-legacy .modal-content {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.c-legacy .modal-header, .c-legacy .modal-footer { border-color: var(--border-default); }

/* ── Neutralise old brand colours that clash ──────────────────────────── */
.c-legacy .tc-green { color: var(--accent-text) !important; }
.c-legacy .bg-dark  { background: var(--gray-950) !important; }

/* Legacy pages set their own page title block; give it breathing room. */
.c-legacy .c-legacy-head { padding: var(--space-10) 0 var(--space-6); }
.c-legacy .c-legacy-head h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tighter);
  margin: 0;
}
.c-legacy .c-legacy-head p { margin: var(--space-3) 0 0; color: var(--text-secondary); }

/* The old full-bleed banner tint is replaced by the new header.
   `.loader` is deliberately NOT hidden — it is the AJAX spinner the profile
   image and document uploads toggle with .show. */
.c-legacy .banner-cover { display: none !important; }

/* ── Candidate profile banner (frontend.layouts.header) ───────────────── */
.c-legacy #timelineContainer,
.c-legacy #timelineBackground {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.c-legacy #timelineTitle {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tighter);
  color: var(--text-primary);
}
.c-legacy #timelineNav ul {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  border-bottom: 1px solid var(--border-default);
}
.c-legacy #timelineNav li { padding-bottom: var(--space-2); border-bottom: 2px solid transparent; }
.c-legacy #timelineNav li.active { border-bottom-color: var(--accent); }
.c-legacy #timelineNav a { font: var(--type-ui); color: var(--text-secondary); }
.c-legacy #timelineNav li.active a { color: var(--text-primary); font-weight: var(--fw-semibold); }

/* ── Profile builder shell ────────────────────────────────────────────── */
.c-profile__grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  padding-bottom: var(--space-16);
}
.c-legacy .profile-nav { padding: 0; background: transparent !important; display: block; }
.c-legacy .profile-nav .navbar-toggler { display: none; }
.c-legacy .sidenav {
  position: static !important;
  left: auto !important;
  background: var(--surface-card) !important;
  width: 100% !important;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.c-legacy .sidenav .list-group-item a { display: block; }
.c-legacy .side-bar { display: block !important; }
.c-legacy .main { display: block !important; }

/* ── User menu in the new header ──────────────────────────────────────── */
.c-usermenu { position: relative; }
.c-usermenu__trigger {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--surface-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); height: 32px; padding: 0 var(--space-3);
  font: var(--type-ui); color: var(--text-primary); cursor: pointer;
}
.c-usermenu__trigger:hover { background: var(--surface-hover); }
.c-usermenu__trigger svg { width: 14px; height: 14px; color: var(--text-muted); }
.c-usermenu__menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-2); display: none; z-index: 100;
}
.c-usermenu:hover .c-usermenu__menu,
.c-usermenu:focus-within .c-usermenu__menu { display: block; }
.c-usermenu__menu a {
  display: block; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); font: var(--type-ui); color: var(--text-secondary);
}
.c-usermenu__menu a:hover { background: var(--surface-hover); color: var(--text-primary); }
.c-usermenu__sep { height: 1px; background: var(--border-subtle); margin: var(--space-2) 0; }

/* ==========================================================================
   RESPONSIVE
   The design above is authored desktop-first, so these are max-width queries
   that progressively collapse it. Breakpoints:
     1200px  large laptop  — tighten gutters, drop the widest grids a column
     1024px  tablet        — stack the two-column page shells, sidebars go on top
      768px  mobile        — single column, burger menu, stacked cards
      480px  small phone   — smaller display type, full-width buttons
   ========================================================================== */

/* Burger button and the CSS-only mobile nav toggle. Hidden on desktop. */
/* Visually hidden but still focusable — a zero-size element is skipped by some
   browsers' focus order, so use the clip technique and keep a 1px box. */
.c-navtoggle {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden; white-space: nowrap;
  clip: rect(0 0 0 0); clip-path: inset(50%);
}
.c-burger { display: none; }
.c-nav__mobileonly { display: none; }

/* ── ≤1200px ──────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  :root { --shell-pad: 24px; }

  .c-hero h1 { font-size: 52px; }
  .c-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-6); }
  .c-stat, .c-stat:first-child { border-left: 0; padding-left: 0; }
  .c-dept-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-funcgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* auto-fit rather than a fixed count: both grids are DB-driven, so the item
     count varies and auto-fit collapses the tracks that don't fit instead of
     leaving empty ones. */
  .c-values { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .c-jobdetail { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
  .c-results { grid-template-columns: 232px minmax(0, 1fr); }
  .c-hist { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
  .c-results__main { padding-left: 24px; padding-right: 24px; }
  .c-process { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); row-gap: var(--space-6); }
  /* The connecting rule only reads correctly on a single row. */
  .c-process::before { display: none; }
}

/* ── ≤1024px : tablet ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Header: nav collapses behind the burger */
  .c-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; margin-left: var(--space-3);
    border: 1px solid var(--border-default); border-radius: var(--radius-md);
    background: var(--surface-card); cursor: pointer; padding: 0 9px;
    flex: 0 0 auto;
  }
  .c-burger span {
    display: block; height: 2px; width: 100%; border-radius: 2px;
    background: var(--text-primary); transition: transform var(--dur-fast) var(--ease-out);
  }
  .c-header__inner { flex-wrap: wrap; gap: var(--space-3); }
  .c-header__left { gap: var(--space-4); flex: 1 1 auto; }

  .c-nav {
    display: none;
    order: 10; flex-basis: 100%; width: 100%;
    flex-direction: column; gap: 0;
    border-top: 1px solid var(--border-default);
    margin-top: var(--space-3); padding-top: var(--space-2);
  }
  .c-navtoggle:checked ~ .c-header__inner .c-nav { display: flex; }
  .c-nav a {
    padding: var(--space-3) 0; border-bottom: 0;
    border-left: 2px solid transparent; padding-left: var(--space-3);
  }
  .c-nav a.is-active { border-bottom-color: transparent; border-left-color: var(--accent); }
  .c-nav__mobileonly {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--border-subtle); margin-top: var(--space-2); padding-top: var(--space-2);
  }
  /* The desktop account row duplicates those links */
  .c-header__signin, .c-usermenu { display: none; }

  /* Hero */
  .c-hero { padding: 48px 0 80px; }
  .c-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .c-hero h1 { font-size: 44px; }
  .c-hero__photos { height: 220px; }

  /* Search bar */
  .c-searchbar__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-searchbar__row > button { grid-column: 1 / -1; }
  .c-jobsearch__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-jobsearch__row > button { grid-column: 1 / -1; }

  /* Two-column page shells stack; sidebars move above the content */
  .c-results { grid-template-columns: minmax(0, 1fr); }
  .c-facets {
    border-right: 0; border-bottom: 1px solid var(--border-default);
    min-height: 0; padding: 20px var(--shell-pad);
  }
  .c-facet__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .c-results__main { padding: 22px var(--shell-pad) 40px; }

  .c-jobdetail { grid-template-columns: minmax(0, 1fr); }
  .c-rail { position: static; }

  .c-dash { grid-template-columns: minmax(0, 1fr); }
  .c-dash__side {
    border-right: 0; border-bottom: 1px solid var(--border-default);
    min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 16px var(--shell-pad);
  }
  .c-dash__strength { flex-basis: 100%; margin-top: var(--space-3); }
  .c-dash__main { padding: 22px var(--shell-pad) 40px; }
  .c-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .c-profile__grid { grid-template-columns: minmax(0, 1fr); }

  /* Account area: the shell already stacks with .c-dash above. What is left is
     the content inside the main column. */
  .c-pcols { grid-template-columns: minmax(0, 1fr); }
  .c-hist { grid-template-columns: minmax(0, 1fr); }
  /* Stacked, the list must not keep its own scroll area — the page scrolls. */
  .c-hist__list { max-height: none; overflow: visible; padding-right: 0; }
  .c-hist__pane { position: static; }
  .c-acct__head { flex-direction: column; align-items: stretch; }
  .c-idcard { grid-template-columns: auto minmax(0, 1fr); row-gap: var(--space-4); }
  .c-idcard__actions { grid-column: 1 / -1; }
  .c-fields--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The profile-builder sidebar becomes a horizontal checklist strip. */
  .c-secnav { flex-direction: row; flex-wrap: wrap; gap: 4px; width: 100%; }
  .c-secnav__label { flex-basis: 100%; padding-left: 0; }
  .c-secnav__sub { padding-left: 0; display: flex; flex-wrap: wrap; gap: 4px; }

  /* Auth split screen becomes one column; the brand panel shrinks to a banner */
  .c-auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .c-auth__aside { padding: 32px var(--shell-pad); gap: var(--space-5); }
  .c-auth__aside h2 { font-size: 28px; }
  .c-auth__photo { display: none; }
  .c-auth__main { padding: 32px var(--shell-pad) 48px; }

  /* Content grids */
  .c-life { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .c-life h2 { font-size: 32px; }
  .c-quotes { grid-template-columns: minmax(0, 1fr); }
  .c-early { grid-template-columns: minmax(0, 1fr); padding: 28px; }
  .c-cta { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .c-cta__side { align-items: stretch; }
  .c-cta__input { width: 100%; }
  .c-benefits { grid-template-columns: minmax(0, 1fr); }
  .c-similar { grid-template-columns: minmax(0, 1fr); }
  .c-formgrid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .c-stepcards { grid-template-columns: minmax(0, 1fr); }
  .c-dash__cols { grid-template-columns: minmax(0, 1fr); }

  /* Life at Ideas */
  .c-lifehero { padding: 44px 0 36px; }
  .c-lifehero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .c-lifehero h1 { font-size: 38px; }
  .c-lifehero__photo { height: 260px; }
  .c-visionband__grid { grid-template-columns: minmax(0, 1fr); }
  .c-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-funcgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-funcband { padding: 28px; }
  .c-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-strip > * { height: 180px; }
  .c-whycard { grid-template-columns: minmax(0, 1fr); padding: 28px; gap: var(--space-6); }

  /* Footer */
  .c-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: var(--space-8); }
  .c-footer__contact { grid-column: 1 / -1; }

  /* ── Wide tables ──────────────────────────────────────────────────────
     A bare table gets its own scroll box. `display: block` is what makes that
     possible — but it also destroys table layout, so it must NOT be applied to a
     table that already sits in a `.table-responsive` wrapper: the wrapper is the
     scroller, and blocking the table collapses it to the wrapper's width and
     clips the columns instead of scrolling them.

     That is exactly what happened on the apply form, where the Education,
     References and Work Experience tables are 543–743px wide inside a
     `.table-responsive`: measured at 320px, the wrapper reported
     scrollWidth === clientWidth === 246px, so roughly 470px of columns were cut
     off with no way to reach them. Several application fields were simply
     unreachable on a phone. */
  .c-legacy .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .c-legacy .table-responsive {
    display: block; width: 100%; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  /* More specific than the rule above, so the wrapper's table stays a table. */
  .c-legacy .table-responsive > .table {
    display: table; width: auto; min-width: 100%; overflow-x: visible;
  }

}

/* ── ≤768px : mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --shell-pad: 16px; }

  .c-hero { padding: 36px 0 72px; }
  .c-hero h1 { font-size: 34px; }
  .c-hero__sub { font-size: 15px; }
  .c-hero__photos { height: 170px; gap: 8px; }

  .c-searchwrap { margin-top: -40px; }
  .c-searchbar { padding: 14px; }
  .c-searchbar__row, .c-jobsearch__row { grid-template-columns: minmax(0, 1fr); }
  .c-searchbar__foot { gap: 8px; }
  .c-searchbar__count { margin-left: 0; flex-basis: 100%; }

  .c-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 28px 0; margin-top: var(--space-6); }
  .c-stat { padding: 0; }
  .c-stat__value { font-size: 28px; }

  .c-section { padding-top: var(--space-10); }
  .c-section__head { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .c-section__title { font-size: 24px; }

  .c-dept-grid { grid-template-columns: minmax(0, 1fr); }
  .c-dept__icon { margin-bottom: var(--space-4); }

  /* Job cards stack, actions go full width */
  .c-job { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: 16px; }
  .c-job__title { font-size: 18px; }
  .c-job__meta { gap: 10px 14px; }
  .c-job__actions, .c-job__actions--column { flex-direction: column; align-items: stretch; min-width: 0; }
  .c-job__actions .ipm-btn { width: 100%; }

  .c-results__head { flex-direction: column; align-items: stretch; }
  .c-sort { width: 100%; }
  .c-facet__options { grid-template-columns: minmax(0, 1fr); }

  /* Job detail */
  .c-panel { padding: 20px; }
  .c-jobhero h1 { font-size: 28px; }
  .c-jobhero__meta { gap: 10px 16px; }

  /* Hiring-process rows: the meta drops under the title instead of competing
     with it for the same line. Explicit grid-column keeps it out of the
     number's track. */
  .c-step { grid-template-columns: 26px minmax(0, 1fr); row-gap: 2px; align-items: start; }
  .c-step__num { margin-top: 1px; }
  .c-step__meta { grid-column: 2; }

  /* Dashboard */
  .c-dash__side { flex-direction: column; align-items: stretch; }
  .c-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-tile { padding: var(--space-4); }
  .c-tile__value { font-size: 26px; }
  .c-dash__welcome { font-size: 24px; }
  .c-listcard__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .c-banner { flex-direction: column; align-items: flex-start; }

  /* Account forms and profile view go single column */
  .c-fields, .c-fields--3 { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .c-fld__row { flex-wrap: wrap; }
  .c-fld__row > * { flex: 1 1 140px; }
  .c-acct__title { font-size: 24px; }
  .c-entries { grid-template-columns: minmax(0, 1fr); }
  .c-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .c-kv dd { margin-bottom: 8px; }
  .c-pcard { padding: 16px 18px; }
  .c-histjob { padding: 18px 20px; }
  .c-histjob h2 { font-size: 21px; }
  .c-idcard { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .c-idcard__actions .ipm-btn { flex: 1 1 auto; }
  .c-formfoot { flex-direction: column; align-items: stretch; }
  .c-formfoot .ipm-btn, .c-formfoot input[type="submit"], .c-formfoot button { width: 100%; }
  .c-formfoot__spacer { margin-left: 0; }
  .c-repeat__row { flex-wrap: wrap; }
  .c-repeat__row > .c-repeat__code { flex: 0 0 100px; }
  .c-doc { grid-template-columns: 34px minmax(0, 1fr); }
  .c-doc__actions { grid-column: 2; }
  .c-choices { gap: 6px; }

  /* Process timeline goes vertical */
  .c-process { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-4); }
  .c-process__step { padding-right: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
  .c-process__title, .c-process__meta { margin-top: 0; }
  .c-process__title { grid-column: 2; }
  .c-process__meta { grid-column: 2; }

  /* Life at Ideas */
  .c-lifehero h1 { font-size: 30px; }
  .c-values { grid-template-columns: minmax(0, 1fr); }
  .c-funcgrid { grid-template-columns: minmax(0, 1fr); }
  .c-strip { grid-template-columns: minmax(0, 1fr); }
  .c-proofgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .c-visioncard { padding: 20px; }
  .c-visioncard__heading { font-size: 22px; }

  /* CMS pages */
  .c-cms { padding: 20px; }
  .c-cms .c-prose h1 { font-size: var(--text-xl); }
  .c-cms .c-prose h2 { font-size: var(--text-lg); }
  .c-cms .c-prose th, .c-cms .c-prose td { padding: var(--space-2) var(--space-3); }
  .c-cms__foot { flex-direction: column; }
  .c-cms__foot .ipm-btn { width: 100%; }

  /* Narrow pages */
  .c-page { padding: 28px var(--shell-pad) 40px; }
  .c-page__head h1 { font-size: 28px; }
  .c-formcard { padding: 20px; }
  .c-formcard__actions { flex-direction: column; align-items: stretch; }
  .c-formcard__actions .ipm-btn, .c-formcard__actions input[type="submit"] { width: 100%; }

  /* Auth */
  .c-auth__aside h2 { font-size: 24px; }
  .c-auth__tabs { gap: 16px; overflow-x: auto; }
  .c-auth__tabs a { white-space: nowrap; font-size: var(--text-base); }
  .c-auth__row, .c-auth__row--mobile { grid-template-columns: minmax(0, 1fr); }
  .c-auth__meta { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .c-auth__social { flex-direction: column; }

  /* Footer */
  .c-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .c-footer__bottom { flex-direction: column; gap: var(--space-2); }
  .c-footer__contact { flex-direction: column; }

  /* Closing CTA: the email field is a fixed 300px, which cannot fit beside the
     button on a phone, so the row stacks and both go full width. */
  .c-cta { padding: 24px 20px; }
  .c-cta__form { flex-direction: column; align-items: stretch; }
  .c-cta__form .ipm-btn { width: 100%; }
  .c-cta__input { width: 100%; min-width: 0; }

  /* Empty state */
  .c-empty { padding: 36px 20px; }
  .c-empty__actions { flex-direction: column; }
  .c-empty__actions .ipm-btn { width: 100%; }

  /* Legacy pages: Bootstrap's grid already stacks, but these need help */
  .c-legacy .container { padding-left: var(--shell-pad); padding-right: var(--shell-pad); }
  .c-legacy .card-body { padding: var(--space-4); }
  .c-legacy .btn { white-space: normal; height: auto; min-height: 40px; padding: 8px var(--space-4); }
  .c-legacy .recaptcha-wrapper { display: block; overflow-x: auto; }
  /* The candidate banner is a fixed-width timeline layout; keep it contained */
  .c-legacy #timelineContainer, .c-legacy #timelineBackground { max-width: 100%; }
  .c-legacy #timelineNav ul { overflow-x: auto; gap: var(--space-4); }

  /* .card-body's horizontal padding has to be at least the grid gutter, or the
     negative row margins inside it spill past the card edge. */
  .c-legacy .card-body { padding: var(--space-4) 12px; }

  /* Belt and braces against sideways scroll on phones. Scoped to this
     breakpoint on purpose: overflow-x on body creates a scroll container and
     would break `position: sticky`, which the apply rail uses on desktop. The
     rail is already static at ≤1024px, so there is nothing to break here. */
  html, body { overflow-x: hidden; max-width: 100%; }
}

/* ── ≤480px : small phone ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .c-hero h1 { font-size: 28px; }
  .c-hero__photos { display: none; }
  .c-lifehero h1 { font-size: 26px; }
  .c-lifehero__photo { height: 200px; }
  .c-page__head h1, .c-jobhero h1 { font-size: 24px; }
  .c-section__title { font-size: 21px; }

  .c-stats { grid-template-columns: minmax(0, 1fr); }
  .c-tiles { grid-template-columns: minmax(0, 1fr); }
  .c-proofgrid { grid-template-columns: minmax(0, 1fr); }
  .c-early__cards { grid-template-columns: minmax(0, 1fr); }
  /* Keep the collage two-up — it reads as a photo grid — just shorter. */
  .c-life__collage { grid-template-rows: 96px 96px; gap: 8px; }

  .ipm-btn--lg { height: 44px; font-size: var(--text-base); }
  .c-rail__share-row { flex-direction: column; }
  .c-chips { gap: 6px; }

  /* Anything that could overflow the viewport */
  .c-prose { font-size: var(--text-base); }
  .c-job__ref { font-size: 10px; }
}

/* ── Legacy Bootstrap-3 markup on a Bootstrap-5 stylesheet ────────────────
   The profile builder and apply form are `.form-horizontal` with col-sm-3
   labels beside col-sm-9 fields. In Bootstrap 3 `col-sm-*` began at 768px, so
   those pairs were meant to stack on phones; the stylesheet actually shipped
   here is Bootstrap 5, where `col-sm-*` begins at 576px and the pairs stay
   side-by-side on a large phone. Restore the authored intent for that band
   only — below 576px Bootstrap 5 already gives them full width, and at 768px
   and up nothing here applies, so the desktop layout is untouched. */
@media (min-width: 576px) and (max-width: 767.98px) {
  .c-legacy .form-horizontal [class*="col-sm-"] { flex: 0 0 auto; width: 100%; }
  .c-legacy .form-horizontal .control-label,
  .c-legacy .form-horizontal label { text-align: left; }
}

/* Keyboard focus for the CSS-only menu toggle: the checkbox is visually hidden
   but still focusable, and the ring is drawn on the burger it controls. */
.c-navtoggle:focus-visible ~ .c-header__inner .c-burger { box-shadow: var(--ring); }

/* ==========================================================================
   TOUCH HARDENING  (≤768px)
   Last block in the file on purpose: it must win over both the design system and
   the Bootstrap bridge without needing !important on every line.

   Three things a finger needs that a mouse does not, all measured rather than
   guessed (see the audit in the commit notes):

   1. 44×44px minimum for anything tappable. The design system's own controls sit
      at 32–40px, which is fine for a cursor and cramped for a thumb.
   2. 16px minimum on form controls. Below that, iOS Safari zooms the whole page
      on focus and does not zoom back out — the single most common reason a mobile
      form feels broken. Control heights grow to match so the text still fits.
   3. A floor on decorative small type. Reference codes at 10px and facet labels
      at 10.5px are legible on a 27" monitor and not on a phone.
   ========================================================================== */
@media (max-width: 768px) {

  /* ── 1. Tap targets ─────────────────────────────────────────────────── */
  /* The base class first: plenty of buttons carry no size modifier at all and
     inherit only `padding: 5px 10px`, which lands at 35px. Button labels also get
     16px — an <input type="submit"> is still a form control, and at 14px iOS
     treats a tap on it as a zoom-worthy focus. */
  .ipm-btn,
  .ipm-btn--sm, .ipm-btn--md, .ipm-btn--lg {
    min-height: 44px; height: auto;
    padding-top: 10px; padding-bottom: 10px;
    font-size: var(--text-md);
  }

  /* Bootstrap buttons on the legacy-markup pages */
  .c-legacy .btn, .c-legacy .btn-sm, .c-legacy .btn-lg {
    min-height: 44px; height: auto; padding-top: 10px; padding-bottom: 10px;
  }

  .c-iconbtn, .c-iconbtn--square { min-width: 44px; min-height: 44px; }
  .c-burger { width: 44px; height: 44px; }

  /* Header: the logo and every nav row become full-height rows */
  .c-header__logo { display: inline-flex; align-items: center; min-height: 44px; }
  .c-nav a { display: flex; align-items: center; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .c-header__signin { display: inline-flex; align-items: center; min-height: 44px; }

  /* Breadcrumbs stay visually light but get a thumb-sized hit area */
  .c-breadcrumb { gap: 4px 8px; }
  .c-breadcrumb a, .c-breadcrumb__current {
    display: inline-flex; align-items: center; min-height: 36px;
  }

  /* Account and profile navigation */
  .c-dash__nav, .c-secnav__item { min-height: 44px; }
  .c-usermenu__menu a { min-height: 44px; display: flex; align-items: center; }

  /* Choice chips, facet rows and checkbox lists */
  .c-choice { min-height: 44px; }
  .c-check { min-height: 44px; align-items: center; }
  .c-check__box { width: 22px; height: 22px; }
  .c-check__box svg { width: 14px; height: 14px; }

  /* Card affordances */
  .c-entry__del { width: 44px; height: 44px; top: 4px; right: 4px; }
  .c-pcard__more { min-height: 44px; }
  .c-job__title a, .c-appl__title a, .c-hist__item-title {
    display: inline-block; padding: 2px 0;
  }

  /* Rails, share rows, pagination, socials */
  .c-rail__share-row a { min-height: 44px; height: auto; }
  .c-pagination .page-item .page-link { min-width: 44px; height: 44px; }
  .c-footer__social a { width: 44px; height: 44px; }
  .c-footer__col a { display: inline-flex; align-items: center; min-height: 44px; }
  .c-footer__logo { display: inline-flex; align-items: center; min-height: 44px; }

  /* Standalone navigational links that act as controls rather than prose */
  .c-section__link, .c-facets__reset, .c-auth__forgot, .c-entry__edit {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  /* Popular-search chips are the main way into a filtered list on a phone, so
     they get full control sizing rather than the 24px WCAG floor. */
  a.ipm-tag { min-height: 44px; padding: 0 var(--space-4); }

  /* Portfolio tiles */
  .file-box { width: 128px; }
  .file-box .close-btn { width: 28px; height: 28px; top: -9px; right: -9px; }
  .file-box .download-btn { min-height: 36px; display: flex; align-items: center; justify-content: center; }

  /* Documents: the upload/download/remove controls sit on their own row */
  .c-doc__actions { min-height: 44px; }

  /* ── 2. Form controls: 16px, so iOS does not zoom on focus ─────────── */
  .c-form input[type="text"],
  .c-form input[type="email"],
  .c-form input[type="tel"],
  .c-form input[type="url"],
  .c-form input[type="number"],
  .c-form input[type="password"],
  .c-form input[type="date"],
  .c-form input[type="month"],
  .c-form select:not(.select2-hidden-accessible),
  .c-form textarea,
  .ipm-input, .ipm-select,
  .c-legacy .form-control, .c-legacy .form-select,
  .c-legacy select, .c-legacy textarea,
  .c-legacy input[type="text"], .c-legacy input[type="email"],
  .c-legacy input[type="password"], .c-legacy input[type="number"],
  .c-legacy input[type="tel"], .c-legacy input[type="date"],
  .c-legacy input[type="search"],
  .c-apply .table-input {
    font-size: 16px;
  }

  /* Heights grow with the type so 16px is not cramped */
  .c-form input[type="text"],
  .c-form input[type="email"],
  .c-form input[type="tel"],
  .c-form input[type="url"],
  .c-form input[type="number"],
  .c-form input[type="password"],
  .c-form input[type="date"],
  .c-form input[type="month"],
  .c-form select:not(.select2-hidden-accessible),
  .ipm-input, .ipm-select {
    height: 46px;
  }
  .ipm-input--sm, .ipm-select--sm, .ipm-input--lg, .ipm-select--lg { height: 46px; }
  .c-fld__static { min-height: 46px; font-size: var(--text-md); }

  /* select2 renders its own box; match it to the native controls */
  .select2-container .select2-selection--single,
  .select2-container .select2-selection--multiple {
    min-height: 46px !important;
    font-size: 16px;
  }
  .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px; font-size: 16px;
  }
  .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }
  .select2-search__field { font-size: 16px !important; }
  .select2-results__option { padding: 10px 12px; font-size: var(--text-md); }
  /* select2 sizes its dropdown from the control, so keep it on-screen */
  .select2-container { max-width: 100%; }

  /* Native checkboxes and radios are 13px by default — too small to hit */
  .c-choice input[type="checkbox"], .c-choice input[type="radio"],
  .c-legacy .form-check-input { width: 20px; height: 20px; }

  /* ── 3. Small-type floor ────────────────────────────────────────────── */
  .c-job__ref { font-size: 11.5px; }
  .c-eyebrow { font-size: 12px; }
  .c-facet__label, .c-footer__coltitle, .c-visioncard__label,
  .c-rail__facts-title, .c-formgrid__legend, .c-secnav__label {
    font-size: 11.5px;
  }
  .c-check__count, .c-step__num, .c-process__num, .c-stepcard__num,
  .c-rail__minutes, .c-dash__strength-pct, .c-acct__progress-pct,
  .c-entry__dates, .c-tl__dates, .c-dept__count, .c-func__count,
  .c-pcard__count, .c-hist__item-meta, .c-dash__nav-count,
  .c-early__card-label, .c-quote__role, .c-similar__meta {
    font-size: 12px;
  }
  .c-legacy small, .c-legacy .small { font-size: var(--text-sm); }

  /* Long unbroken strings — emails, URLs, reference codes — must not push the
     layout wider than the phone. */
  .c-kv dd, .c-idcard__meta, .c-doc__name, .c-tl__org,
  .c-appl__meta, .c-hist__item-title, .c-entry__title, .c-entry__meta {
    overflow-wrap: anywhere;
  }
}

/* ── ≤480px : small phone ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Anything that pairs a control with an icon button needs the row to wrap
     rather than squeeze the control to nothing. */
  .c-repeat__row { flex-wrap: wrap; }
  .c-repeat__row > .c-repeat__code { flex: 1 1 100px; }
  .c-repeat__row > .c-repeat__num { flex: 1 1 140px; }
  .c-repeat__btns, .c-repeat__row > .plusDiv, .c-repeat__row > .minusDiv { margin-left: auto; }

  .c-fld__row { flex-wrap: wrap; }
  .c-fld__row > *, .c-fld__row--tight > .c-fld__row-fixed { flex: 1 1 100%; }

  .c-acct__actions, .c-idcard__actions { width: 100%; }
  .c-acct__actions .ipm-btn, .c-idcard__actions .ipm-btn { flex: 1 1 100%; }

  .c-pcard__head { flex-wrap: wrap; gap: var(--space-2); }
  .c-listcard__head { flex-wrap: wrap; }
  .c-histjob__actions .ipm-btn { width: 100%; }
  .c-doc { grid-template-columns: minmax(0, 1fr); }
  .c-doc__icon { display: none; }
  .c-doc__actions { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
