/* GENERATED by /lab/sfstage/bin/app-ui — do not edit. Sources: front/suite/src/styles/shared/refresh-*.css + front/suite/app-layer/app-refresh.css */
/* =====================================================================================================
   refresh-tokens.css — "Classic 2": the refreshed design tokens.            docs/suite/UI-REFRESH.md §3
   ONE source for BOTH apps: the suite imports it (src/styles/index.css, right after tokens.css) and the
   compiled main app loads it inside /suite/app-ui/app-ui.css (built by /lab/sfstage/bin/app-ui).
   Rules of this file: custom properties ONLY (no selectors that style elements); colour values are scoped
   to the flat look (`:root[data-sf-look=flat]`), never to `:root` alone; nothing here may change the
   paper or soft looks.
   ===================================================================================================== */

/* ── 1. Colour, flat look, light (§3.1). The persona colour stays the app's (inline on <html>). ─────────── */
:root[data-sf-look=flat] {
  --brand-rgb: 79, 70, 229;                       /* B13: comma-separated default before the bundle sets the persona's */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --sidebar-bg: #fbfbfc;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;                       /* "one step darker" border of a hovered control */
  --border-soft: #eceef2;
  --text: #12151c;
  --text-muted: #4b5565;
  --text-faint: #667085;                          /* 4.6 on --bg, 4.5 on --surface-2 (was #697386: 4.46 / 4.33) */
  --bubble-user: rgba(var(--brand-rgb), .10);     /* B4 (was --bg: invisible) */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -8px rgba(16, 24, 40, .14);
  --shadow-lg: 0 4px 10px -2px rgba(16, 24, 40, .08), 0 28px 56px -16px rgba(16, 24, 40, .24);
  --ring: 0 0 0 3px rgba(var(--brand-rgb), .18);
  --overlay: rgba(15, 17, 23, .45);
  --ctl-bg: var(--surface);
  --topbar-bg: rgba(246, 247, 249, .88);          /* --bg at 88 % (phone top bar) */
  --sf-radius-card: 16px;                         /* the suite's --r-card etc. follow these aliases */
  --sf-radius-btn: 10px;
  --sf-radius-ghost: 10px;
  --sf-radius-tab: 10px;
  --sf-radius-input: 10px;
  --sf-radius-area: 12px;
}

/* ── 1b. Colour, flat look, dark. html.dark:root[…] (0,3,1) beats the app's html.dark (0,1,1). ───────── */
html.dark:root[data-sf-look=flat] {
  --bg: #0d1017;
  --surface: #151923;
  --surface-2: #1c212d;                           /* B14: must differ from --bg */
  --sidebar-bg: #10131b;
  --border: #272d3b;
  --border-strong: #363d4e;
  --border-soft: #1f2431;
  --text: #eef0f5;
  --text-muted: #a6aebd;
  --text-faint: #828b9d;                          /* 4.7 on --surface-2 (was #7d8698: 4.40) */
  --bubble-user: rgba(var(--brand-rgb), .24);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .4), 0 28px 64px -16px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(var(--brand-rgb), .32);
  --overlay: rgba(0, 0, 0, .6);
  --topbar-bg: rgba(13, 16, 23, .88);
}

/* ── 2. Status colours for the main app (the suite declares the same names in tokens.css §3; these are
      the same values, declared again for the app, which has none). Look-independent. ─────────────────── */
:root {
  --ok: #16a34a;          --ok-bg: rgba(34, 197, 94, .15);    --ok-border: rgba(34, 197, 94, .4);
  --warn: #f59e0b;        --warn-bg: rgba(245, 158, 11, .12); --warn-border: rgba(245, 158, 11, .4);
  --danger: #dc2626;      --danger-bg: rgba(239, 68, 68, .1); --danger-border: rgba(239, 68, 68, .35);
  --info: #3b82f6;        --info-bg: rgba(59, 130, 246, .15); --info-border: rgba(59, 130, 246, .4);
  --brand-edge: rgba(var(--brand-rgb), .4);
  --hover-bg: color-mix(in srgb, var(--text) 6%, transparent);   /* = the suite's; quiet hover, list rows */
  --press-bg: color-mix(in srgb, var(--text) 11%, transparent);
  --overlay-blur: 6px;
}

