/* ══════════════════════════════════════════════════════════════════════════
   LYFTBRIDGE DESIGN SYSTEM — LearnForge build
   Upstream: "Admin - Lyftbridge Brand Assets/Design System/design-kit/"
   (the refined kit shipped on bianc.ai — light+dark, --surface/--fill split).
   Parts: (1) kit global.css VERBATIM, (2) kit ThemeToggle.css VERBATIM,
   (3) LearnForge app/responsive base. Change tokens upstream first, then
   re-sync here. docs/DESIGN_SYSTEM.md is the adoption guide.
   ══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   Bianc.ai — Design System (global.css)
   Source of truth. Sections 1–4 lifted verbatim from the Lyftbridge / Bianc.ai
   design system ("Bianc.ai Design System.html", sections 1–4). Section 5
   (gallery chrome) and 6 (paged-doc overrides) are intentionally NOT included.

   During the screen-by-screen rebrand, a clearly-marked LEGACY COMPAT SHIM at
   the bottom preserves the old dark-theme tokens so screens not yet migrated
   keep rendering exactly as before. It is removed once every screen is on the
   new system.
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Fonts ─────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════════════════════════════════════
   1–4 · DESIGN SYSTEM (verbatim)
   ══════════════════════════════════════════════════════════════════════════ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* palette */
  --primary:        #296CAC;
  --ink:            #191919;
  --accent:         #CFFF69;
  --coral:          #FF6B4A;
  --paper:          #F7FBFF;
  --mist:           #DCE8F4;
  --blue-deep:      #14729B;
  --blue-mid:       #5D86AD;
  --blue-soft:      #93B1D4;
  --white:          #FFFFFF;   /* literal white — on-color text (stays in both themes) */
  --surface:        #FFFFFF;   /* raised surface: cards, inputs, chat, composer (flips in dark) */
  --fill:           #191919;   /* high-contrast button/active fill (dark in both themes; white text) */

  /* text + line */
  --text:           rgba(25, 25, 25, .68);
  --border:         rgba(25, 25, 25, .16);
  color-scheme:     light;

  /* geometry */
  --radius:         8px;
  --gutter:         clamp(18px, 4vw, 64px);
  --max:            1220px;
  --section-pad:    clamp(56px, 8vw, 112px);
  --cut:            clamp(72px, 10vw, 92px);
  --lift:           translateY(-2px);

  /* type — family + weights */
  --font:           'Inter', Arial, Helvetica, sans-serif;
  --w-black:        900;
  --w-lead:         750;
  --w-body:         680;

  /* type — editorial scale */
  --fs-display:     clamp(42px, 7vw, 92px);
  --fs-h1:          clamp(38px, 5vw, 76px);
  --fs-h2:          clamp(22px, 3vw, 36px);
  --fs-eyebrow:     14px;
  --fs-lead:        clamp(18px, 2vw, 22px);
  --fs-body:        17px;
  --lh-tight:       .93;

  /* type — functional app scale */
  --fs-app-title:   22px;
  --fs-app-heading: 17px;
  --fs-app-body:    15px;
  --fs-app-label:   13px;
  --fs-app-micro:   11px;
  --lh-app:         1.45;

  /* spacing */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* motion + elevation */
  --ease:           180ms cubic-bezier(.2, .6, .2, 1);
  --shadow-sm:      0 1px 2px rgba(25, 25, 25, .06);
  --shadow-md:      0 2px 10px rgba(25, 25, 25, .07);

  /* signature diagonal texture */
  --diagonal-light: repeating-linear-gradient(135deg, rgba(25,25,25,.05) 0 1px, transparent 1px 14px);
  --diagonal-dark:  repeating-linear-gradient(172deg, rgba(255,255,255,.14) 0 2px, transparent 2px 34px);
}

