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

:root {
  /* Общие с приложением роли берутся из tokens.css (--tk-*), сгенерированного
     из design/tokens.json; остальные оттенки — только у сайта. */
  /* warm surfaces */
  --bg:        var(--tk-bg);
  --bg-2:      var(--tk-surface-muted);
  --bg-3:      #F5EBDA;
  --bg-4:      #EEE2CC;
  --surface:   var(--tk-surface);
  --surface-2: #FDFAF3;
  --warm:      var(--tk-surface-muted);

  /* rules */
  --rule:      var(--tk-rule);
  --rule-2:    #E5DBCB;
  --rule-3:    var(--tk-rule-strong);

  /* ink */
  --ink:       var(--tk-ink);
  --ink-2:     var(--tk-ink-2);
  --ink-3:     var(--tk-ink-3);
  --ink-4:     #A4ABBC;

  /* primary accent — coral */
  --acc:       var(--tk-coral);
  --acc-hi:    var(--tk-coral-deep);
  --acc-soft:  var(--tk-coral-soft);
  --acc-dim:   rgba(255,106,74,.14);
  --acc-dim2:  rgba(255,106,74,.06);

  /* secondary accents */
  --coral:     var(--tk-coral);
  --coral-deep:var(--tk-coral-deep);
  --coral-soft:var(--tk-coral-soft);
  --mint:      #2DC8A6;
  --mint-deep: var(--tk-mint);
  --mint-soft: var(--tk-mint-soft);
  --sun:       #FFD93D;
  --sun-soft:  var(--tk-sun-soft);
  --sun-ink:   var(--tk-sun);
  --violet:    #9B7BFF;
  --violet-soft:var(--tk-violet-soft);
  --violet-ink:var(--tk-violet);

  /* semantic */
  --warn:      var(--tk-coral-deep);
  --warn-dim:  rgba(231,78,45,.10);
  --danger:    var(--tk-danger);
  --danger-dim:rgba(220,38,38,.08);
  --ok:        var(--tk-mint);

  /* 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:      var(--tk-radius-small);
  --r:         var(--tk-radius);
  --r-lg:      var(--tk-radius-large);
  --r-xl:      28px;
  --r-xxl:     32px;
  --radius:    var(--tk-radius);
  --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); }
/* Кликабельный чип-ссылка (напр. бейдж источника лекции): hover-аффорданс. */
.chip-link { text-decoration: none; cursor: pointer; transition: color .15s, background .15s; }
.chip-link:hover { color: var(--coral-deep); background: var(--coral-soft); }
.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); }
.divider-x.up-or { margin: 16px 0; }

/* Импорт по ссылке: поле с иконкой + кнопка (дашборд, лендинг). Файл и ссылка
   показываются вместе — без табов, чтобы обе опции были заметны. */
.url-import { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.url-field { position: relative; flex: 1 1 320px; min-width: 0; }
.url-field .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; color: var(--ink-3); pointer-events: none; }
.url-field .input { padding-left: 38px; }

/* 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; }
}

/* Тип записи: чипы-радио в формах загрузки и на странице записи */
.upload-opts { margin-top: 14px; display: grid; gap: 10px; text-align: left; }
.kind-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kind-lab { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; margin-right: 4px; }
.kind-chip { position: relative; cursor: pointer; }
.kind-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.kind-chip span { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule-2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s, border-color .15s; }
.kind-chip:hover span { border-color: var(--ink-3); }
.kind-chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.kind-chip input:focus-visible + span { box-shadow: var(--ring); }
.upload-extra summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-3); list-style: none; }
.upload-extra summary::before { content: "▸ "; }
.upload-extra[open] summary::before { content: "▾ "; }
.upload-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.upload-extra-grid .field { display: grid; gap: 4px; }
.upload-extra-grid .label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.upload-extra-grid .help { font-size: 12px; color: var(--ink-3); }
@media (max-width: 720px) { .upload-extra-grid { grid-template-columns: 1fr; } }