/* ── 3. Look-independent scales (§3.2–3.3). Same names as the suite's tokens.css §3, Classic 2 values. ── */
:root {
  /* type */
  --fs-micro: 11px;  --fs-hint: 12px;  --fs-label: 13px;  --fs-sm: 13px;  --fs-ui: 14px;
  --fs-text: 15px;   --fs-base: 15px;  --fs-card-title: 16px;  --fs-dialog-title: 17px;
  --fs-state-title: 20px;  --fs-title: 24px;  --fs-kpi: 30px;
  --fs-input: 15px;                               /* text controls; 16px under a coarse pointer (iOS zoom) */
  --tracking-title: -.02em;  --tracking-caps: .05em;
  /* radius */
  --r-xs: 6px;  --r-sm: 8px;  --r-md: 10px;  --r-lg: 12px;  --r-sheet: 20px;  --r-full: 999px;
  /* controls */
  --ctl-h: 40px;  --ctl-h-sm: 32px;  --ctl-h-lg: 46px;  --icon-btn: 36px;  --tap: 36px;
  /* page */
  --page-x: 32px;  --page-top: 24px;  --page-max: 2400px;  --page-max-form: 760px;  --page-max-chat: 820px;
  /* ONE COLUMN FOR EVERY PAGE (2026-11-19, tarik: "some pages wide, some thin"; then "a huge mismatch of padding between
     the header and the content on desktop"): the page fills the width the header spans, one gutter on each side — the
     header and the content always the same width; only a very wide screen (past --page-max) centres it. A form keeps its
     own reading width inside (--page-max-form), on the same left edge. Used by the header and every page shape. */
  --page-pad-x: max(var(--page-x), calc((100% - var(--page-max)) / 2));
  /* frame */
  --rail-w: 232px;  --rail-mini-w: 64px;  --topbar-h: 52px;
}
@media (min-width: 1440px) { :root { --page-x: 40px; } }
@media (min-width: 1900px) { :root { --page-x: 48px; } }
@media (max-width: 1100px) { :root { --page-x: 20px; } }
@media (max-width: 760px)  { :root { --page-x: 16px; --page-top: 18px; } }
@media (max-width: 380px)  { :root { --page-x: 12px; } }
@media (pointer: coarse)   { :root { --fs-input: 16px; --ctl-h: 44px; --ctl-h-sm: 40px; --tap: 44px; } }

/* ── 4. Layers: the suite's z-index scale, declared for the main app too (same values). ─────────────── */
:root {
  --z-raised: 2;  --z-pop: 40;  --z-drawer-backdrop: 65;  --z-rail: 70;  --z-fab: 80;  --z-overlay: 100;
  --z-float: 1000;  --z-tip: 1100;  --z-toast: 3000;
}
/* =====================================================================================================
   refresh-motion.css — motion tokens, keyframes and the reduced-motion switch.   docs/suite/UI-REFRESH.md §7
   ONE source for BOTH apps (see refresh-tokens.css). Only transform / opacity / colour / shadow animate.
   Every keyframe name starts with `sfm-`. Everything stops under `prefers-reduced-motion: reduce`.
   ===================================================================================================== */

/* ── tokens (look-independent) ─────────────────────────────────────────────────────────────────────── */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --t-fast: 120ms;
  --t: 160ms;
  --t-pop: 200ms;
  --t-panel: 280ms;
  --t-page: 240ms;
  --stagger: 28ms;
}

