/* Application styles.
   The design system is documented in docs/design-system.md. Order: fonts,
   tokens, base, layout, components, feature styles, responsive. The app wears
   the Lottka palette; public job pages wear the agency's own colour instead
   (see "Public job pages"). */

/* ---------- Fonts ---------- */
/* Sora for headings and the wordmark, Inter for everything else. Both are
   self-hosted (SIL Open Font License, see fonts/*-OFL.txt), so pages make no
   third-party requests. Variable files: one download covers every weight. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/sora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/sora-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Lottka: navy carries the brand and the main actions; amber is the goose's
     beak and is kept for highlights and focus, never for whole surfaces. */
  --navy: #13202e;
  --amber: #e2a33a;
  --amber-ink: #8a5a10;
  --slate: #3c4a5a;
  --mist: #c9d3dd;
  --cream: #f5f2ec;

  --brand: var(--navy);
  --accent: var(--navy);
  --accent-hover: #22344a;
  --on-accent: #ffffff;
  --brand-ink: #2b4a6b;
  --brand-soft: #eef1f4;
  --brand-line: #c3ccd6;
  --highlight: var(--amber);
  --highlight-soft: #fbf0dc;
  /* Amber dark enough to stand 3:1 against white, as a focus ring must. */
  --focus: #b07514;

  /* Surfaces: a warm paper canvas, white cards, a cream sidebar. */
  --bg: #f7f5f0;
  --sidebar: #efebe3;
  --surface: #ffffff;
  --surface-2: var(--cream);
  --surface-3: #e9e4da;
  --line: #e1ddd3;
  --card-line: rgb(19 32 46 / 8%);
  /* Borders of fields and controls: at least 3:1 against the surface. */
  --line-strong: #858b93;
  --line-control: #d5cfc3;
  --text: var(--navy);
  --text-2: var(--slate);
  --text-3: #4a5868;
  --scrim: rgb(19 32 46 / 32%);

  /* Status colours. Each tone has a solid (dots, bars), an ink (text on the
     soft fill), a soft fill, a line and a button fill with its text colour.
     Red urgent, amber soon, green good, blue information, purple market.
     "Soon" leans orange so it never reads as the brand amber, and every
     status chip carries an icon and a word as well as its colour. */
  --urgent: #e0483f;
  --urgent-ink: #a3211a;
  --urgent-soft: #fdecea;
  --urgent-line: #f4c3bd;
  --urgent-button: #c4302b;
  --urgent-on: #ffffff;
  --soon: #e8792b;
  --soon-ink: #8f3e08;
  --soon-soft: #fdeee1;
  --soon-line: #f6c8a4;
  --soon-button: #e8792b;
  --soon-on: #2b1300;
  --good-solid: #1d9a6c;
  --good-ink: #0b6a47;
  --good-soft: #e3f4ec;
  --good-line: #a9dcc5;
  --good-button: #0f7d56;
  --good-on: #ffffff;
  --info: #3a72d6;
  --info-ink: #1f4a9e;
  --info-soft: #e9effb;
  --info-line: #bccdf1;
  --info-button: #2a5fc4;
  --info-on: #ffffff;
  --market: #8459e6;
  --market-ink: #5a32b4;
  --market-soft: #f1ebfd;
  --market-line: #d3c4f6;
  --market-button: #6a43d0;
  --market-on: #ffffff;
  /* Older names, kept for the feature styles that use them. */
  --good: var(--good-ink);
  --warn: var(--soon-ink);
  --warn-soft: var(--soon-soft);
  --bad: var(--urgent-ink);
  --bad-soft: var(--urgent-soft);
  /* A warm wash used once, behind the Today greeting. */
  --daylight: radial-gradient(120% 140% at 100% 0%, rgb(226 163 58 / 20%), transparent 55%),
    radial-gradient(90% 120% at 0% 0%, rgb(19 32 46 / 6%), transparent 60%);

  /* Spacing scale: 4px steps at the small end, then wider jumps. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* Type scale. Body copy is 16px with generous leading: easy to read all day. */
  --text-xs: 13px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 34px;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --control-height: 44px;
  --shadow: 0 1px 2px rgb(19 32 46 / 4%), 0 4px 14px -6px rgb(19 32 46 / 8%);
  --shadow-raised: 0 1px 1px rgb(19 32 46 / 6%), 0 2px 6px -2px rgb(19 32 46 / 10%);
  --shadow-lg: 0 0 0 1px rgb(19 32 46 / 6%), 0 18px 48px -12px rgb(19 32 46 / 28%);
  --shadow-panel: 0 0 0 1px rgb(19 32 46 / 6%), -20px 0 60px -20px rgb(19 32 46 / 30%);
  --ease: cubic-bezier(0.22, 0.9, 0.24, 1);
  --fast: 0.16s;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sora", var(--font);
  --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* At night the main actions turn amber on navy, with navy text. */
    --accent: #e9b254;
    --accent-hover: #f1c272;
    --on-accent: var(--navy);
    --brand-ink: #9fc0e2;
    --brand-soft: #1e3044;
    --brand-line: #34506e;
    --highlight: #e9b254;
    --highlight-soft: #33280f;
    --focus: #e9b254;
    --bg: #0f1823;
    --sidebar: #0c141d;
    --surface: #172331;
    --surface-2: #1d2b3b;
    --surface-3: #243446;
    --line: #263546;
    --card-line: rgb(255 255 255 / 6%);
    --line-strong: #6b7c8f;
    --line-control: #34475b;
    --text: #eef1f4;
    --text-2: #c3cdd8;
    --text-3: #a9b6c4;
    --scrim: rgb(0 0 0 / 55%);
    --urgent: #f0605a;
    --urgent-ink: #ff9a92;
    --urgent-soft: #3a1a19;
    --urgent-line: #6b2a26;
    --soon: #f08a45;
    --soon-ink: #f8b98a;
    --soon-soft: #36210f;
    --soon-line: #6d3f1a;
    --good-solid: #34c088;
    --good-ink: #73dcae;
    --good-soft: #11301f;
    --good-line: #1f5a3d;
    --info: #5b8ff0;
    --info-ink: #9dbdf8;
    --info-soft: #172540;
    --info-line: #2a4478;
    --market: #9b78f0;
    --market-ink: #c3adfa;
    --market-soft: #241a40;
    --market-line: #46347a;
    --daylight: radial-gradient(120% 140% at 100% 0%, rgb(233 178 84 / 12%), transparent 55%),
      radial-gradient(90% 120% at 0% 0%, rgb(159 192 226 / 7%), transparent 60%);
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-raised: 0 1px 2px rgb(0 0 0 / 45%);
    --shadow-lg: 0 0 0 1px rgb(255 255 255 / 8%), 0 18px 48px -12px rgb(0 0 0 / 70%);
    --shadow-panel: 0 0 0 1px rgb(255 255 255 / 8%), -20px 0 60px -20px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--text-base)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-ink); text-decoration: none; text-underline-offset: 0.18em; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); }
h1 { font-size: var(--text-2xl); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: var(--text-lg); font-weight: 600; }
h3 { font-size: var(--text-base); font-weight: 650; }
p { margin: 0 0 var(--space-3); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
kbd, .kbd {
  font: 600 11px/1 var(--font); color: var(--text-3); white-space: nowrap;
  padding: 4px 6px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-control), 0 1px 0 var(--line-control);
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--brand-line); }

.icon { width: 18px; height: 18px; flex: none; }
.small > .icon, .cell-sub > .icon { width: 15px; height: 15px; vertical-align: -3px; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: var(--text-sm); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-12 { margin-top: var(--space-3); }
.pre-wrap { white-space: pre-wrap; }
details > summary { cursor: pointer; color: var(--text-2); }
details[open] > summary { margin-bottom: var(--space-3); }

/* ---------- Layout: sidebar and content ---------- */
.skip-link {
  position: fixed; left: var(--space-3); top: var(--space-3); z-index: 60;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateY(-200%); visibility: hidden;
}
.skip-link:focus { transform: none; visibility: visible; }

/* The sidebar's colour is painted on the shell too, so it runs the full height of long pages. */
.shell {
  display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--sidebar) 263px, var(--line) 263px 264px, transparent 264px);
}
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-4) var(--space-3) var(--space-3);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.sidebar-top { display: grid; gap: var(--space-3); }
.sidebar-top > *, .nav-group > * { min-width: 0; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: var(--space-1) var(--space-2) 0; }
.brand-home { display: inline-flex; border-radius: 8px; }
.brand-home:hover { text-decoration: none; }

