/* capy/web/static/yuzu.css — the general-public design.

   One stylesheet, both themes. Every colour below is a token on :root, and
   every component reads a token. The dark blocks move the tokens and change
   nothing else. test_theme_contrast.TestYuzuContrast measures the pairs.

   The palette: a capybara in a yuzu bath. Yuzu is the accent and is a FILL
   only; text on it is --accent-ink, and yuzu-coloured text is the deeper
   --accent-text, because white on yuzu measures 2.98:1. River is the save
   colour, clay is the pass colour.

   --accent-text in light is #A54B0E. The spec gives #B5520F, but that
   value scores 4.33:1 on --accent-soft, below AA. The contrast rule says:
   darken the text token, never the fill. The new value scores 5.01:1.

   --muted in light is #756557 for the same reason. It was #7A6A5C, which
   scores 4.43:1 on --bg-2 — the ground under the plain .chip, which carries
   "Salary not published" on every card. The new value scores 4.77:1. */
:root {
  color-scheme: light;
  --bg: #FBF7F1; --bg-2: #F3ECE3; --surface: #FFFFFF; --line: #E6DCCF;
  --ink: #2A211B; --muted: #756557;
  --accent: #E8762B; --accent-ink: #2A211B; --accent-text: #A54B0E; --accent-soft: #FDEBDD;
  --save: #1B7878; --save-text: #146464; --save-soft: #DCF0EE;
  --pass: #B8584C; --pass-text: #8E3E34; --pass-soft: #F6E1DD;
  --chip-bg: #E4F1EA; --chip-ink: #1E5A3E;
  --menu-bg: #E9EEF4; --menu-ink: #1F2A36; --menu-muted: #5B6B7C; --menu-sel: #1F2A36; --menu-sel-ink: #F4F7FA;
  --shadow: 0 18px 40px -20px rgba(42,33,27,.35), 0 2px 6px -2px rgba(42,33,27,.12);
  --radius: 20px; --radius-sm: 12px;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --measure: 40rem;
  /* The space scale. Each distance has one use; see "the kit" below. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px;
  /* The text scale: a hint, the body, a section heading, a page heading. */
  --text-s: 14.5px; --text-m: 16px; --text-l: 18px; --text-xl: 24px;
  /* One height and one largest width for a control. */
  --control: 48px; --control-width: 24rem;
  --danger: #B3261E; --danger-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1B1714; --bg-2: #241F1B; --surface: #2B2520; --line: #3D342D;
    --ink: #F3EBE2; --muted: #B3A394;
    --accent: #F28C45; --accent-ink: #1B1714; --accent-text: #F28C45; --accent-soft: #3E2A1B;
    --save: #4FB8B4; --save-text: #4FB8B4; --save-soft: #1E3A39;
    --pass: #E08A7C; --pass-text: #E08A7C; --pass-soft: #3F2825;
    --chip-bg: #22392E; --chip-ink: #9ED7B6;
  --danger: #F0796B; --danger-ink: #1B1714;
    --menu-bg: #232B35; --menu-ink: #E6EDF5; --menu-muted: #9AAABB; --menu-sel: #E6EDF5; --menu-sel-ink: #1B2129;
    --shadow: 0 18px 40px -20px rgba(0,0,0,.7), 0 2px 6px -2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1B1714; --bg-2: #241F1B; --surface: #2B2520; --line: #3D342D;
  --ink: #F3EBE2; --muted: #B3A394;
  --accent: #F28C45; --accent-ink: #1B1714; --accent-text: #F28C45; --accent-soft: #3E2A1B;
  --save: #4FB8B4; --save-text: #4FB8B4; --save-soft: #1E3A39;
  --pass: #E08A7C; --pass-text: #E08A7C; --pass-soft: #3F2825;
  --chip-bg: #22392E; --chip-ink: #9ED7B6;
  --danger: #F0796B; --danger-ink: #1B1714;
  --menu-bg: #232B35; --menu-ink: #E6EDF5; --menu-muted: #9AAABB; --menu-sel: #E6EDF5; --menu-sel-ink: #1B2129;
  --shadow: 0 18px 40px -20px rgba(0,0,0,.7), 0 2px 6px -2px rgba(0,0,0,.4);
}

/* ── base ── */
* { box-sizing: border-box; }
/* The deck controls ship with the `hidden` attribute and the script removes
   it. A display rule in this file outranks the browser's own [hidden] rule,
   so `.progress { display: flex }` alone would show the bar with the script
   off. This line keeps the attribute in charge. */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); }
main { max-width: var(--measure); margin: 0 auto; padding: 8px 18px 64px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: 24px; line-height: 1.15; margin: 8px 0 16px; }
@media (min-width: 720px) { h1 { font-size: 34px; } }
p { margin: 0 0 12px; }
a { color: var(--accent-text); }
label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
textarea, input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%; font: inherit; padding: 12px 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
textarea { resize: vertical; min-height: 6rem; }
/* The placeholder takes the muted token. The browser default is a grey that
   belongs to no theme, and it reads too faint on the dark ground. */
