/* The landing, sign-in, account, admin and legal pages. Values come from /tokens.css (DESIGN.md). Light only:
   DESIGN.md keeps dark mode for the tracker's app shell. */
:root { color-scheme: light; }

.row { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: flex-end; }

/* ---------- parts ---------- */

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-sm); border: 0; padding: 0; margin: 0; min-width: 0; }
.fields .wide { grid-column: 1 / -1; }

fieldset.lbl { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.lbl legend { padding: 0; margin-bottom: var(--space-xs); }
.checks { display: flex; flex-wrap: wrap; gap: var(--space-xxs); max-height: 196px; overflow-y: auto; }
.legal { display: flex; flex-wrap: wrap; gap: var(--space-md); font: var(--text-table); color: var(--color-muted); }
.legal a:hover { color: var(--color-ink); }
.logo { position: relative; overflow: hidden; flex: none; display: inline-grid; place-items: center; color: var(--color-ink); background: var(--color-surface-strong); }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 1px; background: var(--color-logo-tile); }
.logo.lg img { padding: var(--space-xxs); }

/* ---------- the bar at the top ---------- */
/* marketing pages: section links in the centre, Sign in + Create account on the right. On a phone the links go behind a
   Menu button (the sheet below) and the bar reads, left to right: the mark, the language in two letters, Sign in,
   Create account, Menu. */
.nav-actions { display: flex; flex: none; align-items: center; gap: var(--space-xs); margin-left: auto; }
.top-nav-row > .nav-links { padding: 0 var(--space-xxs); }  /* room for the focus ring: the row scrolls, so it clips */
.top-nav-row > .nav-links + .nav-actions { margin-left: 0; }  /* the links' own auto margins centre them */
.top-nav-row > .lang-switch + .nav-actions { margin-left: 0; }  /* i18n.js puts its button before the actions: it sits beside Sign in */
.btn.menu-btn, .lang-code { display: none; }  /* phones only; i18n.js writes both the full name and the two letters, this shows one */
@media (max-width: 767px) {
  .top-nav-row:has(.menu-btn) { gap: var(--space-xxs); }
  .top-nav-row > .nav-links { display: none; }
  .top-nav-row > .nav-links + .nav-actions { margin-left: auto; }
  .top-nav-row > .lang-switch { margin-left: auto; padding-inline: var(--space-xs); }
  .nav-actions { gap: 0; }
  .nav-actions a:focus-visible { position: relative; z-index: 1; }  /* the buttons touch: the ring goes over its neighbour */
  .nav-actions .btn.ghost { padding: 0 var(--space-xs); }
  .btn.menu-btn { display: inline-flex; min-height: 44px; padding-inline: var(--space-xs); }  /* 44px whatever the pointer */
}
/* With Menu and the language beside Sign in + Create account the name has no room: the mark only, hidden only visually so
   the link keeps its full name (mark, NL, Sign in, Create account and Menu need about 300px; with the name and the full language name about 550px).
   Pages without Menu: both buttons beside the name need 397px in English and 412px in Dutch ("Inloggen", "Account
   maken"), so the name goes below 412px; at 389px the Dutch bar scrolled the page sideways on a 390px phone. */
@media (max-width: 599px) {
  .top-nav-row:has(.menu-btn) .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top-nav-row > .lang-switch .lang-name { display: none; }
  .top-nav-row > .lang-switch .lang-code { display: inline; }
}
@media (max-width: 411px) {
  .top-nav-row:has(.nav-actions) .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* a 320px phone: the five parts need 4px of padding a side, not 8 (only in a bar that has Menu) */
@media (max-width: 359px) {
  .top-nav-row:has(.menu-btn) { gap: 0; padding: 0 var(--space-sm); }
  .top-nav-row:has(.menu-btn) > .lang-switch, .top-nav-row:has(.menu-btn) .nav-actions .btn.ghost, .btn.menu-btn { padding-inline: var(--space-xxs); }
  .top-nav-row:has(.menu-btn) .nav-actions .btn.primary { padding-inline: var(--space-xs); }
}

/* ---------- the menu sheet (phones): the Menu button opens the page's section links in a modal across the top ----------
   landing.html builds it from the bar's own links. A native modal dialog gives the Escape key, the dimmed page and an
   inert page behind; the script adds the tap outside, closing on a link, and a Tab that wraps. */
.menu-sheet { box-sizing: border-box; inset: 0 0 auto; width: 100%; max-width: none; max-height: 100dvh; margin: 0; padding: 0; overflow-y: auto;
  border: 0; border-bottom: 1px solid var(--color-hairline); background: var(--color-surface-raised); color: var(--color-body); box-shadow: var(--shadow-lg); }
.menu-sheet::backdrop { background: var(--color-scrim); }
.menu-sheet[open] { animation: menu-in var(--motion-base) var(--motion-easing); }  /* --motion-base is 0 under reduced motion (tokens.css): no slide */
@keyframes menu-in { from { opacity: 0; translate: 0 calc(-1 * var(--space-md)); } }
html:has(.menu-sheet[open]) { overflow: hidden; }  /* the page behind does not scroll under a swipe on the dimmed part */
.menu-head { display: flex; align-items: center; justify-content: space-between; height: var(--topnav-height); padding: 0 var(--space-md); }
.menu-head h2 { margin: 0; font: var(--text-eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-muted); }
.menu-head .btn { min-height: 44px; }
.menu-links { display: grid; padding: 0 var(--space-xs) var(--space-md); }  /* 8px here and 8px in each link: the text lines up with the heading, the ring and hover have room */
.menu-links a { display: flex; align-items: center; min-height: var(--row-height-touch); padding-inline: var(--space-xs); border-top: 1px solid var(--color-hairline-soft); border-radius: var(--radius-sm);
  color: var(--color-ink); font: var(--text-title-sm); }
.menu-links a:hover { background: var(--color-surface-soft); }
.skip-link { position: absolute; top: var(--space-sm); left: var(--space-md); z-index: 30; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-md);
  background: var(--color-primary); color: var(--color-on-primary); font: var(--text-button); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.who { display: inline-flex; align-items: center; gap: var(--space-xs); min-width: 0; font: var(--text-table); color: var(--color-muted); }
.top-nav-row > .brand { flex: none; } /* the name never squeezes; the address gives way */
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); max-width: calc(var(--content-max) + var(--space-xxl)); margin: 0 auto; padding: var(--space-xl) var(--space-lg) var(--space-section); }
.page-head { display: grid; gap: var(--space-xxs); }
.page-head h1 { font: var(--text-display-sm); letter-spacing: var(--tracking-display-sm); }
.page-head p { max-width: 640px; color: var(--color-muted); }
/* The signed-in app's page head: the section's title and one status line on the left, one hairline under it. On Applications
   the goal sits on the right: "7 of 20 sent", a way to change it, and a thin bar (an outline for the target, a solid fill for
   what is sent). The goal shows on Applications only and the "we'll email you" notice on Settings only: account.html's tab()
   writes the open section on <body data-tab>. */
