/* ———————————————————————————————————————————————————————————————————
   LECTA · BLOOM DESIGN SYSTEM
   Warm campus. Light-first. Coral + mint + sun. Plus Jakarta Sans + Caveat.
——————————————————————————————————————————————————————————————————— */

:root {
  /* warm surfaces */
  --bg:        #FDFBF7;
  --bg-2:      #FDEFE3;
  --bg-3:      #F5EBDA;
  --bg-4:      #EEE2CC;
  --surface:   #FFFFFF;
  --surface-2: #FDFAF3;
  --warm:      #FDEFE3;

  /* rules */
  --rule:      #EFE6D6;
  --rule-2:    #E5DBCB;
  --rule-3:    #D6CAB4;

  /* ink */
  --ink:       #1A2233;
  --ink-2:     #3A4257;
  --ink-3:     #6B7388;
  --ink-4:     #A4ABBC;

  /* primary accent — coral */
  --acc:       #FF6A4A;
  --acc-hi:    #E74E2D;
  --acc-soft:  #FFE2D6;
  --acc-dim:   rgba(255,106,74,.14);
  --acc-dim2:  rgba(255,106,74,.06);

  /* secondary accents */
  --coral:     #FF6A4A;
  --coral-deep:#E74E2D;
  --coral-soft:#FFE2D6;
  --mint:      #2DC8A6;
  --mint-deep: #168A6F;
  --mint-soft: #D8F3EA;
  --sun:       #FFD93D;
  --sun-soft:  #FFF1B0;
  --sun-ink:   #6E5500;
  --violet:    #9B7BFF;
  --violet-soft:#E6DCFF;
  --violet-ink:#5B3CCC;

  /* semantic */
  --warn:      #E74E2D;
  --warn-dim:  rgba(231,78,45,.10);
  --danger:    #DC2626;
  --danger-dim:rgba(220,38,38,.08);
  --ok:        #168A6F;

  /* type */
  --sans:      'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --hand:      'Caveat', cursive;
  --mono:      'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  --serif:     'Newsreader', Georgia, serif;

  /* sizes */
  --max:       1280px;
  --max-wide:  1500px;
  --pad:       40px;
  --r-sm:      10px;
  --r:         16px;
  --r-lg:      22px;
  --r-xl:      28px;
  --r-xxl:     32px;
  --radius:    16px;
  --radius-2:  22px;

  /* shadows */
  --shadow-sm: 0 4px 14px -8px rgba(26,34,51,.18);
  --shadow:    0 14px 40px -28px rgba(26,34,51,.22);
  --shadow-lg: 0 24px 60px -28px rgba(26,34,51,.28);
  --ring:      0 0 0 4px var(--acc-dim);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--coral); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline-offset: 3px; }

/* Scrollbars — subtle warm */
* { scrollbar-width: thin; scrollbar-color: var(--rule-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--rule-3); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-4); border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ———— typography ———— */
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--sans); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
h1 { font-size: clamp(48px, 6.5vw, 88px); letter-spacing: -0.04em; line-height: 0.98; }
h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.03em; }
h3 { font-size: 22px; letter-spacing: -0.02em; font-weight: 700; line-height: 1.2; }
h4 { font-size: 17px; letter-spacing: -0.015em; font-weight: 700; line-height: 1.3; }
h5 { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3; }
h6 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3; }
p  { margin: 0 0 16px; color: var(--ink-2); }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; color: var(--ink); }
small { font-size: 0.9em; color: var(--ink-3); }
hr { border: 0; height: 1px; background: var(--rule); margin: 32px 0; }
.hand { font-family: var(--hand); font-weight: 500; }
.mono { font-family: var(--mono); font-feature-settings: "ss01" on, "tnum" on; }
.num-tab { font-variant-numeric: tabular-nums; }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }

/* ———— layout ———— */
.page { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
section { padding: 64px 0; }
.stack > * + * { margin-top: var(--gap, 14px); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.tight { gap: 8px; }
.center { display: grid; place-items: center; }
.sep-dot { color: var(--ink-4); padding: 0 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--bg-3); color: var(--ink-2);
  font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.3;
}
.eyebrow.coral  { background: var(--coral-soft); color: var(--coral-deep); }
.eyebrow.mint   { background: var(--mint-soft);  color: var(--mint-deep); }
.eyebrow.sun    { background: var(--sun-soft);   color: var(--sun-ink); }
.eyebrow.violet { background: var(--violet-soft); color: var(--violet-ink); }
.eyebrow.ink    { background: var(--ink); color: #fff; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.eyebrow .n, .eyebrow .line, .eyebrow .meta { display: none; }

/* ———— topbar (marketing) ———— */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 16px var(--pad);
  display: flex; align-items: center; gap: 28px;
}
/* Brand mark — реальный SVG wordmark вместо текста "lecta" */
.brand {
  display: inline-block;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  width: 127px;
  height: 40px;
  background: url('/static/logo-wordmark.svg') left center / contain no-repeat;
  color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 22px;
  letter-spacing: -0.025em;
}
html.dark .brand { background-image: url('/static/logo-wordmark-dark.svg'); }
.brand--combo { width: 180px; background-image: url('/static/logo-combo.svg'); }
.brand::before { content: none; display: none; }
.brand-img { display: none !important; }

.topbar nav { display: flex; gap: 28px; }
.topbar nav a {
  font-size: 14.5px; font-weight: 500;
  color: var(--ink-2);
  padding: 6px 0; position: relative;
  transition: color .15s;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a[aria-current] { color: var(--ink); font-weight: 700; }
.topbar nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--coral); border-radius: 2px;
}
.topbar .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.topbar .right a, .topbar .right span { font-size: 14px; color: var(--ink-2); }
.topbar .right .cta {
  background: var(--coral); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px;
  box-shadow: 0 8px 20px -10px rgba(255,106,74,.5);
  border: 1.5px solid var(--coral);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.topbar .right .cta:hover { background: var(--coral-deep); border-color: var(--coral-deep); transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(255,106,74,.65); }
.topbar .right .tog {
  background: transparent; border: 1.5px solid var(--rule-2);
  border-radius: 999px;
  padding: 7px 14px; color: var(--ink-2);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.topbar .right .tog:hover { color: var(--ink); border-color: var(--ink-3); }

.lang {
  display: inline-flex; gap: 4px;
  border: 1.5px solid var(--rule-2); border-radius: 999px;
  padding: 2px;
  font-size: 12px;
}
.lang a {
  padding: 4px 10px; border-radius: 999px;
  color: var(--ink-3); font-weight: 600;
  min-height: 32px; display: inline-flex; align-items: center;
}
.lang a.on { background: var(--ink); color: #fff; }
.lang a:hover:not(.on) { color: var(--ink); }

.burger { display: none; background: transparent; border: 1.5px solid var(--rule-2); border-radius: 999px; color: var(--ink-2); font-size: 13px; padding: 8px 14px; cursor: pointer; margin-left: auto; font-weight: 600; min-height: 44px; }
.burger:hover { color: var(--ink); border-color: var(--ink-3); }
.mobile-menu { display: none; border-top: 1px solid var(--rule); background: var(--bg); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 14px 32px; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.mobile-menu a:hover, .mobile-menu a[aria-current] { color: var(--coral); }
.mobile-menu .cta { color: var(--coral); }
@media (max-width: 900px) {
  .topbar nav, .topbar .right { display: none; }
  .burger { display: block; }
}

/* ———— components ———— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
  text-decoration: none; line-height: 1.15;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 20px -10px rgba(26,34,51,.45); }
.btn-primary:hover { background: #000; border-color: #000; transform: translateY(-1px); }
.btn-coral { background: var(--coral); color: #fff; border-color: var(--coral); box-shadow: 0 10px 26px -10px rgba(255,106,74,.55); }
.btn-coral:hover { background: var(--coral-deep); border-color: var(--coral-deep); transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(255,106,74,.65); }
.btn-mint  { background: var(--mint); color: #fff; border-color: var(--mint); box-shadow: 0 10px 26px -10px rgba(45,200,166,.55); }
.btn-mint:hover { background: var(--mint-deep); border-color: var(--mint-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(26,34,51,.18); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(26,34,51,.03); }
/* btn-outline-on-ink: outline-кнопка для использования на --ink и card-ink фонах.
   Переиспользуется: landing (cta-card), about (ab-cta-card), потенциально pricing lower-CTA */
.btn-outline-on-ink { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-outline-on-ink:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn-light:hover { border-color: var(--ink-3); background: var(--bg-2); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-quiet:hover { color: var(--coral); }
.btn-danger { background: transparent; color: var(--coral-deep); border-color: var(--coral-soft); }
.btn-danger:hover { background: var(--coral-soft); border-color: var(--coral); color: var(--coral-deep); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 44px; }
.btn-lg { padding: 15px 28px; font-size: 15.5px; }

.input, .textarea, select.input, input[type="text"].input, input[type="email"].input, input[type="password"].input, input[type="number"].input, input[type="search"].input {
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  color: var(--ink);
  padding: 12px 16px;
  font-family: var(--sans); font-size: 15px;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  line-height: 1.4;
}
.input:hover, .textarea:hover, select.input:hover { border-color: var(--rule-3); }
.input:focus, .textarea:focus, select.input:focus { border-color: var(--coral); box-shadow: var(--ring); }
.input:disabled, .textarea:disabled { background: var(--bg-3); color: var(--ink-3); cursor: not-allowed; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input.is-invalid, .textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-dim); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; cursor: pointer; }

.label {
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  display: block; margin-bottom: 8px;
}
.help { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.help.err { color: var(--danger); }
.field + .field { margin-top: 18px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.field-head .label { margin: 0; }
.field-head a { font-size: 12.5px; color: var(--ink-3); text-decoration: none; border-bottom: 1.5px dashed var(--rule-2); }
.field-head a:hover { color: var(--coral); border-color: var(--coral); }

/* checkboxes & radios */
input[type="checkbox"].cbx, input[type="radio"].cbx { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--rule-2); background: var(--surface); cursor: pointer; flex-shrink: 0; position: relative; transition: border-color .15s, background .15s; }
input[type="checkbox"].cbx { border-radius: 5px; }
input[type="radio"].cbx { border-radius: 50%; }
input[type="checkbox"].cbx:checked, input[type="radio"].cbx:checked { background: var(--coral); border-color: var(--coral); }
input[type="checkbox"].cbx:checked::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #fff; font-weight: 700; }
input[type="radio"].cbx:checked::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
input[type="checkbox"].cbx:focus-visible, input[type="radio"].cbx:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

.badge, .chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--ink-2);
  line-height: 1.2;
  white-space: nowrap;
}
.chip-sm { font-size: 11.5px; padding: 3px 9px; }
.chip-lg { font-size: 14px; padding: 7px 16px; }
.chip-coral, .badge.acc { background: var(--coral-soft); color: var(--coral-deep); }
.chip-mint   { background: var(--mint-soft);  color: var(--mint-deep); }
.chip-sun    { background: var(--sun-soft);   color: var(--sun-ink); }
.chip-violet { background: var(--violet-soft); color: var(--violet-ink); }
.chip-ink    { background: var(--ink); color: #fff; }
.chip-light  { background: var(--surface); color: var(--ink-2); border: 1px solid var(--rule); }
.chip-warm   { background: var(--bg-2); color: var(--ink-2); }
.chip-outline{ background: transparent; color: var(--ink-2); border: 1px solid var(--rule-2); }
.chip .dot, .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-soft { background: var(--bg-2); box-shadow: none; border-color: var(--rule); }
.card-warm { background: linear-gradient(135deg, var(--bg-2), var(--coral-soft)); border: none; }
.card-ink  { background: var(--ink); color: #fff; border: none; }
.card-ink h1, .card-ink h2, .card-ink h3, .card-ink h4 { color: #fff; }
.card-ink p { color: rgba(255,255,255,.78); }
/* card-ink--cta: расширенный ink-card для CTA-секций.
   Используется: landing.html (.cta-card), about.html (.ab-cta-card)
   Потенциально: pricing.html нижняя CTA, onboarding если появится */
.card-ink--cta {
  border-radius: var(--r-xxl);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(26,34,51,.45);
}
.card-ink--cta .body { position: relative; z-index: 1; }
.card-ink--cta h2 { color: #fff; font-size: clamp(38px, 4.5vw, 54px); }
.card-ink--cta .lead { color: rgba(255,255,255,.78); font-size: 17px; margin-top: 18px; max-width: 480px; }
.card-ink--cta .row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
/* bubbles — остаются локальными (разные координаты на разных страницах) */
.card-ink--cta .bubble { position: absolute; border-radius: 50%; }
@media (max-width: 900px) {
  .card-ink--cta { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 480px) {
  .card-ink--cta { padding: 24px 20px; }
}
.card-interactive { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--rule-3); }

.link {
  color: var(--ink); font-weight: 600;
  border-bottom: 1.5px solid var(--coral);
  padding-bottom: 1px; transition: color .15s;
}
.link:hover { color: var(--coral); }
.link-dim { color: var(--ink-3); border-bottom-color: var(--rule-2); }
.link-dim:hover { color: var(--coral); border-bottom-color: var(--coral); }

.kbd {
  display: inline-block;
  font-family: var(--mono); font-size: 11px;
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--rule-2);
  color: var(--ink-2); background: var(--surface);
  box-shadow: 0 1.5px 0 var(--rule-3);
  line-height: 1.4;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
  border: 1px solid transparent;
  display: flex; gap: 12px; align-items: flex-start;
}
.alert > * { min-width: 0; }
.alert.err  { background: var(--danger-dim); color: var(--danger); border-color: rgba(220,38,38,.16); }
.alert.info { background: var(--mint-soft);  color: var(--mint-deep); border-color: var(--mint-soft); }
.alert.warn { background: var(--sun-soft);   color: var(--sun-ink); border-color: rgba(255,217,61,.4); }
.alert.note { background: var(--bg-2); color: var(--ink-2); border-color: var(--rule); }

/* spinner */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--bg-3); border-top-color: var(--coral); border-radius: 50%; animation: spin .9s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* divider with text */
.divider-x { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.divider-x::before, .divider-x::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* breadcrumbs */
.crumbs-inline { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs-inline a { color: var(--ink-3); }
.crumbs-inline a:hover { color: var(--coral); }
.crumbs-inline .sep { color: var(--ink-4); }
.crumbs-inline b { color: var(--ink-2); font-weight: 600; }

/* tag list */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ———— footer ———— */
/* Компактный одно-полосный футер: слева логотип + копирайт, справа мелкие юр-ссылки. */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
  background: var(--bg);
}
footer.site .foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
footer.site .foot-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
footer.site .mark { font-family: var(--sans); font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 9px; }
footer.site .mark::before { content: ""; display: inline-block; width: 22px; height: 22px; background: url('/static/favicon.svg') center / contain no-repeat; }
footer.site .foot-copy { color: var(--ink-4); font-size: 12px; }
footer.site .foot-legal { display: flex; gap: 16px; flex-wrap: wrap; }
footer.site .foot-legal a { color: var(--ink-4); font-size: 12px; transition: color .15s; }
footer.site .foot-legal a:hover { color: var(--coral); }

/* ———— shared cards ———— */
/* stat-card — большая числовая метрика (dashboard, status, account) */
.stat-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 18px; padding: 18px 20px;
  transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--rule-3); transform: translateY(-2px); }
.stat-card .k {
  font-size: 11.5px; font-weight: 700;
  color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 0;
}
.stat-card .v {
  font-size: 32px; font-weight: 800; letter-spacing: -0.03em;
  line-height: 1; margin-top: 8px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat-card .v.coral  { color: var(--coral); }
.stat-card .v.mint   { color: var(--mint-deep); }
.stat-card .v.violet { color: var(--violet-ink); }
.stat-card .v.sun    { color: var(--sun-ink); }
.stat-card .v .u { font-size: 13px; color: var(--ink-3); margin-left: 4px; font-weight: 500; }
.stat-card .delta { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; font-weight: 600; }
.stat-card .delta a { color: var(--coral); font-weight: 600; }
.stat-card .delta a:hover { color: var(--coral-deep); }
.stat-card .delta.up { color: var(--mint-deep); }
.stat-card .delta.down { color: var(--warn); }
.stat-card--lg .v { font-size: 40px; }

/* step-card — нумерованный шаг с цветной плашкой (landing, onboarding-ish) */
.step-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--rule-3); }
.step-card .step-badge {
  font-size: 12.5px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  letter-spacing: .04em; display: inline-flex;
  background: var(--bg-3); color: var(--ink-2);
}
.step-card .step-badge.coral { background: var(--coral-soft); color: var(--coral-deep); }
.step-card .step-badge.mint  { background: var(--mint-soft);  color: var(--mint-deep); }
.step-card .step-badge.sun   { background: var(--sun-soft);   color: var(--sun-ink); }
.step-card h3 { font-size: 22px; margin-top: 16px; letter-spacing: -0.02em; }
.step-card p  { margin: 8px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }

/* empty-state — единый паттерн пустоты (списки лекций, курсов, поиска) */
.empty-state {
  padding: 56px 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 22px;
}
.empty-state.dashed { border-style: dashed; border-color: var(--rule-2); }
.empty-state .t { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.empty-state .s { font-size: 14px; color: var(--ink-3); line-height: 1.55; }

/* ———— progress-bar ———— */
/* DS-компонент горизонтального прогресс-бара. Переиспользуется в dashboard (quota-strip) и account. */
.progress-bar {
  height: 8px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.04);
}
.progress-bar--sm { height: 6px; }
.progress-bar--lg { height: 10px; }

.progress-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--sun));
  transition: width .4s linear;
}
.progress-bar--mint .progress-bar__fill { background: var(--mint); }
.progress-bar--warn .progress-bar__fill { background: var(--warn); }

/* ———— lectures list ———— */
/* Переиспользуется: dashboard.html (через include), будущие embedded-списки */
.lectures { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.lectures thead { display: none; }
.lectures tbody tr { background: var(--surface); border-radius: 20px; box-shadow: 0 4px 12px -10px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s, border-color .15s; }
.lectures tbody tr:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -22px rgba(0,0,0,.18); }
.lectures tbody td { padding: 16px 14px; vertical-align: middle; font-size: 14px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.lectures tbody td:first-child { border-left: 1px solid var(--rule); border-top-left-radius: 20px; border-bottom-left-radius: 20px; padding-left: 22px; }
.lectures tbody td:last-child { border-right: 1px solid var(--rule); border-top-right-radius: 20px; border-bottom-right-radius: 20px; padding-right: 22px; }
.lectures .lec { display: flex; gap: 16px; align-items: center; min-width: 0; }
.lectures .lec .thumb { width: 54px; height: 54px; border-radius: 14px; background: var(--bg-3); flex: none; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--ink-2); position: relative; overflow: hidden; }
.lectures .lec .thumb.proc { background: var(--coral-soft); color: var(--coral-deep); }
.lectures .lec .thumb.proc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 35%; background: rgba(231,78,45,.25); animation: proc 2.4s linear infinite; }
.lectures .lec .thumb.fail { background: var(--coral-soft); color: var(--coral-deep); }
.lectures .lec .thumb.ok { background: var(--mint-soft); color: var(--mint-deep); }
@keyframes proc { 0%{height:0} 100%{height:90%} }
.lectures .lec .meta { min-width: 0; flex: 1; }
.lectures .lec .meta .t { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38ch; }
.lectures .lec .meta .t a { color: inherit; text-decoration: none; }
.lectures .lec .meta .t a:hover { color: var(--coral); }
.lectures .lec .meta .s { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38ch; }
.lectures .when { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lectures .when b { color: var(--ink); font-weight: 700; display: block; font-size: 14px; }
.lectures .dur { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.lectures .st .chip { font-size: 11.5px; }
.lectures .actions { white-space: nowrap; text-align: right; }
.lectures .actions a { font-size: 13px; color: var(--ink-3); margin-left: 12px; font-weight: 600; text-decoration: none; }
.lectures .actions a:hover { color: var(--coral); }
.lectures .actions a.primary { color: var(--coral); }
@media (max-width: 900px) {
  .lectures tbody tr { display: block; padding: 16px; }
  .lectures tbody td { display: block; padding: 6px 0; border: 0 !important; border-radius: 0 !important; }
  .lectures .actions { text-align: left; padding-top: 10px !important; }
}

/* ———— transcript ———— */
/* Используется: lecture.html (полная версия), shared_lecture.html (публичный просмотр) */

.transcript-details { margin-top: 8px; }
.transcript-details summary.transcript-toggle {
  cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-3);
  list-style: none;
  padding: 4px 0;
  transition: color .15s;
}
.transcript-details summary.transcript-toggle::-webkit-details-marker { display: none; }
.transcript-details summary.transcript-toggle:hover { color: var(--ink-2); }
.transcript-details summary.transcript-toggle:focus-visible {
  outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px;
}

.transcript-body {
  margin-top: 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.transcript-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
  transition: background .12s;
}
.transcript-row:last-child { border-bottom: 0; }
.transcript-row:nth-child(even) { background: var(--bg-2); }
.transcript-row:hover { background: var(--bg-3); }

.transcript-ts {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 700;
  color: var(--coral-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: block;
}

.transcript-text {
  font-size: 14px; line-height: 1.6; color: var(--ink-2);
  margin: 0;
}

@media (max-width: 640px) {
  .transcript-row { grid-template-columns: 48px 1fr; gap: 10px; }
  .transcript-ts  { font-size: 10.5px; }
  .transcript-text { font-size: 13px; }
}

/* ———— utilities ———— */
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hide-mobile { }
.hide-desktop { display: none; }
.dark-only, .light-only { display: inline; }
.dark-only { display: none !important; }
.coral { color: var(--coral); }
.coral-deep { color: var(--coral-deep); }
.mint { color: var(--mint-deep); }
.sun { color: var(--sun-ink); }
.acc { color: var(--coral); }
.ink { color: var(--ink); }
.ink-2 { color: var(--ink-2); }
.ink-3 { color: var(--ink-3); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-22 { margin-top: 22px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-14 { margin-bottom: 14px; } .mb-22 { margin-bottom: 22px; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; }

@media (max-width: 900px) {
  :root { --pad: 20px; }
  section { padding: 48px 0; }
  .hide-mobile { display: none !important; }
  .hide-desktop { display: initial; }
  .btn-sm { padding: 10px 14px; }
  .lang a { padding: 6px 12px; }
}

/* Print */
@media print {
  .topbar, footer.site, .cookie-banner, .burger, .mobile-menu, .lang, .btn, .lec-tabs, .tabs-row, .actions { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .acc-card, .step-card, .plan { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; }
}
