/* Hermes Career Platform — Design System
 * Hallmark stamp: theme "Die Strecke / The Route" — the journey from application to arrival,
 * drawn from German railways and the administrative dossier: paper, ink, one deep green,
 * one amber signal figure. Critique: centred navy SaaS hero replaced by a start-aligned
 * hero + dark proof band + station-route steps; no gradients, no eyebrow labels, no invented metrics.
 * Waivers: .nav-section/.tbl th keep app-owned casing rules simplified here (sentence case);
 * .skel shimmer is a neutral white-opacity sweep, not a colour gradient.
 * Tokens only past this block: no literal colours or font-families below the :root blocks.
 * Vazirmatn is local (../assets/). No CDN, no external images. Latin is a refined system stack.
 */
@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  /* ——— Route palette (light): sage paper, green-black ink, deep Amtsgrün ——— */
  --bg: #f4f5f1;
  --bg-subtle: #eceee7;
  --surface: #ffffff;
  --surface-2: #e9ede6;
  --surface-hover: #dfe5db;
  --text: #1c231e;
  --text-2: #39443b;
  --muted: #5b685e;
  --muted-2: #5f6d61;
  --line: #dce2d9;
  --line-strong: #b7c2b3;
  --accent: #0f5132;
  --accent-hover: #0b3d27;
  --accent-active: #082e1d;
  --accent-soft: #dcefe2;
  --accent-ink: #0b3d27;
  --on-accent: #ffffff;
  --signal: #8a5200;
  --signal-soft: #fbf0da;
  --success: #177245;
  --success-soft: #e3f3e9;
  --warning: #96690a;
  --warning-soft: #fdf3dd;
  --danger: #b3261e;
  --danger-soft: #fbeae8;
  --info: #175cd3;
  --info-soft: #e7effd;
  --violet: #5b4bc4;
  --violet-soft: #efecfd;
  --overlay: rgba(16, 28, 20, .45);
  --scrim: rgba(0, 0, 0, .45);
  --on-danger: #ffffff;
  --shimmer: rgba(255, 255, 255, .45);
  --band-bg: #1b2a20;
  --band-text: #f2f4ef;
  --band-muted: #a9b8ac;
  --band-accent: #7ed7a2;
  --shadow-sm: 0 1px 2px rgba(28, 35, 30, .06);
  --shadow-md: 0 4px 16px rgba(28, 35, 30, .08);
  --shadow-lg: 0 12px 32px rgba(28, 35, 30, .14);
  /* ——— Spacing scale (4px grid) ——— */
  --space-xs: 4px; --space-sm: 8px; --space-md: 12px; --space-lg: 16px;
  --space-xl: 24px; --space-2xl: 32px; --space-3xl: 48px;
  /* ——— Radius: pills for actions, 16px cards ——— */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  /* ——— Button / input heights ——— */
  --h-xs: 32px; --h-sm: 36px; --h-md: 40px; --h-lg: 48px;
  --sidebar-w: 248px; --sidebar-w-collapsed: 64px; --topbar-h: 56px;
  /* ——— Type: one system stack for Latin, Vazirmatn for Persian ——— */
  --font-latin: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-fa: "Vazirmatn", -apple-system, "Segoe UI", Tahoma, sans-serif;
  /* ——— Motion: transform/opacity only, 60fps ——— */
  --dur-micro: 150ms; --dur-panel: 250ms;
  --dur-stagger: 40ms; /* per-item stagger offset; scale per transitions.dev motion tokens (inspiration only) */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #121714;
  --bg-subtle: #171e19;
  --surface: #1a211c;
  --surface-2: #232d26;
  --surface-hover: #2c382f;
  --text: #e9ede9;
  --text-2: #c6cfc6;
  --muted: #9aa79d;
  --muted-2: #8a978d;
  --line: #2a352d;
  --line-strong: #3d4c41;
  --accent: #5ec98a;
  --accent-hover: #7ed7a2;
  --accent-active: #9be3b6;
  --accent-soft: #1d3325;
  --accent-ink: #a9e5c0;
  --on-accent: #0b1f13;
  --signal: #e8a33d;
  --signal-soft: #33270d;
  --success: #4cc38a; --success-soft: #122e21;
  --warning: #f0b429; --warning-soft: #33270d;
  --danger: #f28b82; --danger-soft: #3a1b18;
  --info: #7aa7f8; --info-soft: #16294d;
  --violet: #a99df0; --violet-soft: #241f4d;
  --overlay: rgba(0, 0, 0, .55);
  --scrim: rgba(0, 0, 0, .45);
  --on-danger: #ffffff;
  --shimmer: rgba(255, 255, 255, .08);
  --band-bg: #e9ede9;
  --band-text: #16211a;
  --band-muted: #4a564e;
  --band-accent: #0f5132;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  font-family: var(--font-latin);
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body, [lang="fa"] body { font-family: var(--font-fa); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ——— App shell ——— */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 auto; position: sticky; top: 0; height: 100vh;
  background: var(--bg-subtle); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 40;
  transition: width var(--dur-panel) var(--ease-out);
}
.sidebar .brand { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-lg); height: var(--topbar-h); border-bottom: 1px solid var(--line); }
.brand-link { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; color: inherit; min-width: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-name { font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.nav { flex: 1; overflow-y: auto; padding: var(--space-sm); }
.nav-section { font-size: 11px; font-weight: 650; color: var(--muted-2); padding: var(--space-md) var(--space-sm) var(--space-xs); white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: var(--space-md); width: 100%;
  padding: 9px var(--space-md); border-radius: var(--r-md); color: var(--text-2);
  font-weight: 500; text-align: start; white-space: nowrap; margin-bottom: 2px;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.nav-item:hover { background: var(--surface-hover); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .nav-item.active { box-shadow: inset -3px 0 0 var(--accent); }
.nav-item .ico { font-size: 17px; width: 22px; text-align: center; flex: 0 0 auto; }
.nav-item .lbl { overflow: hidden; text-overflow: ellipsis; }
.nav-item .count { margin-inline-start: auto; background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-pill); padding: 1px 7px; font-size: 11.5px; font-weight: 650; }
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.collapsed .brand-name, .sidebar.collapsed .brand-sub, .sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-item .lbl, .sidebar.collapsed .nav-item .count { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 9px 0; }
.sidebar-foot { border-top: 1px solid var(--line); padding: var(--space-sm); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: var(--space-sm); padding: 0 var(--space-lg);
}
.topbar .crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; white-space: nowrap; }
.topbar .crumbs b { color: var(--text); font-weight: 650; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-md); display: inline-grid; place-items: center;
  color: var(--text-2); border: 1px solid transparent; position: relative; font-size: 17px;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.icon-btn:hover { background: var(--surface-hover); }
.icon-btn .dot { position: absolute; top: 7px; inset-inline-end: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.chip-select, .select {
  height: var(--h-sm); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); padding: 0 var(--space-sm); font-size: 13px; font-weight: 550;
}
.user-chip { display: flex; align-items: center; gap: var(--space-sm); padding: 4px 6px; border-radius: var(--r-md); }
.user-chip:hover { background: var(--surface-hover); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
/* ——— User menu (topbar avatar chip dropdown) ——— */
.user-menu-wrap { position: relative; }
.user-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 264px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.user-menu[hidden] { display: none; }
.user-menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu-head b { display: block; font-size: 13.5px; overflow-wrap: anywhere; }
.user-menu-head .muted { display: block; overflow-wrap: anywhere; }
.user-menu-item { display: flex; width: 100%; text-align: start; padding: 9px 10px; border-radius: var(--r-md); font-size: 13.5px; color: var(--text); }
.user-menu-item:hover { background: var(--surface-hover); text-decoration: none; }
.content { padding: var(--space-xl); max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: var(--space-md); margin-bottom: var(--space-lg); flex-wrap: wrap; padding-bottom: var(--space-md); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 2px; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: var(--space-sm); flex-wrap: wrap; }

/* ——— Buttons: pill actions, one accent ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h-md); padding: 0 18px; border-radius: var(--r-pill); font-weight: 650; font-size: 13.5px;
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-xs { height: var(--h-xs); padding: 0 12px; font-size: 12.5px; }
.btn-sm { height: var(--h-sm); padding: 0 14px; }
.btn-lg { height: var(--h-lg); padding: 0 24px; font-size: 14.5px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ——— Cards, grids ——— */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: var(--space-lg); }
.card-head { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-lg); border-bottom: 1px solid var(--line); }
.card-head h3 { flex: 1; }
.card-body { padding: var(--space-lg); }
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat .delta { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.delta.up { color: var(--success); } .delta.down { color: var(--danger); }

/* ——— Badges / pills / chips ——— */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill);
  padding: 2px 9px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); }
