/* =========================================================================
   RovySec — design system
   Garnet night, liquid crimson, pearl. Serif display + clean sans.
   Edit colours and fonts here; every page reads from these variables.
   ========================================================================= */
:root {
  --garnet: #160a10;        /* page background */
  --velvet: #23121a;        /* raised surfaces */
  --velvet-2: #2e1822;
  --crimson: #ff0033;       /* brand red: buttons, key accents */
  --crimson-deep: #c8002a;
  --rose: #ff6b8b;          /* liquid highlight */
  --pearl: #f7eff2;         /* main text on dark, background of light sections */
  --mist: #bca9b2;          /* secondary text */
  --mist-2: #8f7a84;
  --ink: #2a1219;           /* text on pearl */
  --gold: #d6b23e;          /* client accent (Via, Looksy) */
  --line: rgba(247, 239, 242, 0.12);
  --line-strong: rgba(247, 239, 242, 0.22);

  --glass-bg: rgba(255, 240, 245, 0.055);
  --glass-bg-strong: rgba(40, 18, 28, 0.72);
  --glass-border: rgba(255, 235, 241, 0.16);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.75);

  --font-display: "Noto Serif Display", "Times New Roman", serif;
  --font-sans: "Onest Variable", "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-xl: 32px;  /* hero panels, large media */
  --r-lg: 22px;  /* cards */
  --r-md: 14px;  /* inputs, small tiles */
  --r-pill: 999px;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(80px, 11vw, 150px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--garnet); color: var(--pearl);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--crimson); color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 300; background: var(--pearl); color: var(--ink); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; }
body.is-locked { overflow: hidden; }