/* The Lottka logo: Lottka the Goose in profile on its navy tile, and the
   lowercase wordmark. The tile carries its own colours, so it reads the same
   on light and dark grounds. The other poses are in _brand.html. */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo-mark { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1; letter-spacing: -0.035em; }
.goose { flex: none; display: block; }
.goose-lg { width: 112px; height: 112px; margin: 0 auto; filter: drop-shadow(0 10px 18px rgb(19 32 46 / 22%)); }
.goose-sm { width: 40px; height: 40px; }
.goose-flash { width: 32px; height: 32px; border-radius: 8px; }
.error-goose { margin-bottom: var(--space-4); }
/* On dark grounds the navy tile needs a faint edge to stay a tile. */
@media (prefers-color-scheme: dark) {
  .goose > rect:first-child { stroke: rgb(255 255 255 / 14%); stroke-width: 2; }
}
.empty-goose { display: block; margin: 4px 0 var(--space-5); }
/* While Lottka is working, the flock behind the goose drifts. */
.working { display: flex; gap: var(--space-4); align-items: flex-start; }
.working > .goose { width: 56px; height: 56px; }
.working-text { flex: 1; min-width: 0; display: grid; gap: var(--space-2); }
.goose-flock .goose-flock-birds { animation: flock-drift 2.4s ease-in-out infinite alternate; }
@keyframes flock-drift { from { transform: translate(0, 0); } to { transform: translate(5px, -4px); } }
.goose-asleep .goose-z { animation: snooze 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.goose-asleep .goose-z2 { animation-delay: 1.3s; }
@keyframes snooze { 0%, 100% { opacity: 0.35; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-2px); } }
.flash-win .goose-honk .goose-honk-lines { animation: honk 0.5s ease-out 3; transform-box: fill-box; transform-origin: left center; }
@keyframes honk { from { transform: scale(0.6); opacity: 0.2; } to { transform: scale(1); opacity: 1; } }
/* The money moments get a bigger goose: the egg drops in, then the gold bursts out. */
.flash-egg .goose-flash, .flash-gold .goose-flash { width: 52px; height: 52px; border-radius: 12px; }
.flash-egg .goose-egg { animation: egg-drop 0.7s cubic-bezier(0.3, 1.5, 0.6, 1) both; transform-box: fill-box; transform-origin: bottom center; }
@keyframes egg-drop { from { transform: translateY(-14px) scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
.flash-gold .goose-bars { animation: gold-out 0.8s cubic-bezier(0.3, 1.6, 0.6, 1) 0.15s both; transform-box: fill-box; transform-origin: bottom center; }
@keyframes gold-out { from { transform: translateY(10px) scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.flash-gold .goose-shell { animation: shell-pop 0.6s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes shell-pop { from { transform: translate(6px, 12px) rotate(18deg); } to { transform: none; } }
.flash-egg .goose-sparkle, .flash-gold .goose-sparkle { animation: twinkle 1.2s ease-in-out 3; }
@keyframes twinkle { 50% { opacity: 0.2; } }
}

/* An agency's own initial on its public pages. */
.brand-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 80%, white), var(--accent));
  color: #fff; font-weight: 700; font-size: var(--text-sm);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%), 0 1px 2px rgb(20 27 38 / 18%);
}
.sidebar .sidebar-close { display: none; }

.ws-switch { border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-raised); }
.ws-switch summary { list-style: none; cursor: pointer; padding: var(--space-2) 10px; display: flex; align-items: center; gap: var(--space-3); color: var(--text); border-radius: var(--radius-sm); }
.ws-switch summary::-webkit-details-marker { display: none; }
.ws-switch[open] > summary { margin-bottom: 0; }
.ws-text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.ws-current, .ws-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-field { font-size: var(--text-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-chevron { color: var(--text-3); transition: transform var(--fast) var(--ease); }
.ws-switch[open] .ws-chevron { transform: rotate(180deg); }
.ws-switch ul { list-style: none; margin: 0; padding: var(--space-1); border-top: 1px solid var(--line); }
.ws-switch a { display: flex; align-items: center; gap: var(--space-3); padding: 6px; border-radius: 8px; color: var(--text); }
.ws-switch a:hover { background: var(--surface-2); text-decoration: none; }
.ws-tick { color: var(--brand-ink); }
.ws-add { color: var(--text-2) !important; }
.ws-add .icon { width: 28px; }

.search-trigger {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 36px; padding: 0 var(--space-2) 0 10px; border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--surface) 70%, transparent); color: var(--text-3);
  box-shadow: inset 0 0 0 1px var(--line-control);
  transition: background var(--fast) var(--ease);
}
.search-trigger:hover { background: var(--surface); color: var(--text-2); text-decoration: none; }
.search-trigger .icon { width: 16px; height: 16px; }

/* Desk colours: one per desk, so the current desk is recognisable at a glance. */
.desk-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px;
  color: #fff; font-weight: 700; font-size: 13px;
}
.desk-colour-0 { background: #2563eb; }
.desk-colour-1 { background: #0f8a6c; }
.desk-colour-2 { background: #b4530f; }
.desk-colour-3 { background: #8b3fd1; }
.desk-colour-4 { background: #c0336b; }
.desk-colour-5 { background: #0e7490; }
.desk-colour-6 { background: #5b6b16; }
.desk-colour-7 { background: #4b5563; }

.nav { display: grid; gap: var(--space-4); }
.nav-group { display: grid; gap: 1px; }
.nav-section { padding: 0 12px var(--space-1); font-size: var(--text-xs); font-weight: 620; color: var(--text-3); }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 8px 12px; border-radius: 11px;
  color: var(--text); font-weight: 520; font-size: 15.5px;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav-item .icon { color: var(--brand-ink); width: 20px; height: 20px; }
.nav-item:hover { background: var(--surface-3); text-decoration: none; }
.nav-item.is-active {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 88%, white), var(--accent));
  color: var(--on-accent); font-weight: 640; box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%), 0 2px 6px -2px color-mix(in oklab, var(--accent) 60%, transparent);
}
/* Amber marks where you are; at night the pill itself is amber. */
.nav-item.is-active .icon { color: var(--amber); }
@media (prefers-color-scheme: dark) { .nav-item.is-active .icon { color: var(--on-accent); } }
.nav-badge {
  min-width: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-control);
  font-size: var(--text-xs); font-weight: 650; text-align: center; line-height: 20px; font-variant-numeric: tabular-nums;
}
.nav-item.is-active .nav-badge { background: color-mix(in oklab, var(--on-accent) 22%, transparent); color: var(--on-accent); box-shadow: none; }
.nav-badge-urgent, .nav-item.is-active .nav-badge-urgent { background: var(--urgent-button); color: #fff; box-shadow: 0 0 0 2px var(--sidebar); }

.sidebar-foot { margin-top: auto; display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.user { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 2px 2px 0 6px; }
.user form { margin: 0 0 0 auto; }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-control); font-weight: 650; font-size: var(--text-sm); color: var(--text-2);
}
.user-meta { display: grid; min-width: 0; line-height: 1.3; }
.user-name { font-weight: 600; font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: var(--text-xs); color: var(--text-3); }

.mobile-bar, .sidebar-scrim { display: none; }

.main { padding: 40px 48px 72px; min-width: 0; max-width: 1360px; width: 100%; }
.main:focus { outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-7); }
.page-title { min-width: 0; }
.page-head p { margin: var(--space-2) 0 0; max-width: 64ch; font-size: var(--text-lg); line-height: 1.5; }
.eyebrow { font-size: var(--text-sm); color: var(--text-3); margin-bottom: var(--space-2); }
.eyebrow a { color: var(--text-2); }
.page-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.page-actions form { margin: 0; }

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card .card { box-shadow: none; border-color: var(--line); }
.card-pad { padding: var(--space-5) var(--space-6); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: 16px var(--space-6) 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 5%, var(--surface)), var(--surface));
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-head h2 { font-size: var(--text-lg); }
.card-body { padding: var(--space-5) var(--space-6); }
.grid { display: grid; gap: var(--space-5); }
.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)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.section { margin-top: var(--space-7); }
.page-head + .section, .section:first-child { margin-top: 0; }
.main > .card + .grid, .main > .flash + .grid { margin-top: var(--space-5); }

.card.stat { padding: 18px var(--space-5); background: var(--surface); }
.stat-label { font-size: var(--text-sm); color: var(--text-2); font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: var(--space-1); }
.stat-note { font-size: var(--text-xs); color: var(--text-3); }
a.card.stat { color: inherit; transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
a.card.stat:hover { text-decoration: none; border-color: var(--brand-line); box-shadow: var(--shadow), 0 0 0 3px var(--brand-soft); }

/* Key facts shown read-only, with an Edit action opening a slide-over. */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px var(--space-5); margin: 0; }
.kv dt { color: var(--text-3); font-size: var(--text-sm); padding-top: 1px; white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: break-word; }

/* ---------- Empty states ---------- */
.empty { padding: 56px var(--space-6) 60px; text-align: center; color: var(--text-2); }
.empty { isolation: isolate; }
.empty h3 { color: var(--text); margin-bottom: var(--space-2); font-size: var(--text-xl); letter-spacing: -0.02em; }
.empty p { max-width: 46ch; margin-left: auto; margin-right: auto; font-size: var(--text-base); }
.empty-actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; margin-top: var(--space-5); }
.empty-actions .button-primary { min-height: 52px; padding: 0 var(--space-6); font-size: var(--text-lg); border-radius: 14px; }