.badge.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.badge.clickable { cursor: pointer; }
.badge.clickable:hover { border-color: var(--accent); color: var(--accent-ink); }
.pill-green { background: var(--success-soft); color: var(--success); }
.pill-amber { background: var(--warning-soft); color: var(--warning); }
.pill-red { background: var(--danger-soft); color: var(--danger); }
.pill-blue { background: var(--info-soft); color: var(--info); }
.pill-violet { background: var(--violet-soft); color: var(--violet); }
.pill-grey { background: var(--surface-2); color: var(--muted); }
.tag { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; font-size: 12px; font-weight: 550; margin: 2px 4px 2px 0; }
.score { font-size: 20px; font-weight: 700; }
.score-bar { height: 6px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; margin-top: 6px; }
.score-bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }

/* ——— Tables ——— */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; color: var(--muted); font-weight: 650; font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .row-title { font-weight: 600; }
.pager { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .spacer { flex: 1; }
.toolbar { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-lg); }
.search { height: var(--h-md); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); padding: 0 12px; min-width: 220px; }

/* ——— Tabs ——— */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--space-lg); overflow-x: auto; }
.tab { padding: 9px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* ——— Kanban ——— */
.board { display: flex; gap: var(--space-md); overflow-x: auto; padding-bottom: var(--space-sm); align-items: flex-start; }
.lane { flex: 0 0 264px; background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--space-sm); min-height: 120px; }
.lane.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.lane-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 10px; font-weight: 650; font-size: 13px; }
.lane-head .n { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 7px; font-size: 11.5px; color: var(--muted); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: var(--space-sm); box-shadow: var(--shadow-sm); cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; }
.kcard .k-title { font-weight: 650; font-size: 13.5px; }
.kcard .k-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kcard .k-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.kcard .k-foot .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button { padding: 5px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ——— Dialog / sheet ——— */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column; border: 1px solid var(--line); }
.dialog.wide { width: min(760px, 100%); }
.dialog-head { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-lg); border-bottom: 1px solid var(--line); }
.dialog-head h3 { flex: 1; }
.dialog-body { padding: var(--space-lg); overflow-y: auto; }
.dialog-foot { padding: var(--space-lg); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--space-sm); }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .dialog { width: 100%; max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
}

