/* ==========================================================================
   Lernbits – design tokens and components
   Fonts are self-hosted (no Google Fonts: privacy at German schools).
   ========================================================================== */

/* ---- Fonts --------------------------------------------------------------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.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: 400; font-display: swap;
  src: url("../fonts/inter-latin-ext-400-normal.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: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-latin-500-normal.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: 500; font-display: swap;
  src: url("../fonts/inter-latin-ext-500-normal.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: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-600-normal.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: 600; font-display: swap;
  src: url("../fonts/inter-latin-ext-600-normal.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: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/space-grotesk-latin-500-normal.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: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext-500-normal.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: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/space-grotesk-latin-700-normal.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: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext-700-normal.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 {
  --ink:        #16202A;
  --ink-2:      #4A5662;
  --ink-3:      #A7B2BD;
  --on-dark-2:  #C9D2DA;
  --bg:         #F3F5F7;
  --surface:    #FFFFFF;
  --line:       #E3E7EB;
  --line-2:     #EEF1F3;
  --field:      #C4CCD4;
  --primary:    #1F7A63;
  --primary-dk: #165C4A;
  --primary-bg: #E6F2EE;
  --primary-lt: #7FD1B9;
  --focus:      #9FD3C4;
  --accent:     #E8A13A;
  --accent-bg:  #FDF1DE;
  --accent-ink: #7A4705;
  --accent-ic:  #9A5B07;
  --dark-2:     #22303C;
  --dark-line:  #3A4855;
  --danger:     #A3261B;
  --danger-bg:  #FBEAE8;

  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head:  "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-card: 18px;
  --r-ctl:  12px;
  --content: 1200px;
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; line-height: 1.2; }
h1 { font-size: clamp(28px, 5vw, 36px); letter-spacing: -0.02em; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--primary); }
a:hover { color: var(--primary-dk); }
img, svg { display: block; }
code, kbd, .lb-mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 4px; }
.lb-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lb-skip { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 10px 14px;
  background: var(--surface); border-radius: 10px; font-weight: 600; }
.lb-skip:focus { top: 8px; }

/* ---- Layout -------------------------------------------------------------- */
.lb-container { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
.lb-main { max-width: var(--content); margin: 0 auto; padding: 40px 24px 64px;
  display: flex; flex-direction: column; gap: 32px; }
.lb-stack { display: flex; flex-direction: column; gap: 16px; }
.lb-stack--s { gap: 8px; }
.lb-stack--l { gap: 28px; }
.lb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lb-row--between { justify-content: space-between; }
.lb-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.lb-split__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.lb-split__side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.lb-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lb-grid--s { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lb-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.lb-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.lb-kicker--primary { color: var(--primary); }
.lb-lead { font-size: 17px; color: var(--ink-2); }
.lb-meta { font-size: 14px; color: var(--ink-2); }
.lb-small { font-size: 13px; color: var(--ink-2); }

/* ---- Logo ---------------------------------------------------------------- */
.lb-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lb-logo svg { width: 30px; height: 30px; flex: none; }
.lb-logo__word { font-family: var(--font-head); font-size: 21px; letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline; line-height: 1; }
.lb-logo__lern { font-weight: 500; color: var(--ink); }
.lb-logo__bits { font-weight: 700; color: var(--primary); }
.lb-logo__i { position: relative; display: inline-block; }
.lb-logo__i::after { content: ""; position: absolute; left: 50%; top: 0.05em;
  width: 0.22em; height: 0.22em; transform: translateX(-50%); border-radius: 1.5px; background: var(--accent); }
.lb-logo--dark .lb-logo__lern { color: #FFFFFF; }
.lb-logo--dark .lb-logo__bits { color: var(--primary-lt); }
.lb-logo--l svg { width: 36px; height: 36px; }
.lb-logo--l .lb-logo__word { font-size: 24px; }

/* ---- Buttons ------------------------------------------------------------- */
.lb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-ctl); border: 1.5px solid transparent;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; }
.lb-btn svg { width: 18px; height: 18px; }
.lb-btn--primary { background: var(--primary); color: #FFFFFF; }
.lb-btn--primary:hover { background: var(--primary-dk); color: #FFFFFF; }
.lb-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.lb-btn--secondary:hover { background: var(--bg); color: var(--ink); }
.lb-btn--tertiary { background: var(--surface); color: var(--ink); border-color: var(--field); }
.lb-btn--tertiary:hover { border-color: var(--ink-2); color: var(--ink); }
.lb-btn--light { background: #FFFFFF; color: var(--ink); }
.lb-btn--light:hover { background: var(--primary-bg); color: var(--ink); }
.lb-btn--danger { background: var(--danger); color: #FFFFFF; }
.lb-btn--danger:hover { background: #7E1D14; color: #FFFFFF; }
.lb-btn--block { width: 100%; }
.lb-btn--l { min-height: 54px; }
.lb-btn[disabled], .lb-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.lb-link-btn { background: none; border: 0; padding: 10px 12px; font: inherit; font-size: 14px;
  font-weight: 500; color: var(--ink-2); text-decoration: underline; cursor: pointer; min-height: 44px; }
.lb-link-btn:hover { color: var(--ink); }

/* ---- Forms --------------------------------------------------------------- */
.lb-field { display: flex; flex-direction: column; gap: 8px; }
.lb-label { font-size: 14px; font-weight: 600; }
.lb-input, .lb-textarea, .lb-select {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--field);
  border-radius: var(--r-ctl); background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5; }
.lb-input:focus, .lb-textarea:focus, .lb-select:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--primary); }
.lb-input--code { min-height: 54px; font-family: var(--font-mono); font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; }
.lb-input--l { min-height: 54px; }
.lb-input[aria-invalid="true"] { border-color: var(--danger); }
.lb-textarea { resize: vertical; padding: 14px 16px; line-height: 1.55; }
.lb-hint { font-size: 14px; color: var(--ink-2); }
.lb-error { font-size: 14px; font-weight: 500; color: var(--danger); }
.lb-error:empty { display: none; }
.lb-check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.lb-check input { width: 20px; height: 20px; accent-color: var(--primary); }

/* ---- Cards --------------------------------------------------------------- */
.lb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.lb-card--l { padding: 32px; }
.lb-card--shadow { box-shadow: 0 12px 32px rgba(22,32,42,.06); border-radius: 20px; }
.lb-card--feedback { border: 1.5px solid var(--primary); }
.lb-card--dark { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

/* ---- Notices ------------------------------------------------------------- */
.lb-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-ctl);
  background: var(--bg); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lb-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.lb-note--card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.lb-note--success { background: var(--primary-bg); color: var(--primary-dk); }
.lb-note--warn { background: var(--accent-bg); color: var(--accent-ink); }
.lb-note--error { background: var(--danger-bg); color: var(--danger); }
.lb-support { padding: 16px 18px; border-radius: var(--r-ctl); background: var(--accent-bg); color: var(--accent-ink); font-size: 15px; line-height: 1.55; }
.lb-support strong { display: block; margin-bottom: 4px; }

/* ---- Badges & chips ------------------------------------------------------ */
.lb-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.lb-badge--ai { background: var(--primary-bg); color: var(--primary-dk); }
.lb-badge--accent { background: var(--accent); color: var(--ink); }
.lb-badge--muted { background: var(--bg); color: var(--ink-2); }
.lb-badge--warn { background: var(--accent-bg); color: var(--accent-ink); }
.lb-badge--danger { background: var(--danger-bg); color: var(--danger); }
.lb-chip { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px;
  background: var(--bg); font-size: 14px; font-weight: 500; line-height: 1.3; }
.lb-chip--code { font-family: var(--font-mono); letter-spacing: 0.05em; font-weight: 400; }
.lb-pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1.5px solid transparent; }
.lb-pill--done { background: var(--primary); color: #FFFFFF; }
.lb-pill--now  { background: var(--accent); color: var(--ink); }
.lb-pill--help { background: #FFFFFF; border-color: var(--accent-ic); color: var(--accent-ink); }
.lb-pill--open { color: var(--ink-2); padding-left: 0; padding-right: 0; font-weight: 400; }
.lb-pill--good { background: var(--primary); color: #FFFFFF; }
.lb-pill--improve { background: var(--accent); color: var(--ink); }
.lb-pill--missing { background: #FFFFFF; border-color: var(--ink-2); color: var(--ink); }

/* ---- Header (students) --------------------------------------------------- */
.lb-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.lb-header__inner { max-width: var(--content); margin: 0 auto; padding: 14px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.lb-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.lb-nav a { padding: 10px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 15px; text-decoration: none; }
.lb-nav a:hover { background: var(--bg); color: var(--ink); }
.lb-nav a[aria-current="page"] { background: var(--primary-bg); color: var(--primary-dk); font-weight: 600; }
.lb-header__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lb-back { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px 10px 4px;
  font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; min-height: 44px; }
.lb-back svg { width: 20px; height: 20px; }

/* ---- Header (teacher) ---------------------------------------------------- */
.lb-header--teacher { background: var(--ink); color: #FFFFFF; border-bottom: 0; }
.lb-header--teacher a { color: #FFFFFF; }
.lb-header--teacher .lb-nav a { color: var(--on-dark-2); }
.lb-header--teacher .lb-nav a:hover { background: var(--dark-2); color: #FFFFFF; }
.lb-header--teacher .lb-nav a[aria-current="page"] { background: var(--dark-2); color: #FFFFFF; }
.lb-header--teacher .lb-link-btn { color: var(--on-dark-2); }
.lb-header--teacher .lb-link-btn:hover { color: #FFFFFF; }
.lb-course-select { display: flex; align-items: center; gap: 10px; }
.lb-course-select label { font-size: 14px; color: var(--on-dark-2); }
.lb-course-select select { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--dark-line);
  background: var(--dark-2); color: #FFFFFF; font-family: var(--font-sans); font-size: 15px; }

/* ---- Login --------------------------------------------------------------- */
.lb-login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.lb-login__brand { flex: 1 1 480px; background: var(--ink); color: #FFFFFF; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 56px; }
.lb-login__claim { display: flex; flex-direction: column; gap: 24px; max-width: 520px; }
.lb-login__claim h2 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.lb-login__claim p { font-size: 18px; line-height: 1.55; color: var(--on-dark-2); }
.lb-login__features { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.lb-login__features li { display: flex; align-items: center; gap: 12px; }
.lb-login__features svg { width: 22px; height: 22px; color: var(--primary-lt); flex: none; }
.lb-login__foot { font-size: 14px; color: var(--ink-3); }
.lb-login__form { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.lb-login__card { width: 100%; max-width: 420px; padding: 40px; gap: 24px; }
.lb-login__card h1 { font-size: 30px; letter-spacing: -0.01em; }
@media (max-width: 600px) {
  .lb-login__brand { padding: 32px 24px; gap: 32px; }
  .lb-login__card { padding: 28px 22px; }
}

/* ---- App tiles ----------------------------------------------------------- */
.lb-tile { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.lb-tile:hover { border-color: var(--primary); color: var(--ink); }
.lb-tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lb-tile__title { font-weight: 600; font-size: 17px; }
.lb-tile__desc { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lb-tile__meta { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.lb-tile--tool { flex-direction: row; align-items: center; gap: 14px; padding: 18px; }
.lb-tile--tool .lb-tile__title { font-size: 16px; }
.lb-icon-tile { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--primary-bg);
  color: var(--primary); display: flex; align-items: center; justify-content: center; }
.lb-icon-tile svg { width: 24px; height: 24px; }
.lb-icon-tile--tool { width: 44px; height: 44px; background: var(--accent-bg); color: var(--accent-ic); }
.lb-icon-tile--tool svg { width: 22px; height: 22px; }

/* ---- Continue card ------------------------------------------------------- */
.lb-continue { background: var(--ink); color: #FFFFFF; border-radius: 20px; padding: 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.lb-continue__body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 420px; }
.lb-continue .lb-kicker { color: var(--accent); }
.lb-continue h2 { font-size: 28px; }
.lb-continue p { font-size: 15px; color: var(--on-dark-2); }
.lb-segments { display: flex; gap: 6px; max-width: 360px; margin-top: 4px; }
.lb-segments span { flex: 1; height: 8px; border-radius: 4px; background: var(--dark-line); }
.lb-segments .is-done { background: var(--primary-lt); }
.lb-segments .is-now { background: var(--accent); }

/* ---- Step list (learning path) ------------------------------------------ */
.lb-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.lb-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; }
.lb-steps li[aria-current="step"] { background: var(--primary-bg); }
.lb-step__dot { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; background: var(--bg); border: 1.5px solid var(--field); color: var(--ink-2); }
.lb-step__dot svg { width: 16px; height: 16px; }
.is-done .lb-step__dot { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
.is-now .lb-step__dot { background: #FFFFFF; border: 2.5px solid var(--primary); color: var(--primary-dk); font-weight: 700; }
.lb-step__text { display: flex; flex-direction: column; line-height: 1.4; }
.lb-step__title { font-weight: 600; font-size: 15px; }
.is-locked .lb-step__title { font-weight: 500; color: var(--ink-2); }
.lb-step__status { font-size: 13px; color: var(--ink-2); }
.is-now .lb-step__status { color: var(--primary-dk); }
.lb-level { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--accent-bg); }
.lb-level strong { font-size: 15px; color: var(--accent-ink); }
.lb-level span { font-size: 13px; line-height: 1.45; color: var(--accent-ink); }

/* ---- Content blocks ------------------------------------------------------ */
.lb-prose { font-size: 17px; line-height: 1.65; max-width: 680px; }
.lb-prose p + p { margin-top: 12px; }
.lb-formula { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px;
  padding: 24px; border-radius: 14px; background: var(--bg); font-family: var(--font-mono); font-size: 22px; }

/* ---- Feedback criteria --------------------------------------------------- */
.lb-criteria { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lb-criteria li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--bg); font-size: 15px; line-height: 1.5; }
.lb-criteria .lb-pill { flex: none; }

/* ---- Mini check ---------------------------------------------------------- */
.lb-choice { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
.lb-choice legend { font-size: 16px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.lb-choice label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px;
  border: 1.5px solid var(--field); border-radius: 12px; font-size: 16px; cursor: pointer; line-height: 1.4; }
.lb-choice label:hover { border-color: var(--ink-2); }
.lb-choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); }
.lb-choice input { width: 18px; height: 18px; flex: none; accent-color: var(--primary); }

/* ---- KPI ----------------------------------------------------------------- */
.lb-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.lb-kpi__label { font-size: 14px; color: var(--ink-2); }
.lb-kpi__value { font-family: var(--font-head); font-weight: 700; font-size: 32px; line-height: 1.2; }
.lb-kpi__value small { font-size: 18px; color: var(--ink-2); font-weight: 500; }
.lb-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.lb-bar > span { display: block; height: 10px; border-radius: 5px; background: var(--primary); }

/* ---- Tables -------------------------------------------------------------- */
.lb-table-wrap { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb-table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.lb-table .lb-mono { letter-spacing: 0.04em; }
.lb-table form { display: inline; }

/* ---- App frame ----------------------------------------------------------- */
.lb-frame-page { height: 100vh; display: flex; flex-direction: column; }
.lb-frame-page .lb-header__inner { justify-content: space-between; }
.lb-frame-title { font-family: var(--font-head); font-weight: 700; font-size: 18px; flex: 1 1 auto; }
.lb-app-frame { flex: 1; width: 100%; border: 0; display: block; background: var(--bg); }

/* ---- Thread / history ---------------------------------------------------- */
.lb-thread { display: flex; flex-direction: column; gap: 10px; }
.lb-msg { padding: 14px 16px; border-radius: 12px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.lb-msg--user { background: var(--bg); }
.lb-msg--assistant { background: var(--primary-bg); }
.lb-msg__meta { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; white-space: normal; }

/* ---- Footer -------------------------------------------------------------- */
.lb-footer { max-width: var(--content); margin: 0 auto; padding: 0 24px 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-2); }
.lb-footer a { color: var(--ink-2); }

/* ---- Print: code cards (A4, 3 x 8) -------------------------------------- */
.lb-print-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.lb-code-card { border: 1px dashed #9AA5B1; padding: 10px 12px; height: 37mm; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--ink); break-inside: avoid; }
.lb-code-card__code { font-family: var(--font-mono); font-size: 17px; letter-spacing: 0.08em; font-weight: 600; }
.lb-code-card__hint { font-size: 9.5px; color: var(--ink-2); line-height: 1.3; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #FFFFFF; }
  .lb-no-print { display: none !important; }
  .lb-main { padding: 0; max-width: none; }
  .lb-print-sheet { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Small utilities (no inline styles: CSP forbids them) --------------- */
.lb-row--tight { gap: 10px; }
.lb-header-link { padding: 10px 12px; font-size: 14px; font-weight: 500; }
.lb-mt-0 { margin-top: 0; }
.lb-inline-form { display: inline; }
.lb-right { margin-left: auto; }
.lb-w-auto { width: auto; }
.lb-narrow { max-width: 560px; }
.lb-input--code::placeholder { text-transform: none; letter-spacing: 0.04em; }
.lb-summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.lb-details-body { padding: 8px 0 4px; }
.lb-grow { flex: 1 1 220px; width: auto; }
.lb-course-item { padding: 20px; gap: 8px; }
.lb-write-in { min-width: 220px; }
.lb-table--print td { padding: 14px 12px; }
.lb-gap-0 { gap: 2px; }
.lb-app-toggles { display: flex; flex-direction: column; }
.lb-app-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.lb-app-toggle__name { font-weight: 600; font-size: 15px; }
.lb-app-toggle input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.lb-segments--light span { background: var(--line); }
.lb-segments--light .is-done { background: var(--primary); }
.lb-segments--light .is-now { background: var(--accent); }
/* Bar widths in 5% steps (CSP forbids inline styles). */
.lb-w-0 { width: 0%; }
.lb-w-5 { width: 5%; }
.lb-w-10 { width: 10%; }
.lb-w-15 { width: 15%; }
.lb-w-20 { width: 20%; }
.lb-w-25 { width: 25%; }
.lb-w-30 { width: 30%; }
.lb-w-35 { width: 35%; }
.lb-w-40 { width: 40%; }
.lb-w-45 { width: 45%; }
.lb-w-50 { width: 50%; }
.lb-w-55 { width: 55%; }
.lb-w-60 { width: 60%; }
.lb-w-65 { width: 65%; }
.lb-w-70 { width: 70%; }
.lb-w-75 { width: 75%; }
.lb-w-80 { width: 80%; }
.lb-w-85 { width: 85%; }
.lb-w-90 { width: 90%; }
.lb-w-95 { width: 95%; }
.lb-w-100 { width: 100%; }
.lb-small-strong { font-size: 14px; }
.lb-strong-link { font-size: 14px; font-weight: 600; }
.lb-table--progress td { white-space: nowrap; }
.lb-h1-meta { font-size: 18px; font-weight: 400; color: var(--ink-2); letter-spacing: 0.05em; }
.lb-frame-main { flex: 1; display: flex; } .lb-frame-title { margin: 0; line-height: 1.3; letter-spacing: 0; }
.lb-table-wrap { position: relative; max-width: 100%; }
.lb-plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; } abbr[title] { text-decoration: none; }
.lb-legal { max-width: 860px; }
.lb-prose-page { gap: 12px; font-size: 16px; line-height: 1.65; }
.lb-prose-page h2 { font-size: 20px; margin-top: 16px; }
.lb-prose-page h3 { font-size: 16px; margin-top: 8px; }
.lb-prose-page ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.lb-placeholder { background: var(--accent-bg); color: var(--accent-ink); padding: 0 4px; border-radius: 4px; }
.lb-login__legal { display: flex; gap: 16px; font-size: 13px; }
.lb-login__legal a { color: var(--ink-3); }