body:not([data-tab="apps"]) .goal, body:not([data-tab="settings"]) #news { display: none; }
.app .page { gap: var(--space-xl); padding-top: var(--space-xl); }
.app .page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-md) var(--space-xl); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--color-hairline); }
.app .page-head p { color: var(--color-muted); font: var(--text-body-md); }
.goal { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-xs) var(--space-md); width: min(300px, 100%); font: var(--text-body-sm); }
.goal b { color: var(--color-ink); font: var(--text-title-sm); font-variant-numeric: tabular-nums; }
.goal b:empty { display: none; }
.goal .link { grid-column: 2; }
.goal b:empty + .link { grid-column: 1 / -1; justify-self: end; }
.goal .bar { grid-column: 1 / -1; height: 10px; border: 1px solid var(--color-muted); border-radius: var(--radius-xs); background: transparent; }
.goal .bar i { border-radius: 0; }
.goal .bar[hidden] { display: none; }
@media (max-width: 767px) { .app .page-head { padding-bottom: var(--space-md); } .goal { width: 100%; } }
@media (pointer: coarse) { .goal .link { position: relative; } .goal .link::after { content: ""; position: absolute; inset: -12px -8px; } }  /* a 44px target */

/* ---------- sign-in: DESIGN.md hero (7/5) beside the form ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: 100dvh; }
.auth-main { display: grid; place-items: center; padding: var(--space-xl) var(--space-lg); background: var(--color-surface-soft); border-left: 1px solid var(--color-hairline); }
.auth-card { display: grid; gap: var(--space-lg); width: min(420px, 100%); padding: var(--space-xl); border: 1px solid var(--color-hairline); border-radius: var(--radius-xl); background: var(--color-surface-raised); box-shadow: var(--shadow-xl); }
.auth-title { font: var(--text-title-lg); letter-spacing: var(--tracking-title-lg); }
.auth-card form, .auth-card .oauth { display: grid; gap: var(--space-md); }
.auth-card form .field { width: 100%; }
.oauth .or { margin-top: var(--space-xxs); }
.gwrap { position: relative; max-width: 400px; }  /* Google's own button (auth.html googleButton), invisible, over our own */
.gwrap .gsi { position: absolute; inset: 0; opacity: 0.01; overflow: hidden; cursor: pointer; }
.gwrap.over .btn { pointer-events: none; }
.gwrap.over:hover .btn { background: var(--color-surface-soft); border-color: var(--color-muted-soft); }
.auth-card .ts { min-height: var(--space-6); }  /* Cloudflare Turnstile slot (auth.html); shown only with TURNSTILE_SITE_KEY */
.auth-card .fine { font: var(--text-table); color: var(--color-muted); }
.auth-card .fine a { color: var(--color-accent); }
.auth-card .link { font: var(--text-table); }
.check { display: flex; align-items: flex-start; gap: var(--space-xs); color: var(--color-body); font: var(--text-table); }
.check input { margin-top: calc((1lh - 16px) / 2); }
.sent { display: grid; justify-items: start; gap: var(--space-xs); padding: var(--space-lg); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); background: var(--color-surface-soft); }
.sent .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--color-surface-raised); border: 1px solid var(--color-hairline); color: var(--color-success); }
.sent h3 { font: var(--text-title-md); }
.sent p { color: var(--color-body); }
@media (max-width: 1023px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-main { place-items: start center; padding: var(--space-lg) var(--space-md) var(--space-xxl); border-left: 0; border-top: 1px solid var(--color-hairline); }
}
@media (max-width: 479px) { .auth-card { padding: var(--space-lg); } }

/* ---------- getting started: three numbered steps above the search, until dismissed ---------- */
.tour { border-color: transparent; background: var(--color-surface-soft); box-shadow: none; }  /* a note, not a working card: no outline, no shadow */
.tour .card-h { flex-wrap: wrap; border-bottom: 0; }  /* at 320px the two buttons go under the title */
.tour .card-b { display: grid; gap: var(--space-md); padding-top: 0; }
.tour ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.tour li { position: relative; padding-left: calc(24px + var(--space-sm)); color: var(--color-body); counter-increment: step; }
.tour li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px;
  border: 1px solid var(--color-hairline); border-radius: var(--radius-xs); background: var(--color-surface-raised); color: var(--color-ink); font: var(--text-caption); font-variant-numeric: tabular-nums; }
.tour li b { color: var(--color-ink); font-weight: 600; }
@media (max-width: 767px) { .tour ol { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } }

/* ---------- account and search: your filters on top, the results under them ---------- */
.search-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
.filters-card .card-h { min-height: 56px; padding-inline: var(--space-lg); }
.filters-card .card-h h2 { font: var(--text-title-md); }
.filters-card .card-b { display: grid; gap: var(--space-lg); padding: var(--space-lg); }
.filters-card .card-b > .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.filters-card fieldset.lbl > legend { margin-bottom: var(--space-xs); color: var(--color-ink); font: var(--text-title-sm); }  /* where, what, when: the three questions */
.filters-card details.more fieldset.lbl > legend { font: var(--text-caption); }  /* inside More filters the fieldsets read like the fields beside them */
/* The preset picker: DESIGN.md's segmented control, stacked on phones and wrapping on wide screens, so any number of
   presets and any label fit. Each says what it sets underneath. */
.presets { display: grid; gap: var(--space-xxs); padding: var(--space-xxs); border-radius: var(--radius-lg); background: var(--color-surface-soft); }
.presets button { display: grid; align-content: start; min-width: 0; padding: var(--space-xs) var(--space-sm); border: 0; border-radius: var(--radius-md);
  background: transparent; text-align: left; cursor: pointer;
  transition: background var(--motion-fast) var(--motion-easing), box-shadow var(--motion-fast) var(--motion-easing); }
.presets .name { font: var(--text-caption); color: var(--color-body); }
.presets .sum { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
  font: var(--text-table); color: var(--color-muted); }
.presets button:hover .name, .presets button[aria-pressed="true"] .name { color: var(--color-ink); }
.presets button[aria-pressed="true"] { background: var(--color-surface-raised); box-shadow: var(--shadow-sm); }
.presets button[aria-pressed="true"]:focus-visible { box-shadow: var(--shadow-sm), var(--shadow-focus); }  /* the ring beats the shadow */
@media (max-width: 767px) { .presets .sum { display: block; } }  /* no two-line cut on a phone: there's no hover to read the rest */
/* Nothing scrolls inside the filters. Countries and languages show only what's picked, as chips whose x unticks them
   (the whole chip is the checkbox); the field under them adds more. */