/* ══════════════════════════════════════════════════════════════════════════
   DARK THEME. Follows the OS setting by default; the in-app toggle stamps
   data-theme="light" | "dark" on <html>, which always wins. Only SEMANTIC
   tokens flip — fixed brand colours (accent lime, coral, literal --white for
   on-colour text) stay put.
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #0F1319;
    --surface:   #191F27;
    --mist:      #262E38;
    --ink:       #EAF0F6;
    --text:      rgba(234, 240, 246, .70);
    --border:    rgba(255, 255, 255, .13);
    --primary:   #4C8FCB;
    --blue-deep: #7FB2DE;
    --fill:      #333B45;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .40);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .50);
    --diagonal-light: repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 14px);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:     #0F1319;
  --surface:   #191F27;
  --mist:      #262E38;
  --ink:       #EAF0F6;
  --text:      rgba(234, 240, 246, .70);
  --border:    rgba(255, 255, 255, .13);
  --primary:   #4C8FCB;
  --blue-deep: #7FB2DE;
  --fill:      #333B45;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .40);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .50);
  --diagonal-light: repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 14px);
  color-scheme: dark;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--w-body);
  line-height: 1.45;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6, p, figure, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--blue-deep); }

/* ---------- 3. TYPE SCALES ---------- */

/* 3a. EDITORIAL — marketing hub, hero, long-form. Loud, tight, black weight. */
.t-display {
  font-size: var(--fs-display); font-weight: var(--w-black);
  line-height: var(--lh-tight); letter-spacing: -.02em; color: var(--ink);
}
.t-h1 {
  font-size: var(--fs-h1); font-weight: var(--w-black);
  line-height: var(--lh-tight); letter-spacing: -.015em; color: var(--ink);
}
.t-h2 {
  font-size: var(--fs-h2); font-weight: var(--w-black);
  line-height: 1.02; letter-spacing: -.01em; color: var(--ink);
}
.t-lead   { font-size: var(--fs-lead); font-weight: var(--w-lead); line-height: 1.35; color: var(--text); }
.t-body   { font-size: var(--fs-body); font-weight: var(--w-body); line-height: 1.5; color: var(--text); }
.eyebrow  {
  font-size: var(--fs-eyebrow); font-weight: var(--w-black);
  text-transform: uppercase; letter-spacing: .02em; color: var(--primary);
}
.eyebrow--lime  { color: var(--accent); }
.eyebrow--coral { color: var(--coral); }

