/* =====================================================================
   CREO — Neon Studio design system
   Dark, neon-lime accent. Fonts: Unbounded (display), Manrope (body),
   Space Mono (mono labels). Ported from the Claude Design prototype.
   ===================================================================== */

:root {
  color-scheme: dark;

  --bg: #0a0b0e;
  --panel: #14161c;
  --panel2: #1b1e26;
  --fg: #f5f5f2;
  --muted: rgba(245, 245, 242, 0.56);
  --border: rgba(255, 255, 255, 0.09);
  --dots: rgba(255, 255, 255, 0.05);
  --accent: oklch(0.87 0.21 132);
  --on-accent: #0a0b0e;
  --danger: #ff6b5e;

  --pad: clamp(20px, 5vw, 60px);
  --radius: 14px;
  --radius-lg: 20px;
  --pill: 999px;

  --font-display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  font-family: var(--font-body);
}

@keyframes scrollx { to { transform: translateX(-50%); } }
@keyframes glowpulse { 0%, 100% { opacity: .85; } 50% { opacity: .5; } }

* { box-sizing: border-box; }

::selection { background: var(--accent); color: var(--on-accent); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }

img { max-width: 100%; display: block; }

/* ---------------------------------------------------------------- nav */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a:not(.button) {
  position: relative;
  color: color-mix(in oklab, var(--fg) 80%, transparent);
  font-size: 14px;
  font-weight: 600;
  transition: color .15s ease;
}

.nav a:not(.button):hover { color: var(--fg); }

/* animated underline that grows from the left on hover (inline bar) */
.nav a:not(.button):not(.notif-bell)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav a:not(.button):not(.notif-bell):hover::after { transform: scaleX(1); }

/* ---- hamburger + off-canvas sidebar (mobile, or when the bar overflows) ----
   The nav stays an inline row until JS adds `.nav-collapsed` to the topbar —
   set on mobile for everyone, and on wider screens whenever the links no longer
   fit (e.g. staff with many buttons). Collapsed, the nav slides in from the right. */
.nav-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--fg);
  cursor: pointer;
  z-index: 210;
}
.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle-lines { position: relative; }
.nav-toggle-lines::before { position: absolute; left: 0; top: -6px; }
.nav-toggle-lines::after  { position: absolute; left: 0; top: 6px; }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .26s ease, visibility .26s ease;
}

.topbar.nav-collapsed .nav-toggle { display: inline-flex; }

.topbar.nav-collapsed .nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(320px, 84vw);
  flex-direction: column;
  /* Single column: the mobile media query sets `.nav { flex-wrap: wrap }`, which
     in a column would wrap links into a second, off-screen column instead of
     overflowing downward — killing the scroll. Force nowrap so they stack and
     the container scrolls vertically. */
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  padding: 84px 20px 28px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .38);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  z-index: 200;
}

.topbar.nav-collapsed .nav a:not(.button),
.topbar.nav-collapsed .nav .theme-toggle,
.topbar.nav-collapsed .nav a.button {
  flex: 0 0 auto;  /* keep natural height so the column overflows → scrolls */
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.topbar.nav-collapsed .nav a:not(.button):hover,
.topbar.nav-collapsed .nav .theme-toggle:hover {
  background: var(--panel2);
  color: var(--fg);
  transform: translateX(4px);
}
.topbar.nav-collapsed .nav a.button { justify-content: center; margin-top: 6px; }
.topbar.nav-collapsed .nav a::after { content: none; }  /* no inline underline in the sidebar */

/* In the sidebar rows the notification badge sits inline after its label, not as
   a floating corner superscript (which would detach to the row's edge). */
.topbar.nav-collapsed .nav .notif-count {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  vertical-align: middle;
}

/* open state (JS toggles `.nav-open` on <body>) */
body.nav-open { overflow: hidden; }
/* The sidebar lives inside .topbar, which is `position: sticky; z-index: 60` — its
   own stacking context. The backdrop is a body-level element at z-index 190, so it
   would paint OVER the sidebar and swallow every hover/scroll/click. Lift the whole
   topbar above the backdrop while open so the sidebar actually receives events. */
body.nav-open .topbar { z-index: 200; }
body.nav-open .topbar.nav-collapsed .nav { transform: translateX(0); }
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
body.nav-open .nav-toggle-lines { background: transparent; }
body.nav-open .nav-toggle-lines::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle-lines::after  { transform: translateY(-6px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .topbar.nav-collapsed .nav { transition: none; }
}

/* ------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease, background .15s, color .15s;
}

.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button.secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}

.button.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
}

.button.disabled,
.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------------------------------------------- generic layout sections */

.section,
.band,
.workspace {
  padding: clamp(48px, 7vw, 90px) var(--pad);
  max-width: 1280px;
  margin: 0 auto;
}

.workspace.narrow { max-width: 900px; }

.band { background: var(--panel2); max-width: none; }
.band > * { max-width: 1280px; margin-inline: auto; }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-heading h1,
.section-heading h2 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 10px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* -------------------------------------------------------------- cards */

.card,
.band article,
.price-card,
.course-row,
.lesson-row,
.empty-state,
.side-panel,
.form-card,
.copy-block,
.review-box,
.submission-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 22px;
}

.band article:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); }