/* ---------- Tables ---------- */
.table-wrap { position: relative; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: var(--text-xs); font-weight: 600; color: var(--text-3);
  padding: 12px var(--space-4) 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th:first-child, .table td:first-child { padding-left: var(--space-6); }
.table th:last-child, .table td:last-child { padding-right: var(--space-6); }
.table td { padding: 14px var(--space-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--fast) var(--ease); }
.table tbody tr:hover { background: color-mix(in oklab, var(--surface-2) 70%, transparent); }
.table .actions { text-align: right; white-space: nowrap; }
.cell-title { font-weight: 600; color: var(--text); }
a.cell-title:hover { color: var(--brand-ink); }
.cell-sub { font-size: var(--text-sm); color: var(--text-3); }

/* ---------- Badges and score ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; line-height: 18px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid transparent; white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; }
.badge-brand { background: var(--info-soft); color: var(--info-ink); }
.badge-good { background: var(--good-soft); color: var(--good-ink); }
.badge-warn { background: var(--soon-soft); color: var(--soon-ink); }
.badge-bad { background: var(--urgent-soft); color: var(--urgent-ink); }
/* Coloured badges always carry their tone's icon, so colour is never the only cue. */
.badge-good:not(:has(.icon))::before, .badge-warn:not(:has(.icon))::before,
.badge-bad:not(:has(.icon))::before, .badge-brand:not(:has(.icon))::before {
  content: ""; flex: none; width: 13px; height: 13px; background: currentColor;
  mask: var(--badge-icon) center / contain no-repeat;
}
.badge-bad { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 4.6 3.3 17.4c-.7 1.2.2 2.6 1.5 2.6h14.4c1.3 0 2.2-1.4 1.5-2.6L13.5 4.6c-.7-1.2-2.3-1.2-3 0z'/%3E%3Cpath d='M12 9.5v4.2M12 16.7v.1'/%3E%3C/svg%3E"); }
.badge-warn { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E"); }
.badge-good { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='m8.2 12.3 2.6 2.6 5-5.4'/%3E%3C/svg%3E"); }
.badge-brand { --badge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 11v5.2M12 7.9v.1'/%3E%3C/svg%3E"); }


.score {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  font-weight: 700; font-size: var(--text-base); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  background: var(--surface-2); color: var(--text-2);
}
.score-high { background: var(--accent); color: var(--on-accent); }
.score-mid { background: var(--brand-soft); color: var(--brand-ink); }

.reasons { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-1); }
.reasons li { display: flex; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-2); }
.reasons li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--brand); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field > span:first-child, .fieldset > legend { font-weight: 600; font-size: var(--text-sm); color: var(--text); }
.field .hint, .hint { font-size: var(--text-sm); color: var(--text-3); font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"],
input[type="search"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="tel"], input[type="file"], select, textarea {
  width: 100%; min-height: var(--control-height); padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
input[type="file"] { padding: 7px 8px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea[rows] { min-height: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in oklab, var(--highlight) 26%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-2); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-5); }
.form-grid > * { min-width: 0; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.code-input { font-size: 22px; letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }
fieldset.field, .fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset > legend { padding: 0; margin-bottom: 6px; }
.form-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.readonly-note { display: flex; gap: var(--space-2); align-items: center; padding: 10px var(--space-3); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: var(--text-sm); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--control-height); padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line-control); background: var(--surface); color: var(--text);
  box-shadow: 0 1px 1px rgb(20 27 38 / 5%);
  font: inherit; font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform 0.08s var(--ease);
}
.button .icon { width: 18px; height: 18px; }
.button:hover { background: var(--surface-2); text-decoration: none; }
.button:active { transform: scale(0.98); }
.button-primary {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 86%, white), var(--accent)); border-color: transparent; color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 1px 2px rgb(20 27 38 / 18%), 0 4px 12px -6px color-mix(in oklab, var(--accent) 70%, transparent);
}
.button-primary:hover { background: var(--accent-hover); }
.page-actions .button-primary { min-height: 48px; padding: 0 22px; font-size: var(--text-base); border-radius: 13px; }
.button-danger { color: var(--bad); }
.button-danger:hover { background: var(--bad-soft); border-color: var(--bad-soft); }
.button-quiet { border-color: transparent; background: transparent; color: var(--brand-ink); box-shadow: none; }
.button-quiet:hover { background: var(--brand-soft); }
.button-sm { min-height: 38px; padding: 6px 14px; font-size: var(--text-sm); border-radius: 10px; }
.button-block { width: 100%; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.icon-button:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.link-button { border: 0; background: none; padding: 0; color: var(--brand-ink); font: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.link-button.small { font-size: var(--text-sm); }
form.inline { display: inline; margin-left: var(--space-2); }

.toolbar { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-5); }
.toolbar input[type="search"] { width: auto; flex: 1 1 240px; max-width: 380px; }
.toolbar select { width: auto; min-width: 160px; }

/* Tabs are a segmented control: links, so they survive a reload. */
.tabs {
  display: flex; width: fit-content; max-width: 100%; gap: 2px; padding: 3px; margin-bottom: var(--space-6);
  border-radius: 12px; background: var(--surface-3); overflow-x: auto; scrollbar-width: none;
}
.tab { padding: 9px 16px; border-radius: 9px; color: var(--text-2); font-weight: 580; font-size: 15px; white-space: nowrap; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.tab:hover { color: var(--text); text-decoration: none; background: color-mix(in oklab, var(--surface) 50%, transparent); }
.tab.is-active { color: var(--text); background: var(--surface); font-weight: 650; box-shadow: var(--shadow-raised); }

.pagination { display: flex; gap: var(--space-2); justify-content: flex-end; align-items: center; padding: var(--space-3) var(--space-6); border-top: 1px solid var(--line); color: var(--text-2); font-size: var(--text-sm); }
.pagination > span { margin-right: auto; }

/* ---------- Feedback ---------- */
.flash { display: block; padding: 12px var(--space-4); border-radius: var(--radius-sm); margin-bottom: var(--space-5); font-weight: 520; border: 1px solid transparent; }
.flash:has(> .icon), .flash-win { display: flex; gap: 10px; align-items: flex-start; }
.flash-win { align-items: center; }
.flash > .icon { margin-top: 2px; }
.flash > .flash-text { flex: 1; min-width: 0; }
.flash a { color: inherit; text-decoration: underline; }
.flash-info { background: var(--info-soft); color: var(--info-ink); border-color: var(--info-line); }
.flash-success { background: var(--good-soft); color: var(--good-ink); border-color: var(--good-line); }
.flash-error { background: var(--urgent-soft); color: var(--urgent-ink); border-color: var(--urgent-line); }
.flash-warn { background: var(--soon-soft); color: var(--soon-ink); border-color: var(--soon-line); }
.main > .flash { animation: arrive 0.3s var(--ease); }
.flash.row-between { display: flex; align-items: center; }
.flash form { margin: 0; }

.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--text-3); font-size: var(--text-xs); margin: var(--space-5) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--space-5) 26px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 20px; bottom: 2px; width: 1.5px; border-radius: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }

.email-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: var(--space-4) var(--space-5); white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.usage-bar { display: block; width: 100%; height: 8px; margin-top: var(--space-2); }
.usage-track { fill: var(--surface-3); }
.usage-fill { fill: var(--brand); }
.usage-fill-full { fill: var(--warn); }
.note-count { font-variant-numeric: tabular-nums; }

/* htmx's own indicator styles are switched off (they would need an inline
   <style>, which the Content Security Policy forbids), so they live here. */