#filters .checks { max-height: none; overflow: visible; }
#filters .checks.picked:not(:has(input:checked)), #filters .checks.picked .chip:not(:has(input:checked)) { display: none; }
#filters .checks.picked:has(input:checked) + .none { display: none; }
#filters .checks.picked .chip { position: relative; }
#filters .checks.picked .chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#filters .checks.picked .chip:has(input:focus-visible) { box-shadow: var(--shadow-focus); }
#filters fieldset:disabled .chip-x { display: none; }
#filters .none { margin: 0; }
/* The three questions (where, what, when) say it in their own words; the bracketed counts only add noise */
#countries legend .hint, #professions legend .hint { display: none; }
/* When: the start date and the length, and the window they make said in words beside them (drawWindow in account.html). */
#when { display: grid; gap: var(--space-md); }
.when-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-md); align-items: start; }
.when-note { grid-column: 1 / -1; display: grid; gap: var(--space-xxs); align-content: center; color: var(--color-body); font: var(--text-body-sm); }
#windowNote { color: var(--color-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
/* "More filters": everything past the countries, professions and dates, closed until asked for */
#filters details.more { grid-column: 1 / -1; border-top: 1px solid var(--color-hairline); }
#filters details.more > summary { display: flex; align-items: center; gap: var(--space-xs); min-height: 44px; list-style: none; cursor: pointer;
  font: var(--text-caption); color: var(--color-ink); }
#filters details.more > summary::-webkit-details-marker { display: none; }
#filters details.more > summary:hover { color: var(--color-accent); }
#filters details.more > summary:focus-visible { box-shadow: var(--shadow-focus); border-radius: var(--radius-md); outline: none; }
#filters details.more .chev { color: var(--color-muted); transition: transform var(--motion-base) var(--motion-easing); }
#filters details.more[open] .chev { transform: rotate(180deg); }
#filters details.more[open] > summary { margin-bottom: var(--space-xs); }
#onboardTitle:focus-visible { box-shadow: none; }  /* focused on opening, for screen readers: not a control */
@media (min-width: 1024px) {
  /* the presets in a row; Countries and Professions side by side (the finer professions are many: the wider column), When under
     them across the page, then the closed "More filters" */
  .filters-card .presets { display: flex; flex-wrap: wrap; justify-self: start; }
  .filters-card .presets button { flex: none; width: 260px; }
  .filters-card .fields { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-lg); }
  .filters-card #filters > #countries { grid-column: span 5; align-content: start; }  /* the add field right under its chips */
  .filters-card #filters > #professions { grid-column: span 7; align-content: start; }
  .filters-card #filters > #when { grid-column: 1 / -1; }
  .filters-card .when-row { grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 6fr); gap: var(--space-lg); align-items: end; }
  .filters-card .when-note { grid-column: auto; min-height: 36px; }
  .filters-card details.more .fields > #languages { grid-column: span 5; align-content: start; }
  .filters-card details.more .fields > label.lbl:has([name=citizenship]) { grid-column: span 4; }
  .filters-card details.more .fields > label.lbl:has([name=min_score]) { grid-column: span 3; }
  .filters-card details.more .fields > #companyAge { grid-column: 1 / -1; }
  .filters-card #filters #companyAge .fields { grid-template-columns: repeat(2, minmax(0, 14em)); gap: var(--space-md); }
}
.results-col { display: grid; align-content: start; gap: var(--space-md); min-width: 0; }
.resultline { font: var(--text-body-sm); font-variant-numeric: tabular-nums; color: var(--color-muted); scroll-margin-top: calc(var(--topnav-height) + var(--space-md)); }
.more-box { display: grid; justify-items: start; gap: var(--space-sm); }  /* "Load more" under the results: the next, older batch of listings */
.more-box .banner { justify-self: stretch; }
.more-btn { min-height: 44px; }
.sponsored { display: grid; gap: var(--space-xs); }  /* the employers' paid spots above the results, labelled (account.html renderSponsored) */
.sponsored .resultline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.results-col > .banner { scroll-margin-top: calc(var(--topnav-height) + var(--space-md)); }
.results-wrap { overflow-x: auto; border: 1px solid var(--color-hairline); border-radius: var(--radius-xl); background: var(--color-surface-raised); box-shadow: var(--shadow-sm); }
.results-wrap:has(tbody:empty) { display: none; }
.results-table { table-layout: fixed; min-width: 760px; }
.results-table .w-fit { width: 104px; } .results-table .w-why { width: 24%; } .results-table .w-open { width: 352px; }
.results-table th.w-open { padding-inline: var(--space-md); }
.results-table tr:last-child td { border-bottom: 0; }
.results-table td { padding-block: var(--space-md); vertical-align: top; overflow: visible; }  /* the company, the score and the buttons start on one line */
.results-table td.fit { padding-top: var(--space-xs); }
.results-table td.why { white-space: normal; }
.results-table td.open { text-align: right; }
/* Save (or the application's status), Moving there, Skip, Report and Open. They wrap onto a second line rather than run out
   of the cell: a row that is already in Applications carries a label and a pill before the rest. */
.row-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-xxs); }
.row-acts .mine { color: var(--color-muted); font: var(--text-table); white-space: nowrap; }
/* why it scores what it scores: tinted badges, one under the other, green for what counts for it and red for what counts against (DESIGN.md 3.0, badge) */
.results-table td.why .chips { display: grid; justify-items: start; gap: var(--space-xxs); }
.results-table td.why .tag { height: auto; min-height: 22px; padding-block: 2px; border-radius: var(--radius-md); white-space: normal; }
/* the AI's one line about the posting: labelled, quiet */
.results-table .ai-sum .tag { height: 18px; padding: 0 6px; border: 1px solid var(--color-hairline); background: none; color: var(--color-muted); font: var(--text-table-header); }
@media (max-width: 767px) { .row-acts { justify-content: flex-start; gap: var(--space-xs); } .row-acts .btn.xs { min-width: 44px; } .results-table td.why .chips { display: flex; flex-wrap: wrap; gap: 2px var(--space-sm); } }  /* Skip and Report are icons: 44px wide, 8px apart */
.results-table .cell-2 small a:hover { color: var(--color-accent); }
.results-table .cell-2 { gap: 2px; }
.results-table .cell-2 > b { font: var(--text-title-sm); }  /* the company: the row's first line */
.results-table .cell-2 > .ttl { color: var(--color-body); font: var(--text-body-sm); }
.results-table .cell-2 > .ttl a { color: var(--color-ink); }
.results-table .cell-2 > .fresh, .results-table .cell-2 > .also, .results-table .cell-2 > .loc-inline { white-space: normal; }  /* "First seen 12d ago · checked today" and "Also on ..." wrap, never cut */
.results-table .logo { width: 20px; height: 20px; margin-top: 2px; border-radius: var(--radius-xs); font: var(--text-table-header); }
.results-table .co { align-items: flex-start; }
/* the score is the number to read: ink and larger than the row's other text, with its scale beside it in muted */
.results-table .gauge { justify-items: start; }
.results-table tr.past .gauge-n b { color: var(--color-muted); }
.skel-tr td .skel { display: block; }
@media (max-width: 767px) {
  .results-wrap { overflow: visible; }
  .results-table { min-width: 0; }
  .results-table thead { display: none; }
  .results-table, .results-table tbody { display: block; }
  .results-table td { display: block; width: auto; height: auto; padding: 0; border: 0; white-space: normal; }
  /* a card: the company and its score on one line, then where, why, and the buttons in a row of their own */
  .results-table tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-hairline-soft); }
  .results-table tr.skel-tr { display: block; }
  .results-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .results-table td.fit { grid-column: 2; grid-row: 1; padding: 0; }
  .results-table td.why { grid-column: 1 / -1; }
  .results-table td.open { grid-column: 1 / -1; text-align: left; }  /* Save, Skip, Report and Open: a row of their own, each 44px on a phone */
  .results-table .cell-2 > * { white-space: normal; overflow-wrap: anywhere; }  /* a long company or title wraps, never cut */
  .skel-tr td + td { margin-top: var(--space-xs); }
}
.tab-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); min-width: 0; }
.tab-panel > .page-intro { margin: 0; }
.page-intro code, .ans-h code, .prose code { padding: 2px 5px; border: 1px solid var(--color-hairline); border-radius: var(--radius-xs);
  background: var(--color-surface-soft); color: var(--color-body); font: var(--text-kbd); }