/* --------------------------------------------------------------- grids */

.grid,
.pricing-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.dashboard-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }

/* ============================================================ LANDING */

.creo-hero {
  position: relative;
  padding: clamp(48px, 6vw, 80px) var(--pad) 0;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

.creo-hero .glow {
  position: absolute;
  top: -180px;
  right: -100px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 24%, transparent), transparent 64%);
  animation: glowpulse 6s ease-in-out infinite;
  pointer-events: none;
}

.creo-hero .hero-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  align-items: center;
}

.hero-col { flex: 1 1 360px; min-width: 300px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.creo-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 0.98;
}

.creo-hero h1 .accent { color: var(--accent); }

.lead {
  margin: 22px 0 0;
  max-width: 440px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-stats .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
}

.hero-stats .label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.hero-media {
  height: clamp(220px, 26vw, 320px);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: repeating-linear-gradient(135deg, var(--dots) 0 12px, transparent 12px 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.play-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.hero-media .tag {
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.hero-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.hero-thumbs > div {
  position: relative;
  flex: 1;
  height: 88px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--dots) 0 10px, transparent 10px 20px);
}
.hero-thumbs > div img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ticker */
.ticker {
  margin-top: clamp(40px, 5vw, 64px);
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  animation: scrollx 36s linear infinite;
  will-change: transform;
}

.ticker-group {
  display: inline-block;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* mono section label (the "/ что ты создашь" style) */
.kicker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.block-title {
  margin: 14px 0 0;
  font-size: clamp(28px, 5vw, 40px);
  max-width: 680px;
}

/* outcomes */
.outcomes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.outcome-card {
  flex: 1 1 230px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 22px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}

.outcome-card:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); transform: translateY(-3px); }

.outcome-card .thumb {
  position: relative;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--dots) 0 10px, transparent 10px 20px);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.outcome-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.outcome-card h3 { font-family: var(--font-body); font-weight: 800; font-size: 18px; letter-spacing: 0; }
.outcome-card p { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 6px; }

/* program modules */
.modules {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
}

.module-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 24px 26px;
}

.module-row.featured {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, var(--panel));
}

.module-row .num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  color: var(--accent);
  min-width: 60px;
}

.module-row .body { flex: 1 1 240px; }
.module-row .body strong { font-family: var(--font-body); font-weight: 800; font-size: 20px; }
.module-row .body p { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 4px; }

.module-row .meta {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

/* how it works */
.how-head {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-end;
  justify-content: space-between;
}

.how-head p { font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 340px; }

.how-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.how-card {
  flex: 1 1 220px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 24px;
}

.how-card .num { font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--accent); }
.how-card strong { display: block; font-weight: 800; font-size: 17px; margin-top: 14px; }
.how-card p { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 6px; }

/* gallery */
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
}

.gallery-head .link { font-weight: 700; font-size: 13px; color: var(--accent); }

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.gallery-tile {
  flex: 1 1 200px;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: repeating-linear-gradient(135deg, var(--dots) 0 11px, transparent 11px 22px);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* mentor */
.mentor-card {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: center;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: clamp(24px, 4vw, 40px);
}

.mentor-card .photo {
  flex: 0 0 auto;
  width: 160px;
  height: 160px;
  border-radius: 20px;
  background: repeating-linear-gradient(135deg, var(--dots) 0 10px, transparent 10px 20px);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.mentor-card .info { flex: 1 1 300px; }
.mentor-card h3 { margin-top: 12px; font-size: clamp(24px, 4vw, 30px); }
.mentor-card .info > p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 560px; }

.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

/* pricing */
.pricing-head { text-align: center; margin-bottom: 40px; }

.price-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 28px;
}

.price-card h2,
.price-card h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
}

.price-card > p { font-size: 13px; color: var(--muted); margin-top: 4px; }

.price-card .price,
.price-card strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  margin: 20px 0;
}