.htmx-indicator { opacity: 0; transition: opacity 0.2s ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* ---------- Slide-over panel ---------- */
.slideover {
  position: fixed; inset: var(--space-2) var(--space-2) var(--space-2) auto; z-index: 40;
  width: min(540px, calc(100vw - 16px)); height: auto; max-height: calc(100% - 16px); max-width: 100vw;
  margin: 0; padding: 0; border: 0; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-panel);
  display: none; flex-direction: column;
}
.slideover[open], .slideover:target { display: flex; }
.js .slideover:target:not([open]) { display: none; }
.slideover[open] { animation: slide-in 0.28s var(--ease); }
.slideover:focus-visible { outline: none; }
.slideover::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.slideover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-6) var(--space-6) var(--space-4); border-bottom: 1px solid var(--line); }
.slideover-head h2 { font-size: var(--text-xl); letter-spacing: -0.02em; }
.slideover-head p { margin: 6px 0 0; }
.slideover-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.slideover-body { flex: 1; overflow-y: auto; padding: var(--space-5) var(--space-6); }
.slideover-foot { display: flex; gap: var(--space-2); justify-content: flex-end; padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); background: var(--surface-2); }
.slideover .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@keyframes slide-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes arrive { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translateY(-8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
body:has(.slideover[open]), body:has(.finder[open]) { overflow: hidden; }

/* ---------- Quick finder ---------- */
.finder {
  position: fixed; top: 12vh; margin: 0 auto; padding: 0; border: 0;
  width: min(640px, calc(100vw - 24px)); max-height: 72vh;
  border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
  overflow: hidden; flex-direction: column;
}
.finder[open] { display: flex; animation: pop 0.2s var(--ease); }
.finder::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.finder-form { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); }
.finder-form > .icon { width: 20px; height: 20px; color: var(--text-3); }
.finder-form input[type="search"] { border: 0; box-shadow: none; padding: 10px 0; font-size: 18px; background: transparent; min-height: 44px; }
.finder-form input[type="search"]:focus { box-shadow: none; }
.finder-results { overflow-y: auto; padding: var(--space-2); }
.finder-hint { margin: 0; padding: var(--space-5) var(--space-4); color: var(--text-3); text-align: center; font-size: 14px; }
.finder-none { padding: var(--space-4); color: var(--text-2); }
.finder-group + .finder-group { margin-top: var(--space-2); }
.finder-label { padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--text-xs); font-weight: 600; color: var(--text-3); }
.finder-group ul { list-style: none; margin: 0; padding: 0; }
.finder-hit { display: flex; align-items: center; gap: var(--space-3); padding: 8px var(--space-3); border-radius: var(--radius-sm); color: var(--text); }
.finder-hit:hover, .finder-hit:focus-visible { background: var(--accent); color: var(--on-accent); text-decoration: none; outline: none; }
.finder-hit:hover .finder-detail, .finder-hit:focus-visible .finder-detail,
.finder-hit:hover .finder-icon, .finder-hit:focus-visible .finder-icon { color: inherit; }
.finder-hit:hover .finder-icon, .finder-hit:focus-visible .finder-icon { background: rgb(255 255 255 / 18%); }
.finder-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.finder-icon .icon { width: 17px; height: 17px; }
.finder-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-detail { display: block; font-size: var(--text-sm); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-go { color: inherit; opacity: 0.5; }
.finder-page { padding: var(--space-2); }

/* ---------- More tools (Settings) ---------- */
.tool-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tool {
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text);
  transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.tool:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--brand-line), 0 0 0 3px var(--brand-soft); text-decoration: none; }
.tool-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-raised); flex: none; }
.tool-name { display: block; font-weight: 650; }
.tool-hint { display: block; font-size: var(--text-sm); color: var(--text-2); }

/* ---------- Auth ---------- */
/* Sign-in: a navy panel with the flock beside the form on wide screens; the
   form alone, under the logo, on small ones. */
body.auth { background: var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-hero {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-7);
  padding: 56px 56px 40px; overflow: hidden;
  background: radial-gradient(80% 60% at 30% 20%, rgb(226 163 58 / 14%), transparent 70%), var(--navy);
  color: var(--cream);
}
.hero-goose { width: min(300px, 70%); height: auto; margin-top: 6vh; }
.hero-text { max-width: 30rem; }
.hero-line { margin: 0 0 var(--space-3); font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; }
.hero-sub { margin: 0; font-size: var(--text-lg); color: var(--mist); }
.hero-foot { margin: 0; font-size: var(--text-sm); color: var(--mist); }
.auth-side { display: grid; place-items: center; padding: var(--space-6); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--card-line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 40px var(--space-7) var(--space-7); animation: pop 0.35s var(--ease); }
.auth-brand { display: flex; justify-content: center; margin-bottom: var(--space-6); }
.auth-brand .logo-mark { width: 48px; height: 48px; border-radius: 12px; }
.auth-brand .wordmark { font-size: 28px; }
.auth-title { font-size: 26px; text-align: center; margin-bottom: var(--space-5); }
.auth-wrap.is-plain { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { display: none; }
  .auth-side { min-height: 100vh; }
}
.auth-card .button-primary { min-height: 44px; }
.choice-list { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: grid; gap: var(--space-2); }
.choice { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-4); border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.choice:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--brand-soft); }
.choice-title { font-weight: 600; }

/* ---------- Charts (inline SVG) ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart-label { font: 12px var(--font); fill: var(--text-2); }
.chart-value { font: 600 12px var(--font); fill: var(--text); }
.chart-bar { fill: var(--brand); }
.chart-bar-muted { fill: var(--line-strong); }
.chart-bar-alt { fill: color-mix(in oklab, var(--brand) 35%, var(--surface)); }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.key-sent { background: var(--brand); }
.key-replies { background: color-mix(in oklab, var(--brand) 35%, var(--surface)); }

/* ---------- Calls ---------- */
.call-list { list-style: none; margin: 0; padding: 0; }
.call { padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.call:last-child { border-bottom: 0; }
.call-head { display: flex; align-items: flex-start; gap: var(--space-3); }
.call-dial { text-align: right; }
.call-reason { margin: 0; color: var(--text-2); }
.call-outcomes { display: grid; gap: var(--space-2); }
.call-outcomes textarea { width: 100%; min-height: 0; }
.call-back .row { align-items: flex-end; }
.call-extra { border-top: 1px solid var(--line); }

/* ---------- Candidates and matching ---------- */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2) var(--space-4); }
.check-grid .checkbox { font-weight: 400; font-size: 14px; }
.match { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-4); }
.match-jobs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: var(--space-2); }
.match-people { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.match-people form { margin: 0; }
.alert-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Source checks ---------- */
.progress { width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--surface-2); overflow: hidden; appearance: none; accent-color: var(--brand); }
.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 4px; }
.progress::-webkit-progress-value { background: var(--brand); border-radius: 4px; }
.progress::-moz-progress-bar { background: var(--brand); border-radius: 4px; }
.preview-list { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.preview { padding: var(--space-4) var(--space-5); display: grid; gap: 10px; align-content: start; min-width: 0; }
.preview > *, .preview-head .grow { min-width: 0; }
.preview .truncate { display: block; }
.preview:has(.preview-tick:checked) { border-color: var(--brand-line); box-shadow: 0 0 0 1px var(--brand-line), var(--shadow); }
.preview.is-added { background: var(--surface-2); }
.preview-head { display: flex; align-items: flex-start; gap: 10px; }
.preview-head .badge { margin-right: 4px; }
.preview-tick { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); color: var(--good); font-weight: 700; text-align: center; line-height: 18px; }
.preview-title { display: block; font-weight: 620; font-size: var(--text-base); cursor: pointer; overflow-wrap: anywhere; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--text-sm); color: var(--text-2); }
.facts strong { color: var(--text); margin-right: 2px; }
.preview-company select { min-height: 32px; padding: 5px 9px; }
.problem-list { list-style: none; margin: 0; padding: 0; }
.problem-list li { padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.problem-list li:last-child { border-bottom: 0; }
.sticky-actions {
  position: sticky; bottom: 0; z-index: 1; padding: var(--space-3) 0;
  background: var(--bg); border-top: 1px solid var(--line);
}
.usage-table td, .usage-table th { padding: var(--space-2) var(--space-3); }

/* ---------- Settings ---------- */
.settings-nav { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.settings-nav a { padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-control); color: var(--text-2); font-size: var(--text-sm); font-weight: 560; }
.settings-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
[id] { scroll-margin-top: var(--space-5); }

/* ---------- Clients, opportunities and tasks ---------- */
.narrow { max-width: 720px; }
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-control); color: var(--text-2); font-size: var(--text-sm); font-weight: 560; transition: background var(--fast) var(--ease); }
.chip:hover { text-decoration: none; background: var(--surface-2); color: var(--text); }
.chip.is-active { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.chip.is-active .subtle, .chip.is-active .muted { color: inherit; opacity: 0.8; }
.row-total td { background: var(--surface-2); }
.field[hidden] { display: none; }

.task { display: flex; align-items: flex-start; gap: var(--space-3); }
.task form { margin: 0; }
.task-title { font-weight: 560; }
.task.is-overdue .cell-sub { color: var(--bad); }
.task-check {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: transparent; cursor: pointer;
}
.task-check:hover, .task-check:focus-visible { border-color: var(--good); color: var(--good); }
.task-check .icon { width: 14px; height: 14px; }

.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: var(--space-3); overflow-x: auto; align-items: start; }
.board-col { background: var(--surface-3); border-radius: var(--radius); padding: var(--space-3); display: grid; gap: var(--space-2); align-content: start; min-height: 160px; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px var(--space-1) var(--space-1); }
.board-card { background: var(--surface); border: 1px solid var(--card-line); border-radius: 12px; padding: var(--space-3) 14px; display: grid; gap: var(--space-2); box-shadow: var(--shadow-raised); }
.board-actions { display: flex; gap: 2px var(--space-1); flex-wrap: wrap; align-items: center; }
.board-actions .button-quiet { padding-left: 8px; padding-right: 8px; }
.board-actions form { margin: 0; }
.board-empty { padding: var(--space-2) var(--space-1); margin: 0; }
.board-wide { grid-template-columns: repeat(6, minmax(200px, 1fr)); }
.form-section { font-size: var(--text-sm); font-weight: 650; color: var(--text-2); margin: var(--space-3) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-3); align-items: end; }

