/* imy jobs — design system tokens (see DESIGN_SYSTEM.md) */
:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;

  --ink: #181817;
  --ink-2: #5E5D59;
  --ink-3: #73726D;

  --border: #E7E5E1;
  --border-strong: #D4D2CC;

  --err: #B3261E;
  --err-bg: #FCEEEC;
  --ok: #1E7B3A;

  --header-bg: rgba(250, 249, 247, 0.82);
  --bar-bg: rgba(255, 255, 255, 0.92);
  --scrim: rgba(24, 24, 23, 0.45);
  --logo-bg: #FFFFFF;
  --logo-ink: #5E5D59;
  color-scheme: light;

  --font-serif: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(24, 24, 23, 0.04);
  --shadow-md: 0 8px 24px rgba(24, 24, 23, 0.06);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Profile-completion ring bands (see Profile.completion_color) */
  --ring-red: #ef8177;
  --ring-amber: #eeab3f;
  --ring-green-light: #7dc687;
  --ring-green-full: #2fa84a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-3);
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font-family: inherit; }

/* Touch screens: no default blue/grey flash when a link or button is tapped (Chrome on Android, Safari on iPhone draw it themselves).
   The page shows its own pressed state below instead, and keyboard focus rings are untouched. touch-action: manipulation removes the
   double-tap-to-zoom delay on controls; pinch zoom still works everywhere. */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, select, input, textarea, [role="button"], [role="switch"], [role="tab"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: none) and (pointer: coarse) {
  a:active, summary:active, label:active, [role="button"]:active, [role="tab"]:active { opacity: 0.6; }
  .job-card:has(.job-card__stretched-link:active) { opacity: 0.85; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  display: inline-block;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;                 /* keeps the header the same height as before */
  letter-spacing: -0.03em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  padding: 12px 0;
}

.nav-profile-nudge {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  white-space: nowrap;
}

.nav-profile-nudge__short {
  display: none;
}

/* Small screens: swap to a shorter prefix of the same message instead of
   hiding it outright — just enough for the eye to catch the start of it
   without crowding the header. */
@media (max-width: 640px) {
  .nav-profile-nudge__full {
    display: none;
  }

  .nav-profile-nudge__short {
    display: inline;
  }

  .nav-links {
    gap: var(--sp-3);
  }
}

.nav-user-menu {
  position: relative;
}

.nav-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  padding: 0;
  transition: transform .15s var(--ease);
}

.nav-avatar:hover {
  transform: scale(1.05);
}

.nav-user-menu__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: var(--sp-2);
  z-index: 1100;
}

.nav-user-menu__dropdown form {
  margin: 0;
}

.nav-user-menu__item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .15s var(--ease);
}

.nav-user-menu__item:hover {
  background: var(--bg);
}

.nav-user-menu__item--btn {
  font: inherit;
}

.profile-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.profile-ring__bg {
  stroke: var(--border-strong);
}

.profile-ring__fg {
  stroke: var(--ink);
  stroke-linecap: round;
  transition: stroke-dasharray .3s var(--ease);
}

.profile-ring--nav {
  width: 32px;
  height: 32px;
}

.profile-ring__letter {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.profile-hero__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.profile-hero__hint {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .profile-hero__title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-1);
  }
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 8px;
  height: 1px;
  width: 100%;
  background: var(--ink);
  right: 100%;
  transition: right .2s var(--ease);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { right: 0; }

/* Layout */
.page {
  width: 100%;
  padding: 0 var(--sp-5);
}

.main-content {
  flex: 1;
  width: 100%;
  padding: var(--sp-7) 0;
}

.main-content--list {
  padding-top: var(--sp-5);
}

.main-content--narrow {
  max-width: 440px;
  margin: 0 auto;
  padding-top: var(--sp-9);
}

.main-content--profile {
  width: 100%;
}

@media (max-width: 640px) {
  .site-header { padding: 14px 20px; }
  .page { padding: 0 var(--sp-4); }
  .main-content { padding: var(--sp-6) 0; }
  .main-content--list { padding-top: var(--sp-4); }
}

/* Eyebrow */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--ink);
}

/* Buttons */
.btn {
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}

.btn:active { transform: scale(0.97); }

.btn::-moz-focus-inner { border: 0; padding: 0; }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-block { width: 100%; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: var(--r-pill);
}

.badge-solid {
  background: var(--ink);
  color: var(--bg);
}

.badge-outline {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.card--ghost {
  border-style: dashed;
  color: var(--ink-3);
}

/* Visually hidden but still readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.field.search-field {
  flex: 1 1 200px;
  margin-bottom: 0;
}

.search-bar .field input,
.search-bar .btn {
  height: 48px;
}

.search-bar .btn {
  flex-shrink: 0;
}

.container {
  width: 100%;
  margin-top: var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
}

.filter-group__label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-bottom: var(--sp-2);
}

/* Custom select (themed replacement for native <select> — browsers render a
   native select's open option list as unstyleable OS chrome, so a real
   dropdown menu has to be built from plain elements instead). */
.custom-select {
  position: relative;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s var(--ease);
}

.custom-select__trigger:hover {
  border-color: var(--ink-3);
}

.custom-select.is-open .custom-select__trigger {
  border-color: var(--ink);
}

.custom-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__chevron {
  flex-shrink: 0;
  color: var(--ink-3);
  transition: transform .15s var(--ease);
}

.custom-select.is-open .custom-select__chevron {
  transform: rotate(180deg);
}

.custom-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: var(--sp-2);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.custom-select__option {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .1s var(--ease);
}

.custom-select__option:hover {
  background: var(--bg);
  color: var(--ink);
}

.custom-select__option[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
}

.custom-select__option.is-active {
  background: var(--bg);
  color: var(--ink);
}

/* A select with a search box (the college list, which can run to thousands). */
.custom-select__search-row {
  position: sticky;
  top: calc(var(--sp-2) * -1);
  z-index: 1;
  margin: calc(var(--sp-2) * -1) calc(var(--sp-2) * -1) var(--sp-1);
  padding: var(--sp-2);
  list-style: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.custom-select__search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
}

.custom-select__search:focus {
  outline: none;
  border-color: var(--ink);
}

.custom-select__note {
  padding: 8px 12px 4px;
  list-style: none;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-3);
}

.filters-main {
  flex: 1;
  min-width: 0;
  padding: var(--sp-4);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}

.pagination__link {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.pagination__link:hover { text-decoration: underline; text-underline-offset: 2px; }

.pagination__status {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

/* Job grid + card */
.job-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

@media (min-width: 640px) {
  .job-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .job-grid {
    /* Capped at 3 — wider, more rectangular cards rather than more (narrower) columns. */
    grid-template-columns: repeat(3, 1fr);
  }
}

.job-card {
  position: relative;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.job-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.job-card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.job-card__top {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.job-card__logo {
  width: 48px;
  height: 48px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: contain;
  flex-shrink: 0;
  background: var(--logo-bg);
}

.job-card__logo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--logo-ink);
}

.job-card__company {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-top: 4px;
}

.job-card__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card__desc {
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: pre-line;
}

.job-card__desc--clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

.meta-item__icon {
  flex-shrink: 0;
  color: var(--ink-3);
}

/* Job detail page */
.main-content--detail {
  max-width: 800px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-bottom: var(--sp-3);
  padding: 12px 0;
}
.back-link:hover { color: var(--ink); }

.job-detail {
  padding: var(--sp-7);
}

.job-detail__top {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.job-detail__logo {
  width: 64px;
  height: 64px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: contain;
  flex-shrink: 0;
  background: var(--logo-bg);
  font-size: 22px;
}

.job-detail__title {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
}

.job-detail__desc {
  margin-top: var(--sp-6);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
}

.job-detail__desc p { margin: 0 0 var(--sp-4); }

.job-detail__desc h1,
.job-detail__desc h2,
.job-detail__desc h3,
.job-detail__desc h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: var(--sp-5) 0 var(--sp-3);
}

.job-detail__desc h2 { font-size: 19px; }
.job-detail__desc h3 { font-size: 16px; }

.job-detail__desc strong { color: var(--ink); font-weight: 600; }
.job-detail__desc em { font-style: italic; }

.job-detail__desc ul,
.job-detail__desc ol {
  margin: 0 0 var(--sp-4);
  padding-left: 20px;
}

.job-detail__desc li { margin-bottom: var(--sp-1); }

.job-detail__desc a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.job-detail__footer {
  position: sticky;
  bottom: 0;
  margin: var(--sp-7) calc(-1 * var(--sp-7)) calc(-1 * var(--sp-7));
  padding: var(--sp-4) var(--sp-7);
  background: var(--bar-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* Forms */
.field {
  margin-bottom: var(--sp-4);
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-bottom: var(--sp-2);
}

.field input,
.field textarea,
.field select {
  display: block;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.2;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s var(--ease);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
}

.field .helptext {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: var(--sp-1);
}

.field ul.errorlist {
  list-style: none;
  margin: var(--sp-1) 0 0;
  padding: 0;
  color: var(--err);
  font-size: 13px;
}

.auth-card {
  padding: var(--sp-6);
}

/* Profile / resume-builder page */
.profile-card {
  padding: var(--sp-6);
  position: relative;
}

.profile-save-status {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-6);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.profile-save-status--error {
  /* In the flow above the form, so it never sits on top of a field label. */
  position: static;
  margin-bottom: var(--sp-4);
  color: var(--err);
  font-weight: 600;
}

/* "Saved" only reaches screen readers; sighted users get the per-field note below. */
.profile-save-status:not(.profile-save-status--error) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Small confirmation at the top right of the field that was just saved */
.profile-card .field { position: relative; }
.field-status {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  transition: opacity .25s var(--ease);
  pointer-events: none;
}
.field-status.is-on { opacity: 1; }
.field-status--ok { color: var(--ok); }
.field-status--bad { color: var(--err); }

.profile-hero {
  margin-bottom: var(--sp-5);
}

/* Desktop: use the full width of the screen — a wide, multi-column grid
   instead of the mobile single column — so the whole builder reads without
   scrolling. Mobile keeps the roomier single-column layout and scrolls
   normally. */
@media (min-width: 900px) {
  body.page-profile .site-header {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .main-content--profile {
    padding: var(--sp-4) 0;
  }

  .profile-hero {
    margin-bottom: var(--sp-4);
  }

  .profile-card {
    padding: var(--sp-5) var(--sp-6);
  }

  .profile-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "surname   name       mobile"
      "email     address    .";
    column-gap: var(--sp-5);
    row-gap: var(--sp-4);
  }

  .profile-fields-grid .field {
    margin-bottom: 0;
  }

  .field--surname { grid-area: surname; }
  .field--name { grid-area: name; }
  .field--mobile_number { grid-area: mobile; }
  .field--email { grid-area: email; }
  .field--address { grid-area: address; }

  /* College/Department each pair a select with a conditional "Other" text
     field, stacked in the same grid cell so picking "Other" grows just
     that cell instead of pushing a whole extra row onto the page. */
  .field-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  .field-group .field {
    margin-bottom: 0;
  }


  .field--certifications {
    margin-top: var(--sp-4);
    margin-bottom: 0;
  }
}

.field-icon-input {
  position: relative;
}

.field-icon-input__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.field-icon-input input {
  padding-left: 38px;
}

.field-prefix-input {
  display: flex;
  align-items: stretch;
}

.field-prefix {
  display: flex;
  align-items: center;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  background: var(--border);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 13.5px;
  flex-shrink: 0;
}

.field-prefix-input input {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.certification-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.certification-row input.certification-row__delete-checkbox {
  display: none;
}

.certification-row__title,
.certification-row__url {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  background: var(--bg);
  color: var(--ink);
}

.certification-row__title:focus,
.certification-row__url:focus {
  outline: none;
  border-color: var(--ink);
}

.certification-row--pending-removal {
  opacity: 0.4;
  pointer-events: none;
  text-decoration: line-through;
}

.certification-row__remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}

.certification-row__remove-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

/* Skills chip input */
.chip-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.chip-input:focus-within {
  border-color: var(--ink);
}

.chip-input__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.skill-chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: inherit;
  opacity: 0.7;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.skill-chip__remove:hover {
  opacity: 1;
}

.chip-input__entry {
  flex: 1;
  min-width: 140px;
  border: none;
  background: none;
  padding: 6px 2px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink);
}

.chip-input__entry:focus {
  outline: none;
}

.certification-add-btn {
  margin-top: var(--sp-2);
  padding: 9px 18px;
  font-size: 12px;
}

.auth-card__footer {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: 13px;
  color: var(--ink-2);
}

.auth-card__footer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.non-field-errors {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--err-bg);
  border: 1px solid var(--err);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--err);
}

.non-field-errors ul { list-style: none; margin: 0; padding: 0; }
.non-field-errors a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 400; }

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-4);
}