.locked p { color: var(--color-body); }
.locked b { color: var(--color-ink); }

/* ---------- writing packs (pilot/payments.py): the Settings card's list of packs, one line each ---------- */
#packCard .card-b { display: grid; gap: var(--space-md); }
#packCard .card-b > p { max-width: 640px; }
.packs { display: grid; gap: var(--space-sm); }
.packs:empty { display: none; }
.packs li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); color: var(--color-body);
  font: var(--text-table); font-variant-numeric: tabular-nums; }

/* ---------- the subscription (account.html renderSub, paywallCard): the paywall screen and the Settings card ---------- */
#appsMain, #ansMain { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); min-width: 0; }  /* the wrappers keep the panel's rhythm */
.paywall, .sub-card { max-width: 640px; }
.paywall .card-b, .sub-card .card-b { display: grid; gap: var(--space-md); }
.paywall .card-b > p, .sub-card .card-b > p, .pay-list { margin: 0; }
.pay-lead { color: var(--color-ink); font: var(--text-title-sm); }
.pay-list { display: grid; gap: var(--space-xs); padding-left: var(--space-lg); color: var(--color-body); }
.pay-price { color: var(--color-body); }
.pay-price b { color: var(--color-ink); font-weight: 600; }
.pay-price a, .sub-card a { color: var(--color-accent); }
.pay-free { color: var(--color-muted); font: var(--text-table); }
.sub-card .actions, .paywall .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.paywall .btn, .sub-card .btn { max-width: 100%; height: auto; min-height: 40px; padding-block: var(--space-xs); white-space: normal; text-align: center; }  /* "Start the subscription for EUR 4.99 a month" wraps on a 320px phone */
.withdraw { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.sub-note { flex-wrap: wrap; align-items: center; }
.sub-note > span { flex: 1 1 200px; }
@media (pointer: coarse) { .pay-free .link, .pay-price a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------- the over-limit message with its pack button (account.html overBanner): the button drops below the text when it's narrow ---------- */
.banner.pack { flex-wrap: wrap; }
.banner.pack > span { flex: 1 1 240px; }

/* ---------- Applications: next steps, the list (DESIGN.md leads table) and its drawer ---------- */
.next-list { display: grid; margin: 0; padding: var(--space-xxs) 0; list-style: none; }
.next-list li { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--row-height); padding: var(--space-xs) var(--space-md);
  border-bottom: 1px solid var(--color-hairline-soft); color: var(--color-body); }
.next-list li:last-child { border-bottom: 0; }
.next-list .what { flex: 1; min-width: 0; }
.next-list .btn { flex: none; }
.apps-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
@media (max-width: 479px) { .apps-bar .seg button { padding: 0 var(--space-xs); } }  /* All, To apply, In progress, Done fit from 360px */
@media (max-width: 359px) { .apps-bar .seg { padding-inline: 0; } .apps-bar .seg button { padding: 0 var(--space-xxs); min-width: 44px; } }  /* and from 320px */
.apps-table { table-layout: fixed; min-width: 640px; }
.apps-table .w-status { width: 128px; } .apps-table .w-due { width: 136px; } .apps-table .w-last { width: 152px; } .apps-table .w-acts { width: 184px; }
.apps-table tr:last-child td { border-bottom: 0; }
.apps-table td.acts { text-align: right; }
.apps-table .logo { width: 20px; height: 20px; border-radius: var(--radius-xs); font: var(--text-table-header); }
.row-open { display: block; min-width: 0; overflow: hidden; padding: 0; border: 0; background: none; color: var(--color-ink); font: inherit; font-weight: 500;
  text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.row-open:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 768px) and (max-width: 1023px) { .apps-table .w-last, .apps-table td.last { display: none; } }
@media (max-width: 767px) {  /* DESIGN.md: the table becomes a card list on phones */
  .apps-table { min-width: 0; }
  .apps-table thead { display: none; }
  .apps-table, .apps-table tbody, .apps-table tr, .apps-table td { display: block; width: auto; }
  .apps-table tr { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-hairline-soft); }
  .apps-table td { height: auto; padding: 0; border: 0; white-space: normal; }
  .apps-table td + td { margin-top: var(--space-xs); }
  .apps-table td:nth-child(2), .apps-table td.due-td { display: inline-block; margin-right: var(--space-sm); }
  .apps-table td.last { display: none; }
  .apps-table td.acts { text-align: left; }
  .apps-table .cell-2 > *, .row-open { white-space: normal; overflow-wrap: anywhere; }  /* a long company or role wraps, never cut */
  .row-open { position: relative; overflow: visible; }
  .row-open::after { content: ""; position: absolute; inset: -13px 0; }  /* the name is a button: a 44px target, like the whole card */
}
.logo.lg { width: 40px; height: 40px; border-radius: var(--radius-md); font: var(--text-caption); }
/* the drawer slides in from the right at the site's slow beat; under reduced motion ui.css fades it */
@media (prefers-reduced-motion: no-preference) {
  .drawer { transition: transform var(--motion-slow) var(--motion-easing), visibility 0s linear var(--motion-slow); }
  .drawer.on { transition: transform var(--motion-slow) var(--motion-easing); }
}
/* the application's last day on the year, with Today, when it is still ahead */
.drawer .drawer-top { gap: var(--space-sm); align-items: flex-start; }
.drawer .drawer-id h2 { overflow-wrap: anywhere; }
.status-pick { max-width: 240px; }
.drawer .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer-b section { display: grid; gap: var(--space-xs); }
.drawer-b section > h3 { margin: 0; }
.timeline { display: grid; gap: var(--space-xs); margin: 0; padding: 0 0 0 var(--space-md); list-style: none; border-left: 1px solid var(--color-hairline); }
.timeline li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs); font: var(--text-table); color: var(--color-body); }
.timeline time { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.drawer-b .danger-row { display: flex; padding-top: var(--space-md); border-top: 1px solid var(--color-hairline-soft); }
.drawer-b .btn.danger[data-armed="1"] { border-color: var(--color-error); }

/* ---------- the email and add-a-company dialogs ---------- */
.modal.wide { width: min(640px, calc(100vw - var(--space-xl))); }
.modal-b .facts { font: var(--text-body-sm); }
.modal-b textarea[readonly] { background: var(--color-surface-soft); }
.sent-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-sm); color: var(--color-body); }