.stepper { display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.stack > .stepper { margin-top: var(--space-5); }
.stepper li { flex: 1; text-align: left; padding: 10px 0 0; border-top: 3px solid var(--surface-3); color: var(--text-3); font-size: var(--text-sm); font-weight: 560; counter-increment: step; }
.stepper li::before { content: counter(step) ". "; font-variant-numeric: tabular-nums; }
.stepper li.is-done { border-top-color: var(--good-solid); color: var(--good-ink); }
.stepper li.is-current { border-top-color: var(--accent); color: var(--text); font-weight: 650; }

/* ---------- Desks ---------- */
.form-grid > * { min-width: 0; }
code { overflow-wrap: anywhere; }
.flow { max-width: 760px; margin: 0 auto; padding: var(--space-7) var(--space-5) 64px; }
.flow-head { display: grid; gap: 6px; margin-bottom: var(--space-5); }
.flow-step { display: grid; gap: var(--space-3); padding: var(--space-5) 22px; }
.flow-step + .flow-step { border-top: 1px solid var(--line); }
.flow-step h2 { font-size: var(--text-lg); display: flex; gap: var(--space-3); align-items: baseline; }
.step-number {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); font-size: var(--text-sm); font-weight: 700;
}
.field-options { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.field-option { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 14px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); cursor: pointer; transition: box-shadow var(--fast) var(--ease); }
.field-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--brand-soft); }
.field-option input { margin-top: 3px; accent-color: var(--brand); }
.other-field { display: none; }
.flow:has(input[name="sector_pack"][value="general"]:checked) .other-field { display: grid; }
.country-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-3); }
.country-list .check-grid { margin-bottom: var(--space-3); }
.country-list [hidden] { display: none; }
.country-area { font-size: var(--text-xs); font-weight: 600; color: var(--text-3); margin: 6px 0; }
.desk-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.desk-row:last-child { border-bottom: 0; }
.desk-row.is-archived { opacity: 0.7; }
.law-list { margin: 6px 0 0; padding-left: 18px; }
.desk-summary { display: flex; align-items: center; gap: 14px; }
.desk-mark-lg { width: 44px; height: 44px; border-radius: var(--radius); font-size: var(--text-xl); }

/* Google sign-in button, following Google's branding guidelines. */
.google-button {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 var(--space-3); border-radius: 4px;
  border: 1px solid #747775; background: #ffffff; color: #1f1f1f;
  font: 500 14px/20px Roboto, var(--font); letter-spacing: 0.25px; cursor: pointer;
}
.google-button:hover { background: #f7f8f8; box-shadow: 0 1px 2px rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%); }
.google-button:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; }
.google-button svg { width: 18px; height: 18px; flex: none; }
@media (prefers-color-scheme: dark) {
  .google-button { background: #131314; border-color: #8e918f; color: #e3e3e3; }
  .google-button:hover { background: #1f1f20; }
}
.account { display: grid; gap: 10px; padding: var(--space-4) 18px; }
.account-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.account-uses { margin: 0; padding-left: 18px; color: var(--text-2); font-size: var(--text-sm); }

/* ---------- Meetings ---------- */
.meeting-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.meeting { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--space-3); }
.meeting .icon { grid-row: span 2; margin-top: 2px; color: var(--brand-ink); }
.slot-days { display: grid; gap: var(--space-4); }
.slot-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.slot-grid .button { min-width: 72px; justify-content: center; }

/* ---------- Status: colour, icon and word together ---------- */
.status {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 10px 3px 7px; border-radius: 999px; font-size: var(--text-xs); font-weight: 650; line-height: 18px;
  background: var(--tone-soft); color: var(--tone-ink); box-shadow: inset 0 0 0 1px var(--tone-line);
}
.status .icon { width: 15px; height: 15px; stroke-width: 2; }
.status-urgent, .focus-urgent, .banner-urgent, .light-urgent, .fold-count-urgent, .tone-urgent {
  --tone: var(--urgent); --tone-ink: var(--urgent-ink); --tone-soft: var(--urgent-soft); --tone-line: var(--urgent-line);
  --tone-button: var(--urgent-button); --tone-on: var(--urgent-on);
}
.status-soon, .focus-soon, .banner-soon, .light-soon, .fold-count-soon, .tone-soon {
  --tone: var(--soon); --tone-ink: var(--soon-ink); --tone-soft: var(--soon-soft); --tone-line: var(--soon-line);
  --tone-button: var(--soon-button); --tone-on: var(--soon-on);
}
.status-good, .focus-good, .banner-good, .light-good, .fold-count-good, .tone-good {
  --tone: var(--good-solid); --tone-ink: var(--good-ink); --tone-soft: var(--good-soft); --tone-line: var(--good-line);
  --tone-button: var(--good-button); --tone-on: var(--good-on);
}
.status-info, .focus-info, .banner-info, .fold-count-info, .tone-info {
  --tone: var(--info); --tone-ink: var(--info-ink); --tone-soft: var(--info-soft); --tone-line: var(--info-line);
  --tone-button: var(--info-button); --tone-on: var(--info-on);
}
.status-market, .focus-market, .banner-market, .fold-count-market, .tone-market {
  --tone: var(--market); --tone-ink: var(--market-ink); --tone-soft: var(--market-soft); --tone-line: var(--market-line);
  --tone-button: var(--market-button); --tone-on: var(--market-on);
}

/* Alert banners: a coloured strip with the tone's icon, one line and one action. */
.banner {
  display: flex; align-items: center; gap: var(--space-4); padding: 14px var(--space-4) 14px 14px;
  border-radius: var(--radius); background: var(--tone-soft); box-shadow: inset 0 0 0 1px var(--tone-line);
  color: var(--text);
}
.main > .banner { margin-bottom: var(--space-4); }
.banner-icon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--tone-button); color: var(--tone-on); }
.banner-icon .icon { width: 21px; height: 21px; stroke-width: 1.9; }
.banner-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.banner-label { font-size: var(--text-xs); font-weight: 700; color: var(--tone-ink); }
.banner-text strong { font-weight: 650; }
.banner-body { font-size: var(--text-sm); color: var(--text-2); }
.banner-action { flex: none; }
.banner-action form { margin: 0; }

/* "More" menu for secondary actions. */
.menu { position: relative; }
.menu > summary { list-style: none; color: var(--text); }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { margin-bottom: 0; background: var(--surface-2); }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 280px; padding: 6px;
  display: grid; gap: 2px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg);
  animation: pop 0.16s var(--ease);
}
.menu-list > a, .menu-list > form > button, .menu-list > button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-weight: 520; text-align: left; cursor: pointer; white-space: nowrap;
}
.menu-list > a:hover, .menu-list > form > button:hover, .menu-list > button:hover { background: var(--surface-2); text-decoration: none; }
.menu-list .icon { color: var(--text-2); }
.menu-list form { margin: 0; }
.menu-list .is-danger { color: var(--urgent-ink); }
.menu-list .is-danger .icon { color: inherit; }