.messages li {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: var(--sp-2);
}

/* Empty state */
.empty-state {
  padding: var(--sp-7);
  text-align: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.field-error {
  display: block;
  font-size: 13px;
  color: var(--err);
  margin-top: var(--sp-1);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-5) 40px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  text-align: center;
}


/* Accessibility: visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header CTA */
.nav-link--cta {
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
}
.nav-link--cta::after { display: none; }
.nav-link--cta:hover { color: var(--bg); opacity: 0.88; }


/* Results header: count + sort */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.results-bar__count {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.results-bar__count strong { color: var(--ink); font-weight: 600; }
/* Sort: a small dropdown so the choices stay out of the way until tapped */
.sort-menu { position: relative; }
.sort-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.sort-menu summary::-webkit-details-marker { display: none; }
.sort-menu summary:hover { border-color: var(--border-strong); }
.sort-menu__label { color: var(--ink-3); font-weight: 400; }
.sort-menu svg { transition: transform .15s var(--ease); }
.sort-menu[open] svg { transform: rotate(180deg); }
.sort-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 170px;
  display: grid;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.sort-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 14px;
}
.sort-menu__list a:hover { background: var(--bg); color: var(--ink); }
.sort-menu__list a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.sort-menu__list a[aria-current="true"]::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
}

.badge-new {
  display: inline-block;
  margin-left: var(--sp-2);
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.job-detail__company-link { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .job-detail { padding: var(--sp-5); }
  .job-detail__footer {
    margin: var(--sp-6) calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5));
    padding: var(--sp-3) var(--sp-5);
  }
  .job-detail__footer .btn { width: 100%; }
}

/* Filters: sticky sidebar on desktop, bottom sheet on tablet/phone */
.filters-panel {
  width: 272px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  scrollbar-width: thin;
}

.filters-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
}
.filters-panel__title { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: 18px; }
.filters-panel__count,
.filter-section__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1;
}
.filters-panel__count[hidden],
.filter-section__count[hidden] { display: none; }
.filter-section__title { display: inline-flex; align-items: center; gap: var(--sp-2); }
.filters-panel__clear {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.filters-panel__clear:hover { color: var(--ink); }
.filters-panel__clear[hidden] { display: none; }
.filters-panel__close,
.filters-panel__foot,
.filters-backdrop { display: none; }

.filter-section { border-top: 1px solid var(--border); }
.filter-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 var(--sp-5);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.filter-section summary::-webkit-details-marker { display: none; }
.filter-section summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s var(--ease);
}
.filter-section[open] summary::after { transform: rotate(-135deg) translateY(-2px); }

.filter-options {
  max-height: 232px;
  overflow-y: auto;
  padding: 0 var(--sp-3) var(--sp-3);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.filter-option[hidden] { display: none; }
.filter-option:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.filter-option:has(input:disabled):hover { background: none; color: var(--ink-2); }
.filter-option input:disabled { cursor: not-allowed; }
.filter-option:hover { background: var(--bg); color: var(--ink); }
.filter-option:has(input:checked) { color: var(--ink); font-weight: 500; }
.filter-option__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-option__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.filter-option input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface) center / 12px no-repeat;
  cursor: pointer;
  transition: background-color .12s var(--ease), border-color .12s var(--ease);
}
.filter-option input[type="radio"] { border-radius: 50%; }
.filter-option input:hover { border-color: var(--ink-3); }
.filter-option input:checked {
  background-color: var(--ink);
  border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23FAFAF9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.4 2.3 4.6-5'/%3E%3C/svg%3E");
}
.filter-option input[type="radio"]:checked {
  background-image: radial-gradient(circle, var(--bg) 0 28%, transparent 32%);
  background-size: 100%;
}

.filter-search {
  display: block;
  width: calc(100% - 2 * var(--sp-5));
  height: 40px;
  margin: 0 var(--sp-5) var(--sp-2);
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  font: inherit;
  font-size: 13px;
}

.filters-main { transition: opacity .18s var(--ease); }
.filters-main.is-loading { opacity: .5; pointer-events: none; }

@media (max-width: 850px) {
  .container { display: block; }

  .filters-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3) var(--sp-2);
    margin-top: var(--sp-3);
  }
  .filters-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: 44px;
    padding: 0 var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    color: var(--ink);
    font-family: var(--font-mono);
  font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.01em;
      cursor: pointer;
  }
  .filters-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--r-pill);
    background: var(--ink);
    color: var(--bg);
    font-size: 12px;
    letter-spacing: 0;
  }
  .active-chips { display: contents; }
  .active-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 var(--sp-4);
    background: var(--ink);
    color: var(--bg);
    border-radius: var(--r-pill);
    font-size: 13px;
    white-space: nowrap;
  }
  .filters-main { margin-top: var(--sp-4); }

  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: var(--scrim);
  }
  .filters-backdrop[hidden] { display: none; }

  .filters-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    z-index: 1100;
    max-height: 85vh;
    border: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .25s var(--ease), visibility 0s linear .25s;
  }
  .filters-panel.is-open {
    transform: none;
    visibility: visible;
    transition: transform .25s var(--ease);
  }

  .filters-panel__head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface);
    padding: var(--sp-3) var(--sp-4) var(--sp-2) var(--sp-5);
  }
  .filters-panel__title { font-size: 20px; }
  .filters-panel__clear--top { display: none; }
  .filters-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    color: var(--ink);
    cursor: pointer;
  }
  .filter-options { max-height: none; }

  .filters-panel__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    position: sticky;
    bottom: 0;
    padding: var(--sp-4);
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .filters-panel__foot .filters-panel__clear {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 var(--sp-2);
  }
  .filters-panel__foot .filters-panel__clear[hidden] { display: none; }
  .filters-panel__foot .btn { flex: 1; }
}


/* Accessibility: jump past the header and filters */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }
#main:focus, #results-region:focus { outline: none; }

/* Forms: inline errors, password toggle, rule chips */
.field--invalid input {
  border-color: var(--err);
  box-shadow: 0 0 0 3px var(--err-bg);
}

.field-msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: var(--sp-2) 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.field-msg svg { margin-top: 2px; }
.field-msg--err { color: var(--err); font-weight: 500; }

.password-field { position: relative; }
.password-field input { padding-right: 68px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  min-width: 56px;
  min-height: 40px;
  padding: 0 var(--sp-3);
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.password-toggle:hover { color: var(--ink); }

.rule-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-2) 0 0;
  padding: 0;
  list-style: none;
}
.rule-chips li {
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 12.5px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.rule-chips li.is-met { color: var(--ok); border-color: var(--ok); }
.rule-chips li.is-met::before { content: '\2713\00a0'; }

/* 404 */
.error-card {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-6);
  text-align: center;
}
.error-card h1 { margin: 0; }
.error-card__text { margin: 0; color: var(--ink-2); }
.error-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-3); }

.card-sub {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0 0 var(--sp-5);
}