.price-card ul {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.price-card ul li::before { content: "✓ "; color: var(--accent); font-weight: 800; }

.price-card .button,
.price-card .button.secondary { margin-top: 24px; width: 100%; }

/* job-placement perk on the most expensive plan */
.job-offer {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 45%, var(--border));
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.job-offer strong {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  margin: 0;
  color: var(--fg);
}
.job-offer span { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.price-card.featured {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 9%, var(--panel));
  position: relative;
}

.price-card .badge {
  position: absolute;
  top: -12px;
  left: 28px;
  padding: 5px 12px;
  border-radius: var(--pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
}

/* ---- tariff comparison table ---- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 8px;
}
.compare th, .compare td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-corner {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  width: 42%;
}
.compare-tier {
  position: relative;
  text-align: center;
  width: 19%;
}
.compare-tier .ct-name { display: block; font-family: var(--font-body); font-weight: 800; font-size: 16px; }
.compare-tier .ct-price { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.compare-tier .badge { position: static; display: inline-block; margin-bottom: 8px; }
.compare-tier.featured { background: color-mix(in oklab, var(--accent) 10%, transparent); border-radius: 16px 16px 0 0; }
.compare-cell { text-align: center; font-size: 16px; }
.compare-cell.featured { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.compare-feature { font-size: 13.5px; line-height: 1.4; }
.compare .yes { color: var(--accent); font-weight: 800; }
.compare .no { color: var(--muted); opacity: 0.6; }
.compare tbody tr:last-child td { border-bottom: 0; }
.button.small { padding: 8px 16px; font-size: 13px; min-height: auto; }

/* ---- standalone marketplace tariff ---- */
.mp-card {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  background: color-mix(in oklab, var(--accent) 8%, var(--panel));
}
.mp-info { flex: 1 1 360px; }
.mp-info h3 { font-family: var(--font-display); font-weight: 900; font-size: 26px; margin: 6px 0 8px; }
.mp-info p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.mp-info ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.mp-info ul li::before { content: "✓ "; color: var(--accent); font-weight: 800; }
.mp-buy { flex: 0 0 auto; text-align: center; }
.mp-buy .price { font-family: var(--font-display); font-weight: 900; font-size: 32px; margin-bottom: 14px; }

/* faq */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
}

.faq-item {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 0;
}

.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }

.faq-item .answer {
  padding: 0 22px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* final CTA + lead */
.lead-section {
  padding: clamp(56px, 7vw, 90px) var(--pad);
  background: color-mix(in oklab, var(--accent) 10%, var(--bg));
  border-top: 1px solid var(--border);
}

.lead-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.lead-copy { flex: 1 1 320px; }
.lead-copy h2 { font-size: clamp(28px, 5vw, 40px); max-width: 480px; }
.lead-copy p { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 440px; }

.lead-form {
  flex: 1 1 320px;
  max-width: 440px;
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-form .fineprint { font-size: 11px; color: var(--muted); text-align: center; }

/* ============================================================ FORMS */

.auth-panel {
  display: grid;
  place-items: start center;
  min-height: 72vh;
  padding: clamp(40px, 6vw, 80px) var(--pad);
}

.auth-panel.wide .form-card { width: min(920px, 100%); }

.form-card { width: min(520px, 100%); }

.form-card h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 8px; }

.form-card > p { color: var(--muted); font-size: 14px; line-height: 1.55; }

.form-card label,
.support-dialog label,
.lead-form label {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  border: 1px solid color-mix(in oklab, var(--fg) 20%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--fg) 6%, var(--panel));
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px; /* >=16px so iOS Safari doesn't zoom on focus */
  font-weight: 500;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}

input::placeholder, textarea::placeholder { color: var(--muted); }

textarea { resize: vertical; min-height: 110px; }

select { appearance: none; cursor: pointer; }

.checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.checkbox input { width: auto; min-height: auto; }

.form-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* drag & drop file zone */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 82px;
  padding: 18px;
  border: 1.5px dashed color-mix(in oklab, var(--fg) 22%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--fg) 4%, var(--panel));
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 9%, var(--panel));
}

.dropzone.has-file { border-style: solid; border-color: var(--accent); }
.dropzone.dragover { border-style: solid; }

.dz-text { font-size: 13px; color: var(--muted); pointer-events: none; word-break: break-word; }
.dropzone.has-file .dz-text { color: var(--fg); font-weight: 600; }

.dz-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legal-list { display: grid; gap: 10px; margin: 18px 0; }

.legal-list details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg);
}

.legal-list summary { cursor: pointer; font-weight: 700; }

.legal-body {
  max-height: 240px;
  overflow: auto;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ----------------------------------------------------------- messages */

.messages {
  position: fixed;
  top: 84px;
  right: 18px;
  z-index: 70;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 36px));
}

.message {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.message.error,
.message.warning {
  border-color: var(--danger);
  color: var(--danger);
}

/* ============================================== DASHBOARD (Кабинет) */

.dash-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.dash-head .hello { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.dash-head h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 6px; }

.dash-progress { text-align: right; }
.dash-progress .pct { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--accent); }
.dash-progress .label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.course-row,
.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.course-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 22px;
  margin-bottom: 14px;
}

.course-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.course-card-top h2 { font-family: var(--font-body); font-weight: 800; font-size: 19px; letter-spacing: 0; }
.course-pct { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--accent); }

.progress-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--panel2);
  overflow: hidden;
  margin: 16px 0 12px;
}

.progress-bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }

.course-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.muted-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.course-row h2,
.lesson-row h2 { font-family: var(--font-body); font-weight: 800; font-size: 19px; letter-spacing: 0; }
.course-row p,
.lesson-row p { color: var(--muted); font-size: 13px; margin-top: 4px; }

.lesson-row.locked { opacity: 0.6; }

.lock,
.access-note {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}

.access-note.warning { border-color: var(--danger); color: var(--danger); }

.side-panel h2 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.side-panel h2 + h2 { margin-top: 22px; }
.side-panel p { font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.side-panel a:not(.button) { color: var(--accent); }

.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 16px; }

/* ================================================= LESSON (Урок) */

.lesson-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: calc(100vh - 72px);
}

.lesson-content {
  min-width: 0;
  padding: clamp(20px, 3vw, 36px);
}

.lesson-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.lesson-back:hover { color: var(--accent); }

.lesson-aside {
  border-left: 1px solid var(--border);
  padding: 28px 22px;
  background: var(--panel);
}

.lesson-aside > a:not(.button) {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.lesson-aside h1 { font-size: 22px; }
.lesson-aside p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 12px 0; }

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #050706;
  aspect-ratio: 16 / 9;
}

.secure-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #050706; }

.video-watermark {
  position: absolute;
  inset: 14px 14px auto auto;  /* top-right, clear of the control bar */
  z-index: 7;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono);
  font-size: 13px;
  pointer-events: none;
  user-select: none;
}

/* marketing (landing) video */
.promo-box {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0c10;
}
.promo-box video, .promo-box img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.promo-box:fullscreen, .promo-box:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; background: #000; }
.promo-box:fullscreen video, .promo-box:-webkit-full-screen video { object-fit: contain; }

/* Theme tint: a translucent accent layer over landing media (images + promo video)
   so everything reads as one styled set in the current theme (lime / pink).
   mix-blend-mode: color recolors toward the accent hue while keeping detail. */
body[data-tint="on"] .promo-box::after,
body[data-tint="on"] .hero-thumbs > div::after,
body[data-tint="on"] .outcome-card .thumb::after,
body[data-tint="on"] .gallery-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: 0.38;
  pointer-events: none;
  border-radius: inherit;
}
/* Keep the fullscreen promo video true-to-color. */
.promo-box:fullscreen::after, .promo-box:-webkit-full-screen::after { display: none; }

/* custom player control bar */
.vp-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.vp-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.vp-btn svg { width: 21px; height: 21px; display: block; }
.vp-mute { position: relative; }
.vp-mute .vp-x { position: absolute; inset: 0; margin: auto; }

.vp-time { color: #fff; font: 600 12px var(--font-mono); white-space: nowrap; }

.vp-seek {
  flex: 1;
  min-width: 60px;
  height: 5px;
  accent-color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.vp-vol { width: 72px; height: 5px; flex: 0 0 auto; accent-color: var(--accent); background: transparent; cursor: pointer; }

/* ---- speed + quality popovers (separate compact buttons) ---- */
.vp-pop-wrap { position: relative; flex: 0 0 auto; display: flex; }
.vp-pop-wrap[hidden] { display: none; }
.vp-speed-btn { width: auto; min-width: 42px; padding: 0 8px; }
.vp-speed-cur { font: 800 13px var(--font-body); color: #fff; white-space: nowrap; }
.vp-pop[hidden] { display: none; }
.vp-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  min-width: 74px;
  border-radius: 12px;
  background: rgba(12, 14, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 8;
}
.vp-pop-opt {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: 700 13px var(--font-body);
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}
.vp-pop-opt:hover { background: rgba(255, 255, 255, 0.12); }
.vp-pop-opt.on { background: var(--accent); color: var(--on-accent); }

/* loading / buffering spinner */
.vp-spinner {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  pointer-events: none;
}
.video-box.is-loading .vp-spinner { display: grid; }
.vp-spinner i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent);
  animation: vp-spin 0.8s linear infinite;
}
@keyframes vp-spin { to { transform: rotate(360deg); } }

/* Fullscreen the container (not the bare <video>) so watermark + controls stay overlaid. */
.video-box:fullscreen,
.video-box:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-box:fullscreen .secure-video,
.video-box:-webkit-full-screen .secure-video { width: 100%; height: 100%; }

.video-box:fullscreen .video-watermark,
.video-box:-webkit-full-screen .video-watermark { inset: 24px 26px auto auto; font-size: 15px; }

@media (max-width: 560px) {
  /* On phones the control bar sits BELOW the video (solid strip) instead of overlaying
     it, so it never covers the picture. The video keeps its 16:9 ratio. */
  .video-box { aspect-ratio: auto; }
  .secure-video { aspect-ratio: 16 / 9; height: auto; }
  .vp-bar {
    position: static;
    background: #0c0e14;
    border-top: 1px solid var(--border);
    gap: 6px;
    padding: 8px 10px;
    flex-wrap: nowrap;
  }
  .vp-time, .vp-vol { display: none; }
  .vp-btn { width: 40px; height: 40px; }
  .vp-speed-btn { min-width: 46px; }
  /* popovers open upward from the bottom strip, anchored to their button (small, fit) */
  .vp-pop { bottom: calc(100% + 8px); }
  /* Fullscreen: restore the overlay bar at the very bottom. */
  .video-box:fullscreen, .video-box:-webkit-full-screen { aspect-ratio: auto; }
  .video-box:fullscreen .vp-bar, .video-box:-webkit-full-screen .vp-bar {
    position: absolute; left: 0; right: 0; bottom: 0; border-top: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  }
  .video-box:fullscreen .secure-video, .video-box:-webkit-full-screen .secure-video { height: 100%; aspect-ratio: auto; }
}

.video-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--danger);
  background: rgba(0, 0, 0, 0.7);
}

