/* Daanyar web — design system (approved preview: design/preview/student-dashboard.html).
   Fonts are served from this host (no Google Fonts / CDN: they are unreliable from Iran). */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-var.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("../fonts/noto-kufi-arabic-var.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  --navy: #172554;
  --lavender: #A78BFA;
  --lavender-soft: #C4B5FD;
  --slate: #334155;

  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #E2E8F0;
  --text: #1E293B;
  --text-2: #64748B;
  --brand: #172554;
  --brand-ink: #FFFFFF;
  --accent: #8B6CF0;
  --accent-wash: #F3EFFF;
  --good: #0E9F6E;
  --good-wash: #E7F7F0;
  --warn: #C2700B;
  --warn-wash: #FFF4E2;
  --bad: #D9365E;
  --bad-wash: #FDEBEF;
  --track: #E9EEF5;
  --hero: #172554;
  --hero-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(23, 37, 84, .05), 0 6px 24px -12px rgba(23, 37, 84, .18);

  --font-display: "Noto Kufi Arabic", "Vazirmatn", Tahoma, sans-serif;
  --font-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F172A; --surface: #162036; --surface-2: #1B2741; --line: #263452;
  --text: #E2E8F0; --text-2: #94A3B8; --brand: #C4B5FD; --brand-ink: #172554;
  --accent: #B9A4FC; --accent-wash: #241F45; --good: #34D399; --good-wash: #10302A;
  --warn: #FBBF5B; --warn-wash: #33270F; --bad: #FB7196; --bad-wash: #3A1A27;
  --track: #24314D; --hero: #1E2A4A; --hero-ink: #E2E8F0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
svg { display: block; }
/* SVG coordinates are laid out left-to-right; Persian text inside still shapes right-to-left. */
svg text { direction: ltr; unicode-bidi: plaintext; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.display { font-family: var(--font-display); }

/* ---------- Buttons, inputs, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 99px; border: 1px solid transparent;
  cursor: pointer; font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap;
}
.btn[disabled] { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-accent { background: var(--accent); color: #FFFFFF; }
:root[data-theme="dark"] .btn-accent { color: #172554; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-light { background: #FFFFFF; color: #172554; }
.btn-ghost-light { background: transparent; color: inherit; border-color: rgba(255,255,255,.35); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-telegram { background: #229ED9; color: #FFFFFF; }
.btn-bale { background: #2E7D6B; color: #FFFFFF; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; color: var(--text);
  text-decoration: none;
}
.icon-btn { width: 40px; padding: 0; justify-content: center; position: relative; }
.dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); }

.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--text-2); }
.input {
  height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  padding: 0 14px; font-size: 16px; width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.input.ltr { direction: ltr; text-align: right; letter-spacing: .5px; }
.input.code { direction: ltr; text-align: center; letter-spacing: 10px; font-size: 22px; font-weight: 700; }
.form { display: grid; gap: 16px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.8; }
.alert-error { background: var(--bad-wash); color: var(--bad); }
.alert-ok { background: var(--good-wash); color: var(--good); }
.alert-info { background: var(--accent-wash); color: var(--accent); }

.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
}
.segmented button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; }

.state { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 0 9px; border-radius: 99px; line-height: 22px; white-space: nowrap; }
.state.good { background: var(--good-wash); color: var(--good); }
.state.warn { background: var(--warn-wash); color: var(--warn); }
.state.bad { background: var(--bad-wash); color: var(--bad); }
.state.idle { background: var(--track); color: var(--text-2); }
.state.review { background: var(--accent-wash); color: var(--accent); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px 18px; background: var(--surface); border-inline-start: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; color: var(--text); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--brand); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.nav .badge { margin-inline-start: auto; font-size: 12px; background: var(--warn-wash); color: var(--warn); padding: 0 8px; border-radius: 99px; font-weight: 700; }
.nav a[aria-current="page"] .badge { background: rgba(255,255,255,.18); color: inherit; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.who {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface-2); text-align: start; cursor: pointer; width: 100%; text-decoration: none; color: var(--text);
}
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); font-weight: 800; flex: none; }
.who small { display: block; color: var(--text-2); font-size: 12px; line-height: 1.4; }
.who strong { display: block; font-size: 14px; line-height: 1.5; }
.logout { background: none; border: 0; color: var(--text-2); cursor: pointer; font-size: 13.5px; padding: 6px 12px; text-align: start; border-radius: 8px; }
.logout:hover { color: var(--bad); }

.main { padding: 22px 32px 48px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hello h1 { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.5; }
.hello p { margin: 0; color: var(--text-2); font-size: 14px; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 0;
}
.card-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; font-weight: 700; }
.card-head .sub { color: var(--text-2); font-size: 13px; }
.card-head .link { margin-inline-start: auto; font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

/* Hero card (learning path, highlighted summaries) */
.hero-card { background: var(--hero); color: var(--hero-ink); border: none; position: relative; overflow: hidden; }
.hero-card .card-head .sub { color: inherit; opacity: .72; }
.hero-card .card-head h2 { font-family: var(--font-display); font-size: 19px; }
.book-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 12px; border-radius: 99px; background: rgba(196,181,253,.16); color: #DDD3FE; font-weight: 600; }
.route { overflow-x: auto; margin: 6px -6px 0; padding: 0 6px 4px; }
.route svg { min-width: 640px; width: 100%; height: auto; }
.route text { font-family: var(--font-body); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; opacity: .85; margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.callout {
  margin-top: 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: rgba(255,255,255,.08); border: 1px solid rgba(196,181,253,.25); border-radius: var(--r-md); padding: 12px 14px;
}
.callout p { margin: 0; flex: 1 1 260px; font-size: 14px; line-height: 1.8; }
.callout .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Lists and tasks */
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.task .time { font-size: 13px; color: var(--text-2); line-height: 1.5; text-align: center; padding-top: 2px; }
.task .time b { display: block; color: var(--text); font-size: 15px; }
.task h3 { font-size: 14.5px; font-weight: 700; line-height: 1.6; }
.task .meta { font-size: 12.5px; color: var(--text-2); }
.task-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.progress { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(var(--kpi-cols, var(--kpi-n, 6)), minmax(0, 1fr)); gap: 0; padding: 6px; }
.kpi { padding: 14px 16px; border-inline-start: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-inline-start: none; }
.kpi .label { font-size: 13px; color: var(--text-2); }
.kpi .value { font-size: 26px; font-weight: 800; line-height: 1.4; color: var(--text); }
.kpi .value small { font-size: 14px; font-weight: 600; color: var(--text-2); margin-inline-start: 2px; }
.kpi .note { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.note.up { color: var(--good); } .note.down { color: var(--bad); }

/* Charts */
.chart { width: 100%; height: auto; max-height: 300px; }
.chart text { font-family: var(--font-body); fill: var(--text-2); font-size: 12px; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }

/* AI recommendation */
.ai { display: grid; gap: 14px; align-content: start; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-wash); padding: 2px 10px; border-radius: 99px; width: fit-content; }
.ai h3 { font-size: 16px; line-height: 1.7; }
.ai p { margin: 0; color: var(--text-2); font-size: 14px; }
.evidence { display: grid; gap: 6px; font-size: 13px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--line); }
.evidence div { display: flex; justify-content: space-between; gap: 10px; }
.evidence span:first-child { color: var(--text-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plain-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.plain-list li .when { margin-inline-start: auto; font-size: 12.5px; color: var(--text-2); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* Mastery */
.mastery { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mastery li { display: grid; gap: 6px; }
.m-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.m-top strong { font-size: 14.5px; font-weight: 600; }
.m-top .book { font-size: 12.5px; color: var(--text-2); }
.m-top .pct { margin-inline-start: auto; font-weight: 700; font-size: 14px; }
.bar { position: relative; height: 8px; border-radius: 99px; background: var(--track); }
.bar > span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; }
.bar.low-conf > span { background-image: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 9px) !important; background-color: transparent !important; }
.conf { font-size: 12px; color: var(--text-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.split h3 { font-size: 13.5px; color: var(--text-2); font-weight: 600; margin-bottom: 10px; }
.books { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.books li { display: grid; grid-template-columns: 120px 1fr 46px; align-items: center; gap: 12px; font-size: 14px; }
.books .count { font-size: 12px; color: var(--text-2); display: block; line-height: 1.3; }
.books .val { font-weight: 700; text-align: end; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
th { text-align: start; font-weight: 600; color: var(--text-2); font-size: 12.5px; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td .t-name { font-weight: 600; display: block; }
td .t-sub { font-size: 12.5px; color: var(--text-2); }
tr.attention td:first-child { box-shadow: inset -3px 0 0 var(--warn); }
.score { font-weight: 800; }
.cwu { display: flex; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.cwu .c { color: var(--good); } .cwu .w { color: var(--bad); } .cwu .u { color: var(--text-2); }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }

/* Empty / error / loading */
.empty { display: grid; justify-items: start; gap: 10px; padding: 8px 0; color: var(--text-2); font-size: 14px; }
.empty strong { color: var(--text); font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--track), var(--surface-2), var(--track)); background-size: 200% 100%; border-radius: var(--r-lg); min-height: 140px; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hidden-note { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line); }

/* Child tabs (parent) */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.tab[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; font-weight: 700; }
.tab .avatar { width: 30px; height: 30px; font-size: 13px; }

/* Mobile bottom nav */
.bottom-nav { display: none; }

/* ---------- Centered pages (login, link, start, roles) ---------- */
.center-page { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.center-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.center-body { display: grid; place-items: center; padding: 24px 16px 48px; }
.panel { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 30px 28px; display: grid; gap: 18px; }
.panel.wide { width: min(760px, 100%); }
.panel h1 { font-family: var(--font-display); font-size: 24px; line-height: 1.6; }
.panel .lead { margin: 0; color: var(--text-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.choice {
  display: grid; gap: 6px; text-align: start; padding: 18px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; text-decoration: none; color: var(--text);
}
.choice:hover { border-color: var(--accent); }
.choice strong { font-size: 16px; }
.choice span { font-size: 13.5px; color: var(--text-2); }
.choice .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); }
.foot-note { text-align: center; color: var(--text-2); font-size: 12.5px; padding: 16px; }

/* ---------- Landing ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.site-nav a:hover { color: var(--text); }
.site-header .end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.hero { padding: 48px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.55; color: var(--brand); }
.hero p { font-size: 18px; color: var(--text-2); max-width: 34em; margin: 18px 0 28px; line-height: 1.9; }
.hero .actions { gap: 12px; }
.hero-art { width: 100%; height: auto; }
.section { padding: 72px 0; }
.section-title { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.6; margin-bottom: 8px; color: var(--text); }
.section-lead { color: var(--text-2); margin: 0 0 32px; max-width: 40em; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); }
.feature h3 { font-size: 17px; }
.feature p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.steps li { display: grid; gap: 10px; justify-items: start; padding-inline-end: 18px; position: relative; }
.steps .n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--brand); color: var(--brand-ink); position: relative; z-index: 1; }
.steps li::before { content: ""; position: absolute; top: 21px; inset-inline-start: 44px; inset-inline-end: 0; height: 2px; background: repeating-linear-gradient(to left, var(--lavender-soft) 0 6px, transparent 6px 12px); }
.steps li:last-child::before { display: none; }
.steps h3 { font-size: 16px; }
.steps p { margin: 0; color: var(--text-2); font-size: 14px; }
.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.group { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.group h3 { font-size: 17px; }
.group p { margin: 0; color: var(--text-2); font-size: 14px; }
.preview-band { background: var(--hero); color: var(--hero-ink); border-radius: 28px; padding: 40px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: center; }
.preview-band h2 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.6; }
.preview-band p { opacity: .8; margin: 12px 0 0; }
.cta { text-align: center; display: grid; justify-items: center; gap: 16px; }
.cta h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); color: var(--brand); line-height: 1.6; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--text-2); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .end { margin-inline-start: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.prose { max-width: 720px; }
.prose h2 { font-size: 18px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { --kpi-cols: 3; }
  .kpi:nth-child(3n+1) { border-inline-start: none; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding: 22px 12px; align-items: center; }
  .brand-name, .nav a span.t, .nav .badge, .who .who-text, .logout .t { display: none; }
  .nav a { justify-content: center; padding: 12px; }
  .who { justify-content: center; padding: 8px; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .main { padding: 20px 24px 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; margin-inline: auto; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps li { grid-template-columns: 44px 1fr; column-gap: 14px; }
  .steps li > div { grid-column: 2; }
  .steps li::before { display: none; }
  .preview-band { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 720px) {
  .app { display: block; }
  .sidebar { display: none; }
  .main { padding: 14px 16px 96px; }
  .hello h1 { font-size: 21px; }
  .top-actions .hide-sm { display: none; }
  .grid { gap: 14px; }
  .card { padding: 18px 16px; border-radius: 18px; }
  .kpis { --kpi-cols: 2; }
  .kpi { border-inline-start: none !important; border-top: 1px solid var(--line); }
  .kpi:nth-child(-n+2) { border-top: none; }
  .kpi:nth-child(even) { border-inline-start: 1px solid var(--line) !important; }
  .kpi .value { font-size: 22px; }
  .split { grid-template-columns: 1fr; gap: 18px; }
  .books li { grid-template-columns: 96px 1fr 42px; }
  .chart text { font-size: 21px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(var(--bn-cols, 5), 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 10;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; color: var(--text-2); text-decoration: none; padding: 4px 0; border-radius: 12px; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
  .bottom-nav a[aria-current="page"] svg { background: var(--accent-wash); border-radius: 99px; }
  .bottom-nav svg { width: 44px; height: 26px; padding: 3px 10px; }
  .site-nav { display: none; }
  .site-header .wrap { height: 62px; }
  .hero { padding: 24px 0 48px; }
  .hero p { font-size: 16px; }
  .features, .groups { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .panel { padding: 24px 18px; }
  .center-top { padding: 14px 16px; }
}