/* Signup checkbox row */
.check-field { margin-bottom: var(--sp-4); }
.check-field__label { display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; font-size: 14px; }
.check-field__label input { width: 18px; height: 18px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--ink); cursor: pointer; }
.check-field__label b { display: block; font-weight: 600; color: var(--ink); }
.check-field__label small { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.45; }

/* Toggle switch + profile job-alerts card */
.alerts-card {
  margin-top: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.alerts-card h2 { margin: 0 0 var(--sp-1); font-size: 18px; }
.alerts-card p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 60ch; }
.alerts-card__status { min-height: 20px; font-size: 13px !important; color: var(--ink-3) !important; margin-top: var(--sp-1) !important; }
.switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch__track {
  width: 48px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
  position: relative;
  transition: background .2s var(--ease);
}
.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--ink); outline-offset: 3px; }
.switch input:disabled + .switch__track { opacity: .6; }
@media (max-width: 640px) { .alerts-card { padding: var(--sp-5); } }

/* Save (bookmark) button */
.save-form { margin: 0; }
.save-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .15s var(--ease);
}
a.save-btn { text-decoration: none; }
.save-btn:hover { color: var(--ink); }
.save-btn.is-saved { color: var(--ink); }
.save-btn.is-saved svg { fill: currentColor; }
.save-btn:disabled { opacity: .6; cursor: default; }
.job-card > .save-form { position: absolute; top: var(--sp-2); right: var(--sp-1); z-index: 2; }
.job-card__top > div:last-child { padding-right: 28px; }
.job-detail__footer { display: flex; align-items: center; gap: var(--sp-3); }

/* Applied */
.applied-chip {
  display: inline-block;
  padding: 1px 10px;
  border: 1px solid var(--ok);
  border-radius: var(--r-pill);
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}
.applied-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
  font-size: 14px;
  color: var(--ink-2);
}
.applied-note form { margin: 0; }
.link-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* Saved / Applied pages */
.collection-head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.collection-head h1 { margin: 0; }
.collection-head__count { color: var(--ink-2); font-size: 14px; }
.collection-card { padding: var(--sp-4); }
.collection-card .empty-state { display: grid; justify-items: center; gap: var(--sp-4); }

/* Account menu */
.nav-user-menu__count { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.nav-user-menu__item { display: flex; align-items: center; gap: var(--sp-3); }


/* Dark theme: follows the device unless the visitor picks one (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --surface: #1C1C1A;
    --ink: #F2F1EE;
    --ink-2: #B4B2AC;
    --ink-3: #8F8D87;
    --border: #2E2E2B;
    --border-strong: #42423E;
    --err: #F2B8B5;
    --err-bg: #3A1F1D;
    --ok: #7DC687;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --header-bg: rgba(19, 19, 18, 0.82);
    --bar-bg: rgba(28, 28, 26, 0.92);
    --scrim: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131312;
  --surface: #1C1C1A;
  --ink: #F2F1EE;
  --ink-2: #B4B2AC;
  --ink-3: #8F8D87;
  --border: #2E2E2B;
  --border-strong: #42423E;
  --err: #F2B8B5;
  --err-bg: #3A1F1D;
  --ok: #7DC687;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(19, 19, 18, 0.82);
  --bar-bg: rgba(28, 28, 26, 0.92);
  --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

body { transition: background-color .2s var(--ease), color .2s var(--ease); }

/* Pasted rich text can carry its own colours; keep it readable in either theme */
.job-detail__desc [style*="color"] { color: inherit !important; }
.job-detail__desc [style*="background"] { background: transparent !important; }

/* Light/dark toggle (icons only) */
.theme-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  width: 56px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  cursor: pointer;
}
.theme-toggle::after { content: ''; position: absolute; inset: -7px -4px; }
.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform .22s var(--ease);
}
.theme-toggle[aria-checked="true"] .theme-toggle__thumb { transform: translateX(26px); }
.theme-toggle svg {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  z-index: 1;
  color: var(--ink-3);
  transition: color .2s var(--ease);
}
.theme-toggle__sun { left: 7px; }
.theme-toggle__moon { right: 7px; }
.theme-toggle[aria-checked="false"] .theme-toggle__sun,
.theme-toggle[aria-checked="true"] .theme-toggle__moon { color: var(--bg); }

.nav-theme-desktop { display: inline-flex; }
.nav-user-menu__theme {
  display: none;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 400px) {
  .nav-links .theme-toggle { width: 50px; }
  .nav-links .theme-toggle[aria-checked="true"] .theme-toggle__thumb { transform: translateX(20px); }
}

/* Logged in: the toggle sits beside the avatar on desktop and moves into the dropdown on phones */
@media (max-width: 640px) {
  .nav-theme-desktop { display: none; }
  .nav-user-menu__theme { display: flex; }
}


/* Fresher / Experienced switch and the skills bar */
.seg {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--surface);
}
.seg__opt {
  padding: 0 var(--sp-4);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.seg__opt:hover { color: var(--ink); }
.seg__opt.is-on { background: var(--ink); color: var(--bg); font-weight: 600; }

.lens-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 4px;
}
.lens-bar::-webkit-scrollbar { display: none; }
.lens-bar__label { flex-shrink: 0; margin: 0 var(--sp-1) 0 var(--sp-2); font-size: 13px; color: var(--ink-3); }
.lens-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
}
.lens-chip em { font-style: normal; margin-left: 6px; font-size: 12px; color: var(--ink-3); }
.lens-chip:hover { color: var(--ink); border-color: var(--ink-3); }
.lens-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.lens-chip.is-on em { color: var(--bg); opacity: .75; }
.lens-chip--add { border-style: dashed; }

/* Facts, matched skills, section headings on job cards */
.facts { display: flex; flex-wrap: wrap; gap: var(--sp-1) 6px; }
.fact {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--border);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.fact--hot { background: var(--ink); color: var(--bg); }
.skill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.skill-row__label { font-size: 12px; color: var(--ink-3); margin-right: 2px; }
.sk {
  padding: 2px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.sk--more { color: var(--ink-3); border-style: dashed; }
.job-grid .sechead,
.job-grid .divider-line { grid-column: 1 / -1; }
.sechead { display: grid; gap: 2px; padding: var(--sp-1) var(--sp-1) 0; }
.sechead b, .sechead h2 { margin: 0; font-size: 16px; color: var(--ink); font-weight: 600; }
.sechead span { font-size: 14px; color: var(--ink-3); }
.divider-line {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.divider-line::before, .divider-line::after { content: ''; height: 1px; background: var(--border-strong); flex: 1; }

/* Who can apply (job page) */
.who {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  overflow: hidden;
}
.who > div { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); display: grid; gap: 2px; min-width: 0; }
.who > div:nth-child(-n+2) { border-top: 0; }
.who dt { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.who dd { margin: 0; font-size: 14px; color: var(--ink); }
.who .who__wide { grid-column: 1 / -1; border-top: 1px solid var(--border); }
@media (max-width: 560px) { .who { grid-template-columns: minmax(0, 1fr); } .who > div:nth-child(2) { border-top: 1px solid var(--border); } }

/* Skill suggestions under the profile chip box */
.field--skill_names { position: relative; }
.skill-suggest {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  margin: var(--sp-1) 0 0;
  padding: var(--sp-1);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.skill-suggest[hidden] { display: none; }
.skill-suggest__item {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.skill-suggest__item small { color: var(--ink-3); font-size: 12px; }
.skill-suggest__item:hover, .skill-suggest__item.is-active { background: var(--bg); color: var(--ink); }


.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}
.verify-banner p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 60ch; }
.verify-banner strong { color: var(--ink); }
.verify-banner form { margin: 0; }


/* More jobs like this, closed job */
.similar { margin-top: var(--sp-7); display: grid; gap: var(--sp-4); }
.similar__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.similar__head h2 { margin: 0; font-size: 20px; }
.link-text { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.job-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .job-grid--pair { grid-template-columns: minmax(0, 1fr); } }
.job-closed { display: grid; gap: var(--sp-4); }
.job-closed__text { margin: 0; color: var(--ink-2); max-width: 56ch; }
.job-closed .btn { justify-self: start; }

/* Empty results */
.empty-state { display: grid; justify-items: center; gap: var(--sp-3); text-align: center; }
.empty-state h2 { margin: 0; font-size: 18px; }
.empty-state p { margin: 0; color: var(--ink-2); font-size: 14px; }
.empty-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.empty-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.empty-chip em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.empty-chip:hover { border-color: var(--ink); }

/* ---- Ads: side rails on wide screens; a 300 x 250 box and a sticky 320 x 50 ad below 1200px ----
   The ad code itself is pasted in the admin (Controls > Ads) and mounted by static/js/ads.js. */
.main-content--ads { max-width: none; }
.ad-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.ad-layout__main { min-width: 0; max-width: 800px; margin: 0 auto; width: 100%; }
.ad-rail { display: none; }

.ad-unit__label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: center; margin-bottom: 4px; }
.ad-unit__box { display: block; }
.ad-unit--rail .ad-unit__box { min-height: 600px; }
.ad-unit--card { margin: var(--sp-5) auto 48px; max-width: 100%; }
.ad-unit--card .ad-unit__box { min-height: 250px; display: flex; justify-content: center; }
.ad-unit:has(ins[data-ad-status="unfilled"]) { display: none; }

.cta { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-4) 0; }
.cta--top { display: none; }
.cta--top .save-form { margin-left: auto; }
.cta .btn { flex: 0 1 auto; }
@media (max-width: 1199px) { .cta--resume .btn { flex: 1 1 140px; } }

/* Phones and tablets: the Apply bar and the sticky ad */
.late-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) max(var(--sp-4), env(safe-area-inset-right, 0px)) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)) max(var(--sp-4), env(safe-area-inset-left, 0px));
  background: var(--bar-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
}
.late-bar[hidden] { display: none; }
.late-bar .btn { flex: 1 1 0; min-height: 44px; white-space: nowrap; padding: 0 var(--sp-2); font-size: 13px; }
.late-bar .save-form { flex: none; margin: 0; }
.late-bar .save-btn { border: 1px solid var(--border-strong); border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; }
body.has-late-bar { padding-bottom: 72px; }