/* ── keyframes ─────────────────────────────────────────────────────────────────────────────────────── */
@keyframes sfm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sfm-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sfm-pop { from { opacity: 0; transform: scale(.97) translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes sfm-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sfm-slide-in-end { from { opacity: .6; transform: translateX(100%); } to { opacity: 1; transform: none; } }
@keyframes sfm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes sfm-spin { to { transform: rotate(360deg); } }

/* ── reduced motion: every animation and transition of both apps cut to nothing (keep this block last) ── */
@media (prefers-reduced-motion: reduce) {
  :root *, :root *::before, :root *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
/* =====================================================================================================
   refresh-shell.css — the frame both apps share: rail, nav, foot, phone top bar and drawer.
   docs/suite/UI-REFRESH.md §5.  ONE source for BOTH apps: the class names are the compiled app's
   (docs/suite/DESIGN-SYSTEM.md §3.1–3.2) and the suite's AppShell renders the same DOM.
   Every selector starts with `:root` (or `:root[data-sf-look=…]`) so that it ties with the app's scoped
   rules and wins by coming later. No `!important` unless the compiled rule it replaces has one.
   ===================================================================================================== */

/* ── 1. Full rail (≥ 761 px; the full layout is also the phone drawer's) — §5.1 ──────────────────────── */
:root .rail {
  width: var(--rail-w);
  padding: 12px 12px 10px;
  --rail-fade: var(--sf-rail-bg, var(--sidebar-bg));
}
/* brand: logo 36 beside the word-mark, 56 px block (was a 70 px logo) */
:root .rail .brand { height: 56px; padding: 0 2px 0 6px; margin-bottom: 6px; gap: 10px; flex: none; }
:root .rail .brand-logo { width: 36px; height: 36px; }
:root .rail .brand-name { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* actions: primary full width 40 px, then one row of two 36 px secondaries */
/* the two secondary actions share a row when their labels fit, else each takes a full row — never a cut label */
:root .rail .home-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 6px; padding: 0 0 12px; margin-bottom: 8px; flex: none; }
:root .rail .home-actions .ha { flex: 1 1 auto; }
:root .rail .home-actions .ha { min-width: 0; height: 36px; padding: 0 8px; gap: 6px; font-size: 13px; justify-content: center; transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), transform var(--t) var(--ease-out); }
:root .rail .home-actions .ha.primary { flex-basis: 100%; height: 40px; font-size: 14px; }
:root .rail .home-actions .ha:active { transform: scale(.98); }
/* UX 2026-11-17: one split starter — "New chat" + a menu button (AppShell .ha-split) */
:root .rail .home-actions .ha-split { flex: 1 1 100%; display: flex; gap: 1px; position: relative; min-width: 0; }
:root .rail .home-actions .ha-split > .ha.primary:first-child { flex: 1 1 auto; border-radius: 12px 4px 4px 12px; }
:root .rail .home-actions .ha-split > .ha-more { flex: 0 0 40px; padding: 0; border-radius: 4px 12px 12px 4px; }
:root .rail .home-actions .ha > svg { flex: none; width: 16px; height: 16px; }
:root .rail .home-actions .ha > span { min-width: 0; white-space: nowrap; }
/* nav: 38 px items, 18 px icons, a 3 px bar on the active one, group labels 11 caps */
:root .rail .nav { gap: 2px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
:root .rail .nav:hover { scrollbar-color: var(--border) transparent; }
:root .rail .nav::-webkit-scrollbar { width: 6px; }
:root .rail .nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
:root .rail .nav:hover::-webkit-scrollbar-thumb { background: var(--border); }
:root .rail .nav-item { position: relative; min-height: 38px; padding: 9px 12px; gap: 10px; border-radius: 10px; font-size: 14px; line-height: 20px; transition: background-color var(--t-fast) ease, color var(--t-fast) ease; }
:root .rail .nav-item > svg { flex: none; width: 18px; height: 18px; }
:root .rail .nav-group { margin: 20px 0 6px; padding: 0 12px; font-size: 11px; font-weight: 600; letter-spacing: .05em; line-height: 14px; }
:root .rail .nav-group:first-child { margin-top: 0; }
:root .rail .nav-group-chev { transition: transform var(--t) var(--ease-out); }
:root .rail .sub { margin: 2px 0 4px 21px; }
:root .rail .sub > .sub-item:nth-child(n+6) { display: none; }    /* the Subjects page lists them all */
:root .rail .sub-item { min-height: 30px; font-size: 13px; }
/* scroll hint: a fade at the bottom while there is more below (sticky, so it disappears at the end) */
:root .rail .nav::after { content: ""; position: sticky; bottom: 0; flex: none; height: 24px; margin-top: auto; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--rail-fade)); }
/* …and at the top once the list has scrolled (scroll-driven: browsers without it simply show no top fade) */
:root .rail .nav::before { content: ""; position: sticky; top: 0; flex: none; height: 20px; margin-bottom: -20px; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, transparent, var(--rail-fade)); opacity: 0; }
@supports (animation-timeline: scroll()) {
  :root .rail .nav::before { animation: sfm-fade linear both; animation-timeline: scroll(nearest block); animation-range: 0 32px; }
}
/* foot: the user on one row, then theme · language · sign-out on one row */
:root .rail .foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px; padding-top: 8px; flex: none; }
:root .rail .foot > .user { grid-row: 1; grid-column: 1 / -1; padding: 6px; gap: 10px; }
:root .rail .foot > .foot-btn:not(.lang-row) { grid-row: 2; grid-column: 1; }
:root .rail .foot > .lang-row { grid-row: 2; grid-column: 2; }
:root .rail .foot > .logout-row { grid-row: 2; grid-column: 3; }
:root .rail .foot > .foot-btn, :root .rail .foot > .logout-row { height: 36px; padding: 0 10px; gap: 8px; font-size: 13px; border-radius: 10px; }
:root .rail .foot > .foot-btn:not(.lang-row), :root .rail .foot > .logout-row { width: 36px; padding: 0; justify-content: center; }
:root .rail .foot > .lang-row { padding-right: 26px; }
:root .rail .foot > .foot-btn:not(.lang-row) .nav-label, :root .rail .foot > .logout-row .nav-label,
:root .sf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:root .rail .foot .avatar { width: 32px; height: 32px; }
:root .rail .foot .uname { font-size: 14px; }
:root .rail .foot .umail { font-size: 12px; }
:root .rail .lang-sel:focus-visible { outline: 2px solid var(--focus-ring); }    /* the bundle's uses --accent, defined nowhere */

