/* ==========================================================================
   Class Tools — Design System
   Single stylesheet for the whole prototype.
   Sections: variables, reset, typography, layout, grid, buttons, forms,
   cards, tables, header, footer, hero, sections, pricing, reviews, faq,
   sidebar, dashboard, admin, auth, toast, modal, animations, responsive.
   ========================================================================== */

/* ------------------------------- Variables ------------------------------- */
:root {
  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;

  /* Brand */
  --brand: #2f80ff;
  --brand-600: #1f6fef;
  --brand-700: #175fd6;
  --brand-soft: #e8f1ff;
  --brand-soft-2: #f2f7ff;
  --accent: #38bdf8;

  /* Neutral (light theme) */
  --bg: #f6f8fc;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --border: #e6eaf2;
  --border-strong: #d3d9e6;

  --text: #16202e;
  --text-2: #4a5568;
  --text-3: #8a95a6;

  --success: #16a34a;
  --success-soft: #e7f7ee;
  --warning: #d97706;
  --warning-soft: #fdf3e3;
  --danger: #dc2626;
  --danger-soft: #fdeaea;

  /* Shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(20, 32, 46, 0.06);
  --shadow-sm: 0 2px 8px rgba(20, 32, 46, 0.06);
  --shadow: 0 8px 24px rgba(20, 32, 46, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 32, 46, 0.12);

  --header-h: 68px;
  --container: 1180px;
  --sidebar-w: 250px;

  --transition: 0.2s ease;
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0e131c;
  --bg-alt: #121926;
  --surface: #161d2b;
  --surface-2: #1b2434;
  --border: #253044;
  --border-strong: #33415a;

  --text: #eef2f8;
  --text-2: #aab6c8;
  --text-3: #71809a;

  --brand-soft: #16233c;
  --brand-soft-2: #131d30;

  --success-soft: #123123;
  --warning-soft: #2f2513;
  --danger-soft: #34191a;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}

/* --------------------------------- Reset --------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

/* Always reserve the scrollbar gutter so page width (and the centered header)
   stays identical whether or not a page has a vertical scrollbar — no "jump". */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-color: #f4f7fc;
  background-image:
    radial-gradient(760px 420px at 8% -6%, rgba(47, 128, 255, 0.12), transparent 60%),
    radial-gradient(720px 420px at 96% 4%, rgba(56, 189, 248, 0.13), transparent 58%),
    radial-gradient(600px 500px at 50% 108%, rgba(47, 128, 255, 0.08), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

:focus-visible {
  outline: 3px solid rgba(47, 128, 255, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-soft); color: var(--brand-700); }

/* ------------------------------ Typography ------------------------------- */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p { color: var(--text-2); }

.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--text-2); }
/* Section badge — ONE definition for every page (home, craft, reviews, news,
   docs, legal…). Edit here, nowhere else. `tight` drops the bottom margin for
   layouts that space the heading themselves; `live` makes the dot pulse. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f6fe6;
  background: #fff;
  border: 1px solid #dde8fb;
  padding: 8px 16px;
  border-radius: 30px;
  margin-bottom: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(30, 90, 180, 0.08);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: eyebrowBlink 1.8s ease-in-out infinite;
}
.eyebrow.tight { margin-bottom: 0; }
@keyframes eyebrowBlink { 0%, 100% { opacity: .35 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  .eyebrow::before { animation: none; }
}
[data-theme="dark"] .eyebrow {
  color: #7fb0ff; background: var(--surface); border-color: var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

/* -------------------------------- Layout --------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}
.container-sm { max-width: 760px; }

section { padding: 78px 0; }
.section-tight { padding: 48px 0; }

.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { margin-top: 14px; font-size: 1.1rem; }

.bg-alt { background: var(--bg-alt); }
.bg-surface { background: var(--surface); }

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 100px;
  background: var(--brand-soft);
  color: var(--brand-700);
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--bg-alt); color: var(--text-3); }

.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* --------------------------------- Grid ---------------------------------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }

/* -------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition),
    box-shadow var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-600); box-shadow: var(--shadow); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--text-3); }

.btn-soft { background: var(--brand-soft); color: var(--brand-700); }
.btn-soft:hover { background: #dbe8ff; }
[data-theme="dark"] .btn-soft:hover { background: #1c2c48; }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f9dada; }
[data-theme="dark"] .btn-danger:hover { background: #40201f; }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
/* Guest header buttons: even, balanced pair */
.header-desktop-actions { display: flex; gap: 10px; align-items: center; }
.header-desktop-actions .btn-sm { min-height: 40px; padding: 0 18px; border-radius: 10px; font-weight: 600; }
.header-desktop-actions .btn-ghost { border-color: var(--border-strong); background: var(--surface); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }

.link { color: var(--brand-600); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* --------------------------------- Cards --------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-pad-lg { padding: 34px; }
.card h3 { margin-bottom: 8px; }

.icon-box {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
  color: var(--brand-600);
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.icon-box.teal { background: #e2f6fb; color: #0891b2; }
[data-theme="dark"] .icon-box.teal { background: #123039; }
.icon-box.green { background: var(--success-soft); color: var(--success); }
.icon-box.violet { background: #efe9fd; color: #7c3aed; }
[data-theme="dark"] .icon-box.violet { background: #241a3d; }

.feature-list { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.feature-list .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; margin-top: 3px;
}
.feature-list .tick svg { width: 12px; height: 12px; }
/* Inline SVG icon defaults */
.ico { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.icon-box svg, .st-ico svg, .m-ico svg, .qa-ico svg, .dl-logo svg, .empty-ico svg { width: 1.35em; height: 1.35em; }
.st-ico svg, .m-ico svg, .qa-ico svg { width: 20px; height: 20px; }

/* --------------------------------- Forms --------------------------------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; color: var(--text); }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.96rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.15);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 120px; }

.input-wrap { position: relative; }
.input-wrap .toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 0.85rem; padding: 4px 8px; border-radius: 6px;
}
.input-wrap .toggle-pass:hover { background: var(--bg-alt); }

.check {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-2); cursor: pointer;
}
.check input { width: 17px; height: 17px; accent-color: var(--brand); }

.field-hint { font-size: 0.82rem; color: var(--text-3); margin-top: 6px; }
.field-error { font-size: 0.82rem; color: var(--danger); margin-top: 6px; display: none; }
.form-group.invalid .field-error { display: block; }
.form-group.invalid .input { border-color: var(--danger); }

/* -------------------------------- Tables --------------------------------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; text-align: left; font-size: 0.92rem; }
thead th {
  background: var(--surface-2);
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td .mono { font-family: "Consolas", "Courier New", monospace; font-size: 0.85rem; color: var(--text-2); }

/* -------------------------------- Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  /* Opaque solid so the bar looks IDENTICAL on every page regardless of the body
     gradient behind it (no color "jump" when navigating between site/cabinet). */
  background: #f4f8fd;
  border-bottom: 1px solid #e2ebf7;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--border); }
/* Reserve the header bar before its (JS-built) markup mounts, so there is no
   collapse/flash when navigating between pages. */
[data-header] { min-height: 69px; background: #f4f8fd; }
.header-inner { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.header-inner > .logo { justify-self: start; }
.header-inner > .nav { justify-self: center; }
.header-inner > .header-actions { justify-self: end; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; color: var(--text); }
.logo img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.logo span b { color: var(--brand-600); }

.nav { display: flex; align-items: center; gap: 6px; justify-content: center; }
.nav a {
  padding: 8px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 500; color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.nav a:hover { background: var(--bg-alt); color: var(--text); }
.nav a.active { color: var(--brand-600); background: var(--brand-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); border: 1px solid var(--border); background: var(--surface);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* Profile dropdown */
.profile-menu { position: relative; display: flex; align-items: center; gap: 4px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-strong); background: var(--bg-alt); cursor: pointer;
}
.profile-trigger {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; transition: all var(--transition);
}
.profile-trigger:hover { border-color: var(--border-strong); background: var(--bg-alt); }
.profile-trigger .avatar { width: 34px; height: 34px; border-width: 1px; }
.profile-name { font-size: 0.9rem; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-caret {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.dd-caret:hover { background: var(--bg-alt); color: var(--text); }
.dd-caret svg { width: 18px; height: 18px; }
@media (max-width: 600px) { .profile-name { display: none; } }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 220px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: all var(--transition); z-index: 120;
}
.dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown .dd-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown .dd-head b { display: block; font-size: 0.92rem; }
.dropdown .dd-head small { color: var(--text-3); font-size: 0.8rem; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 8px; font-size: 0.9rem; color: var(--text-2);
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg-alt); color: var(--text); }
.dropdown .dd-danger { color: var(--danger); }

/* Burger */
.burger { display: none; }
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--surface);
  z-index: 90; padding: 20px 22px; transform: translateX(100%);
  transition: transform 0.28s ease; overflow-y: auto; border-top: 1px solid var(--border);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { display: block; padding: 13px 8px; font-size: 1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-nav .mob-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }

/* auth-only / guest-only visibility (toggled by JS via .auth-off).
   Elements start hidden with .auth-off; applyAuthVisibility() removes it to
   reveal them in their natural display (flex/inline-flex/block). */
.auth-off { display: none !important; }

/* -------------------------------- Footer --------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 22px; margin-top: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 12px; max-width: 300px; font-size: 0.88rem; }
.footer-col h5 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 12px; }
.footer-col a { display: block; padding: 4px 0; font-size: 0.9rem; color: var(--text-2); }
.footer-col a:hover { color: var(--brand-600); }
.footer-bottom {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.86rem; color: var(--text-3);
}
.social-row { display: flex; gap: 10px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-legal a { color: var(--text-3); font-size: 0.84rem; }
.footer-legal a:hover { color: var(--brand-600); }

/* --------------------------------- Hero ---------------------------------- */
.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 0%, var(--brand-soft) 0%, transparent 70%),
    radial-gradient(40% 40% at 90% 20%, rgba(56, 189, 248, 0.14) 0%, transparent 70%);
}
.hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.hero h1 { margin-bottom: 20px; }
.hero p { font-size: 1.22rem; max-width: 620px; margin: 0 auto; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 0.88rem; color: var(--text-3); }

.hero-visual {
  margin: 56px auto 0; max-width: 940px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); display: block; }
.browser-bar .url { margin-left: 12px; font-size: 0.78rem; color: var(--text-3); background: var(--bg-alt); padding: 5px 12px; border-radius: 6px; }
.mock-canvas {
  padding: 40px; min-height: 320px;
  background:
    linear-gradient(135deg, var(--brand-soft-2), transparent),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--border) 39px, var(--border) 40px);
  display: grid; grid-template-columns: 180px 1fr; gap: 20px;
}
.mock-side { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 16px; }
.mock-bar { height: 12px; border-radius: 6px; background: var(--bg-alt); margin-bottom: 12px; }
.mock-bar.w60 { width: 60%; } .mock-bar.w80 { width: 80%; } .mock-bar.brand { background: var(--brand-soft); }
.mock-main { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-content: start; }
.mock-tile { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-sm); height: 90px; }

/* Product picker */
.product-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product-card { position: relative; overflow: hidden; }
.product-card .icon-box { width: 54px; height: 54px; font-size: 1.5rem; }
.product-card .badge { position: absolute; top: 22px; right: 22px; }

.logo-strip { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; opacity: 0.75; }
.logo-strip span { font-weight: 700; color: var(--text-3); font-size: 1.1rem; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 2.2rem; color: var(--brand-600); letter-spacing: -0.03em; }
.stat span { color: var(--text-3); font-size: 0.92rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  counter-increment: step; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-600); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-num::before { content: counter(step); }

/* -------------------------------- Pricing -------------------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 12px 40px rgba(47,128,255,0.18); }
.price-card.featured::before {
  content: "Популярный"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 5px 14px; border-radius: 100px; letter-spacing: 0.03em;
}
.price-card h3 { margin-bottom: 6px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 4px; }
.price b { font-size: 2.5rem; letter-spacing: -0.03em; }
.price span { color: var(--text-3); font-size: 0.95rem; }
.price-card .feature-list { flex: 1; margin: 22px 0; }
.price-card.selected { outline: 2px solid var(--brand); outline-offset: 2px; }

.billing-toggle { display: flex; justify-content: center; gap: 6px; background: var(--bg-alt); padding: 5px; border-radius: 100px; width: max-content; margin: 0 auto 40px; }
.billing-toggle button { padding: 8px 20px; border-radius: 100px; font-weight: 600; font-size: 0.9rem; color: var(--text-2); }
.billing-toggle button.active { background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-xs); }

/* -------------------------------- Reviews -------------------------------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review-card .stars { color: #f5a623; letter-spacing: 2px; margin-bottom: 12px; }
.review-card p { color: var(--text); font-size: 0.98rem; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.review-author img, .review-author .ava-fallback {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; color: var(--brand-600); font-weight: 700;
}
.review-author b { display: block; font-size: 0.92rem; }
.review-author small { color: var(--text-3); }

/* Unified review card — used on the home, product and reviews pages so every
   review looks identical (avatar, name, rating, clamped quote, product tag).
   Cards share one height; the full text opens in .rev-modal. */
:root { --rev-star: #f0a020; --rev-star-off: #dcd8cf; }
[data-theme="dark"] { --rev-star-off: #384357; }

.rev-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; align-items: stretch; text-align: left;
}
.rev-card {
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 22px;
  padding: 24px 26px; box-shadow: var(--shadow-xs), 0 14px 30px -22px rgba(18, 20, 28, .28);
  display: flex; flex-direction: column; gap: 16px;
}
.rev-head { display: flex; align-items: center; gap: 12px; }
.rev-ava {
  position: relative; width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
}
.rev-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rev-ava-lg { width: 48px; height: 48px; font-size: 17px; }
.rev-id { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.rev-name { font-weight: 700; font-size: 0.906rem; line-height: 1.2; color: var(--text); }
.rev-meta { font-weight: 500; font-size: 0.719rem; line-height: 1.3; color: var(--text-3); }
.rev-rate { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.rev-rate-row { flex-direction: row; align-items: center; gap: 9px; }
/* Grey star row with an amber copy clipped over it — gives exact half stars. */
.rev-stars {
  position: relative; display: inline-block; flex: none; white-space: nowrap;
  font: 400 14px/1 system-ui, sans-serif; letter-spacing: .14em; color: var(--rev-star-off);
}
.rev-stars-fill {
  position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--rev-star);
}
.rev-score { font-weight: 700; font-size: 0.688rem; line-height: 1; color: var(--text-3); }
.rev-sep { display: block; height: 1px; background: var(--border); }
.rev-quote {
  margin: 0; font-size: 0.938rem; line-height: 1.62; color: var(--text-2); font-weight: 400;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
}
.rev-more {
  align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 600; font-size: 0.813rem; line-height: 1; color: var(--brand-600);
  transition: color var(--transition);
}
.rev-more:hover { color: var(--text); }
.rev-foot { margin-top: auto; padding-top: 4px; }
.rev-product {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.781rem; line-height: 1; color: var(--text-2);
}
.rev-product img { width: 20px; height: 20px; display: block; }

/* Average score + rating histogram above the grid. */
.rev-summary {
  display: flex; align-items: center; gap: 26px; max-width: 520px; margin: 0 auto 34px;
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 22px;
  padding: 24px 28px; box-shadow: var(--shadow-xs);
}
.rev-avg { display: flex; flex-direction: column; gap: 6px; flex: none; }
.rev-avg-num { font-weight: 800; font-size: 2.5rem; line-height: 1; color: var(--text); }
.rev-avg .rev-stars { font-size: 16px; }
.rev-avg-count { font-weight: 600; font-size: 0.719rem; color: var(--text-3); }
.rev-sum-sep { width: 1px; align-self: stretch; background: var(--border); }
.rev-bars { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.rev-bar-row { display: flex; align-items: center; gap: 10px; }
.rev-bar-n { width: 14px; font-weight: 600; font-size: 0.719rem; color: var(--text-3); }
.rev-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.rev-bar > span { display: block; height: 100%; background: var(--rev-star); }
.rev-bar-pct { width: 30px; text-align: right; font-weight: 600; font-size: 0.719rem; color: var(--text-3); }

/* Full-text modal. */
.rev-modal {
  position: fixed; inset: 0; z-index: 120; padding: 24px;
  display: none; align-items: center; justify-content: center;
  background: rgba(18, 20, 28, .42); backdrop-filter: blur(3px);
}
.rev-modal.show { display: flex; }
body.rev-modal-open { overflow: hidden; }
.rev-modal-card {
  width: min(520px, 100%); max-height: 82vh; overflow: auto;
  background: var(--surface, #fff); border-radius: 24px; padding: 30px 32px;
  box-shadow: 0 40px 80px -30px rgba(18, 20, 28, .5);
  display: flex; flex-direction: column; gap: 18px;
}
.rev-modal-x {
  width: 32px; height: 32px; flex: none; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); cursor: pointer; font-size: 0.938rem; line-height: 1; color: var(--text-3);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.rev-modal-x:hover { background: var(--text); color: var(--surface); border-color: var(--text); }
.rev-modal-text {
  margin: 0; font-size: 1rem; line-height: 1.68; color: var(--text-2); white-space: pre-line;
}
.rev-modal-foot {
  padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.rev-modal-foot .rev-product img { width: 22px; height: 22px; }

@media (max-width: 640px) {
  .rev-grid { grid-template-columns: 1fr; }
  .rev-summary { flex-direction: column; align-items: stretch; gap: 18px; }
  .rev-sum-sep { width: auto; height: 1px; }
  .rev-avg { align-items: center; }
  .rev-modal { padding: 14px; }
  .rev-modal-card { padding: 24px 22px; }
}

.empty-state { text-align: center; padding: 64px 24px; }
.empty-state .empty-ico {
  width: 72px; height: 72px; border-radius: 20px; background: var(--bg-alt); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px;
}
.empty-state h3 { margin-bottom: 8px; }

/* ---------------------------------- FAQ ---------------------------------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color var(--transition); }
.faq-item.open { border-color: var(--brand); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; font-weight: 600; text-align: left; color: var(--text); font-size: 1rem; }
.faq-q .chev { flex: none; transition: transform var(--transition); color: var(--text-3); }
.faq-item.open .chev { transform: rotate(180deg); color: var(--brand-600); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 22px 22px; }

/* --------------------------------- CTA ----------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, #4f9bff 55%, var(--accent) 130%);
  border-radius: var(--radius-xl); padding: 60px; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 520px; margin: 14px auto 28px; }
.cta-band .btn-primary { background: #fff; color: var(--brand-700); }
.cta-band .btn-primary:hover { background: #f1f5ff; }
.cta-band .btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ------------------------------- Auth pages ------------------------------ */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 48px 20px; position: relative; }
.auth-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 40% at 50% 0%, var(--brand-soft) 0%, transparent 70%); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 38px 36px; }
.auth-card .logo { justify-content: center; margin-bottom: 8px; }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head h1 { font-size: 1.6rem; }
.auth-head p { margin-top: 6px; font-size: 0.95rem; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 0.92rem; color: var(--text-2); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--text-3); font-size: 0.82rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--text-3); margin-bottom: 20px; }
.back-link:hover { color: var(--text); }

/* -------------------------- App / Sidebar layout ------------------------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: calc(100vh - var(--header-h)); }
.app-shell > [data-sidebar] { display: contents; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; }
.sidebar h6 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 0 12px; margin: 18px 0 8px; }
.sidebar h6:first-child { margin-top: 0; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 0.92rem; margin-bottom: 2px; transition: background var(--transition), color var(--transition); }
.side-link:hover { background: var(--bg-alt); color: var(--text); }
.side-link.active { background: var(--brand-soft); color: var(--brand-700); font-weight: 600; }
.side-link svg { width: 18px; height: 18px; flex: none; }
.side-link .side-badge { margin-left: auto; font-size: 0.72rem; background: var(--danger); color: #fff; border-radius: 100px; padding: 1px 7px; }

.app-main { padding: 34px; overflow-x: hidden; }
.app-main .page-head { margin-bottom: 28px; }
.app-main .page-head h1 { font-size: 1.9rem; }
.app-main .page-head p { margin-top: 6px; }

.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

/* ------------------------------ Dashboard -------------------------------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-xs); }
.stat-card .st-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .st-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-600); display: flex; align-items: center; justify-content: center; }
.stat-card b { display: block; font-size: 2rem; margin-top: 14px; letter-spacing: -0.02em; }
.stat-card span { color: var(--text-3); font-size: 0.88rem; }
.stat-card .trend { font-size: 0.8rem; font-weight: 600; }
.trend.up { color: var(--success); } .trend.down { color: var(--danger); }

.mini-list li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.mini-list li:last-child { border-bottom: none; }
.mini-list .m-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; color: var(--text-2); flex: none; }
.mini-list .m-body { flex: 1; min-width: 0; }
.mini-list .m-body b { font-size: 0.9rem; font-weight: 600; display: block; }
.mini-list .m-body small { color: var(--text-3); font-size: 0.82rem; }
.mini-list .m-time { color: var(--text-3); font-size: 0.8rem; white-space: nowrap; }

.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); transition: all var(--transition); }
.quick-action:hover { border-color: var(--brand); background: var(--brand-soft-2); transform: translateY(-2px); }
.quick-action .qa-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-600); display: flex; align-items: center; justify-content: center; flex: none; }
.quick-action > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.quick-action b { font-weight: 650; font-size: 0.95rem; }
.quick-action small { color: var(--text-3); font-size: 0.8rem; }

.progress { height: 8px; border-radius: 100px; background: var(--bg-alt); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 100px; background: var(--brand); }

/* profile header card */
.profile-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.profile-hero .avatar-lg { width: 96px; height: 96px; border-radius: 24px; object-fit: cover; border: 1px solid var(--border); background: var(--bg-alt); }
.profile-hero .ph-meta h2 { font-size: 1.5rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 32px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-row span { color: var(--text-3); font-size: 0.9rem; }
.info-row b { font-weight: 600; font-size: 0.92rem; }

/* ------------------------------- Toast ----------------------------------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 14px 16px;
  transform: translateX(120%); transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1);
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast .t-ico { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #fff; background: var(--brand); }
.toast.success .t-ico { background: var(--success); }
.toast.error .t-ico { background: var(--danger); }
.toast .t-body { flex: 1; font-size: 0.9rem; }
.toast .t-body b { display: block; font-size: 0.9rem; }
.toast .t-close { color: var(--text-3); }

/* ------------------------------- Modal ----------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,38,0.5); backdrop-filter: blur(3px); z-index: 1500; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; padding: 30px; transform: scale(0.94); opacity: 0; transition: all 0.22s ease; }
.modal-backdrop.open .modal { transform: scale(1); opacity: 1; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.modal-head h3 { font-size: 1.25rem; }
.modal p { margin-bottom: 22px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ------------------------------ Roadmap ---------------------------------- */
.roadmap { display: grid; gap: 0; max-width: 720px; margin: 0 auto; }
.rm-item { display: grid; grid-template-columns: 130px 1fr; gap: 22px; padding-bottom: 28px; position: relative; }
.rm-item::before { content: ""; position: absolute; left: 141px; top: 8px; bottom: -8px; width: 2px; background: var(--border); }
.rm-item:last-child::before { display: none; }
.rm-when { text-align: right; font-weight: 600; color: var(--text-3); font-size: 0.85rem; padding-top: 2px; }
.rm-body { position: relative; padding-left: 26px; }
.rm-body::before { content: ""; position: absolute; left: -6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.rm-item.done .rm-body::before { background: var(--success); border-color: var(--success); }
.rm-body h4 { margin-bottom: 4px; }

/* ------------------------------ Docs layout ------------------------------ */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 20px); }
.docs-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 0.92rem; }
.docs-nav a:hover, .docs-nav a.active { background: var(--brand-soft); color: var(--brand-700); }
.docs-content h2 { margin: 40px 0 14px; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content p { margin-bottom: 14px; }
.docs-content ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; color: var(--text-2); }
.docs-content li { margin-bottom: 8px; }
.code-block { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; font-family: "Consolas", monospace; font-size: 0.86rem; color: var(--text); margin-bottom: 16px; overflow-x: auto; }

/* download */
.dl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dl-card { text-align: center; }
.dl-card .dl-logo { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; font-size: 2rem; }

/* system pages */
.system-page { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.system-page .big-code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; background: linear-gradient(135deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.system-page h1 { margin: 12px 0; }
.system-page p { max-width: 440px; margin: 0 auto 26px; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .input { max-width: 280px; }
.search-box { position: relative; flex: 1; max-width: 320px; }
.search-box input { padding-left: 38px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 16px; height: 16px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs button { padding: 11px 16px; font-weight: 600; font-size: 0.92rem; color: var(--text-3); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--brand-600); border-bottom-color: var(--brand); }

/* ------------------------------ Animations ------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }

@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse-dot 1.6s infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 1024px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header-desktop-actions { display: none; }
  /* .nav is gone here, so the 3-column template would leave an empty third
     track that pushes the actions off-screen. Two columns: logo | actions. */
  .header-inner { grid-template-columns: 1fr auto; gap: 12px; }
  .header-inner > .header-actions { min-width: 0; }
  .logo { min-width: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: var(--header-h); width: 280px; z-index: 80;
    transform: translateX(-100%); transition: transform 0.28s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,0.4); z-index: 70; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
}

@media (max-width: 820px) {
  section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  /* grid-2 only collapsed at 560px, so 560-820px overflowed (e.g. /contact). */
  .grid-2 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .product-cards { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 32px 22px; }
  .cta-band { padding: 40px 26px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .reviews-grid, .stat-cards, .info-grid, .quick-actions { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .app-main { padding: 20px 16px; }
  .mock-canvas { grid-template-columns: 1fr; }
  .mock-main { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 22px; }
  .rm-item { grid-template-columns: 90px 1fr; gap: 12px; }
  .rm-item::before { left: 101px; }
  .toast-stack { left: 16px; right: 16px; }
  .toast { min-width: 0; }
}

@media (min-width: 1600px) {
  :root { --container: 1280px; }
  html { font-size: 17px; }
}

/* ------------------------- Product selection ---------------------------- */
.product-select { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.product-choice {
  position: relative; cursor: pointer; display: flex; flex-direction: column;
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.product-choice:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.product-choice:focus-visible { outline: none; border-color: var(--brand); }
.product-choice.selected { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); background: var(--brand-soft-2); }
.product-choice .badge { align-self: flex-start; }

.pc-avatar {
  width: 92px; height: 92px; border-radius: 24px; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-avatar.light { background: linear-gradient(140deg, #e8f1ff, #f7faff); padding: 8px; }
.pc-avatar.light img { object-fit: contain; }
.pc-avatar.dark { background: radial-gradient(circle at 50% 42%, #1c2b46, #0b1220); }

.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pc-head h3 { margin: 0; }
.product-choice p { margin-bottom: 4px; }
.product-choice .feature-list { margin: 16px 0 22px; }
.pc-actions { display: flex; gap: 12px; margin-top: auto; flex-wrap: wrap; }
.pc-check {
  position: absolute; top: 18px; right: 18px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5); transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.pc-check svg { width: 15px; height: 15px; }
.product-choice.selected .pc-check { opacity: 1; transform: scale(1); }
.pc-hint { text-align: center; color: var(--text-3); font-size: 0.9rem; margin-top: 22px; }

/* ------------------------------- Bundle --------------------------------- */
.bundle {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: space-between;
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 34px 38px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--brand-soft) 0%, transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}
.bundle-logos { display: flex; align-items: center; gap: 14px; flex: none; }
.bundle-logos img { width: 66px; height: 66px; border-radius: 18px; box-shadow: var(--shadow-sm); object-fit: cover; }
.bundle-logos .b-craft { background: linear-gradient(135deg, #e8f1ff, #f7faff); object-fit: contain; padding: 6px; }
.bundle-logos .b-teacher { background: radial-gradient(circle at 50% 42%, #1c2b46, #0b1220); }
.bundle-logos .plus { font-size: 1.6rem; font-weight: 700; color: var(--brand-600); }
.bundle-body { flex: 1; min-width: 240px; }
.bundle-body h2 { font-size: 1.7rem; }
.bundle-body p { margin-top: 8px; }
.bundle .bundle-cta { flex: none; text-align: right; }
.bundle .bundle-price { display: block; margin-bottom: 10px; font-size: 0.9rem; color: var(--text-3); }
.bundle .bundle-price b { font-size: 1.5rem; color: var(--text); letter-spacing: -0.02em; }

/* ----------------- Pricing: plan duration + compact compare -------------- */
.price-card .plan-term { display: inline-block; margin-top: 2px; font-size: 0.9rem; color: var(--text-3); }
.price .term { color: var(--text-3); font-size: 0.95rem; }

.compare {
  max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-xs); background: var(--surface);
}
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 10px 16px; font-size: 0.86rem; text-align: left; }
.compare thead th { background: var(--surface-2); color: var(--text-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.compare tbody tr { border-bottom: 1px solid var(--border); }
.compare tbody tr:last-child { border-bottom: none; }
.compare td:not(:first-child) { text-align: center; color: var(--text-2); }
.compare .ok { color: var(--success); }
.compare .no { color: var(--text-3); }

@media (max-width: 820px) {
  .product-select { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .bundle { justify-content: center; text-align: center; }
  .bundle-body { text-align: center; }
  .bundle .bundle-cta { text-align: center; width: 100%; }
}

/* ---------------------- Hero trust / social proof ----------------------- */
.hero-trust { margin-top: 46px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.trust-logos { display: flex; align-items: center; justify-content: center; gap: 14px 26px; flex-wrap: wrap; }
.trust-logos .tl-label { font-size: 0.82rem; color: var(--text-3); }
.trust-logos .tl-chip {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); padding: 8px 16px; border-radius: 100px;
  box-shadow: var(--shadow-xs); font-size: 0.92rem;
}
.trust-logos .tl-chip svg { width: 16px; height: 16px; color: var(--brand-600); }
.hero-stats { display: flex; align-items: stretch; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.hero-stats .hs { padding: 18px 30px; text-align: center; }
.hero-stats .hs + .hs { border-left: 1px solid var(--border); }
.hero-stats .hs b { display: block; font-size: 1.6rem; color: var(--brand-600); letter-spacing: -0.02em; }
.hero-stats .hs span { font-size: 0.82rem; color: var(--text-3); }

@media (max-width: 560px) {
  .hero-stats { flex-wrap: wrap; }
  .hero-stats .hs { flex: 1 1 40%; }
  .hero-stats .hs:nth-child(2) { border-left: none; }
  .hero-stats .hs:nth-child(3), .hero-stats .hs:nth-child(4) { border-top: 1px solid var(--border); }
}

/* --------------------------- Reviews marquee ---------------------------- */
.reviews-marquee { position: relative; overflow: hidden; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 22px; width: max-content; animation: marquee 46s linear infinite; }
.reviews-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .review-card { width: 340px; flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.review-author .stars { color: #f5a623; letter-spacing: 1px; font-size: 0.9rem; margin: 0; }
.review-author .r-score { color: var(--text-3); font-size: 0.82rem; }

/* --------------------- Compact "buy two products" ----------------------- */
.buy-both {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  margin-top: 34px; padding: 18px 24px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, var(--brand-soft-2));
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.buy-both .bb-logos { display: flex; align-items: center; }
.buy-both .bb-logos img { width: 40px; height: 40px; border-radius: 11px; object-fit: contain; border: 2px solid var(--surface); box-shadow: var(--shadow-xs); }
.buy-both .bb-logos img:nth-child(2) { margin-left: -12px; }
.buy-both .bb-craft { background: linear-gradient(140deg, #e8f1ff, #f7faff); padding: 4px; }
.buy-both .bb-teacher { background: linear-gradient(140deg, #d6ecff, #ecfaff); padding: 4px; }
.buy-both b { color: var(--text); }
.buy-both .bb-price { color: var(--brand-700); font-weight: 700; }

/* utility */
.hidden { display: none !important; }
.text-brand { color: var(--brand-600); }
.nowrap { white-space: nowrap; }

/* Compact promo strip: the code is the focus, with no navigation CTA. */
.discount-banner {
  --promo-accent: #1f6fe6;
  --promo-soft: #edf5ff;
  width: 100%;
  color: #26364a;
  background: linear-gradient(90deg, #f8fbff, var(--promo-soft), #f8fbff);
  border-bottom: 1px solid color-mix(in srgb, var(--promo-accent) 18%, #e4ebf5);
}
.db-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 58px;
  margin-inline: auto;
  padding-block: 9px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: .92rem;
  font-weight: 650;
}
.db-spark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: #fff;
  background: var(--promo-accent);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--promo-accent) 24%, transparent);
}
.db-badge {
  flex: none;
  color: var(--promo-accent);
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -.02em;
}
.db-offer { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.db-label { color: #53657a; white-space: nowrap; }
.discount-banner code {
  padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--promo-accent) 22%, #dfe8f3);
  border-radius: 9px;
  color: #172538;
  background: rgba(255,255,255,.88);
  box-shadow: 0 2px 8px rgba(30,73,130,.07);
  font-size: .92rem;
  font-weight: 850;
  letter-spacing: .08em;
  white-space: nowrap;
}
.db-note { color: #7b899a; font-size: .82rem; white-space: nowrap; }
.tier-soft { --promo-accent: #1f6fe6; --promo-soft: #edf5ff; }
.tier-warm { --promo-accent: #7754d8; --promo-soft: #f3efff; }
.tier-hot { --promo-accent: #d94b65; --promo-soft: #fff0f3; }
@media (max-width: 640px) {
  .db-inner { width: min(100% - 24px, 420px); min-height: 0; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 7px 9px; justify-content: stretch; padding-block: 10px; }
  .db-offer { gap: 7px; }
  .db-label { display: none; }
  .db-note { grid-column: 2 / -1; }
}

/* promo code box */
.promo-box { max-width: 460px; margin: 26px auto 0; text-align: center; }
.promo-form { display: flex; gap: 10px; }
.promo-form .input { flex: 1; text-transform: uppercase; }
.promo-msg { margin: 10px 0 0; font-size: 0.9rem; min-height: 1.2em; }
.promo-msg.ok { color: var(--success); font-weight: 600; }
.promo-msg.err { color: var(--danger); font-weight: 600; }
.price-old { text-decoration: line-through; color: var(--text-3); font-size: 0.62em; font-weight: 600; margin-right: 5px; }

/* cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 160%);
  width: min(920px, calc(100vw - 28px));
  z-index: 1200;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6eef7);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(20, 40, 70, .18);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.cookie-banner.show { transform: translate(-50%, 0); }
.cookie-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.cookie-text { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--text-2, #556579); flex: 1 1 320px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .cookie-banner { bottom: 10px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

/* ============================ Header user chip ============================ */
.header-user, .header-desktop-actions { align-items: center; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 6px 4px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface, #fff); cursor: pointer; max-width: 230px; transition: border-color .15s ease, box-shadow .15s ease; }
.user-chip:hover { border-color: var(--border-strong, #bfe3fb); box-shadow: 0 2px 10px rgba(46,159,230,.12); }
.user-chip-name { font-weight: 700; font-size: .9rem; color: var(--text); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.user-chip .avatar { width: 34px; height: 34px; flex: none; margin: 0; }
@media (max-width: 600px) { .user-chip { padding: 3px; border-color: transparent; gap: 0; } .user-chip:hover { box-shadow: none; } .user-chip-name { display: none; } }

/* ============================ Notification bell ========================== */
.notif-menu { position: relative; display: flex; align-items: center; }
/* Matches the user-chip pill next to it: same white surface + border + hover. */
.notif-bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface, #fff); display: grid; place-items: center; cursor: pointer; color: var(--text-2, #556579); transition: border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.notif-bell:hover { border-color: var(--border-strong, #bfe3fb); color: var(--primary, #2e9fe6); box-shadow: 0 2px 10px rgba(46,159,230,.12); }
.notif-bell:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(46,159,230,.22); }
.notif-menu.open .notif-bell,
.notif-bell[aria-expanded="true"] { border-color: var(--border-strong, #bfe3fb); color: var(--primary, #2e9fe6); box-shadow: 0 2px 10px rgba(46,159,230,.12); }
.notif-bell svg { width: 20px; height: 20px; display: block; }
.notif-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: linear-gradient(135deg, #ff6a6a, var(--danger, #ef5f5f)); color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface, #fff); box-shadow: 0 2px 6px rgba(239,95,95,.4); }
.notif-dd { position: absolute; right: 0; left: auto; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.ndd-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); margin: 0; }
.ndd-head b { font-size: 1rem; }
.notif-readall { border: 0; background: none; color: var(--primary, #2e9fe6); font-weight: 700; font-size: .82rem; cursor: pointer; padding: 0; }
.ndd-scroll { max-height: min(60vh, 420px); overflow: auto; }
.ndd-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ndd-item:last-child { border-bottom: 0; }
.ndd-item.unread { background: var(--bg-alt, #f6fbff); }
.ndd-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eaf6ff; color: #1f87cf; }
.ndd-ico svg { width: 18px; height: 18px; }
.ndd-item.tone-success .ndd-ico { background: #e8faf1; color: #0f8f62; }
.ndd-item.tone-security .ndd-ico { background: #eef0ff; color: #4b56d6; }
.ndd-item.tone-warning .ndd-ico { background: #fff4e2; color: #b26a06; }
.ndd-body { min-width: 0; flex: 1; }
.ndd-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.ndd-top b { font-size: .9rem; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.ndd-time { color: var(--text-3, #8894a6); font-size: .72rem; white-space: nowrap; }
.ndd-body p { margin: 2px 0 0; color: var(--text-2, #556579); font-size: .84rem; line-height: 1.45; }
/* Neutralize the generic ".dropdown a/button" block styling inside the bell dropdown. */
.notif-dd a, .notif-dd button { display: inline-flex; width: auto; text-align: left; }
.notif-dd .ndd-link { align-items: center; margin-top: 8px; padding: 5px 12px; border-radius: 8px; background: var(--bg-alt, #eef5fb); color: var(--primary, #2e9fe6); font-size: .8rem; font-weight: 700; gap: 0; }
.notif-dd .ndd-link:hover { background: #e2effa; color: var(--primary, #2e9fe6); }
.notif-dd .notif-readall { align-items: center; padding: 4px 10px; border-radius: 8px; background: none; color: var(--primary, #2e9fe6); font-weight: 700; font-size: .82rem; gap: 0; }
.notif-dd .notif-readall:hover { background: var(--bg-alt, #eef5fb); color: var(--primary, #2e9fe6); }
.ndd-link { display: inline-flex !important; width: max-content !important; max-width: 100%; align-self: flex-start; margin-top: 6px; font-size: .82rem; font-weight: 700; color: var(--primary, #2e9fe6); }
.ndd-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; color: var(--text-3, #8894a6); text-align: center; }
.ndd-empty svg { width: 26px; height: 26px; }

/* ================================= News ================================= */
/* min() keeps the track from overflowing viewports narrower than 300px. */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.news-loading { grid-column: 1 / -1; padding: 40px 0; }
.news-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--surface, #fff); overflow: hidden; box-shadow: 0 1px 2px rgba(20,40,70,.04); transition: box-shadow .15s ease, transform .15s ease; }
.news-card:hover { box-shadow: 0 10px 28px rgba(20,40,70,.10); transform: translateY(-2px); }
.news-banner { width: 100%; aspect-ratio: 20 / 7; height: auto; display: grid; place-items: center; background-size: cover; background-position: center; overflow: hidden; }
.news-banner-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.22); color: #fff; }
.news-banner-ico svg { width: 25px; height: 25px; }
.news-main { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.news-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.news-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #eaf6ff; color: #1f87cf; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.news-chip-ico { display: inline-flex; }
.news-chip-ico svg { width: 14px; height: 14px; }
.news-card.tone-success .news-chip { background: #e8faf1; color: #0f8f62; }
.news-card.tone-security .news-chip { background: #eef0ff; color: #4b56d6; }
.news-card.tone-warning .news-chip { background: #fff4e2; color: #b26a06; }
.news-card.tone-system .news-chip { background: #eef2f7; color: #4a5a70; }
.news-test-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #fff4e2; color: #b26a06; font-size: .68rem; font-weight: 800; }
.news-time { margin-left: auto; color: var(--text-3, #8894a6); font-size: .78rem; white-space: nowrap; }
.news-title { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.3; }
.news-text { margin: 0 0 14px; color: var(--text-2, #556579); font-size: .92rem; line-height: 1.55; flex: 1; overflow-wrap: anywhere; }
.news-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.news-empty-block { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 60px 24px; border: 1px dashed var(--border); border-radius: 18px; }
.news-empty-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #eaf6ff; color: #1f87cf; margin-bottom: 6px; }
.news-empty-ico svg { width: 28px; height: 28px; }
.news-empty-block p { color: var(--text-3, #8894a6); }

/* News reading modal */
.news-modal { position: fixed; inset: 0; z-index: 1600; display: none; align-items: center; justify-content: center; padding: 16px; }
.news-modal.open { display: flex; }
.news-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,38,.5); backdrop-filter: blur(3px); }
/* dvh so mobile browser toolbars don't cut the dialog off. */
.news-modal-dialog { position: relative; width: min(680px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; background: var(--surface, #fff); border-radius: 18px; box-shadow: var(--shadow-lg, 0 30px 70px rgba(20,40,70,.3)); }
.news-modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,.9); cursor: pointer; font-size: 1rem; color: var(--text-2, #40506a); }
.nm-banner { width: 100%; aspect-ratio: 20 / 7; height: auto; display: grid; place-items: center; background-size: cover; background-position: center; overflow: hidden; }
.nm-inner { padding: 22px 26px 28px; }
.nm-title { margin: 10px 0 12px; font-size: 1.6rem; line-height: 1.25; }
.nm-body { color: var(--text-2, #3a4759); font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.nm-body + .btn { margin-top: 18px; }
@media (max-width: 560px) { .notif-bell { width: 40px; height: 40px; } .nm-inner { padding: 18px; } .nm-title { font-size: 1.3rem; } .news-modal-dialog { border-radius: 14px; } }

/* ============================ Viewport fitting ===========================
   Marketing pages are header + content + <div data-footer>. Without this the
   footer sits right under the content, leaving dead space below it on tall or
   rotated screens (e.g. a 1080x1920 portrait monitor). :has() scopes this to
   the static site — the cabinet and admin layouts have no [data-footer].    */
body:has(> [data-footer]) { display: flex; flex-direction: column; }
body:has(> [data-footer]) > [data-footer] { margin-top: auto; }
/* Fallback for browsers without :has() — same effect, keyed off the page flag. */
@supports not selector(:has(*)) {
  body[data-page]:not([data-page="app"]):not([data-page="auth"]) { display: flex; flex-direction: column; }
  body[data-page]:not([data-page="app"]):not([data-page="auth"]) > [data-footer] { margin-top: auto; }
}

/* Large desktops and 1440p/4K: let the content use more of the width instead
   of stranding it in a 1280px column. */
@media (min-width: 1800px) {
  :root { --container: 1440px; }
}

/* Very narrow phones (320-380px): the 560px tier still assumes ~16px gutters. */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  section { padding: 44px 0; }
  .news-modal { padding: 8px; }
  .nm-inner { padding: 16px 14px 20px; }
  .news-main { padding: 14px 14px 16px; }
  h1 { font-size: 1.7rem; }
}

/* Short landscape viewports (phones on their side, split-screen windows):
   full-height sections would otherwise push everything off-screen. */
@media (max-height: 560px) and (orientation: landscape) {
  section { padding: 32px 0; }
  .hero { padding: 36px 0 32px; }
  .auth-wrap { min-height: 0; padding: 28px 20px; }
  .news-modal-dialog { max-height: calc(100dvh - 16px); }
}

/* Long unbreakable strings (URLs, headings) make a grid track's min-content
   wider than the screen, which is what pushed /legal/* off a 320px viewport. */
.legal-layout > * { min-width: 0; }
.legal-toc a, .legal-body a { overflow-wrap: anywhere; }
/* The demo tab strip is a fixed flex row — let it scroll instead of the page. */
.cc-demo-tabs { overflow-x: auto; scrollbar-width: none; }
.cc-demo-tabs::-webkit-scrollbar { display: none; }
.cc-cat { flex: 0 0 auto; }
/* Wide tables scroll inside their own box instead of widening the page. */
.legal-table { display: block; width: 100%; overflow-x: auto; }
/* Grid/flex items default to min-width:auto, so one long unbreakable string
   (an email, a URL) makes the whole track wider than the viewport. */
.grid > *, .flex > * { min-width: 0; }
.card .link, .card a[href^="mailto:"], .card a[href^="http"] { overflow-wrap: anywhere; }

/* -------------------------- Extension download -------------------------- */
.download-access-section { min-height: min(690px,calc(100dvh - 148px)); display: grid; align-items: center; padding: 72px 0; background: radial-gradient(700px 360px at 50% 5%,rgba(111,170,255,.18),transparent 70%); }
.download-access-card { width: min(720px,100%); margin: 0 auto; padding: clamp(34px,6vw,56px); border: 1px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: 0 28px 70px -42px rgba(24,74,150,.55); text-align: center; }
.download-access-icon { inline-size: 58px; block-size: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 17px; background: var(--brand-soft); color: var(--brand-600); font-size: 1.35rem; font-weight: 800; box-shadow: inset 0 0 0 1px #e0ebfb; }
.download-access-card .eyebrow { margin-bottom: 17px; }
.download-access-card h1 { margin: 0; font-size: clamp(1.75rem,4vw,2.45rem); line-height: 1.12; letter-spacing: -.035em; }
.download-access-card > p { max-width: 590px; margin: 16px auto 0; color: var(--text-2); font-size: 1rem; font-weight: 500; line-height: 1.65; }
.download-access-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.download-access-actions .btn { min-width: 150px; }
.download-access-loading { padding-block: clamp(48px,8vw,72px); }
.download-access-spinner { inline-size: 46px; block-size: 46px; display: block; margin: 0 auto 20px; border: 4px solid #dce9fb; border-top-color: var(--brand); border-radius: 50%; animation: download-access-spin .8s linear infinite; }
@keyframes download-access-spin { to { transform: rotate(360deg); } }

.download-hero { padding: 54px 0 8px; }
.download-hero .section-head { margin-bottom: 26px; }
.download-hero .section-head p { max-width: 560px; margin-inline: auto; }
.download-meta { display: grid; grid-template-columns: repeat(3,minmax(0,190px)); justify-content: center; gap: 10px; }
.download-meta li { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-xs); }
.download-meta svg { flex: none; inline-size: 15px; block-size: 15px; color: var(--text-3); }
.download-meta strong { color: inherit; }
.download-methods-section { padding: 44px 0 10px; }
.download-methods { width: min(1000px,100%); margin: 0 auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: stretch; }
.download-method-card { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 32px; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: 0 18px 44px -28px rgba(24,74,150,.4); transition: transform .18s ease,box-shadow .18s ease; }
.download-method-card:hover { transform: translateY(-4px); box-shadow: 0 28px 62px -32px rgba(24,74,150,.52); }
.download-method-store { border-color: #e3ecf9; box-shadow: 0 24px 54px -30px rgba(24,74,150,.5); }
.download-method-accent { position: absolute; inset: 0 0 auto; block-size: 4px; background: linear-gradient(90deg,#5aa0ff,var(--brand)); }
.download-method-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 58px; }
.download-method-icon { flex: none; inline-size: 58px; block-size: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-soft); color: var(--brand-600); }
.download-method-icon > svg { inline-size: 28px; block-size: 28px; }
.download-method-icon-store { background: var(--brand-soft-2); box-shadow: inset 0 0 0 1px #e6eefb; }
.download-browser-logo { display: block; inline-size: 36px; block-size: 36px; object-fit: contain; }
.download-recommended { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.download-recommended i { inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.download-method-step { margin: 22px 0 6px; color: var(--text-3); font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.download-method-card h2 { font-size: clamp(1.35rem,2.4vw,1.58rem); }
.download-method-card > p { margin-top: 12px; font-size: .97rem; line-height: 1.6; font-weight: 500; }
.download-method-spacer { flex: 1; }
.download-method-button { inline-size: 100%; margin-top: 26px; min-block-size: 50px; white-space: normal; line-height: 1.25; }
.download-method-button svg { flex: none; inline-size: 17px; block-size: 17px; }
.download-method-card > small { display: block; margin-top: 14px; color: var(--text-3); font-size: .81rem; font-weight: 500; line-height: 1.45; text-align: center; }
.download-file-card { display: flex; align-items: center; gap: 13px; margin-top: 20px; padding: 14px 16px; border: 1px solid #e6eefb; border-radius: 14px; background: #f7faff; }
.download-file-icon { flex: none; inline-size: 40px; block-size: 40px; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--brand-600); box-shadow: 0 2px 6px rgba(30,90,180,.1); }
.download-file-icon svg { inline-size: 19px; block-size: 19px; }
.download-file-card > span:last-child { min-width: 0; }
.download-file-card strong { display: block; overflow: hidden; color: var(--text); font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.download-file-card small { display: block; margin-top: 1px; color: var(--text-3); font-size: .78rem; font-weight: 600; }
.download-method-gate { margin-top: 20px; text-align: center; }
.download-method-gate h3 { font-size: 1rem; }
.download-method-gate p { margin-top: 5px; font-size: .84rem; }
.download-method-gate .download-gate-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.download-method-gate .download-gate-actions .btn { flex: 1 1 auto; }
.download-method-gate .download-method-button { margin-top: 0; }
.download-manual-section { padding: 72px 0 54px; }
.download-manual-section .section-head { margin-bottom: 44px; }
.download-manual-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 26px; align-items: stretch; }
.download-steps { height: 100%; padding: 16px 30px 20px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 18px 44px -28px rgba(24,74,150,.4); }
.download-steps > li:not(.download-steps-link) { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #eef2f8; }
.download-steps > li > span { flex: none; inline-size: 38px; block-size: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand-600); font-size: 1rem; font-weight: 800; }
.download-steps h3 { font-size: 1rem; letter-spacing: -.01em; }
.download-steps h3:has(.download-step-browser-logo) { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.download-steps p { margin-top: 3px; color: var(--text-3); font-size: .87rem; font-weight: 500; line-height: 1.5; }
.download-steps code { padding: 2px 6px; border-radius: 6px; background: var(--brand-soft-2); font-size: .82rem; overflow-wrap: anywhere; }
.download-step-browser-logo { flex: none; inline-size: 19px; block-size: 19px; object-fit: contain; }
.download-steps-link { padding-top: 18px; }
.download-steps-link a { display: inline-flex; align-items: center; gap: 7px; color: var(--brand-600); font-size: .9rem; font-weight: 700; }
.download-steps-link svg { inline-size: 16px; block-size: 16px; }
.download-video-card { width: 100%; height: 100%; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: 0 22px 50px -30px rgba(24,74,150,.5); text-align: left; transition: transform .18s ease,box-shadow .18s ease; }
.download-video-card:hover { transform: translateY(-4px); box-shadow: 0 30px 68px -34px rgba(24,74,150,.58); }
.download-video-stage { position: relative; aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; overflow: hidden; background: radial-gradient(520px 300px at 70% 10%,rgba(120,178,255,.4),transparent 60%),linear-gradient(150deg,#eaf2ff,#f4f8fd 55%,#e9f0fb); }
.download-video-stage > img { inline-size: 72px; block-size: 72px; filter: drop-shadow(0 12px 22px rgba(31,111,230,.34)); }
.download-video-kicker { color: #3a4453; font-size: .94rem; font-weight: 700; }
.download-video-stage > strong { color: transparent; background: linear-gradient(90deg,#2a7bf0,#5aa0ff); background-clip: text; font-size: clamp(1.55rem,4vw,2.05rem); font-weight: 800; letter-spacing: -.03em; }
.download-video-play { position: absolute; inset-inline-start: 22px; inset-block-end: 22px; display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px 11px 15px; border-radius: 999px; background: #fff; color: var(--brand-600); font-size: .88rem; font-weight: 700; box-shadow: 0 12px 26px -12px rgba(24,74,150,.5); transition: transform .18s ease; }
.download-video-card:hover .download-video-play { transform: scale(1.05); }
.download-video-play i { inline-size: 24px; block-size: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; }
.download-video-play svg { inline-size: 11px; block-size: 11px; }
.download-video-duration { position: absolute; inset-inline-end: 18px; inset-block-end: 20px; padding: 5px 10px; border-radius: 8px; background: rgba(20,40,80,.72); color: #fff; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.download-video-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-top: 1px solid #f0f4fa; }
.download-video-meta strong { font-size: .94rem; }
.download-video-meta small { color: var(--text-3); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.download-help { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 22px 26px; border: 1px solid #dbe9ff; border-radius: 20px; background: linear-gradient(135deg,#eef4ff,#e6f0ff); }
.download-help-icon { flex: none; inline-size: 44px; block-size: 44px; display: grid; place-items: center; border-radius: 13px; background: #fff; color: var(--brand-600); box-shadow: 0 4px 10px -4px rgba(31,111,230,.5); }
.download-help-icon svg { inline-size: 21px; block-size: 21px; }
.download-help > div { flex: 1; min-width: 0; }
.download-help h3 { color: #1a4c9e; font-size: 1rem; letter-spacing: -.01em; }
.download-help p { margin-top: 2px; color: #3a6bc4; font-size: .88rem; font-weight: 500; }
.download-help .btn { flex: none; }
.download-help .btn svg { inline-size: 16px; block-size: 16px; }

@media (min-width: 881px) {
  .download-steps { display: flex; flex-direction: column; }
  .download-steps > li:not(.download-steps-link) { flex: 1 1 0; align-items: center; }
  .download-steps-link { margin-top: auto; padding-bottom: 4px; }
}

@media (max-width: 880px) {
  .download-methods,.download-manual-layout { grid-template-columns: 1fr; }
  .download-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
  .download-steps > li:not(.download-steps-link) { display: block; border-bottom: 0; }
  .download-steps > li > span { margin-bottom: 12px; }
  .download-steps-link { grid-column: 1/-1; }
}

@media (max-width: 640px) {
  .download-access-section { min-height: calc(100dvh - 120px); padding: 42px 0; }
  .download-access-card { padding: 30px 20px; border-radius: 22px; }
  .download-access-actions { align-items: stretch; flex-direction: column; }
  .download-access-actions .btn { width: 100%; min-width: 0; }
  .download-hero { padding-top: 42px; }
  .download-meta { grid-template-columns: 1fr; width: min(280px,100%); margin-inline: auto; }
  .download-method-card { padding: 24px 20px; }
  .download-method-card:hover,.download-video-card:hover { transform: none; }
  .download-steps { display: block; padding: 12px 20px 18px; }
  .download-steps > li:not(.download-steps-link) { display: flex; border-bottom: 1px solid #eef2f8; }
  .download-steps > li > span { margin-bottom: 0; }
  .download-video-play { inset-inline-start: 14px; inset-block-end: 14px; }
  .download-video-duration { inset-inline-end: 14px; inset-block-end: 16px; }
  .download-video-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .download-help { align-items: flex-start; flex-wrap: wrap; padding: 20px; }
  .download-help .btn { width: 100%; margin-top: 6px; }
}

/* ------------------- Video card + custom video player ------------------- */
/* Used on /download for the install walkthrough. The card is a <button> so it
   is keyboard-reachable; the modal mounts the <video> lazily on open so the
   13 MB file is never fetched for visitors who don't press play. The player
   chrome is ours (see initVideoModal in script.js) — native controls look
   different in every browser and can't be themed. */
.video-card { display: block; width: min(780px, 100%); margin: 0 auto; padding: 0; border: 1px solid var(--border, #e6eaf2); border-radius: 20px; background: var(--surface, #fff); box-shadow: var(--shadow, 0 8px 24px rgba(20,32,46,.08)); cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg, 0 20px 48px rgba(20,32,46,.12)); }
.video-card:focus-visible { outline: 3px solid var(--brand, #2f80ff); outline-offset: 3px; }
.video-card-media { position: relative; display: block; aspect-ratio: 1660 / 1080; background: var(--brand-soft-2, #f2f7ff); overflow: hidden; }
.video-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.video-card:hover .video-card-media img { transform: scale(1.03); }
.video-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,38,0) 62%, rgba(15,23,38,.22)); }
/* The poster is a title card with its own centred artwork, so the play badge
   sits in the corner as a pill instead of covering the text. */
.video-card-play { position: absolute; left: 18px; bottom: 18px; z-index: 1; height: 48px; padding: 0 20px 0 15px; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.96); color: var(--brand, #2f80ff); font-weight: 600; font-size: .95rem; box-shadow: 0 10px 28px rgba(15,23,38,.24); transition: transform .2s ease, box-shadow .2s ease; }
.video-card-play svg { width: 20px; height: 20px; }
.video-card-play-label { line-height: 1; }
.video-card:hover .video-card-play { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15,23,38,.3); }
.video-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px 18px; }
.video-card-title { display: block; font-weight: 600; font-size: 1.05rem; }
.video-card-hint { display: block; color: var(--text-2, #4a5568); font-size: .92rem; white-space: nowrap; }

/* ------------------------------ Lightbox -------------------------------- */
.video-modal { position: fixed; inset: 0; z-index: 1700; display: none; align-items: center; justify-content: center; padding: 24px; }
.video-modal.open { display: flex; animation: vp-fade .2s ease; }
@keyframes vp-fade { from { opacity: 0; } to { opacity: 1; } }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(8,14,26,.82); backdrop-filter: blur(6px); }

.vplayer { position: relative; width: min(1040px, 100%); border-radius: 18px; overflow: hidden; background: #05080f; box-shadow: 0 40px 90px rgba(0,0,0,.55); animation: vp-pop .24s cubic-bezier(.2,.8,.3,1); }
@keyframes vp-pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vplayer.is-full { width: 100%; height: 100%; border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
.vp-stage { position: relative; cursor: pointer; }
.vp-stage video { display: block; width: 100%; max-height: calc(100dvh - 150px); background: #05080f; }
.vplayer.is-full .vp-stage video { max-height: 100dvh; }

/* Big centre play badge — fades out while playing. */
.vp-big { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.94); color: #1f6fe6; box-shadow: 0 14px 40px rgba(0,0,0,.4); pointer-events: none; opacity: 1; transition: opacity .2s ease, transform .2s ease; }
.vp-big svg { width: 36px; height: 36px; margin-left: 3px; }
.vplayer.is-playing .vp-big { opacity: 0; transform: translate(-50%,-50%) scale(1.25); }
.vplayer.is-loading .vp-big { opacity: 0; }
.vp-spinner { position: absolute; top: 50%; left: 50%; margin: -22px 0 0 -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; opacity: 0; pointer-events: none; }
.vplayer.is-loading .vp-spinner { opacity: 1; animation: vp-spin .8s linear infinite; }
@keyframes vp-spin { to { transform: rotate(360deg); } }

.vp-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: rgba(10,16,28,.55); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: background .18s ease, transform .18s ease; }
.vp-close svg { width: 20px; height: 20px; }
.vp-close:hover { background: rgba(10,16,28,.85); transform: rotate(90deg); }
.vp-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Control bar */
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 34px 16px 14px; background: linear-gradient(180deg, rgba(5,8,15,0), rgba(5,8,15,.88)); transition: opacity .25s ease, transform .25s ease; }
.vplayer.hide-ui .vp-bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.vplayer.hide-ui .vp-stage { cursor: none; }
.vp-btn { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; transition: background .15s ease; }
.vp-btn svg { width: 21px; height: 21px; }
.vp-btn:hover { background: rgba(255,255,255,.16); }
/* display:grid above would otherwise beat the hidden attribute (PiP-less browsers). */
.vp-btn[hidden] { display: none; }
.vp-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.vp-time { flex: none; color: rgba(255,255,255,.9); font-size: .85rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* Seek bar. Padding gives a comfortable grab area around the 4px rail. */
.vp-track { position: relative; flex: 1 1 auto; min-width: 60px; height: 18px; padding: 7px 0; cursor: pointer; touch-action: none; }
.vp-track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); }
.vp-track-buffer, .vp-track-fill { position: absolute; left: 0; top: 7px; height: 4px; border-radius: 4px; width: 0; }
.vp-track-buffer { background: rgba(255,255,255,.35); }
.vp-track-fill { background: linear-gradient(90deg, #2a7bf0, #4fa3ff); }
.vp-knob { position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); opacity: 0; transition: opacity .15s ease; }
.vp-track:hover .vp-knob, .vp-track:focus-visible .vp-knob { opacity: 1; }
.vp-track:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

/* Autoplay was refused with sound → nudge the user toward the volume button. */
.vplayer.sound-blocked .vp-vol [data-vp-mute] { background: rgba(255,255,255,.2); animation: vp-pulse 1.8s ease-in-out infinite; }
@keyframes vp-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 50% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }
.vplayer.sound-blocked .vp-vol-range { width: 74px; opacity: 1; }

/* Volume slider expands on hover so the bar stays uncluttered. */
.vp-vol { display: flex; align-items: center; gap: 4px; }
.vp-vol-range { width: 0; opacity: 0; height: 4px; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: linear-gradient(90deg, #fff var(--vol, 100%), rgba(255,255,255,.3) var(--vol, 100%)); border-radius: 4px; cursor: pointer; transition: width .2s ease, opacity .2s ease; }
.vp-vol:hover .vp-vol-range, .vp-vol-range:focus-visible { width: 74px; opacity: 1; }
.vp-vol-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.vp-vol-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }

@media (max-width: 700px) {
  .video-modal { padding: 10px; }
  .vplayer { border-radius: 14px; }
  .vp-bar { gap: 8px; padding: 30px 10px 10px; }
  .vp-btn { width: 34px; height: 34px; }
  .vp-time { font-size: .78rem; }
  .vp-vol { display: none; }
  .vp-big { width: 64px; height: 64px; }
  .vp-big svg { width: 28px; height: 28px; }
  .video-card-play { left: 12px; bottom: 12px; height: 42px; padding: 0 16px 0 13px; font-size: .88rem; }
  .video-card-play svg { width: 18px; height: 18px; }
  .video-card-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
}