.ad-anchor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(56px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center;
  padding: 0 44px env(safe-area-inset-bottom, 0px) var(--sp-3); background: var(--surface); border-top: 1px solid var(--border-strong);
}
.ad-anchor .ad-unit__box { width: 100%; max-width: 100%; height: 50px; overflow: hidden; display: flex; justify-content: center; }
.ad-anchor__close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); font-size: 12px; cursor: pointer;
}
body.has-anchor { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
body.has-anchor .late-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: var(--sp-3); }   /* 8px of air between the two */
body.has-anchor.has-late-bar { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 1200px) {
  /* Rails sit at the far left and right of the page; the content stays centred between them. */
  .ad-layout { grid-template-columns: var(--rail-w) minmax(0, 800px) var(--rail-w); justify-content: space-between; --rail-w: 160px; }
  .ad-rail { display: flex; position: sticky; top: var(--sp-4); }
  .ad-rail:first-child { justify-content: flex-start; }
  .ad-rail:last-child { justify-content: flex-end; }
  .ad-unit--card, .ad-anchor { display: none; }
  .cta--top { display: flex; }
  .late-bar { display: none !important; }
  body.has-late-bar, body.has-anchor, body.has-anchor.has-late-bar { padding-bottom: 0; }
}
@media (min-width: 1700px) { .ad-layout { --rail-w: 300px; } }

/* ---- Resume steps ---- */
.resume-card { padding: var(--sp-6); }
.flow-steps { display: flex; gap: var(--sp-3); flex-wrap: wrap; list-style: none; margin: 0 0 var(--sp-5); padding: 0; font-size: 13px; color: var(--ink-3); }
.flow-steps li { display: flex; align-items: center; gap: var(--sp-2); }
.flow-steps li span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; }
.flow-steps li.is-on { color: var(--ink); font-weight: 600; }
.flow-steps li.is-on span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.flow-steps li.is-done span { background: var(--border); color: var(--ink); }
.resume-card__for { margin: 0; color: var(--ink-3); font-size: 13px; }
.resume-card__title { font-size: clamp(22px, 4vw, 28px); margin: var(--sp-1) 0 var(--sp-2); }
.resume-card__lede { color: var(--ink-2); margin: var(--sp-3) 0; max-width: 62ch; }
.resume-paper { background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-5); display: grid; gap: 10px; align-content: start; max-width: 420px; min-height: 220px; margin: var(--sp-4) 0; }
.resume-paper i { display: block; height: 8px; border-radius: 4px; background: #e8e6e1; }
.resume-paper i.h { height: 13px; width: 45%; background: #2b2a26; }
.resume-paper i:nth-child(3) { width: 85%; } .resume-paper i:nth-child(4) { width: 70%; } .resume-paper i:nth-child(5) { width: 90%; } .resume-paper i:nth-child(6) { width: 60%; }
.resume-progress { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin: var(--sp-4) 0; }
.resume-progress div { height: 100%; width: 0; background: var(--ink); transition: width .5s var(--ease); }
.resume-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); color: var(--ink-3); }
.resume-tasks li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: var(--sp-2); border-radius: 50%; border: 1px solid var(--border-strong); }
.resume-tasks li.is-done { color: var(--ink); }
.resume-tasks li.is-done::before { background: var(--ink); border-color: var(--ink); }
.resume-tip { margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--ink-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 560px) { .resume-card { padding: var(--sp-4); } }

/* Invitation under the skills bar (visitors, or signed-in users with nothing to match yet) */
.lens-bar__label--first { margin-left: 0; }
.lens-nudge {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
}
.lens-nudge p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 70ch; }
.lens-nudge strong { color: var(--ink); font-weight: 600; }
.lens-nudge .btn { flex-shrink: 0; }
@media (max-width: 560px) {
  .lens-nudge { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .lens-nudge .btn { width: 100%; justify-content: center; text-align: center; }
}

/* Small marker on cards that fit the profile, shown when a filter is on (headings are off then) */
.fit-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); }
.fit-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

/* ---- Personalised "For you" header ---- */
.foryou {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
}
.foryou__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.foryou__label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.foryou__spark { flex: none; animation: foryou-twinkle 1.2s var(--ease) 1; }
.foryou__shimmer {
  background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink) 45%, var(--ink-3) 90%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: foryou-shimmer 2.4s ease-in-out 1 forwards;
}
.foryou__headline { margin: 0; font-size: clamp(20px, 3.4vw, 24px); animation: foryou-rise .5s var(--ease) .15s both; }
.foryou__chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.foryou__chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface);
  color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap;
  animation: foryou-rise .5s var(--ease) both;
}
.foryou__chip:nth-child(1) { animation-delay: .3s; }
.foryou__chip:nth-child(2) { animation-delay: .38s; }
.foryou__chip:nth-child(3) { animation-delay: .46s; }
.foryou__chip:nth-child(4) { animation-delay: .54s; }
.foryou__chip:nth-child(5) { animation-delay: .62s; }
.foryou__chip:hover { border-color: var(--ink); }
/* Desktop pointer only: chips lift and glow as the mouse nears (chip-react.js sets --prox, 0 to 1).
   Uses the separate translate/scale properties so it does not fight the entrance animation's transform. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  a.foryou__chip {
    --prox: 0;
    translate: 0 calc(var(--prox) * -3px);
    scale: calc(1 + var(--prox) * .05);
    box-shadow: 0 0 calc(var(--prox) * 16px) calc(var(--prox) * 1px) color-mix(in srgb, var(--ink) 16%, transparent);
    border-color: color-mix(in srgb, var(--ink) calc(var(--prox) * 55%), var(--border-strong));
    transition: translate .18s var(--ease), scale .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  }
}
.foryou { position: relative; }
.foryou__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.foryou__chip em { font-style: normal; margin-left: 6px; color: var(--ink-3); font-size: 12px; }
.foryou__sub { margin: 0; font-size: 13px; color: var(--ink-2); animation: foryou-rise .5s var(--ease) .35s both; }

/* The results grid is the container the streak card lays itself out against (its width, not the screen's). */
.job-grid { container-type: inline-size; container-name: jobgrid; }

/* Daily streak: a slim ticket-shaped stamp card. Desktop: top right, beside the label and
   headline so it adds no height. When the results area is narrower than 710px: its own full-width line. */
.streakcard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg);
}
.streakcard::before,
.streakcard::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  transform: translateY(-50%);
}
.streakcard::before { left: -7px; clip-path: inset(0 0 0 50%); }
.streakcard::after { right: -7px; clip-path: inset(0 50% 0 0); }
.streakcard__cap { display: grid; gap: 2px; font-size: 9px; letter-spacing: .12em; font-weight: 700; color: var(--ink-3); text-transform: uppercase; white-space: nowrap; }
.streakcard__cap b { color: var(--ink); font-size: 12px; letter-spacing: 0; text-transform: none; }
.streakcard__slots { display: flex; align-items: center; gap: 5px; }
.streakcard__slot { display: grid; place-items: center; line-height: 1; }
.streakcard__slot.is-future { opacity: .45; }
.streakcard__mini {
  width: 24px; height: 24px; border-radius: 6px; border: 1.5px dashed var(--border-strong);
  display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink-3);
}
.streakcard__mini .c { display: none; }
.streakcard__mini.is-on { border-color: var(--ink-2); color: var(--ink-2); background: var(--surface); transform: rotate(-4deg); animation: streak-fade .35s var(--ease) both; }
.streakcard__slot:nth-child(odd) .streakcard__mini.is-on { transform: rotate(3deg); }
.streakcard__stamp {
  display: grid; place-items: center; width: 38px; height: 38px; margin: -3px 0;
  border: 1.5px dashed var(--ink); border-radius: 8px; background: var(--surface); color: var(--ink);
  transform: rotate(-5deg); animation: streak-press .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
.streakcard__stamp strong { font-size: 16px; letter-spacing: -.02em; line-height: 1; }

@keyframes streak-press { from { opacity: 0; transform: rotate(-14deg) scale(1.5); } to { opacity: 1; transform: rotate(-5deg) scale(1); } }
@keyframes streak-fade { from { opacity: 0; transform: scale(.8); } }

@container jobgrid (min-width: 710px) {
  /* The card takes the right column across the label and headline rows. */
  .foryou { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-5); }
  .foryou__top { grid-column: 1; grid-row: 1; }
  .streakcard { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .foryou__headline { grid-column: 1; grid-row: 2; }
  .foryou__chips, .foryou__sub { grid-column: 1 / -1; }
}
@container jobgrid (max-width: 709px) {
  .streakcard { gap: 10px; padding: 6px 14px; }
  .streakcard__cap { gap: 1px; font-size: 9px; }
  .streakcard__cap b { font-size: 11.5px; }
  .streakcard__slots { gap: 4px; }
  .streakcard__mini { width: 21px; height: 21px; border-radius: 6px; font-size: 10px; }
  .streakcard__mini .l { display: none; }
  .streakcard__mini.is-on .c { display: inline; }
  .streakcard__stamp { width: 32px; height: 32px; }
  .streakcard__stamp strong { font-size: 14px; }
}

@container jobgrid (min-width: 480px) and (max-width: 709px) {
  /* Medium: the compact card shares the label row instead of getting its own line. */
  .foryou { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-4); }
  .foryou__top { grid-column: 1; grid-row: 1; align-self: center; }
  .streakcard { grid-column: 2; grid-row: 1; }
  .foryou__headline, .foryou__chips, .foryou__sub { grid-column: 1 / -1; }
}

@keyframes foryou-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes foryou-twinkle { 0% { transform: scale(.6) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.15) rotate(8deg); opacity: 1; } 100% { transform: none; } }
@keyframes foryou-shimmer { from { background-position: 120% 0; } to { background-position: -60% 0; } }
@media (max-width: 560px) { .foryou { padding: var(--sp-4); } }