/* flat skin of the frame */
:root[data-sf-look=flat] .rail .nav-item:hover { background: var(--hover-bg); }
:root[data-sf-look=flat] .rail .nav-item.active { background: var(--brand-soft); color: var(--brand-text); }
:root[data-sf-look=flat] .rail .nav-item.active::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--brand); }
:root[data-sf-look=flat] .rail .home-actions .ha:not(.primary) { background: var(--surface); }
:root[data-sf-look=flat] .rail .home-actions .ha:not(.primary):hover { background: var(--surface-2); border-color: var(--border-strong); }
:root[data-sf-look=flat] .rail .home-actions .ha.primary { box-shadow: 0 1px 2px rgba(var(--brand-rgb), .35), inset 0 1px 0 rgba(255, 255, 255, .14); }

/* ── 2. Mini rail (html.sf-rail-mini; set by the script: default 761–1100 px, a toggle above) — §5.2 ─── */
:root .rail .sf-rail-toggle { display: none; }
@media (min-width: 761px) {
  :root .rail .sf-rail-toggle { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; transition: background-color var(--t-fast) ease, color var(--t-fast) ease; }
  :root .rail .sf-rail-toggle:hover { background: var(--hover-bg); color: var(--text); }
  :root .rail .sf-rail-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  :root .rail { transition: width var(--t-pop) var(--ease-out), margin var(--t-pop) var(--ease-out); }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail { width: var(--rail-mini-w); padding: 12px 10px 10px; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .brand { flex-direction: column; height: auto; padding: 0; gap: 6px; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .brand-name,
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .nav-label,
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .nav-count,
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .sub,
  :root.sf-rail-mini:not(.sf-rail-peek) .uinfo,
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .nav-group-chev { display: none; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions { flex-direction: column; align-items: center; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions .ha { flex: none; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions .ha { width: 44px; height: 40px; padding: 0; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions .ha-split { flex: none; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions .ha-split > .ha-more { display: none; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions .ha-split > .ha.primary:first-child { border-radius: 12px; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .home-actions .ha > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .nav-item { justify-content: center; width: 44px; min-height: 44px; padding: 0; margin: 0 auto; }
  /* a group header becomes a divider; its folded items stay reachable */
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .nav-group { height: 1px; margin: 8px 6px; padding: 0; font-size: 0; background: var(--border-soft); pointer-events: none; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .group-items.folded { display: contents; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .foot { grid-template-columns: 1fr; justify-items: center; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .foot > * { grid-column: 1; grid-row: auto; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .foot > .user { padding: 4px; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .foot > .lang-row { width: 36px; padding: 0; justify-content: center; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .foot > .lang-row::after { display: none; }
  :root.sf-rail-mini:not(.sf-rail-peek) .rail .foot .lang-sel { position: absolute; inset: 0; opacity: 0; }   /* the globe opens the select */
  /* peek: the full rail over the page (tablet), keeping its 64 px place in the flow */
  :root.sf-rail-mini.sf-rail-peek .rail { position: relative; z-index: var(--z-rail); margin-inline-end: calc(var(--rail-mini-w) - var(--rail-w)); box-shadow: var(--shadow-lg); }
}

/* ── 3. Phone (≤ 760 px): top bar, the FAB becomes its menu button, the drawer — §5.3, B6, B12 ──────── */
:root .sf-topbar { display: none; }
@media (max-width: 760px) {
  :root .sf-topbar { display: flex; align-items: center; position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-pop); height: var(--topbar-h);
    padding: 0 16px 0 56px; background: var(--topbar-bg, var(--bg)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft); }
  :root .sf-topbar-title { min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.2; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the FAB → menu button only where the shell carries the bar (the app: added by app-ui.js; the suite: rendered) */
  :root .shell:has(> .sf-topbar) > .main { padding-top: var(--topbar-h); }
  :root .shell:has(> .sf-topbar) .nav-fab { top: 6px; left: 8px; right: auto; bottom: auto; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text); box-shadow: none; }
  :root .shell:has(> .sf-topbar) .nav-fab:hover { background: var(--hover-bg); }
  :root .shell:has(> .sf-topbar) .nav-fab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  :root .shell.drawer-open:has(> .sf-topbar) .nav-fab { left: auto; right: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }   /* the close button, on the backdrop */
  :root .rail { width: min(300px, 86vw); }
  :root[data-sf-look] .rail { box-shadow: none; }                                     /* B12: no shadow while closed (beats soft's) */
  :root[data-sf-look] .shell.drawer-open .rail { box-shadow: var(--shadow-lg, 12px 0 40px rgba(0, 0, 0, .25)); }
  :root .drawer-backdrop { background: var(--overlay, rgba(10, 10, 16, .45)); animation: sfm-fade var(--t) ease both; }
}
/* =====================================================================================================
   app-refresh.css — EMPTY ON PURPOSE (UI rehaul 2026-11-19).
   This was the main app's "refresh layer": rules loaded after the bundle that restyled the app's class names
   from outside. Every one of them now lives where it belongs, inside the bundle:
     component families (buttons, fields, tabs, cards, chips, page headers)   front/suite/src/styles/components/*.css (the kit)
     each screen's own rules                                                  that screen's component
     the app's own text controls, checkboxes, radios                          front/web-app/src/assets/controls.css
     the "add a row" line of Todos / a subject's Todos / Roadmap               front/web-app/src/assets/add-row.css
     the motion of a page and of the first items of a list                    front/web-app/src/assets/motion.css
     the page title of screens without the kit's header                       front/web-app/src/assets/main.css
   Do not add a rule here: a rule that restyles a component from outside is a second definition of it.
   The file stays because /lab/sfstage/bin/app-ui assembles app-ui.css from it (with the shared tokens, motion and
   frame of front/suite/src/styles/shared/) and refuses to run without it.
   ===================================================================================================== */