/* ---------- Answers ---------- */
.answers { display: grid; gap: var(--space-sm); }
.answer .card-b { display: grid; gap: var(--space-xs); }
.answer .skel.tall { height: 64px; }
.ans-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.ans-h .q { font: var(--text-title-sm); color: var(--color-ink); }
.add-q .card-b { display: grid; gap: var(--space-xs); max-width: 640px; }

/* ---------- Abroad: one country's guide, a card per section, every fact with its source (pilot/guides.py) ---------- */
.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); min-width: 0; }
.guide .skel.tall { height: 64px; }
.guide .card-h { flex-wrap: wrap; }
.guide .card-h h2, .guide .card-h h3 { overflow-wrap: anywhere; }
.guide .card-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.guide .card-b .btn { max-width: 100%; height: auto; min-height: 36px; padding-block: var(--space-xs); white-space: normal; text-align: left; }  /* "Add the learning-agreement steps to my checklist" wraps on a 320px phone */
.guide ul { display: grid; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.guide li { display: grid; gap: var(--space-xxs); color: var(--color-body); overflow-wrap: anywhere; }
.guide li > small { font: var(--text-table); color: var(--color-muted); }
.guide .card-b a { color: var(--color-accent); }
.guide .card-b a:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide .partners { display: grid; gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-hairline-soft); }
.guide .partners > p { font: var(--text-table); color: var(--color-muted); }
.guide .partners li .muted { font: var(--text-table); }
.guide .partners h4 { font: var(--text-table); color: var(--color-body); margin: var(--space-xs) 0 0; }
.guide .checklist .when { color: var(--color-body); }
.guide .checklist .check { cursor: pointer; }
@media (pointer: coarse) {  /* links are 44px targets on touch: a line of their own in the cards, a halo inside the sentence of the locked note */
  .guide .card-b a { display: inline-flex; align-items: center; min-height: 44px; }
  .guide ul.links, .guide li { gap: 0; }
  .guide .banner a { position: relative; }
  .guide .banner a::after { content: ""; position: absolute; inset: -12px -8px; }
}

/* ---------- Settings: the email template and its preview, the dates, how often we email ---------- */
.settings > .card .card-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.mail-form .fields { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mail-form .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.preview { display: grid; gap: var(--space-xs); padding: var(--space-md); border: 1px solid var(--color-hairline); border-radius: var(--radius-md); background: var(--color-surface-soft); }
.preview-subject { color: var(--color-ink); font-weight: 600; overflow-wrap: anywhere; }
.preview pre { margin: 0; color: var(--color-body); font: var(--text-body-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
/* an answer still to write: warning text, like a form error waiting to happen (DESIGN.md, status colours) */
.preview mark.gap { background: none; color: var(--color-warning-text); font-weight: 600; text-decoration: underline dashed var(--color-warning); text-underline-offset: 3px; }
.dates { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-hairline-soft); }
.dates li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xxs) var(--space-sm); min-height: var(--row-height); padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-hairline-soft); }
.dates li:last-child { border-bottom: 0; }
.dates .step { display: flex; flex: 1 1 160px; align-items: center; gap: var(--space-xs); min-width: 0; }
#dates .step { flex-basis: 100%; }  /* the checklist: a step's name gets its own line, never cut; its date and Delete sit under it */
@media (pointer: coarse) { .dates input[type="checkbox"] { position: relative; } .dates input[type="checkbox"]::before { content: ""; position: absolute; inset: -14px; } }  /* the tick box has no label around it: a 44px target */
.dates .field.plain { flex: 1; border-color: transparent; background: transparent; }  /* a step reads as text until it's hovered or edited */
.dates .field.plain:hover { border-color: var(--color-hairline); }
.dates .field.plain:focus { border-color: var(--color-accent); }
.dates .when { color: var(--color-muted); font: var(--text-table); font-variant-numeric: tabular-nums; }
.dates li.done .field.plain { color: var(--color-muted); text-decoration: line-through; }
.start-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin-top: var(--space-xs); }
/* Settings' preset card: one line per preset, its button and what it brings */
.preset-list { display: grid; gap: var(--space-xs); }
.preset-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.preset-line .btn { height: auto; min-height: 40px; max-width: 100%; padding-block: var(--space-xs); line-height: 1.3; white-space: normal; }
.start-row .btn { height: auto; min-height: 40px; max-width: 100%; margin-top: 0; padding-block: var(--space-xs); line-height: 1.3; white-space: normal; text-align: center; }  /* a long school name wraps inside its button */
.goal-in { max-width: 240px; }
.date-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-xs); }
.date-add .lbl:first-child { flex: 1 1 220px; }
.date-add .lbl > span { white-space: nowrap; }
.digest { display: grid; gap: var(--space-sm); }

/* ---------- the folds: Have a code? and Your data ---------- */
details.fold > summary { display: flex; align-items: center; gap: var(--space-sm); min-height: 48px; padding: 0 var(--space-md); color: var(--color-ink);
  font: var(--text-nav); list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .i { color: var(--color-muted); }
details.fold > summary:hover { background: var(--color-surface-soft); }
details.fold > summary .chev { margin-left: auto; transition: transform var(--motion-base) var(--motion-easing); }
details.fold[open] > summary .chev { transform: rotate(180deg); }
details.fold > summary:focus-visible { border-radius: var(--radius-lg); }
details.fold .card-b { display: grid; gap: var(--space-sm); border-top: 1px solid var(--color-hairline); }
.code-form { display: grid; gap: var(--space-xs); max-width: 480px; }
.data-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.danger-zone { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-hairline-soft); }
.danger-zone .lbl { flex: 1 1 260px; }
.delete-risk { flex: 1 1 100%; display: flex; flex-direction: column; gap: var(--space-xs); }
.delete-risk ul { margin: 0; padding-left: var(--space-lg); }

