/* =========================================================
   UNIRAZAK Careers: part-time lecturer posts
   Plain CSS, mobile first. Tokens first, then components.
   Nothing loads from outside the site: system fonts, inline SVG icons.
   ========================================================= */

/* ---------- 1. Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/noto-sans-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Design tokens ----------
   Light, professional: white pages, cool greys for structure, UNIRAZAK maroon as the accent. */
:root {
  color-scheme: light;

  /* Brand, sampled from the unirazak.edu.my navigation bar */
  --brand: #7a1b30;
  --brand-strong: #5c1324;
  --brand-text: #7a1b30;
  --brand-tint: #f9eff1;
  --brand-tint-2: #f0d9de;

  /* Neutrals */
  --ink: #1a1b1f;
  --ink-2: #43454c;
  --muted: #5f6168;          /* 6.3:1 on white */
  --line: #e3e4e8;
  --line-strong: #c9cbd1;
  --control: #7c7f87;        /* form borders, 4:1 on white (WCAG 1.4.11) */
  --bg: #ffffff;
  --surface: #f6f6f7;        /* grey panels */
  --surface-2: #eeeff1;
  --card: #ffffff;

  /* Status */
  --ok: #1d6b45;   --ok-tint: #e8f4ee;   --on-ok: #ffffff;
  --warn: #7a5100; --warn-tint: #fff6dd; --warn-line: #e3c063;
  --err: #b3261e;  --err-tint: #fdeceb;

  --focus: #1a1b1f;
  --sk-1: #eeeff1; --sk-2: #f7f7f8;
  --shadow-lg: 0 24px 64px rgb(20 22 28 / 0.22);

  /* Type: Montserrat (unirazak.edu.my) for headings, Noto Sans for reading and data */
  --display: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 5rem);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--brand-tint-2); color: var(--ink); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: 0.75rem; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 8px;
  background: var(--card); color: var(--brand-text); font-weight: 700;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.2);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .wrap { padding-inline: 1.5rem; } }
.wrap--narrow { max-width: 760px; }

.icon { display: inline-block; flex: none; width: 1.25em; height: 1.25em; vertical-align: -0.25em; }

/* ---------- 3. Header and footer ---------- */
.site-header { background: var(--card); border-bottom: 3px solid var(--brand); }
body[data-page="listing"] .site-header { border-bottom: 0; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.875rem; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand__logo { display: block; height: 42px; width: auto; }
.brand__word { display: none; font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; color: var(--brand-text); }
.brand--text .brand__logo { display: none; }
.brand--text .brand__word { display: inline; }
.brand__section { padding-left: 0.875rem; border-left: 1px solid var(--line-strong); font-family: var(--display); font-weight: 600; color: var(--ink-2); }
/* Lift the logo so the UNIRAZAK wordmark, not the whole image, lines up with Careers: the swoosh
   above the word is taller than the subtitle below it. */
.brand__logo { transform: translateY(-5px); }
/* The narrowest phones: "Part-time Teaching" needs the room. */
@media (max-width: 359px) { .brand { gap: 0.5rem; } .brand__section { padding-left: 0.5rem; } }
.site-header__link { display: none; align-items: center; min-height: 44px; font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.site-header__link:hover { text-decoration: underline; }
@media (min-width: 560px) { .site-header__link { display: inline-flex; } }

.site-footer {
  margin-top: auto;
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9375rem;
}
body.has-selection .site-footer { padding-bottom: 7.5rem; }
.site-footer__inner { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .site-footer__inner { grid-template-columns: 1fr auto; align-items: center; } }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
#demo-slot { grid-column: 1 / -1; }
#demo-slot:empty { display: none; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.625rem 1.125rem;
  border: 1.5px solid transparent; border-radius: 6px; background: none;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 1.125em; height: 1.125em; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); }
