/* ===== Lezioni – design tokens, temi, base ===== */
@font-face { font-family: "Inter"; src: url("/assets/vendor/inter-variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --font: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "JetBrains Mono", monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 14.5px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 22px; --fs-2xl: 28px;
  --r-sm: 8px; --r: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --dur: 180ms; --dur-slow: 260ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --sb-w: 240px; --sb-mini: 64px; --topbar-h: 0px;
  --content-max: 1440px;

  /* tema chiaro */
  --bg: #f1f4f9; --bg-2: #e8ecf3; --card: #ffffff; --card-2: #f7f9fc; --card-3: #eef2f7;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --faint: #94a3b8; --line: #e2e8f0; --line-2: #cbd5e1;
  --accent: #4f46e5; --accent-h: #4338ca; --accent-bg: #eef2ff; --accent-fg: #3730a3; --accent-ring: rgba(79, 70, 229, .28);
  --ok: #16a34a; --ok-bg: #dcfce7; --warn: #d97706; --warn-bg: #fef3c7; --err: #dc2626; --err-bg: #fee2e2; --rec: #e11d48; --rec-bg: #ffe4e6; --info: #0284c7; --info-bg: #e0f2fe;
  --mark: #fef3c7; --hl: #eef2ff;
  --sb-bg: #0b1220; --sb-bg-2: #111a2e; --sb-text: #c7d0dd; --sb-muted: #7c8aa0; --sb-active: #1e2a44; --sb-line: #1b2740;
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .08);
  --sh-md: 0 6px 20px rgba(15, 23, 42, .10);
  --sh-lg: 0 18px 50px rgba(15, 23, 42, .20);
  --grid-dot: #d5dbe5;
  color-scheme: light;
}

:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

:root[data-theme="dark"],
:root:not([data-theme="light"]).sys-dark {
  --bg: #0b1220; --bg-2: #0f172a; --card: #141d30; --card-2: #19233a; --card-3: #1f2b45;
  --text: #e6ebf3; --text-2: #c3cad6; --muted: #94a3b8; --faint: #64748b; --line: #26324a; --line-2: #34425e;
  --accent: #818cf8; --accent-h: #a5b4fc; --accent-bg: #1f2447; --accent-fg: #c7d2fe; --accent-ring: rgba(129, 140, 248, .35);
  --ok: #4ade80; --ok-bg: #0f2a1c; --warn: #fbbf24; --warn-bg: #2e2410; --err: #f87171; --err-bg: #3a1a1a; --rec: #fb7185; --rec-bg: #3b1620; --info: #38bdf8; --info-bg: #0c2435;
  --mark: #3a3014; --hl: #1f2447;
  --sb-bg: #070c17; --sb-bg-2: #0b1220; --sb-text: #c7d0dd; --sb-muted: #6f7d94; --sb-active: #1a2540; --sb-line: #16213a;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .4);
  --sh-md: 0 8px 24px rgba(0, 0, 0, .45);
  --sh-lg: 0 20px 60px rgba(0, 0, 0, .6);
  --grid-dot: #26324a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 var(--fs)/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 650; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0 0 var(--sp-3); }
img { max-width: 100%; }
::selection { background: var(--accent-bg); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* utilità */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.row { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 160px; }
.row.tight > * { flex: 0 0 auto; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.spacer { flex: 1 1 auto !important; }
.nowrap { white-space: nowrap; }
.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); }
.lucide { width: 1.1em; height: 1.1em; stroke-width: 2; vertical-align: -0.2em; flex: 0 0 auto; }