/* ---------- legal pages: DESIGN.md marketing body, easy to read ---------- */
.doc { gap: var(--space-xl); padding-top: var(--space-xxl); }
.doc .page-head h1 { font: var(--text-display-md); letter-spacing: var(--tracking-display-md); }
.prose { max-width: 720px; color: var(--color-body); font: var(--text-body-md); overflow-wrap: anywhere; }  /* gegevensbeschermingsautoriteit.be is wider than a 320px phone */
.prose h2 { margin: var(--space-xl) 0 var(--space-xs); font: var(--text-title-md); }
.prose h3 { margin: var(--space-lg) 0 var(--space-xxs); font: var(--text-title-sm); }
.prose h2, .prose h3 { scroll-margin-top: calc(var(--topnav-height) + var(--space-md)); }  /* anchors land below the sticky nav */
.prose p, .prose ul { margin: 0 0 var(--space-sm); }
.prose ul { padding-left: var(--space-lg); }
.prose li + li { margin-top: var(--space-xxs); }
.prose strong { color: var(--color-ink); font-weight: 600; }
@media (max-width: 767px) { .doc { padding-top: var(--space-lg); } .doc .page-head h1 { font: var(--text-display-sm); letter-spacing: var(--tracking-display-sm); } }

/* ---------- the dialogs: onboarding, terms, welcome ---------- */
dialog.modal .modal-h .brand-mark { width: 28px; height: 28px; }
dialog.modal .modal-b > p { color: var(--color-body); }
/* in-app links are Pilot Blue (DESIGN.md) */
.modal-b p a, .check a, .prose a, .banner a, .tour a { color: var(--color-accent); }
.modal-b p a:hover, .check a:hover, .prose a:hover, .banner a:hover, .tour a:hover { text-decoration: underline; text-underline-offset: 3px; }
dialog.modal .fields { margin: 0; }
dialog.modal .fields.stack { grid-template-columns: minmax(0, 1fr); }  /* the CV check: one field under the other, not side by side */
#report .reasons { gap: var(--space-sm); }  /* the three reasons, one per line: each whole line is its target */
@media (pointer: coarse) { #report .reasons, .digest { gap: var(--space-lg); } }  /* a radio line's 44px target (ui.css .check) would overlap its neighbour's at 12px */
.choice { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); }
.choice.primary { background: var(--color-surface-soft); }
.choice-h { display: flex; align-items: flex-start; gap: var(--space-sm); }
.choice-h b { display: block; font: var(--text-title-sm); color: var(--color-ink); }
.choice-h p { color: var(--color-muted); }
.choice .ic { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--color-surface-raised); border: 1px solid var(--color-hairline); color: var(--color-ink); }
.or { display: flex; align-items: center; gap: var(--space-sm); color: var(--color-muted); font: var(--text-table); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--color-hairline); }
/* DESIGN.md coupon input: mono, uppercase, 44px, with the button attached */
.coupon-row { display: flex; }
.coupon-row .field { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.coupon-row .btn { height: 44px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.coupon-row .field:focus { position: relative; z-index: 1; }
@media (max-width: 479px) {
  .coupon-row { flex-direction: column; gap: var(--space-xs); }
  .coupon-row .field, .coupon-row .btn { border-radius: var(--radius-md); }
  .coupon-row .field { flex: none; }  /* flex: 1 in a column is a 0 height basis: the 44px field collapsed to 19px */
}

/* ---------- admin: users, school profiles, coupon batches ---------- */
.page-head.plain h1 { font: var(--text-title-lg); letter-spacing: var(--tracking-title-lg); }
.admin-grid { display: grid; gap: var(--space-lg); min-width: 0; }
.admin-grid > section { min-width: 0; overflow: clip; scroll-margin-top: calc(var(--topnav-height) + var(--filterbar-height) + var(--space-md)); }
.admin-grid .card-h { flex-wrap: wrap; }
.admin-grid .card-h .muted { font: var(--text-table); }
.table-wrap { overflow-x: auto; }
.admin-grid .data-table { min-width: 600px; }
.admin-grid .data-table td { white-space: normal; }
.admin-grid .data-table td code { overflow-wrap: break-word; }
.admin-grid .data-table td.date { white-space: nowrap; }
.admin-grid .data-table td code { font: var(--text-table); }
.admin-grid .data-table tr:last-child td { border-bottom: 0; }
.data-table td.actions { text-align: right; white-space: nowrap; }
.data-table td.actions .btn + .btn { margin-left: var(--space-xxs); }
.data-table td.empty-cell { padding: var(--space-lg) var(--space-md); color: var(--color-muted); text-align: center; }
/* phones: the table scrolls sideways, so a centred message would sit off-screen */
@media (max-width: 767px) { .data-table td.empty-cell { text-align: left; } }
/* phones: DESIGN.md's card list instead of a table that scrolls sideways. Each cell names its column (admin.html sets data-label from the header). */
@media (max-width: 767px) {
  .admin-grid .data-table { min-width: 0; }
  .admin-grid .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .admin-grid .data-table, .admin-grid .data-table tbody, .admin-grid .data-table tr { display: block; }
  .admin-grid .data-table tr { padding: var(--space-xs) var(--space-md); border-bottom: 1px solid var(--color-hairline-soft); }
  .admin-grid .data-table tr:last-child { border-bottom: 0; }
  .admin-grid .data-table td { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xxs) var(--space-xs); height: auto; padding: var(--space-xxs) 0; border: 0; }
  .admin-grid .data-table td[data-label]:not([data-label=""]) { grid-template-columns: 96px minmax(0, 1fr); }
  .admin-grid .data-table td[data-label]:not([data-label=""])::before { content: attr(data-label); color: var(--color-muted); font: var(--text-table-header); letter-spacing: var(--tracking-table-header); }
  .admin-grid .data-table td.date { white-space: normal; }
  .admin-grid .data-table td.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); text-align: left; }
  .admin-grid .data-table td.actions .btn + .btn { margin-left: 0; }
  .admin-grid .data-table td.empty-cell { padding: var(--space-md) 0; }
  .admin-grid .cell-2 > * { white-space: normal; overflow-wrap: anywhere; }
}
@media (pointer: coarse) { .admin-grid .cell-2 a.link { display: inline-flex; align-items: center; min-height: 44px; } }  /* the listing's title is a link: a 44px target */
.skel-tr .skel { display: block; }
.users { display: grid; gap: var(--space-sm); }
.user { overflow: hidden; }
.user-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
.user-h b { color: var(--color-ink); font-weight: 600; overflow-wrap: anywhere; }
.user .data-table { border-top: 1px solid var(--color-hairline); }
.user .grant { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--color-hairline); background: var(--color-surface-soft); }
.user .grant label { flex: 1 1 200px; }
.user .none { padding: 0 var(--space-md) var(--space-sm); color: var(--color-muted); font: var(--text-table); }
.form-panel { display: grid; gap: var(--space-sm); padding: var(--space-md); border-top: 1px solid var(--color-hairline); background: var(--color-surface-soft); }
.form-panel h3 { font: var(--text-title-sm); }
.form-panel .row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.card-h + .form-panel { border-top: 0; border-bottom: 1px solid var(--color-hairline); }
@media (max-width: 767px) { .user-h .chips { flex-basis: 100%; } }
/* admin: employers' postings (pilot/employers.py): a card for each one waiting, then a table of the decided ones */
.emp-list { display: grid; gap: var(--space-sm); padding: var(--space-md); }
.emp-list h3, .emp-sub h3 { font: var(--text-title-sm); }
.emp-list .none { color: var(--color-muted); font: var(--text-table); }
.emp-sub { border-top: 1px solid var(--color-hairline); }
.emp-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-xxs) var(--space-md); margin: 0; padding: 0 var(--space-md); font: var(--text-table); }
.emp-fields dt { color: var(--color-muted); }
.emp-fields dd { margin: 0; color: var(--color-body); overflow-wrap: anywhere; }
.emp-desc { max-height: 240px; margin: 0 var(--space-md); padding: var(--space-xs) var(--space-sm); overflow-y: auto; border-radius: var(--radius-md);
  background: var(--color-surface-soft); color: var(--color-body); font: var(--text-table); white-space: pre-wrap; overflow-wrap: anywhere; }
