/* Job Portal — styles. Order: tokens.css (colours, type, spacing; light/dark/system), then
   1. components from the redesign (design/components.css), 2. older rules still used by pages not yet redesigned,
   3. area styles (jobs, applications, documents, settings) at the end of this file. */

/* Old token names used by older rules and inline styles. */
:root {
  --radius: var(--radius-lg);
  --muted-soft: var(--surface-2);
  --shadow: var(--shadow-1);
  --font: var(--font-sans);
  --mono: var(--font-mono);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23858b93' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ═══ 1. Components (redesign) ═══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--text-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1 { font: var(--text-h1); letter-spacing: -.01em; }
h2 { font: var(--text-h2); letter-spacing: -.005em; }
h3 { font: var(--text-h3); }
.display { font: var(--text-display); letter-spacing: -.015em; }
.small { font: var(--text-small); }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.caps { font: var(--text-caps); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── App shell ───────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { max-width: var(--content-max); height: 100%; margin: 0 auto; padding: 0 var(--space-4); display: flex; align-items: center; gap: var(--space-5); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.125rem/1 var(--font-serif); }
.brand__mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand__mark .icon { width: 18px; height: 18px; }
.nav { display: none; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-pill); color: var(--ink-2);
  text-decoration: none; font-weight: 600; transition: background var(--dur-fast); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
  display: grid; place-items: center; font: var(--text-label); cursor: pointer; }
@media (min-width: 900px) { .nav { display: flex; } }

.tabbar { position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3);
  text-decoration: none; font: 600 .75rem/1 var(--font-sans); }
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--accent-text); }
.tabbar a[aria-current="page"] .tabbar__pill { background: var(--accent-soft); }
.tabbar__pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: var(--radius-pill); transition: background var(--dur); }
.tabbar .count { position: absolute; top: 6px; left: calc(50% + 8px); }
@media (min-width: 900px) { .tabbar { display: none; } }

.main { max-width: var(--content-max); margin: 0 auto; padding: var(--space-6) var(--space-4) calc(var(--tabbar-h) + var(--space-7)); }
.main--reading { max-width: var(--reading-max); }
@media (min-width: 900px) { .main { padding-bottom: var(--space-8); } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-5); }
.page-head__text { display: grid; gap: 6px; }
.page-head__actions { margin-left: auto; display: flex; gap: var(--space-2); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-4); color: var(--ink-2); text-decoration: none; font: var(--text-label); }
.back:hover { color: var(--ink); }
.split { display: grid; gap: var(--space-5); }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.stack { display: grid; gap: var(--space-4); }
.stack--lg { gap: var(--space-5); }
.row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.spacer { flex: 1; }

/* ── Surfaces ────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-1); }
.card--quiet { background: transparent; box-shadow: none; }
.card--pad-sm { padding: var(--space-4); }
.card__head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: var(--space-6) 0 var(--space-3); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--space-4) 0; }
.callout { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink-2); }
.callout--ai { background: var(--info-soft); color: var(--ink); }
.callout--ai > .icon { color: var(--info); }
.callout--warn { background: var(--warn-soft); color: var(--ink); }
.callout--warn > .icon { color: var(--warn); }
.empty { text-align: center; padding: var(--space-7) var(--space-4); color: var(--ink-2); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 1rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--danger { color: var(--bad); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: .875rem; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border-radius: var(--radius-pill); border: 1px solid transparent;
  background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: var(--accent-text); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }

/* ── Chips, pills, counts ────────────────────────────────── */
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); font: 700 .75rem/1 var(--font-sans); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font: 600 .8125rem/1 var(--font-sans);
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--file::before { display: none; }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--info { background: var(--info-soft); color: var(--info); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--accent { background: var(--accent-soft); color: var(--accent-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 600 .875rem/1 var(--font-sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip--add { border-style: dashed; color: var(--ink-2); }

.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: var(--radius-pill); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--ink-2); font: 600 .9375rem/1 var(--font-sans); cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.segmented .n { color: var(--ink-3); font-weight: 600; }

/* ── Swatches (accent colour pickers) ───────────────────── */
.swatches { display: flex; gap: 10px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch:disabled { opacity: .3; cursor: not-allowed; }

/* ── Score ───────────────────────────────────────────────── */
.score { --c: var(--ok); --s: var(--ok-soft); width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--s); color: var(--c);
  font: 600 1.375rem/1 var(--font-serif); }
.score small { display: none; }
.score--mid { --c: var(--warn); --s: var(--warn-soft); }
.score--low { --c: var(--ink-3); --s: var(--surface-2); }
.score--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.75rem; }

/* ── Job card ────────────────────────────────────────────── */
.job { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); padding: var(--space-5); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); transition: border-color var(--dur), box-shadow var(--dur); }
.job:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.job__head { display: contents; }
.job__title a { color: var(--ink); text-decoration: none; }
.job__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card opens the job */
.job__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-3); font: var(--text-small); }
.job__meta span { display: inline-flex; align-items: center; gap: 5px; }
.job__why { grid-column: 2; color: var(--ink-2); }
.job__fit { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 16px; font: var(--text-small); }
.job__fit .pro { color: var(--ok); display: inline-flex; gap: 6px; align-items: center; }
.job__fit .con { color: var(--warn); display: inline-flex; gap: 6px; align-items: center; }
.job__fit .pro span, .job__fit .con span { color: var(--ink-2); }
.job__actions { grid-column: 2; display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); position: relative; z-index: 1; }
@media (max-width: 560px) {
  .job { grid-template-columns: 1fr; padding: var(--space-4); }
  .job__head { display: flex; gap: var(--space-3); }
  .job__why, .job__fit, .job__actions { grid-column: 1; }
}