/* ——— Forms ——— */
.field { margin-bottom: var(--space-md); }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.input, textarea.input { width: 100%; height: var(--h-md); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); padding: 0 12px; }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; font-size: 13.5px; }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 8px; }
.form-ok { color: var(--success); font-size: 13px; font-weight: 600; margin-top: 8px; }
.progress { height: 8px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width .3s ease; }
.wizard-steps { display: flex; gap: 6px; margin: 12px 0 4px; }
.wizard-steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--line-strong); }
.wizard-steps i.done, .wizard-steps i.now { background: var(--accent); }

/* ——— Timeline / remarks / AI panel ——— */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-inline-start: 2px solid var(--line); margin-inline-start: 6px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
[dir="rtl"] .timeline li { padding: 0 22px 16px 0; }
.remark { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; }
.stars { color: var(--warning); letter-spacing: 1px; }
.evidence { font-size: 12.5px; color: var(--muted); }
.evidence a { font-weight: 600; }
.callout { border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; }
.callout.warn { border-inline-start-color: var(--warning); background: var(--warning-soft); }
.callout.danger { border-inline-start-color: var(--danger); background: var(--danger-soft); }
.demo-note { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .big { font-size: 30px; margin-bottom: 8px; }

/* ——— Skeletons ——— */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); color: transparent !important; }
.skel * { visibility: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--shimmer), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
[dir="rtl"] .skel::after { animation-name: shimmer-rtl; }
@keyframes shimmer-rtl { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ——— Toasts ——— */
.toasts { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 11px 14px; font-size: 13.5px; max-width: 340px; }

/* ——— Reduced motion: one rule for everything ——— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ——— Responsive shell ——— */
.menu-btn { display: none; }
.sidebar-scrim { display: none; }
.sidebar-close { display: none; }
@media (max-width: 860px) {
  .sidebar { position: fixed; inset-inline-start: 0; transform: translateX(0); box-shadow: var(--shadow-lg); }
  [dir="ltr"] .sidebar.hidden-m { transform: translateX(-105%); }
  [dir="rtl"] .sidebar.hidden-m { transform: translateX(105%); }
  .sidebar { transition: transform .2s ease; }
  .menu-btn { display: inline-grid; }
  .sidebar { z-index: 110; }
  .sidebar-scrim { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 100; }
  .sidebar:not(.hidden-m) + .sidebar-scrim { display: block; }
  .sidebar-close { display: inline-grid; margin-inline-start: auto; flex: 0 0 auto; }
  .content { padding: var(--space-lg); }
  .topbar .crumbs .crumb-mid { display: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 var(--space-sm); }
  .topbar .crumbs { display: none; }
  #roleSelect { display: none; }
  .user-chip .who { display: none; }
  .content { padding: 12px; }
}

/* ——— Part 2 (2026-11-15): app polish on "Die Strecke" ———
 * Signature: the station rail on the active nav item + the route line under
 * the login brand. Chrome stays quiet; colour lives in the accent, the
 * score bars and the station dots. All values are tokens; no literals. */
.grid > .card, .kcard { transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.grid > .card:hover, .kcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.route-line { position: relative; height: 2px; background: var(--line-strong); border-radius: 2px; margin: 16px 0; }
.route-line::after { content: ""; position: absolute; inset-inline-start: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.empty .actions { margin-top: var(--space-lg); }
.login-card { max-width: 420px; margin: 40px auto; }
@media (max-width: 560px) { .login-card { margin: 16px auto; } }

/* ——— Motion (2026-11-15): restrained in-browser motion on "Die Strecke" ———
 * Hand-built on the existing tokens; transform/opacity only, no new assets,
 * no runtime dependency. Inspiration (not copied code): transitions.dev
 * motion-token scale — 40ms per-item stagger, ~150ms quick interactions,
 * small travel distances, ease-out curve; its panel-reveal / texts-reveal
 * patterns shaped the section reveals and hero entrance. Deliberately NOT
 * used: number pop-ins / spinning counters (no animated figures — calm
 * paper), text swaps, blur, 3d tilt, modal/toast recipes.
 * Entrance hidden states exist ONLY under html[data-motion="on"], which
 * landing JS sets when motion is allowed (no prefers-reduced-motion,
 * IntersectionObserver available). With JS off or motion off, every element
 * renders in its final state — nothing waits for an animation. */
html[data-motion="on"] .landing .reveal {
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--dur-panel) var(--ease-out), transform var(--dur-panel) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
html[data-motion="on"] .landing .reveal.is-in { opacity: 1; transform: translateY(0); }
/* Landing card hover: a 2px lift on the existing 150ms micro token. */
.landing .grid > .card {
  transition: transform var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
@media (hover: hover) {
  .landing .grid > .card:hover { transform: translateY(-2px); }
}
/* ——— Hero route line: draws once from the inline-start edge, station dots
 * pop in staggered, one runner dot travels the line slowly and loops. ——— */
.hero-route { position: relative; height: 22px; margin-top: 28px; }
.hero-route::before {
  content: ""; position: absolute; inset-inline: 0; top: 10px; height: 2px;
  background: var(--line-strong); border-radius: 2px;
}
.hero-route-dots { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; }
.hero-route-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.hero-route-runner {
  display: none; position: absolute; top: 6px; inset-inline-start: 0;
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface);
}
html[data-motion="on"] .hero-route::before { transform-origin: left center; animation: route-draw 600ms var(--ease-out) 100ms both; }
[dir="rtl"] html[data-motion="on"] .hero-route::before { transform-origin: right center; }
html[data-motion="on"] .hero-route-dot {
  opacity: 0; transform: scale(.5);
  animation: station-pop var(--dur-micro) var(--ease-out) both;
  animation-delay: calc(200ms + var(--i, 0) * var(--dur-stagger) * 2);
}
html[data-motion="on"] .hero-route-runner { display: block; animation: route-run 16s linear 1.2s infinite; }
[dir="rtl"] html[data-motion="on"] .hero-route-runner { animation-name: route-run-rtl; }
@keyframes route-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes station-pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes route-run {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; } 94% { opacity: 1; }
  100% { transform: translateX(var(--route-run, 600px)); opacity: 0; }
}
@keyframes route-run-rtl {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; } 94% { opacity: 1; }
  100% { transform: translateX(calc(var(--route-run, 600px) * -1)); opacity: 0; }
}
/* ——— Steps route line: draws from the inline-start edge (top on mobile). ——— */
html[data-motion="on"] .steps::before { transform-origin: left center; animation: route-draw 600ms var(--ease-out) both; }
[dir="rtl"] html[data-motion="on"] .steps::before { transform-origin: right center; }
html[data-motion="on"] .steps .card .step-n {
  opacity: 0; transform: scale(.5);
  animation: station-pop var(--dur-micro) var(--ease-out) both;
  animation-delay: calc(150ms + var(--i, 0) * var(--dur-stagger) * 2);
}
@media (max-width: 700px) {
  html[data-motion="on"] .steps::before { transform-origin: top center; animation-name: route-draw-y; }
}
@keyframes route-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* ——— Personal Route Map (candidate dashboard): five stations on the
 * Die Strecke line. Horizontal on desktop, vertical on mobile (≤700px,
 * same breakpoint as .steps). Dots reuse station-pop + --dur-stagger;
 * the line reuses route-draw. Logical properties only, so RTL mirrors
 * automatically (flex row follows dir). Colours are existing tokens
 * only: --accent (Amtsgrün), --signal (amber), --line-strong, --muted.
 * No new hex values, no gradients, transform/opacity only. ——— */
.route-map { margin-bottom: 0; }
.route-stations { list-style: none; margin: 16px 0 0; padding: 0; display: flex; position: relative; }
.route-stations::before { content: ""; position: absolute; top: 9px; inset-inline: 18px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.route-station { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 0 6px; position: relative; min-width: 0; }
.route-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); color: var(--on-accent); display: grid; place-items: center; font-size: 11px; line-height: 1; flex: 0 0 auto; z-index: 1; }
.route-station.is-done .route-dot { background: var(--accent); border-color: var(--accent); }
.route-station.is-current .route-dot { background: var(--signal); border-color: var(--signal); width: 24px; height: 24px; margin: -2px 0; font-size: 12px; }
.route-station.is-current .route-label { font-weight: 650; color: var(--text); }
.route-station.is-todo .route-label, .route-station.is-todo .route-detail { color: var(--muted); }
.route-label { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.route-detail { line-height: 1.4; overflow-wrap: anywhere; }
.route-state { color: var(--muted); }
.route-station.is-done .route-state { color: var(--accent); }
.route-station.is-current .route-state { color: var(--signal); }
.route-next { margin: 14px 0 0; }
html[data-motion="on"] .route-stations::before { transform-origin: left center; animation: route-draw 600ms var(--ease-out) both; }
[dir="rtl"] html[data-motion="on"] .route-stations::before { transform-origin: right center; }
html[data-motion="on"] .route-station .route-dot { opacity: 0; transform: scale(.5); animation: station-pop var(--dur-micro) var(--ease-out) both; animation-delay: calc(150ms + var(--i, 0) * var(--dur-stagger) * 2); }
@media (max-width: 700px) {
  .route-stations { flex-direction: column; align-items: stretch; gap: 14px; }
  .route-stations::before { top: 12px; bottom: 12px; inset-inline-start: 9px; inset-inline-end: auto; width: 2px; height: auto; }
  .route-station { flex-direction: row; align-items: flex-start; text-align: start; gap: 10px; padding: 0; }
  .route-station .route-label, .route-station .route-detail, .route-station .route-state { text-align: start; }
  .route-station .route-detail { flex: 1; }
  html[data-motion="on"] .route-stations::before { transform-origin: top center; animation-name: route-draw-y; }
}
/* ——— Reduced motion: belt-and-braces on top of the data-motion gate. ——— */
@media (prefers-reduced-motion: reduce) {
  html[data-motion="on"] .landing .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-route::before, .hero-route-dot, .steps::before, .steps .card .step-n { animation: none !important; opacity: 1 !important; transform: none !important; }
  .route-stations::before, .route-station .route-dot { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hero-route-runner { display: none !important; }
  .landing .grid > .card:hover { transform: none !important; }
}

/* ——— Match comparison (feature 4) ——— */
.compare-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-inline-start: 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.compare-pick input[type="checkbox"] { accent-color: var(--accent); inline-size: 1.25em; block-size: 1.25em; margin: 0; cursor: pointer; }
.compare-pick input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare-pick input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .5; }
.compare-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.compare-bar > span { flex: 1; font-weight: 600; }
.compare-tbl td, .compare-tbl th { vertical-align: top; text-align: start; }
.compare-tbl .score-num { font-size: 20px; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .compare-tbl .score-bar > i { transition: width var(--dur-micro) var(--ease-out); }
}
/* ——— Compare redesign (§11.29): key facts first, differences marked ——— */
.compare-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
/* Results scroll under the sticky 56px topbar after scrollIntoView:
   keep the section heading and first card clear of it. */
#compareResults { scroll-margin-top: 72px; }
.compare-card h2 { font-size: 17px; margin: 0 0 12px; overflow-wrap: anywhere; }
.compare-facts { display: grid; gap: 10px; }
.compare-fact { display: grid; gap: 2px; padding-inline-start: 10px; border-inline-start: 3px solid transparent; }
.compare-fact-label { font-size: 12.5px; color: var(--muted); }
.compare-fact-value { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.compare-fact-value .score-num { font-size: 20px; }
.compare-fact.is-diff { border-inline-start-color: var(--signal); }
.compare-fact.is-diff .compare-fact-label { color: var(--signal); font-weight: 650; }
.compare-section-title { margin: 20px 0 8px; font-size: 17px; }
.compare-diff-badge { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--signal-soft); color: var(--signal); font-size: 11.5px; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.compare-tbl tr.is-diff th[scope="row"] { background: var(--signal-soft); box-shadow: inset 3px 0 0 var(--signal); }
[dir="rtl"] .compare-tbl tr.is-diff th[scope="row"] { box-shadow: inset -3px 0 0 var(--signal); }
.compare-tbl tr.is-same th[scope="row"] { color: var(--muted); }
.compare-tbl tr.is-same td { color: var(--muted); }
.compare-more { margin-top: 16px; }
.compare-more > summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.compare-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.compare-more .table-wrap { margin-top: 12px; }
@media (max-width: 600px) {
  .compare-hero { grid-template-columns: 1fr; }
  .compare-tbl, .compare-tbl thead, .compare-tbl tbody, .compare-tbl tr, .compare-tbl th, .compare-tbl td { display: block; }
  .compare-tbl thead { display: none; }
  .compare-tbl tr { margin-block-end: 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
  .compare-tbl th[scope="row"] { background: var(--surface-2); border-radius: var(--r-md) var(--r-md) 0 0; }
  .compare-tbl td::before { content: attr(data-col) ": "; font-weight: 650; }
}
/* Visually hidden corner-header text (no .sr-only in the live CSS yet). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ——— Document checklist & timeline (feature 6) ——— */
.dc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dc-check { display: flex; gap: 12px; align-items: flex-start; min-block-size: 44px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; }
.dc-check:hover { border-color: var(--line-strong); }
.dc-box { accent-color: var(--accent); inline-size: 1.25em; aspect-ratio: 1; margin: 2px 0 0; flex: none; cursor: pointer; }
.dc-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dc-box:disabled { cursor: not-allowed; opacity: .5; }
.dc-text { display: grid; gap: 2px; min-width: 0; }
.dc-title { font-weight: 600; }
.dc-desc, .dc-detail, .dc-source { font-size: 13.5px; color: var(--muted); }
.dc-detail { color: var(--text-2); }
.dc-item.done .dc-title { color: var(--muted); }
/* Route stations: horizontal on desktop (same line-and-dot language as
   .route-line), vertical on mobile (same geometry as .timeline). */
.dc-route { list-style: none; margin: 0; padding: 0; display: flex; }
.dc-route li { flex: 1; min-width: 0; position: relative; padding-block-start: 18px; padding-inline-end: 12px; border-top: 2px solid var(--line-strong); }
.dc-route li::before { content: ""; position: absolute; top: -7px; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.dc-route li:first-child { border-top-color: var(--accent); }
.dc-step-title { display: block; font-weight: 600; }
.dc-step-desc, .dc-timing { display: block; font-size: 13.5px; color: var(--muted); }
.dc-timing { color: var(--signal); }
@media (max-width: 860px) {
  .dc-route { display: block; }
  .dc-route li { padding-block-start: 0; padding-block-end: 16px; padding-inline-start: 22px; padding-inline-end: 0; border-top: 0; border-inline-start: 2px solid var(--line-strong); margin-inline-start: 6px; }
  .dc-route li::before { top: 4px; inset-inline-start: -7px; }
  .dc-route li:first-child { border-top-color: var(--line-strong); }
}

/* Language plan (feature 8) — Die Strecke tokens only. No motion is
   added; the global prefers-reduced-motion rule already zeroes
   transitions, and the native <progress> value changes instantly. */
.lp-progress { width: 100%; accent-color: var(--accent); }
.lp-list { list-style: none; margin: 0; padding: 0; }
.lp-milestone { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lp-milestone:last-child { border-bottom: 0; }
.lp-check { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.lp-milestone.done label > b { color: var(--muted); }

/* ——— Salary & City Explorer (shared .xpl-* block; the identical text
       is inlined in platform-site/index.html <style> for the landing.
       Tokens only; motion is the 150ms opacity micro token, instant
       under reduced motion.) ——— */
.xpl-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 16px; }
.xpl-form .field { margin-bottom: 0; }
.xpl-form .btn { height: var(--h-md); }
.xpl-results { opacity: 0; }
.xpl-results.is-in { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .xpl-results { transition: opacity var(--dur-micro) var(--ease-out); }
}
.xpl-count { padding: 4px 0 16px; }
.xpl-count .figure { font-size: clamp(26px, 3.4vw, 36px); font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--accent-ink); }
.xpl-count .cap { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.xpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.xpl-figure { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.xpl-rows { display: grid; gap: 8px; margin-top: 8px; }
.xpl-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.xpl-list { margin: 6px 0 0; padding-inline-start: 18px; }
.xpl-schools { display: grid; gap: 14px; margin-top: 12px; }
.xpl-school { padding-top: 12px; border-top: 1px solid var(--line); }
.xpl-school:first-child { padding-top: 0; border-top: 0; }
@media (max-width: 700px) {
  .xpl-form { grid-template-columns: 1fr; }
  .xpl-form .xpl-submit .btn { width: 100%; }
  .xpl-grid { grid-template-columns: 1fr; }
}

/* ——— Hero live-stats overlay (2026-11-15 follow-up) ———
   The hero clip bakes in NO counts any more, so the three live figures
   ride here as HTML on top of the video (and of the static poster for
   reduced-motion users). Values come from GET /api/platform/stats via
   the landing's [data-badge] pattern (apply()/fetchStats in index.html);
   labels reuse the existing i18n keys admin.totalJobs / landing.jobs /
   landing.ausbildung — no new keys. Cut-paper strip: solid surface,
   top rule, no gradient, no shadow. position:absolute inside the fixed
   16:9 .hero-media box, so it cannot shift layout; pointer-events:none
   so the video's click-to-toggle still works through the strip. The
   strip is ~52px tall (~19% of the box) and the clip's schools beat was
   moved up (tag 70%, dots 78%) so the strip never covers clip content.
   Tokens only; the only motion is the 150ms micro token, instant under
   reduced motion (the strip itself never animates). */
.hero-media video { z-index: 1; }
.hero-stats { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 14px; background: var(--surface); border-top: 1px solid var(--line-strong); pointer-events: none; }
.hero-stat { min-width: 0; text-align: center; }
.hero-stat-num { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; color: var(--text); }
.hero-stat-cap { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .hero-stats { padding: 7px 10px; gap: 6px; }
  .hero-stat-num { font-size: 15px; }
  .hero-stat-cap { font-size: 10.5px; }
}

/* ——— Nav / topbar line icons (2026-11-15) ———
   One "Die Strecke" set: 24x24 SVGs, 1.75px stroke, currentColor (monochrome,
   inherits the nav/text colour). Sizing + RTL mirroring only; no colour, no
   new tokens, no new motion. Hover keeps the existing background-color
   transition; transform/opacity only, instant under reduced motion (nothing
   here animates). Directional icons (.flip-rtl) mirror in RTL. */
.nav-item .ico { display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ico svg { width: 20px; height: 20px; display: block; }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.user-menu-item svg { width: 16px; height: 16px; vertical-align: -3px; }
.empty .big svg { width: 40px; height: 40px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* Admin "View as candidate" preview (2026-11-15): the banner slot sits
   above #view in app/index.html and is filled by renderShell() only
   while previewing; :empty hides it the rest of the time. */
#previewBanner { padding: var(--space-xl) var(--space-xl) 0; max-width: 1240px; width: 100%; margin: 0 auto; }
#previewBanner:empty { display: none; }
.preview-banner { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin: 0; }
.preview-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
