/* QDex design system: a calm workspace.
   Cool neutral greys, white surfaces and one brand colour. Every brand tint is mixed from --brand,
   so a company palette only has to set that one value. Inter is served from here (SIL Open Font
   License), so no visitor data goes to a font host. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-var.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext-var.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  /* The one brand colour, and what reads on top of it. */
  --brand: #0f766e;
  --on-brand: #ffffff;
  --brand-ink: #0f766e; /* the brand as text on white; /brand.css darkens a light company colour */

  /* Neutrals */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --sunken: #f1f3f6;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --hover: #f3f4f6;

  /* Status */
  --ok: #15803d; --ok-soft: #f0fdf4; --ok-line: #bbf7d0;
  --warn: #b45309; --warn-soft: #fffbeb; --warn-line: #fde68a;
  --danger: #b91c1c; --danger-soft: #fef2f2; --danger-line: #fecaca;

  /* Brand tints, all derived */
  --brand-hover: color-mix(in oklab, var(--brand) 86%, black);
  --brand-soft: color-mix(in oklab, var(--brand) 8%, var(--surface));
  --brand-soft-2: color-mix(in oklab, var(--brand) 15%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 35%, var(--surface));
  --brand-text: var(--brand-ink);
  --brand-ring: color-mix(in oklab, var(--brand) 28%, transparent);

  /* The accent: the careers header and small highlights. The main colour unless the company sets one. */
  --highlight: var(--brand);
  --on-highlight: var(--on-brand);
  --highlight-ink: var(--brand-ink);
  --highlight-text: var(--highlight-ink);
  --highlight-soft: color-mix(in oklab, var(--highlight) 10%, var(--surface));

  /* Older names the components use */
  --accent: var(--brand-text);
  --accent-fill: var(--brand);
  --accent-strong: var(--brand-hover);
  --accent-soft: var(--brand-soft);
  --accent-line: var(--brand-line);
  --choice-hover: var(--brand-soft-2);
  --choice-on: var(--brand-soft-2);
  --column: var(--sunken);
  --field: var(--line-strong);
  --placeholder: var(--faint);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
  --shadow: 0 1px 3px rgb(16 24 40 / .08), 0 1px 2px rgb(16 24 40 / .04);
  --shadow-lg: 0 16px 40px -12px rgb(16 24 40 / .22);
  --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
/* White label: the company's choices arrive as attributes on <html> (greys, corners, font and the
   careers header), and its colours from /brand.css. Light greys come before the dark theme, which wins. */
:root[data-neutrals=neutral] {
  --bg: #f7f7f7; --surface: #ffffff; --surface-2: #fafafa; --sunken: #f2f2f2;
  --ink: #171717; --ink-2: #404040; --muted: #737373; --faint: #a3a3a3;
  --line: #e5e5e5; --line-strong: #d4d4d4; --hover: #f5f5f5;
}
:root[data-neutrals=warm] {
  --bg: #f8f7f4; --surface: #ffffff; --surface-2: #faf9f7; --sunken: #f3f1ed;
  --ink: #1c1917; --ink-2: #44403c; --muted: #78716c; --faint: #a8a29e;
  --line: #e7e5e4; --line-strong: #d6d3d1; --hover: #f5f5f4;
}
:root[data-corners=square] { --radius: 4px; --radius-sm: 3px; --radius-lg: 6px; }
:root[data-corners=round] { --radius: 16px; --radius-sm: 10px; --radius-lg: 22px; }
:root[data-font=system] {
  --font-head: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-font=serif] { --font-head: Georgia, Cambria, "Times New Roman", serif; }
/* Dark theme: follows the system unless the user picks one (data-theme on <html>, set by theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #0e1013; --surface: #16191d; --surface-2: #1b1f24; --sunken: #111317;
    --ink: #eceef1; --ink-2: #c9ced6; --muted: #9199a5; --faint: #6b7380;
    --line: #262b32; --line-strong: #343a43; --hover: #1f242a;
    --ok: #4ade80; --ok-soft: #10261a; --ok-line: #1f5133;
    --warn: #fbbf24; --warn-soft: #2a2110; --warn-line: #5c4512;
    --danger: #f87171; --danger-soft: #2d1416; --danger-line: #5f2328;
    --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--surface));
    --brand-soft-2: color-mix(in oklab, var(--brand) 26%, var(--surface));
    --brand-line: color-mix(in oklab, var(--brand) 50%, var(--surface));
    --brand-text: color-mix(in oklab, var(--brand) 55%, var(--ink));
    --highlight-text: color-mix(in oklab, var(--highlight) 55%, var(--ink));
    --highlight-soft: color-mix(in oklab, var(--highlight) 18%, var(--surface));
    --brand-hover: color-mix(in oklab, var(--brand) 85%, white);
    --shadow-sm: none; --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 16px 40px -12px rgb(0 0 0 / .7);
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0e1013; --surface: #16191d; --surface-2: #1b1f24; --sunken: #111317;
  --ink: #eceef1; --ink-2: #c9ced6; --muted: #9199a5; --faint: #6b7380;
  --line: #262b32; --line-strong: #343a43; --hover: #1f242a;
  --ok: #4ade80; --ok-soft: #10261a; --ok-line: #1f5133;
  --warn: #fbbf24; --warn-soft: #2a2110; --warn-line: #5c4512;
  --danger: #f87171; --danger-soft: #2d1416; --danger-line: #5f2328;
  --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--surface));
  --brand-soft-2: color-mix(in oklab, var(--brand) 26%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 50%, var(--surface));
  --brand-text: color-mix(in oklab, var(--brand) 55%, var(--ink));
  --highlight-text: color-mix(in oklab, var(--highlight) 55%, var(--ink));
  --highlight-soft: color-mix(in oklab, var(--highlight) 18%, var(--surface));
  --brand-hover: color-mix(in oklab, var(--brand) 85%, white);
  --shadow-sm: none; --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 16px 40px -12px rgb(0 0 0 / .7);
}

@media (prefers-color-scheme: dark) {
  :root[data-neutrals=neutral]:not([data-theme=light]) {
    --bg: #0f0f0f; --surface: #181818; --surface-2: #1e1e1e; --sunken: #131313;
    --ink: #ededed; --ink-2: #d4d4d4; --muted: #a3a3a3; --faint: #737373;
    --line: #2a2a2a; --line-strong: #383838; --hover: #222222;
  }
  :root[data-neutrals=warm]:not([data-theme=light]) {
    --bg: #11100e; --surface: #1a1816; --surface-2: #201e1b; --sunken: #141311;
    --ink: #f0eeeb; --ink-2: #d6d3d1; --muted: #a8a29e; --faint: #78716c;
    --line: #2c2926; --line-strong: #3a3633; --hover: #24211e;
  }
}
:root[data-neutrals=neutral][data-theme=dark] {
  --bg: #0f0f0f; --surface: #181818; --surface-2: #1e1e1e; --sunken: #131313;
  --ink: #ededed; --ink-2: #d4d4d4; --muted: #a3a3a3; --faint: #737373;
  --line: #2a2a2a; --line-strong: #383838; --hover: #222222;
}
:root[data-neutrals=warm][data-theme=dark] {
  --bg: #11100e; --surface: #1a1816; --surface-2: #201e1b; --sunken: #141311;
  --ink: #f0eeeb; --ink-2: #d6d3d1; --muted: #a8a29e; --faint: #78716c;
  --line: #2c2926; --line-strong: #3a3633; --hover: #24211e;
}

/* Round corners make buttons and badges pills; square ones square the logo too. */
[data-corners=round] button:not(.icon-button), [data-corners=round] a.button, [data-corners=round] .cta,
[data-corners=round] .pill, [data-corners=round] .tag, [data-corners=round] .chip { border-radius: 999px; }
[data-corners=round] .logo { border-radius: 50%; }
[data-corners=square] .logo { border-radius: 4px; }
[data-font=serif] h1, [data-font=serif] h2, [data-font=serif] .preview-hero h2 { font-weight: 600; letter-spacing: -.005em; }