/* ---- Homepage: one jobs box (toolbar + results), filters beside it; bottom bar on phones ---- */
.main-content--list .container { margin-top: 0; }
.jobs-box { flex: 1; min-width: 0; padding: var(--sp-4); display: block; }
#results-region { transition: opacity .18s var(--ease); }
#results-region.is-loading { opacity: .5; pointer-events: none; }

/* Desktop toolbar: Fresher / Experienced, search, sort */
.jobs-toolbar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.jobs-toolbar__label { flex: none; font-size: 13px; color: var(--ink-3); }
.jobs-toolbar__sort { margin-left: auto; flex: none; }
.jobs-search { display: flex; align-items: center; gap: var(--sp-2); flex: 1; min-width: 0; margin: 0; }
.jobs-search .field.search-field { position: relative; flex: 1 1 160px; margin: 0; min-width: 0; }
.jobs-search .field input { height: 44px; padding-left: 38px; }
.search-field__icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.jobs-search__go { height: 44px; flex: none; }
.jobs-search__back, .jobs-search__suggest { display: none; }

/* Active filters as removable tags (desktop and phone) */
.filters-summary { display: block; }
.filters-summary:not(:has(.active-row:not([hidden]))) { display: none; }
.active-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.active-row[hidden] { display: none; }
.active-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.active-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 var(--sp-3);
  border: 1px solid var(--ink); border-radius: var(--r-pill); background: var(--surface); color: var(--ink);
  font-size: 13px; white-space: nowrap;
}
.active-chip:hover { background: var(--bg); }
.active-row__clear { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.bottom-bar { display: none; }
.filter-section--sort { display: none; }
.lens-nudge { margin: 0 0 var(--sp-4); }

@media (max-width: 850px) {
  .main-content--list { padding-bottom: 104px; }
  .jobs-box { padding: var(--sp-3); }
  /* The toolbar's other parts move to the bottom bar and the filter sheet; the search form stays as the full-screen layer. */
  .jobs-toolbar { display: contents; }
  .jobs-toolbar__label, .jobs-toolbar > .seg, .jobs-toolbar__sort { display: none; }
  .filters-summary, .filters-summary:not(:has(.active-row:not([hidden]))) { display: block; margin: 0; }
  .active-chips { display: flex; }
  .active-chip { min-height: 36px; padding: 0 var(--sp-3); background: var(--surface); color: var(--ink); }
  .filter-section--sort { display: block; }

  .bottom-bar {
    position: fixed; z-index: 1000; display: flex; align-items: center; gap: 8px; padding: 6px;
    left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  }
  .bottom-bar .seg { background: var(--bg); }
  .bottom-bar .seg__opt { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .bottom-bar .filters-toggle { margin-left: auto; position: relative; min-height: 38px; padding: 0 13px; gap: 6px; font-size: 13px; }
  .bottom-bar .filters-toggle__count { position: absolute; top: -6px; right: -4px; }
  .bottom-bar__search {
    flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
    border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
  }

  /* Search: a full-screen layer */
  .jobs-search { display: none; }
  body.search-open .jobs-search {
    display: flex; flex-wrap: wrap; align-content: flex-start; gap: var(--sp-3);
    position: fixed; inset: 0; z-index: 1200; padding: var(--sp-3) var(--sp-4); overflow-y: auto; background: var(--bg);
  }
  .jobs-search__back {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px;
    border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .jobs-search .field.search-field { flex: 1 1 0; }
  .jobs-search__suggest { display: grid; flex-basis: 100%; gap: 2px; padding-top: var(--sp-3); }
  .jobs-search__title { margin: 0 0 var(--sp-1); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
  .jobs-search__item { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; border-bottom: 1px solid var(--border); color: var(--ink); font-size: 15px; }
  .jobs-search__item svg { color: var(--ink-3); }
}
@media (max-width: 370px) {
  .bottom-bar .filters-toggle__text { display: none; }
  .bottom-bar .filters-toggle { padding: 0 11px; }
}


/* Long unbroken text wraps inside its box instead of stretching the page */
.job-card, .job-card > *, .job-card__top > div, .job-detail__heading, .job-detail__desc, .foryou, .similar .job-card,
.resume-card, .sechead, .applied-note, .empty-state { min-width: 0; }
.job-card__title, .job-card__company, .job-card__desc, .job-card__meta, .job-detail__title, .job-detail__company-link,
.job-detail__desc, .job-detail__desc a, .foryou__headline, .foryou__chip, .sechead h2, .sechead span, .resume-card__for,
.resume-card__title, .meta-item, .empty-chip, .active-chip { overflow-wrap: anywhere; }
.job-detail__desc table { display: block; max-width: 100%; overflow-x: auto; }
.job-detail__desc img, .job-detail__desc video, .job-detail__desc iframe { max-width: 100%; height: auto; }
.job-detail__desc pre { max-width: 100%; overflow-x: auto; }

/* ---- Sections: header tabs (desktop), bottom tab bar (phones), hackathon cards, the You page ---- */
.site-tabs { display: flex; gap: 4px; margin-right: auto; margin-left: var(--sp-6); }
.site-tab {
  font-family: var(--font-mono); font-weight: 500; font-size: 14px; letter-spacing: 0.01em;
  color: var(--ink-2); padding: 8px 16px; border-radius: var(--r-pill); white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.site-tab:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.site-tab.is-on { background: var(--ink); color: var(--bg); }
.site-tab.is-on:hover { background: var(--ink); color: var(--bg); }
.tabbar { display: none; }
@media (max-width: 850px) {
  :root { --tabbar-h: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .site-tabs { display: none; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; height: var(--tabbar-h);
    padding-bottom: env(safe-area-inset-bottom, 0px); display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--bar-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
  }
  .tabbar__tab { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; color: var(--ink-2); min-width: 0; }
  .tabbar__tab svg { width: 22px; height: 22px; }
  .tabbar__tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .tabbar__tab[aria-current="page"]::after { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--ink); }
  body.has-tabbar { padding-bottom: var(--tabbar-h); }
  body.search-open .tabbar { display: none; }
  /* Your floating bar becomes the tools bar: it floats 8px above the tab bar and slides away while scrolling down */
  body.has-tabbar .bottom-bar { bottom: calc(var(--tabbar-h) + 8px); transition: transform .25s var(--ease), opacity .25s var(--ease); }
  body.has-tabbar .bottom-bar.is-away { transform: translateY(calc(100% + var(--tabbar-h) + 16px)); opacity: 0; pointer-events: none; }
  .main-content--me { padding-bottom: var(--sp-6); }
  /* Internships and Hackathons have no Fresher / Experienced switch: the bar shrinks to Filters and search and centres */
  .bottom-bar:not(:has(.seg)) { width: fit-content; margin-inline: auto; gap: 10px; }
  .bottom-bar:not(:has(.seg)) .filters-toggle { margin-left: 0; padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) { body.has-tabbar .bottom-bar { transition: none; } }

.hack-teaser {
  display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); color: var(--ink); font-size: 13px; grid-column: 1 / -1;
}
.hack-teaser svg { flex: none; }
.hack-teaser__text { min-width: 0; flex: 1; display: flex; gap: 4px 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.hack-teaser__text span { color: var(--ink-2); }
.hack-teaser__go { margin-left: auto; font-weight: 600; white-space: nowrap; }
.hack-teaser:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
#results-region > .hack-teaser { margin-bottom: var(--sp-4); }
@media (max-width: 560px) { .hack-teaser__go { display: none; } }

.hack-card { position: relative; }
.hack-card .job-card__top > div:last-child { padding-right: 64px; }
.hack-date {
  position: absolute; top: var(--sp-4); right: var(--sp-4); z-index: 1; display: grid; justify-items: center; width: 54px; padding: 5px 0 6px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: transparent; color: var(--ink); line-height: 1.05; pointer-events: none;
}
.hack-date small, .hack-date em { font-style: normal; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.hack-date small { font-size: 8px; }
.hack-date b { font-size: 21px; font-weight: 700; margin-top: 1px; }
.hack-group { grid-column: 1 / -1; display: flex; align-items: baseline; gap: var(--sp-3); margin-top: var(--sp-2); }
.hack-group b { font-size: 15px; }
.hack-group span { font-size: 13px; color: var(--ink-3); }
.hack-group i { flex: 1; height: 1px; background: var(--border); align-self: center; }
.hack-card__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); font-size: 13px; }
.hack-card__prize { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hack-card__prize b { font-size: 14px; font-weight: 600; }
.hack-left { font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 2px 10px; white-space: nowrap; }
.hack-left.is-urgent { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hack-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0 0; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md);
}
.hack-facts > div { min-width: 0; }
.hack-facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.hack-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.hack-facts dd .hack-left { margin-left: 6px; font-weight: 600; }
.filter-empty { margin: 0; padding: var(--sp-2) 0; font-size: 13px; color: var(--ink-3); }

.main-content--me { padding-top: var(--sp-5); }
.me-title { margin: 0 0 var(--sp-4); font-size: 24px; }
.me-list { padding: 0; overflow: hidden; margin-bottom: var(--sp-4); }
.me-row { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--border); color: var(--ink); font-size: 15px; font-weight: 500; }
.me-row:last-child { border-bottom: 0; }
.me-row__sub { color: var(--ink-3); font-weight: 400; font-size: 14px; overflow-wrap: anywhere; text-align: right; min-width: 0; }
.me-row--form { padding: 0; }
.me-row__btn { width: 100%; text-align: left; background: none; border: 0; padding: var(--sp-4); font: inherit; color: var(--ink); cursor: pointer; }
.me-join { padding: var(--sp-5); display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.me-join h2 { margin: 0; font-size: 18px; }
.me-join p { margin: 0; color: var(--ink-2); }
.me-join__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---- The apply page (second page of ads) ---- */
.apply-card { display: grid; gap: var(--sp-5); padding: var(--sp-6); min-width: 0; }
@media (max-width: 560px) { .apply-card { padding: var(--sp-4); } }
.apply-card__kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.apply-card__title { margin: var(--sp-1) 0 var(--sp-2); font-size: clamp(22px, 3.4vw, 28px); }
.apply-card__lede { margin: 0; color: var(--ink-2); }
.apply-card__summary { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
.apply-card__summary > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.apply-card__name { font-weight: 600; }
.apply-card__meta { font-size: 13px; color: var(--ink-2); }
.apply-card__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.btn-lg { min-height: 52px; padding: 0 var(--sp-6); font-size: 15px; }
@media (max-width: 560px) { .apply-card__actions .btn { flex: 1 1 100%; } }
.apply-card__h { margin: 0 0 var(--sp-2); font-size: 14px; }
.apply-tips { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-2); color: var(--ink-2); font-size: 14px; }
.apply-tips li::before { content: "\2713"; color: var(--ink); font-weight: 700; margin-right: var(--sp-2); }
/* keep ads well away from the button */
.main-content--apply .apply-card .ad-unit--card { margin-top: 48px; margin-bottom: var(--sp-2); }
/* Short phone screens: tighten the apply page so the Continue button is on the first screen */
@media (max-width: 560px) and (max-height: 720px) {
  .main-content--apply { padding-top: var(--sp-3); }
  .main-content--apply .back-link { margin-bottom: var(--sp-2); }
  .apply-card { gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
  .apply-card__title { font-size: 20px; margin-bottom: 0; }
  .apply-card__lede { display: none; }
  .apply-card__summary { padding: var(--sp-2) var(--sp-3); }
  .apply-card__h { margin-bottom: var(--sp-1); }
  .apply-tips { gap: var(--sp-1); font-size: 13px; }
  .apply-card__actions { gap: var(--sp-2); }
  .apply-card__actions .btn-lg { min-height: 48px; }
}

/* AI resume: the real pages (setup form, ready view, edit, history) */
:root { --paper: #fff; --paper-ink: #181817; --paper-muted: #5e5d59; --paper-line: #181817; }   /* a printed page stays white in dark mode */
.resume-note { margin: var(--sp-3) 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--r-md); color: var(--ink-2); }
.resume-note p { margin: 0 0 var(--sp-2); }
.resume-line { color: var(--ink-2); margin: var(--sp-3) 0; }
.resume-form { max-width: 62ch; }
.resume-form textarea { resize: vertical; line-height: 1.45; min-height: 3.2em; }
.resume-form .optional { color: var(--ink-3); font-weight: 400; }
.resume-privacy { color: var(--ink-2); font-size: 13px; margin: var(--sp-3) 0 var(--sp-4); max-width: 62ch; }
.resume-doc { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--border); border-radius: var(--r-sm); padding: clamp(16px, 4vw, 34px) clamp(16px, 4.5vw, 38px); max-width: 760px; margin: var(--sp-4) 0; font-size: 13px; line-height: 1.38; }
.resume-doc h2.resume-doc__name { font-size: 24px; font-weight: 700; line-height: 1.15; margin: 0 0 3px; letter-spacing: -.01em; }
.resume-doc__contact { margin: 0; color: var(--paper-muted); font-size: 12.5px; }
.resume-doc h3 { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 13px 0 5px; padding-bottom: 2px; border-bottom: 1px solid var(--paper-ink); }
.resume-doc p { margin: 0 0 3px; }
.resume-doc ul { margin: 1px 0 6px; padding-left: 16px; }
.resume-doc li { margin: 0 0 2px; }
.resume-doc__sub { font-weight: 700; margin-top: 5px; }
.resume-doc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.resume-doc__row .resume-doc__sub { margin-bottom: 0; }
.resume-doc__when { color: var(--paper-muted); font-size: 12.5px; text-align: right; margin: 0; }
@media (max-width: 520px) { .resume-doc__row { flex-direction: column; gap: 0; } .resume-doc__when { text-align: left; } }
.resume-match { margin: 0 0 var(--sp-3); font-size: 14px; }
.resume-match__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.resume-match__chips span { border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.resume-doc, .resume-doc * { overflow-wrap: anywhere; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.resume-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.resume-actions form { margin: 0; }
.resume-actions--wide { margin: var(--sp-4) 0 var(--sp-2); }
button.link-text { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font-family: inherit; }
.resume-edit { margin: var(--sp-5) 0; border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.resume-edit summary { cursor: pointer; font-weight: 600; margin-bottom: var(--sp-3); }
.resume-history { margin-top: var(--sp-5); border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.resume-history h2 { font-size: 16px; margin: 0 0 var(--sp-3); }
.resume-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.resume-history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-sm); }
.resume-history li.is-current { border-color: var(--ink); }
.resume-history__when { color: var(--ink-3); font-size: 13px; margin-left: var(--sp-1); }
.resume-history__tag { font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); border-radius: 99px; padding: 1px 8px; margin-left: var(--sp-1); }


/* Profile: projects and experience (rows like the certification rows, one small card per entry) */
.field--entries { margin-top: var(--sp-5); margin-bottom: 0; position: relative; }
.entries-hint { color: var(--ink-2); font-size: 13.5px; margin: 0 0 var(--sp-3); max-width: 62ch; }
.entries-fold { padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--border-strong); border-radius: var(--r-md); }
.entries-fold[hidden] { display: none; }
.entry-row { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); background: var(--bg); }
.entry-row--pending-removal { opacity: 0.4; pointer-events: none; }
.entry-row__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.entry-row__title { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.entry-row__remove { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-3); cursor: pointer; }
.entry-row__remove:hover { color: var(--ink); border-color: var(--ink-3); }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.entry-cell { min-width: 0; }
.entry-cell--full { grid-column: 1 / -1; }
.entry-cell--dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.field--entries .entry-cell label { display: block; margin-bottom: var(--sp-1); font-size: 12.5px; }
.field--entries .entry-input { width: 100%; padding: 12px 14px; font-size: 13.5px; background: var(--surface); }
.field--entries textarea.entry-input { resize: vertical; min-height: 74px; line-height: 1.45; }
.field--entries .entry-check { display: flex; align-items: center; gap: var(--sp-2); font-size: 13.5px; color: var(--ink-2); margin: 0; }
.field--entries input[type="checkbox"] { -webkit-appearance: checkbox; appearance: auto; width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--ink); }
.entry-row__error { color: var(--err); font-size: 13px; margin: var(--sp-2) 0 0; }
.field--entries .certification-add-btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 560px) { .entry-grid { grid-template-columns: minmax(0, 1fr); } }
.field--entries input.entry-row__delete { display: none; }

/* Education details and languages on the profile */
.field-block { margin: var(--sp-5) 0 var(--sp-4); }
.field-block__title { font-size: 16px; margin: 0 0 4px; }
.edu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-5); margin: var(--sp-3) 0; }
.edu-grid .field { margin-bottom: 0; }
@media (max-width: 850px) { .edu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .edu-grid { grid-template-columns: minmax(0, 1fr); } }
.edu-more { margin-top: var(--sp-3); border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); }
.edu-more summary { cursor: pointer; font-weight: 600; }
.edu-more summary span { color: var(--ink-2); font-weight: 400; }
.edu-sub { font-size: 14px; margin: var(--sp-4) 0 0; }
.field--languages { margin-top: var(--sp-4); max-width: 520px; }
.field-block .entry-check { display: flex; align-items: center; gap: var(--sp-2); font-size: 13.5px; color: var(--ink-2); margin: 0; }