/* ---------- Ambient liquid background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient::before, .ambient::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px); opacity: .28;
}
.ambient::before { width: 60vw; height: 60vw; left: -22vw; top: -18vw; background: radial-gradient(circle, #5c0a22 0%, transparent 70%); }
.ambient::after { width: 55vw; height: 55vw; right: -20vw; top: 40vh; background: radial-gradient(circle, #3e0a2a 0%, transparent 70%); }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 860px; }
.section { padding: var(--section) 0; position: relative; }
.section-tight { padding: calc(var(--section) * .6) 0; }
.section-pearl { background: var(--pearl); color: var(--ink); }
.section-pearl .muted, .section-pearl .lead { color: #6d5560; }
.section-pearl .card-flat { border-color: rgba(42, 18, 25, .12); background: rgba(255,255,255,.55); }
main { display: block; }

/* ---------- Typography ---------- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.04; }
h1, .h1 { font-size: clamp(2.7rem, 6.4vw, 5.6rem); font-weight: 300; }
.hero-title { font-size: clamp(2.9rem, 6.6vw, 6.2rem); font-weight: 300; line-height: .98; letter-spacing: -0.03em; }
h2, .h2 { font-size: clamp(2.1rem, 4.4vw, 3.7rem); font-weight: 300; }
h3, .h3 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1.15; }
h4, .h4 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }
.title-soft { font-style: italic; color: var(--mist); }
.section-pearl .title-soft { color: #8a6b78; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.6; color: var(--mist); max-width: 62ch; }
.muted { color: var(--mist); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }
p + p { margin-top: 1em; }
.measure { max-width: 64ch; }
.stack > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.kicker { font-size: .95rem; color: var(--mist); font-weight: 500; }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(44px, 6vw, 80px); max-width: 780px; }
.section-head.split { max-width: none; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 960px) { .section-head.split { grid-template-columns: 1.1fr .9fr; gap: 60px; } }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: .98rem; letter-spacing: .005em; white-space: nowrap;
  transition: transform .35s var(--ease), background-color .25s, box-shadow .35s var(--ease), color .25s, border-color .25s;
  position: relative; isolation: isolate;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  color: #fff;
  background: radial-gradient(120% 140% at 30% 0%, #ff5274 0%, var(--crimson) 45%, var(--crimson-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -8px 18px rgba(120,0,25,.3), 0 8px 18px -12px rgba(0,0,0,.6);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-hi);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.btn-glass:hover { background: rgba(255, 240, 245, .11); border-color: var(--line-strong); }
.btn-dark { background: var(--ink); color: var(--pearl); }
.btn-dark:hover { background: #3d1a25; }
.btn-sm { --h: 42px; padding: 0 18px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--pearl);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: background-size .35s var(--ease); }
.text-link:hover { background-size: 100% 1px; }
.text-link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }
.section-pearl .text-link { color: var(--ink); }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.panel { border-radius: var(--r-xl); padding: clamp(28px, 4vw, 56px); position: relative; overflow: hidden; }
.panel::before { /* specular sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.09) 0%, transparent 38%, transparent 70%, rgba(255,107,139,.06) 100%);
}
.card-flat { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; background: rgba(255, 240, 245, .025); }

/* ---------- Navigation ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 12px clamp(12px, 2vw, 28px) 0; pointer-events: none; }
.nav-pill {
  pointer-events: auto; max-width: 1480px; margin: 0 auto; height: 68px; padding: 0 12px 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 14px;
  background: rgba(30, 12, 20, .42); border: 1px solid rgba(255, 235, 241, .1);
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 20px 50px -24px rgba(0,0,0,.8);
  transition: background-color .3s, border-color .3s;
}
.site-header.is-scrolled .nav-pill { background: rgba(26, 10, 17, .78); border-color: rgba(255, 235, 241, .14); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-weight: 700; letter-spacing: .14em; font-size: 1rem; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand .sec { color: var(--crimson); }
.nav-links { display: none; align-items: center; gap: 2px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 13px; border-radius: 10px; font-size: .93rem; font-weight: 500; color: #dccdd3; transition: background-color .2s, color .2s; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: rgba(255, 240, 245, .08); color: var(--pearl); }
.nav-link[aria-current="page"] { color: var(--pearl); background: rgba(255, 240, 245, .1); }
.nav-link svg { width: 14px; height: 14px; transition: transform .25s var(--ease); opacity: .7; }
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-item { position: relative; }
.drop-panel {
  position: absolute; top: calc(100% + 14px); left: 50%; width: 560px; padding: 12px;
  transform: translate(-50%, -6px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s, transform .3s var(--ease), visibility .22s;
  border-radius: 26px; background: rgba(30, 12, 20, .975); border: 1px solid rgba(255, 235, 241, .14);
  backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 70px -20px rgba(0,0,0,.85);
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.drop-panel::before { content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.nav-item.is-open .drop-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.drop-link { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px; border-radius: 16px; transition: background-color .2s; }
.drop-link:hover { background: rgba(255, 240, 245, .07); }
.drop-link .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 0, 51, .12); color: var(--rose); }
.drop-link .ico svg { width: 18px; height: 18px; }
.drop-link strong { display: block; font-weight: 600; font-size: .95rem; }
.drop-link span { display: block; font-size: .84rem; color: var(--mist); line-height: 1.4; margin-top: 2px; }
.drop-feature { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(120deg, rgba(255,0,51,.18), rgba(255,107,139,.06)); border: 1px solid rgba(255, 107, 139, .2); font-size: .9rem; }
.drop-feature:hover { border-color: rgba(255, 107, 139, .45); }
.drop-feature b { font-weight: 600; }
.drop-feature svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--rose); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: #e4d6dc; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: rgba(255, 240, 245, .09); color: var(--pearl); }
.icon-btn svg { width: 20px; height: 20px; }
.search-trigger { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 14px; border-radius: 10px; color: var(--mist); border: 1px solid var(--line); background: rgba(255, 240, 245, .04); font-size: .88rem; transition: border-color .2s, color .2s; }
.search-trigger:hover { border-color: var(--line-strong); color: var(--pearl); }
.search-trigger svg { width: 17px; height: 17px; }
.search-trigger kbd { font-family: var(--font-sans); font-size: .72rem; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--mist-2); }
.search-trigger .label { display: none; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: 10px; font-size: .85rem; font-weight: 600; color: #e4d6dc; }
.lang-btn:hover { background: rgba(255, 240, 245, .08); }
.lang-btn svg { width: 16px; height: 16px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 12px); min-width: 170px; padding: 6px; border-radius: 18px; background: rgba(30, 12, 20, .98); border: 1px solid rgba(255,235,241,.14); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 24px 60px -20px rgba(0,0,0,.85); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .3s var(--ease), visibility .2s; }
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; font-size: .92rem; color: #e4d6dc; text-align: left; }
.lang-menu button:hover { background: rgba(255,240,245,.08); color: var(--pearl); }
.lang-menu button[aria-checked="true"] { color: var(--pearl); background: rgba(255,240,245,.06); font-weight: 600; }
.nav-cta, .nav-academy { display: none; }
.nav-pill .btn { border-radius: 10px; }
.nav-academy { gap: 8px; }
.menu-toggle { display: inline-grid; }
@media (max-width: 639px) {
  .search-trigger { width: 44px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-trigger kbd { display: none; }
  .lang-btn { padding: 0 8px; }
  .nav-pill { padding: 0 6px 0 16px; }
  .work-meta { flex-direction: column; gap: 14px; }
  .orb { width: min(360px, 78vw); }
}
@media (min-width: 640px) { .search-trigger .label { display: inline; } }
@media (min-width: 1240px) {
  .nav-links { display: flex; }
  .nav-cta, .nav-academy { display: inline-flex; }
  .menu-toggle { display: none; }
  .search-trigger .label, .search-trigger kbd { display: none; }
  .search-trigger { width: 42px; padding: 0; justify-content: center; }
}
@media (min-width: 1500px) { .search-trigger .label, .search-trigger kbd { display: inline; } .search-trigger { width: auto; padding: 0 12px 0 14px; } }

/* Mobile sheet */
.mobile-sheet {
  position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column;
  background: rgba(22, 10, 16, .86); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; overflow-y: auto; overscroll-behavior: contain;
}
.mobile-sheet.is-open { opacity: 1; visibility: visible; }
.mobile-sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter) 8px; }
.mobile-nav { padding: 12px var(--gutter) 24px; display: grid; gap: 2px; }
.m-link, .m-acc-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 4px; font-family: var(--font-display); font-size: 1.85rem; font-weight: 300; letter-spacing: -0.01em; border-bottom: 1px solid var(--line); text-align: left; }
.m-link[aria-current="page"] { color: var(--rose); }
.m-acc-btn svg { width: 22px; height: 22px; transition: transform .3s var(--ease); color: var(--mist); }
.m-acc-btn[aria-expanded="true"] svg { transform: rotate(45deg); }
.m-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.m-acc-panel > div { overflow: hidden; }
.m-acc-btn[aria-expanded="true"] + .m-acc-panel { grid-template-rows: 1fr; }
.m-sub { display: block; padding: 12px 4px 12px 16px; border-left: 1px solid var(--line-strong); margin-left: 4px; }
.m-sub:first-child { margin-top: 10px; }
.m-sub:last-child { margin-bottom: 14px; }
.m-sub strong { display: block; font-weight: 600; font-size: 1.02rem; }
.m-sub span { display: block; color: var(--mist); font-size: .88rem; }
.mobile-foot { margin-top: auto; padding: 18px var(--gutter) 30px; display: grid; gap: 16px; }
.m-langs { display: flex; gap: 8px; flex-wrap: wrap; }
.m-langs button { padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--mist); }
.m-langs button[aria-checked="true"] { border-color: var(--crimson); color: var(--pearl); background: rgba(255,0,51,.14); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: center; padding: 140px 0 90px; overflow: hidden; }
.hero-grid { display: grid; gap: 50px; align-items: center; position: relative; z-index: 2; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero-copy { display: grid; gap: 28px; }
.hero-copy .lead { color: #d6c5cc; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; color: var(--mist); font-size: .88rem; padding-top: 10px; }
.hero-meta span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }


/* The liquid orb: the one bold moment of the site */
.orb { position: relative; width: min(520px, 86vw); aspect-ratio: 1; margin: 0 auto; }
.orb-liquid {
  position: absolute; inset: 6%;
  background:
    radial-gradient(circle at 32% 28%, #ffe3e9 0%, rgba(255, 214, 222, .0) 18%),
    radial-gradient(circle at 70% 75%, #5a0418 0%, transparent 55%),
    radial-gradient(circle at 40% 40%, #ff7a95 0%, #ff0033 38%, #a3001f 68%, #3a0614 100%);
  border-radius: 58% 42% 55% 45% / 46% 56% 44% 54%;
  box-shadow: 0 0 120px -10px rgba(255, 0, 51, .55), inset -30px -40px 80px rgba(40, 0, 10, .55), inset 20px 20px 60px rgba(255, 200, 210, .25);
  animation: morph 16s ease-in-out infinite alternate, spin 60s linear infinite;
}
.orb-liquid::after { /* specular streak */
  content: ""; position: absolute; left: 18%; top: 12%; width: 34%; height: 18%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0)); filter: blur(6px); transform: rotate(-24deg);
}
.orb-lens {
  position: absolute; width: 46%; aspect-ratio: 1; left: -4%; bottom: 2%; border-radius: 50%;
  background: rgba(255, 240, 245, .06); border: 1px solid rgba(255, 240, 245, .28);
  backdrop-filter: blur(14px) saturate(180%) brightness(1.15); -webkit-backdrop-filter: blur(14px) saturate(180%) brightness(1.15);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -10px 30px rgba(255, 107, 139, .18), 0 30px 60px -20px rgba(0,0,0,.6);
  animation: float 9s ease-in-out infinite;
}
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 235, 241, .12); }
.orb-ring.r2 { inset: -9%; border-color: rgba(255, 235, 241, .06); }
.orb-chip { position: absolute; right: -2%; top: 14%; padding: 12px 16px; border-radius: 18px; font-size: .86rem; display: grid; gap: 2px; animation: float 11s ease-in-out infinite reverse; }
.orb-chip b { font-weight: 600; }
.orb-chip span { color: var(--mist); font-size: .78rem; }
@keyframes morph {
  0% { border-radius: 58% 42% 55% 45% / 46% 56% 44% 54%; }
  50% { border-radius: 42% 58% 40% 60% / 58% 40% 60% 42%; }
  100% { border-radius: 52% 48% 63% 37% / 40% 62% 38% 60%; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Page load: one orchestrated entrance on the hero only */
.enter > * { opacity: 0; transform: translateY(18px); animation: enter .9s var(--ease) forwards; }
.enter > *:nth-child(2) { animation-delay: .08s; }
.enter > *:nth-child(3) { animation-delay: .16s; }
.enter > *:nth-child(4) { animation-delay: .24s; }
.enter > *:nth-child(5) { animation-delay: .32s; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* ---------- Inner page header ---------- */
.page-head { position: relative; padding: clamp(150px, 18vw, 210px) 0 clamp(50px, 7vw, 90px); overflow: hidden; }
.page-head .container { position: relative; z-index: 2; display: grid; gap: 26px; }
.page-head h1 { max-width: 16ch; }
.page-head .lead { color: #d6c5cc; }
.page-head-orb { display: none; position: absolute; right: -120px; top: 40px; width: 460px; aspect-ratio: 1; opacity: .55; pointer-events: none; z-index: 1;
  border-radius: 58% 42% 55% 45% / 46% 56% 44% 54%;
  background: radial-gradient(circle at 35% 35%, #ff7a95 0%, #ff0033 35%, #7a0820 70%, transparent 100%);
  filter: blur(40px); animation: morph 18s ease-in-out infinite alternate; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--mist); }
.crumbs a:hover { color: var(--pearl); }
.crumbs .sep { opacity: .5; }

/* ---------- Marquee ---------- */
.marquee-wrap { padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.marquee-head p { color: var(--mist); font-size: .95rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: clamp(28px, 5vw, 64px); padding-right: clamp(28px, 5vw, 64px); }
.logo-chip { display: inline-flex; align-items: center; gap: 12px; height: 74px; padding: 0 26px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(255,240,245,.03); flex-shrink: 0; transition: border-color .3s, background-color .3s; }
.logo-chip:hover { border-color: var(--line-strong); background: rgba(255,240,245,.06); }
.logo-chip img { height: 30px; width: auto; }
.logo-chip.tool img { filter: brightness(0) invert(.94); opacity: .8; transition: opacity .3s; }
.logo-chip.tool:hover img { opacity: 1; }
.logo-chip.client { border-color: rgba(214, 178, 62, .28); }
.logo-chip.client:hover { border-color: rgba(214, 178, 62, .6); }
.logo-chip.client img { height: 40px; }
.logo-chip.tool-color img { height: 34px; opacity: .9; }
.logo-chip .wordmark { font-size: .82rem; font-weight: 600; letter-spacing: .22em; color: var(--gold); white-space: nowrap; }
.logo-chip .wordmark-serif { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .12em; color: #c4a06a; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services list (home) ---------- */
.service-rows { border-top: 1px solid var(--line); }
.service-row { display: grid; gap: 14px; padding: 34px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding .4s var(--ease); }
@media (min-width: 900px) {
  .service-row { grid-template-columns: 1fr 1.1fr auto; align-items: center; gap: 48px; }
  .service-row:hover { padding-left: 18px; }
}
.service-row h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 300; }
.service-row p { color: var(--mist); max-width: 52ch; }
.service-row .go { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: background-color .3s, border-color .3s, transform .4s var(--ease); }
.service-row:hover .go { background: var(--crimson); border-color: var(--crimson); transform: rotate(-45deg); }
.service-row .go svg { width: 20px; height: 20px; }
.service-row::after { content: ""; position: absolute; inset: 0; }
.service-row a { position: relative; z-index: 1; }

/* ---------- Work cards ---------- */
.work-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .work-grid { grid-template-columns: 1fr 1fr; } }
.work-card { display: grid; gap: 22px; }
.work-media { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid var(--line); background: var(--velvet); }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.04); }
.work-tag { position: absolute; left: 16px; top: 16px; padding: 8px 14px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 600; }
.work-meta { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.work-meta h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 300; }
.work-meta p { color: var(--mist); margin-top: 8px; max-width: 46ch; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .feature-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .feature-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--garnet); padding: 32px 28px; display: grid; gap: 12px; align-content: start; }
.feature .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 0, 51, .1); color: var(--rose); border: 1px solid rgba(255, 107, 139, .18); margin-bottom: 6px; }
.feature .ico svg { width: 21px; height: 21px; }
.feature p { color: var(--mist); font-size: .97rem; }
.section-pearl .feature-grid { background: rgba(42,18,25,.12); border-color: rgba(42,18,25,.12); }
.section-pearl .feature { background: var(--pearl); }
.section-pearl .feature p { color: #6d5560; }
.section-pearl .feature .ico { background: rgba(255,0,51,.08); color: var(--crimson); border-color: rgba(255,0,51,.18); }

/* ---------- Steps (real sequences only) ---------- */
.steps { display: grid; gap: 22px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: step; padding-top: 26px; border-top: 1px solid rgba(42, 18, 25, .2); display: grid; gap: 10px; align-content: start; }
.step::before { content: counter(step); font-family: var(--font-display); font-size: 3rem; line-height: 1; font-weight: 300; color: var(--crimson); }
.section:not(.section-pearl) .step { border-top-color: var(--line-strong); }
.step p { color: #6d5560; font-size: .97rem; }
.section:not(.section-pearl) .step p { color: var(--mist); }

/* ---------- Facts (definition rows) ---------- */
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts dt { color: var(--mist); }
.facts dd { font-weight: 500; }
.numbers { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .numbers { grid-template-columns: repeat(4, 1fr); } }
.numbers div { display: grid; gap: 6px; }
.numbers b { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 300; line-height: 1; }
.numbers span { color: var(--mist); font-size: .9rem; }

/* ---------- Split layouts ---------- */
.split { display: grid; gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } .split.wide-left { grid-template-columns: 1.2fr .8fr; } .split.wide-right { grid-template-columns: .85fr 1.15fr; } .split.top { align-items: start; } }
.media-frame { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); background: var(--velvet); box-shadow: var(--shadow-lg); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Chat demo ---------- */
.chat { border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; height: 600px; max-height: 80vh; }
.chat-top { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 44px; height: 44px; border-radius: 50%; background: #000; padding: 6px; position: relative; border: 1px solid var(--line-strong); flex-shrink: 0; }
.chat-avatar img { width: 100%; height: 100%; object-fit: contain; }

.chat-top strong { display: block; font-weight: 600; }
.chat-top span { font-size: .82rem; color: #8fe3b4; }
.chat-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 13px 17px; border-radius: 20px; font-size: .96rem; line-height: 1.55; animation: msg .4s var(--ease); }
.msg-bot { align-self: flex-start; background: rgba(255,240,245,.07); border: 1px solid var(--line); border-top-left-radius: 6px; }
.msg-user { align-self: flex-end; background: linear-gradient(135deg, #ff2a55, var(--crimson-deep)); color: #fff; border-top-right-radius: 6px; }
.msg-typing { display: inline-flex; gap: 5px; align-items: center; height: 46px; }
.msg-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mist); animation: blink 1.2s infinite; }
.msg-typing i:nth-child(2) { animation-delay: .2s; } .msg-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes msg { from { opacity: 0; transform: translateY(8px); } }
.chat-chips { display: flex; flex-wrap: nowrap; gap: 8px; padding: 2px 22px 14px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips .chip { flex-shrink: 0; white-space: nowrap; }
@media (min-width: 900px) { .chat-chips { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; } .chat-chips .chip { white-space: normal; } }
.chip { padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: .86rem; font-weight: 500; color: #e6d8de; background: rgba(255,240,245,.04); transition: background-color .2s, border-color .2s; text-align: left; }
.chip:hover { background: rgba(255, 0, 51, .16); border-color: rgba(255, 107, 139, .5); }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 50px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.chat-form input:focus { outline: none; border-color: rgba(255, 107, 139, .6); }
.chat-send { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.chat-send svg { width: 20px; height: 20px; }
.chat-mini { border-radius: var(--r-xl); padding: 22px; display: grid; gap: 12px; max-width: 460px; }

/* ---------- Before / after video ---------- */
.compare { display: grid; gap: 14px; }
.compare-stage { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 9; background: #0b0508; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.compare-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s var(--ease); }
.compare-stage video[data-active="false"] { opacity: 0; pointer-events: none; }
.compare-badge { position: absolute; left: 16px; top: 16px; z-index: 2; padding: 8px 14px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 600; }
.compare-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 5px; border-radius: var(--r-pill); position: relative; }
.seg button { position: relative; z-index: 1; height: 42px; padding: 0 22px; border-radius: var(--r-pill); font-weight: 600; font-size: .92rem; color: var(--mist); transition: color .3s; }
.seg button[aria-selected="true"] { color: #fff; }
.seg-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: var(--r-pill); background: radial-gradient(120% 140% at 30% 0%, #ff5274 0%, var(--crimson) 50%, var(--crimson-deep) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); transition: transform .45s var(--ease), width .45s var(--ease); }
.compare-tools { display: flex; gap: 6px; }
.compare-tools .icon-btn { border: 1px solid var(--line); }
.compare-caption { color: var(--mist); font-size: .92rem; }

/* ---------- Case study ---------- */
.case { padding: var(--section) 0; border-top: 1px solid var(--line); }
.case-head { display: grid; gap: 30px; margin-bottom: 48px; }
@media (min-width: 960px) { .case-head { grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: end; } }
.case-logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.case-logo img { height: 54px; width: auto; }
.case-logo .name { font-size: .82rem; font-weight: 600; letter-spacing: .22em; color: var(--gold); }
.case-logo .name-serif { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; letter-spacing: .14em; color: #c4a06a; }
.case-body { display: grid; gap: 40px; margin-top: 56px; }
@media (min-width: 960px) { .case-body { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.case-body h3 { font-size: 1.5rem; margin-bottom: 12px; }
.case-body p, .case-body li { color: var(--mist); font-size: .98rem; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--rose); border-bottom: 2px solid var(--rose); transform: rotate(-45deg); }
.section-pearl .ticks li::before { border-color: var(--crimson); }

/* ---------- Team ---------- */
.team-lead { display: grid; gap: 36px; align-items: center; border-radius: var(--r-xl); padding: clamp(22px, 3vw, 36px); margin-bottom: 36px; }
@media (min-width: 860px) { .team-lead { grid-template-columns: 340px 1fr; gap: 56px; } }
.portrait { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 1; background: #120709; }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: transform 1s var(--ease); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(22,10,16,.55)), linear-gradient(135deg, rgba(255,0,51,.16), rgba(255,107,139,0) 60%); mix-blend-mode: normal; }
.member:hover .portrait img, .team-lead:hover .portrait img { transform: scale(1.04); }
.team-grid { display: grid; gap: 28px; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }
.member { display: grid; gap: 18px; align-content: start; }
.member h3, .team-lead h2 { font-size: 1.5rem; }
.team-lead h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.role { color: var(--rose); font-weight: 600; font-size: .95rem; margin-top: 6px; }
.member-info { display: grid; gap: 8px; font-size: .92rem; color: var(--mist); }
.member-info span { display: flex; gap: 10px; align-items: start; }
.member-info svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; opacity: .8; }
.member-info a:hover { color: var(--pearl); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 500; color: #dccdd3; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: rgba(10, 4, 7, .35); color: var(--pearl);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23bca9b2' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field select option { background: #22111a; color: var(--pearl); }
.field input::placeholder, .field textarea::placeholder { color: #8a7680; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: rgba(255, 107, 139, .7); box-shadow: 0 0 0 4px rgba(255, 0, 51, .14); background: rgba(10,4,7,.5); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--mist); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-strong); background: rgba(10,4,7,.35); flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--crimson); border-color: var(--crimson); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check a { color: var(--pearl); text-decoration: underline; text-underline-offset: 3px; }
.form-note { font-size: .85rem; color: var(--mist-2); }
.form-status { font-size: .92rem; padding: 14px 16px; border-radius: var(--r-md); background: rgba(61, 220, 132, .08); border: 1px solid rgba(61, 220, 132, .3); color: #c9f3da; }
.form-status[hidden] { display: none; }

/* ---------- Prose (legal, long text) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.4em 0 .7em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #d4c4cb; }
.prose ul { padding-left: 1.2em; display: grid; gap: .6em; margin-top: .8em; }
.prose li::marker { color: var(--rose); }
.prose strong { color: var(--pearl); font-weight: 600; }
.prose a { color: var(--pearl); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,107,139,.6); }
.legal-layout { display: grid; gap: 50px; }
@media (min-width: 1000px) { .legal-layout { grid-template-columns: 240px 1fr; gap: 80px; } }
.toc { position: sticky; top: 120px; align-self: start; display: grid; gap: 4px; font-size: .92rem; }
.toc a { color: var(--mist); padding: 6px 0; }
.toc a:hover { color: var(--pearl); }
@media (max-width: 999px) { .toc { display: none; } }

/* ---------- Blog ---------- */
.post-grid { display: grid; gap: 30px; }
@media (min-width: 900px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post { display: grid; gap: 18px; align-content: start; }
.post-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid var(--line); background: var(--velvet); }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { font-size: .85rem; color: var(--mist); display: flex; gap: 14px; flex-wrap: wrap; }
.post-meta .topic { color: var(--rose); font-weight: 600; }
.post h3 { font-size: 1.55rem; }
.post p { color: var(--mist); font-size: .97rem; }
.post details { border-top: 1px solid var(--line); padding-top: 14px; }
.post summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.post summary::-webkit-details-marker { display: none; }
.post summary svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.post details[open] summary svg { transform: rotate(45deg); }
.post details .stack { margin-top: 14px; }

/* ---------- Report cover (whitepapers) ---------- */
.report-card { display: grid; gap: 34px; align-items: center; border-radius: var(--r-xl); padding: clamp(24px, 3.5vw, 44px); }
@media (min-width: 900px) { .report-card { grid-template-columns: 300px 1fr; gap: 56px; } }
.cover { aspect-ratio: 3 / 4; border-radius: 18px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(255,0,51,.45), transparent 50%), radial-gradient(circle at 10% 90%, rgba(255,107,139,.25), transparent 45%), #1b0a11;
  border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); }
.cover-top { display: flex; justify-content: space-between; align-items: center; }
.cover-top img { width: 30px; }
.cover-top span { font-size: .72rem; font-weight: 600; letter-spacing: .2em; }
.cover h4 { font-family: var(--font-display); font-weight: 300; font-size: 2rem; line-height: 1.05; }
.cover p { font-size: .78rem; color: var(--mist); }
.cover-alt { background: radial-gradient(circle at 20% 15%, rgba(255,107,139,.4), transparent 50%), radial-gradient(circle at 90% 85%, rgba(255,0,51,.35), transparent 45%), #170910; }

/* ---------- Gallery / lightbox ---------- */
.shots { display: grid; gap: 28px; }
.shot { display: grid; gap: 16px; }
.shot button { display: block; width: 100%; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.shot button img { width: 100%; transition: transform 1s var(--ease); }
.shot button:hover img { transform: scale(1.02); }
.lightbox { position: fixed; inset: 0; z-index: 250; background: rgba(10, 4, 7, .9); backdrop-filter: blur(12px); display: grid; place-items: center; padding: 30px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 88vh; width: auto; border-radius: 16px; }
.lightbox .icon-btn { position: absolute; top: 20px; right: 20px; background: rgba(255,240,245,.1); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(40px, 7vw, 96px); display: grid; gap: 30px; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.3fr auto; align-items: end; } }

.cta-band > * { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.site-footer { padding: 90px 0 36px; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.footer-top { display: grid; gap: 50px; }
@media (min-width: 1000px) { .footer-top { grid-template-columns: 1.2fr 2fr; gap: 80px; } }
.footer-brand { display: grid; gap: 22px; align-content: start; }
.footer-brand p { color: var(--mist); max-width: 40ch; font-size: .95rem; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
@media (min-width: 720px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-col h2 { font-family: var(--font-sans); font-size: .9rem; font-weight: 600; letter-spacing: 0; color: var(--pearl); margin-bottom: 16px; line-height: 1.3; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a, .footer-col button { color: var(--mist); font-size: .93rem; transition: color .2s; text-align: left; }
.footer-col a:hover, .footer-col button:hover { color: var(--pearl); }
.footer-lockup { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); margin: 80px 0 34px; user-select: none; }
.footer-lockup img { width: clamp(56px, 9vw, 120px); height: auto; opacity: .92; }
.footer-lockup span { font-family: var(--font-sans); font-weight: 700; letter-spacing: .16em; font-size: clamp(2.4rem, 8.4vw, 7.4rem); line-height: 1; color: var(--pearl); }
.footer-lockup .sec { color: var(--crimson); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: .86rem; color: var(--mist-2); padding-top: 26px; border-top: 1px solid var(--line); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-bottom a:hover, .footer-bottom button:hover { color: var(--pearl); }
.footer-bottom button { font-size: inherit; color: inherit; }

/* ---------- Search ---------- */
.search-dialog { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(12, 5, 9, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.search-dialog.is-open { opacity: 1; visibility: visible; }
.search-box { width: 100%; max-width: 640px; border-radius: 26px; overflow: hidden; background: rgba(34, 14, 23, .92); border: 1px solid rgba(255,235,241,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 40px 100px -30px rgba(0,0,0,.9); transform: translateY(-10px) scale(.98); transition: transform .35s var(--ease); }
.search-dialog.is-open .search-box { transform: none; }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.search-input-row svg { width: 20px; height: 20px; color: var(--mist); flex-shrink: 0; }
.search-input-row input { flex: 1; height: 64px; background: none; border: 0; font-size: 1.08rem; min-width: 0; }
.search-input-row input:focus { outline: none; }
.search-input-row kbd { font-family: var(--font-sans); font-size: .72rem; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--mist-2); }
.search-results { max-height: 52vh; overflow-y: auto; padding: 8px; list-style: none; }
.search-results a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: rgba(255,240,245,.08); }
.search-results strong { font-weight: 600; }
.search-results span { color: var(--mist); font-size: .88rem; }
.search-empty { padding: 26px 18px; color: var(--mist); font-size: .95rem; }

/* ---------- Cookies ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 180; max-width: 520px; padding: 22px; border-radius: 24px; display: grid; gap: 16px;
  background: rgba(34, 14, 23, .9); border: 1px solid rgba(255,235,241,.16); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 80px -20px rgba(0,0,0,.9);
  transform: translateY(20px); opacity: 0; visibility: hidden; transition: transform .45s var(--ease), opacity .3s, visibility .3s; }
.cookie-banner.is-open { transform: none; opacity: 1; visibility: visible; }
.cookie-banner h2 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.cookie-banner p { font-size: .9rem; color: var(--mist); }
.cookie-banner a { color: var(--pearl); text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { flex: 1 1 auto; }
.modal { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 16px; background: rgba(12,5,9,.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 28px; border-radius: 28px; background: rgba(34,14,23,.96); border: 1px solid rgba(255,235,241,.16); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); display: grid; gap: 18px; }
.modal-box h2 { font-size: 2rem; }
.pref { display: flex; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.pref h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.pref p { font-size: .88rem; color: var(--mist); margin-top: 4px; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 30px; background: rgba(255,240,245,.14); transition: background-color .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + span { background: var(--crimson); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .55; }
.switch input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }

/* ---------- Misc ---------- */
.pill-note { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: var(--r-pill); font-size: .88rem; color: #e2d3d9; width: fit-content; }
.pill-note .dot { display: none; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.grid-2 { display: grid; gap: 28px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 28px; }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.quote { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.2; letter-spacing: -0.015em; max-width: 26ch; }
.contact-list { display: grid; gap: 22px; }
.contact-list div { display: grid; gap: 4px; }
.contact-list dt { color: var(--mist); font-size: .9rem; }
.contact-list dd { font-size: 1.15rem; }
.contact-list a:hover { color: var(--rose); }
.badge { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 600; background: rgba(255,0,51,.12); color: #ffb3c2; border: 1px solid rgba(255,107,139,.25); width: fit-content; }
.badge-gold { background: rgba(214,178,62,.1); color: #ead18a; border-color: rgba(214,178,62,.3); }
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .enter > * { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-group[aria-hidden="true"] { display: none; }
  .marquee-group { flex-wrap: wrap; justify-content: center; row-gap: 16px; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .chat { height: 560px; }
  .orb-chip { display: none; }
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 18px; }
}

/* ---------- Globe (home hero) ---------- */
.globe-wrap { position: relative; width: min(540px, 86vw); aspect-ratio: 1; margin: 0 auto; }
.globe-wrap::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 60, 100, .16) 55%, transparent 72%); pointer-events: none; }
.globe-wrap canvas { position: absolute; inset: 6%; width: 88%; height: 88%; cursor: grab; touch-action: pan-y; }
.globe-wrap canvas:active { cursor: grabbing; }
@media (max-width: 639px) { .globe-wrap { width: min(360px, 80vw); } }

/* ---------- Film band (home) ---------- */
.film { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.film-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--garnet) 0%, rgba(22,10,16,.25) 22%, rgba(22,10,16,.2) 55%, rgba(22,10,16,.92) 100%); }
.film-inner { padding-bottom: clamp(56px, 8vw, 110px); display: grid; gap: 22px; }
.film-inner h2 { max-width: 15ch; }
.film-inner .lead { color: #e6d7dd; }

/* ---------- Click-to-play video player ---------- */
.player { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 9; background: #0b0508; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.player.is-playing video { object-fit: contain; }
.play-big { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); display: inline-flex; white-space: nowrap; align-items: center; gap: 12px; padding: 14px 24px 14px 16px; border-radius: var(--r-pill); color: #fff; font-weight: 600;
  background: rgba(22, 10, 16, .55); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .3s var(--ease), background-color .25s; }
.play-big:hover { background: rgba(200, 0, 42, .75); transform: translate(-50%, -50%) scale(1.04); }
.play-big .disc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--crimson); }
.play-big svg { width: 22px; height: 22px; margin-left: 3px; }
.player.is-playing .play-big, .player.is-playing .compare-badge { opacity: 0; pointer-events: none; }
.player .compare-badge { transition: opacity .3s; }
.compare-stage .play-big { z-index: 3; }
.compare-stage.is-playing .play-big, .compare-stage.is-playing .compare-badge { opacity: 0; pointer-events: none; }
.compare-stage.is-playing video { object-fit: contain; background: #000; }

/* ---------- Academy: catalogue ---------- */
.course-grid { display: grid; gap: 22px; }
@media (min-width: 760px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1120px) { .course-grid { grid-template-columns: repeat(3, 1fr); } }
.course-card { display: grid; gap: 14px; align-content: start; padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(255, 240, 245, .03); transition: border-color .25s, background-color .25s; }
.course-card:hover { border-color: var(--line-strong); background: rgba(255, 240, 245, .05); }
.course-ico, .side-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 0, 51, .1); color: var(--rose); border: 1px solid rgba(255, 107, 139, .18); }
.course-ico svg, .side-ico svg { width: 21px; height: 21px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.course-meta span { font-size: .78rem; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--mist); }
.course-card h3 { font-size: 1.45rem; }
.course-card p { color: var(--mist); font-size: .95rem; }
.course-toc { list-style: decimal; padding-left: 1.2em; display: grid; gap: 4px; font-size: .88rem; color: #cdbcc3; border-top: 1px solid var(--line); padding-top: 14px; }
.course-toc li::marker { color: var(--rose); }

/* ---------- Academy: minimal layout ---------- */
.brand-sub { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; font-size: 1.15rem; color: var(--mist); padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line-strong); }
.bare-header .btn { display: inline-flex; }
.bare-footer { padding: 30px 0 34px; }
.layout-bare main { min-height: calc(100vh - 110px); }
@media (max-width: 639px) { .brand-sub { display: none; } .bare-header .btn span { font-size: .82rem; } }

/* ---------- Academy: sign in ---------- */
.auth { padding: clamp(120px, 14vw, 170px) 0 70px; }
.auth-grid { display: grid; gap: 50px; align-items: start; }
@media (min-width: 980px) { .auth-grid { grid-template-columns: 1fr 480px; gap: 80px; align-items: center; } }
.auth-card { border-radius: 22px; padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.auth-tabs button { height: 42px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--mist); transition: background-color .2s, color .2s; }
.auth-tabs button[aria-selected="true"] { background: rgba(255, 240, 245, .1); color: var(--pearl); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 8px; font-size: .8rem; font-weight: 600; color: var(--mist); }
.pw-toggle:hover { color: var(--pearl); background: rgba(255,240,245,.06); }
.auth-error { font-size: .9rem; padding: 12px 14px; border-radius: 12px; background: rgba(255, 0, 51, .1); border: 1px solid rgba(255, 107, 139, .35); color: #ffc3cf; }
.auth-error[hidden], .auth-card [hidden] { display: none; }
.auth-signed { font-size: .92rem; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); }
.auth-signed a { text-decoration: underline; text-underline-offset: 3px; }
.btn.is-busy { opacity: .7; pointer-events: none; }
.cf-turnstile { min-height: 65px; }

/* ---------- Academy: dashboard ---------- */
.dash-guard { padding: 160px var(--gutter); color: var(--mist); }
.dash { padding-top: clamp(116px, 12vw, 140px); padding-bottom: 60px; }
.dash[hidden] { display: none; }
.dash-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.dash-top > div { display: grid; gap: 10px; min-width: min(100%, 420px); }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 240, 245, .08); overflow: hidden; }
.bar span, .mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--crimson-deep), var(--rose)); border-radius: inherit; transition: width .5s var(--ease); }
.dash-grid { display: grid; gap: 30px; }
@media (min-width: 1040px) { .dash-grid { grid-template-columns: 300px 1fr; gap: 44px; } }
.dash-side h2 { margin-bottom: 14px; }
.course-select { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(10,4,7,.4); color: var(--pearl); }
.course-select option { background: #22111a; }
.side-list { list-style: none; display: none; gap: 6px; }
@media (min-width: 1040px) { .course-select { display: none; } .side-list { display: grid; position: sticky; top: 100px; } }
.side-course { display: grid; grid-template-columns: 40px 1fr; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; text-align: left; border: 1px solid transparent; transition: background-color .2s, border-color .2s; }
.side-course:hover { background: rgba(255, 240, 245, .04); }
.side-course.is-active { background: rgba(255, 240, 245, .06); border-color: var(--line-strong); }
.side-course .side-ico { width: 40px; height: 40px; }
.side-text { display: grid; gap: 6px; }
.side-text strong { font-weight: 600; font-size: .92rem; line-height: 1.3; }
.mini-bar { height: 4px; border-radius: 4px; background: rgba(255,240,245,.08); overflow: hidden; }
.side-pct { font-size: .76rem; color: var(--mist); }
.course-head { display: grid; gap: 8px; margin-bottom: 24px; }
.dash-course { display: grid; gap: 24px; }
@media (min-width: 1240px) { .dash-course { grid-template-columns: 240px 1fr; align-items: start; } }
.ch-nav ol { list-style: none; display: grid; gap: 4px; }
.ch-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: .9rem; color: #d8c8cf; transition: background-color .2s; }
.ch-item:hover { background: rgba(255,240,245,.04); }
.ch-item.is-active { background: rgba(255,240,245,.07); color: var(--pearl); }
.ch-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .78rem; font-weight: 600; border: 1px solid var(--line-strong); }
.ch-item.is-done .ch-num { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.ch-num svg { width: 14px; height: 14px; }
.reader { border-radius: 22px; padding: clamp(24px, 4vw, 48px); display: grid; gap: 18px; }
.reader-kicker { display: flex; align-items: center; gap: 12px; color: var(--mist); font-size: .9rem; }
.reader h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.reader h3:focus { outline: none; }
.reader-body { max-width: 68ch; }
.reader-body p + ul, .reader-body ul + p { margin-top: 1em; }
.reader-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.reader-nav button:disabled { opacity: .4; pointer-events: none; }

/* =========================================================================
   Matte white theme (Academy pages: body.theme-light)
   ========================================================================= */
.theme-light {
  --garnet: #f2f1ee;          /* matte white page */
  --velvet: #ffffff;
  --velvet-2: #faf9f7;
  --pearl: #1c1216;           /* main text */
  --ink: #1c1216;
  --mist: #64555c;
  --mist-2: #8a7b82;
  --rose: #c8002a;            /* accents need more contrast on white */
  --line: rgba(28, 18, 22, .10);
  --line-strong: rgba(28, 18, 22, .18);
  --glass-bg: rgba(255, 255, 255, .78);
  --glass-border: rgba(28, 18, 22, .08);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .9);
  --shadow-lg: 0 24px 50px -30px rgba(40, 20, 30, .28);
  color-scheme: light;
}
.theme-light .ambient { display: none; }
.theme-light .grain { opacity: .035; mix-blend-mode: multiply; }
.theme-light ::selection { color: #fff; }
.theme-light .brand img, .theme-light .footer-lockup img { filter: brightness(0); opacity: .9; }
.theme-light .nav-pill { background: rgba(255, 255, 255, .78); border-color: rgba(28, 18, 22, .08); box-shadow: 0 10px 30px -22px rgba(40, 20, 30, .4); }
.theme-light .site-header.is-scrolled .nav-pill { background: rgba(255, 255, 255, .94); border-color: rgba(28, 18, 22, .1); }
.theme-light .nav-link, .theme-light .icon-btn, .theme-light .lang-btn { color: #4a3a41; }
.theme-light .nav-link:hover, .theme-light .nav-link[aria-expanded="true"], .theme-light .nav-link[aria-current="page"],
.theme-light .icon-btn:hover, .theme-light .lang-btn:hover { background: rgba(28, 18, 22, .05); color: var(--ink); }
.theme-light .search-trigger { background: #fff; color: var(--mist); }
.theme-light .drop-panel, .theme-light .lang-menu { background: #fff; border-color: rgba(28, 18, 22, .08); box-shadow: 0 30px 60px -24px rgba(40, 20, 30, .3); }
.theme-light .drop-link:hover, .theme-light .lang-menu button:hover { background: rgba(28, 18, 22, .04); }
.theme-light .lang-menu button { color: #4a3a41; }
.theme-light .lang-menu button[aria-checked="true"] { background: rgba(28, 18, 22, .05); color: var(--ink); }
.theme-light .drop-link .ico, .theme-light .feature .ico, .theme-light .course-ico, .theme-light .side-ico { background: rgba(224, 0, 45, .07); border-color: rgba(224, 0, 45, .16); color: #d0002a; }
.theme-light .drop-feature { background: rgba(224, 0, 45, .05); border-color: rgba(224, 0, 45, .15); }
.theme-light .mobile-sheet { background: rgba(242, 241, 238, .97); }
.theme-light .btn-glass { background: #fff; border-color: rgba(28, 18, 22, .12); box-shadow: 0 1px 0 rgba(28, 18, 22, .03); color: var(--ink); }
.theme-light .btn-glass:hover { background: #faf9f7; border-color: rgba(28, 18, 22, .2); }
.theme-light .page-head .lead, .theme-light .hero-copy .lead { color: var(--mist); }
.theme-light .glass, .theme-light .panel, .theme-light .cta-band { background: #fff; border-color: rgba(28, 18, 22, .08); backdrop-filter: none; -webkit-backdrop-filter: none; }
.theme-light .panel::before { display: none; }
.theme-light .section-pearl { background: #e9e7e3; color: var(--ink); }
.theme-light .section-pearl .feature { background: #e9e7e3; }
.theme-light .feature { background: var(--garnet); }
.theme-light .course-card { background: #fff; border-color: rgba(28, 18, 22, .08); }
.theme-light .course-card:hover { background: #fff; border-color: rgba(28, 18, 22, .16); box-shadow: 0 24px 40px -30px rgba(40, 20, 30, .35); }
.theme-light .course-toc { color: #4a3a41; }
.theme-light .course-toc li::marker { color: #d0002a; }
.theme-light .field input, .theme-light .field select, .theme-light .field textarea, .theme-light .course-select { background: #fff; border-color: rgba(28, 18, 22, .16); color: var(--ink); }
.theme-light .field input:focus, .theme-light .field select:focus, .theme-light .field textarea:focus { background: #fff; box-shadow: 0 0 0 4px rgba(224, 0, 45, .1); border-color: rgba(224, 0, 45, .5); }
.theme-light .field label { color: #3c2e34; }
.theme-light .field input::placeholder { color: #a3959b; }
.theme-light .field select option, .theme-light .course-select option { background: #fff; color: var(--ink); }
.theme-light .check input { background: #fff; border-color: rgba(28, 18, 22, .25); }
.theme-light .check input:checked { background: #d0002a; border-color: #d0002a; }
.theme-light .check a, .theme-light .prose a { color: var(--ink); }
.theme-light .prose p, .theme-light .prose li { color: #3a2d33; }
.theme-light .prose li::marker { color: #d0002a; }
.theme-light .ticks li::before { border-color: #d0002a; }
.theme-light .auth-tabs { background: rgba(28, 18, 22, .04); border-color: rgba(28, 18, 22, .06); }
.theme-light .auth-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(40, 20, 30, .3); }
.theme-light .auth-error { background: rgba(224, 0, 45, .06); border-color: rgba(224, 0, 45, .25); color: #9b0f2c; }
.theme-light .pw-toggle:hover { background: rgba(28, 18, 22, .05); }
.theme-light .form-status { background: rgba(20, 140, 80, .07); border-color: rgba(20, 140, 80, .25); color: #11603a; }
.theme-light .badge { background: rgba(224, 0, 45, .07); color: #b0002a; border-color: rgba(224, 0, 45, .2); }
.theme-light .bar, .theme-light .mini-bar { background: rgba(28, 18, 22, .08); }
.theme-light .side-course:hover { background: rgba(28, 18, 22, .03); }
.theme-light .side-course.is-active { background: #fff; border-color: rgba(28, 18, 22, .1); box-shadow: 0 10px 24px -20px rgba(40, 20, 30, .5); }
.theme-light .ch-item { color: #4a3a41; }
.theme-light .ch-item:hover { background: rgba(28, 18, 22, .03); }
.theme-light .ch-item.is-active { background: #fff; color: var(--ink); box-shadow: 0 8px 20px -18px rgba(40, 20, 30, .5); }
.theme-light .reader { box-shadow: 0 30px 60px -40px rgba(40, 20, 30, .35); }
.theme-light .logo-chip { background: #fff; }
.theme-light .logo-chip.tool img { filter: brightness(0); opacity: .6; }
.theme-light .logo-chip.tool-color img { opacity: 1; }
.theme-light .logo-chip .wordmark { color: #a8851c; }
.theme-light .logo-chip .wordmark-serif { color: #9c7a45; }
.theme-light .cookie-banner, .theme-light .modal-box, .theme-light .search-box { background: #fff; border-color: rgba(28, 18, 22, .08); box-shadow: 0 30px 70px -30px rgba(40, 20, 30, .45); }
.theme-light .switch span { background: rgba(28, 18, 22, .15); }
.theme-light .search-results a:hover, .theme-light .search-results a[aria-selected="true"] { background: rgba(28, 18, 22, .05); }
.theme-light .step::before { color: #d0002a; }
.theme-light .footer-col a, .theme-light .footer-col button { color: var(--mist); }
.theme-light .footer-col a:hover, .theme-light .footer-col button:hover { color: var(--ink); }
.theme-light :focus-visible { outline-color: #d0002a; }
@media (max-width: 639px) { .theme-light .search-trigger { background: none; } }

/* =========================================================================
   Academy: centred sign-in
   ========================================================================= */
.auth-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .14em; font-size: 1rem; color: var(--pearl); }
.auth-brand img { width: 34px; height: 34px; object-fit: contain; }
.auth-brand .sec { color: var(--crimson); }
.auth-center .auth-card { width: 100%; max-width: 440px; }
.auth-head { display: grid; gap: 6px; text-align: center; }
.auth-note { font-size: .9rem; padding: 12px 14px; border-radius: 12px; background: rgba(214, 160, 30, .1); border: 1px solid rgba(214, 160, 30, .35); }
.theme-light .auth-note { color: #6b4a00; }
.auth-note[hidden] { display: none; }
.auth-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; font-size: .9rem; color: var(--mist); }
.auth-links a:hover { color: var(--pearl); text-decoration: underline; text-underline-offset: 3px; }
.lang-mini { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); }
.lang-mini button { padding: 4px 9px; border-radius: 7px; font-size: .78rem; font-weight: 600; color: var(--mist); }
.lang-mini button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(28,18,22,.12); }
.layout-center main, .layout-app main { min-height: 0; }

/* =========================================================================
   Academy portal (learning-center layout)
   ========================================================================= */
.lc[hidden] { display: none; }
.dash-guard { padding: 140px 24px; text-align: center; color: var(--mist); }
.lc-top { position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 12px clamp(14px, 3vw, 32px); background: #fff; border-bottom: 1px solid var(--line); }
.lc-search { position: relative; max-width: 760px; width: 100%; justify-self: center; }
.lc-search input { width: 100%; height: 46px; padding: 0 52px 0 20px; border-radius: 999px; border: 1px solid rgba(28,18,22,.16); background: #faf9f7; font-size: .97rem; color: var(--ink); }
.lc-search input:focus { outline: none; border-color: rgba(224,0,45,.45); box-shadow: 0 0 0 4px rgba(224,0,45,.08); background: #fff; }
.lc-search button { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #4a3a41; }
.lc-search button:hover { background: rgba(28,18,22,.06); }
.lc-search button svg { width: 18px; height: 18px; }
.lc-actions { display: flex; align-items: center; gap: 6px; }
.pop { position: relative; }
.pop-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 320px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid rgba(28,18,22,.08); box-shadow: 0 24px 50px -24px rgba(40,20,30,.4); display: none; gap: 10px; z-index: 70; }
.pop.is-open .pop-panel { display: grid; }
.icon-btn { position: relative; }
.bell-count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--crimson); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.bell-count[hidden] { display: none; }
.bell-list { list-style: none; display: grid; gap: 12px; }
.bell-list li { display: grid; gap: 3px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .88rem; }
.bell-list span { color: var(--mist); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fbe9ec; color: #b0002a; font-weight: 700; font-size: .9rem; border: 1px solid rgba(224,0,45,.2); }
.pop-user { width: 260px; }
.pop-user a, .pop-user button { text-align: left; padding: 9px 10px; margin: 0 -10px; border-radius: 9px; font-size: .92rem; }
.pop-user a:hover, .pop-user button:hover { background: rgba(28,18,22,.05); }
.pop-user a { border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; padding-top: 12px; }
@media (max-width: 860px) {
  .lc-top { grid-template-columns: 1fr auto; }
  .lc-search { grid-column: 1 / -1; grid-row: 2; }
  .lc-brand .brand-sub { display: none; }
}

.lc-band { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 6px; padding: 10px clamp(14px, 3vw, 32px); background: linear-gradient(90deg, #c8002a, #e0153f); color: #fff; position: relative; z-index: 50; }
.band-label { font-size: 1rem; opacity: .85; padding: 0 8px 0 14px; }
.band-link, .band-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 9px; font-weight: 600; font-size: 1rem; color: #fff; }
.band-link:hover, .band-btn:hover, .band-btn[aria-expanded="true"] { background: rgba(255,255,255,.14); }
.band-btn svg { width: 16px; height: 16px; transition: transform .25s; }
.band-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.band-item { position: relative; }
.band-menu { position: absolute; left: 0; top: calc(100% + 8px); min-width: 280px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 24px 50px -24px rgba(40,20,30,.45); display: none; z-index: 80; }
.band-item.is-open .band-menu { display: grid; }
.band-menu a { padding: 10px 12px; border-radius: 8px; color: var(--ink); font-size: .93rem; font-weight: 500; }
.band-menu a:hover { background: rgba(28,18,22,.05); }
@media (max-width: 760px) { .lc-band { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; } .band-label { display: none; } .band-menu { position: fixed; left: 12px; right: 12px; top: auto; } }

.lc-view { padding-bottom: 60px; }
.lc-wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 36px); }
.lc-home { max-width: 1440px; margin: 0 auto; padding: 34px clamp(16px, 3vw, 36px) 0; display: grid; gap: 36px; }
@media (min-width: 1100px) { .lc-home { grid-template-columns: 1fr 360px; gap: 44px; } }
.lc-hello { display: grid; gap: 8px; margin-bottom: 30px; max-width: 640px; }
.lc-hello h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.lc-sec { margin-bottom: 40px; }
.lc-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.lc-sec-head h2 { font-family: var(--font-sans); font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.pager { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.pg-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 16px -10px rgba(40,20,30,.4); color: var(--ink); }
.pg-btn:disabled { opacity: .35; pointer-events: none; }
.pg-btn svg { width: 18px; height: 18px; }
.lc-row { display: grid; gap: 22px; }
.lc-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.lc-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.lc-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .lc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1300px) { .lc-grid { grid-template-columns: repeat(3, 1fr); } }
.lc-card { display: grid; grid-template-rows: auto 1fr; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(28,18,22,.07); box-shadow: 0 14px 30px -24px rgba(40,20,30,.45); transition: transform .3s var(--ease), box-shadow .3s; }
.lc-card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -26px rgba(40,20,30,.5); }
.lc-card-media { position: relative; }
.new-tag { position: absolute; right: 10px; top: 10px; padding: 4px 10px; border-radius: 6px; background: #1f8a4c; color: #fff; font-size: .8rem; font-weight: 700; }
.lc-card-body { display: grid; gap: 10px; align-content: start; padding: 18px 20px 16px; }
.lc-card-body h3 { font-family: var(--font-sans); font-size: 1.08rem; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; min-height: 2.6em; }
.lc-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--mist); }
.lc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .86rem; }
.fmt { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.fmt svg { width: 17px; height: 17px; }
.state { padding: 4px 10px; border-radius: 6px; font-size: .76rem; font-weight: 700; }
.state-not { background: rgba(28,18,22,.06); color: #5a4a51; }
.state-progress { background: #1c1216; color: #fff; }
.state-done { background: rgba(31,138,76,.12); color: #17703d; }

/* Course covers (generated, no images needed) */
.cover-art { position: relative; aspect-ratio: 2 / 1; overflow: hidden; padding: 18px 20px; display: flex; flex-direction: column; color: #fff; background: #140910; isolation: isolate; }
.cover-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px); }
.cover-art::after { content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -18%; bottom: -60%; border-radius: 50%; background: var(--cv, #e0002d); opacity: .55; filter: blur(40px); }
.hue-crimson { --cv: #e0002d; background: linear-gradient(135deg, #1c0a12, #3a0718); }
.hue-violet { --cv: #8b5cf6; background: linear-gradient(135deg, #120b22, #2a1150); }
.hue-blue { --cv: #2f7cf6; background: linear-gradient(135deg, #0a1120, #0f2a52); }
.hue-teal { --cv: #14b8a6; background: linear-gradient(135deg, #07161a, #0b3a3a); }
.cover-track { font-size: .72rem; font-weight: 600; opacity: .8; }
.cover-title { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.08; margin-top: 6px; max-width: 80%; text-wrap: balance; }
.cover-ico { position: absolute; left: 20px; bottom: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.cover-ico svg { width: 18px; height: 18px; }
.cover-logo { position: absolute; right: 16px; bottom: 16px; width: 26px; opacity: .85; }
.cover-art.is-small { aspect-ratio: auto; width: 128px; height: 72px; padding: 10px; border-radius: 10px; flex-shrink: 0; }
.cover-art.is-small .cover-track, .cover-art.is-small .cover-title, .cover-art.is-small .cover-logo { display: none; }
.cover-art.is-small .cover-ico { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }

.lc-list { display: grid; gap: 12px; }
.lc-resume { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(28,18,22,.07); }
.lc-resume > div { display: grid; gap: 6px; }
.btn-resume { background: #1f8a4c; color: #fff; border-radius: 10px; }
.btn-resume:hover { background: #18733f; }
@media (max-width: 640px) { .lc-resume { grid-template-columns: auto 1fr; } .lc-resume .btn { grid-column: 1 / -1; } }

.lc-aside { display: grid; gap: 28px; align-content: start; }
@media (min-width: 1100px) { .lc-aside { position: sticky; top: 150px; } }
.lc-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 10px; padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
.lc-stats b { display: block; font-family: var(--font-sans); font-size: 1.6rem; font-weight: 600; }
.lc-stats span { font-size: .9rem; color: var(--mist); }
.lc-ann h2 { font-family: var(--font-sans); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.lc-ann article { display: grid; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.lc-ann h3 { font-family: var(--font-sans); font-size: 1.08rem; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
.lc-ann p { color: #4a3a41; font-size: .95rem; }

/* Course page */
.lc-hero { position: relative; overflow: hidden; padding: 44px 0 40px; background: #120810; color: #fff; isolation: isolate; }
.lc-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(135deg, rgba(224,0,45,.0) 0 26px, rgba(224,0,45,.16) 26px 30px); -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000); mask-image: linear-gradient(90deg, transparent 35%, #000); }
.lc-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-top: 14px; color: #fff; }
.lc-hero-kind { margin-top: 12px; font-weight: 600; color: #e9dde2; }
.lc-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: rgba(255,255,255,.7); }
.lc-crumbs a:hover { color: #fff; }
.lc-crumbs.dark { color: var(--mist); padding: 28px 0 22px; }
.lc-crumbs.dark a:hover { color: var(--ink); }
.lc-course { display: grid; gap: 36px; padding-top: 36px; }
@media (min-width: 1050px) { .lc-course { grid-template-columns: 1fr 380px; gap: 56px; } }
.lc-course-main { display: grid; gap: 18px; align-content: start; }
.lc-desc { font-size: 1.05rem; line-height: 1.75; color: #3a2d33; max-width: 70ch; }
.syllabus { margin-top: 20px; display: grid; gap: 8px; }
.syl-sec { border: 1px solid rgba(28,18,22,.1); border-radius: 12px; background: #fff; overflow: hidden; margin-top: 10px; }
.syl-sec summary { display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; list-style: none; font-weight: 600; background: rgba(28,18,22,.03); }
.syl-sec summary::-webkit-details-marker { display: none; }
.syl-sec summary .chev { width: 18px; height: 18px; margin-left: auto; transition: transform .25s; }
.syl-sec[open] summary .chev { transform: rotate(180deg); }
.syl-state { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(28,18,22,.3); display: grid; place-items: center; flex-shrink: 0; }
.syl-state.is-done { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.syl-state svg { width: 14px; height: 14px; }
.syl-sec ol { list-style: none; }
.syl-item { display: flex; gap: 16px; align-items: center; padding: 16px 20px 16px 28px; border-top: 1px solid var(--line); }
.syl-item:hover { background: rgba(28,18,22,.025); }
.syl-item > span:last-child { display: grid; gap: 2px; }
.syl-item strong { font-weight: 600; }
.syl-item > span:last-child > span { font-size: .84rem; color: var(--mist); }
.syl-check { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 2px solid rgba(28,18,22,.18); font-weight: 600; font-size: .9rem; color: #5a4a51; }
.syl-item.is-done .syl-check { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.syl-check svg { width: 18px; height: 18px; }
.lc-course-side { display: grid; gap: 22px; align-content: start; }
.side-box { border: 1px solid rgba(28,18,22,.1); border-radius: 14px; background: #fff; padding: 24px; display: grid; gap: 12px; }
.side-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.keep { display: flex; gap: 14px; align-items: center; }
.keep > span { display: grid; gap: 3px; }
.keep strong { font-weight: 600; line-height: 1.35; }
.keep > span > span { font-size: .84rem; color: var(--mist); }
.done-note { display: flex; gap: 10px; align-items: center; color: #17703d; font-weight: 600; margin-top: 8px; }
.done-note svg { width: 20px; height: 20px; }
.det { display: grid; gap: 14px; }
.det div { display: grid; gap: 2px; }
.det dt { font-weight: 600; }
.det dd { color: var(--mist); }

/* Reader */
.lc-reader .dash-course { padding-bottom: 20px; }
.lc-reader .reader { background: #fff; border-color: rgba(28,18,22,.08); }
.ch-nav a.ch-item { display: flex; }
.btn.is-disabled { opacity: .4; pointer-events: none; }

/* Search results */

.lc-results { list-style: none; display: grid; gap: 10px; margin-top: 22px; max-width: 860px; }
.lc-results a { display: flex; gap: 16px; align-items: center; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.07); }
.lc-results a > span { display: grid; gap: 3px; }
.lc-results a > span > span { font-size: .85rem; color: var(--mist); }
.lc-wrap.lc-results-page { padding-top: 34px; }
.theme-light .auth-brand img { filter: brightness(0); opacity: .9; }
.band-link, .band-btn { white-space: nowrap; flex-shrink: 0; }
.cover-art { aspect-ratio: 16 / 9; }
.cover-title { font-size: 1.28rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 78%; }
.cover-ico { width: 30px; height: 30px; bottom: 14px; }
.cover-logo { bottom: 18px; }

/* Academy is English-only: hide language pickers there */
[data-lang-lock] .lang, [data-lang-lock] .m-langs, [data-lang-lock] .lang-mini { display: none !important; }

/* ==========================================================================
   Academy: long-form chapters, interactive exercises, final tests, certificates
   (Academy pages use the light theme.)
   ========================================================================== */
.reader-body h3 { font-family: var(--font-sans); font-size: 1.18rem; font-weight: 650; letter-spacing: 0; margin: 1.9em 0 .5em; color: var(--ink); }
.reader-body p { margin-top: .9em; line-height: 1.72; }
.reader-body > p:first-child { margin-top: 0; }
.reader-body ol { padding-left: 1.3em; display: grid; gap: .6em; margin-top: .8em; }
.reader-body ol li::marker { color: #d0002a; font-weight: 600; }
.reader-body code { font-size: .88em; background: rgba(28,18,22,.06); padding: 1px 6px; border-radius: 5px; }
.reader-body em { font-style: italic; }
.reader-body .callout { margin: 1.6em 0; padding: 18px 20px; border-radius: 12px; background: rgba(208,0,42,.05); border-left: 3px solid #d0002a; color: #3a2d33; line-height: 1.6; }
.reader-body .callout strong { color: var(--ink); }
.ch-item.ch-test { color: var(--mist); }
.syl-item.syl-test .syl-check { border-style: dashed; }
.syl-item.is-locked { opacity: .65; }
.syl-item.is-locked .syl-check svg, .syl-item.syl-test .syl-check svg { width: 17px; height: 17px; }
.text-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Interactive exercises */
.aw { margin: 2em 0; border: 1px solid rgba(28,18,22,.1); border-radius: 16px; background: #fbfaf8; overflow: hidden; max-width: 100%; }
.aw-head { padding: 20px 22px 0; display: grid; gap: 6px; }
.aw-kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #d0002a; }
.reader-body .aw-head h3 { margin: 0; font-size: 1.12rem; }
.reader-body .aw-head p, .reader-body .aw p { margin-top: 0; color: #4a3c43; font-size: .94rem; line-height: 1.55; }
.aw-body { padding: 16px 22px 22px; display: grid; gap: 14px; }
.aw-body > * { min-width: 0; }
.aw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid rgba(28,18,22,.16); background: #fff; color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-align: left; }
.aw-btn:hover { border-color: rgba(28,18,22,.35); }
.aw-btn.aw-primary { background: #1c1216; border-color: #1c1216; color: #fff; }
.aw-btn.aw-primary:hover { background: #3a2a31; }
.aw-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgba(28,18,22,.14); background: #fff; color: var(--ink); cursor: pointer; }
.aw-icon:disabled { opacity: .3; cursor: default; }
.aw-icon svg { width: 16px; height: 16px; }
.aw-row, .aw-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.aw-score { font-weight: 600; font-size: .92rem; }
.aw-note { font-size: .85rem !important; color: var(--mist) !important; }
.aw-sub { font-weight: 650; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mist) !important; margin-bottom: 8px !important; }
.aw-grid { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.aw-two { display: grid; gap: 18px; }
@media (min-width: 760px) { .aw-two { grid-template-columns: 1fr 1fr; } }
.aw-field { display: grid; gap: 6px; }
.aw-field label { font-size: .86rem; font-weight: 600; color: #3c2e34; }
.aw-field input[type="number"], .aw-field input[type="text"], .aw-field input:not([type]), .aw-field input[type="password"], .aw-field input[type="datetime-local"], .aw-field select, .aw-field textarea, .aw-item select {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(28,18,22,.18); background: #fff; color: var(--ink); font: inherit; font-size: .95rem; }
.aw-field textarea { resize: vertical; }
.aw-field input[type="range"] { width: 100%; accent-color: #d0002a; }
.aw-hint { font-size: .8rem; color: var(--mist); }
.aw-pw { display: flex; gap: 8px; }
.aw-pw input { flex: 1; min-width: 0; }
.aw-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; line-height: 1.4; }
.aw-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: #d0002a; flex-shrink: 0; }
.aw-checks, .aw-toggles { display: grid; gap: 10px; }
.aw-toggles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.aw-out { display: grid; gap: 8px; }
.aw-meter { height: 10px; border-radius: 10px; background: rgba(28,18,22,.08); overflow: hidden; }
.aw-meter span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .35s var(--ease), background-color .35s; background: #c8002a; }
.aw-meter span.mid { background: #d8901c; }
.aw-meter span.good { background: #1f8a4c; }
.aw-verdict { font-size: .95rem; color: var(--ink) !important; }
.aw-tips { padding-left: 1.2em; display: grid; gap: 4px; font-size: .88rem; color: #4a3c43; margin: 0 !important; }
.aw-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.aw-chip.ok { background: rgba(31,138,76,.12); color: #17703d; }
.aw-chip.mid { background: rgba(216,144,28,.15); color: #8a5a0a; }
.aw-chip.bad { background: rgba(208,0,42,.1); color: #a8001f; }
.aw-result { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.08); }
.aw-result ul { padding-left: 1.2em; display: grid; gap: 4px; margin: 0; font-size: .9rem; }
.aw-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.aw-stats > div { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.08); display: grid; gap: 2px; }
.aw-stats span { font-size: .8rem; color: var(--mist); }
.aw-stats b { font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.aw-table { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
.aw-table th, .aw-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid rgba(28,18,22,.07); vertical-align: top; }
.aw-table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mist); background: #f6f4f1; }
.aw-costs { display: table; }
.aw-costs th { font-weight: 500; }
.aw-costs td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aw-costs tfoot th, .aw-costs tfoot td { font-weight: 700; border-bottom: 0; font-size: 1rem; }
.aw-list, .aw-order { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 8px; }
.aw-item { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.08); display: grid; gap: 8px; }
.aw-item-main { display: grid; gap: 10px; align-items: center; }
@media (min-width: 700px) { .aw-item-main { grid-template-columns: 1fr auto; } .aw-item select { width: 240px; } }
.aw-item-t { font-size: .93rem; line-height: 1.45; }
.aw-item.is-ok { border-color: rgba(31,138,76,.45); }
.aw-item.is-bad { border-color: rgba(208,0,42,.4); }
.aw-why { display: flex; gap: 8px; font-size: .86rem !important; color: #4a3c43 !important; }
.aw-why svg, .aw-results svg, .aw-found svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.aw-item.is-ok .aw-why svg, .aw-results .is-ok svg, .aw-found svg { color: #1f8a4c; }
.aw-item.is-bad .aw-why svg, .aw-results .is-bad svg { color: #c8002a; }
.aw-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(28,18,22,.06); }
.aw-seg label { position: relative; cursor: pointer; }
.aw-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.aw-seg span { display: block; padding: 6px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: #4a3c43; }
.aw-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(40,20,30,.15); }
.aw-seg input:focus-visible + span { outline: 2px solid #d0002a; outline-offset: 1px; }
.aw-q { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.aw-q legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.aw-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.08); }
.aw-step.is-ok { border-color: rgba(31,138,76,.5); background: rgba(31,138,76,.04); }
.aw-step.is-bad { border-color: rgba(208,0,42,.4); background: rgba(208,0,42,.03); }
.aw-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: rgba(28,18,22,.07); flex-shrink: 0; }
.aw-step-t { flex: 1; font-size: .92rem; line-height: 1.4; }
.aw-step-btns { display: flex; gap: 6px; }
.aw-results, .aw-found { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 6px; font-size: .9rem; }
.aw-results li, .aw-found li { display: flex; gap: 8px; }
.aw-results .aw-sum { font-weight: 600; padding-top: 4px; }
.aw-mail { border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.1); overflow: hidden; font-size: .92rem; }
.aw-mail-h { padding: 12px 16px; background: #f6f4f1; display: grid; gap: 4px; border-bottom: 1px solid rgba(28,18,22,.08); }
.aw-mail-h > div { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.aw-mail-l { width: 60px; color: var(--mist); font-size: .82rem; flex-shrink: 0; }
.aw-mail-b { padding: 14px 16px; display: grid; gap: 10px; }
.reader-body .aw-mail-b p { margin: 0; color: #2e2328; }
.aw-mail-f { font-size: .82rem !important; }
.aw-spot { font: inherit; color: inherit; background: none; border: 0; padding: 1px 3px; margin: -1px -3px; border-radius: 5px; text-align: left; cursor: pointer; transition: background-color .2s; }
.aw-spot:hover { background: rgba(216,144,28,.14); }
.aw-spot.is-found { background: rgba(208,0,42,.1); outline: 2px solid rgba(208,0,42,.5); }
.aw-fake-btn { display: inline-block; padding: 8px 16px; border-radius: 6px; background: #0b5cad; color: #fff; font-weight: 600; }
.aw-url { display: block; font-size: .78rem; color: var(--mist); margin-top: 4px; word-break: break-all; }
.aw-attacks { display: grid; gap: 8px; }
.aw-chat { max-height: 360px; overflow-y: auto; display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.08); }
.aw-chat-empty { color: var(--mist) !important; font-size: .9rem !important; }
.aw-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: .9rem; line-height: 1.45; }
.aw-msg.user { justify-self: end; background: #1c1216; color: #fff; border-bottom-right-radius: 4px; }
.aw-msg.bot { justify-self: start; background: #f1eeea; color: var(--ink); border-bottom-left-radius: 4px; }
.aw-verdict-line { font-size: .85rem !important; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px dashed rgba(28,18,22,.1); }
.aw-timeline { list-style: none; padding: 0 0 0 18px !important; margin: 0 !important; display: grid; gap: 14px; border-left: 2px solid rgba(208,0,42,.25); }
.aw-timeline li { position: relative; display: grid; gap: 2px; }
.aw-timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #d0002a; box-shadow: 0 0 0 3px #fbfaf8; }
.aw-timeline time { font-weight: 700; font-size: 1.02rem; }
.aw-timeline span { font-size: .85rem; color: var(--mist); }
.aw-grade-row { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.aw-grade { width: 96px; min-height: 96px; border-radius: 16px; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff; background: #a8001f; flex-shrink: 0; }
.aw-grade.g-A { background: #1f8a4c; } .aw-grade.g-B { background: #5d9c2e; } .aw-grade.g-C { background: #d8901c; } .aw-grade.g-D { background: #d0602a; }
.aw-code { flex: 1; min-width: 220px; margin: 0; padding: 12px 14px; border-radius: 12px; background: #1c1216; color: #f3e8ec; font-size: .78rem; line-height: 1.6; overflow-x: auto; white-space: pre; }
.aw-serp { display: grid; gap: 2px; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.08); font-family: Arial, sans-serif; }
.aw-serp-site { font-size: .85rem; color: #202124; }
.aw-serp-url { font-size: .78rem; color: #4d5156; word-break: break-all; }
.aw-serp-t { font-size: 1.15rem; color: #1a0dab; margin-top: 4px; line-height: 1.3; }
.aw-serp-d { font-size: .86rem; color: #4d5156; line-height: 1.5; }

/* Final test */
.lc-test, .lc-certs { padding-top: 26px; padding-bottom: 40px; }
.test-card { max-width: 860px; margin-top: 18px; border-radius: 20px; padding: clamp(22px, 4vw, 44px); display: grid; gap: 18px; background: #fff; border: 1px solid rgba(28,18,22,.08); box-shadow: 0 30px 60px -40px rgba(40,20,30,.35); }
.test-card h1:focus, .lc-certs h1:focus, .test-q .h4:focus { outline: none; }
.test-facts { padding-left: 1.2em; display: grid; gap: 10px; color: #3a2d33; line-height: 1.55; }
.test-facts li::marker { color: #d0002a; }
.test-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(31,138,76,.08); color: #17703d; font-size: .92rem; }
.test-note svg, .test-lock svg { width: 20px; height: 20px; flex-shrink: 0; }
.test-lock { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; background: #f6f4f1; }
.test-top { display: grid; gap: 10px; }
.test-top .reader-kicker { justify-content: space-between; }
.theme-light .bar { background: rgba(28,18,22,.08); }
.test-q { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.test-q legend { display: grid; gap: 6px; margin-bottom: 14px; }
.test-q legend .h4 { font-size: 1.25rem; line-height: 1.35; font-weight: 600; }
.test-multi { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #d0002a; }
.test-opts { display: grid; gap: 10px; }
.test-opt { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(28,18,22,.14); cursor: pointer; line-height: 1.45; transition: border-color .15s, background-color .15s; }
.test-opt:hover { border-color: rgba(28,18,22,.35); }
.test-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.test-mark { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid rgba(28,18,22,.3); border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.test-opt input[type="checkbox"] + .test-mark { border-radius: 6px; }
.test-opt.is-on { border-color: #1c1216; background: rgba(28,18,22,.03); }
.test-opt.is-on .test-mark { background: #1c1216; border-color: #1c1216; }
.test-opt.is-on .test-mark::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.test-opt input:focus-visible + .test-mark { outline: 2px solid #d0002a; outline-offset: 3px; }
.test-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.test-dots button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(28,18,22,.14); background: #fff; font: inherit; font-size: .8rem; font-weight: 600; color: #5a4a51; cursor: pointer; }
.test-dots button.is-ans { background: rgba(28,18,22,.08); color: var(--ink); }
.test-dots button.is-cur { border-color: #1c1216; box-shadow: inset 0 0 0 1px #1c1216; color: var(--ink); }
.test-result { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.test-score { width: 128px; height: 128px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex-shrink: 0; border: 6px solid currentColor; }
.test-score b { font-size: 1.8rem; line-height: 1; }
.test-score span { font-size: .9rem; opacity: .8; }
.test-result.is-pass .test-score { color: #1f8a4c; }
.test-result.is-fail .test-score { color: #c8002a; }
.test-result > div:last-child { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.test-review { list-style: none; display: grid; gap: 6px; }
.test-review li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; padding: 8px 0; border-bottom: 1px solid rgba(28,18,22,.06); }
.tr-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .75rem; font-weight: 700; }
.tr-ic svg { width: 13px; height: 13px; }
.test-review .is-ok .tr-ic { background: rgba(31,138,76,.14); color: #17703d; }
.test-review .is-bad .tr-ic { background: rgba(208,0,42,.1); color: #a8001f; }

/* Certificates */
.cert-preview { margin: 18px 0; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 50px -30px rgba(40,20,30,.45); border: 1px solid rgba(28,18,22,.08); max-width: 980px; background: #fff; }
.cert-preview canvas, .cert-thumb canvas { display: block; width: 100%; height: auto; aspect-ratio: 1123 / 794; }
.cert-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin-top: 22px; }
.cert-card { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(28,18,22,.08); display: grid; }
.cert-thumb { display: block; border-bottom: 1px solid rgba(28,18,22,.06); }
.cert-meta { padding: 16px 18px 18px; display: grid; gap: 8px; }
.cert-todo { list-style: none; display: grid; gap: 8px; margin-top: 12px; max-width: 760px; }
.cert-todo a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid rgba(28,18,22,.07); }

/* Sign-in page: forgot / reset password */
.auth-forgot { margin-top: -4px; text-align: right; font-size: .88rem; }
.auth-forgot a, .auth-back a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-back { text-align: center; font-size: .88rem; color: var(--mist); }
.auth-subhead { display: grid; gap: 6px; }
.auth-done { padding: 12px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.5; background: rgba(31,138,76,.08); border: 1px solid rgba(31,138,76,.25); color: #11603a; }

/* Sign-up email code */
.code-input { font-size: 1.5rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-back .text-btn { font-size: inherit; font-weight: 500; color: var(--ink); }
.auth-back .text-btn:disabled { color: var(--mist); text-decoration: none; cursor: default; }

/* Website forms: bot check and send status */
.form-check { margin: 4px 0 2px; min-height: 65px; }
.form-status.is-error { background: rgba(224, 0, 45, .08); border-color: rgba(224, 0, 45, .3); color: #ffb3c2; }
.theme-light .form-status.is-error { color: #9b0f2c; }

/* Academy portal on phones: popups and learning-path menus stay on screen */
@media (max-width: 760px) {
  .pop-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-height: calc(100vh - 84px); overflow-y: auto; }
  .lc-band { flex-wrap: wrap; overflow-x: visible; justify-content: flex-start; gap: 6px; padding: 10px 12px; }
  .lc-band .band-link, .lc-band .band-btn { font-size: .86rem; padding: 7px 10px; }
  .band-menu { position: fixed; left: 12px; right: 12px; min-width: 0; max-height: 60vh; overflow-y: auto; }
}

/* Academy account settings */
.lc-account { max-width: 760px; }
.acct-card { margin-top: 18px; padding: 22px; border-radius: 16px; background: #fff; border: 1px solid rgba(28,18,22,.08); display: grid; gap: 14px; }
.acct-photo { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.acct-avatar { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: #f6e3e8; color: #b0002a; font-size: 2rem; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.acct-avatar img, .avatar.has-img img, [data-avatar] img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.has-img [data-avatar], [data-avatar].has-img { padding: 0; }
.acct-photo-actions { display: grid; gap: 8px; justify-items: start; flex: 1; min-width: 200px; }
.acct-upload { cursor: pointer; }
.acct-msg { font-size: .9rem; padding: 10px 12px; border-radius: 10px; }
.acct-msg.is-ok { background: rgba(31,138,76,.08); color: #11603a; }
.acct-msg.is-bad { background: rgba(224,0,45,.07); color: #9b0f2c; }
.lc-account .field input:disabled { opacity: .7; }
.avatar [data-avatar].has-img { width: 100%; height: 100%; overflow: hidden; border-radius: 50%; display: block; }
.avatar { overflow: hidden; padding: 0; }

/* Homepage header: transparent over the hero; on scroll a full-width glass bar fades in BEHIND the menu.
   The menu itself never changes size or position, so nothing moves while scrolling. */
[data-page="index"] .site-header .nav-pill {
  background: transparent; border-color: transparent; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; transition: none;
}
[data-page="index"] .site-header::before,
[data-page="index"] .site-header::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
[data-page="index"] .site-header::before {
  top: 0; height: 92px;
  background: rgba(22, 9, 15, .8); border-bottom: 1px solid rgba(255, 235, 241, .1);
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .9);
}
[data-page="index"] .site-header::after {
  top: 92px; height: 28px;
  background: linear-gradient(180deg, rgba(14, 6, 10, .45), rgba(14, 6, 10, 0));
}
[data-page="index"] .site-header.is-scrolled::before,
[data-page="index"] .site-header.is-scrolled::after { opacity: 1; }
[data-page="index"] .site-header .nav-pill { position: relative; z-index: 1; }
[data-page="index"] .site-header:not(.is-scrolled) .nav-pill a, [data-page="index"] .site-header:not(.is-scrolled) .nav-pill button { text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
@media (prefers-reduced-motion: reduce) { [data-page="index"] .site-header::before, [data-page="index"] .site-header::after { transition: none; } }

/* Menu labels stay on one line (e.g. "Success stories" at laptop widths) */
.nav-link { white-space: nowrap; }

/* ==========================================================================
   Academy interactive video player (academy-video.js)
   ========================================================================== */
.rsv { margin: 2em 0; display: grid; gap: 10px; }
.rsv-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 120% at 20% 0%, #3a1220 0%, #160a10 55%, #0d0609 100%); color: #f7eff2; outline: none; box-shadow: 0 24px 50px -30px rgba(40,20,30,.6); }
.rsv-frame:focus-visible { box-shadow: 0 0 0 3px #d0002a; }
.rsv-stage, .rsv-hots { position: absolute; inset: 0; }
.rsv-stage { font-size: clamp(9px, 1.6vw, 14px); padding: 5% 6% 14%; display: grid; place-items: center; }
.rsv-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rsv-caption { position: absolute; left: 4%; right: 4%; bottom: 4%; margin: 0 !important; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff !important; font-size: clamp(11px, 1.7vw, 15px) !important; line-height: 1.4 !important; text-align: center; pointer-events: none; }
.rsv-caption:empty { display: none; }
.rsv-big { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: #d0002a; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(208,0,42,.8); }
.rsv-big svg { width: 28px; height: 28px; }
.rsv-controls { display: flex; align-items: center; gap: 10px; }
.rsv-play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #1c1216; color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.rsv-play svg { width: 16px; height: 16px; }
.rsv-bar { position: relative; flex: 1; height: 8px; border-radius: 8px; background: rgba(28,18,22,.1); }
.rsv-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #c8002a, #e0153f); }
.rsv-marks i { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: #1c1216; opacity: .55; }
.rsv-time { font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--mist); min-width: 78px; text-align: right; }
.rsv-side { display: grid; gap: 8px; }
@media (min-width: 900px) { .rsv-side { grid-template-columns: 1fr 1fr; align-items: start; } }
.rsv-panel { border: 1px solid rgba(28,18,22,.1); border-radius: 12px; background: #fff; padding: 10px 14px; }
.rsv-panel summary { cursor: pointer; font-weight: 650; font-size: .9rem; }
.rsv-chapters, .rsv-transcript { list-style: none; padding: 0 !important; margin: 8px 0 0 !important; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.rsv-chapters button, .rsv-transcript button { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 8px; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; }
.rsv-chapters button:hover, .rsv-transcript button:hover { background: rgba(28,18,22,.05); }
.rsv-chapters button.is-current { background: rgba(208,0,42,.08); color: #9b0f2c; font-weight: 600; }
.rsv-transcript time { color: var(--mist); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rsv-search { width: 100%; margin-top: 8px; min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(28,18,22,.16); font: inherit; font-size: .88rem; }
.rsv-muted { color: var(--mist); font-size: .85rem; padding: 6px 8px; }
.rsv-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 4%; background: rgba(10,4,7,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 5; overflow-y: auto; }
.rsv-card { width: min(560px, 100%); background: #fff; color: var(--ink); border-radius: 14px; padding: clamp(14px, 3vw, 24px); display: grid; gap: 10px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.reader-body .rsv-card h4 { margin: 0; font-size: clamp(.95rem, 2vw, 1.15rem); line-height: 1.35; }
.reader-body .rsv-card p { margin: 0 !important; font-size: .9rem; line-height: 1.5; color: #3a2d33; }
.rsv-kicker { font-size: .7rem !important; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #d0002a !important; }
.rsv-end.is-good .rsv-kicker { color: #17703d !important; }
.rsv-choices { display: grid; gap: 8px; }
.rsv-choice { display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 14px; border-radius: 10px; border: 1.5px solid rgba(28,18,22,.14); background: #fff; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; }
.rsv-choice:hover:not(:disabled) { border-color: #1c1216; }
.rsv-choice svg { width: 16px; height: 16px; }
.rsv-choice.is-right { border-color: #1f8a4c; background: rgba(31,138,76,.08); }
.rsv-choice.is-wrong { border-color: #c8002a; background: rgba(208,0,42,.06); }
.rsv-ghost { border-style: dashed; }
.rsv-feedback { font-size: .88rem; }
.rsv-continue { margin-left: 6px; border: 0; background: #1c1216; color: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.rsv-hot { position: absolute; border: 2px dashed rgba(255,214,102,.9); border-radius: 8px; background: rgba(255,214,102,.08); cursor: pointer; z-index: 3; padding: 0; }
.rsv-hot:hover, .rsv-hot:focus-visible { background: rgba(255,214,102,.2); outline: none; }
.rsv-hot.is-found { border-style: solid; border-color: #1f8a4c; background: rgba(31,138,76,.15); }
.rsv-hot-pulse { position: absolute; right: -6px; top: -6px; width: 14px; height: 14px; border-radius: 50%; background: #ffd666; animation: rsvPulse 1.4s infinite; }
.rsv-hot.is-found .rsv-hot-pulse { background: #1f8a4c; animation: none; }
.rsv-hot-label { position: absolute; left: 0; top: -22px; font-size: 11px; white-space: nowrap; background: #ffd666; color: #1c1216; padding: 1px 6px; border-radius: 4px; opacity: 0; transition: opacity .2s; }
.rsv-hot:hover .rsv-hot-label, .rsv-hot:focus-visible .rsv-hot-label { opacity: 1; }
@keyframes rsvPulse { 0% { box-shadow: 0 0 0 0 rgba(255,214,102,.7); } 100% { box-shadow: 0 0 0 10px rgba(255,214,102,0); } }
@media (prefers-reduced-motion: reduce) { .rsv-hot-pulse { animation: none; } }
/* Scenes */
.sv-window { width: 100%; max-width: 640px; background: #fbf9f7; color: #1c1216; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px -20px rgba(0,0,0,.7); align-self: start; }
.sv-titlebar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #e9e4e0; font-size: .85em; color: #5a4a51; }
.sv-titlebar i { width: 9px; height: 9px; border-radius: 50%; background: #c8bfbb; display: inline-block; }
.sv-titlebar span { margin-left: 8px; }
.sv-list { display: grid; }
.sv-row { display: flex; gap: 12px; align-items: baseline; padding: .7em 1em; border-bottom: 1px solid #ebe5e1; font-size: .95em; }
.sv-row b { width: 34%; flex-shrink: 0; } .sv-row em { margin-left: auto; color: #d0002a; font-style: normal; font-weight: 700; }
.sv-new { background: #fff; transition: background .3s; } .sv-new.is-hl { background: #fff2d6; }
.sv-ping { position: absolute; right: 7%; top: 8%; background: #d0002a; color: #fff; padding: .4em .9em; border-radius: 999px; font-weight: 700; font-size: .95em; }
.sv-mail { padding: 1em 1.2em; display: grid; gap: .6em; }
.sv-meta p, .sv-body p { margin: 0 0 .3em !important; font-size: 1em !important; color: #1c1216 !important; line-height: 1.4 !important; }
.sv-btn { justify-self: start; background: #0b5cad; color: #fff; padding: .55em 1.2em; border-radius: 6px; font-weight: 700; transition: box-shadow .2s; }
.sv-btn.is-hover { box-shadow: 0 0 0 3px rgba(11,92,173,.3); }
.sv-url { font-size: .82em; color: #6f6168; margin-top: -.3em; }
.sv-att { font-size: .92em; }
.sv-addr { margin: .6em .8em 0; padding: .4em .8em; border-radius: 999px; background: #efeae6; font-size: .9em; transition: box-shadow .2s, background .2s; }
.sv-addr.is-hl { background: #ffe4e4; box-shadow: 0 0 0 2px #d0002a; }
.sv-login { margin: 1.2em auto 1.5em; width: 60%; display: grid; gap: .6em; padding: 1.2em; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px -12px rgba(0,0,0,.4); }
.sv-login p { margin: 0 !important; font-size: 1.2em !important; color: #1c1216 !important; }
.sv-input { border: 1px solid #c9c1bd; border-radius: 4px; padding: .5em .7em; min-height: 2.2em; font-size: .92em; letter-spacing: .1em; }
.sv-alert { position: absolute; right: 6%; bottom: 18%; padding: .6em 1em; border-radius: 10px; font-weight: 700; font-size: 1.05em; }
.sv-alert.is-bad { background: #c8002a; color: #fff; } .sv-alert.is-good { background: #1f8a4c; color: #fff; }
.sv-steps { width: 100%; max-width: 560px; display: grid; gap: .7em; }
.sv-step { padding: .8em 1.1em; border-radius: 10px; font-size: 1.1em; font-weight: 600; background: rgba(255,255,255,.08); border-left: 4px solid; }
.sv-step.is-bad { border-color: #ff4d6d; } .sv-step.is-good { border-color: #4ade80; } .sv-step.is-mid { border-color: #ffd666; }
.sv-files { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; padding: 1.2em; }
.sv-file { display: grid; gap: .3em; justify-items: center; text-align: center; font-size: .82em; word-break: break-all; }
.sv-file i { width: 2.6em; height: 3.2em; border-radius: 4px; background: #dfe7f2; border: 1px solid #b9c6d8; transition: background .3s, border-color .3s; }
.sv-file.is-locked i { background: #ffd9df; border-color: #d0002a; } .sv-file.is-locked span { color: #c8002a; font-weight: 700; }
.sv-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60%; padding: 1.2em; border-radius: 10px; background: #0d0609; border: 2px solid #ff4d6d; text-align: center; }
.sv-note b { color: #ff4d6d; font-size: 1.2em; } .sv-note p { margin: .4em 0 0 !important; color: #f7eff2 !important; font-size: 1em !important; }
.sv-net { position: relative; width: 100%; max-width: 560px; aspect-ratio: 2.2 / 1; }
.sv-node { position: absolute; padding: .5em .8em; border-radius: 8px; font-size: .95em; font-weight: 600; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); transition: all .3s; }
.sv-hub { left: 50%; top: 40%; transform: translate(-50%, -50%); background: #f7eff2; color: #1c1216; }
.sv-pc:nth-child(2) { left: 2%; top: 4%; } .sv-pc:nth-child(3) { right: 2%; top: 4%; } .sv-pc:nth-child(4) { left: 4%; bottom: 4%; } .sv-pc:nth-child(5) { left: 42%; bottom: 0; } .sv-pc:nth-child(6) { right: 4%; bottom: 4%; }
.sv-node.is-infected { background: #c8002a; border-color: #ff4d6d; }
.sv-node.is-infected.is-cut { opacity: .45; outline: 2px dashed #ffd666; outline-offset: 4px; }
.sv-node.is-safe { background: #1f8a4c; border-color: #4ade80; }
.sv-log { width: 100%; max-width: 560px; background: #fbf9f7; color: #1c1216; border-radius: 10px; padding: 1em 1.2em; font-family: "Courier New", monospace; }
.sv-log-h { font-family: var(--font-sans); font-weight: 700; margin-bottom: .5em; }
.sv-log-row { padding: .3em 0; border-bottom: 1px dashed #ddd3ce; font-size: .95em; }
.sv-restore { width: 100%; max-width: 460px; display: grid; gap: .8em; text-align: center; }
.sv-restore-h { font-weight: 700; font-size: 1.15em; }
.sv-progress { height: 14px; border-radius: 14px; background: rgba(255,255,255,.12); overflow: hidden; }
.sv-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1f8a4c, #4ade80); }
.sv-restore-l { font-variant-numeric: tabular-nums; font-size: 1.4em; font-weight: 700; }
@media (max-width: 560px) { .sv-files { grid-template-columns: repeat(4, 1fr); gap: .5em; padding: .8em; } .sv-login { width: 80%; } .rsv-time { min-width: 0; } }
.rsv [hidden] { display: none !important; }
.sv-line { font-size: 1em; line-height: 1.45; padding: .1em 0; }
.sv-linkbox { display: grid; gap: .3em; justify-items: start; }
/* Interactive video on phones: a taller frame, with room for the subtitle under the scene */
@media (max-width: 600px) {
  .aw:has(.rsv) .aw-body { padding: 12px 10px 14px; }
  .rsv-frame { aspect-ratio: 4 / 5; }
  .rsv-stage { font-size: 10.5px; padding: 6% 4% 34%; align-items: start; }
  .rsv-caption { font-size: 12.5px !important; bottom: 3%; }
  .sv-files { grid-template-columns: repeat(2, 1fr); }
  .sv-note { width: 84%; top: 40%; }
  .sv-net { aspect-ratio: 1.2 / 1; }
}
@media (max-width: 600px) { .rsv-frame { aspect-ratio: 3 / 4; } .rsv-stage { padding-bottom: 40%; } }