* { box-sizing: border-box; }
/* The workspace is dense: 14px text, everything in rem scales with it. The public site keeps 16px. */
html { font-size: 14px; }
html:has(body.public) { font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.5 var(--font-text);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-text); text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: 1.6rem; margin: 0; line-height: 1.25; letter-spacing: -.022em; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; line-height: 1.35; }
::selection { background: var(--brand-soft-2); }

main { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
section, .section { margin-top: 1.25rem; }

/* The workspace shell: a sidebar and the page. */
.shell {
  display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, var(--surface) 235px, var(--line) 235px 236px, var(--bg) 236px);
}
/* Links inside the workspace read as links by colour; the underline comes on hover. */
.shell main a:not(.button):not(.pill):not(.chip) { text-decoration: none; }
.shell main a:not(.button):not(.pill):not(.chip):hover { text-decoration: underline; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .25rem;
  padding: .9rem .7rem; background: var(--surface); border-right: 1px solid var(--line);
}
.side-brand {
  display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem 1.1rem;
  font-weight: 650; font-size: 1.1rem; letter-spacing: -.015em; color: var(--ink); text-decoration: none;
}
.logo {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px;
  font-size: .95rem; font-weight: 700; color: var(--on-brand); background: var(--brand);
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / .12);
}
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: var(--radius-sm);
  font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.side-nav a .icon { flex: none; color: var(--faint); }
.side-nav a:hover { color: var(--ink); background: var(--hover); }
.side-nav a:hover .icon { color: var(--muted); }
.side-nav a[aria-current=page] { color: var(--brand-text); background: var(--brand-soft); font-weight: 600; }
.side-nav a[aria-current=page] .icon { color: var(--brand-text); }
.side-user { display: flex; align-items: center; gap: .6rem; padding: .8rem .35rem 0; border-top: 1px solid var(--line); }
.avatar {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  font-size: .85rem; font-weight: 600; color: var(--highlight-text); background: var(--highlight-soft);
}
.who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.who strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: .85rem; color: var(--muted); }
.side-actions { display: flex; gap: 2px; }
button.icon-button {
  display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0;
  color: var(--muted); background: none; border: 0; box-shadow: none; border-radius: var(--radius-sm);
}
button.icon-button:hover { color: var(--ink); background: var(--hover); }
.icon-button .icon { width: 18px; height: 18px; }
main.page { width: 100%; max-width: 1240px; min-width: 0; padding: 1.75rem 2.25rem 4rem; }
.signed-out main.page { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem 1rem; }