/* First-visit hint card. */
.hint-card {
  display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6);
  padding: 14px 14px 14px var(--space-4); border-radius: var(--radius);
  background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info-line);
}
.hint-icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); color: var(--info-ink); }
.hint-text { flex: 1; min-width: 0; color: var(--text-2); }
.hint-text strong { color: var(--text); font-weight: 650; }
.hint-card form { margin: 0; flex: none; }

/* Folded sections ("More for today"). */
.fold {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: clip;
}
.fold + .fold { margin-top: 10px; }
.fold > summary {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px var(--space-5);
  list-style: none; color: var(--text); font-weight: 650; font-size: var(--text-lg);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { margin-bottom: 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 5%, var(--surface)), var(--surface)); }
.fold > summary:hover { background: var(--surface-2); }
.fold-icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); color: var(--text-3); }
.fold.has-items .fold-icon { background: var(--tone-soft); color: var(--tone-ink); box-shadow: inset 0 0 0 1px var(--tone-line); }
.fold-title { flex: 1 1 auto; min-width: 0; }
.fold-note { font-size: var(--text-sm); font-weight: 450; color: var(--text-3); text-align: right; }
.fold-count {
  min-width: 34px; padding: 2px 10px; border-radius: 999px; text-align: center; font-size: var(--text-sm); font-weight: 700;
  font-variant-numeric: tabular-nums; background: var(--surface-2); color: var(--text-3);
}
[class*="fold-count-"] { background: var(--tone-button); color: var(--tone-on); }
.fold-chevron { color: var(--text-3); transition: transform var(--fast) var(--ease); }
.fold[open] .fold-chevron { transform: rotate(180deg); }
.fold-body { animation: arrive 0.2s var(--ease); }
.fold-pad { padding: var(--space-5) var(--space-5); }
.fold-foot { margin: 0; padding: var(--space-3) var(--space-5) var(--space-4); border-top: 1px solid var(--line); }
.fold-lead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.fold-lead p { margin: 0; max-width: 52ch; }
.fold-sub { font-size: var(--text-base); font-weight: 680; }
.fold .call-list .call:first-child { border-top: 0; }
.fold .call { padding-left: var(--space-5); padding-right: var(--space-5); }
.ownership-who { margin-top: var(--space-2); }

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-row { display: flex; align-items: center; gap: var(--space-4); padding: 14px var(--space-5); border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .row { margin-top: 4px; }
.alert-list-flush .alert-row { padding-left: 0; padding-right: 0; }

/* ---------- Today ---------- */
.today-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap;
  margin: -8px -8px var(--space-6); padding: 28px 28px 26px; border-radius: 26px; background: var(--daylight);
}
.today-date { margin: 0 0 6px; font-size: var(--text-lg); font-weight: 600; color: var(--text-2); }
.today-hello h1 { font-size: 40px; letter-spacing: -0.035em; }
.lights { display: flex; gap: 10px; flex-wrap: wrap; }
.light {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  min-width: 132px; padding: 12px 18px 12px 12px; border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--tone-line), var(--shadow);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.light:hover { text-decoration: none; transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--tone), var(--shadow); }
.light-dot { grid-row: span 2; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--tone); color: #fff; box-shadow: 0 0 0 5px var(--tone-soft); }
.light-soon .light-dot { color: var(--soon-on); }
.light-dot .icon { width: 22px; height: 22px; stroke-width: 2; }
.light-num { font-family: var(--font-display); font-size: 26px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.light-word { font-size: var(--text-sm); font-weight: 600; color: var(--tone-ink); }
.light.is-zero { box-shadow: inset 0 0 0 1px var(--line); }
.light.is-zero .light-dot { background: var(--surface-3); color: var(--text-3); box-shadow: none; }
.light.is-zero .light-word { color: var(--text-3); }

.focus-heading, .more-heading { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.02em; margin-bottom: var(--space-4); }
.focus-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.focus-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-5);
  padding: 22px var(--space-6) 22px 22px; border-radius: 22px; overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 1px var(--card-line), var(--shadow);
}
.focus-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--tone); }
.focus-step {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-2); font-size: var(--text-lg); font-weight: 750; font-variant-numeric: tabular-nums;
}
.focus-text { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.focus-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; text-wrap: pretty; }
.focus-why { margin: 0; color: var(--text-2); max-width: 62ch; }
.focus-button {
  min-height: 52px; padding: 0 26px; border-radius: 15px; font-size: 17px; font-weight: 700; border: 0;
  background: var(--tone-button); color: var(--tone-on);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 6px 16px -8px var(--tone-button);
}
.focus-button:hover { background: color-mix(in oklab, var(--tone-button) 88%, black); }
.focus-card.is-first {
  padding: 34px 36px 34px 32px; gap: var(--space-6);
  background: linear-gradient(110deg, var(--tone-soft), var(--surface) 62%);
  box-shadow: 0 0 0 1px var(--tone-line), 0 22px 44px -26px color-mix(in oklab, var(--tone) 55%, transparent), var(--shadow);
}
.focus-card.is-first::before { width: 8px; }
.focus-card.is-first .focus-step { width: 56px; height: 56px; font-size: 24px; background: var(--tone-button); color: var(--tone-on); box-shadow: 0 0 0 6px color-mix(in oklab, var(--tone) 18%, transparent); }
.focus-card.is-first .focus-title { font-size: 28px; letter-spacing: -0.025em; }
.focus-card.is-first .focus-why { font-size: var(--text-lg); }
.focus-card.is-first .focus-button { min-height: 60px; padding: 0 34px; font-size: 19px; border-radius: 17px; }
/* The one orchestrated moment: the three cards settle in, in order, when Today opens. */
.focus-card { animation: settle 0.5s var(--ease) both; }
.focus-card:nth-child(2) { animation-delay: 0.07s; }
.focus-card:nth-child(3) { animation-delay: 0.14s; }
@keyframes settle { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.more { margin-top: 56px; }
.more-heading { margin-bottom: 2px; }
.more-lede { margin-bottom: var(--space-4); }

/* ---------- Colour guide ---------- */
.tone-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tone-card { padding: var(--space-5); border-radius: var(--radius); background: var(--tone-soft); box-shadow: inset 0 0 0 1px var(--tone-line); display: grid; gap: var(--space-3); align-content: start; }
.tone-swatch { width: 44px; height: 44px; border-radius: 14px; background: var(--tone-button); color: var(--tone-on); display: inline-grid; place-items: center; }
.tone-swatch .icon { width: 22px; height: 22px; }
.tone-card p { margin: 0; color: var(--text); }
.tone-card .status { justify-self: start; }
.example-row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.example-row + .example-row { margin-top: var(--space-4); }
.example-row > h3 { width: 100%; font-size: var(--text-sm); color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-card, .focus-card.is-first { grid-template-columns: auto minmax(0, 1fr); }
  .focus-button { grid-column: 2; justify-self: start; }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .main { padding: var(--space-7) var(--space-6) 56px; }
}
/* Phones and small tablets: a slim top bar; the sidebar slides in as a drawer. */
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .mobile-bar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3); min-height: 56px;
    background: color-mix(in oklab, var(--bg) 84%, transparent); backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-desk { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: var(--space-2); font-weight: 650; }
  .mobile-desk .desk-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }
  .icon-button { width: 44px; height: 44px; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 45; width: min(304px, 86vw); height: 100%;
    border-right: 0; box-shadow: var(--shadow-lg);
    transform: translateX(-104%); visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
  }
  .sidebar:target, .sidebar.is-open { transform: none; visibility: visible; transition: transform 0.28s var(--ease); }
  .sidebar .sidebar-close { display: inline-grid; margin: -6px -6px -6px 0; }
  .search-trigger .kbd { display: none; }
  .sidebar:target ~ .sidebar-scrim, .sidebar.is-open ~ .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: var(--scrim); }
  .nav-item { min-height: 44px; }
  .main { padding: var(--space-5) var(--space-4) var(--space-8); }
  .grid-2, .grid-3, .form-grid, .slideover .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .page-head { flex-direction: column; align-items: stretch; gap: var(--space-4); margin-bottom: var(--space-6); }
  .page-actions .button-primary { flex: 1 1 auto; }
  h1 { font-size: 27px; }
  .card-head, .card-body, .card-pad, .call, .slideover-head, .slideover-body, .slideover-foot { padding-left: var(--space-4); padding-right: var(--space-4); }
  .table th:first-child, .table td:first-child { padding-left: var(--space-4); }
  .table th:last-child, .table td:last-child { padding-right: var(--space-4); }
  .slideover { inset: auto 0 0 0; width: 100vw; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .slideover[open] { animation: rise 0.3s var(--ease); }
  .finder { top: var(--space-3); max-height: calc(100vh - 24px); }
  .call-head { flex-wrap: wrap; }
  .call-dial { text-align: left; width: 100%; }
  .call-dial .button { width: 100%; justify-content: center; }
  .alert-actions { justify-content: flex-start; }
  .match-people .row-between { flex-wrap: wrap; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: var(--space-2); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .stepper { flex-wrap: wrap; }
  .stepper li { flex: 1 1 40%; }
  .task { flex-wrap: wrap; }
  .today-head { margin: 0 0 var(--space-5); padding: var(--space-5) var(--space-4); border-radius: 20px; }
  .today-hello h1 { font-size: 30px; }
  .lights { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .light { min-width: 0; grid-template-columns: auto; grid-template-rows: auto; justify-items: center; text-align: center; padding: 12px 6px; row-gap: 4px; }
  .light-dot { grid-row: auto; width: 34px; height: 34px; box-shadow: 0 0 0 4px var(--tone-soft); }
  .light-dot .icon { width: 18px; height: 18px; }
  .light-num { font-size: 22px; }
  .light-word { font-size: var(--text-xs); }
  .focus-card, .focus-card.is-first { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: 22px 20px 20px 24px; }
  .focus-step { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; font-size: var(--text-base); }
  .focus-card.is-first .focus-step { width: 40px; height: 40px; font-size: 18px; }
  .focus-text { padding-right: 44px; }
  .focus-card.is-first .focus-title { font-size: 24px; }
  .focus-title { font-size: 19px; }
  .focus-button, .focus-card.is-first .focus-button { grid-column: auto; justify-self: stretch; width: 100%; }
  .fold > summary { padding: 10px var(--space-4); gap: var(--space-3); font-size: var(--text-base); }
  .fold-note { display: none; }
  .fold-pad, .alert-row, .fold-foot, .fold .call { padding-left: var(--space-4); padding-right: var(--space-4); }
  .alert-row { flex-wrap: wrap; }
  .hint-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); }
  .hint-card form { grid-column: 2; }
  .banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); }
  .banner-action { grid-column: 2; }
  .menu-word { display: none; }
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .card.stat { padding: var(--space-3) var(--space-4); }
  .stat-value { font-size: 26px; }
  .toolbar input[type="search"], .toolbar select { max-width: none; width: 100%; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Outreach set-up and writing style */
.input-narrow { max-width: 7rem; }
.lead { font-size: var(--text-lg); line-height: 1.5; margin: 0; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.checklist li { display: flex; gap: var(--space-2); align-items: flex-start; }
.checklist li .icon { flex: none; margin-top: 2px; }
.checklist li.is-ok .icon { color: var(--good); }
.checklist li.is-todo .icon { color: var(--warn); }
.checklist li a { margin-left: auto; white-space: nowrap; }
.stepper li a { color: inherit; }

/* ---------- Find leads ---------- */
.sentence > .field > span:first-child, .sentence legend { font-weight: 600; color: var(--text); }
.lead-result .reasons { margin-top: var(--space-2); }
.lead-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); align-items: center; }
.lead-actions form { display: contents; }
.button-lg { min-height: 44px; padding: 0 var(--space-5); font-size: var(--text-base); gap: var(--space-2); }
.script-part { display: grid; gap: var(--space-2); }
.script-part h3 { margin: 0; font-size: var(--text-base); }
.likelihood { font-size: var(--text-2xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.factor-points { font-variant-numeric: tabular-nums; white-space: nowrap; }
.factor-points.is-down { color: var(--bad); }
.factor-points.is-up { color: var(--good); }
.lesson-body { max-width: 68ch; display: grid; gap: var(--space-3); }
.lesson-body p, .lesson-body ul { margin: 0; }
.lesson-body h2 { margin: var(--space-3) 0 0; font-size: var(--text-lg); }
.chat { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.chat li { max-width: 80%; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--surface-2); }
.chat li.is-me { justify-self: end; background: var(--brand-soft); }
.chat .who { display: block; font-size: var(--text-xs); color: var(--text-3); margin-bottom: 2px; }
@media (max-width: 640px) { .chat li { max-width: 100%; } .lead-actions .button-lg { flex: 1 1 100%; justify-content: center; } }

/* ---------- Market watch ---------- */
.prediction-score { display: grid; gap: 2px; justify-items: end; text-align: right; }
.reasons .follows { display: block; color: var(--text-3); font-size: var(--text-xs); }
.rule-head { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; justify-content: space-between; }

/* ---------- Public job pages ---------- */
/* These pages belong to the agency, so they take its colour (/theme/<hex>.css
   sets --brand) rather than the Lottka navy and amber. */
.public {
  background: var(--bg);
  --accent: color-mix(in oklab, var(--brand) 78%, black);
  --accent-hover: color-mix(in oklab, var(--brand) 66%, black);
  --on-accent: #ffffff;
  --brand-ink: color-mix(in oklab, var(--brand) 72%, black);
  --brand-soft: color-mix(in oklab, var(--brand) 9%, white);
  --brand-line: color-mix(in oklab, var(--brand) 30%, white);
  --highlight: var(--brand);
  --focus: var(--accent);
}
@media (prefers-color-scheme: dark) {
  .public {
    --accent: color-mix(in oklab, var(--brand) 82%, black);
    --accent-hover: color-mix(in oklab, var(--brand) 70%, black);
    --brand-ink: color-mix(in oklab, var(--brand) 60%, white);
    --brand-soft: color-mix(in oklab, var(--brand) 18%, #172331);
    --brand-line: color-mix(in oklab, var(--brand) 42%, #172331);
    --focus: var(--brand-ink);
  }
}
.powered-by { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.powered-by .logo-mark { width: 22px; height: 22px; border-radius: 6px; }
.powered-by:hover { color: var(--text-2); }
.public-wrap { width: min(760px, 100%); margin: 0 auto; padding: 0 var(--space-5); }
.public-head { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); padding: var(--space-3) 0; }
.public-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); text-decoration: none; }
.public-brand:hover { text-decoration: none; }
.public-main { padding-top: 40px; padding-bottom: var(--space-8); display: grid; gap: var(--space-5); }
.public-main h1 { font-size: 36px; margin: 0; }
.public-intro { margin: 0; max-width: 64ch; font-size: var(--text-lg); color: var(--text-2); }
.public-foot { padding-bottom: var(--space-7); }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.job-item { padding: var(--space-5) var(--space-6); display: grid; gap: var(--space-2); transition: box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.job-item:hover { border-color: var(--brand-line); }
.job-item h2 { margin: 0; font-size: 19px; letter-spacing: -0.015em; }
.job-item p { margin: 0; }
.job-ad { display: grid; gap: var(--space-6); }
.job-description { max-width: 66ch; font-size: 16px; line-height: 1.65; }
.privacy-notice { padding: var(--space-4) var(--space-5); border-radius: var(--radius); background: var(--surface-2); }
.privacy-notice h2 { font-size: var(--text-base); margin: 0 0 var(--space-2); }
.privacy-notice p { margin: 0 0 var(--space-2); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .job-item { padding: var(--space-4); } .public-main h1 { font-size: 28px; } .public-main { padding-top: var(--space-6); } }

/* ---------- Job ads and the browser extension ---------- */
.plain-list { list-style: none; margin: 0; padding: 0; }
.steps { margin: 0 0 var(--space-5); padding-left: var(--space-5); display: grid; gap: var(--space-2); }
.mono { font-family: var(--mono); }

/* ---------- Meeting notes ---------- */
.prose p { margin: 0 0 var(--space-3); max-width: 70ch; }
.prose p:last-child { margin-bottom: 0; }
.transcript { margin: var(--space-3) 0 0; max-height: 28rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: var(--text-sm); background: var(--surface-2); padding: var(--space-3); border-radius: var(--radius-sm); }
.metric-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-4); }
.metric-tile { padding: var(--space-4); }
.metric-tile .num { font-size: var(--text-2xl); font-weight: 600; display: block; }

/* ---------- Sign-in and security ---------- */
.disclosure { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.disclosure > summary { cursor: pointer; font-weight: 600; color: var(--text); }
.disclosure[open] > summary { margin-bottom: var(--space-3); }
.qr-setup { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; }
.qr { border-radius: var(--radius-sm); overflow: hidden; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
.setup-key, .recovery-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2) var(--space-4); margin: 0; padding-left: 1.4em; }
.device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.device { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.device:last-child { border-bottom: 0; }
.device-icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); color: var(--text-3); }
.device form { margin: 0; flex: none; }
.auth-note { margin-top: var(--space-4); }