.emp-decided .cell-2 > * { white-space: normal; overflow-wrap: anywhere; }  /* the contact's address and the title are read in full */
.feat-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xxs); }
.feat-form .field { width: 150px; }
.data-table td .feat-form { margin-top: var(--space-xxs); }
@media (max-width: 479px) { .emp-fields { grid-template-columns: minmax(0, 1fr); } .emp-fields dd { margin-bottom: var(--space-xxs); } }

@media (max-width: 767px) {
  .page { padding-left: var(--space-md); padding-right: var(--space-md); }
  .page { padding-top: var(--space-lg); }
  /* The signed-in bar drops the avatar (initials only; the address is hidden anyway) and never squeezes a button. */
  .top-nav-row > .who { display: none; }
  .top-nav-row > .btn { flex: none; }
  .modal-h, .modal-b { padding-left: var(--space-md); padding-right: var(--space-md); }
}
@media (max-width: 479px) {
  /* With Admin or Send feedback beside Sign out there's no room for the name: the mark stays, screen readers keep the name. */
  .top-nav-row:has(#feedback, #adminLink:not([hidden])) .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 479px) {  /* the admin page: the mark, the Admin tag and Your account don't fit with the name */
  .top-nav-row:has(> .tag) .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- the AI on the search (build plan 6, B4-B6): plain words, rank by my CV, a cover letter ---------- */
.ask { display: grid; gap: var(--space-xs); padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-hairline); }
.ask .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
/* One line: the words, then the button beside it (under it on a phone). The length limit still holds; the hint need not say it. */
.ask { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.ask > label, .ask > .ai-wait, .ask > .msg { grid-column: 1 / -1; }
.ask > .actions { align-self: stretch; }
.ask .lbl .hint { display: none; }
.ask textarea { resize: none; field-sizing: content; min-height: 44px; max-height: 120px; }
@media (max-width: 767px) { .ask { grid-template-columns: minmax(0, 1fr); } }
.ai-wait { display: grid; gap: var(--space-md); }
.ai-wait .skel.tall { height: 36px; }
.ask .ai-wait { gap: var(--space-xs); }
.ai-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.ai-bar .ai-wait { display: inline-grid; flex: 1 1 140px; gap: var(--space-xs); }
.ai-why { display: block; }
.ai-why .tag { display: inline-block; height: auto; padding: 2px var(--space-xs); border-radius: var(--radius-md); white-space: normal; }  /* the label wraps in a narrow column, never cut */
.cell-2 > .letter-btn { justify-self: start; margin-top: var(--space-xxs); }
#letterText { min-height: 260px; }

/* ---------- the CV (build plan 6, C): the first onboarding step, the reading skeleton, the marks on filled fields, the profile card ---------- */
.cv-step, .cv-reading, #onboardForm { display: grid; gap: var(--space-md); }
#cvForm .field[type="file"] { height: auto; padding: var(--space-xs) var(--space-sm); }
.cv-reading .skel.tall { height: 36px; }
.cv-mark { margin-left: var(--space-xs); font-weight: 400; }  /* a neutral tag, not a status: the student's own edit takes it off */
.ai-usage { display: grid; gap: var(--space-xs); color: var(--color-muted); font: var(--text-table); font-variant-numeric: tabular-nums; }
.ai-usage:empty { display: none; }
.cv-card .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cv-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-xs) var(--space-md); margin: 0; font: var(--text-body-sm); }
.cv-facts dt { color: var(--color-muted); }
.cv-facts dd { margin: 0; color: var(--color-body); overflow-wrap: anywhere; }
.cv-edit { display: grid; gap: var(--space-md); }
.cv-rows { display: grid; gap: var(--space-xs); }
.cv-row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-xs); }
.cv-row .field, .cv-row .lbl { flex: 1 1 110px; min-width: 0; }
.cv-edit .checks { max-height: none; overflow: visible; }  /* nothing scrolls inside a form, as in the filters */
.draft { flex-wrap: wrap; align-items: center; }
.draft .draft-text { flex: 1 1 100%; color: var(--color-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 767px) { .cv-facts { grid-template-columns: minmax(0, 1fr); gap: 0; } .cv-facts dd { margin-bottom: var(--space-xs); } }

/* ---------- the CV tailored to one application and the interview prep (build plan 6, B7, B8) ---------- */
#cvtailorText { min-height: 320px; font: var(--text-code); }  /* mono: the Lebenslauf's date column lines up */
@media (max-width: 767px) { #cvtailorText { font: var(--text-code-md); } }  /* 16px: a smaller field makes iOS zoom in */
.prep { display: grid; gap: var(--space-md); }
.prep h3 { font: var(--text-title-sm); }
.prep ol, .prep ul { display: grid; gap: var(--space-sm); margin: 0; padding-left: var(--space-lg); }
.prep li > b, .prep li > .hint, .prep li > .prep-outline { display: block; }
.prep li > b { font-weight: 600; color: var(--color-ink); }
.prep-outline { margin-top: var(--space-xxs); font: var(--text-body-sm); color: var(--color-body); white-space: pre-line; }  /* the outline's own lines, as points */

/* ---------- suggested filters (Search) ---------- */
.suggest { display: grid; gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-hairline-soft); }
.sug-list { display: grid; gap: var(--space-xs); }
.sug-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.sug-row .chip { border-style: solid; cursor: pointer; }  /* a button here, not a toggle: solid like a control */
.sug-row .hint { flex: 1 1 200px; min-width: 0; }
@media (max-width: 767px) { .sug-row .chip { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* CV drop zone: the whole box is the file input's label */
.dropzone { display: grid; gap: var(--space-xxs); justify-items: center; text-align: center; padding: var(--space-lg) var(--space-md); border: 1px dashed var(--color-hairline); border-radius: var(--radius-lg); background: var(--color-surface-raised); color: var(--color-muted); cursor: pointer; }
.dropzone b { font: var(--text-title-sm); color: var(--color-ink); }
.dropzone u { color: var(--color-accent); }
.dropzone.over, .dropzone:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.dropzone:focus-within { box-shadow: var(--shadow-focus); }
.dz-file { color: var(--color-ink); font: var(--text-table); overflow-wrap: anywhere; }
/* The first-login walkthrough: a card over the corner, the tab it talks about lit up */
dialog.walk { position: fixed; inset: auto var(--space-md) var(--space-md) auto; margin: 0; width: min(340px, calc(100vw - 2 * var(--space-md))); gap: var(--space-xs); padding: var(--space-md); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); background: var(--color-surface-raised); color: var(--color-body); box-shadow: var(--shadow-lg); z-index: 50; }
dialog.walk[open] { display: grid; }
dialog.walk h2 { font: var(--text-title-sm); color: var(--color-ink); }
.walk-actions { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); }
.sn-nav a.spot { box-shadow: var(--shadow-focus); }  /* the walkthrough lights up the section it talks about */

.sn-links { display: flex; flex-wrap: wrap; gap: var(--space-xxs) var(--space-md); font: var(--text-table); color: var(--color-muted); }
.sn-links a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) { .legal-main { display: none; } }  /* the same links sit at the foot of the side navigation */
/* The account row under the logo in the side navigation (sidenav.js nodes): name, then the menu */
.acct { position: relative; flex: none; }
.acct-btn { gap: var(--space-xs); padding: 0 var(--space-xs) 0 var(--space-xxs); border-radius: var(--radius-pill); }
@media (min-width: 900px) { .sn-top .acct { order: 2; } }  /* top bar: the account sits at the right */
.acct-btn .chev { color: var(--color-muted); transition: transform var(--motion-fast) var(--motion-easing); }
.acct-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acct-btn[aria-expanded="true"], .acct-btn.on { background: var(--color-surface-soft); color: var(--color-ink); }
.acct-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--text-table); }
.acct-menu { position: absolute; top: calc(100% + var(--space-xs)); right: 0; z-index: 60; min-width: 240px; max-width: calc(100vw - 2 * var(--space-md)); padding: var(--space-xs); border: 1px solid var(--color-hairline); border-radius: var(--radius-lg); background: var(--color-surface-raised); box-shadow: var(--shadow-lg); }
.acct-menu[hidden], .acct-item[hidden] { display: none; }
.acct-who { display: grid; gap: var(--space-xxs); padding: var(--space-xs) var(--space-sm) var(--space-sm); margin-bottom: var(--space-xxs); border-bottom: 1px solid var(--color-hairline); }
.acct-who b { font: var(--text-title-sm); color: var(--color-ink); overflow-wrap: anywhere; }
.acct-who span { font: var(--text-table); color: var(--color-muted); overflow-wrap: anywhere; }
.acct-item { display: flex; align-items: center; gap: var(--space-sm); width: 100%; min-height: 40px; padding-block: var(--space-xxs); padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-body); font: var(--text-button); text-align: left; text-decoration: none; cursor: pointer; transition: background var(--motion-fast) var(--motion-easing), color var(--motion-fast) var(--motion-easing); }
.acct-item:hover, .acct-item:focus-visible { background: var(--color-surface-soft); color: var(--color-ink); }
.acct-item .i { color: var(--color-muted); }
.acct-item.lang-switch { padding-inline-start: calc(var(--space-sm) * 2 + 16px); }
@media (max-width: 899px) { .sn-brand .acct { margin-left: auto; } }
@media (max-width: 767px) { .acct-name, .acct-btn .chev { display: none; } .acct-btn { padding: 0 var(--space-xxs); } }