.article-body {
  max-width: 760px;
  margin: 28px 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
}

.article-body p { margin-bottom: 16px; }

.copy-block { margin: 18px 0; }

.copy-block h2,
.review-box h2 { font-family: var(--font-body); font-weight: 800; font-size: 18px; letter-spacing: 0; }

.copy-block .eyebrow { margin-bottom: 4px; }

.copy-block pre,
.review-box pre {
  overflow: auto;
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0e1108;
  color: #d6f5b8;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.review-box { margin-top: 18px; }

.video-placeholder {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(135deg, var(--dots) 0 12px, transparent 12px 24px);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
}

.text-block { margin: 22px 0; }
.text-block .eyebrow { margin-bottom: 4px; }
.text-block h2 { font-family: var(--font-body); font-weight: 800; font-size: 18px; letter-spacing: 0; margin-bottom: 8px; }

.homework-card {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--accent) 7%, var(--panel));
}

.homework-card h2 { font-family: var(--font-body); font-weight: 800; font-size: 20px; letter-spacing: 0; margin: 6px 0; }
.homework-card.is-project { border-color: var(--gold, #e6b800); background: color-mix(in oklab, #e6b800 8%, var(--panel)); }

.project-banner {
  margin: 14px 0;
  padding: 14px 18px;
  border: 1px solid color-mix(in oklab, #e6b800 50%, var(--border));
  border-radius: 14px;
  background: color-mix(in oklab, #e6b800 10%, transparent);
  color: var(--fg);
  font-weight: 600;
  font-size: 14px;
}
.homework-card .hw-meta { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }
.homework-card .button { margin-top: 6px; }
.hw-review { margin: 12px 0; font-size: 14px; line-height: 1.55; }

.hw-status {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--panel2);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  margin: 4px 0 12px;
}

.hw-status.hw-passed { border-color: var(--accent); color: var(--accent); }
.hw-status.hw-failed { border-color: var(--danger); color: var(--danger); }
.hw-status.hw-needs_revision { border-color: var(--gold, #e6b800); color: #e6b800; }

.lesson-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--pill);
  border: 1px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 800;
}

.lesson-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }

/* quiz */
.quiz-card {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.quiz-card h2 { font-family: var(--font-body); font-weight: 800; font-size: 20px; letter-spacing: 0; margin: 6px 0; }

.quiz-banner {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  font-weight: 600;
}
.quiz-banner.ok { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); }
.quiz-banner.fail { border-color: var(--danger); color: var(--danger); background: color-mix(in oklab, var(--danger) 8%, transparent); }
.quiz-banner.info { border-color: var(--border); color: var(--muted); background: var(--panel2); }

.quiz-result {
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--fg) 3%, transparent);
}
.quiz-result.is-pass { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); }
.quiz-result.is-fail { border-color: color-mix(in oklab, var(--danger) 45%, var(--border)); }
.quiz-score-ring {
  width: 116px; height: 116px; margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 4px solid var(--border);
}
.quiz-result.is-pass .quiz-score-ring { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.quiz-result.is-fail .quiz-score-ring { border-color: var(--danger); background: color-mix(in oklab, var(--danger) 10%, transparent); }
.quiz-score-num { font-family: var(--font-display, var(--font-body)); font-weight: 800; font-size: 36px; line-height: 1; }
.quiz-result.is-pass .quiz-score-num { color: var(--accent); }
.quiz-result.is-fail .quiz-score-num { color: var(--danger); }
.quiz-score-pct { font-size: 18px; margin-left: 1px; }
.quiz-result-title { margin: 6px 0 4px; }
.quiz-result-line { color: var(--muted); margin-bottom: 8px; }
.quiz-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

.quiz-form { display: flex; flex-direction: column; gap: 16px; }
.quiz-form.is-hidden { display: none; }

.quiz-q {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 18px 20px;
  margin: 0;
}
.quiz-q legend { font-weight: 700; font-size: 16px; padding: 0 6px; }
.quiz-multi { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; }

.quiz-opt {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  margin: 10px 0 !important;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-weight: 500;
}
.quiz-opt:hover { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 6%, transparent); }
.quiz-opt input { width: auto; min-height: auto; accent-color: var(--accent); }
.quiz-opt span { color: var(--fg); }
.quiz-submit { align-self: flex-start; margin-top: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.filters select { width: auto; min-width: 200px; }

.error-page { max-width: 560px; margin: 0 auto; padding: clamp(60px, 12vw, 140px) var(--pad); text-align: center; }
.error-page h1 { font-size: clamp(30px, 6vw, 52px); margin: 14px 0 10px; }
.error-page p { color: var(--muted); font-size: 16px; }
.error-page .hero-actions { justify-content: center; }
.course-progress { margin: 18px 0 8px; }

.submission-item { margin-bottom: 14px; }
.submission-item h2 { font-family: var(--font-body); font-weight: 800; font-size: 16px; letter-spacing: 0; margin-bottom: 4px; }

/* -------------------------------------------------- floating actions */

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 10px;
}