::placeholder { color: var(--muted); opacity: 1; }
button, .btn { font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 999px;
  padding: 12px 18px; background: var(--accent); color: var(--accent-ink); margin-top: 12px; }
:is(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
/* The intake page. The scope line sits under the heading at body size with
   a little air before the form; the price line sits under the button,
   small. Both are muted: they inform, the heading and the form act. */
p.scope { max-width: 34rem; margin: -4px 0 14px; }
/* The three steps on the home page. Short lines, each with its number in a
   small disc. The list sits between the scope line and the form, so it is
   compact: the search box stays on the first screen of a phone. */
.how { list-style: none; counter-reset: how; max-width: 34rem; margin: 0 0 22px; padding: 0; display: grid; gap: 8px;
  font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.how li { counter-increment: how; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.how li::before { content: counter(how); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 12.5px; line-height: 1; }
/* The example listings under the form. */
.home-jobs { margin: 36px 0 0; }
.home-jobs > h2 { font-size: 18px; margin: 0 0 12px; }
.home-more { font-size: 14px; margin: 4px 0 0; }
p.price { font-size: 14px; margin: 12px 0 0; }
.lang { margin-top: 32px; font-size: 14px; }
.search-hint, .note { color: var(--muted); font-size: 14px; }
button[aria-busy="true"] { opacity: .6; cursor: progress; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── header and footer ── */
header.site { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--measure); margin: 0 auto; padding: 16px 18px 8px; }
header.site .brand { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
header.site .who { font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
footer.site { max-width: var(--measure); margin: 0 auto; padding: 0 18px 40px; font-size: 13px; color: var(--muted); }
footer.site::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 24px; }
/* The theme button and the sign-in state share one box, so the header keeps
   two children and `space-between` puts one at each edge. */
header.site .corner { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* The theme control, at the start of the footer with its word. */
footer.site .theme-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
html:not(.js) footer.site .theme-row { display: none; }
/* The theme button. One press moves to the next mode: auto, dark, light.
   The glyph shows the theme on the screen: a moon for dark, a sun for light.
   The "A" mark shows that the system setting chose the theme. */
.theme-toggle { position: relative; flex: 0 0 auto; width: 36px; height: 36px; margin: 0; padding: 0;
  display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted); }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { grid-area: 1 / 1; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
.theme-toggle .auto-mark { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 800 10px/1 var(--body); }
:root:is([data-theme="dark"], [data-theme="light"]) .theme-toggle .auto-mark { display: none; }
/* Without JavaScript the button cannot store a choice, so it goes. The
   system setting still chooses the theme. */
html:not(.js) .theme-toggle { display: none; }
.feedback-link { color: var(--muted); }
/* The floating feedback button: a link and a dismiss control in one pill.
   Bottom LEFT, above the place of the footer link. The save and pass buttons
   of a card sit at the right edge, so the pill does not cover them. */
.feedback-fab { position: fixed; left: 16px; bottom: 16px; z-index: 5; display: flex; align-items: center;
  height: 40px; padding: 0 5px 0 0; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-size: 13px; transform-origin: left bottom; }
.feedback-fab .fab-link { display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 6px 0 13px;
  border-radius: 999px 0 0 999px; color: var(--ink); font-weight: 600; text-decoration: none; }
.feedback-fab .fab-close { width: 28px; height: 28px; margin: 0; padding: 0; display: grid; place-items: center;
  border-radius: 50%; background: none; color: var(--muted); }
.feedback-fab .fab-close:hover { background: var(--bg-2); color: var(--ink); }
/* With scripts off the pill cannot be dismissed, so it goes. `no-fab` is the
   stored dismissal; theme.js sets it before the first paint. */
html:not(.js) .feedback-fab, html.no-fab .feedback-fab { display: none; }
@media (max-width: 30rem) {
  /* On a phone the pill is the glyph and the dismiss control. The link keeps
     its name for a screen reader. */
  .feedback-fab .fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* The deck page on a phone has no pill. The round skip button comes to
     the same corner on a short screen. The footer link stays. */
  body:has(.deck) .feedback-fab { display: none; }
}
/* The footer link, after the reader dismissed the pill: two soft pulses. */
.feedback-link.pointed { border-radius: 4px; animation: point .9s ease 2; }
@keyframes point { 50% { box-shadow: 0 0 0 6px var(--accent-soft); color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .feedback-link.pointed { animation: none; } }
.legal-links { display: block; margin-top: 12px; }
.legal-links a { color: var(--muted); }
/* The legal pages: plain text at a width that reads well. The draft mark
   must be the first thing that a reader sees. */
.legal h1 { margin-bottom: 8px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal li { margin: 6px 0; }
.draft-banner { margin: 12px 0; padding: 10px 14px; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-weight: 700; }
html.js .theme-select + .feedback-link { margin-left: 14px; }

/* ── tabs ── */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px;
  padding: 6px 14px; font-weight: 600; font-size: 14px; text-decoration: none; }
.tab[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── cards ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; margin: 0 0 12px; }
.card h2 { font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
.card .co { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.tile { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 14px; color: #fff;
  background: hsl(calc(var(--tile) * 45) 45% 42%); }
.tile::before { content: attr(data-initial); }
.card .logo { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: var(--surface); flex: 0 0 auto; }
.company { color: var(--ink); font-weight: 600; }
.company-name { border: 0; background: none; padding: 0; margin: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.has-blurb { position: relative; display: inline-block; }
.blurb { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 2; width: max-content;
  max-width: min(22rem, calc(100vw - 3rem)); padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; box-shadow: var(--shadow); }
@media (hover: hover) { .has-blurb:hover .blurb { display: block; } }
.has-blurb:focus-within .blurb, .has-blurb.open .blurb { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.ok { background: var(--chip-bg); color: var(--chip-ink); }
.chip.ok::before { content: "✓ "; }
.chip.pay { background: var(--accent-soft); color: var(--accent-text); }
/* Why a card is a match. Plain text, lighter than the chips above it: a line
   to read, not a row of buttons. The marks are decoration, so their alt text
   is empty and a screen reader reads the words only. */
.reasons { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -2px 0 10px; padding: 0; font-size: 13px; }
.reason.ok { color: var(--ink); }
.reason.ok::before { content: "✓ " / ""; color: var(--accent-text); font-weight: 700; }
.reason.gap { color: var(--muted); }
.reason.gap::before { content: "– " / ""; }
/* The one-click report "I can't get this job from Chile". It disputes the
   badge, so it is directly below the badge. Quiet text, not a button shape:
   most readers never need it. */
.card .not-open { margin: -4px 0 10px; font-size: 13px; color: var(--muted); }
.card .not-open button { all: unset; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.card .not-open button:hover { color: var(--ink); }
.card .not-open button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.card .not-open.done { font-weight: 600; color: var(--ink); }
.card.reported > h2, .card.reported > .co, .card.reported > p.muted, .card.reported > .reasons { opacity: .55; }
.card p.muted { font-size: 14.5px; }
.card .actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.card .actions > a { font-weight: 700; text-decoration: none; }
.card .actions .mark-form:first-of-type { margin-left: auto; }
/* "Bad match?" is a note to the operator, not what the card is for, so it
   is quieter than "view listing" beside it. */
.card .actions > a.report { font-weight: 400; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.actions .mark-form { display: inline; margin: 0; }
.actions button.mark { width: 36px; height: 36px; padding: 0; margin: 0; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.actions button.mark.saved { background: var(--save-soft); color: var(--save-text); border-color: transparent; }
.locked .company { color: var(--muted); font-style: italic; }

/* ── the pile and the wall ── */
.walled { position: relative; }
.walled .skeletons { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; max-height: 24rem; overflow: hidden; }
article.card.hidden .bar { display: block; height: .7rem; margin: .55rem 0; border-radius: 6px; background: var(--bg-2); }
article.card.hidden .bar:first-child { height: 1rem; }
.walled::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8rem; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.wall { position: absolute; top: 1.75rem; left: 0; right: 0; z-index: 2; margin: 0 auto; width: min(24rem, 100%);
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.wall h2 { font-size: 20px; margin: 0 0 4px; }
.wall .note { margin: 0 0 12px; }
/* One rhythm inside a card: the field-to-button gap is the same 10px that
   separates the note from the field once the note's own leading is counted.
   At 8px the button sat visibly closer to the field than the field sat to
   the note, and the card read as two groups instead of one form. */
.wall form, .auth form { display: grid; gap: 10px; }
/* The field sits ON a card, so it takes the page ground. The surface token
   is the card itself, and a field the colour of its card has no shape.

   The `:not()` is here for weight, not for the match. The base field rule
   carries two attribute selectors, and `.wall input` alone scores below it
   and never applies. */
.wall input:not([type="hidden"]), .auth input:not([type="hidden"]) { background: var(--bg); }
.wall form button, .auth form button { margin: 0; width: 100%; }
.wall .alt, .auth .alt { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* ── forms on the results page ── */
form.subscribe, form.followup .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; max-width: 30rem; }
form.subscribe input[type="email"], form.followup input:not([type="hidden"]) { flex: 1 1 14rem; min-width: 0; margin: 0; }
form.subscribe button, form.followup button, form.save-search button { margin: 0; flex: 0 0 auto; }
@media (max-width: 30rem) { form.subscribe, form.followup .row { display: grid; } form.subscribe button, form.followup button { width: 100%; } }
form.save-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 0; }
form.save-search .hint { font-size: 14px; color: var(--muted); }
p.filters { font-size: 14px; margin: 0 0 16px; } p.filters .on { font-weight: 700; }
/* The word before the filter links names them. It is a label, not a link. */
p.filters .label { font-weight: 700; margin-right: 4px; }
/* Each option wraps as one unit. On a phone the row broke inside "Últimos 7
   días", leaving "días" alone on the next line. */
p.filters a, p.filters .on { white-space: nowrap; }

/* ── sign in, profile ── */
/* 20px on top and 24px below: the heading's half-leading adds about 5px of
   visible air above its cap height, and the button below has none, so equal
   padding reads as a card that is heavier at the top. */
.auth { max-width: 24rem; margin: 32px auto; padding: 20px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth h1 { font-size: 24px; margin: 0 0 4px; }
.auth .note { margin: 0 0 10px; }
/* The sent page has no form under the note, so the note ends the card. */
.auth.sent .note { margin-bottom: 0; }
/* The feedback form: the price question is a group of radio buttons. */
.auth.feedback { max-width: 30rem; }
.auth fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.auth legend { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.auth label.choice { display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.auth .error { font-weight: 700; color: var(--ink); }
/* The text-field rules above match a radio too, and stretch it to the full
   width. This puts it back to its own size. */
.auth label.choice input { width: auto; flex: none; margin: 0; padding: 0; accent-color: var(--accent); }
/* The left corners are square, and the other two keep the radius. A 4px
   accent border under a 12px radius bends into an arc at both ends, and an
   inset shadow follows the same curve. Square corners give a straight bar. */
.saved-search { display: block; width: 100%; margin: 0 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font: inherit; color: var(--ink); resize: none; field-sizing: content; min-height: 2.75rem; }
.saved-search-heading, .marks-heading { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 24px 0 8px; }
.marks { list-style: none; margin: 0; padding: 0; }
/* The passed list folds: it grows with every pass. */
.marks-fold { margin: 24px 0 8px; }
.marks-fold > summary { cursor: pointer; list-style: none; width: fit-content; }
.marks-fold > summary::-webkit-details-marker { display: none; }
.marks-fold > summary > .marks-heading { display: inline; margin: 0; }
.marks-fold > summary::before { content: "+ "; color: var(--accent-text); font-weight: 700; }
.marks-fold[open] > summary::before { content: "\2212\a0"; }
.marks-fold[open] > summary { margin-bottom: 8px; }
.marks > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.marks form { margin: 0; }
.marks button { margin: 0; padding: 6px 12px; font-size: 13px; background: none; border: 1px solid var(--line); color: var(--accent-text); }
/* The row is the title, the company and the link. It takes the free room,
   and the control beside it keeps the right edge. */
.marks-row { flex: 1; min-width: 0; }
/* A saved row expands. The text takes the full row; the bookmark that
   removes the save sits in the top right corner, over the text's padding. */
.marks > li:has(> .saved-item) { display: block; position: relative; padding: 14px 16px; }
.marks > li:has(> .saved-item) > .saved-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; }
.saved-actions .mark-form { margin: 0; }
.saved-actions button.mark, .saved-actions .mark-link { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--save-soft); color: var(--save-text); border: 0; }
.saved-actions .mark-link { background: none; border: 1px solid var(--line); color: var(--accent-text); }
.saved-actions .mark-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.saved-item > summary { list-style: none; cursor: pointer; display: grid; gap: 6px; padding-right: 88px; }
.saved-item > summary::-webkit-details-marker { display: none; }
.saved-item > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.saved-item .marks-row { font-size: 15px; }
.saved-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.saved-meta .chip { white-space: nowrap; }
.saved-when { font-size: 12.5px; color: var(--muted); }
.saved-toggle { font-size: 13.5px; font-weight: 700; color: var(--accent-text); }
.saved-toggle .show::after { content: " ▾" / ""; }
.saved-toggle .hide::after { content: " ▴" / ""; }
.saved-toggle .hide, .saved-item[open] .saved-toggle .show { display: none; }
.saved-item[open] .saved-toggle .hide { display: inline; }
.saved-detail { display: grid; gap: 8px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.saved-detail p { margin: 0; }
.saved-detail .reasons { margin: 0; }
.saved-stack { font-size: 13px; color: var(--muted); }
.marks-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.marks-head .expand-all { font-size: 13.5px; font-weight: 700; color: var(--accent-text); text-decoration: none; }
/* The saved searches, at the top of the signed-in home page. The current one
   is drawn filled, like the current tab; each other one is a link. */
.search-switch { margin: 0 0 12px; }
.search-switch-label { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.search-switch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.search-switch li > * { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.search-switch [aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search-switch a:hover { border-color: var(--ink); }
.new-search-fold { margin: 8px 0 28px; }
.new-search-fold > summary { cursor: pointer; color: var(--accent-text); font-weight: 600; list-style: none; width: fit-content; }
.new-search-fold > summary::-webkit-details-marker { display: none; }
/* The sign says which way the fold moves. The summary reads as a link, and a
   link with no sign gives the reader no clue that it opens a form. */
.new-search-fold > summary::before { content: "+ "; font-weight: 700; }
.new-search-fold[open] > summary::before { content: "\2212\a0"; }
.new-search-fold > form { margin-top: 20px; }
/* The search on its own results page: what capy understood, then the fold
   that holds the sentence. The fold opens to a short box, not the intake
   page's tall one. */
.refine { margin: 0 0 20px; }
.refine .understood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; }
.refine .understood .label { color: var(--muted); margin-right: 2px; }
.refine .understood-nothing { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.refine .refine-fold { margin: 0; }
.refine .refine-fold > form { margin-top: 12px; max-width: 36rem; }
.refine .refine-fold textarea { min-height: 4.5rem; }

/* ── admin and tables ── */
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
[popover] { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; max-width: 22rem; background: var(--surface); color: var(--ink); }
.why { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline dotted; padding: 0; margin: 0; }
/* `.badge` gets no rule of its own. The eligibility chip carries
   `badge chip ok`, and `.chip.ok` above draws it. */

/* ── the deck ── */
.deck.js-deck { position: relative; height: 420px; margin: 8px 0 0; }
.deck.js-deck article.card { position: absolute; inset: 0; margin: 0; display: none; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s; will-change: transform; }
.deck.js-deck article.card.top { display: flex; z-index: 3; }
.deck.js-deck article.card.second { display: flex; z-index: 2; transform: scale(.96) translateY(12px); opacity: .85; pointer-events: none; }
.deck.js-deck article.card.third { display: flex; z-index: 1; transform: scale(.92) translateY(24px); opacity: .6; pointer-events: none; }
.deck.js-deck article.card p.muted { flex: 1; }
.deck.js-deck article.card.out-left { display: flex; transform: translateX(-120%) rotate(-10deg); opacity: 0; }
.deck.js-deck article.card.out-right { display: flex; transform: translateX(120%) rotate(10deg); opacity: 0; }
.deck.js-deck article.card.gone { display: none; }
.deck.js-deck article.card .actions .mark-form { display: none; }
/* The top card is the one a finger can move. `touch-action: none` hands the
   drag to the script instead of the page scroll; the link inside keeps its
   own touch handling so a tap on it is still a tap. */
.deck.js-deck article.card.top { cursor: grab; touch-action: none; user-select: none; }
.deck.js-deck article.card.top .actions a { touch-action: auto; }
.deck.js-deck article.card.dragging { cursor: grabbing; transition: none; }
/* The stamp: a rubber-stamp word in the card's corner, tilted the other
   way from the card so it reads as landed on it. Hidden until the drag
   would commit, and during the fly-out after a button or a key. Outside a
   scripted deck the span exists and draws nothing. */
.stamp { display: none; }
.deck.js-deck article.card .stamp {
  display: block; position: absolute; top: 12px; z-index: 2; padding: 6px 14px;
  border: 3px solid currentColor; border-radius: 10px;
  /* A solid fill: the stamp lands on the title, and without one the title
     shows through the word and neither can be read. */
  background: var(--surface); box-shadow: var(--shadow);
  font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
/* The reason under the verb, once the menu has one. Empty, it takes no room. */
.deck.js-deck article.card .stamp small { display: block; font: 600 13px/1.25 var(--body);
  letter-spacing: 0; text-transform: none; white-space: normal; max-width: 12rem; }
.deck.js-deck article.card .stamp small:empty { display: none; }
.deck.js-deck article.card .stamp.keep { right: 14px; color: var(--save-text); transform: rotate(-12deg); }
.deck.js-deck article.card .stamp.skip { left: 14px; color: var(--pass-text); transform: rotate(12deg); }
.deck.js-deck article.card.pending-keep .stamp.keep,
.deck.js-deck article.card.out-right .stamp.keep,
.deck.js-deck article.card.pending-skip .stamp.skip,
.deck.js-deck article.card.out-left .stamp.skip { opacity: 1; }
/* The stack holds its height while a card is in it. With the last card
   marked, the height goes and the controls move up to the link. A fixed
   height there leaves a blank block where the stack was. */
.deck.js-deck.empty-deck { height: auto; }
/* `align-content` groups the two rows in the middle. Without it the grid
   stretches them apart and the heading floats away from the line under it. */
.deck .empty { display: grid; place-items: center; align-content: center; text-align: center; min-height: 240px; color: var(--muted); }
.deck .empty h2 { font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.progress .track { flex: 1; height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; display: block; }
.progress .fill { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.deck-actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 10px 26px; padding: 18px 0 4px; }
/* Each round button has its word below it. The word is what tells a reader
   that the bookmark is an action (Save), not the state of the card. */
.deck-actions .act { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 72px; }
.deck-actions .act-label { font: 600 13px/1.2 var(--body); color: var(--muted); }
/* The three buttons sit on one line by their centres: Save is larger. */
.deck-actions .act .round.skip, .deck-actions .act .round.later { margin-top: 4px; }
.deck-actions .undo-row { flex-basis: 100%; display: flex; justify-content: center; }
/* Flex, not grid. The button holds two things: the glyph box and the label
   text, which font-size 0 makes invisible but not absent. As grid items the
   two stack in two rows and the glyph is centred in the top half. In a flex
   row the empty text takes no width and the glyph sits in the middle. */
.round { width: 64px; height: 64px; border-radius: 50%; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); font-size: 0; line-height: 0; }
/* The glyph is a shape, not a character: a text glyph sits on a baseline
   and its optical centre drifts up and to one side, so the cross and the
   heart looked off-centre. A masked SVG box is centred by the grid and
   painted in currentColor, so the token still sets its colour. */
.round::before { content: ""; width: 28px; height: 28px; background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.round.skip { background: var(--pass-soft); color: var(--pass-text); }
.round.skip { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
/* The heart takes the page ground, not #fff. The light --save is deep and
   white reads well on it, but the dark --save is a pale teal and white
   measures 2.37:1 there. --bg is near white in light and equals
   --accent-ink in dark, the pair test_white_on_the_save_fill_clears_aa
   measures. */
.round.keep { background: var(--save); color: var(--bg); width: 72px; height: 72px; }
/* An outline bookmark with a plus: "add to the saved list". A filled
   bookmark looked like the state "this card is saved". */
.round.keep { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12a1 1 0 0 1 1 1v17l-7-4-7 4V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M12 7.5v6M9 10.5h6'/%3E%3C/svg%3E"); }
.round.keep::before { width: 30px; height: 30px; }
/* Later: a neutral button between the two. It writes no mark. The glyph is
   an arrow that goes over the next cards. */
.round.later { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.round.later { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17a8 8 0 0 1 14-5.3L20 14'/%3E%3Cpath d='M20 8v6h-6'/%3E%3C/svg%3E"); }
.undo { margin: 0; padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.undo:disabled { opacity: .4; cursor: default; }
/* A round button with no card to act on reads like the undo button with
   nothing to undo. */
.round:disabled { opacity: .4; cursor: default; }
/* The element name keeps this rule off the save-search hint, which is a
   span in a flex row and takes its own rule above. */
p.deck-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.more { text-align: center; margin: 16px 0 0; }
.drawer { margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 12px; }
.drawer summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary .count { background: var(--bg-2); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.passed { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.passed li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.passed li .t { font-weight: 600; } .passed li .c { color: var(--muted); font-size: 13px; }
.passed li .mark-why { color: var(--pass-text); font-size: 13px; font-weight: 600; margin-right: auto; }
.passed li form { margin: 0; }
.passed li button { margin: 0; padding: 6px 12px; font-size: 13px; background: none; border: 1px solid var(--line); color: var(--accent-text); flex: 0 0 auto; white-space: nowrap; }
.passed .none { color: var(--muted); font-size: 14px; padding: 6px 2px; }
/* A narrow screen gives the title its own line. Three items on one line
   leave the title a column two words wide. */
@media (max-width: 30rem) {
  .passed li { flex-wrap: wrap; }
  .passed li .t { flex: 1 0 100%; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px); background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translateX(-50%); }
/* The toast of the feedback pill is a full sentence, so it can wrap on a
   narrow screen. */
.toast.fab-toast { z-index: 6; white-space: normal; width: max-content; max-width: calc(100vw - 32px); text-align: center; border-radius: 18px; }

/* ── the reason menu ──
   Built by app.js on the deck page only, so none of this applies anywhere
   else. Slate: a cool panel off the warm page, so it reads as a layer on
   top rather than another card. The selected row fills in ink; the side
   shows on its dot only, clay for a pass and river for a save.
   test_theme_contrast measures --menu-ink and --menu-muted on --menu-bg,
   and --menu-sel-ink on --menu-sel. */
.reason-mask { position: fixed; inset: 0; z-index: 9; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 35%, transparent); animation: fade .15s ease both; }
.reason-mask.pick { pointer-events: auto; }
@keyframes fade { from { opacity: 0; } }
.reason-menu { position: fixed; z-index: 10; width: min(15rem, 72vw); margin: 0; padding: 6px; list-style: none;
  background: var(--menu-bg); color: var(--menu-ink); border-radius: 16px; box-shadow: var(--shadow);
  pointer-events: none; outline: none; }
.reason-menu.pick { pointer-events: auto; }
.reason-menu.pop { animation: pop .18s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.reason-menu .head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--menu-muted); padding: 4px 12px 6px; }
.reason-menu .item { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px;
  font-weight: 600; font-size: 15px; transition: background .08s, color .08s; }
.reason-menu.pick .item { cursor: pointer; }
.reason-menu .item.neutral { color: var(--menu-muted); font-weight: 500; }
.reason-menu .item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--menu-muted); opacity: .4; flex: none; }
.reason-menu .item.sel { background: var(--menu-sel); color: var(--menu-sel-ink); }
.reason-menu .item.sel .dot { opacity: 1; }
.reason-menu.skip .item.sel .dot { background: var(--pass); }
.reason-menu.keep .item.sel .dot { background: var(--save); }
.reason-menu .item.sel::after { content: "\2195" / ""; margin-left: auto; font-size: 16px; opacity: .8; }
.reason-menu:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.reason-nudge { position: fixed; z-index: 11; pointer-events: none; display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.reason-nudge .arrows { display: inline-flex; flex-direction: column; line-height: .8; font-size: 10px; }
.reason-nudge .arrows span:first-child { animation: nudge-up 1.1s ease-in-out infinite; }
.reason-nudge .arrows span:last-child { animation: nudge-down 1.1s ease-in-out infinite; }
@keyframes nudge-up { 50% { transform: translateY(-3px); } }
@keyframes nudge-down { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  .reason-menu.pop, .reason-mask, .reason-nudge .arrows span { animation: none; }
  .reason-menu .item { transition: none; }
}
/* The reader's own reason on the saved page: a save reads in river, a pass
   in plain muted text beside the name. */
.chip.mark-why { background: var(--save-soft); color: var(--save-text); }
.marks-row .mark-why { font-size: 13px; }

/* ── the plan: the free-plan notice and the account block ── */
/* The notice is a .wall so it reads as the same object. Outside .walled it
   has no blurred pile to sit on, so it takes its place in the page flow. */
.wall.plan-notice { position: static; margin: 20px auto; }
.walled > .wall.plan-notice { position: absolute; margin: 0 auto; }
a.button { display: inline-block; font-weight: 700; text-decoration: none; border-radius: 999px;
  padding: 12px 18px; background: var(--accent); color: var(--accent-ink); }
.plan-notice p:last-child { margin: 0; }

/* The country pages, and the country links on the home page. The count is
   the one fact of the page, so it has the weight of a heading. The links
   are a compact grid: two columns on a phone, more on a wide screen. */
.country-count { font-weight: 700; margin: 0 0 8px; }
.country-cta { margin: 24px 0 0; padding: 20px 18px; background: var(--bg-2); border-radius: var(--radius); }
.country-again { margin: 24px 0 0; }
.country-cta > h2 { font-size: 18px; margin: 0 0 6px; }
.country-cta p.price { margin-bottom: 0; }
.country-links { margin: 36px 0 0; }
.country-links > h2 { font-size: 18px; margin: 0 0 10px; }
.country-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 16px;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); font-size: 14px; }
.country-links a { display: inline-block; padding: 3px 0; }

/* The saved page: each saved job is the card of the search page. One line
   below the chips has the reader's reason and the date of the save. */
.saved-cards { margin-bottom: 18px; }
.card .saved-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.card .actions .mark-link { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line); color: var(--accent-text); }
.card .actions .mark-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* "Bad match" on a card: a button that looks like a button. It opens the
   report form and writes nothing. */
.card .actions .report-form { margin: 0; }
.card .actions button.report { margin: 0; padding: 7px 14px; font-size: 13px; font-weight: 600;
  background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.card .actions button.report:hover { color: var(--ink); border-color: var(--muted); }
.card .actions button.report:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* The report form: one reason for each line, with a large target. */
.feedback .reasons-pick { border: 0; margin: 0 0 16px; padding: 0; }
.feedback .reasons-pick legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.feedback label.pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 6px;
  border: 1px solid var(--line); border-radius: 12px; font-weight: 400; cursor: pointer;
  /* A choice is a sentence, not a field label: no capitals, no wide spacing. */
  text-transform: none; letter-spacing: normal; font-size: 15px; color: var(--ink); }
.feedback label.pick:has(input:checked) { border-color: var(--accent); }
.feedback label.pick input { margin: 0; width: 18px; height: 18px; flex: 0 0 auto; }
.feedback label.hide-pick { margin-top: 14px; }
.sent button.quiet { background: none; color: var(--accent-text); border: 1px solid var(--line); }

/* The search sentence on the sign-in page, so the visitor sees that capy kept it. */
.auth .quoted-search { margin: 0 0 14px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text, inherit); font-style: italic; }

/* ── the kit ──────────────────────────────────────────────────────────
   The design rules of capy, as classes. /admin/kit shows each one live.
   A new page takes these parts and adds no distance of its own.

   SPACE. A distance says how much two things belong together. There are
   five distances, and each has one use:
     4px   --space-1   a line and the hint that explains it
     8px   --space-2   a control and its hint; two controls of one set
     16px  --space-4   two parts of one group: text, then its control
     24px  --space-5   two groups in one section; the padding of a card
     32px  --space-6   two sections: 32px above the rule and 32px below
   12px (--space-3) is for a heading and the text below it, and no more.

   `.stack` applies the rules. Its children carry no margin of their own;
   the class of a child says what it is, and the stack gives the distance. */
.stack { display: flex; flex-direction: column; }
.stack > * { margin: 0; }
:where(.stack) button, :where(.stack) .button { margin: 0; }
.stack > * + * { margin-top: var(--space-4); }
.stack > * + .hint { margin-top: var(--space-2); }
.stack > .lead + .hint { margin-top: var(--space-1); }
.stack > * + .apart, .stack > * + .caption { margin-top: var(--space-5); }
.stack > .caption + * { margin-top: var(--space-2); }
.stack > .wide + .wide, .stack > .rowlink + .rowlink, .stack > .wide + .rowlink, .stack > form + form, .stack > form + .rowlink { margin-top: var(--space-2); }
.stack > h1 + *, .stack > h2 + * { margin-top: var(--space-3); }

/* TEXT. A lead states a fact in ink. A hint explains, smaller and muted.
   A caption is a hint that names the thing below it. */
.lead { font-size: var(--text-m); font-weight: 600; color: var(--ink); }
.hint, .caption { font-size: var(--text-s); line-height: 1.45; color: var(--muted); }

/* CONTROLS. An action is a pill. `wide` gives it the control height and
   the full width of its column, to a limit. The filled pill is the one
   main action of a section; `quiet` is an outline, for each other action;
   `danger` is for an action that removes something. */
.wide { display: flex; align-items: center; justify-content: center; width: 100%; max-width: var(--control-width);
  min-height: var(--control); padding: 0 20px; font-size: var(--text-m); text-align: center; }
button.quiet, a.button.quiet { background: none; border: 1px solid var(--line); color: var(--ink); }
button.danger, a.button.danger { background: var(--danger); color: var(--danger-ink); }
button.quiet.danger, a.button.quiet.danger { background: none; border: 1px solid var(--danger); color: var(--danger); }
/* A way to another page is a row, not a pill: the name at the left and an
   arrow at the right. It has the size of a wide control. */
.rowlink { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  width: 100%; max-width: var(--control-width); min-height: var(--control); padding: 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font-size: var(--text-m); font-weight: 600; text-decoration: none; }
.rowlink::after { content: "\2192"; color: var(--accent-text); font-weight: 700; flex: 0 0 auto; }
/* A list of choices is a field: the look of a text field, the height of a
   control. Its name is a lead, 8px above it; its button is 8px below it. */
select { width: 100%; max-width: var(--control-width); min-height: var(--control); padding: 0 var(--space-4); font: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stack > .lead + select, .stack > select + .wide { margin-top: var(--space-2); }
/* A tick box with its sentence, in a frame as high as a control. */
label.check { display: flex; gap: var(--space-3); align-items: flex-start; margin: 0; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--text-m); font-weight: 600;
  line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--danger); }
/* The state of a switch, after its name. */
.state { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; vertical-align: 1px; }
.state.on { background: var(--chip-bg); color: var(--chip-ink); }
.state.off { background: var(--bg-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
/* A message in a band: `good` for a result, `warn` for a fault. */
.band { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-weight: 600; }
.band.good { background: var(--save-soft); color: var(--save-text); }
.band.warn { background: var(--accent-soft); color: var(--accent-text); }
/* The band about the saved search: one line and one action. The action goes
   under the line on a narrow screen. */
.save-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
             gap: var(--space-3); margin: var(--space-4) 0; }
.save-band p { margin: 0; flex: 1 1 16rem; }
.save-band form { margin: 0; }
.save-band button { margin: 0; }
/* The way back, above the heading of a page that is below another page. */
.crumb { margin: 0 0 var(--space-1); font-size: var(--text-s); }
.crumb a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumb a::before { content: "\2190\a0"; }
.crumb + h1 { margin-top: 0; }

/* SECTIONS. A page of settings has one section for each subject, with a
   rule between two sections. On a wide screen the heading sits in a left
   column, so the reader scans the subjects down one edge. */
.account-who { color: var(--muted); margin: calc(-1 * var(--space-2)) 0 0; overflow-wrap: anywhere; }
.account-who strong { color: var(--ink); font-weight: 600; }
.acct { margin: var(--space-6) 0 0; padding: var(--space-6) 0 0; border-top: 1px solid var(--line); }
.acct > h2 { font-size: var(--text-l); margin: 0 0 var(--space-3); }
.acct form { margin-bottom: 0; }
@media (min-width: 720px) {
  .acct { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: var(--space-5); }
  .acct > h2 { margin: 1px 0 0; }
  .acct > .acct-body { max-width: var(--control-width); }
  .acct-leave > .acct-body { grid-column: 2; }
}


/* CARDS. One object that stands alone on its page: the plan, a question
   before a delete. 24px of padding, and a stack inside. */
.plan-card, .data-confirm { max-width: 26rem; margin: var(--space-6) auto 0; padding: var(--space-5); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.plan-card h1, .data-confirm h1 { font-size: var(--text-xl); line-height: 1.2; }
.plan-card .wide, .data-confirm .wide { max-width: none; }
.plan-card > h1 + .plan-price { margin-top: var(--space-2); }
.plan-price { color: var(--muted); }
.plan-price strong { font-size: 2.6rem; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.plan-list { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.plan-list li { position: relative; padding-left: 30px; }
.plan-list li::before { content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%; background: var(--save-soft); }
.plan-list li::after { content: ""; position: absolute; left: 7px; top: calc(.15em + 4px); width: 5px; height: 9px; border: solid var(--save-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan-badge { align-self: flex-start; padding: var(--space-1) var(--space-3); border-radius: 999px; background: var(--save-soft); color: var(--save-text); font-size: 14px; font-weight: 700; }
.plan-badge + h1 { margin-top: var(--space-3); }
.plan-below { max-width: 26rem; margin: var(--space-4) auto 0; padding: 0 var(--space-1); }
.chip.employment { background: var(--save-soft); color: var(--save-text); }

/* The kit page itself. These classes show the rules; no other page uses them. */
.kit h2 { font-size: var(--text-l); }
.kit-space { display: grid; grid-template-columns: auto auto 1fr; gap: var(--space-2) var(--space-4); align-items: center; font-size: var(--text-s); }
.kit-space i { display: block; height: 16px; background: var(--accent); border-radius: 3px; }
.kit-space code, .kit code { font-size: 13px; }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: var(--space-2); font-size: 13px; }
.kit-swatches span { display: flex; align-items: flex-end; min-height: 56px; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.kit-demo { padding: var(--space-4); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.kit-demo + .hint { margin-top: var(--space-2); }
.kit .gap { display: block; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; line-height: 1; text-align: center; margin: 0 !important; overflow: hidden; }
