/* ============================================================================
   AuftragCH — Design system
   Visual direction from the project concept: navy header, Swiss-red mark,
   orange action colour, heavy grotesque headlines, calm card surfaces.
   No external fonts or scripts (see the Content-Security-Policy in main.py).
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #0a1a2f;
  --navy-800: #0e2340;
  --navy-700: #14304f;
  --navy-600: #1d4066;
  --orange-600: #d9541a;
  --orange-500: #ee6524;
  --orange-400: #f57f42;
  --orange-100: #fdeee5;
  --orange-050: #fff6f1;
  --swiss-red: #e1332d;

  /* Neutrals */
  --ink-900: #0f1b2d;
  --ink-800: #1f2c3d;
  --ink-700: #33404f;
  --ink-600: #4d5b6b;
  --ink-500: #6b7787;
  --ink-400: #8b95a3;
  --ink-300: #b6bdc7;
  --line: #e3e7ed;
  --line-strong: #ced5df;
  --surface: #ffffff;
  --surface-alt: #f5f7fa;
  --surface-sunk: #eef1f6;

  /* Semantic */
  --ok-600: #147a52;
  --ok-100: #e2f4ec;
  --warn-600: #a86a05;
  --warn-100: #fdf1dc;
  --danger-600: #b3261e;
  --danger-100: #fbe6e4;
  --info-600: #1a5fa8;
  --info-100: #e6f0fa;

  /* Shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06), 0 1px 3px rgba(15, 27, 45, .05);
  --shadow-md: 0 2px 6px rgba(15, 27, 45, .06), 0 8px 20px rgba(15, 27, 45, .06);
  --shadow-lg: 0 8px 28px rgba(15, 27, 45, .12);

  /* Layout */
  --page: 1240px;
  --gap: 24px;
  --header-h: 72px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  color: var(--ink-900);
  font-weight: 800;
  letter-spacing: -.021em;
  line-height: 1.15;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--info-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
small { font-size: .8125rem; }
code, pre { font-family: var(--font-mono); font-size: .875em; }

:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--r-md) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ layout */
.page { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.page--narrow { max-width: 860px; }
.page--wide { max-width: 1440px; }
.section { padding: 72px 0; }
.section--tight { padding: 44px 0; }
.section--alt { background: var(--surface-alt); }
.section--sunk { background: var(--surface-sunk); }
.section--navy { background: var(--navy-800); color: #d6dfea; }
.section--navy h2, .section--navy h3 { color: #fff; }

.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cluster--tight { gap: 8px; }
.between { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.text-center { text-align: center; }
.muted { color: var(--ink-500); }
.small { font-size: .875rem; }
.tiny { font-size: .8125rem; }
.strong { font-weight: 700; color: var(--ink-900); }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.full { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8125rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange-600); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--orange-500); border-radius: 2px; }
.eyebrow--plain::before { display: none; }
.lead { font-size: 1.125rem; color: var(--ink-600); max-width: 62ch; }

/* ------------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 44px; height: 44px; border-radius: 9px; background: var(--swiss-red);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 2px 6px rgba(225, 51, 45, .3);
}
.brand__cross { position: relative; width: 22px; height: 22px; }
.brand__cross::before, .brand__cross::after {
  content: ""; position: absolute; background: #fff; border-radius: 1px;
}
.brand__cross::before { left: 8px; top: 2px; width: 6px; height: 18px; }
.brand__cross::after { left: 2px; top: 8px; width: 18px; height: 6px; }
.brand__text { line-height: 1.05; }
.brand__name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.brand__name em { font-style: normal; color: var(--orange-500); }
.brand__claim { display: block; font-size: .6875rem; color: #9fb0c4; letter-spacing: .02em; font-weight: 500; }
.brand--dark .brand__name { color: var(--ink-900); }
.brand--dark .brand__claim { color: var(--ink-500); }

/* ------------------------------------------------------------------ header */
.site-header {
  background: var(--navy-800);
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.site-header__inner {
  max-width: var(--page); margin: 0 auto; padding: 0 24px;
  min-height: var(--header-h); display: flex; align-items: center; gap: 28px;
}
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: #cbd7e4; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; background: rgba(255, 255, 255, .1); border: 0; color: #fff;
  width: 42px; height: 42px; border-radius: var(--r-sm); cursor: pointer; margin-left: auto;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; margin: 0 auto; position: relative;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after { content: ""; position: absolute; top: 6px; }

/* ------------------------------------------------------------------ button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--r-md); border: 1px solid transparent;
  font-family: inherit; font-size: .9375rem; font-weight: 700; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--orange-500); color: #fff; }
.btn--primary:hover { background: var(--orange-600); color: #fff; }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }
.btn--light { background: #fff; color: var(--ink-900); border-color: var(--line-strong); }
.btn--light:hover { background: var(--surface-alt); color: var(--ink-900); }
.btn--ghost { background: transparent; color: var(--ink-700); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-alt); }
.btn--ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn--danger { background: var(--danger-600); color: #fff; }
.btn--danger:hover { background: #8f1e17; color: #fff; }
.btn--link { background: none; border: 0; color: var(--info-600); padding: 4px 2px; font-weight: 600; }
.btn--link:hover { text-decoration: underline; }
.btn--sm { padding: 8px 14px; font-size: .875rem; border-radius: var(--r-sm); }
.btn--lg { padding: 15px 30px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn__arrow { font-size: 1.1em; line-height: 1; }

/* -------------------------------------------------------------------- card */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card__body { padding: 24px; }
.card__body--tight { padding: 16px; }
.card__header {
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.card__header h2, .card__header h3 { margin: 0; font-size: 1.0625rem; }
.card__footer { padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-alt); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card--flat { box-shadow: none; }
.card--accent { border-left: 4px solid var(--orange-500); }
.card--hover { transition: box-shadow .18s, border-color .18s, transform .18s; }
.card--hover:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); transform: translateY(-2px); }

/* ------------------------------------------------------------------- badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-sunk); color: var(--ink-700); white-space: nowrap;
}
.badge--ok { background: var(--ok-100); color: var(--ok-600); }
.badge--warn { background: var(--warn-100); color: var(--warn-600); }
.badge--danger { background: var(--danger-100); color: var(--danger-600); }
.badge--info { background: var(--info-100); color: var(--info-600); }
.badge--orange { background: var(--orange-100); color: var(--orange-600); }
.badge--navy { background: var(--navy-800); color: #fff; }
.badge--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-600); }
.badge--lg { padding: 6px 14px; font-size: .8125rem; }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.verified-mark { display: inline-flex; align-items: center; gap: 5px; color: var(--ok-600); font-weight: 700; font-size: .8125rem; }
.verified-mark svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------- forms */
.field { margin-bottom: 18px; }
.field > label, .field__label {
  display: block; margin-bottom: 6px;
  font-size: .875rem; font-weight: 700; color: var(--ink-800);
}
.field__hint { display: block; margin-top: 5px; font-size: .8125rem; color: var(--ink-500); }
.field__error { display: block; margin-top: 5px; font-size: .8125rem; color: var(--danger-600); font-weight: 600; }
.req { color: var(--danger-600); }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="url"], input[type="number"], input[type="date"], input[type="search"],
select, textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-family: inherit; font-size: .9375rem; color: var(--ink-900); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-300); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(238, 101, 36, .16);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-sunk); color: var(--ink-500); cursor: not-allowed; }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234d5b6b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
.check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; font-size: .9375rem; cursor: pointer;
}
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--orange-500); cursor: pointer; }
.check span { color: var(--ink-700); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.choice {
  position: relative; display: block;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  padding: 13px 15px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--orange-400); background: var(--orange-050); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__label { font-weight: 600; font-size: .9375rem; color: var(--ink-800); display: block; }
.choice__meta { font-size: .8125rem; color: var(--ink-500); }
.choice:has(input:checked) { border-color: var(--orange-500); background: var(--orange-050); box-shadow: 0 0 0 1px var(--orange-500); }
.choice:has(input:focus-visible) { outline: 3px solid var(--orange-500); outline-offset: 2px; }

.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-row--2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin: 0 0 22px; }
.fieldset > legend { padding: 0 8px; font-weight: 800; color: var(--ink-900); font-size: .9375rem; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ alerts */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface-alt);
  font-size: .9375rem; margin-bottom: 20px;
}
.alert--ok { background: var(--ok-100); border-color: #bfe4d4; color: #0d5c3e; }
.alert--warn { background: var(--warn-100); border-color: #f0dcb4; color: #7d4e04; }
.alert--danger { background: var(--danger-100); border-color: #f2c9c6; color: #8f1e17; }
.alert--info { background: var(--info-100); border-color: #c4dcf2; color: #14497f; }
.alert__icon { flex: none; font-weight: 800; }
.alert p:last-child { margin-bottom: 0; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

.flash-stack { position: sticky; top: calc(var(--header-h) + 12px); z-index: 40; }

/* -------------------------------------------------------------------- hero */
.hero { position: relative; background: linear-gradient(160deg, #f7f9fc 0%, #eef2f8 55%, #e7edf5 100%); overflow: hidden; }
.hero__inner { max-width: var(--page); margin: 0 auto; padding: 72px 24px 0; position: relative; z-index: 2; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero__title { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.25rem); line-height: 1.03; letter-spacing: -.035em; margin-bottom: 20px; }
.hero__title em { font-style: normal; color: var(--orange-500); display: block; }
.hero__lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--ink-600); max-width: 34ch; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; padding: 0; list-style: none; }
.hero__points li { display: flex; align-items: center; gap: 8px; font-size: .9375rem; font-weight: 600; color: var(--ink-700); }
.hero__tick {
  width: 20px; height: 20px; border-radius: 50%; background: var(--orange-500); color: #fff;
  display: grid; place-items: center; font-size: .7rem; font-weight: 900; flex: none;
}
.hero__visual { position: relative; }
.hero__panel {
  background: linear-gradient(150deg, var(--navy-700), var(--navy-900));
  border-radius: var(--r-xl); padding: 30px; color: #d9e3ef; box-shadow: var(--shadow-lg);
}
.hero__panel h3 { color: #fff; font-size: 1.15rem; }
.hero__badge {
  position: absolute; right: -6px; bottom: -18px; background: #fff;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 16px 20px;
  display: flex; align-items: center; gap: 12px; max-width: 260px;
}
.hero__badge-mark { width: 34px; height: 34px; border-radius: 7px; background: var(--swiss-red); display: grid; place-items: center; flex: none; }
.hero__badge-text { font-size: .875rem; font-weight: 700; color: var(--ink-900); line-height: 1.35; }
.hero__script {
  font-size: 1.25rem; font-weight: 700; color: var(--navy-700);
  transform: rotate(-4deg); display: inline-block; margin-bottom: 4px;
}
.hero__script::after { content: ""; display: block; height: 3px; border-radius: 2px; background: var(--orange-500); margin-top: 4px; width: 78%; }

.mini-stat { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 22px; }
.mini-stat__item strong { display: block; font-size: 1.75rem; font-weight: 800; color: #fff; line-height: 1.1; }
.mini-stat__item span { font-size: .8125rem; color: #9fb2c8; }

/* ------------------------------------------------------------- search bar */
.searchbar {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 12px; display: grid; gap: 8px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr) minmax(0, 1.1fr) auto;
  align-items: center; position: relative; z-index: 3;
}
.searchbar__field { display: flex; align-items: center; gap: 11px; padding: 6px 12px; border-radius: var(--r-md); }
.searchbar__field + .searchbar__field { border-left: 1px solid var(--line); }
.searchbar__icon { color: var(--ink-400); flex: none; }
.searchbar__box { flex: 1; min-width: 0; }
.searchbar__box label { display: block; font-size: .75rem; font-weight: 700; color: var(--ink-800); }
.searchbar__box input, .searchbar__box select {
  border: 0; padding: 0; font-size: .9375rem; background: transparent; height: 24px; color: var(--ink-800);
}
.searchbar__box input:focus, .searchbar__box select:focus { box-shadow: none; }
.searchbar__box select { background-position: right 0 center; padding-right: 20px; }
.searchbar__box input::placeholder { color: var(--ink-400); }

/* ------------------------------------------------------------- category tiles */
.tile-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.tile {
  background: var(--surface-alt); border: 1px solid transparent; border-radius: var(--r-md);
  padding: 18px 12px; text-align: center; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: background .15s, border-color .15s, transform .15s;
}
.tile:hover { background: #fff; border-color: var(--line-strong); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tile__icon { color: var(--navy-700); }
.tile__label { font-size: .8125rem; font-weight: 700; color: var(--ink-800); line-height: 1.3; }
.tile__count { font-size: .75rem; color: var(--ink-500); }

/* ---------------------------------------------------------- opportunity card */
.opp {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: box-shadow .18s, border-color .18s, transform .18s;
}
.opp:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); transform: translateY(-2px); }
.opp__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; }
.opp__body { padding: 12px 18px 16px; flex: 1; display: flex; flex-direction: column; }
.opp__title { font-size: 1.0625rem; font-weight: 800; line-height: 1.3; margin: 0 0 8px; }
.opp__title a { color: var(--ink-900); }
.opp__title a:hover { color: var(--orange-600); text-decoration: none; }
.opp__summary { font-size: .875rem; color: var(--ink-600); margin: 0 0 12px; }
.opp__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8125rem; color: var(--ink-600); margin-bottom: 12px; }
.opp__fact { display: inline-flex; align-items: center; gap: 5px; }
.opp__fact svg { color: var(--ink-400); flex: none; }
.opp__skills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.opp__foot {
  margin-top: auto; padding: 12px 18px; border-top: 1px solid var(--line);
  background: var(--surface-alt); display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.opp__company { font-size: .8125rem; color: var(--ink-600); display: flex; align-items: center; gap: 7px; min-width: 0; }
.opp__company span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp__time { font-size: .8125rem; color: var(--ink-500); white-space: nowrap; }

.score {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: var(--r-pill); font-size: .8125rem; font-weight: 800;
  background: var(--surface-sunk); color: var(--ink-700);
}
.score--ok { background: var(--ok-100); color: var(--ok-600); }
.score--warn { background: var(--warn-100); color: var(--warn-600); }

.avatar {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  background: var(--navy-700); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .8125rem; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.avatar--sm { width: 28px; height: 28px; font-size: .6875rem; border-radius: 7px; }
.avatar--lg { width: 72px; height: 72px; font-size: 1.4rem; border-radius: 14px; }

/* ------------------------------------------------------------------ meters */
.meter { height: 8px; border-radius: 4px; background: var(--surface-sunk); overflow: hidden; }
.meter__fill { height: 100%; background: var(--orange-500); border-radius: 4px; transition: width .3s; }
.meter__fill--ok { background: var(--ok-600); }
.meter__fill--warn { background: var(--warn-600); }
.meter--lg { height: 12px; border-radius: 6px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--surface-alt); font-weight: 700; color: var(--ink-800); font-size: .8125rem; white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--orange-050); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- KPI grid */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.kpi__label { font-size: .8125rem; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.kpi__value { font-size: 2rem; font-weight: 800; color: var(--ink-900); line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi__meta { font-size: .8125rem; color: var(--ink-500); }
.kpi--accent { border-left: 4px solid var(--orange-500); }

/* -------------------------------------------------------------- dashboard */
.shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.sidebar { background: var(--surface-alt); border-right: 1px solid var(--line); padding: 24px 16px; }
.sidebar__section + .sidebar__section { margin-top: 26px; }
.sidebar__title { font-size: .6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-400); padding: 0 12px 8px; }
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--r-sm); color: var(--ink-700); font-size: .9375rem; font-weight: 600; text-decoration: none;
}
.sidebar a:hover { background: #fff; color: var(--ink-900); text-decoration: none; }
.sidebar a[aria-current="page"] { background: var(--navy-800); color: #fff; }
.sidebar a[aria-current="page"] svg { color: #fff; }
.sidebar svg { color: var(--ink-400); flex: none; }
.sidebar__count {
  margin-left: auto; background: var(--orange-500); color: #fff;
  border-radius: var(--r-pill); padding: 1px 8px; font-size: .75rem; font-weight: 800; min-width: 22px; text-align: center;
}
.sidebar a[aria-current="page"] .sidebar__count { background: #fff; color: var(--navy-800); }
.workspace { padding: 32px 32px 64px; min-width: 0; background: #fff; }
.workspace__head { margin-bottom: 26px; }
.workspace__head h1 { font-size: 1.75rem; margin-bottom: 6px; }

/* --------------------------------------------------------------- messaging */
.thread { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.thread__head { padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.thread__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: 58vh; overflow-y: auto; }
.msg { max-width: 78%; }
.msg__bubble { padding: 12px 16px; border-radius: 14px; background: var(--surface-sunk); color: var(--ink-800); font-size: .9375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__meta { font-size: .75rem; color: var(--ink-500); margin-top: 5px; }
.msg--own { margin-left: auto; }
.msg--own .msg__bubble { background: var(--navy-800); color: #fff; }
.msg--own .msg__meta { text-align: right; }
.msg--system { max-width: 100%; text-align: center; }
.msg--system .msg__bubble { background: var(--warn-100); color: var(--warn-600); font-size: .8125rem; display: inline-block; }
.thread__compose { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-alt); }
.conv-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.conv-item:hover { background: var(--orange-050); text-decoration: none; }
.conv-item--unread { background: var(--orange-050); }
.conv-item__main { min-width: 0; flex: 1; }
.conv-item__name { font-weight: 700; color: var(--ink-900); font-size: .9375rem; }
.conv-item__preview { font-size: .875rem; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------- assistant */
.assistant { background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 32px; }
.assistant__textarea { min-height: 132px; font-size: 1.0625rem; line-height: 1.55; }
.assistant__examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 14px; font-size: .8125rem; color: var(--ink-600); cursor: pointer; font-family: inherit; text-align: left;
}
.chip:hover { background: var(--orange-050); border-color: var(--orange-400); color: var(--ink-800); }
.steps { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; font-size: .875rem; font-weight: 600; color: var(--ink-400); }
.step__num { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-sunk); color: var(--ink-500); display: grid; place-items: center; font-size: .8125rem; font-weight: 800; flex: none; }
.step--done .step__num { background: var(--ok-600); color: #fff; }
.step--done { color: var(--ink-600); }
.step--active .step__num { background: var(--orange-500); color: #fff; }
.step--active { color: var(--ink-900); }
.step__sep { color: var(--ink-300); }

.detected { display: flex; flex-wrap: wrap; gap: 8px; }
.detected__item {
  display: inline-flex; align-items: center; gap: 7px; background: var(--ok-100); color: var(--ok-600);
  border-radius: var(--r-pill); padding: 5px 13px; font-size: .8125rem; font-weight: 700;
}

.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.summary-item { background: var(--surface-alt); border-radius: var(--r-md); padding: 14px 16px; }
.summary-item__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); }
.summary-item__value { font-size: .9375rem; font-weight: 700; color: var(--ink-900); margin-top: 3px; }
.summary-item--missing { background: var(--warn-100); }
.summary-item--missing .summary-item__value { color: var(--warn-600); }

/* ------------------------------------------------------------------ filter */
.layout-filters { display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 30px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); }
.filters__group { border-bottom: 1px solid var(--line); padding: 16px 0; }
.filters__group:last-child { border-bottom: 0; }
.filters__group > h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); margin-bottom: 10px; }
.filter-toggle { display: none; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--navy-900); color: #9fb0c4; padding: 56px 0 28px; margin-top: 0; }
.site-footer h4 { color: #fff; font-size: .875rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.site-footer a { color: #b9c7d8; font-size: .9375rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 34px; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; font-size: .8125rem;
}
.partner-note {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-md); padding: 14px 18px; font-size: .875rem; color: #b9c7d8;
}

/* ------------------------------------------------------------- pagination */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); font-size: .875rem; font-weight: 600; color: var(--ink-700); text-decoration: none;
}
.pagination a:hover { background: var(--surface-alt); text-decoration: none; }
.pagination [aria-current="page"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ------------------------------------------------------------------ misc */
.empty { text-align: center; padding: 56px 24px; color: var(--ink-500); }
.empty__icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .35; }
.empty h3 { color: var(--ink-700); }

.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 18px 0; cursor: pointer; font-weight: 700; color: var(--ink-900);
  font-size: 1.0625rem; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange-500); font-size: 1.5rem; line-height: 1; font-weight: 400; }
.faq[open] summary::after { content: "−"; }
.faq__body { padding-bottom: 20px; color: var(--ink-600); }

.price-card { display: flex; flex-direction: column; height: 100%; }
.price-card__amount { font-size: 2.75rem; font-weight: 800; color: var(--ink-900); line-height: 1; }
.price-card__period { font-size: .9375rem; color: var(--ink-500); font-weight: 600; }
.price-card--featured { border-color: var(--orange-500); box-shadow: 0 0 0 1px var(--orange-500), var(--shadow-md); }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { display: flex; gap: 10px; padding: 7px 0; font-size: .9375rem; }
.feature-list li::before { content: "✓"; color: var(--ok-600); font-weight: 800; flex: none; }
.feature-list li.is-off { color: var(--ink-400); }
.feature-list li.is-off::before { content: "–"; color: var(--ink-300); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 18px; }
.timeline li::before {
  content: ""; position: absolute; left: -29px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--orange-500); border: 2px solid #fff;
}
.timeline__meta { font-size: .8125rem; color: var(--ink-500); }

.reason-list { list-style: none; margin: 0; padding: 0; }
.reason-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; }
.reason-list li:last-child { border-bottom: 0; }
.reason-list .r-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 900; margin-top: 2px; }
.reason-list .r-icon--ok { background: var(--ok-100); color: var(--ok-600); }
.reason-list .r-icon--no { background: var(--warn-100); color: var(--warn-600); }
.reason-list .r-weight { margin-left: auto; font-size: .75rem; color: var(--ink-400); white-space: nowrap; }