/* 3b. FUNCTIONAL — chat, settings, dense product UI. Quieter, tighter, readable. */
.app-title   { font-size: var(--fs-app-title); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.app-heading { font-size: var(--fs-app-heading); font-weight: 800; line-height: 1.3; color: var(--ink); }
.app-body    { font-size: var(--fs-app-body); font-weight: 500; line-height: var(--lh-app); color: var(--text); }
.app-label   { font-size: var(--fs-app-label); font-weight: 700; line-height: 1.3; color: var(--ink); }
.app-micro   { font-size: var(--fs-app-micro); font-weight: 700; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }

/* ---------- 4. COMPONENTS ---------- */

/* 4.1 Layout */
.wrap    { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); }
.stack   { display: grid; gap: var(--sp-4); }
.stack--lg { gap: var(--sp-6); }
.row     { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.grid    { display: grid; gap: var(--sp-4); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* 4.2 Signature move — CUT CORNER */
.cut-corner { border-radius: 0 var(--cut) 0 0; overflow: hidden; }
.cut-corner--sm { border-radius: 0 clamp(40px, 5vw, 56px) 0 0; overflow: hidden; }

/* 4.3 Signature move — DIAGONAL TEXTURE */
.diagonal { position: relative; isolation: isolate; }
.diagonal::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: var(--diagonal-light); pointer-events: none;
}
.diagonal--invert::before { background-image: var(--diagonal-dark); }

/* 4.4 Signature move — BLUE INVERT SECTION */
.section--blue {
  background-color: var(--primary); color: var(--white);
  padding-block: var(--section-pad);
}
.section--blue .t-display,
.section--blue .t-h1,
.section--blue .t-h2,
.section--blue .app-title,
.section--blue .app-heading { color: var(--white); }
.section--blue .t-lead,
.section--blue .t-body { color: rgba(255, 255, 255, .82); }
.section--blue .eyebrow { color: var(--accent); }
.section--blue a { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

/* 4.5 Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-3);
  min-height: 52px; padding-inline: var(--sp-5);
  border: 2px solid var(--fill); border-radius: 999px;
  background: var(--fill); color: var(--white);
  font-size: var(--fs-body); font-weight: var(--w-black); text-decoration: none;
  cursor: pointer; transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}
.btn:hover { background: var(--primary); border-color: var(--primary); color: var(--white); transform: var(--lift); }
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.btn--secondary { background: var(--surface); color: var(--ink); }
.btn--secondary:hover { background: var(--surface); color: var(--primary); border-color: var(--primary); transform: var(--lift); }

.btn--outline { background: transparent; border-color: var(--primary); color: var(--primary); min-height: 44px; }
.btn--outline:hover { background: var(--primary); color: var(--white); }

.btn--ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--mist); color: var(--ink); border-color: transparent; transform: none; }

.btn--sm { min-height: 38px; padding-inline: var(--sp-4); font-size: var(--fs-app-label); gap: var(--sp-2); }
.btn--block { width: 100%; }

/* lime chevron chip — the single accent moment on a primary CTA */
.btn__chip {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent); color: #191919;
  font-size: 14px; font-weight: var(--w-black); line-height: 1;
}

/* 4.6 Links */
.link-underline {
  font-weight: var(--w-black); color: var(--primary);
  text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 5px; text-decoration-color: var(--coral);
}
.link-underline:hover { color: var(--blue-deep); }

/* 4.7 Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-5); box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}
.card--hover:hover { transform: var(--lift); box-shadow: var(--shadow-md); }
.card--tint    { background: var(--paper); }
.card--mist    { background: var(--mist); border-color: transparent; }
.card--flush   { padding: 0; overflow: hidden; }
.card--feature { padding: var(--sp-3); }
.card__media {
  aspect-ratio: 4 / 2.65; border-radius: var(--radius);
  background-color: var(--mist); background-image: var(--diagonal-light);
  display: grid; place-items: center;
}
.card__body { padding: var(--sp-5) var(--sp-3) var(--sp-3); display: grid; gap: var(--sp-3); }

/* 4.8 Stats */
.stat { display: grid; gap: var(--sp-1); }
.stat__value { font-size: clamp(38px, 5vw, 56px); font-weight: var(--w-black); line-height: .9; color: var(--primary); letter-spacing: -.02em; }
.stat__label { font-size: var(--fs-app-body); font-weight: 700; color: var(--text); }
.stat-list { display: grid; border-top: 1px solid var(--border); }
.stat-list .stat {
  display: grid; grid-template-columns: minmax(96px, .32fr) 1fr; gap: var(--sp-4);
  align-items: center; padding-block: var(--sp-4); border-bottom: 1px solid var(--border);
}

/* 4.9 Badges + pills */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--paper); color: var(--ink);
  font-size: var(--fs-app-micro); font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.badge--lime  { background: var(--accent); border-color: transparent; color: #191919; }
.badge--blue  { background: var(--primary); border-color: transparent; color: var(--white); }
.badge--coral { background: var(--coral); border-color: transparent; color: var(--white); }

/* 4.10 Form controls */
.field { display: grid; gap: var(--sp-2); }
.field__label { font-size: var(--fs-app-label); font-weight: 800; color: var(--ink); }
.field__hint  { font-size: var(--fs-app-micro); font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); }

.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-size: var(--fs-app-body); font-weight: 600;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #8B95A3; font-weight: 500; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41, 108, 172, .16);
}
.input--lg { min-height: 56px; border-width: 2px; border-color: var(--fill); font-size: var(--fs-body); font-weight: 700; }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: var(--sp-6);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.checkbox { display: flex; gap: var(--sp-3); align-items: flex-start; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--mist); border: 1px solid var(--border); transition: background var(--ease);
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--ease);
}
.switch input:checked + .switch__track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }

/* 4.11 Tabs */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); }
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: var(--sp-3) var(--sp-4); margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: var(--fs-app-label); font-weight: 700; color: var(--text);
  transition: color var(--ease), border-color var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 800; }

/* 4.12 Divider + rule */
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.rule-top { border-top: 1px solid var(--border); padding-top: var(--sp-5); }