/* ── Lists (applications, inbox, settings) ───────────────── */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.list__item { position: relative; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); color: inherit; text-decoration: none; }
.list__item + .list__item { border-top: 1px solid var(--line); }
a.list__item:hover { background: var(--surface-2); }
.list__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__sub { color: var(--ink-3); font: var(--text-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__end { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-3); font: var(--text-small); }
.logo { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font: 600 .9375rem/1 var(--font-serif); }

/* ── Forms ───────────────────────────────────────────────── */
.label { font: var(--text-label); }
.hint { font: var(--text-small); color: var(--ink-3); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink); font: var(--text-body); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.textarea { padding: 12px 14px; min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.choice-grid { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; font-weight: 600; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }

/* Option cards — "pick one way" (send methods, templates) */
.option { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 4px var(--space-3); padding: var(--space-4); border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); background: var(--surface); cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.option:hover { border-color: var(--ink-3); }
.option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option input { margin: 3px 0 0; accent-color: var(--accent); width: 18px; height: 18px; }
.option__title { font-weight: 600; }
.option__desc { grid-column: 2 / -1; color: var(--ink-3); font: var(--text-small); }

/* ── Stepper ─────────────────────────────────────────────── */
.steps { display: flex; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-5); padding: 0; counter-reset: s; }
.steps li { flex: 1; display: grid; gap: 8px; color: var(--ink-3); font: var(--text-label); counter-increment: s; }
.steps li::before { content: ""; height: 4px; border-radius: 4px; background: var(--surface-3); }
.steps li[aria-current="step"] { color: var(--ink); }
.steps li[aria-current="step"]::before, .steps li.done::before { background: var(--accent); }
.steps li.done { color: var(--ink-2); }

/* ── Sheet / dialog ──────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: grid; align-items: end; justify-items: center; }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-5);
  box-shadow: var(--shadow-2); }
.sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: var(--surface-3); margin: -8px auto var(--space-4); }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: var(--radius-lg); } .sheet__grip { display: none; } }

/* ── Toast ───────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: var(--space-3);
  padding: 12px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); font-weight: 600; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ═══ 2. Older rules (pages not yet redesigned) ═══════════════ */
h1, h2, h3 { margin: 0 0 .5em; }
p { margin: 0 0 .8em; }


.main--narrow { max-width: var(--reading-max); }
.page-head h1 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .split--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.row--between { justify-content: space-between; }

/* ── Surfaces ───────────────────────────────────────────── */
/* Cards that follow each other always keep a gap (grids and split layouts use their own gap). */
.card + .card, .card + form, form + .card { margin-top: 16px; }
.grid > .card + .card, .split > .card + .card, .grid > .card + form, .grid > form + .card { margin-top: 0; }
fieldset.card { margin-left: 0; margin-right: 0; min-width: 0; }
.card--link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.card--link:hover { border-color: var(--accent); }
.card h2, .card h3 { margin-top: 0; }
.card__head h2, .card__head h3 { margin: 0; }
.empty .icon { width: 44px; height: 44px; color: var(--ink-3); margin-bottom: 8px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline; }

/* ── Forms ──────────────────────────────────────────────── */
label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .help, .form-help { color: var(--ink-3); font-size: .875rem; margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=password], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; min-height: 48px; padding: 10px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea[rows="2"] { min-height: 0; }
/* Own arrow with room on the right (the browser's arrow sits against the border). */
/* Text fields with suggestions (datalist): hide Chrome's hover-only triangle, show the same arrow as selects. */
input[list]::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }
input[list] { padding-right: 40px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); vertical-align: -4px; margin-right: 6px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin-bottom: 8px; }
.form-error, .form-errors li { color: var(--bad); font-size: .9rem; }
.form-errors { list-style: none; padding: 0; margin: 4px 0; }
.form-row { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row--3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Tag input (keywords) */
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-height: 44px; }
.tags input { border: 0; flex: 1; min-width: 140px; min-height: 32px; padding: 4px; background: transparent; }
.tags input:focus-visible { outline: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .9rem; }
.tag button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.suggestion { border: 1px dashed var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: .9rem; }
.suggestion:hover { border-color: var(--accent); color: var(--accent); }