.field--skill_names { margin-top: var(--sp-4); }

.field--achievements { margin-top: var(--sp-4); }

/* Degree, college and department now sit inside the education block */
.edu-grid--degree { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--sp-3); }
.edu-grid .field-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.edu-grid .field-group .field { margin-bottom: 0; }
@media (max-width: 850px) { .edu-grid--degree { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .edu-grid--degree { grid-template-columns: minmax(0, 1fr); } }

/* Multi-select drop-down (languages) */
.multi-select__menu { padding: var(--sp-2); }
.multi-option { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border-radius: var(--r-sm); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.multi-option:hover { background: var(--bg); color: var(--ink); }
.multi-option input { margin: 0; width: 16px; height: 16px; accent-color: var(--ink); flex-shrink: 0; }
.multi-option input:checked + span { color: var(--ink); font-weight: 600; }
.multi-option input:disabled + span { color: var(--ink-3); }
.multi-option:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.custom-select--native > select { display: none; }
/* beat the form's generic label/input rules inside the languages panel */
.field .multi-select__menu .multi-option { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; font-weight: 400; line-height: 1.3; }
.field .multi-select__menu .multi-option input[type="checkbox"] { -webkit-appearance: auto; appearance: auto; width: 16px; height: 16px; min-width: 16px; padding: 0; margin: 0; flex: 0 0 16px; border-radius: 3px; background: transparent; box-shadow: none; }
.field .multi-select__menu .multi-option span { font-size: 13px; }

/* Footer links and the Privacy / Terms / Contact pages */
.site-footer__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.site-footer__links a { color: var(--ink-2); text-decoration: none; }
.site-footer__links a:hover { color: var(--ink); text-decoration: underline; }
.info-page h1 { margin-bottom: 4px; }
.info-page .info-page__date { color: var(--ink-2); font-size: 13.5px; margin: 0 0 var(--sp-5); }
.info-page h2 { font-size: 18px; margin: var(--sp-5) 0 var(--sp-2); }
.info-page p, .info-page li { line-height: 1.6; max-width: 68ch; }
.info-page ul { padding-left: 20px; margin: var(--sp-2) 0; }
.info-page a { text-decoration: underline; }
.info-page .info-box { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); margin: var(--sp-4) 0; }
.info-page { padding: clamp(22px, 4vw, 44px) clamp(18px, 5vw, 52px); margin: var(--sp-5) 0 var(--sp-7); }
.info-page .info-box p { margin: 0 0 6px; } .info-page .info-box p:last-child { margin: 0; font-size: 17px; }

/* First steps: the two-stop tour with hand-drawn arrows and the "one profile, three resumes" tray (static/js/first-steps.js). */
.fs-layer { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.fs-arrow { position: absolute; inset: 0; overflow: visible; }
.fs-arrow path {
  fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: fs-draw .9s .2s ease forwards;
}
@keyframes fs-draw { to { stroke-dashoffset: 0; } }
.fs-pulse { position: absolute; border-radius: var(--r-md); border: 2px solid var(--ink); opacity: 0; }
.fs-pulse.is-on { animation: fs-ping 1.2s ease-out 2; }
@keyframes fs-ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.fs-note {
  position: absolute; width: min(260px, calc(100vw - 24px)); padding: var(--sp-3) var(--sp-4);
  background: var(--surface); color: var(--ink); border: 1.5px dashed var(--ink); border-radius: var(--r-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22); transform: rotate(-1.2deg); pointer-events: auto; animation: fs-pop .35s var(--ease);
}
@keyframes fs-pop { from { opacity: 0; transform: rotate(-1.2deg) translateY(6px); } to { opacity: 1; } }
.fs-lab { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.fs-note__h { margin: 4px 0 4px; font-size: 15px; line-height: 1.25; font-weight: 600; }
.fs-note__p { margin: 0 0 var(--sp-3); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.fs-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.fs-sp { flex: 1; }
.fs-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.fs-btn { min-height: 36px; padding: 0 var(--sp-4); }

/* The card in the middle of the page (static/js/first-steps.js): centred pop-up with a dim backdrop. */
.fs-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--sp-4); animation: fs-fade .3s var(--ease); transition: opacity .25s; }
.fs-modal.is-out { opacity: 0; }
@keyframes fs-fade { from { opacity: 0; } to { opacity: 1; } }
.fs-scrim { position: absolute; inset: 0; background: var(--scrim); }
.fs-dialog {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-5); padding: var(--sp-6) var(--sp-5) var(--sp-5); text-align: center; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .28); animation: fs-rise .45s var(--ease);
}
@keyframes fs-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.fs-card__tx { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.fs-card__h { margin: 0 0 var(--sp-2); font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
.fs-card__p { margin: 0 0 var(--sp-4); font-size: 14.5px; color: var(--ink-2); max-width: 40ch; }
.fs-card__missing { margin: -6px 0 var(--sp-4); font-size: 13px; color: var(--ink-3); }
.fs-row--center { justify-content: center; }
body.fs-modal-open { overflow: hidden; }
.fs-x { position: absolute; top: 10px; right: 12px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink-2); font-size: 16px; line-height: 1; cursor: pointer; }
.fs-viz { flex: none; display: flex; align-items: center; gap: var(--sp-3); }
.fs-prof { width: 120px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); display: grid; gap: 5px; font-size: 11.5px; }
.fs-prof b { font-size: 12.5px; }
.fs-prof span { min-height: 18px; padding: 1px 8px; border-radius: 6px; background: var(--surface); color: var(--ink-2); }
.fs-flow { width: 46px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fs-fan { position: relative; width: 150px; height: 124px; }
.fs-paper {
  position: absolute; left: calc(50% - 38px); top: 12px; width: 76px; height: 98px; padding: 7px; border-radius: 4px;
  background: var(--logo-bg); color: var(--logo-ink); border: 1px solid var(--border-strong); box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  font-size: 9.5px; opacity: 0; transition: transform .7s cubic-bezier(.2, 1.1, .3, 1) var(--d), opacity .4s var(--d);
}
.fs-fan.go .fs-paper { opacity: 1; transform: translateX(var(--x)) rotate(var(--r)); }
.fs-paper b { display: block; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-paper i { display: block; height: 4px; margin: 5px 0; border-radius: 2px; background: var(--border); }
.fs-paper i:nth-of-type(3) { width: 80%; }
@media (max-width: 480px) { .fs-dialog { padding: var(--sp-5) var(--sp-4) var(--sp-4); gap: var(--sp-4); } .fs-viz { transform: scale(.9); } .fs-card__h { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .fs-arrow path { animation: none; stroke-dashoffset: 0; }
  .fs-note, .fs-modal, .fs-dialog { animation: none; }
  .fs-paper { transition: none; }
}


/* Confirm-your-email ask (profile page, while email is switched on): static/js/confirm-ask.js */
.ca { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: var(--sp-4); }
.ca[hidden] { display: none; }
.ca__scrim { position: absolute; inset: 0; background: var(--scrim); animation: ca-fade 0.2s ease both; }
.ca__box {
  position: relative; width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 22px; display: grid; gap: 12px; box-shadow: var(--shadow-md); animation: ca-rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ca__box h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -0.015em; }
.ca__box p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.ca__icon { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--ink); }
.ca__x {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--ink-2); font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.ca__x:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ca__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
body.ca-open { overflow: hidden; }
@keyframes ca-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ca-rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ca__scrim, .ca__box { animation: none; } }

/* Forgot password while email is switched off */
.reset-manual__mail { margin: var(--sp-4) 0; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px; font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; }
.reset-manual__mail a { color: var(--ink); }
.reset-manual__steps { margin: 0 0 var(--sp-4); padding-left: 20px; color: var(--ink-2); font-size: 14px; display: grid; gap: 4px; }


/* Continue with Google (log in and sign up pages): static/js/google-signin.js */
.google-signin { display: grid; gap: var(--sp-3); justify-items: center; margin: var(--sp-4) 0; }
.google-signin__button { min-height: 44px; display: flex; justify-content: center; max-width: 100%; }
.google-signin__note { margin: 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.google-signin__fine { margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.google-signin__fine a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-or { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0; color: var(--ink-3); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }


/* ===== Profile page: strength sentence, optional sections, "Add more" (built 2026-11-15) ===== */
.profile-hero h1 { margin: 2px 0 var(--sp-2); }
.strength { --lv: var(--grey, #b9b7b1); display: grid; gap: var(--sp-3); margin: var(--sp-2) 0 var(--sp-3); max-width: 640px; }
.strength[data-level="good"] { --lv: var(--ring-amber); }
.strength[data-level="strong"] { --lv: var(--ring-green-light); }
.strength[data-level="complete"] { --lv: var(--ring-green-full); }
.strength__sentence { margin: 0; font-size: clamp(18px, 2.4vw, 24px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.28; text-wrap: balance; max-width: 34ch; }
.strength__sentence em { font-style: normal; color: color-mix(in srgb, var(--lv) 55%, var(--ink)); transition: color .4s; }
.strength[data-level="start"] .strength__sentence em { color: var(--ink-3); }
.strength__foot { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.strength__bars { display: flex; gap: 5px; }
.strength__bars i { display: block; width: 32px; height: 5px; border-radius: 3px; background: var(--border-strong); transition: background .5s; }
.strength[data-level="good"] .strength__bars i:nth-child(1),
.strength[data-level="strong"] .strength__bars i:nth-child(-n+2),
.strength[data-level="complete"] .strength__bars i { background: var(--lv); }
.strength__next { font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.strength__next::after { content: "\203A"; margin-left: 6px; color: var(--ink-3); }
.strength__next:hover { border-color: var(--ink); }
.strength__next[hidden] { display: none; }

.edu-grid--years { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.edu-grid--years .entry-check--inline { margin-top: 29px; }
@media (max-width: 850px) { .edu-grid--years .entry-check--inline { margin-top: 0; } }
.edu-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 850px) { .edu-grid--years { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .edu-grid--years, .edu-grid--two { grid-template-columns: minmax(0, 1fr); } }
.entry-check--inline { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; line-height: 1.3; color: var(--ink-2); margin: 0; }
@media (max-width: 850px) { .edu-grid--years .entry-check--inline { grid-column: 1 / -1; margin-top: 2px; } }
.entry-check--inline input[type="checkbox"] { width: 15px; height: 15px; min-width: 15px; }
.score-hint { display: block; min-height: 1.2em; margin-top: 4px; font-size: 12px; color: var(--ink-3); }

.xsections { margin-top: 0; }
.xsec { margin: var(--sp-5) 0 var(--sp-4); scroll-margin-top: 90px; }
.xsec[hidden] { display: none; }
.xsec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: 4px; }
.xsec__head h2 { font-size: 16px; margin: 0; }
.xsec__close { font: inherit; font-size: 13px; color: var(--ink-2); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 2px 0; }
.xsec__close:hover { color: var(--ink); }
.xsec__close[hidden] { display: none; }
.xsec .field { margin-bottom: 0; }
.xsec .entries-hint { margin-bottom: var(--sp-3); }
/* Several of the same thing (projects, degrees...) are not boxes: just fields, with a thin line between one and the next. */
.xsec .entry-row { position: relative; border: 0; border-radius: 0; background: none; padding: 0; margin: 0 0 var(--sp-4); }
.xsec .entry-row + .entry-row { border-top: 1px dashed var(--border-strong); padding-top: var(--sp-4); }
.xsec .entry-row__title { display: none; }
.xsec .entry-row__top { position: absolute; top: 0; right: 0; margin: 0; z-index: 1; }
.xsec .entry-row + .entry-row .entry-row__top { top: var(--sp-4); }
.xsec .entry-row__remove { width: 26px; height: 26px; border-color: transparent; background: transparent; }
.xsec .entry-row__remove:hover { border-color: var(--border-strong); }
.xsec .entry-row .entry-grid { padding-right: 30px; }

.addmore { margin-top: var(--sp-4); padding: var(--sp-5) var(--sp-6); }
@media (max-width: 640px) { .addmore { padding: var(--sp-4); } }
.addmore[hidden] { display: none; }
.addmore__title { font-size: 16px; margin: 0 0 4px; }
.addmore__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
@media (max-width: 640px) { .addmore__grid { grid-template-columns: minmax(0, 1fr); } }
.addmore__chip { font: inherit; text-align: left; color: var(--ink); background: transparent; border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 10px 13px; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.addmore__chip:hover { border-color: var(--ink); }
.addmore__chip[hidden] { display: none; }
.addmore__plus { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 14px; line-height: 1; color: var(--ink-2); }
.addmore__chip b { font-weight: 600; font-size: 13.5px; }
.addmore__chip small { color: var(--ink-3); font-size: 12px; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .strength__bars i, .strength__sentence em { transition: none; } }
.entry-check input[type="checkbox"] { -webkit-appearance: checkbox; appearance: auto; width: 16px; height: 16px; min-width: 16px; padding: 0; margin: 0; accent-color: var(--ink); }

/* City joins the first row on wide screens: five boxes in a line (three per line on a narrower desktop, one per line on a phone). */
@media (min-width: 1000px) {
  .profile-fields-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-areas: "surname name mobile email address"; column-gap: var(--sp-4); }
}

/* Every single-line box on the profile page is the same height (text boxes, drop-downs, the +91 box), so a row always lines up top and bottom. */
.profile-card .field input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]),
.profile-card .custom-select__trigger,
.profile-card .entry-input:not(textarea),
.profile-card .certification-row input:not([type="checkbox"]) {
  box-sizing: border-box;
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}
.profile-card .field-prefix { box-sizing: border-box; height: 42px; }
.profile-card .field-icon-input input { padding-left: 38px; }
@media (max-width: 480px) {
  .certification-row { flex-wrap: wrap; }
  .certification-row__title { flex: 1 1 100%; }
  .certification-row__url { flex: 1 1 0; min-width: 0; }
}
.profile-card .certification-row__remove-btn { box-sizing: border-box; width: 42px; height: 42px; flex: none; }
/* On narrower screens the "Saved" note shrinks to a tick, so it never sits on top of a long label. */
@media (max-width: 1100px) {
  .profile-card .field-status--ok { font-size: 0; }
  .profile-card .field-status--ok::before { content: "\2713"; font-size: 14px; }
}

/* ===== Layout hardening from the full-site audit (2026-11-15) ===== */
/* A fact chip with a long text (a long pay line, say) wraps inside its card instead of pushing the page wider. */
.facts { min-width: 0; max-width: 100%; }
.fact { white-space: normal; overflow-wrap: anywhere; max-width: 100%; border-radius: 14px; line-height: 1.35; }
/* The For you header never grows past its card; the streak card shrinks its stamps to fit a narrow phone. */
.foryou > * { min-width: 0; }
.streakcard { min-width: 0; max-width: 100%; }
.streakcard__slots { min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
@container jobgrid (max-width: 420px) {
  .streakcard { gap: 8px; padding: 6px 10px; }
  .streakcard__slots { gap: 3px; }
  .streakcard__mini { width: clamp(15px, 5.2cqw, 21px); height: clamp(15px, 5.2cqw, 21px); border-radius: 5px; font-size: 9px; }
  .streakcard__stamp { width: 28px; height: 28px; }
  .streakcard__stamp strong { font-size: 13px; }
}
/* The setting cards on the profile page (Jobs I want to see first, Job alerts): the control goes under the text on a phone. */
@media (max-width: 640px) {
  .alerts-card { flex-direction: column; align-items: stretch; gap: var(--sp-4); }
  .alerts-card .seg { display: flex; width: 100%; }
  .alerts-card .seg__opt { flex: 1 1 0; justify-content: center; }
  .alerts-card .switch { align-self: flex-start; }
}
/* Phone tap targets: every link and button is easy to hit with a thumb. */
@media (max-width: 700px) {
  .site-footer__links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; }
  .auth-card__footer a { display: inline-block; padding: 10px 4px; }
  .similar__head .link-text, .link-text { padding-block: 6px; }
  button.link-text { padding: 8px 6px; }
  .skill-chip__remove { position: relative; }
  .skill-chip__remove::after { content: ""; position: absolute; inset: -12px -10px; }
  .xsec .entry-row__remove, .entry-row__remove { width: 36px; height: 36px; }
  .entry-check, .check-field__label { min-height: 36px; align-items: center; }
}
/* A company logo that fails to load becomes the letter tile (static/js/logo-fallback.js). */
.job-card__logo--placeholder[data-fallback] { text-transform: uppercase; }
@media (max-width: 700px) {
  .active-row__clear, .fs-link, .non-field-errors a { display: inline-block; padding: 10px 6px; }
  .entry-check input[type="checkbox"], .check-field__label input, .filter-option input { width: 20px; height: 20px; min-width: 20px; }
  .skill-chip__remove { min-width: 22px; min-height: 22px; }
}

/* A clear keyboard focus ring on text boxes as well as the darker border they already get. */
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .entry-input:focus-visible,
.certification-row input:focus-visible, .chip-input:focus-within, .filter-search:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent);
}


/* "Other" college/department: the note that says the team has been told (replaces the Saved tick). */
.other-note { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--ring-green-full, var(--text-muted)); }
.other-note[hidden] { display: none; }

/* Course and subjects (B.A., B.Sc, B.Com, BBA, BCA at a college with courses): replaces the Department box. static/js/profile-courses.js */
.edu-grid .field-group--course { grid-column: 1 / -1; }
.edu-grid .field-group[hidden], .edu-grid .field-group--course[hidden] { display: none; }
.course-select {
  width: 100%; box-sizing: border-box; height: 42px; padding: 0 36px 0 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-overflow: ellipsis;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2373726D' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.course-bar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.course-info { font-size: 12.5px; color: var(--ink-3); }
.course-toggle { padding: 7px 16px; font-size: 13.5px; }
.course-toggle[hidden] { display: none; }
.course-more { margin: 0; font-size: 13px; color: var(--ink-2); }
.course-more:empty { display: none; }
.course-cols { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--sp-4); }
.course-cols[hidden] { display: none; }
.course-col { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.course-col__label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.course-chips { display: flex; flex-direction: column; gap: var(--sp-2); }
.course-chip {
  box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; overflow-wrap: anywhere;
}
.course-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.course-chip--ghost { border-style: dashed; color: var(--ink-2); }
.course-chip--ghost[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.course-typed { box-sizing: border-box; width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
@media (max-width: 860px) {
  .course-cols { grid-template-columns: minmax(0, 1fr); }
  .course-chips { flex-direction: row; flex-wrap: wrap; }
  .course-chip { width: auto; border-radius: var(--r-pill); min-height: 44px; }
}

/* Photo and personal details (Add more to stand out). static/js/profile-personal.js */
.pd-note { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 2px 0 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.pd-note svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.pd-note b { color: var(--ink); font-weight: 600; }
.pd-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.pd-photo { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; min-width: 0; }
.pd-photo__box { width: 132px; aspect-ratio: 3 / 4; border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); background: var(--bg); color: var(--ink-3); font: inherit; font-size: 12.5px; padding: 8px; cursor: pointer; display: grid; place-items: center; overflow: hidden; position: relative; text-align: center; }
.pd-photo__box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-photo__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.pd-fields { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.pd-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-4); }
.pd-dob { display: grid; grid-template-columns: 1fr 1.5fr 1.1fr; gap: var(--sp-2); }
.pd-pills, .pd-showrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.pd-pill { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; border-radius: var(--r-pill); padding: 8px 16px; cursor: pointer; min-height: 40px; }
.pd-pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pd-chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.pd-chips:empty { display: none; }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--border); border-radius: var(--r-pill); padding: 6px 6px 6px 14px; font-size: 14px; }
.pd-chip button { border: 0; background: none; color: var(--ink-2); font-size: 16px; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; }
.xsec .field textarea.entry-input { min-height: 60px; }
@media (max-width: 700px) { .pd-grid { grid-template-columns: minmax(0, 1fr); } .pd-photo__box { width: 120px; } }

/* Resume format: its own page before writing (two big choices), the switch on the Ready page, and the Classic preview. */
.format-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin: var(--sp-5) 0 var(--sp-3); }
@media (max-width: 560px) { .format-pick { grid-template-columns: minmax(0, 1fr); } }
.format-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-4); text-align: left; border: 1.5px solid var(--border-strong); background: var(--bg); color: var(--ink); font: inherit; border-radius: var(--r-lg); padding: var(--sp-5); cursor: pointer; min-height: 150px; transition: border-color .15s var(--ease), transform .15s var(--ease); }
.format-card:hover, .format-card:focus-visible { border-color: var(--ink); }
.format-card:active { transform: scale(.985); }
.format-card__icon { color: var(--ink-2); flex: none; }
.format-card__text { display: flex; flex-direction: column; gap: 2px; }
.format-card__text b { font-size: 18px; letter-spacing: -.01em; }
.format-card__text span { font-size: 14px; color: var(--ink-2); }
.format-note { margin: 0 0 var(--sp-7); font-size: 13px; color: var(--ink-3); }
.resume-layout { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; margin: var(--sp-3) 0; }
.resume-layout__label { font-size: 13px; color: var(--ink-3); }
.resume-layout__opt { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; border-radius: var(--r-pill); padding: 8px 16px; cursor: pointer; min-height: 38px; }
.resume-layout__opt[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.resume-doc__head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.resume-doc__photo { width: 76px; height: 101px; object-fit: cover; border: 1px solid var(--border); flex: none; }
.resume-doc__label { color: var(--ink-3); margin-right: 8px; }
.resume-doc__decl { margin-top: 12px !important; }

.pd-photo .helptext { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.field--resume_hide .entry-check { display: flex; align-items: center; gap: var(--sp-2); font-size: 14px; color: var(--ink-2); margin-top: var(--sp-2); }
.field--resume_hide .entry-check input { width: 18px; height: 18px; flex: none; }

/* Phones: the profile card's boxes run as wide as the boxes in "Add more to stand out" (same side gap), instead of sitting in from the edges. */
@media (max-width: 640px) {
  .profile-card { padding: var(--sp-5) var(--sp-4); }
  .profile-save-status { right: var(--sp-4); }
}
.xsec .lbl { font-size: 14px; font-weight: 500; color: var(--ink-2); }