.kind-menu { margin-top: 12px; }
.kind-menu summary { list-style: none; display: inline-flex; }
.kind-menu summary::-webkit-details-marker { display: none; }
.kind-form { margin-top: 10px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: 12px; max-width: 720px; }
.kind-form .help { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.kind-banner { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--sun-soft); color: var(--sun-ink); font-size: 13.5px; line-height: 1.45; }
.kind-form .btn { justify-self: start; }

.report-participants { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 18px; }
.report-participants .lab { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; margin-right: 4px; }
.report-takeaways { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.report-takeaways li { position: relative; padding: 10px 14px 10px 36px; border-radius: var(--r); background: var(--bg-2); font-size: 15px; line-height: 1.5; }
.report-takeaways li::before { content: "★"; position: absolute; left: 14px; top: 10px; color: var(--coral); font-size: 13px; }
.lec-kind { font-size: 11.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; margin-right: 6px; }

/* Вкладки страницы записи: Конспект · Карточки · Задачи · Артефакты */
.lec-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--rule); background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.lec-tabs::-webkit-scrollbar { display: none; }
.lec-tabs button { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; font: 600 14px var(--sans); color: var(--ink-3); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.lec-tabs button .n { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--bg-3); color: var(--ink-3); font-weight: 700; }
.lec-tabs button:hover { color: var(--ink); }
.lec-tabs button.on { color: var(--ink); border-bottom-color: var(--coral); }
.lec-tabs button.on .n { background: var(--coral-soft); color: var(--coral-deep); }
.lec-panel { display: none; min-width: 0; }
.lec-shell[data-active="cards"] .lec-toc, .lec-shell[data-active="cards"] #reportRoot,
.lec-shell[data-active="tasks"] .lec-toc, .lec-shell[data-active="tasks"] #reportRoot,
.lec-shell[data-active="artifacts"] .lec-toc, .lec-shell[data-active="artifacts"] #reportRoot { display: none; }
.lec-shell[data-active="cards"] #panel-cards, .lec-shell[data-active="tasks"] #panel-tasks, .lec-shell[data-active="artifacts"] #panel-artifacts { display: block; grid-column: 1 / 3; }
@media (max-width: 1100px) { .lec-shell[data-active="cards"] #panel-cards, .lec-shell[data-active="tasks"] #panel-tasks, .lec-shell[data-active="artifacts"] #panel-artifacts { grid-column: auto; } }

/* Карточки */
.cards-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; padding: 24px 26px 28px; box-shadow: var(--shadow); }
.cards-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cards-head .h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0; }
.cards-sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cards-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 999px; padding: 3px; background: var(--bg-2); }
.seg button { appearance: none; border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: 600 13px var(--sans); color: var(--ink-3); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.cards-state { display: flex; gap: 14px; align-items: center; padding: 24px; border-radius: var(--r-lg); background: var(--bg-2); }
.cards-state .help { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cards-empty { padding: 36px 20px; text-align: center; }
.cards-empty .ic { font-size: 36px; }
.study-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.study-progress { font: 700 13px var(--mono); color: var(--ink-3); letter-spacing: .04em; }
.study-tools { display: flex; gap: 6px; }
.study-card { position: relative; min-height: 260px; perspective: 1400px; cursor: pointer; outline: none; }
.study-card .face { position: absolute; inset: 0; padding: 28px 30px; border-radius: 20px; border: 1px solid var(--rule); background: var(--bg); display: flex; flex-direction: column; gap: 12px; backface-visibility: hidden; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .2s; box-shadow: var(--shadow-sm); }
.study-card .face .lab { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.study-card .face .txt { font-size: 21px; line-height: 1.4; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; flex: 1; }
.study-card .face.back .txt { font-weight: 500; font-size: 18px; }
.study-card .face .hint { font-size: 12.5px; color: var(--ink-4); }
.study-card .face.back { transform: rotateY(180deg); background: var(--surface); border-color: var(--coral-soft); }
.study-card.flipped .face.front { transform: rotateY(180deg); }
.study-card.flipped .face.back { transform: rotateY(0); }
.study-card:focus-visible .face { box-shadow: var(--ring); }
.study-meta { display: flex; gap: 8px; align-items: center; margin: 14px 0 12px; flex-wrap: wrap; }
.study-meta .star { margin-left: auto; appearance: none; border: 1px solid var(--rule-2); background: var(--surface); border-radius: 999px; padding: 5px 12px; font: 600 12.5px var(--sans); color: var(--ink-3); cursor: pointer; }
.study-meta .star.on { background: var(--sun-soft); border-color: var(--sun); color: var(--sun-ink); }
.study-nav { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 8px; align-items: center; }
.study-nav .btn { justify-content: center; }
.study-nav .kbd { margin-left: 6px; font: 600 11px var(--mono); padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.12); }
.keys-hint { margin-top: 10px; font-size: 12.5px; color: var(--ink-4); text-align: center; }
.study-done { text-align: center; padding: 36px 20px; border-radius: 20px; background: var(--bg-2); }
.study-done .t { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.study-done .s { margin-top: 6px; color: var(--ink-3); font-weight: 600; }
.study-done .row { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cards-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cards-table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.cards-table td { padding: 10px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.45; }
.cards-table td.n { color: var(--ink-4); font: 600 12px var(--mono); width: 34px; white-space: nowrap; }
.cards-table td.n .star-mark { color: var(--sun-ink); margin-left: 4px; }
.cards-table td.q { font-weight: 600; width: 40%; }
.cards-table td[contenteditable]:focus { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 6px; background: var(--bg); }
.cards-table td.act { white-space: nowrap; text-align: right; }
.cards-table .del { appearance: none; border: 0; background: none; color: var(--ink-4); font-size: 18px; cursor: pointer; padding: 0 6px; line-height: 1; }
.cards-table .del:hover { color: var(--danger); }
@media (max-width: 720px) {
  .cards-panel { padding: 18px 16px 22px; border-radius: 16px; }
  .study-nav { grid-template-columns: 1fr 1fr; }
  .study-card .face .txt { font-size: 18px; }
  .cards-table td.q { width: auto; }
}

/* Задачи и решения */
.tasks-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; padding: 24px 26px 28px; box-shadow: var(--shadow); }
.tasks-note { margin: -6px 0 16px; font-size: 13px; }
.tasks-h { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; margin: 22px 0 10px; color: var(--ink); }
.tasks-h:first-of-type { margin-top: 6px; }
.task-decisions, .task-questions { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.task-decisions li, .task-questions li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 14px; border-radius: var(--r); background: var(--bg-2); font-size: 15px; line-height: 1.5; }
.task-decisions .ts, .task-questions .ts, .task-meta .ev summary { font: 600 11.5px var(--mono); color: var(--ink-3); padding-top: 4px; }
.task-decisions .ev, .task-meta .ev { grid-column: 1 / 3; font-size: 13px; color: var(--ink-2); }
.task-decisions .ev summary, .task-meta .ev summary { cursor: pointer; display: inline; padding: 0; }
.task-decisions .ev[open] span, .task-meta .ev[open] span { display: block; margin-top: 4px; font-style: italic; }
.task-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.task-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.task-row.review { border-style: dashed; background: var(--bg); }
.task-row.done .task-text { text-decoration: line-through; color: var(--ink-3); }
.task-check { padding-top: 2px; }
.task-check input { width: 18px; height: 18px; accent-color: var(--coral); cursor: pointer; }
.task-check .box { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--rule-3); }
.task-check .box.on { background: var(--mint); border-color: var(--mint); }
.task-text { font-size: 15px; font-weight: 600; line-height: 1.45; }
.task-meta { margin-top: 4px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.task-meta .dim { color: var(--ink-4); }
.task-meta .approx { color: var(--sun-ink); font-weight: 700; cursor: help; }
.task-meta .sep { color: var(--ink-4); }
.task-actions { display: flex; gap: 2px; }
.task-actions button { appearance: none; border: 0; background: none; color: var(--ink-4); font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.task-actions button:hover { color: var(--ink); background: var(--bg-2); }
.task-edit { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task-edit .input { padding: 8px 12px; font-size: 13.5px; }
.task-edit input[name=owner] { flex: 1 1 160px; }
@media (max-width: 720px) {
  .tasks-panel { padding: 18px 16px 22px; border-radius: 16px; }
  .task-row { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 10px 12px; }
}
.task-edit[hidden], .cards-list[hidden], .cards-study[hidden], .study-done[hidden] { display: none; }

/* Поповер «Доступ» на странице записи */
.share-menu { position: relative; display: inline-block; }
.share-menu summary { list-style: none; display: inline-flex; cursor: pointer; }
.share-menu summary::-webkit-details-marker { display: none; }
.share-menu .panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 380px; max-width: calc(100vw - 32px); padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-lg); text-align: left; }
.share-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.share-form { display: grid; gap: 8px; }
.share-opt { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; }
.share-opt.on { border-color: var(--coral); background: var(--coral-soft); }
.share-opt input { margin-top: 3px; accent-color: var(--coral); }
.share-opt b { display: block; font-size: 14px; }
.share-opt small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.share-transcript { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); padding: 4px 2px; }
.share-transcript input { accent-color: var(--coral); }
.share-form .btn { justify-self: start; }
.share-url { display: flex; gap: 6px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.share-url input { flex: 1; min-width: 0; font: 500 12.5px var(--mono); padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: var(--bg); color: var(--ink-2); }
.share-rotate { margin-top: 8px; display: flex; gap: 8px; align-items: baseline; }
.share-rotate .link-dim { appearance: none; border: 0; background: none; padding: 0; font: 600 12.5px var(--sans); color: var(--ink-3); cursor: pointer; text-decoration: underline; }
.share-rotate .help { font-size: 12px; color: var(--ink-4); margin: 0; }
@media (max-width: 720px) { .share-menu .panel { right: auto; left: 0; } }

/* Кошелёк минут: мини-пакеты, история, карточка «ждёт минут» */
.packs-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pack-mini { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--surface); text-decoration: none; color: var(--ink); min-width: 110px; }
.pack-mini b { font-size: 15px; }
.pack-mini span { font-size: 12.5px; color: var(--ink-3); }
.pack-mini.on { border-color: var(--coral); background: var(--coral-soft); }
.pack-mini:hover { border-color: var(--ink-3); }
.wallet-history { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.wallet-history td { padding: 8px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.wallet-history td.d { font: 500 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.wallet-history td.n { text-align: right; font: 700 13px var(--mono); white-space: nowrap; }
.wallet-history td.n.plus { color: var(--mint-deep); }
.wallet-history td.n.minus { color: var(--ink-2); }
.wallet-history .dim { color: var(--ink-4); }
.awaiting-card { background: var(--surface); border: 1px solid var(--coral-soft); border-radius: 22px; padding: 26px 28px; box-shadow: var(--shadow); margin-bottom: 16px; }
.awaiting-card h3 { font-size: 22px; letter-spacing: -0.02em; margin: 10px 0 8px; }
.awaiting-card p { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0 0 14px; }
.awaiting-packs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.awaiting-packs .pack { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--rule-2); text-decoration: none; color: var(--ink); min-width: 120px; }
.awaiting-packs .pack b { font-size: 16px; }
.awaiting-packs .pack span { font-size: 13px; color: var(--ink-3); }
.awaiting-packs .pack.on { border-color: var(--coral); background: var(--coral-soft); }

/* Артефакты: витрина типов, карточки схем/графиков/таблиц/картинок */
.artifacts-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; padding: 24px 26px 28px; box-shadow: var(--shadow); }
.artifacts-panel .h2 .chip { vertical-align: middle; margin-left: 6px; }
.art-alert { margin: 0 0 14px; }
.art-create { border: 1px solid var(--rule); border-radius: 16px; padding: 16px 18px 18px; background: var(--bg-2); margin-bottom: 22px; }
.art-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.art-type input { position: absolute; opacity: 0; pointer-events: none; }
.art-type-card { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 12px; background: var(--surface); cursor: pointer; min-height: 100%; transition: border-color .12s, box-shadow .12s; }
.art-type-card b { font-size: 13.5px; }
.art-type-card small { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.art-type input:checked + .art-type-card { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral-soft); }
.art-type input:focus-visible + .art-type-card { outline: 2px solid var(--coral); outline-offset: 2px; }
.art-type.off .art-type-card { opacity: .55; cursor: not-allowed; }
.art-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.art-ideas-h { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.art-idea { cursor: pointer; font: 600 12.5px var(--sans); }
.art-brief { display: block; margin-top: 14px; }
.art-brief span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.art-brief textarea { width: 100%; resize: vertical; font: 14px/1.45 var(--sans); padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.art-create-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.art-create-foot .help { font-size: 12.5px; color: var(--ink-3); }
.art-list { display: grid; gap: 16px; }
.art-card { border: 1px solid var(--rule); border-radius: 16px; padding: 16px 18px; background: var(--surface); }
.art-card.status-failed { border-color: var(--rule-2); }
.art-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.art-title h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.art-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.art-actions form.inline, .art-failed form.inline, .art-delete { display: inline; }
.art-body { margin-top: 14px; }
.art-canvas { min-height: 80px; overflow-x: auto; }
/* Схема рисуется в свою натуральную ширину (Mermaid сам её проставляет) — в
   широкой карточке центрируем, иначе она липнет к левому краю. */
.art-diagram .art-canvas { display: grid; place-items: center; }
.art-diagram .art-canvas svg { height: auto; }
.art-diagram .art-canvas[aria-busy="true"]::before { content: ""; display: block; height: 80px; border-radius: 10px; background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); }
.art-chart .art-canvas { position: relative; height: 340px; }
.art-code { font: 12px/1.5 var(--mono); white-space: pre-wrap; color: var(--ink-3); background: var(--bg-2); padding: 10px 12px; border-radius: 10px; }
.art-table-wrap { overflow-x: auto; }
.art-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.art-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--rule-2); }
.art-table td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.art-image img { display: block; max-width: 100%; border-radius: 12px; border: 1px solid var(--rule); }
.art-check { margin: 10px 0 0; font-size: 13px; font-weight: 600; }
.art-check.ok { color: var(--mint); }
.art-check.warn { color: var(--warn); }
.art-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.art-brief-note { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); font-style: italic; }
.art-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule); flex-wrap: wrap; }
.art-refine { flex: 1 1 360px; display: grid; gap: 8px; }
.art-refine textarea { width: 100%; resize: vertical; font: 13.5px/1.45 var(--sans); padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--bg-2); color: var(--ink); }
.art-refine[hidden] { display: none; }
.art-foot .btn.danger { color: var(--danger); }
.art-empty { padding: 28px 0 10px; }
@media (max-width: 720px) {
  .artifacts-panel { padding: 18px 16px 22px; border-radius: 16px; }
  .art-types { grid-template-columns: repeat(2, 1fr); }
}