/* ---------- Drop areas for file uploads ---------- */
.dropzone { position: relative; display: grid; gap: 6px; }
.dropzone-input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  /* Only the box takes the drop or click, not the hint and status lines under it. */
  max-height: var(--dropzone-height, 132px);
}
.dropzone-face {
  display: grid; place-items: center; gap: 4px; min-height: var(--dropzone-height, 132px);
  padding: var(--space-4); border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text-2); text-align: center;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.dropzone-face svg { width: 28px; height: 28px; color: var(--text-3); }
.dropzone-label { color: var(--text); }
.dropzone-link { color: var(--brand-ink); text-decoration: underline; font-weight: 600; }
.dropzone:hover .dropzone-face, .dropzone.is-over .dropzone-face { border-color: var(--brand); background: color-mix(in oklab, var(--brand) 7%, var(--surface)); }
.dropzone-input:focus-visible + .dropzone-face { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone.has-file .dropzone-face { border-style: solid; border-color: var(--good-line); }
.dropzone-hint { margin: 0; font-size: var(--text-sm); color: var(--text-3); }

/* Bring your data in: one big target, matched fields marked, a goose when it's done. */
.move-in { --dropzone-height: 200px; }
.move-in .dropzone-label { font-size: var(--text-lg, 1.125rem); }
.move-in details ol { margin: var(--space-2) 0; padding-left: 1.25rem; display: grid; gap: 4px; }
.kind-check { align-items: end; gap: var(--space-3); }
.field-inline { display: flex; align-items: center; gap: var(--space-2); }
.field-inline > span { white-space: nowrap; font-weight: 600; }
.field.is-matched select { border-color: var(--good-line); }
.keep-columns { border-top: 1px solid var(--line); }
.import-done { justify-items: center; text-align: center; }
.import-done .row { justify-content: center; }
.import-done .goose { margin-bottom: var(--space-2); }
.more-fields summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.more-fields[open] summary { margin-bottom: var(--space-2); }
.table td form.inline { margin: 0; display: inline; }
.dropzone-status { margin: 0; font-size: var(--text-sm); font-weight: 600; min-height: 1.2em; }
.dropzone-status.is-error { color: var(--bad-ink); }
body.is-dragging-file .dropzone[data-page-drop] .dropzone-face { border-color: var(--brand); }

/* ---------- Billing and platform ---------- */
.flow-wide { max-width: 1180px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
a.card.stat { color: inherit; text-decoration: none; }
a.card.stat:hover { border-color: var(--brand); }
.support-banner { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px var(--space-4); margin-bottom: var(--space-4); border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); border: 1px solid var(--warn-line); }
.support-banner form { margin: 0; }
.where-unknown { color: var(--warn-ink); }

/* ---------- Candidate rating: a goose growing up ---------- */
.rating { display: grid; gap: var(--space-2); }
.geese-input { display: flex; gap: 4px; align-items: flex-end; border: 0; padding: 0; margin: 0; }
.rating-legend { font-weight: 600; margin-bottom: var(--space-2); padding: 0; }
.geese-input label { cursor: pointer; border-radius: 8px; padding: 2px; opacity: 0.35; transition: opacity 0.12s var(--ease), transform 0.12s var(--ease); }
.geese-input label:hover { opacity: 0.85; transform: translateY(-2px); }
.geese-input input:checked + label { opacity: 1; background: var(--highlight-soft); }
.geese-input input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 1px; }
.goose-level { width: 34px; height: 34px; display: block; }
.rating-compact .goose-level { width: 22px; height: 22px; }
.rating-compact .geese-input { gap: 1px; }
.rating-shown { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; font-size: var(--text-sm); color: var(--text-2); }
.rating-shown .goose-level { width: 22px; height: 22px; }
.rating-note input { width: 100%; }
.rating-history ul { margin: var(--space-2) 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }

/* ---------- Ask Lottka ---------- */
.ask-bar { display: flex; gap: var(--space-2); align-items: center; padding: 6px 6px 6px 8px; margin-bottom: var(--space-5); background: var(--surface); border: 1px solid var(--card-line); border-radius: 14px; box-shadow: var(--shadow); }
.ask-bar input[type="text"] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 4px; font-size: var(--text-base); }
.ask-bar input[type="text"]:focus { outline: none; }
.ask-bar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus) 35%, transparent); }
.ask-goose { width: 30px; height: 30px; border-radius: 8px; }
.asked-note { display: flex; gap: var(--space-3); align-items: center; padding: 10px var(--space-4); border-radius: var(--radius-sm); background: var(--highlight-soft); color: var(--text); }
.link-box { width: 100%; font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--text-sm, 13px); }
.login-card { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); margin: 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2, var(--surface)); }
.login-card dt { color: var(--text-2); }
.login-card dd { margin: 0; font-family: var(--font-mono, ui-monospace, monospace); word-break: break-all; }

/* Today: where the money is. The amount leads each row, so the eye lands on it. */
.money { margin: var(--space-5) 0; }
.money-total { font-weight: 650; color: var(--good-ink); }
.money-list { list-style: none; margin: 0; padding: 0; }
.money-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-6); border-top: 1px solid var(--line); }
.money-value { flex: none; min-width: 7.5rem; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--good-ink); }
.money-value.is-unknown { color: var(--text-3); font-weight: 500; }
.money-chase .money-value, .money-invoice .money-value { color: var(--brand-ink); }
.money-row p { margin: 2px 0 0; }
@media (max-width: 640px) {
  .money-row { flex-wrap: wrap; padding: var(--space-3) var(--space-4); gap: var(--space-1) var(--space-3); }
  .money-value { min-width: 0; flex-basis: 100%; }
  .money-value.is-unknown { display: none; }
  .money-row .grow { flex: 1 1 100%; }
  .money-row .button { margin-top: var(--space-1); }
}
/* What's in your data: three big numbers, then the lists behind them. */
.findings-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.finding-tile { display: grid; gap: 2px; padding: var(--space-5); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; }
.finding-tile:hover { box-shadow: inset 0 0 0 1px var(--brand); }
.finding-number { font-size: 2.25rem; font-weight: 750; line-height: 1.1; color: var(--good-ink); font-variant-numeric: tabular-nums; }
.finding-card { margin-bottom: var(--space-4); }
/* Introductions: possible fees stand out; the case file reads like a document. */
.fee-alert { box-shadow: inset 4px 0 0 var(--soon-ink, #b45309), inset 0 0 0 1px var(--line); margin-bottom: var(--space-5); }
.case-summary, .case-section { margin-bottom: var(--space-4); }
.case-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3) var(--space-5); margin: 0; }
.case-facts dt { font-size: var(--text-sm); color: var(--text-3); }
.case-facts dd { margin: 2px 0 0; font-weight: 600; }
.case-decide { flex-wrap: wrap; gap: var(--space-2); border-top: 1px solid var(--line); }
.case-email + .case-email { border-top: 1px solid var(--line); }
.case-body { white-space: pre-wrap; font: inherit; margin: 0; padding: var(--space-3) var(--space-4); background: var(--surface-2); border-radius: var(--radius); }
@media print {
  .sidebar, .app-sidebar, .ask-bar, .page-actions, .case-decide, .mobile-bar, .flash { display: none !important; }
  .case-section, .case-summary { break-inside: avoid; box-shadow: none; }
}
/* Copy-paste setup snippets (Connect your AI assistant). */
.code-block { margin: 0; padding: var(--space-3) var(--space-4); background: var(--surface-2); border-radius: var(--radius); font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--text-sm); white-space: pre-wrap; word-break: break-all; user-select: all; }

/* Quick wins: a list of one-click openings, the best first. */
.wins-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.win { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); }
.win-body { flex: 1 1 auto; min-width: 0; }
.win-kind { font-size: var(--text-sm); font-weight: 650; color: var(--good-ink); }
.win-title { margin: 2px 0; font-size: var(--text-lg, 1.125rem); }
@media (max-width: 640px) { .win { flex-wrap: wrap; } .win .button { width: 100%; justify-content: center; } }

/* Language switch: EN | PL in the sidebar, the full names on sign-in pages. */
.lang-switch { display: flex; gap: 4px; padding: 0 var(--space-3) var(--space-2); }
.lang-switch a { font-size: var(--text-sm); font-weight: 600; color: var(--text-3); text-decoration: none; padding: 2px 8px; border-radius: 999px; }
.lang-switch a[aria-current] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.auth-lang { justify-content: center; padding: 0 0 var(--space-3); }