.round-action {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px color-mix(in oklab, var(--accent) 30%, transparent);
  transition: transform .12s;
}

.round-action:hover { transform: translateY(-2px); }
.round-action[hidden] { display: none; }

.support-dialog {
  width: min(460px, calc(100vw - 24px));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: var(--panel);
  color: var(--fg);
}

.support-dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.support-dialog h2 { font-family: var(--font-body); font-weight: 800; font-size: 20px; letter-spacing: 0; }

.dialog-close {
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel2);
  color: var(--fg);
  cursor: pointer;
}

.muted-link { display: inline-block; margin-top: 12px; color: var(--muted); }

/* --------------------------------------- theme dropdown (navbar) */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: auto;
  padding: 7px 12px 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--panel2);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }

/* --------------------------------------------------- onboarding tour */

.tour-block {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: transparent;
}

.tour-spot {
  position: fixed;
  z-index: 91;
  border-radius: 12px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
  pointer-events: none;
  transition: top .2s, left .2s, width .2s, height .2s;
}

.tour-pop {
  position: fixed;
  z-index: 93;
  width: min(340px, calc(100vw - 28px));
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transition: top .2s, left .2s;
}

.tour-pop-sheet {
  left: 50% !important;
  bottom: 16px;
  top: auto !important;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
}

.tour-pop-head { display: flex; justify-content: space-between; align-items: center; }
.tour-step-n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.tour-x { width: 28px; height: 28px; min-height: auto; padding: 0; border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.tour-pop h4 { font-family: var(--font-body); font-weight: 800; font-size: 17px; margin: 10px 0 6px; }
.tour-pop p { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0; }

.tour-dots { display: flex; gap: 6px; margin: 14px 0; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.tour-dot.on { background: var(--accent); }

.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-actions > span { flex: 1; }

.tour-restart { background: var(--panel2); border: 1px solid var(--border); color: var(--fg); font-size: 20px; }

/* ------------------------------------------------------ notifications */

.icon { display: block; }
.notif-bell { position: relative; display: inline-flex; align-items: center; }
.notif-bell .icon { width: 21px; height: 21px; }
.notif-bell:hover { color: var(--accent); }
.round-action .icon { width: 23px; height: 23px; }

.notif-count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}

.notif-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}

.notif-banner:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); }
.notif-banner-text { flex: 1; font-size: 14px; color: var(--muted); }
.notif-banner-text strong { color: var(--fg); }
.notif-banner-arrow { color: var(--accent); font-weight: 800; }

.notif-list { display: flex; flex-direction: column; gap: 12px; }

.notif {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 18px 20px;
}

.notif.is-unread { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
.notif.notif-warning.is-unread { border-color: color-mix(in oklab, #e6b800 50%, var(--border)); }
.notif.notif-critical { border-color: var(--danger); }

.notif-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notif-head strong { font-size: 15px; }
.notif-head time { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.notif-body { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }

.notif-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
}

.notif-badge-info { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); }
.notif-badge-warning { color: #e6b800; border-color: color-mix(in oklab, #e6b800 45%, var(--border)); }
.notif-badge-critical { color: var(--danger); border-color: var(--danger); }

/* --------------------------------------------------------------- blog */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}

.blog-card:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); transform: translateY(-3px); }

.blog-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(135deg, var(--dots) 0 11px, transparent 11px 22px);
  position: relative;
  overflow: hidden;
}

.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }

.blog-thumb .ph {
  position: absolute;
  inset: auto 12px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.blog-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.blog-date { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.blog-body h2 { font-family: var(--font-body); font-weight: 800; font-size: 18px; letter-spacing: 0; }
.blog-body h2 a:hover { color: var(--accent); }
.blog-body p { font-size: 14px; line-height: 1.5; color: var(--muted); }

.blog-article { max-width: 820px; }
.blog-article h1 { font-size: clamp(30px, 5vw, 46px); margin-top: 8px; }

.blog-cover {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  margin: 28px 0 8px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
}

.page-info { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------- footer */

.site-footer {
  padding: 36px var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer .brand { font-size: 16px; }
.site-footer .note { font-size: 12px; color: var(--muted); }
.site-footer .socials { display: flex; gap: 14px; font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.site-footer .socials a { color: var(--muted); text-decoration: none; }
.site-footer .socials a:hover { color: var(--accent); }
.site-footer .footer-legal { font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--muted); text-decoration: none; }
.site-footer .footer-legal:hover { color: var(--accent); }

/* ------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .dashboard-grid,
  .lesson-shell { grid-template-columns: 1fr; }

  /* «Об уроке» дублирует заголовок из основного контента — на мобиле прячем,
     чтобы не мешал в подвале. На ПК остаётся. */
  .lesson-aside { display: none; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .nav { gap: 16px; font-size: 13px; flex-wrap: wrap; }
  .grid.three,
  .pricing-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .course-row,
  .lesson-row { flex-direction: column; align-items: flex-start; }
}

/* ---- analytics dashboard ---- */
.an-range { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-size: 13px; }
.an-range span { color: var(--muted); font-family: var(--font-mono); }
.an-range a { padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--border); color: var(--fg); text-decoration: none; }
.an-range a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.an-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 32px; }
.an-kpi { padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel); }
.an-kpi .n { font-family: var(--font-display); font-weight: 900; font-size: 30px; }
.an-kpi .l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.an-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.an-panel { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel); }
.an-panel h3 { font-family: var(--font-body); font-weight: 800; font-size: 14px; margin-bottom: 12px; }
.an-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.an-panel li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.an-panel .an-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-panel .an-n { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.an-events td { font-size: 12.5px; }
@media (max-width: 980px) { .an-kpis { grid-template-columns: repeat(2, 1fr); } .an-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .an-grid { grid-template-columns: 1fr; } }

/* ---- exit-intent retention popup ---- */
.exit-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.exit-modal[hidden] { display: none; }
.exit-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); backdrop-filter: blur(3px); }
.exit-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 30px 28px;
  border-radius: 20px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.exit-card h3 { font-family: var(--font-display); font-weight: 900; font-size: 24px; }