/* 4.13 Chat */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: var(--surface); }
.chat__header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); background: var(--paper);
}
.chat__log { display: grid; gap: var(--sp-4); padding: var(--sp-5) var(--sp-4); overflow-y: auto; align-content: start; }
.msg { display: grid; gap: 6px; max-width: 74%; }
.msg__meta { font-size: var(--fs-app-micro); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.msg__bubble {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
  font-size: var(--fs-app-body); font-weight: 500; line-height: var(--lh-app);
}
.msg--assistant .msg__bubble { background: var(--paper); border: 1px solid var(--border); color: var(--ink); border-radius: var(--radius) var(--radius) var(--radius) 2px; }
.msg--user { justify-self: end; text-align: right; }
.msg--user .msg__bubble { background: var(--primary); color: var(--white); border-radius: var(--radius) var(--radius) 2px var(--radius); text-align: left; }
.msg--system { max-width: 100%; justify-items: center; }
.msg--system .msg__bubble { background: transparent; border: 1px dashed var(--border); color: var(--text); font-size: var(--fs-app-label); }

.composer { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4) var(--sp-4); border-top: 1px solid var(--border); background: var(--paper); }
.composer__box { display: flex; align-items: flex-end; gap: var(--sp-2); padding: var(--sp-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.composer__box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41, 108, 172, .14); }
.composer__input { flex: 1; min-height: 38px; max-height: 140px; padding: 8px; border: 0; outline: none; background: none; resize: none; font-size: var(--fs-app-body); font-weight: 500; line-height: var(--lh-app); }
.send {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 0; border-radius: var(--radius); background: var(--fill); color: var(--white);
  font-size: 15px; cursor: pointer; transition: background var(--ease);
}
.send:hover { background: var(--primary); }

/* 4.14 Suggestion chips */
.chip {
  appearance: none; cursor: pointer;
  padding: 7px var(--sp-3); border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: var(--fs-app-label); font-weight: 650;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: var(--lift); }
.chip--active { background: var(--fill); border-color: var(--fill); color: var(--white); }

/* 4.15 Avatar */
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 50%; background: var(--mist); color: var(--primary);
  font-size: var(--fs-app-label); font-weight: 900;
}
.avatar--ink   { background: var(--fill); color: var(--white); }
.avatar--blue  { background: var(--primary); color: var(--white); }

/* 4.16 App shell */
.app-shell { display: grid; grid-template-columns: 216px 1fr; min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.app-nav { display: grid; align-content: start; gap: 2px; padding: var(--sp-4) var(--sp-3); border-right: 1px solid var(--border); background: var(--paper); }
.app-nav__item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 9px var(--sp-3); border-radius: 6px;
  font-size: var(--fs-app-body); font-weight: 650; color: var(--text); cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.app-nav__item:hover { background: var(--mist); color: var(--ink); }
.app-nav__item--active { background: var(--fill); color: var(--white); font-weight: 750; }
.app-nav__group { padding: var(--sp-4) var(--sp-3) var(--sp-2); }

/* 4.17 Progress */
.progress { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.progress__bar { height: 100%; background: var(--primary); border-radius: 999px; }
.progress__bar--lime { background: var(--accent); }

/* 4.18 Table */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-app-body); }
.table th, .table td { text-align: left; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: var(--fs-app-micro); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: var(--paper); }
.table td { font-weight: 550; color: var(--text); }
.table code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; font-weight: 600; color: var(--blue-deep); }

/* ══════════════════════════════════════════════════════════════════════════
   APP BASE
   For a full-screen app that scrolls INTERNALLY (fixed chrome, scrolling panes),
   uncomment the shell block. For a normal scrolling page, leave it commented.
   ══════════════════════════════════════════════════════════════════════════ */
/* html, body, #root { height: 100%; }
   body { overflow: hidden; }
   #root { width: 100vw; } */

button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ---------- Optional entrance keyframes ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes floatY  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse   { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.35); } }


/* ═══ ThemeToggle (kit, verbatim) ═══ */
.theme-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--mist);
  border-radius: 999px;
}
.theme-toggle__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.theme-toggle__btn:hover { color: var(--ink); }
.theme-toggle__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.theme-toggle__label { line-height: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   LEARNFORGE APP + RESPONSIVE BASE (ours, not in the kit)
   ══════════════════════════════════════════════════════════════════════════ */
/* Wide content scrolls in its own container — the page never scrolls sideways. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Touch ergonomics on coarse pointers. */
@media (pointer: coarse) {
  .btn--sm, .input, .select, .tab, .app-nav__item, .chip { min-height: 44px; }
}

/* Small screens: shell collapses, nav becomes a horizontal strip (real
   drawers arrive per-surface during migration). */
@media (max-width: 768px) {
  .app-shell { display: block; }
  .app-nav {
    display: flex; flex-direction: row; overflow-x: auto; gap: var(--sp-2);
    border-right: 0; border-bottom: 1px solid var(--border);
    padding: var(--sp-2) var(--sp-3); white-space: nowrap;
  }
  .app-nav__group { display: contents; }
}

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