/* Диалог опций загрузки (тип записи, дата, участники, артефакты) — после выбора файла */
.upload-dialog { border: 1px solid var(--rule); border-radius: 22px; padding: 0; width: min(580px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.upload-dialog::backdrop { background: rgba(21, 22, 26, .45); backdrop-filter: blur(2px); }
.upload-dialog-form { padding: 24px 26px 22px; display: grid; gap: 16px; }
.upload-dialog .ud-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.upload-dialog .ud-head p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.upload-dialog .ud-file { font: 600 12.5px var(--mono); color: var(--ink-2); background: var(--bg-2); border-radius: 10px; padding: 8px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-dialog .kind-row { margin: 0; }
.upload-dialog .upload-extra-grid { margin: 0; }
.upload-dialog .ud-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.upload-dialog .ud-check input { margin-top: 4px; accent-color: var(--coral); flex: none; }
.upload-dialog .ud-check .help { color: var(--ink-3); font-size: 13px; }
.upload-dialog .ud-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
@media (max-width: 560px) { .upload-dialog-form { padding: 18px 16px; } .upload-dialog .ud-actions .btn { flex: 1; } }

/* Декоративные листы конспекта (лендинг, /for/*): лекция с глоссарием и созвон */
.hs-sheet { position: absolute; width: 272px; background: var(--surface); border-radius: 22px; padding: 18px 20px 16px; box-shadow: 0 30px 60px -30px rgba(26,34,51,.32); }
.hs-sheet.hs-static { position: relative; }
.hs-sheet .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.hs-sheet .head span:last-child { text-transform: none; letter-spacing: 0; font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.hs-sheet .kicker { font-size: 10.5px; font-weight: 700; color: var(--coral); letter-spacing: .12em; text-transform: uppercase; }
.hs-lec .kicker { color: var(--mint-deep); }
.hs-sheet .pT { font-size: 19px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 12px; }
.hs-sheet .grp { font-size: 10px; font-weight: 700; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 4px; }
.hs-sheet .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px; font-size: 12px; color: var(--ink-2); padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.hs-sheet .row:last-of-type { border-bottom: 0; }
.hs-sheet .row .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-sheet .row .n { color: var(--ink-3); margin-right: 6px; font-family: var(--mono); font-size: 11px; }
.hs-meet .row .n { color: var(--mint); font-weight: 800; font-family: var(--sans); }
.hs-sheet .row .ts { color: var(--ink-3); white-space: nowrap; font-size: 11px; font-family: var(--mono); }
.hs-lec { padding-bottom: 54px; }
.hs-gl { position: absolute; right: -14px; bottom: -28px; width: 184px; background: var(--bg-2); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); transform: rotate(2deg); }
.hs-gl .k { font-size: 9.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.hs-gl .h { font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.hs-gl .terms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.hs-gl .terms span { padding: 4px 8px; background: var(--surface); border-radius: 8px; font-size: 10.5px; font-weight: 600; }

/* «Для кого»: два листа в стиле сайта — боль от руки, что даёт Lecta чипами */
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
/* subgrid: строки (шапка, заголовок, боли, «соберёт», ссылка) выровнены между двумя карточками */
.who-sheet { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 24px; padding: 24px 26px 22px; display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 14px; }
.who-sheet .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.who-sheet .head .k { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.who-sheet.pro .head .k { color: var(--mint-deep); }
.who-sheet .head .hand { font-family: var(--hand); font-size: 24px; color: var(--coral); line-height: 1; transform: rotate(-3deg); }
.who-sheet.pro .head .hand { color: var(--mint-deep); transform: rotate(2deg); }
.who-sheet h3 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -0.025em; }
.who-sheet .pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.who-sheet .pains li { font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.who-sheet .gets { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.who-sheet .gets .lab { width: 100%; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.who-sheet .cta { align-self: end; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.who-sheet .cta:hover { color: var(--coral); }

/* Вузы: ровная сетка имён без блоков, заголовка нет — говорит сноска */
.unis-grid { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 12px 24px; }
@media (max-width: 1100px) { .unis-grid { grid-template-columns: repeat(4, auto); } }
.unis-grid li { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.unis .fn { margin: 18px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* Посадочные /for/*: hero с листом справа */
.uc-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) 340px; gap: 40px; align-items: start; }
.uc-hero .uc-visual { position: relative; min-height: 420px; padding-top: 28px; }
.uc-hero .uc-visual .hs-sheet { margin: 0 0 0 auto; transform: rotate(-2.5deg); }
.uc-hero .uc-visual .hs-meet { transform: rotate(2deg); }
.uc-hero .uc-visual .hand-note { position: absolute; top: -8px; left: 0; font-family: var(--hand); font-size: 22px; color: var(--coral); transform: rotate(-3deg); white-space: nowrap; }
.uc-sample { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.uc-sample:hover { color: var(--coral); }

/* О проекте: факты и ссылки */
.ab-facts { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ab-facts li { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ab-more { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 48px; }
.ab-more .lab { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }

@media (max-width: 900px) {
  .who-grid, .uc-hero { grid-template-columns: 1fr; }
  .uc-hero .uc-visual { display: none; }
  .unis-grid { grid-template-columns: repeat(2, 1fr); justify-content: start; }
  .ab-facts { grid-template-columns: repeat(2, 1fr); }
  .who-sheet h3 { font-size: 21px; }
}