@media (max-width: 900px) {
  .shell { display: block; background: var(--bg); }
  .sidebar {
    z-index: 10; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand user" "nav nav"; gap: .35rem .5rem; padding: .5rem .75rem .35rem;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-brand { grid-area: brand; padding: .2rem .25rem; }
  .side-nav { grid-area: nav; flex-direction: row; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
  .side-nav a { flex: none; padding: .4rem .65rem; }
  .side-user { grid-area: user; padding: 0; border: 0; }
  .who { display: none; }
  main.page { padding: 1.25rem 1rem 3rem; }
}

.heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: .25rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; margin-bottom: .75rem; box-shadow: var(--shadow-sm);
}
section.card { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.row.bottom { align-items: flex-end; }
/* Fields and buttons share one height, so anything placed side by side lines up. */
input:not([type=checkbox]):not([type=radio]), select, button:not(.link) { min-height: 2.5rem; }
.inline > .choice, .row > .choice { align-self: flex-end; align-items: center; min-height: 2.5rem; margin: 0; }
.inline > .choice input, .row > .choice input { margin-top: 0; }
.grow { flex: 1 1 14rem; min-width: 0; }
.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; margin-top: .5rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; }

label { display: block; font-size: .93rem; font-weight: 500; color: var(--ink-2); }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .45rem .7rem;
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in oklab, var(--line-strong) 70%, var(--ink)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; line-height: 1.55; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .4rem .9rem; font: 500 1rem/1.4 var(--font-text); color: var(--ink); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
a.button { min-height: 2.5rem; }
button:hover, a.button:hover { background: var(--hover); }
button.primary, a.button.primary { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
button.primary:hover, a.button.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.danger { color: var(--danger); border-color: var(--danger-line); }
button.danger:hover { background: var(--danger-soft); }
button.link {
  display: inline; padding: 0; font-weight: 500; color: var(--brand-text); background: none; border: 0; box-shadow: none;
}
button.link:hover { background: none; text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.danger { color: var(--danger); }
.help { margin: 0; font-size: .88rem; color: var(--muted); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .5rem; font-size: .85rem; font-weight: 500;
  line-height: 1.5; white-space: nowrap; color: var(--ink-2); background: var(--sunken);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.pill.accent { color: var(--brand-text); background: var(--brand-soft); border-color: var(--brand-line); }
.pill.closed { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }

.banner {
  margin: 0 0 1rem; padding: .65rem .9rem; color: var(--ink); background: var(--brand-soft);
  border: 1px solid var(--brand-line); border-radius: var(--radius-sm);
}
.banner.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.banner.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.banner.error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }

.login { width: 100%; max-width: 25rem; margin: 0; padding: 2rem; box-shadow: var(--shadow-lg); }
.login .side-brand { padding: 0 0 1.5rem; }
.login h1 { font-size: 1.4rem; }
.login button.primary { margin-top: .5rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; border-bottom: 1px solid var(--line); }
.tabs a { margin-bottom: -1px; padding: .55rem .1rem; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.filters input, .filters select { width: auto; margin: 0; flex: 1 1 14rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th {
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  text-align: left; white-space: nowrap; background: var(--surface-2);
}
th, td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 500; text-decoration: none; }
td a:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 1fr);
  gap: .75rem; margin-top: 1rem; overflow-x: auto; padding-bottom: .5rem;
}
.column { margin: 0; padding: .65rem; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius); }
.column h2 { padding: 0 .2rem; font-size: .9rem; }
.count { font-weight: 500; color: var(--muted); }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; margin-bottom: .45rem; padding: .6rem .75rem;
  color: var(--ink); text-decoration: none; transition: border-color .12s, box-shadow .12s;
}
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.25rem; align-items: start; margin-top: 1rem; }
.main-col > section:first-child, .side-col > section:first-child { margin-top: 0; }
.side-col section { margin-top: 0; }

.facts, .answers { margin: .4rem 0 0; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .2rem .9rem; }
.facts dt, .answers dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.answers dt { font-size: .88rem; }
.answers dd { margin: 0 0 .5rem; }

.actions { display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
summary { cursor: pointer; font-weight: 500; color: var(--brand-text); }
details[open] > summary { margin-bottom: .4rem; }
.side-col details { margin-top: .6rem; }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .2rem 0; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-col { order: -1; }
}

@media (max-width: 640px) {
  .table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { margin-bottom: .6rem; padding: .35rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  td { padding: .3rem .9rem; border: 0; }
  td[data-label] { text-align: left; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--muted); }
}

/* Forms, as candidates see them and in the builder preview */
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; font-size: .93rem; font-weight: 500; color: var(--ink-2); }
.question { display: flex; flex-direction: column; gap: .2rem; }
.question > label:first-child { margin-bottom: 0; }
.question.invalid input:not([type=checkbox]):not([type=radio]), .question.invalid textarea, .question.invalid select { border-color: var(--danger); }
.problem { margin: 0; font-size: .9rem; color: var(--danger); font-weight: 500; }
.req { color: var(--danger); }
.choice { display: flex; align-items: flex-start; gap: .5rem; margin: .3rem 0; font-weight: 400; font-size: 1rem; color: var(--ink); }
.choice input { width: auto; margin: .25rem 0 0; flex: none; }
input[type=file] { padding: .35rem; background: var(--surface-2); }
input:disabled, select:disabled, textarea:disabled { background: var(--sunken); color: var(--muted); box-shadow: none; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92rem; }
code {
  padding: .05rem .3rem; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem;
  background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere;
}

/* Steps editor */
.step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.step-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: 0; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.75rem; height: 1.75rem; font-size: .85rem; font-weight: 600; color: var(--brand-text);
  background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 50%; font-variant-numeric: tabular-nums;
}
.step-row .inline label.grow { min-width: 10rem; }
button:disabled { opacity: .4; cursor: default; }

/* Form builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 1rem; }
.builder > aside { position: sticky; top: 1rem; }
.question-card:target { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.question-card details { margin-top: .6rem; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .4rem; margin-top: .4rem; }
.type-option {
  display: flex; gap: .5rem; align-items: flex-start; padding: .5rem .6rem; font-weight: 400;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface);
}
.type-option input { width: auto; margin: .2rem 0 0; flex: none; }
.type-option span { display: flex; flex-direction: column; }
.type-option:hover { border-color: var(--line-strong); }
.type-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.preview .tf { margin: 1rem 0 0; padding: 0; border: 0; }
.preview .tf-form { gap: 1.5rem; margin: 0; }
.preview .slide > .question > label:first-child, .preview .slide > .question > fieldset > legend, .preview .slide > fieldset > legend, .preview fieldset.slide > legend { font-size: 1.1rem; }
.preview .tf input:not([type=checkbox]):not([type=radio]):not([type=file]), .preview .tf textarea { font-size: 1.05rem; }
.preview .tf fieldset .choice { font-size: 1rem; }

@media (max-width: 860px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder > aside { position: static; }
}

/* Public site: white pages, a soft brand-tinted hero and the brand colour for actions. */
body.public { background: var(--surface); }
body.public .topbar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; padding: .8rem 1.25rem;
  background: color-mix(in oklab, var(--surface) 88%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; font-size: 1.05rem; letter-spacing: -.015em; color: var(--ink); text-decoration: none; }