/* ── Badges, chips, score ───────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Filters / pill nav (applications, admin) ───────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters select, .filters input { width: auto; min-height: 40px; }

/* ── Flash ──────────────────────────────────────────────── */
.flash { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.flash--success { background: var(--ok-soft); color: var(--ok); }
.flash--error { background: var(--bad-soft); color: var(--bad); }
.flash--info { background: var(--info-soft); color: var(--info); }
.flash--warning { background: var(--warn-soft); color: var(--warn); }


@media (max-width: 759px) { .btn { white-space: normal; text-align: center; } }
pre.kbd { overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat__value { font-size: 1.6rem; font-weight: 800; }
.stat__label { color: var(--ink-3); font-size: .85rem; }

/* ── Job ad text ────────────────────────────────────────── */
.jobtext { white-space: pre-line; color: var(--ink-2); max-height: 70vh; overflow: auto; font-size: .95rem; }
.attribution { font-size: .8rem; color: var(--ink-3); }

.copyfield { display: flex; gap: 6px; align-items: flex-start; }
.copyfield textarea, .copyfield input { flex: 1; }

/* ── Misc ───────────────────────────────────────────────── */
.card h3:not(:first-child) { margin-top: 18px; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: flex; gap: 10px; align-items: center; color: var(--ink-2); padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.kbd { font-family: var(--mono); font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.footer { max-width: var(--content-max); margin: 0 auto; padding: 0 16px calc(var(--tabbar-h) + 24px); color: var(--ink-3); font-size: .85rem; display: flex; gap: 14px; flex-wrap: wrap; }
.footer a { color: var(--ink-3); }
/* account menu under the profile icon */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.menu__panel a, .menu__panel button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu__panel a:hover, .menu__panel button:hover { background: var(--surface-2); }
.menu__panel form { margin: 0; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 4px; }
.menu__who { margin: 4px 12px 8px; line-height: 1.3; }
@media print { .topbar, .tabbar, .footer, .no-print { display: none !important; } body { background: #fff; padding: 0; } }

/* ═══ 3. Areas ════════════════════════════════════════════════ */
/* Brand */
/* The tile is the brand colour in both themes (design/brand/README.md). */
.brand__mark { background: #b4441f; color: #fff; }
.brand__mark .logo-glyph { width: 26px; height: 26px; }
.logo-glyph { flex: none; }
.footer { padding-bottom: 24px; }
@media (max-width: 899px) { .footer { padding-bottom: calc(var(--tabbar-h) + 24px); } }
@media (max-width: 899px) { .main { padding-bottom: var(--space-6); } }

/* Account menu (desktop) and "Me" page (phones): same links, see _account_links.html.twig */
.menu__panel { width: 280px; padding: var(--space-2); border-radius: var(--radius-md); box-shadow: var(--shadow-2); }
.menu__panel a, .menu__panel button:not(.segmented button) { min-height: var(--tap); }
.menu__panel form { border-top: 0; padding-top: 0; margin-top: 0; }
.menu__theme { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) 12px; margin: 6px 0 !important;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.menu__theme .segmented { padding: 3px; }
.menu__theme .segmented button { min-height: 30px; padding: 0 10px; width: auto; }
.menu__logout { border-top: 1px solid var(--line) !important; margin-top: 6px !important; padding-top: 6px !important; }
.menu__panel .segmented button:hover { background: transparent; }
.me-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); }
.me-head h1 { margin: 0; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.me-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.me-list > a, .me-list > form > button { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 56px; padding: 0 var(--space-5);
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.me-list > * + * { border-top: 1px solid var(--line); }
.me-list > a:hover, .me-list > form > button:hover { background: var(--surface-2); }
.me-list .menu__theme { margin: 0 !important; border-bottom: 0; padding: var(--space-3) var(--space-5); }
.me-list .menu__logout { margin: 0 !important; padding: 0 !important; }