.btn--outline { border-color: var(--control); background: var(--card); color: var(--ink); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand-text); }
.btn--ghost { color: var(--brand-text); }
.btn--ghost:hover { background: var(--brand-tint); }
.btn--sm { padding: 0.5rem 0.875rem; font-size: 0.875rem; }
.btn--lg { min-height: 3.25rem; padding: 0.875rem 1.5rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { opacity: 0.8; cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.spinner {
  width: 1.1em; height: 1.1em; border: 2.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 5. Hero (listing) ----------
   The one maroon band on the site: it separates the page header from the posts. */
.hero { padding: 3rem 0 3.25rem; background: var(--brand); color: #fff; }
@media (min-width: 900px) { .hero { padding: 4.5rem 0 4.75rem; } }
.hero :focus-visible { outline-color: #fff; }
.hero__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
}
.hero__lede { max-width: 40rem; margin: 0.875rem 0 0; font-size: 1.125rem; color: rgb(255 255 255 / 0.92); }
.hero__count { margin: 1rem 0 0; color: rgb(255 255 255 / 0.92); }
.hero__count strong { color: #fff; font-variant-numeric: tabular-nums; }
.hero-search { position: relative; max-width: 40rem; margin-top: 1.75rem; }
.hero-search .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.hero-search__input {
  width: 100%; min-height: 3.5rem; padding: 0.75rem 1rem 0.75rem 3rem;
  border: 0; border-radius: 6px; background: #fff; color: var(--ink); font-size: 1rem;
}
.hero-search__input::placeholder { color: var(--muted); opacity: 1; }
.hero-search__input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- 6. Listing layout and filters ---------- */
.layout { display: grid; gap: 1.5rem; padding-block: 1.5rem 3rem; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 3rem; padding-top: 2.25rem; }
}
.layout.is-empty { grid-template-columns: minmax(0, 1fr); }
.layout.is-empty .filters,
.layout.is-empty .results__bar,
.layout.is-empty .chips { display: none !important; }

.filters { display: none; }
@media (min-width: 900px) {
  .filters { display: block; align-self: start; }
}
.filters__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-bottom: 0.5rem; }
.filters__title { margin: 0; font-family: var(--display); font-size: 1.25rem; }
.filter-group { border-top: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: 1px solid var(--line); }
.filter-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.25rem; padding: 0.5rem 0;
  font-family: var(--display); font-size: 1rem; font-weight: 700; cursor: pointer; list-style: none;
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after {
  content: ""; flex: none; width: 0.875rem; height: 0.875rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
              linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
}
.filter-group[open] > summary::after { background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.filter-group__body { min-width: 0; margin: 0; padding: 0 0 0.875rem; border: 0; }
.check {
  display: flex; align-items: center; gap: 0.625rem; min-height: 44px;
  margin-inline: -0.5rem; padding: 0.25rem 0.5rem; border-radius: 8px; cursor: pointer;
}
.check:hover { background: var(--surface); }
.check input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--brand); }
.check__label { flex: 1; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.check__count { flex: none; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.check.is-zero .check__label { color: var(--muted); }

.results { min-width: 0; }
.results__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem;
  min-height: 44px; margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line);
}
.results__count { flex: 1 1 100%; margin: 0; font-family: var(--display); font-size: 1.125rem; font-weight: 700; }
.results__tools { display: flex; flex: 1 1 auto; align-items: center; justify-content: space-between; gap: 0.75rem; }
.sort { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-2); font-size: 0.9375rem; white-space: nowrap; }
.sort select { min-height: 44px; padding: 0.5rem 0.75rem; border: 1.5px solid var(--control); border-radius: 6px; background: var(--card); color: var(--ink); font-size: 0.9375rem; }
@media (min-width: 640px) {
  .results__count { flex: 1 1 auto; }
  .results__tools { flex: 0 0 auto; }
}
.results__count:focus { outline: none; }
.filters-toggle { flex: none; }
@media (min-width: 900px) { .filters-toggle { display: none; } }
.badge {
  display: inline-grid; place-items: center; min-width: 1.375rem; height: 1.375rem; padding: 0 0.375rem;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 700;
}

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%; min-height: 44px;
  padding: 0.375rem 0.625rem 0.375rem 0.875rem;
  border: 1px solid var(--brand); border-radius: 999px; background: var(--brand-tint); color: var(--brand-text);
  font-size: 0.9375rem; font-weight: 600; text-align: left; cursor: pointer;
}
.chip .icon { width: 1rem; height: 1rem; }
.chip:hover { background: var(--brand-tint-2); }
.chips__clear {
  min-height: 44px; padding: 0.375rem 0.5rem; border: 0; background: none;
  color: var(--brand-text); font-weight: 600; text-decoration: underline; cursor: pointer;
}

.side-panel { margin-top: 1.5rem; padding: 1.25rem; border-radius: 10px; background: var(--surface); }
.side-panel h2 { margin: 0 0 1rem; font-family: var(--display); font-size: 1.0625rem; }
.side-panel .timeline__text { font-size: 0.875rem; }
.side-panel .timeline__dot { background: var(--surface); }