.exit-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 10px 0 18px; }
.exit-card .lead-form { display: flex; flex-direction: column; gap: 12px; }
.exit-card .lead-form input { width: 100%; }
.exit-x {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.exit-x:hover { color: var(--fg); }
.exit-confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.exit-confirm-actions .button { flex: 1 1 auto; }

/* ---- blog language switcher ---- */
.lang-switch, .lang-switch a { display: inline-flex; }
.lang-switch { gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.lang-switch a {
  padding: 6px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}
.lang-switch a:hover { color: var(--fg); border-color: var(--accent); }
.lang-switch a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---- works gallery (hover-autoplay, infinite scroll) ---- */
.works-head { margin-bottom: 28px; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.work-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  background: #0b0c10;
  cursor: pointer;
}
.work-card .work-poster,
.work-card .work-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-card .work-video { z-index: 1; background: transparent; }
body[data-tint="on"] .work-card::after {  /* theme tint, like other landing media */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: 0.32;
  pointer-events: none;
}
.work-card .work-style {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  backdrop-filter: blur(4px);
}
.work-card:hover { border-color: var(--accent); transform: translateY(-2px); transition: transform .15s, border-color .15s; }
.works-sentinel { height: 1px; }

.work-lightbox { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 20px; }
.work-lightbox[hidden] { display: none; }
.wl-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(4px); }
.wl-inner { position: relative; z-index: 1; max-width: 420px; width: 100%; }
.wl-video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px; background: #000; }
.wl-close {
  position: absolute; top: -14px; right: -14px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: 24px; line-height: 1; cursor: pointer; z-index: 2;
}
@media (max-width: 560px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }

/* required-field markers on forms */
.req { color: var(--danger, #ff6b5e); font-weight: 800; }
.req-legend { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

/* ---- support tickets (staff inbox) ---- */
.ticket-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.ticket-filters a {
  padding: 7px 14px; border-radius: var(--pill); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.ticket-filters a.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ticket-list { display: flex; flex-direction: column; gap: 14px; }
.ticket-card { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); padding: 18px 20px; }
.ticket-card.ticket-open { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
.ticket-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ticket-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ticket-card h3 { font-family: var(--font-body); font-weight: 800; font-size: 16px; }
.ticket-msg { font-size: 14px; line-height: 1.5; margin: 8px 0; white-space: pre-wrap; }
.ticket-contact { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.ticket-contact a { color: var(--accent); }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ticket-actions form { margin: 0; }
.ticket-status { padding: 3px 10px; border-radius: var(--pill); font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; }
.ticket-status-open { background: var(--accent); color: var(--on-accent); }
.ticket-status-in_progress { background: rgba(255,255,255,.14); color: var(--fg); }
.ticket-status-closed { background: rgba(255,255,255,.07); color: var(--muted); }
.button.ticket-del { background: transparent; color: var(--danger); border: 1px solid color-mix(in oklab, var(--danger) 40%, var(--border)); }

.ticket-filters .tf-label { font-size: 12px; color: var(--muted); align-self: center; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.ticket-kind { padding: 3px 10px; border-radius: var(--pill); font-family: var(--font-mono); font-weight: 700; font-size: 11px; border: 1px solid var(--border); color: var(--muted); }
.ticket-kind-support { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); color: var(--accent); }

/* ============ Studio CMS ============ */
.button.ghost { background: transparent; color: var(--fg); border-color: var(--border); min-height: 34px; padding: 0 12px; font-size: 13px; }
.button.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.button.xsmall { min-height: 30px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.button.danger, .button.ghost.danger:hover { border-color: color-mix(in oklab, var(--danger) 60%, var(--border)); color: var(--danger); }
.chip-ok { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); color: var(--accent); }
.chip.danger { border-color: color-mix(in oklab, var(--danger) 55%, var(--border)); color: var(--danger); }

.studio-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.studio-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.drag-dot, .drag-handle { font-family: var(--font-mono); color: var(--muted); }
.drag-handle { cursor: grab; user-select: none; padding: 0 4px; line-height: 1; }
.drag-handle:active { cursor: grabbing; }

.studio-tree { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.studio-section { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; background: color-mix(in oklab, var(--fg) 3%, transparent); }
.studio-topic { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0 10px 8px; background: color-mix(in oklab, var(--bg) 60%, transparent); }
.studio-lesson { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; }
.studio-lesson:hover { background: color-mix(in oklab, var(--fg) 5%, transparent); }
.studio-lesson.dragging, .studio-topic.dragging, .studio-section.dragging { opacity: .5; }
.studio-lesson-title { flex: 1; font-weight: 600; }
.studio-badges { display: flex; gap: 5px; align-items: center; }
.studio-badges .chip { padding: 3px 8px; font-size: 11px; }

.studio-node-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.studio-node-title { font-weight: 700; }
.studio-node-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.studio-add-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.studio-add-row input[type=text] { flex: 1; min-width: 160px; }
.studio-add-row select { min-width: 120px; }
.studio-add-section { margin-top: 18px; }

.studio-inline { display: inline-block; }
.studio-inline > summary { list-style: none; cursor: pointer; }
.studio-inline > summary::-webkit-details-marker { display: none; }
.studio-inline-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; background: color-mix(in oklab, var(--fg) 4%, transparent); padding: 10px; border-radius: 10px; }
.studio-inline-form.col { flex-direction: column; align-items: stretch; }
.studio-inline-form input, .studio-inline-form textarea, .studio-inline-form select { width: 100%; }

.studio-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.studio-col-main, .studio-col-side { display: flex; flex-direction: column; gap: 16px; }
.studio-block { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.studio-video-status { margin: 8px 0; min-height: 24px; }
@media (max-width: 860px) { .studio-grid { grid-template-columns: 1fr; } }

/* ============ Payments dashboard ============ */
.pay-cur { font-size: .6em; margin-left: 2px; opacity: .7; }
.pay-table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.pay-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.pay-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); }
.pay-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
.pay-table tr:last-child td { border-bottom: none; }
.pay-table tbody tr:hover { background: color-mix(in oklab, var(--fg) 3%, transparent); }
.pay-table .muted-meta { display: block; font-size: 12px; margin-top: 2px; }
.pay-amount { font-weight: 800; white-space: nowrap; }
.pay-actions { white-space: nowrap; }
.pay-actions form { display: inline-block; margin: 2px; }

.chip.pay-paid { border-color: color-mix(in oklab, var(--accent) 55%, var(--border)); color: var(--accent); }
.chip.pay-pending { border-color: color-mix(in oklab, #ffcf5e 55%, var(--border)); color: #ffcf5e; }
.chip.pay-failed { border-color: color-mix(in oklab, var(--danger) 55%, var(--border)); color: var(--danger); }
.chip.pay-refunded { border-color: var(--border); color: var(--muted); }

/* ============ Hiring / Vacancies ============ */
.hp-wrap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hp-field { display: none !important; }
.chip.hr-new { border-color: color-mix(in oklab, var(--accent) 55%, var(--border)); color: var(--accent); }
.chip.hr-reviewing { border-color: color-mix(in oklab, #ffcf5e 55%, var(--border)); color: #ffcf5e; }
.chip.hr-interview { border-color: color-mix(in oklab, #6ea8ff 55%, var(--border)); color: #6ea8ff; }
.chip.hr-rejected { border-color: color-mix(in oklab, var(--danger) 50%, var(--border)); color: var(--danger); }
.chip.hr-hired { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