.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bar-chart__bar { flex: 1; background: var(--navy-700); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.bar-chart__bar:hover { background: var(--orange-500); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; align-items: center; }
.dl { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); gap: 8px 20px; font-size: .9375rem; margin: 0; }
.dl dt { color: var(--ink-500); font-weight: 600; }
.dl dd { margin: 0; color: var(--ink-900); overflow-wrap: anywhere; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a {
  padding: 11px 16px; font-size: .9375rem; font-weight: 700; color: var(--ink-500);
  border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap;
}
.tabs a:hover { color: var(--ink-800); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--orange-600); border-bottom-color: var(--orange-500); }

.callout { background: var(--surface-alt); border-left: 4px solid var(--navy-700); padding: 16px 20px; border-radius: 0 var(--r-md) var(--r-md) 0; font-size: .9375rem; }
.callout--warn { border-left-color: var(--warn-600); background: var(--warn-100); }
.callout--legal { border-left-color: var(--info-600); background: var(--info-100); }

.code-block {
  background: var(--navy-900); color: #cfe0f0; padding: 16px 18px; border-radius: var(--r-md);
  font-family: var(--font-mono); font-size: .8125rem; overflow-x: auto; white-space: pre;
}
.secret {
  font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: .06em;
  background: var(--surface-sunk); padding: 12px 16px; border-radius: var(--r-md);
  word-break: break-all; border: 1px dashed var(--line-strong);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .searchbar { grid-template-columns: 1fr 1fr; }
  .searchbar__field + .searchbar__field { border-left: 0; }
  .layout-filters { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filter-toggle { display: inline-flex; }
  .filters__panel { display: none; }
  .filters__panel.is-open { display: block; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    border-right: 0; border-bottom: 1px solid var(--line);
    display: flex; gap: 6px; overflow-x: auto; padding: 12px;
  }
  .sidebar__section { display: flex; gap: 6px; }
  .sidebar__section + .sidebar__section { margin-top: 0; }
  .sidebar__title { display: none; }
  .sidebar a { white-space: nowrap; background: #fff; border: 1px solid var(--line); }
  .workspace { padding: 22px 18px 48px; }
}

@media (max-width: 860px) {
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--navy-800); flex-direction: column; padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1); box-shadow: var(--shadow-lg);
  }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: block; order: 3; }
  .header-actions { order: 2; margin-left: auto; }
  .header-actions .btn--light { display: none; }
  .section { padding: 48px 0; }
  .hero__inner { padding-top: 44px; }
  .searchbar { grid-template-columns: 1fr; padding: 10px; }
  .searchbar__field { border-top: 1px solid var(--line); }
  .searchbar__field:first-child { border-top: 0; }
  .searchbar .btn { width: 100%; }
  .msg { max-width: 92%; }
  .card__body { padding: 18px; }
  .assistant { padding: 22px; border-radius: var(--r-lg); }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .page { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .tile-row { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .kpi__value { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .sidebar, .btn, .filters { display: none !important; }
  .workspace, .page { padding: 0; }
  body { font-size: 11pt; }
}