.brand .logo { width: 26px; height: 26px; font-size: .85rem; border-radius: 7px; }
main.narrow { max-width: 46rem; }
.hero {
  color: var(--ink);
  background:
    radial-gradient(48rem 22rem at 90% -30%, color-mix(in oklab, var(--highlight) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--highlight-soft), var(--surface));
  border-bottom: 1px solid var(--line);
}
[data-hero=solid] .hero { color: var(--on-highlight); background: var(--highlight); border-bottom-color: transparent; }
[data-hero=solid] .hero h1, [data-hero=solid] .hero h2, [data-hero=solid] .hero .eyebrow, [data-hero=solid] .hero .meta,
[data-hero=solid] .hero .meta span + span::before { color: inherit; }
[data-hero=solid] .hero .eyebrow, [data-hero=solid] .hero .meta { opacity: .85; }
[data-hero=solid] .hero .cta { color: var(--highlight-ink); background: var(--surface); }
[data-hero=plain] .hero { background: var(--surface); }
.hero-inner { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1rem 3rem; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.eyebrow { margin: 0 0 .75rem; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--highlight-text); }
.hero .meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .9rem 0 0; color: var(--muted); }
.hero .meta span + span::before { content: "·"; margin-right: 1.25rem; color: var(--faint); }
.cta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.75rem; padding: .7rem 1.3rem;
  font-weight: 600; font-size: 1rem; color: var(--on-brand); text-decoration: none;
  background: var(--brand); border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: background .15s;
}
.cta:hover { background: var(--brand-hover); }
.cta::after { content: "→"; transition: transform .15s; }
.cta:hover::after { transform: translateX(3px); }
.description { margin: 2rem 0; font-size: 1.05rem; line-height: 1.7; color: var(--ink-2); }
.description h2 { margin: 1.9rem 0 .5rem; font-size: 1.2rem; color: var(--ink); }
.description p { margin: 0 0 1rem; }
.description ul, .description ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.description li { margin: .25rem 0; padding-left: .25rem; }
.description ul li::marker { color: var(--highlight); }
.sticky-apply { display: none; }
@media (max-width: 700px) {
  .sticky-apply {
    display: flex; position: sticky; bottom: 1rem; z-index: 5; justify-content: center; margin: 0 0 1.5rem;
    box-shadow: var(--shadow-lg);
  }
}
.next { max-width: 30rem; margin: 2rem auto 1.5rem; padding: 1.25rem 1.5rem; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.next h2 { font-size: 1.1rem; }
.next ol { margin: 0; padding-left: 1.2rem; }
.next li { margin: .35rem 0; }
.tf input[type=file] {
  width: 100%; padding: 1.5rem 1rem; font: inherit; color: var(--muted); cursor: pointer;
  background: var(--surface-2); border: 2px dashed var(--line-strong); border-radius: var(--radius);
}
.tf input[type=file]:hover, .tf input[type=file]:focus { border-color: var(--brand); }
.tf input[type=file]::file-selector-button {
  margin-right: 1rem; padding: .55rem 1.1rem; font: 600 1rem var(--font-text); color: var(--on-brand); cursor: pointer;
  background: var(--brand); border: 0; border-radius: var(--radius-sm);
}
.page-title { margin: 2.5rem 0 1.25rem; font-size: 2rem; letter-spacing: -.025em; }
.job-link {
  display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: .75rem; padding: 1.1rem 1.25rem; color: var(--ink); text-decoration: none;
  border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.job-link strong { display: block; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.job-link::after { content: "→"; font-size: 1.3rem; color: var(--brand-text); transition: transform .15s; }
.job-link:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.job-link:hover::after { transform: translateX(4px); }
.notice { margin-top: 2.5rem; padding: 2rem 1.5rem; text-align: center; }
.notice h1 { margin-bottom: .5rem; }
.done-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem;
  margin-bottom: 1rem; font-size: 1.6rem; color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-line); border-radius: 50%;
}

/* Application flow: one question per screen when apply.js runs, a plain stacked form otherwise. */
.tf { margin: 0 0 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.tf > h2 { font-size: 1.6rem; margin: 1.25rem 0 .25rem; }
.tf-form { counter-reset: q; display: flex; flex-direction: column; gap: 2.5rem; margin-top: 1.5rem; }
.slide { counter-increment: q; position: relative; padding-left: 2.6rem; }
.slide::before {
  content: counter(q) "→"; position: absolute; left: 0; top: .3rem;
  font: 600 .95rem var(--font-head); color: var(--brand-text); white-space: nowrap;
}
.slide > .question > label:first-child, .slide > .question > fieldset > legend, .slide > fieldset > legend, fieldset.slide > legend {
  font: 600 1.4rem/1.3 var(--font-head); letter-spacing: -.02em; color: var(--ink); margin-bottom: .35rem;
}
/* A legend is drawn outside its fieldset's box; floating it keeps the number level with the question. */
fieldset.slide > legend { float: left; width: 100%; }
fieldset.slide > legend + * { clear: both; }
.tf .help { font-size: .95rem; }
.tf .problem { font-size: .95rem; }
.tf input:not([type=checkbox]):not([type=radio]):not([type=file]), .tf textarea {
  margin-top: .5rem; padding: .5rem .1rem; font-size: 1.3rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; box-shadow: none;
}
.tf input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, .tf textarea:focus { outline: none; border-bottom-color: var(--brand); box-shadow: none; }
.tf input::placeholder, .tf textarea::placeholder { color: var(--placeholder); }
.tf .question.invalid input:not([type=checkbox]):not([type=radio]), .tf .question.invalid textarea { border-bottom-color: var(--danger); }
.tf textarea { min-height: 6rem; }
.tf input[type=file] { margin-top: .5rem; padding: .9rem; font-size: 1rem; background: var(--surface-2); border: 2px dashed var(--line-strong); border-radius: var(--radius); box-shadow: none; }
.tf .fields { gap: 1rem 1.5rem; }
.tf .fields label { font-size: .95rem; font-weight: 500; color: var(--muted); }

/* Choices as boxes with a letter, which is also the keyboard shortcut. */
.tf fieldset { counter-reset: opt; }
.tf fieldset .choice {
  counter-increment: opt; position: relative; display: flex; align-items: center; gap: .75rem;
  max-width: 26rem; margin: .5rem 0 0; padding: .6rem .8rem; font-size: 1.1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s;
}
.tf fieldset .choice::before {
  content: counter(opt, upper-alpha); display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.6rem; height: 1.6rem; font: 600 .8rem var(--font-head); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 5px;
}
.tf fieldset .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tf fieldset .choice:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.tf fieldset .choice:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tf fieldset .choice:has(input:checked)::before { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.tf fieldset .choice:has(input:checked)::after { content: "✓"; margin-left: auto; color: var(--accent); font-weight: 700; }
.tf fieldset .choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tf fieldset .choice:has(input:disabled) { cursor: default; }
.tf .consent { font-size: 1.05rem; }
.tf .consent input { width: 1.15rem; height: 1.15rem; }
.tf .submit { margin-top: 1rem; padding: .75rem 1.5rem; font: 600 1.05rem var(--font-head); }
.tf-ok { display: flex; align-items: center; gap: .9rem; margin-top: 1.25rem; }
.tf-ok button { padding: .55rem 1.25rem; font: 600 1rem var(--font-head); }
.tf-hint { font-size: .85rem; color: var(--muted); }

/* With the script: one question at a time. */
.tf-on .tf-form { gap: 0; }
.tf-on .slide { display: none; min-height: min(58vh, 30rem); padding-top: 1.5rem; padding-bottom: 1.5rem; }
.tf-on .slide::before { content: attr(data-n) "→"; top: 1.8rem; }
.tf-on .slide.active { display: block; animation: tf-in .35s ease both; }
.tf-on .slide.active.back { animation-name: tf-back; }
.tf-on .slide.active.shake { animation: tf-shake .3s; }
@keyframes tf-in { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
@keyframes tf-back { from { opacity: 0; transform: translateY(-1.5rem); } to { opacity: 1; transform: none; } }
@keyframes tf-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.tf-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 1rem; padding: .6rem 0; background: var(--surface); }
.tf-progress { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.tf-progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.tf-count { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tf-nav { display: flex; gap: 2px; }
.tf-nav button { min-height: 0; width: 2.4rem; height: 2.1rem; padding: 0; font-size: 1rem; color: var(--on-brand); background: var(--brand); border: 0; border-radius: 0; box-shadow: none; }
.tf-nav button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.tf-nav button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tf-nav button:hover:not(:disabled) { background: var(--accent-strong); }
@media (prefers-reduced-motion: reduce) {
  .tf-on .slide.active, .tf-on .slide.active.shake { animation: none; }
  .cta::after, .job-link::after, .tf-progress span { transition: none; }
}
@media (max-width: 640px) {
  .slide, .tf-on .slide { padding-left: 0; }
  .slide::before, .tf-on .slide::before { position: static; display: block; margin-bottom: .3rem; }
  .slide > .question > label:first-child, .slide > .question > fieldset > legend, .slide > fieldset > legend, fieldset.slide > legend { font-size: 1.2rem; }
  .tf input:not([type=checkbox]):not([type=radio]):not([type=file]), .tf textarea { font-size: 1.15rem; }
  .tf-hint { display: none; }
}

/* AI check: results are advice for HR, shown with the quote that supports them. */
.ai-results { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; }
.ai-result { display: flex; flex-direction: column; gap: .4rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.ai-result:last-child { border-bottom: 0; }
.pill.verdict.met { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.pill.verdict.partial { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.pill.verdict.not_met { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.pill.verdict.missing { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.quote {
  margin: 0; padding: .45rem .8rem; border-left: 3px solid var(--brand-line); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere;
}
.quote.unverified { border-left-color: var(--warn); text-decoration: line-through; text-decoration-color: var(--warn); }
.conclusion { margin-top: .75rem; padding: .75rem .9rem; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); }
.conclusion p { margin: .25rem 0 0; }

/* Settings: standard questions */
h3 { font-size: 1rem; margin: 0 0 .25rem; }
h4 { font-size: .93rem; margin: .9rem 0 .25rem; color: var(--muted); }
.fixed-name { align-self: center; min-width: 7rem; }
.fixed-req { align-self: flex-end; min-height: 2.5rem; display: inline-flex; align-items: center; }

/* AI state in the candidate list */
a.pill.ai { text-decoration: none; margin-left: .35rem; vertical-align: 1px; }
a.pill.ai.done { color: var(--brand-text); background: var(--brand-soft); border-color: var(--brand-line); }
a.pill.ai.reviewed { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
a.pill.ai.failed { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }

/* AI writing help */
.warn-words { margin-top: .3rem; color: var(--warn); }
.edit-card .row { align-items: center; flex-wrap: wrap; }
.edit-card label.check { display: flex; align-items: center; gap: .4rem; font-size: 1rem; cursor: pointer; }
.edit-card label.check input { width: auto; margin: 0; }
.edit-card:has(input[type=checkbox]:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .75rem; }
.diff p.del { margin: .2rem 0 0; padding: .45rem .55rem; color: var(--ink); background: var(--danger-soft); border-radius: var(--radius-sm); text-decoration: line-through; text-decoration-color: var(--danger); }
.diff textarea.ins { background: var(--ok-soft); border-color: var(--ok); font-weight: 400; }
@media (max-width: 700px) { .diff { grid-template-columns: 1fr; } }
.question-card.flagged { border-left: 3px solid var(--warn); }
.note { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.note p { margin: .3rem 0 0; }

/* Settings tables: a header names the languages once (English first); rows share its columns.
   Columns: what the row is, English, Italian, actions. A language cell of a fixed question holds
   its text and explanation side by side. */
.ltable { --ltable-cols: 9rem minmax(0, 1fr) minmax(0, 1fr) 12.5rem; }
.lrow { display: grid; grid-template-columns: var(--ltable-cols); gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.lhead { padding: 0 0 .45rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); align-items: end; }
.lhead .lang-name { grid-column: 1 / -1; color: var(--ink-2); font-size: .8rem; }
.lrow .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
.lrow label { font-weight: 400; }
.lrow input, .lrow select { margin-top: 0; }
.lrow .actions { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: .5rem; margin-top: 0; }
.lrow .actions form { margin: 0; }
.lrow .actions .choice { margin: 0; }
.lrow .pill { justify-self: start; }
form.contents { display: contents; }
.new-row { margin-top: .25rem; padding-top: .9rem; border-top: 1px dashed var(--line); border-bottom: 0; }
.cell-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
input.missing { border-color: var(--warn); }
@media (max-width: 900px) {
  .lrow { grid-template-columns: 1fr; gap: .5rem; padding: .9rem 0; }
  .lhead { display: none; }
  .cell-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: block; margin-bottom: .2rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
  .lrow .actions { justify-content: flex-start; }
}
@media (max-width: 500px) { .lrow .pair { grid-template-columns: 1fr; } }

/* The standard questions editor: the question as written, then a box per translation. */
.lang-box { min-width: 0; margin: 0; padding: .7rem .85rem .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.lang-box legend { padding: 0 .35rem; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.lang-box > label + label, .lang-box > div { margin-top: .4rem; }
.edit-card.blocked, .edit-card.blocked:has(input[type=checkbox]:checked) { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* Candidate list: sortable headers and the result count */
th a.sort { color: inherit; text-decoration: none; }
th a.sort:hover { color: var(--ink); text-decoration: none; }
th[aria-sort] a.sort { color: var(--ink); }
.list-count { margin: .25rem 0 .6rem; }
.filters[data-autosubmit] { display: block; }
.filter-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: .5rem; }
.filter-main > *, .filter-more select { width: 100%; min-width: 0; margin: 0; }
.filter-main > button { width: auto; white-space: nowrap; }
.filter-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .5rem; margin-top: .5rem; }
.js .filter-more:not(.open) { display: none; }
.filter-main .phone-only { display: none; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: .8rem; font-weight: 600; line-height: 1.45; text-align: center; }
.chip { display: inline-flex; gap: .3rem; align-items: center; margin: 0 .15rem; padding: .05rem .55rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-weight: 500; text-decoration: none; }
.chip:hover { border-color: var(--danger-line); color: var(--danger); background: var(--danger-soft); }
@media (max-width: 640px) {
  .filter-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filter-main input[type=search], .filter-main select[name=job] { grid-column: 1 / -1; }
  .filter-main .phone-only { display: block; grid-column: 1 / -1; }
  .filter-more { grid-template-columns: minmax(0, 1fr); }
}
.note-card { margin-top: 1rem; }
.users-table { --ltable-cols: minmax(0, 1.6fr) 10rem 13rem 8.5rem 6.5rem; }
.removed-table { --ltable-cols: minmax(0, 1fr) 10rem 8rem; }
.lrow .person { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.lrow .person > span { overflow: hidden; text-overflow: ellipsis; }
.new-row .person { gap: .5rem; }
.js .js-hide { display: none; }
.users-table .actions { justify-content: flex-start; }
.users-table .actions label { width: 100%; }
.email-langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: .75rem; }
.email-preview { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }

/* The candidate page: who, where they are, what happened, what to do. */
.app-head { margin-top: .25rem; padding: 1.25rem 1.4rem; }
.app-head h1 { margin: 0; }
.pill.status.active { color: var(--brand-text); background: var(--brand-soft); border-color: var(--brand-line); }
.pill.status.hired { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.pill.status.rejected, .pill.status.withdrawn { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.app-head .pill.status { font-size: .93rem; padding: .15rem .65rem; }
.contact-line { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: .6rem; }
.contact-line a { overflow-wrap: anywhere; }
.summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1px; margin: 1rem 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.summary > div { padding: .6rem .8rem; background: var(--surface); min-width: 0; }
.summary dt { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.summary dd { display: flex; flex-direction: column; margin: .15rem 0 0; overflow-wrap: anywhere; }
.summary > div.late { background: var(--warn-soft); }
.summary > div.late dd, .summary > div.late dt { color: var(--warn); }

.tracker { display: flex; list-style: none; margin: 1rem 0 0; padding: 0; overflow-x: auto; }
.tracker li { flex: 1 1 0; min-width: 7rem; position: relative; }
.tracker li::before { /* the line to the previous step */
  content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--line);
}
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.current::before, .tracker li.fail::before { background: var(--brand); }
.tracker a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: 0 .25rem; color: var(--ink); text-align: center; text-decoration: none; }
.tracker .dot {
  width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-size: .7rem; font-weight: 700; line-height: 1; color: var(--surface);
}
.tracker .done .dot { border-color: var(--ok); background: var(--ok); }
.tracker .done .dot::after { content: "✓"; }
.tracker .fail .dot { border-color: var(--danger); background: var(--danger); }
.tracker .fail .dot::after { content: "✕"; }
.tracker .current .dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.tracker .current .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.tracker .skipped .dot { border-style: dashed; }
.tracker .name { font-size: .85rem; font-weight: 600; line-height: 1.2; }
.tracker .state { font-size: .75rem; color: var(--muted); }
.tracker .current .state { color: var(--brand-text); font-weight: 600; }
.tracker .skipped .name { color: var(--muted); text-decoration: line-through; }
.tracker a:hover .name { color: var(--brand-text); }

.action-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .6rem; }
/* Each form opens from the action bar and closes again; scroll-margin keeps the bar in sight. */
.action-panel { display: none; scroll-margin-top: 4.5rem; border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-ring); }
.action-panel:target { display: block; }

.app-layout { margin-top: 1rem; }
@media (max-width: 860px) { .app-layout .side-col { order: 0; } }

.activity { list-style: none; margin: 0; padding: 0; }
.activity .day {
  margin: .9rem 0 .4rem; font-size: .75rem; font-weight: 600; letter-spacing: .03em; color: var(--muted);
}
.activity .day:first-child { margin-top: 0; }
.activity .event { display: flex; gap: .7rem; padding: .45rem 0 .7rem; position: relative; }
.activity .event:not(:last-child)::after { /* the thread between icons */
  content: ""; position: absolute; left: 15px; top: 2.3rem; bottom: -.1rem; width: 2px; background: var(--line);
}
.activity .icon {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  font-size: .95rem; color: var(--muted); background: var(--sunken);
}
.activity .call .icon, .activity .email .icon { color: var(--brand-text); background: var(--brand-soft); }
.activity .note .icon { color: var(--warn); background: var(--warn-soft); }
.activity .received .icon, .activity .decision .icon { color: var(--ok); background: var(--ok-soft); }
.activity .file .icon { font-size: .8rem; }
.activity .file .event-title { font-weight: 400; }
.activity .event-body { min-width: 0; flex: 1; }
.activity .event-body .pre { margin-top: .15rem; }
.tag {
  display: inline-block; padding: 0 .45rem; font-size: .82rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted);
}
.older { margin-top: .5rem; }

.step { scroll-margin-top: 4.5rem; }
.step.current { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-ring); }
.step.skipped { opacity: .75; }
.pill.step-state.done { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.pill.step-state.fail { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.step-update { margin-top: .6rem; }
.step.current .step-update > summary { display: inline-block; padding: .35rem .85rem; color: var(--on-brand); background: var(--brand); border-radius: var(--radius-sm); font-weight: 500; }
.step.current .step-update > summary:hover { background: var(--brand-hover); }
.step-forms { display: flex; flex-direction: column; gap: 1rem; margin-top: .4rem; }
.step-forms form + form { padding-top: .9rem; border-top: 1px solid var(--line); }

.ai-card > summary { list-style: none; color: var(--ink); font-size: 1rem; }
.ai-card > summary::-webkit-details-marker { display: none; }
.ai-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.ai-head strong { margin-right: .25rem; }
.ai-head::after { content: "▾"; margin-left: auto; color: var(--muted); }
.ai-card[open] .ai-head::after { content: "▴"; }
.decision form + details { margin-top: .6rem; }

@media (max-width: 600px) { .tracker li { min-width: 5.5rem; } .tracker .name { font-size: .78rem; } }

/* Position editor */
.section-nav {
  position: sticky; top: 0; z-index: 4; display: flex; gap: .25rem; margin: .75rem 0 1rem; padding: .45rem 0;
  overflow-x: auto; white-space: nowrap; background: color-mix(in oklab, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.section-nav a { padding: .3rem .7rem; font-weight: 500; color: var(--muted); text-decoration: none; border-radius: var(--radius-sm); }
.section-nav a:hover { color: var(--ink); background: var(--hover); }
#publish, #details, #managers, #steps, #ai { scroll-margin-top: 3.5rem; }
.job-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: .5rem; }
.job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.job-grid .span-2 { grid-column: span 2; }
.hint { display: block; margin-top: .3rem; font-size: .88rem; font-weight: 400; color: var(--muted); }
fieldset.salary { margin: 0; padding: 0; border: 0; }
fieldset.salary legend { padding: 0; margin-bottom: .35rem; }
.salary-row { display: grid; grid-template-columns: minmax(0, 11rem) auto minmax(0, 11rem) minmax(0, 13rem); justify-content: start; gap: .5rem; align-items: end; }
.salary-row label { font-size: .88rem; color: var(--muted); }
.salary-row .dash { padding-bottom: .6rem; color: var(--muted); }
.form-actions { display: flex; gap: .5rem; }
.ai-improve { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ai-improve .hint { margin: 0; }
@media (max-width: 700px) {
  .job-grid { grid-template-columns: minmax(0, 1fr); }
  .job-grid .span-2 { grid-column: auto; }
  .salary-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .salary-row label:last-child { grid-column: 1 / -1; }
}
.ai-switch { gap: .6rem; }
.step-row form.inline { align-items: center; }
.step-row form.inline > .muted { align-self: center; }

/* Public job page: the text and the form, with the key facts beside them on a wide screen. */
main.wide { max-width: 68rem; }
.hero-inner.wide { max-width: 68rem; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1rem 3.5rem; align-items: start; }
.job-main { min-width: 0; max-width: 46rem; }
.job-facts {
  grid-column: 2; grid-row: 1; position: sticky; top: 5rem; margin-top: 2rem; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.job-facts dl { display: flex; flex-direction: column; gap: .9rem; margin: 0; }
.job-facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.job-facts dd { margin: .1rem 0 0; font-size: 1.05rem; font-weight: 600; }
.job-facts .cta { display: flex; justify-content: center; margin-top: 1.25rem; }
.job-main { grid-column: 1; grid-row: 1; }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .9rem; margin-top: .15rem; }
.job-meta > span + span:not(.pill)::before { content: "·"; margin-right: .9rem; }
@media (max-width: 900px) {
  .job-layout { grid-template-columns: minmax(0, 1fr); }
  .job-facts { grid-column: 1; grid-row: 1; position: static; margin-top: 1.5rem; }
  .job-facts dl { flex-direction: row; flex-wrap: wrap; gap: .75rem 2rem; }
  .job-main { grid-row: 2; }
  .job-main .description { margin-top: 1.25rem; }
  .hero .job-hero-meta { display: none; } /* the facts box comes right after the hero */
}
@media (max-width: 700px) { .job-facts .cta { display: none; } }
.currency-table { max-width: 34rem; }
.currency-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 5.5rem; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.currency-row:last-child { border-bottom: 0; }
.currency-row .choice { justify-content: center; margin: 0; }
.currency-row .choice input { margin: 0; }
.currency-row.lhead > span:not(:first-child) { text-align: center; }

/* Settings: one look for every card. */
.settings-tabs { margin: .5rem 0 1rem; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; }
.settings-tabs { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
.settings-tabs a { flex: none; margin-bottom: 0; }
.settings-card { padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.card-head { margin-bottom: .9rem; }
.card-head h2 { margin: 0; }
.card-head .hint { margin: .25rem 0 0; }
.card-foot { margin-top: 1rem; }
p.card-foot { margin-bottom: 0; }
.extra-list { margin: 0; padding-left: 1.25rem; }
.extra-list li { padding: .15rem 0; }
.settings-card .email-langs { margin: 0; }


/* The public top bar stays in sight, so what sticks below it starts under it. */
body.public .tf-bar { top: 3.3rem; }
body.public .tf, body.public [id] { scroll-margin-top: 4.5rem; }
@media (max-width: 640px) {
  .job-meta { flex-direction: column; align-items: flex-start; }
  .job-meta > span + span:not(.pill)::before { content: none; }
}

/* Settings: the brand */
html:not(.js) .js-only { display: none; }
.logo-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.logo-row form { margin: 0; }
.logo-current {
  display: grid; place-items: center; min-width: 7rem; height: 4.5rem; padding: .5rem 1rem;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.logo-current img { display: block; max-width: 12rem; max-height: 3rem; }
.logo.logo-big { width: 44px; height: 44px; font-size: 1.3rem; border-radius: 12px; }
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; align-items: start; }
.brand-side { position: sticky; top: 1rem; }
.colour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 1.5rem; }
.colour-input { display: flex; gap: .5rem; align-items: center; margin-top: .3rem; }
.colour-input input[type=color] { flex: none; width: 2.75rem; height: 2.5rem; min-height: 0; margin: 0; padding: 3px; cursor: pointer; }
.colour-input input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.colour-input input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.colour-input input[type=color]::-moz-color-swatch { border: 0; border-radius: 3px; }
.colour-input .hex { width: 7.5rem; margin: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.colour-field .choice { margin-top: .6rem; }
.colour-field input[type=color]:disabled, .colour-field .hex:disabled { opacity: .45; }
.segment-field + .segment-field { margin-top: 1.1rem; }
.segment-field legend { margin-bottom: .4rem; }
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--sunken);
  border: 1px solid var(--line); border-radius: calc(var(--radius-sm) + 3px);
}
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.segmented span { display: block; padding: .35rem .9rem; font-weight: 500; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; }
.segmented label:hover span { color: var(--ink); }
.segmented input:checked + span { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.segment-field .hint { margin-top: .35rem; }
.brand-preview { padding: 0; overflow: hidden; }
.brand-preview .preview-label {
  margin: 0; padding: .8rem 1rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line);
}
.preview-hero .hero-inner { padding: 1.25rem 1rem 1.4rem; }
.preview-hero .eyebrow { margin-bottom: .4rem; font-size: .72rem; }
.preview-hero h2 { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; color: inherit; }
.preview-hero .meta { margin-top: .4rem; font-size: .9rem; }
.preview-hero .cta { margin-top: 1rem; padding: .5rem .9rem; font-size: .95rem; }
.preview-app { display: flex; flex-direction: column; gap: .8rem; padding: 1rem; }
.preview-app .side-brand { padding: 0; }
.preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.preview-app input { margin: 0; }
.sticky-save { position: sticky; bottom: 0; z-index: 3; margin-top: .25rem; padding: .7rem 0 .9rem; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 1100px) {
  .brand-layout { grid-template-columns: minmax(0, 1fr); }
  .brand-side { position: static; order: -1; }
}

/* The logo in place of the letter in a square */
.brand-logo { display: block; width: auto; height: 28px; max-width: 168px; object-fit: contain; }
.side-brand .brand-name, .brand .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The QDex symbol, drawn in the brand colour */
.qdex-mark { display: block; flex: none; }
.qdex-mark .mark-bg { fill: var(--brand); }
.qdex-mark .mark-ring { stroke: var(--on-brand); }
.qdex-mark .mark-dot { fill: var(--on-brand); }
[data-corners=square] .qdex-mark .mark-bg { rx: 6px; }
.login .tagline { margin: -1rem 0 1.25rem; font-size: .93rem; color: var(--muted); }

/* Sign in with Google: Google's own button colours, the same in both themes. */
a.button.google-button {
  display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 2.75rem;
  color: #1f1f1f; background: #ffffff; border-color: #747775; font-weight: 500;
}
a.button.google-button:hover { background: #f8fafd; }
.google-button svg { flex: none; }
.login a.google-button { margin-top: 1rem; }
.login .divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 .5rem; font-size: .85rem; color: var(--muted); }
.login .divider::before, .login .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* The test email: the mail server's answer, as it gave it. */
.banner .mail-error { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .85rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.banner > p { margin: 0; }
#mail-test .inline { margin-top: .25rem; }
.test-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