/* ---------- 7. Posting rows ---------- */
.cards { margin: 0; padding: 0; list-style: none; }
.card {
  position: relative;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s ease;
}
.card:hover { background: #fafafb; }
.card.is-selected { background: var(--brand-tint); box-shadow: inset 4px 0 0 var(--brand); }
@media (min-width: 640px) { .card { padding: 1.75rem 1.5rem; } }

.card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--ink-2); }
.tag { display: inline-flex; align-items: center; gap: 0.3rem; }
.tag .icon { width: 1.05rem; height: 1.05rem; color: var(--muted); }
.tag--code { color: var(--brand-text); font-weight: 700; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }

.card__title { margin: 0; font-family: var(--display); font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.01em; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--brand-text); text-decoration: underline; text-decoration-thickness: 2px; }
.card__school { margin: 0.25rem 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.card__place { display: flex; align-items: flex-start; gap: 0.375rem; margin: 0.125rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.card__place .icon { width: 1.1em; height: 1.1em; margin-top: 0.2em; }

/* The spec strip: hours, sections and days, readable before any click */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; margin: 1.125rem 0 0; }
@media (min-width: 640px) {
  .card .facts { grid-template-columns: max-content max-content minmax(0, 1fr); gap: 0; }
  .card .fact { padding-inline: 1.25rem; border-left: 1px solid var(--line-strong); }
  .card .fact:first-child { padding-left: 0; border-left: 0; }
}
.fact { min-width: 0; }
.fact dt { margin: 0 0 0.125rem; color: var(--muted); font-size: 0.8125rem; }
.fact dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.fig { white-space: nowrap; font-family: var(--display); font-size: 1.3125rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.unit { color: var(--ink-2); font-size: 0.9375rem; }
.days { display: block; font-weight: 650; line-height: 1.3; }
.provisional { display: block; margin-top: 0.125rem; color: var(--muted); font-size: 0.8125rem; }

.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.card__foot > * { flex: 1 1 auto; }
@media (min-width: 640px) { .card__foot > * { flex: 0 0 auto; } }

.select-toggle {
  display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px;
  padding: 0.5rem 1rem 0.5rem 0.875rem;
  border: 1.5px solid var(--control); border-radius: 8px; background: var(--card);
  font-size: 0.9375rem; font-weight: 700; cursor: pointer; user-select: none;
}
.select-toggle input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--brand); }
.select-toggle input:focus-visible { outline: none; }
.select-toggle:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.select-toggle:hover { border-color: var(--brand); }
.select-toggle:has(input:checked) { border-color: var(--brand); background: var(--brand); color: #fff; }
.select-toggle:has(input:checked) input { accent-color: #fff; }

/* Loading skeleton */
.card--skeleton:hover { background: none; }
.sk {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--sk-1) 25%, var(--sk-2) 50%, var(--sk-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.sk--meta { width: 40%; height: 1rem; }
.sk--title { width: 65%; height: 1.625rem; margin-top: 0.75rem; }
.sk--line { width: 50%; height: 1rem; margin-top: 0.625rem; }
.sk--facts { height: 3.25rem; margin-top: 1.25rem; }
.sk--foot { width: 55%; height: 2.75rem; margin-top: 1.25rem; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Empty, no-match and error states */
.state { display: grid; justify-items: center; gap: 0.5rem; padding: 3rem 1.5rem; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }
.state__icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); }
.state__icon .icon { width: 1.625rem; height: 1.625rem; }
.state--error .state__icon { background: var(--err-tint); color: var(--err); }
.state__title { margin: 0.25rem 0 0; font-family: var(--display); font-size: 1.375rem; }
.state__text { max-width: 32rem; margin: 0 0 0.75rem; color: var(--ink-2); }

/* Alerts and notices */
.alert {
  display: flex; align-items: flex-start; gap: 0.75rem; margin: 0 0 1rem; padding: 1rem 1.125rem;
  border: 1px solid; border-left-width: 5px; border-radius: 10px; color: var(--ink);
}
.alert > .icon { margin-top: 0.1rem; }
.alert p { margin: 0; }
.alert .alert__title { margin-bottom: 0.125rem; font-weight: 700; }
.alert--warn { border-color: var(--warn-line); background: var(--warn-tint); }
.alert--warn > .icon { color: var(--warn); }
.alert--error { border-color: var(--err); background: var(--err-tint); }
.alert--error > .icon { color: var(--err); }
.alert--info { border-color: var(--line); border-left-color: var(--brand); background: var(--surface); }
.alert--info > .icon { color: var(--brand-text); }
.alert:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- 8. Selection bar ---------- */
.selection-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--card); color: var(--ink);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgb(20 22 28 / 0.08);
  animation: rise 0.22s ease-out;
}
.selection-bar__inner { display: flex; align-items: center; gap: 0.75rem; }
.selection-bar__text { flex: 1; min-width: 0; margin: 0; }
.selection-bar__text strong { color: var(--brand-text); font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.selection-bar__note { display: block; font-size: 0.8125rem; color: var(--muted); }
.selection-bar__note:empty { display: none; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- 9. Sheets (posting detail, mobile filters) ---------- */
dialog.sheet {
  width: min(44rem, calc(100% - 2rem));
  max-width: none;
  max-height: min(88vh, 56rem);
  max-height: min(88dvh, 56rem);
  padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
dialog.sheet::backdrop { background: rgb(20 10 13 / 0.55); }
.sheet__inner { display: flex; flex-direction: column; max-height: inherit; }
.sheet__grab { display: none; width: 2.5rem; height: 0.3125rem; margin: 0.5rem auto 0; border-radius: 999px; background: var(--line-strong); }
.sheet__head { position: relative; flex: none; padding: 1.25rem 4rem 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.sheet__head .card__tags { margin-bottom: 0.5rem; }
.sheet__title { margin: 0; font-family: var(--display); font-size: 1.625rem; }
.sheet__school { margin: 0.375rem 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.sheet__close { position: absolute; top: 0.625rem; right: 0.625rem; }
.sheet__body { flex: 1 1 auto; min-height: 0; padding: 1.25rem; overflow-y: auto; overscroll-behavior: contain; }
.sheet__section { margin-top: 1.75rem; }
.sheet__section h3 { margin: 0 0 0.5rem; font-family: var(--display); font-size: 1.125rem; }
.sheet__section p { margin: 0; color: var(--ink-2); }
.sheet__section .quals { margin: 0; padding-left: 1.25rem; color: var(--ink-2); }
.sheet__section .quals li + li { margin-top: 0.25rem; }
.facts--detail { margin: 0; padding: 1rem; border-radius: 10px; background: var(--surface); }
@media (min-width: 640px) { .facts--detail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sheet__foot {
  display: grid; gap: 0.625rem; flex: none;
  padding: 0.875rem 1.25rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--card);
}
@media (min-width: 420px) {
  .sheet__foot { grid-template-columns: 1fr 1fr; }
  .sheet__status { grid-column: 1 / -1; }
}
.sheet__status { display: flex; align-items: center; gap: 0.375rem; margin: 0; color: var(--ok); font-size: 0.9375rem; font-weight: 650; }
.sheet--filters .sheet__head { padding-block: 1rem; }
.sheet--filters .sheet__title { font-size: 1.375rem; }
.sheet--filters .filter-group:first-child { border-top: 0; }

@media (max-width: 639.98px) {
  dialog.sheet {
    width: 100%; max-height: 92vh; max-height: 92dvh;
    margin: auto 0 0; border-radius: 18px 18px 0 0;
  }
  .sheet__grab { display: block; }
  dialog.sheet[open] { animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
@media (min-width: 640px) { dialog.sheet[open] { animation: pop 0.18s ease-out; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body:has(dialog[open]) { overflow: hidden; }

/* Hiring timeline (detail sheet and thank-you page) */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline__step { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: 0.875rem; padding-bottom: 1.25rem; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step:not(:last-child)::before {
  content: ""; position: absolute; left: calc(1rem - 1px); top: 2.25rem; bottom: 0.25rem;
  width: 2px; background: var(--line);
}
.timeline__dot {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--card); color: var(--ink-2);
  font-size: 0.875rem; font-weight: 700;
}
.timeline__dot .icon { width: 1rem; height: 1rem; }
.timeline__step.is-done .timeline__dot { border-color: var(--ok); background: var(--ok); color: var(--on-ok); }
.timeline__step.is-current .timeline__dot { border-color: var(--brand); color: var(--brand-text); }
.timeline__title { margin: 0.25rem 0 0.125rem; font-weight: 700; }
.timeline__text { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- 10. Apply form ---------- */
.page { padding-block: 1.25rem 4rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 44px; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.page-title { margin: 0.5rem 0 0; font-family: var(--display); font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem); font-weight: 700; }
.lede { margin: 0.5rem 0 0; color: var(--ink-2); font-size: 1.0625rem; }

.progress {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  margin: 1.25rem -1rem; padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
@media (min-width: 640px) { .progress { margin-inline: -1.5rem; padding-inline: 1.5rem; } }
.progress__track { height: 0.5rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress__fill { width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width 0.25s ease; }
.progress__track.is-complete .progress__fill { background: var(--ok); }
.progress__label { margin: 0.375rem 0 0; color: var(--muted); font-size: 0.875rem; font-weight: 600; }

.error-summary { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 3px solid var(--err); border-radius: 10px; background: var(--card); }
.error-summary:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.error-summary h2 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary li + li { margin-top: 0.25rem; }
.error-summary a { color: var(--err); font-weight: 650; }

.form-section { margin: 0 0 1.25rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
@media (min-width: 640px) { .form-section { padding: 1.75rem; } }
.form-section__title { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1.25rem; font-family: var(--display); font-size: 1.25rem; }
.step-num {
  display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-family: var(--sans); font-size: 0.9375rem; font-weight: 700;
}

.field { position: relative; min-width: 0; margin: 0 0 1.5rem; padding: 0; border: 0; }
.field:last-child { margin-bottom: 0; }
.label { display: block; margin: 0 0 0.25rem; padding: 0; color: var(--ink); font-size: 1rem; font-weight: 700; }
h3.label { font-family: var(--sans); }
.label:focus { outline: none; }
.optional { color: var(--muted); font-weight: 400; }
.hint { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.input {
  display: block; width: 100%; min-height: 3rem; padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--control); border-radius: 8px; background: var(--card); color: var(--ink);
  font-size: 1rem; line-height: 1.4;
}
textarea.input { min-height: 7rem; resize: vertical; }
.input:hover { border-color: var(--ink-2); }
.input:focus-visible { border-color: var(--brand); outline: 3px solid var(--focus); outline-offset: 1px; }
.input--short { max-width: 22rem; }
.field.has-error { padding-left: 0.875rem; border-left: 4px solid var(--err); }
.has-error .input, .has-error .dropzone, .has-error .choice { border-color: var(--err); }
.field-error { display: flex; align-items: flex-start; gap: 0.375rem; margin: 0.5rem 0 0; color: var(--err); font-size: 0.9375rem; font-weight: 650; }
.field-error .icon { width: 1.1em; height: 1.1em; margin-top: 0.1rem; }

.choice-list { display: grid; gap: 0.5rem; }
@media (min-width: 640px) { .choice-list--row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.choice {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--control); border-radius: 8px; background: var(--card); cursor: pointer;
}
.choice:hover { border-color: var(--ink-2); }
.choice input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--brand); }
.choice input:focus-visible { outline: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice--consent { align-items: flex-start; line-height: 1.45; }
.choice--consent input { margin-top: 0.1rem; }

.picked { display: grid; gap: 0.625rem; margin: 0.5rem 0 0.75rem; padding: 0; list-style: none; }
.picked__item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  padding: 0.875rem 0.75rem 0.875rem 1rem;
  border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--surface);
}
.picked__main { min-width: 0; }
/* Honeypot: off-screen, out of the tab order; people never fill it, bots do. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.picked__kicker { margin: 0; color: var(--brand-text); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; }
.picked__kicker span + span::before { content: ""; display: inline-block; width: 0.75rem; }
.picked__title { margin: 0.125rem 0 0; font-family: var(--display); font-size: 1.0625rem; font-weight: 700; }
.picked__meta { margin: 0.125rem 0 0; color: var(--ink-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.picked__reason { display: flex; align-items: flex-start; gap: 0.375rem; margin: 0.5rem 0 0; color: var(--warn); font-size: 0.9375rem; font-weight: 650; }
.picked__reason .icon { margin-top: 0.1rem; }
.picked__reason--error { color: var(--err); }
.picked__item.is-mismatch { border-style: dashed; border-left-style: solid; border-left-color: var(--line-strong); background: var(--card); }
.picked__item.is-mismatch .picked__title,
.picked__item.is-mismatch .picked__kicker { color: var(--muted); }
.picked__item.is-duplicate { border-color: var(--err); background: var(--err-tint); }
.picked__summary { margin: 0 0 0.25rem; color: var(--ink-2); font-size: 0.9375rem; font-weight: 650; }
.picked-empty { margin: 0.5rem 0 0.75rem; padding: 1.25rem 1rem; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-2); text-align: center; }
.picked-empty p { margin: 0; }
.add-link { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 44px; font-weight: 650; }

.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem;
  min-height: 8.5rem; padding: 1.25rem;
  border: 2px dashed var(--control); border-radius: 12px; background: var(--surface);
  text-align: center; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand); background: var(--brand-tint); }
.file-input:focus-visible + .dropzone { border-color: var(--brand); outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); }
.dropzone__text strong { color: var(--brand-text); text-decoration: underline; text-underline-offset: 0.18em; }
.dropzone__sub { color: var(--muted); font-size: 0.875rem; }
.dz-drag { display: none; }
@media (hover: hover) and (pointer: fine) { .dz-drag { display: inline; } }
.file-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border: 1.5px solid var(--ok); border-radius: 10px; background: var(--ok-tint); }
.file-chip > .icon { color: var(--ok); }
.file-chip__info { flex: 1 1 10rem; min-width: 0; }
.file-chip__name { display: block; font-weight: 700; overflow-wrap: anywhere; }
.file-chip__size { color: var(--ink-2); font-size: 0.875rem; }
.file-chip__actions { display: flex; gap: 0.5rem; }

.submit-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9375rem; text-align: center; }

/* ---------- 11. Thank-you page ---------- */
.done-hero { padding-top: 1.5rem; text-align: center; }
.done-icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--ok-tint); color: var(--ok); }
.done-icon .icon { width: 2.25rem; height: 2.25rem; }
.done-hero .lede { margin-inline: auto; max-width: 32rem; }
.ref-card {
  display: grid; justify-items: center; gap: 0.5rem; margin: 2rem 0 1.25rem; padding: 1.75rem 1rem;
  border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 10px; background: var(--surface); text-align: center;
}
.ref__label { margin: 0; color: var(--ink-2); font-weight: 700; }
.ref__code {
  margin: 0; color: var(--brand-text); white-space: nowrap;
  font-size: clamp(1.625rem, 0.9rem + 4vw, 3rem); font-weight: 800; letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums slashed-zero; overflow-wrap: anywhere; user-select: all;
}
.block { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
@media (min-width: 640px) { .block { padding: 1.5rem 1.75rem; } }
.block h2 { margin: 0 0 1rem; font-family: var(--display); font-size: 1.25rem; }
.applied-list { margin: 0; padding: 0; list-style: none; }
.applied-item { display: grid; gap: 0.125rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.applied-item:first-child { padding-top: 0; }
.applied-item:last-child { padding-bottom: 0; border-bottom: 0; }
.applied-item__code { color: var(--brand-text); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; }
.applied-item__title { font-weight: 650; }
.applied-item__sem { color: var(--muted); font-size: 0.9375rem; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* ---------- 12. Privacy notice ---------- */
.prose { max-width: 68ch; }
.prose h2 { margin: 2rem 0 0.5rem; font-family: var(--display); font-size: 1.375rem; }
.prose p, .prose ul { margin: 0 0 1rem; color: var(--ink-2); }
.prose li + li { margin-top: 0.25rem; }
#bm { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.note { margin: 1.25rem 0; padding: 0.875rem 1rem; border: 1px dashed var(--warn-line); border-radius: 10px; background: var(--warn-tint); color: var(--ink); font-size: 0.9375rem; }

/* ---------- 13. Mockup controls (only rendered while CONFIG.mock is on) ---------- */
.demo-panel { border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--card); }
.demo-panel summary { display: flex; align-items: center; min-height: 44px; padding: 0.5rem 1rem; font-weight: 700; cursor: pointer; }
.demo-panel__body { padding: 0 1rem 1rem; }
.demo-panel__note { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.875rem; }
.demo-panel__group + .demo-panel__group { margin-top: 0.75rem; }
.demo-panel__label { margin: 0 0 0.375rem; font-size: 0.875rem; font-weight: 650; }
.demo-panel__buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- 14. Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .card.is-selected { outline: 2px solid CanvasText; outline-offset: -2px; }
  .select-toggle, .choice, .chip, .badge, .step-num, .timeline__dot { border: 1px solid CanvasText; }
}
@media print {
  .site-header__link, .site-footer, .selection-bar, .done-actions, #copy-ref { display: none !important; }
}