/* The feedback prompt: bottom corner, never over the page's own controls on a phone (full width, above nothing else). */
.nudge { position: fixed; right: var(--space-md); bottom: var(--space-md); z-index: 20; width: min(340px, calc(100% - 2 * var(--space-md))); box-shadow: var(--shadow-md); }
.nudge[hidden] { display: none; }
.nudge .actions { margin-top: var(--space-sm); }

/* ---------- the signed-in app: cards, panels and the paid screens (DESIGN.md, the year planner across the app) ----------
   Cards are hairline, 12px, with a title-md head; a panel's cards share one rhythm. Settings runs in two columns on a wide screen
   (its cards are short and many), Answers in two; Applications keeps its table at full width. */
.ph-text { display: grid; gap: var(--space-xxs); }
.app .card-h { min-height: 56px; padding-inline: var(--space-lg); }
.app .card-h h2, .app .card-h h3 { font: var(--text-title-md); }
.app .card-b { padding: var(--space-lg); }
.app .nudge .card-b { padding: var(--space-md); }
.app .page-intro { max-width: 640px; margin: 0; color: var(--color-muted); font: var(--text-body-md); }
.app .page-intro b { color: var(--color-ink); font-weight: 600; }
.app .tab-panel { gap: var(--space-xl); }
.settings .fields { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }
.answers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.answer { align-self: start; }
@media (max-width: 1023px) { .answers { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } }
@media (min-width: 1100px) {
  .tab-panel.settings { display: block; column-count: 2; column-gap: var(--space-lg); }
  .tab-panel.settings > * { break-inside: avoid; margin-bottom: var(--space-lg); }
  .tab-panel.settings > .banner { column-span: all; }
  .tab-panel.settings .sub-card { max-width: none; }
}
@media (max-width: 767px) { .app .card-b { padding: var(--space-md); } .app .card-h { padding-inline: var(--space-md); } .app .tab-panel { gap: var(--space-lg); } .search-stack { gap: var(--space-lg); } }
/* the paywall and the subscription card: what is included as a ruled list */
.pay-list { gap: 0; padding: 0; list-style: none; border-block: 1px solid var(--color-hairline-soft); }
.pay-list li { position: relative; padding: var(--space-xs) 0 var(--space-xs) var(--space-lg); border-bottom: 1px solid var(--color-hairline-soft); }
.pay-list li:last-child { border-bottom: 0; }
.pay-list li::before { content: ""; position: absolute; left: var(--space-xxs); top: calc(var(--space-xs) + 0.45em); width: 8px; height: 4px; border-left: 2px solid var(--color-ink); border-bottom: 2px solid var(--color-ink); transform: rotate(-45deg); }
.app .lbl { align-content: start; }  /* a taller neighbour (a hint under its field) must not spread this one out */

/* ---------- radio buttons (Settings, the report dialog): the accent, like the tick boxes ---------- */
input[type="radio"] { accent-color: var(--color-accent); }
