@import url('/css/fonts.css');

/* =========================================================
   Tokens — "security printing": banknote ink, paper, foil
   ========================================================= */
:root {
  --ink: #0F2340;
  --ink-2: #16305A;
  --ink-3: #21427A;
  --paper: #F4F7F2;
  --paper-2: #E8EFE6;
  --card: #FFFFFF;
  --sky: #1AAFD0;
  --sky-d: #0B87A6;
  --foil: #E2B33C;
  --foil-l: #F6D77A;
  --foil-d: #B8891B;
  --alarm: #EF4058;
  --alarm-bg: #FDE7EA;
  --safe: #23B27D;
  --safe-bg: #DDF5EA;
  --warn-bg: #FFF3D6;
  --info-bg: #DFF3F8;
  --text: #13233B;
  --muted: #586A82;
  --line: #D6E0D5;
  --line-dark: rgba(255, 255, 255, .12);

  --f-display: 'Geologica', 'Onest', system-ui, sans-serif;
  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-1: 0 1px 2px rgba(15, 35, 64, .06), 0 6px 18px rgba(15, 35, 64, .06);
  --shadow-2: 0 2px 6px rgba(15, 35, 64, .08), 0 22px 48px -12px rgba(15, 35, 64, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 72px;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font: 400 17px/1.6 var(--f-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sky-d); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.6vw + .6rem, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 2.4vw + .7rem, 2.75rem); font-weight: 800; }
h3 { font-size: 1.28rem; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--foil); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }

/* =========================================================
   Buttons & form controls
   ========================================================= */
.btn {
  --tx: 0px; --ty: 0px;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 600 1rem/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transform: translate(var(--tx), var(--ty));
  transition: transform .35s var(--ease), background-color .2s, box-shadow .25s, color .2s;
}
.btn:active { transform: translate(var(--tx), var(--ty)) scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.btn-lg { min-height: 58px; padding: 0 32px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 22px -8px rgba(15, 35, 64, .55); }
.btn-primary:hover { background: var(--ink-3); }
.btn-foil {
  color: var(--ink);
  background: linear-gradient(120deg, var(--foil-l), var(--foil) 45%, var(--foil-d) 75%, var(--foil-l));
  background-size: 220% 100%;
  box-shadow: 0 10px 28px -10px rgba(226, 179, 60, .8), inset 0 1px 0 rgba(255, 255, 255, .6);
  animation: foil-shift 6s linear infinite;
}
.btn-foil::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  transform: translateX(-120%);
}
.btn-foil:hover::after { animation: shine .9s var(--ease); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }
.btn-danger { background: var(--alarm); color: #fff; }
.btn-safe { background: var(--safe); color: #fff; }
.ripple { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .65s var(--ease) forwards; pointer-events: none; z-index: -1; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes foil-shift { to { background-position: -220% 0; } }

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .label { font-weight: 600; font-size: .95rem; color: var(--ink); }
.hint { font-size: .85rem; color: var(--muted); }
.input, .select, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: 400 1rem/1.4 var(--f-body); color: var(--text);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:hover, .select:hover { border-color: #b9c7bb; }
.input:focus, .select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(26, 175, 208, .18); }
.input[aria-invalid="true"] { border-color: var(--alarm); box-shadow: 0 0 0 4px rgba(239, 64, 88, .14); }
.select { appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 104px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--paper-2); color: var(--ink); border-radius: 8px; padding: 7px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.pw-meter i { height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.pw-meter[data-level="0"] i:nth-child(-n+1) { background: var(--alarm); }
.pw-meter[data-level="1"] i:nth-child(-n+2) { background: var(--foil); }
.pw-meter[data-level="2"] i:nth-child(-n+3) { background: var(--sky); }
.pw-meter[data-level="3"] i { background: var(--safe); }
.form-msg { min-height: 1.4em; font-size: .95rem; font-weight: 500; margin: 4px 0 12px; }
.form-msg.err { color: var(--alarm); }
.form-msg.ok { color: var(--safe); }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--paper-2); color: var(--ink); white-space: nowrap; }
.chip-safe { background: var(--safe-bg); color: #106646; }
.chip-alarm { background: var(--alarm-bg); color: #A11A2F; }
.chip-foil { background: var(--warn-bg); color: #7A5A0B; }
.chip-sky { background: var(--info-bg); color: #075E74; }

/* =========================================================
   Header
   ========================================================= */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); color: #fff; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.topbar.scrolled, .topbar.solid { background: rgba(15, 35, 64, .82); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px -10px rgba(0, 0, 0, .4); }
.topbar-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.logo-mark { width: 36px; height: 40px; color: #fff; flex: none; }
.logo-shield { stroke-dasharray: 130; stroke-dashoffset: 130; animation: draw 1.4s var(--ease) .1s forwards; }
.logo-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s var(--ease) 1.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font: 800 1.15rem/1.1 var(--f-display); letter-spacing: .02em; }
.brand-text small { font-size: .74rem; opacity: .72; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a, .nav-logout { color: rgba(255, 255, 255, .86); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; background: none; border: 0; cursor: pointer; transition: background .2s, color .2s; }
.nav a:hover, .nav-logout:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.auth-links { display: flex; gap: 8px; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.lang button { border: 0; background: none; color: rgba(255, 255, 255, .75); padding: 6px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; cursor: pointer; letter-spacing: .03em; transition: background .25s, color .25s; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.burger i { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-open .burger i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .burger i:nth-child(2) { opacity: 0; }
.menu-open .burger i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.topbar.solid { background: var(--ink); }

@media (max-width: 860px) {
  .burger { display: flex; }
  .auth-links .btn-ghost-light { display: none; }
  .nav { position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; padding: 16px 20px 24px; background: rgba(15, 35, 64, .97); backdrop-filter: blur(14px); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
  .menu-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav a, .nav-logout { padding: 14px 12px; font-size: 1.1rem; text-align: left; }
  .menu-open { background: rgba(15, 35, 64, .97); }
  .brand-text small { display: none; }
}
@media (max-width: 420px) { .auth-links { display: none; } }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 80% 10%, #21427A 0%, var(--ink) 55%, #0A1830 100%); padding: calc(var(--header-h) + 56px) 0 96px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg svg { position: absolute; color: var(--foil); }
.hero-bg .g1 { width: 1100px; right: -320px; top: -260px; opacity: .32; animation: spin 140s linear infinite; }
.hero-bg .g2 { width: 760px; left: -300px; bottom: -380px; opacity: .14; color: var(--sky); animation: spin 110s linear infinite reverse; }
.hero-bg path { stroke-dasharray: 9000; stroke-dashoffset: 9000; animation: draw 5s var(--ease) forwards; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 30%), rgba(26, 175, 208, .16), transparent 60%); transition: background .2s; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-org { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: rgba(255, 255, 255, .75); margin-bottom: 22px; }
.hero-org::before { content: ''; width: 28px; height: 2px; background: var(--foil); }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero h1 .line { display: block; }
.scramble-wrap { display: inline-block; position: relative; color: var(--foil-l); min-width: 4ch; }
.scramble-wrap::after { content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .12em; background: linear-gradient(90deg, var(--foil), transparent); border-radius: 4px; transform-origin: left; animation: underline 2.6s var(--ease) infinite; }
@keyframes underline { 0% { transform: scaleX(0); } 30%, 80% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }
.hero .lead { color: rgba(255, 255, 255, .78); font-size: 1.18rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 44px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 36px; }
.hero-stats div { display: grid; }
.hero-stats b { font: 800 2.2rem/1 var(--f-display); color: #fff; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: .9rem; color: rgba(255, 255, 255, .65); }

/* entrance sequence */
.hero [data-enter] { opacity: 0; transform: translateY(26px); animation: enter .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
@keyframes enter { to { opacity: 1; transform: none; } }

/* Phone demo */
.phone-stage { position: relative; display: grid; place-items: center; perspective: 1200px; }
.phone {
  --rx: 0deg; --ry: -8deg;
  position: relative; width: min(340px, 100%); aspect-ratio: 9 / 18.5;
  border-radius: 46px; padding: 12px;
  background: linear-gradient(160deg, #2a3f63, #0b1629);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .08), 0 40px 80px -20px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .12);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -12px; } }
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: #EEF2F6; color: var(--text); display: flex; flex-direction: column; }
.phone-bar { display: flex; align-items: center; gap: 10px; padding: 34px 16px 12px; background: #fff; border-bottom: 1px solid #e3e8ee; }
.phone-bar .ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: 1.1rem; }
.phone-bar b { font-size: .95rem; display: block; line-height: 1.2; }
.phone-bar small { font-size: .75rem; color: var(--muted); }
.phone-notch { position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 96px; height: 24px; border-radius: 20px; background: #0b1629; z-index: 3; }
.phone-msgs { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: .9rem; line-height: 1.42; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); animation: pop .45s var(--spring) both; transform-origin: bottom left; }
.msg mark { background: transparent; color: inherit; border-radius: 4px; padding: 0 2px; transition: background .4s, color .4s, box-shadow .4s; }
.msg mark.hit { background: rgba(239, 64, 88, .16); color: #B4142C; box-shadow: inset 0 -2px 0 var(--alarm); }
.msg.typing { display: inline-flex; gap: 4px; padding: 13px 14px; width: max-content; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa8b8; animation: dot 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(10px); } }
.scanline { position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(180deg, transparent, rgba(26, 175, 208, .28) 70%, rgba(26, 175, 208, .9)); pointer-events: none; z-index: 2; }
.scanline.run { animation: scan 1.4s var(--ease) forwards; }
@keyframes scan { to { top: 100%; } }
.scan-label { position: absolute; top: 74px; left: 50%; translate: -50% 0; z-index: 3; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 600; opacity: 0; transition: opacity .3s; }
.scan-label.on { opacity: 1; }
.stamp { position: absolute; left: 50%; top: 52%; z-index: 4; translate: -50% -50%; padding: 10px 22px; border: 4px solid var(--alarm); border-radius: 12px; color: var(--alarm); font: 800 1.9rem/1 var(--f-display); letter-spacing: .08em; background: rgba(255, 255, 255, .88); rotate: -14deg; opacity: 0; transform: scale(2.4); pointer-events: none; }
.stamp.on { animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.4); } 100% { opacity: 1; transform: scale(1); } }
.phone.hit { animation: float 7s ease-in-out infinite, jolt .35s; }
@keyframes jolt { 30% { translate: -6px 2px; } 60% { translate: 5px -2px; } }
.phone-glow { position: absolute; inset: 10% 5%; z-index: -1; background: radial-gradient(closest-side, rgba(226, 179, 60, .35), transparent); filter: blur(30px); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone { width: min(300px, 80vw); --ry: 0deg; }
  .hero { padding-bottom: 72px; }
}

/* =========================================================
   Ticker (crossed-out scam phrases)
   ========================================================= */
.ticker { background: var(--ink); color: #fff; padding: 18px 0; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .06); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-row { display: flex; gap: 48px; width: max-content; animation: marquee 48s linear infinite; }
.ticker-row.rev { animation-direction: reverse; animation-duration: 56s; margin-top: 12px; opacity: .6; }
.ticker:hover .ticker-row { animation-play-state: paused; }
.ticker-item { position: relative; font: 600 1.08rem/1.3 var(--f-display); white-space: nowrap; color: rgba(255, 255, 255, .85); }
.ticker-item::after { content: ''; position: absolute; left: -4px; right: -4px; top: 52%; height: 3px; background: var(--alarm); border-radius: 3px; transform: scaleX(0); transform-origin: left; animation: strike 4s var(--ease) infinite; animation-delay: calc(var(--i, 0) * .45s); }
@keyframes strike { 0%, 12% { transform: scaleX(0); } 30%, 85% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 104px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-dark { background: var(--ink); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-head p { color: rgba(255, 255, 255, .7); }

[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"] { transform: scale(.9); }
[data-reveal].in { opacity: 1; transform: none; }

/* Game */
.game { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.game-board { position: relative; min-height: 380px; display: grid; place-items: center; }
.game-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.game-progress i { width: 28px; height: 6px; border-radius: 6px; background: var(--line); transition: background .3s; }
.game-progress i.ok { background: var(--safe); }
.game-progress i.bad { background: var(--alarm); }
.game-progress i.cur { background: var(--ink); }
.game-stack { position: relative; width: min(440px, 100%); height: 230px; }
.game-card { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-2); transition: transform .6s var(--ease), opacity .5s; }
.game-card .from { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.game-card .from span { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; }
.game-card .text { font-size: 1.05rem; line-height: 1.5; }
.game-card.behind { transform: translateY(14px) scale(.95); opacity: .6; z-index: -1; }
.game-card.out-left { transform: translateX(-130%) rotate(-18deg); opacity: 0; }
.game-card.out-right { transform: translateX(130%) rotate(18deg); opacity: 0; }
.game-card .verdict { margin-top: auto; padding: 10px 14px; border-radius: 12px; font-size: .95rem; font-weight: 500; animation: pop .4s var(--spring); }
.verdict.ok { background: var(--safe-bg); color: #0F5C40; }
.verdict.bad { background: var(--alarm-bg); color: #9A1529; }
.game-actions { display: flex; gap: 14px; justify-content: center; margin-top: 26px; }
.game-actions .btn { min-width: 150px; }
.btn-scam { background: var(--alarm); color: #fff; }
.btn-ok { background: var(--safe); color: #fff; }
.game-result { text-align: center; animation: pop .5s var(--spring); }
.game-result b { display: block; font: 800 3.4rem/1 var(--f-display); color: var(--ink); margin-bottom: 8px; }
@media (max-width: 860px) { .game { grid-template-columns: 1fr; } }

/* Course cards */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.course-card {
  --c: var(--sky); --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; min-height: 300px; border-radius: var(--r-lg);
  background: #fff; color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-1); overflow: hidden; isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), box-shadow .3s;
}
.course-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 22%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; }
.course-card:hover { box-shadow: var(--shadow-2); }
.course-card:hover::before { opacity: 1; }
.course-card .rosette { position: absolute; right: -70px; top: -70px; width: 220px; color: var(--c); opacity: .22; z-index: -1; transition: transform 1.2s var(--ease), opacity .4s; }
.course-card:hover .rosette { transform: rotate(60deg) scale(1.08); opacity: .4; }
.course-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); transition: transform .5s var(--spring); }
.course-card:hover .course-icon { transform: translateY(-4px) rotate(-6deg) scale(1.06); }
.course-card h3 { margin: 4px 0 0; font-size: 1.22rem; }
.course-card p { color: var(--muted); font-size: .96rem; margin: 0; }
.course-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.course-card .bar { height: 8px; border-radius: 8px; background: var(--paper-2); overflow: hidden; }
.course-card .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--c); border-radius: inherit; transition: width 1.2s var(--ease); }
.course-card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-card .go { font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.course-card .go svg { width: 18px; transition: transform .3s var(--ease); }
.course-card:hover .go svg { transform: translateX(4px); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps-line { position: absolute; left: 32px; right: 32px; top: 31px; height: 3px; background: rgba(255, 255, 255, .12); border-radius: 3px; overflow: hidden; }
.steps-line i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--sky), var(--foil)); transform: scaleX(0); transform-origin: left; transition: transform 2.2s var(--ease) .3s; }
.steps.in .steps-line i { transform: scaleX(1); }
.step { position: relative; }
.step-num { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 1.4rem var(--f-display); color: var(--ink); background: var(--foil); box-shadow: 0 0 0 8px var(--ink), 0 0 0 9px rgba(226, 179, 60, .4); margin-bottom: 22px; }
.step h3 { font-size: 1.2rem; }
.step p { color: rgba(255, 255, 255, .72); font-size: .98rem; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .steps-line { left: 31px; right: auto; width: 3px; top: 32px; bottom: 32px; height: auto; }
  .steps-line i { transform: scaleY(0); transform-origin: top; height: 100%; }
  .steps.in .steps-line i { transform: scaleY(1); }
  .step { display: grid; grid-template-columns: 64px 1fr; gap: 20px; }
  .step-num { margin: 0; }
}

/* Certificate showcase */
.showcase { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.showcase ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.showcase li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.showcase li::before { content: ''; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--safe-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-9' fill='none' stroke='%2323B27D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.mini-cert-stage { perspective: 1400px; }
.mini-cert {
  --rx: 6deg; --ry: -12deg; --mx: 50%; --my: 50%;
  position: relative; aspect-ratio: 297 / 210; border-radius: 10px; padding: 5%;
  background: #FFFDF6; color: var(--ink); overflow: hidden;
  box-shadow: 0 50px 80px -30px rgba(15, 35, 64, .45), 0 0 0 1px rgba(15, 35, 64, .06);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .6s var(--ease);
  display: grid; place-items: center; text-align: center;
}
.mini-cert::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .7) 45%, rgba(26, 175, 208, .15) 50%, rgba(226, 179, 60, .2) 55%, transparent 70%); background-size: 250% 250%; background-position: var(--mx) var(--my); mix-blend-mode: soft-light; pointer-events: none; }
.mini-cert .frame { position: absolute; inset: 3.5%; border: 1.5px solid var(--foil); border-radius: 6px; }
.mini-cert .frame::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(184, 137, 27, .45); border-radius: 4px; }
.mini-cert .mc-bg { position: absolute; width: 70%; color: var(--sky); opacity: .12; }
.mini-cert .mc-title { font: 700 clamp(1.4rem, 3vw, 2.3rem)/1 var(--f-serif); letter-spacing: .18em; color: var(--ink); }
.mini-cert .mc-name { font: italic 500 clamp(1.3rem, 2.8vw, 2.1rem)/1.1 var(--f-serif); color: var(--foil-d); margin: .5em 0 .3em; border-bottom: 1px solid rgba(184, 137, 27, .4); padding: 0 1em .2em; }
.mini-cert .mc-text { font-size: clamp(.55rem, 1vw, .75rem); color: var(--muted); max-width: 70%; margin: 0 auto; }
.mini-cert .mc-seal { position: absolute; right: 9%; bottom: 10%; width: 18%; aspect-ratio: 1; }
@media (max-width: 960px) { .showcase { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; font: 600 1.08rem/1.4 var(--f-display); color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 14px; height: 14px; flex: none; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) translateY(-4px); transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-4px); }
.faq .faq-body { padding: 0 24px 20px; color: var(--muted); animation: faq-open .45s var(--ease); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-8px); } }

/* CTA */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 64px; background: linear-gradient(135deg, var(--ink), var(--ink-3)); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; isolation: isolate; }
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { color: rgba(255, 255, 255, .72); margin: 0; }
.cta-band svg { position: absolute; right: -120px; top: -150px; width: 520px; color: var(--foil); opacity: .25; z-index: -1; animation: spin 90s linear infinite; }
@media (max-width: 640px) { .cta-band { padding: 40px 26px; } }

/* Footer */
.site-footer { background: #0A1830; color: rgba(255, 255, 255, .78); padding: 64px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.footer-note { font-size: .92rem; max-width: 46ch; color: rgba(255, 255, 255, .6); }
.verify-form label { display: block; font-weight: 600; color: #fff; margin-bottom: 10px; }
.verify-row { display: flex; gap: 8px; }
.verify-row .btn { min-height: 42px; }
.verify-row .input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: #fff; min-height: 42px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--f-display); }
.verify-row .input::placeholder { color: rgba(255, 255, 255, .35); }
.phone-link { color: #fff; text-decoration: none; display: inline-flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.phone-link small { font-size: .85rem; font-weight: 500; color: rgba(255, 255, 255, .7); }
.phone-link span { font: 800 2rem/1 var(--f-display); letter-spacing: .02em; color: var(--gold, #F2C94C); }
.phone-link:hover span { text-decoration: underline; text-underline-offset: 4px; }
.emergency { font-size: .92rem; color: var(--foil-l); }
.footer-contacts { display: flex; flex-direction: column; align-items: flex-start; }
.footer-h { font: 700 .8rem/1.2 var(--f-body, inherit); letter-spacing: .02em; color: rgba(255, 255, 255, .55); margin: 0 0 12px; }
.phone-link[data-cfg-tel="2"] span { font-size: 1.45rem; color: #fff; }
.footer-org { margin-top: 36px; font-size: .85rem; line-height: 1.5; color: rgba(255, 255, 255, .62); }
.footer-org span { display: block; max-width: 72ch; }
.footer-org small { display: block; font-size: .75rem; color: rgba(255, 255, 255, .45); margin-bottom: 2px; }
.footer-org + .footer-bottom { margin-top: 18px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: rgba(255, 255, 255, .45); }
.footer-bottom a { color: rgba(255, 255, 255, .45); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Auth pages
   ========================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 20% 0%, var(--ink-3), var(--ink) 60%, #0A1830); padding: calc(var(--header-h) + 64px) 56px 56px; display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.auth-side h1 { color: #fff; font-size: clamp(2rem, 3vw, 3rem); }
.auth-side p { color: rgba(255, 255, 255, .75); max-width: 44ch; font-size: 1.08rem; }
.auth-side svg.g { position: absolute; width: 900px; left: -260px; bottom: -420px; color: var(--foil); opacity: .2; z-index: -1; animation: spin 120s linear infinite; }
.auth-side .note { margin-top: 28px; padding: 16px 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); font-size: .95rem; display: flex; gap: 12px; }
.auth-main { display: grid; place-items: center; padding: calc(var(--header-h) + 32px) 24px 48px; }
.auth-card { width: min(460px, 100%); animation: enter .7s var(--ease) both; }
.auth-card h2 { margin-bottom: 26px; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--muted); }
.forgot { margin-top: -6px; margin-bottom: 18px; }
.forgot summary { cursor: pointer; color: var(--sky-d); font-size: .92rem; font-weight: 500; }
.forgot p { margin-top: 10px; font-size: .92rem; color: var(--muted); background: var(--info-bg); border-radius: var(--r-sm); padding: 12px 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { padding: calc(var(--header-h) + 32px) 24px 40px; } .auth-side .note { display: none; } }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }

/* =========================================================
   App (learning area)
   ========================================================= */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-head { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 85% 0%, var(--ink-3), var(--ink) 60%); color: #fff; padding: calc(var(--header-h) + 36px) 0 92px; isolation: isolate; }
.app-head svg.g { position: absolute; width: 760px; right: -240px; top: -260px; color: var(--foil); opacity: .17; z-index: -1; animation: spin 160s linear infinite; }
.app-head h1 { color: #fff; font-size: clamp(1.9rem, 3vw, 2.8rem); margin-bottom: .25em; }
.app-head p { color: rgba(255, 255, 255, .72); margin: 0; }
.app-body { flex: 1; margin-top: -56px; padding-bottom: 96px; position: relative; z-index: 1; }
.view-enter { animation: enter .55s var(--ease) both; }
.crumb { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .75); text-decoration: none; font-weight: 500; margin-bottom: 18px; }
.crumb:hover { color: #fff; }
.crumb svg { width: 18px; }

.panel { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 28px; }
.panel h2 { font-size: 1.4rem; }
.dash-top { display: grid; grid-template-columns: 1fr 1.25fr; gap: 22px; margin-bottom: 34px; }
.dash-progress { display: flex; align-items: center; gap: 26px; }
.dash-progress h2 { margin-bottom: .2em; }

.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring-track { stroke: var(--paper-2); }
.ring-bar { stroke: var(--c, var(--safe)); transition: stroke-dashoffset 1.6s var(--ease); }
.ring-label { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; justify-content: center; text-align: center; line-height: 1; }
.ring-label b { font: 800 1.9rem var(--f-display); color: var(--ink); }
.ring-label span { font-size: .95rem; font-weight: 700; color: var(--muted); }
.ring-label b, .ring-label span { display: inline; }
.ring-label small { display: block; width: 100%; font-size: .72rem; color: var(--muted); margin-top: 4px; }

.cert-panel { position: relative; overflow: hidden; display: flex; align-items: center; gap: 24px; isolation: isolate; }
.cert-panel .seal-mini { width: 92px; flex: none; }
.cert-panel.locked .seal-mini { filter: grayscale(1); opacity: .45; }
.cert-panel.ready { background: linear-gradient(130deg, #FFF9E8, #fff 60%); box-shadow: 0 0 0 2px var(--foil), 0 20px 50px -20px rgba(226, 179, 60, .7); }
.cert-panel.ready .seal-mini { animation: seal-bob 2.4s var(--ease) infinite; }
@keyframes seal-bob { 50% { transform: rotate(-8deg) scale(1.06); } }
.cert-panel h2 { margin-bottom: .2em; }
.cert-panel p { margin: 0 0 12px; color: var(--muted); }
.cert-dots { display: flex; gap: 6px; margin-top: 4px; }
.cert-dots i { width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-style: normal; font-size: .7rem; }
.cert-dots i.on { background: var(--safe); color: #fff; animation: pop .4s var(--spring) both; animation-delay: calc(var(--i, 0) * 80ms); }
@media (max-width: 900px) { .dash-top { grid-template-columns: 1fr; } }

.status { position: absolute; top: 20px; right: 20px; }

/* Course page */
.course-hero { display: flex; gap: 22px; align-items: center; }
.course-hero .course-icon { width: 84px; height: 84px; font-size: 2.6rem; border-radius: 24px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); animation: pop .6s var(--spring) both; }
.course-layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; } }
.roadmap { list-style: none; margin: 0; padding: 0; position: relative; }
.roadmap::before { content: ''; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 3px; background: var(--paper-2); border-radius: 3px; }
.roadmap .fill { position: absolute; left: 27px; top: 30px; width: 3px; height: calc((100% - 60px) * var(--p, 0) / 100); background: linear-gradient(var(--safe), var(--c, var(--sky))); border-radius: 3px; transition: height 1.4s var(--ease) .2s; }
.road-item { position: relative; }
.road-link { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 14px 14px 14px 0; text-decoration: none; color: var(--text); border-radius: var(--r-md); transition: background .2s, transform .3s var(--ease); }
a.road-link:hover { background: var(--paper); transform: translateX(4px); }
.road-node { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 700 1.1rem var(--f-display); background: #fff; border: 3px solid var(--paper-2); color: var(--muted); transition: all .3s; }
.road-item.done .road-node { background: var(--safe); border-color: var(--safe); color: #fff; }
.road-item.current .road-node { border-color: var(--c, var(--sky)); color: var(--ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c, var(--sky)) 20%, transparent); animation: pulse-ring 2s infinite; }
.road-item.test .road-node { background: var(--ink); border-color: var(--ink); color: var(--foil-l); }
.road-item.test.locked .road-node { background: var(--paper-2); border-color: var(--paper-2); color: var(--muted); }
.road-item.test.passed .road-node { background: var(--foil); border-color: var(--foil); color: var(--ink); }
@keyframes pulse-ring { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--c, var(--sky)) 6%, transparent); } }
.road-title { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.road-sub { font-size: .88rem; color: var(--muted); }
.road-link .arrow { width: 20px; color: var(--muted); }
.attempts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.attempts li { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--r-sm); background: var(--paper); font-size: .92rem; }

/* Lesson */
.lesson-bar { position: sticky; top: var(--header-h); z-index: 10; background: rgba(244, 247, 242, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lesson-bar-in { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.lesson-bar .track { flex: 1; height: 6px; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.lesson-bar .track i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: linear-gradient(90deg, var(--sky), var(--safe)); border-radius: inherit; transition: width .3s; }
.lesson-bar small { font-weight: 600; color: var(--muted); white-space: nowrap; }
.lesson-wrap { width: min(780px, 100% - 40px); margin: 0 auto; padding: 40px 0 96px; }
.lesson-wrap > h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.lesson-num { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.lesson-num .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--sky)); }
.lesson-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }

.blocks { display: grid; gap: 26px; margin-top: 28px; }
.block { position: relative; }
.block-text { font-size: 1.12rem; line-height: 1.72; }
.block-text p:last-child { margin: 0; }
.block-text ul { padding-left: 1.2em; }
.block-label { display: inline-flex; align-items: center; gap: 8px; font: 700 .86rem var(--f-display); color: var(--muted); margin-bottom: 12px; letter-spacing: .01em; }

.tip { display: flex; gap: 16px; padding: 20px 22px; border-radius: var(--r-md); font-size: 1.04rem; border-left: 5px solid; }
.tip p:last-child { margin: 0; }
.tip-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.tip-info { background: var(--info-bg); border-color: var(--sky); }
.tip-info .tip-ico { background: var(--sky); color: #fff; }
.tip-warn { background: var(--warn-bg); border-color: var(--foil); }
.tip-warn .tip-ico { background: var(--foil); color: var(--ink); animation: wiggle 2.8s infinite; }
.tip-ok { background: var(--safe-bg); border-color: var(--safe); }
.tip-ok .tip-ico { background: var(--safe); color: #fff; }
@keyframes wiggle { 0%, 80%, 100% { rotate: 0deg; } 84% { rotate: -14deg; } 88% { rotate: 12deg; } 92% { rotate: -8deg; } }

/* Flip cards */
.flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.flip { display: block; width: 100%; perspective: 1000px; min-height: 190px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; }
.flip-in { display: block; position: relative; height: 100%; min-height: 190px; transform-style: preserve-3d; transition: transform .7s var(--spring); }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.flip-front { background: var(--ink); color: #fff; overflow: hidden; }
.flip-front b { font: 700 1.25rem/1.25 var(--f-display); }
.flip-front small { color: rgba(255, 255, 255, .6); display: flex; align-items: center; gap: 6px; }
.flip-front svg.r { position: absolute; width: 180px; right: -60px; bottom: -60px; color: var(--foil); opacity: .3; }
.flip-back { background: #fff; transform: rotateY(180deg); box-shadow: inset 0 0 0 2px var(--c, var(--sky)); font-size: 1rem; justify-content: center; }
@media (hover: hover) { .flip:hover:not(.on) .flip-in { transform: rotateY(-8deg) rotateX(4deg); } }
.flip-count { margin-top: 10px; font-size: .88rem; color: var(--muted); }

/* Flags */
.flags { background: #fff; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-1); }
.flags h3 { font-size: 1.15rem; }
.flags ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.flags li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--paper); opacity: 0; transform: translateX(-24px); transition: opacity .5s var(--ease), transform .6s var(--ease), background .3s; transition-delay: calc(var(--i, 0) * 140ms); }
.flags.in li { opacity: 1; transform: none; }
.flags li .flag { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--alarm-bg); }
.flags li .flag svg { width: 16px; color: var(--alarm); transform-origin: 3px 2px; }
.flags.in li .flag svg { animation: wave 1.2s var(--ease); animation-delay: calc(var(--i, 0) * 140ms + .3s); }
@keyframes wave { 25% { rotate: 14deg; } 50% { rotate: -10deg; } 75% { rotate: 6deg; } }

/* Chat */
.chat { width: min(460px, 100%); margin: 0 auto; border-radius: 28px; overflow: hidden; background: #E7EDF3; box-shadow: var(--shadow-2); }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #fff; }
.chat-top .ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--alarm-bg); font-size: 1.1rem; }
.chat-top b { display: block; font-size: .98rem; line-height: 1.2; }
.chat-top small { color: var(--muted); font-size: .8rem; }
.chat-body { padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.chat .msg { font-size: .98rem; }
.chat-foot { padding: 0 14px 16px; }
.chat-reveal { margin-top: 6px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 2px solid var(--alarm); animation: pop .5s var(--spring); }
.chat-reveal b { color: var(--alarm); display: block; margin-bottom: 4px; }

/* True/false & scenario */
.quiz-card { background: #fff; border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-1); }
.quiz-card .q { font: 600 1.2rem/1.45 var(--f-display); color: var(--ink); margin-bottom: 18px; }
.tf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opts { display: grid; gap: 10px; }
.opt, .q-opt {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px 18px; min-height: 58px; border-radius: var(--r-md);
  background: var(--paper); border: 2px solid transparent; cursor: pointer;
  font: 500 1.02rem/1.4 var(--f-body); color: var(--text);
  transition: background .2s, border-color .2s, transform .3s var(--ease);
}
.opt:hover:not(:disabled), .q-opt:hover:not(:disabled) { background: #fff; border-color: var(--ink); transform: translateX(4px); }
.opt:disabled, .q-opt:disabled { cursor: default; }
.opt .key, .q-opt .key { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font: 700 .9rem var(--f-display); background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); transition: all .25s; }
.opt.right, .q-opt.right { background: var(--safe-bg); border-color: var(--safe); animation: right .55s var(--spring); }
.opt.right .key, .q-opt.right .key { background: var(--safe); color: #fff; box-shadow: none; }
.opt.wrong, .q-opt.wrong { background: var(--alarm-bg); border-color: var(--alarm); animation: shake .45s var(--ease); }
.opt.wrong .key, .q-opt.wrong .key { background: var(--alarm); color: #fff; box-shadow: none; }
.opt.dim, .q-opt.dim { opacity: .5; }
@keyframes right { 40% { transform: scale(1.03); } }
.feedback { margin-top: 16px; padding: 16px 18px; border-radius: var(--r-md); animation: pop .45s var(--spring); }
.feedback b { display: block; font-family: var(--f-display); margin-bottom: 4px; }
.feedback.ok { background: var(--safe-bg); color: #0E4F37; }
.feedback.bad { background: var(--alarm-bg); color: #861226; }
.feedback p { margin: 0; }

/* Quiz */
.quiz-wrap { width: min(760px, 100% - 40px); margin: 0 auto; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; color: rgba(255, 255, 255, .8); font-weight: 600; }
.quiz-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.quiz-dots i { width: 22px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); transition: background .3s, width .3s; }
.quiz-dots i.cur { background: #fff; width: 34px; }
.quiz-dots i.ok { background: var(--safe); }
.quiz-dots i.bad { background: var(--alarm); }
.q-card { background: #fff; border-radius: var(--r-xl); padding: 34px; box-shadow: var(--shadow-2); }
.q-card.slide-in { animation: slide-in .5s var(--ease) both; }
.q-card.slide-out { animation: slide-out .3s var(--ease) both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(60px) rotate(1.5deg); } }
@keyframes slide-out { to { opacity: 0; transform: translateX(-60px) rotate(-1.5deg); } }
.q-card h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.35; margin-bottom: 24px; }
.q-actions { margin-top: 22px; display: flex; justify-content: flex-end; }

.result { text-align: center; }
.result .ring { margin: 0 auto 18px; }
.result h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.mistakes { display: grid; gap: 12px; text-align: left; margin-top: 26px; }
.mistake { padding: 18px 20px; border-radius: var(--r-md); background: var(--paper); }
.mistake h4 { font: 600 1.05rem/1.4 var(--f-display); color: var(--ink); margin: 0 0 8px; }
.mistake .your { color: #9A1529; }
.mistake .ans { color: #0F5C40; font-weight: 600; }
.mistake p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }

/* Claim */
.claim { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; }
@media (max-width: 900px) { .claim { grid-template-columns: 1fr; } }

/* Profile */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.profile-grid .panel.wide { grid-column: 1 / -1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.results-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.results-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--paper); }
.results-list .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, var(--c) 18%, #fff); }
.danger-zone { border: 2px solid var(--alarm-bg); }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

/* Modal */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(10, 24, 48, .6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .25s both; }
.modal { width: min(480px, 100%); background: #fff; border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-2); animation: pop .4s var(--spring) both; }
.modal h3 { margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }

/* Toasts */
.toast-stack { position: fixed; z-index: 90; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 10px; justify-items: center; pointer-events: none; }
.toast { padding: 13px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow-2); animation: toast-in .45s var(--spring) both; }
.toast-ok { background: var(--safe); }
.toast-err { background: var(--alarm); }
.toast.out { animation: toast-out .35s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 95; pointer-events: none; }

/* Skeleton */
.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, #e8eee7 0%, #f5f8f4 50%, #e8eee7 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; min-height: 220px; }
@keyframes skel { to { background-position: -200% 0; } }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--ink); color: #fff; padding: 24px; }
.notfound b { display: block; font: 800 clamp(6rem, 18vw, 12rem)/1 var(--f-display); color: var(--foil); }
.notfound h1 { color: #fff; font-size: 1.8rem; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal], .hero [data-enter], .flags li { opacity: 1 !important; transform: none !important; }
  .ticker-row { animation: none !important; }
}

/* Seal */
.seal { overflow: visible; }
.seal-shine { transform-box: view-box; transform-origin: 0 0; animation: spin 7s linear infinite; mix-blend-mode: soft-light; }
.seal .seal-check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .8s var(--ease) .6s forwards; }

/* App extras */
.mt { margin-top: 26px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quiz-stage { min-height: 100vh; padding-bottom: 96px; }
.quiz-stage .crumb { margin-bottom: 22px; }
.quiz-stage .q-card .lead { color: var(--muted); }
.lesson-page { min-height: 100vh; }
.course-layout aside .ring { margin-bottom: 12px; }
.course-layout aside .btn-block { margin: 8px 0 4px; }
.seal-mini { width: 92px; height: auto; }
.preview-main .lesson-bar { top: 0; }
.preview-main .lesson-bar .lang { margin-left: auto; background: var(--ink); }
.q-card { color: var(--text); }
.app-head .q-card p { color: inherit; }
.app-head .q-card .lead, .app-head .q-card .mistake p { color: var(--muted); }
.toast { max-width: min(90vw, 460px); border-radius: 16px; text-align: center; line-height: 1.35; }

/* Icons */
.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
.cic { width: 100%; height: 100%; display: block; overflow: visible; }
.cic .f { fill: currentColor; opacity: .16; }
.cic .s { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cic .t { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.cic .a { fill: var(--ic-accent, currentColor); transform-box: fill-box; transform-origin: center; }
.cic .w { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.emoji-ic { font-size: 1.6em; line-height: 1; }
.course-icon { color: color-mix(in srgb, var(--c, var(--sky)) 70%, var(--ink)); --ic-accent: var(--c, var(--sky)); }
.course-icon .cic { width: 64%; height: 64%; }
.course-card:hover .cic .s, .course-hero .cic .s { stroke-dasharray: 300; animation: ic-draw 1.1s var(--ease) both; }
.course-card:hover .cic .a { animation: ic-pop .6s var(--spring) .35s both; }
@keyframes ic-draw { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 0; } }
@keyframes ic-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.course-hero .course-icon { color: #fff; --ic-accent: var(--c); }
.chip .ic { width: 1em; height: 1em; }
.tip-ico .ic { width: 18px; height: 18px; }
.phone-bar .ava, .game-card .from span, .chat-top .ava { color: var(--ink); }
.phone-bar .ava .ic, .game-card .from span .ic, .chat-top .ava .ic { width: 20px; height: 20px; }
.results-list .ico { color: color-mix(in srgb, var(--c) 70%, var(--ink)); --ic-accent: var(--c); }
.results-list .ico .cic { width: 30px; height: 30px; }
.lesson-num .cic, .crumb .cic { width: 22px; height: 22px; color: inherit; }
.inline-cic { display: inline-block; width: 1.4em; height: 1.4em; vertical-align: -0.35em; color: color-mix(in srgb, var(--c, var(--sky)) 70%, var(--ink)); --ic-accent: var(--c, var(--sky)); }
.inline-cic .cic { width: 100%; height: 100%; }
.app-head .inline-cic, .quiz-stage .inline-cic { color: #fff; }
.name-hint { margin: -10px 0 16px; }
.gm-skel { aspect-ratio: 16 / 10; }

/* ---------- Consent & privacy page ---------- */
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 4px; font-size: .92rem; line-height: 1.45; color: var(--muted); cursor: pointer; padding: 10px 12px; border-radius: 12px; transition: background .2s, box-shadow .2s; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.consent a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent.err { background: var(--alarm-bg); box-shadow: inset 0 0 0 2px rgba(239, 64, 88, .45); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.legal { padding-top: 120px; padding-bottom: 80px; }
.legal-doc { max-width: 72ch; margin: 0 auto; }
.legal-doc h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal-doc h2 { font-size: 1.25rem; margin-top: 1.8em; }
.legal-doc p, .legal-doc li { line-height: 1.65; }
.legal-doc ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal-upd, .legal-contact { color: var(--muted); }

/* Return code (sign-up result, profile) */
.code-box { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 700; letter-spacing: .16em; text-align: center; padding: 22px 12px; margin: 0 0 16px; border-radius: 16px; background: var(--ink, #0F2340); color: #F6D77A; user-select: all; }
.code-card .row-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.code-input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; font-size: 1.15rem; }
.ret-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; user-select: all; }

/* Step-by-step lessons */
.lstep { scroll-margin-top: calc(var(--header-h, 64px) + 70px); transition: opacity .5s var(--ease, ease), transform .5s var(--ease, ease); }
.lstep.locked { opacity: 0; transform: translateY(18px); }
.step-next { display: flex; align-items: center; gap: 14px; margin: 8px 0 34px; flex-wrap: wrap; }
.step-next.used { display: none; }
.step-next .btn[disabled] { opacity: .55; cursor: not-allowed; }
.step-lock-note { margin: 14px 0 0; text-align: right; font-size: .9rem; }
#finish[disabled] { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }

/* Certificate claim: the registered name, shown as it will be printed */
.claim-name { font: 700 1.6rem/1.25 var(--f-display); padding: 14px 16px; border-radius: 12px; background: var(--paper-2, #F5F1E6); border: 1px dashed var(--foil, #C9971F); margin: 6px 0 8px; overflow-wrap: anywhere; }

/* ---------- Lesson route: rail + step markers (only in gated mode) ---------- */
.blocks.is-gated { position: relative; padding-left: 34px; --fill: 0; }
.blocks.is-gated::before, .blocks.is-gated::after {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
}
.blocks.is-gated::before { background: rgba(15, 35, 64, .1); }
.blocks.is-gated::after {
  background: linear-gradient(180deg, var(--foil-l, #F6D77A), var(--foil, #E2B33C));
  transform-origin: top; transform: scaleY(var(--fill)); transition: transform .8s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 10px rgba(226, 179, 60, .55);
}
.blocks.is-gated > .lstep { position: relative; }
.blocks.is-gated > .lstep::before {
  content: ''; position: absolute; left: -31px; top: 10px; width: 17px; height: 17px; border-radius: 50%; z-index: 1;
  background: var(--paper, #F4F7F2); border: 3px solid rgba(15, 35, 64, .22);
  transition: background .35s ease, border-color .35s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.blocks.is-gated > .lstep[data-done]::before {
  background: var(--foil, #E2B33C) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%230F2340' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
  border-color: var(--foil, #E2B33C); transform: scale(1.15);
}
.blocks.is-gated > .lstep.just-opened > :first-child { animation: step-call 1.6s ease-out; }
@keyframes step-call {
  0% { box-shadow: 0 0 0 0 rgba(226, 179, 60, .7); }
  35% { box-shadow: 0 0 0 10px rgba(226, 179, 60, .25); }
  100% { box-shadow: 0 0 0 18px rgba(226, 179, 60, 0); }
}
@media (max-width: 560px) {
  .blocks.is-gated { padding-left: 24px; }
  .blocks.is-gated::before, .blocks.is-gated::after { left: 6px; }
  .blocks.is-gated > .lstep::before { left: -25px; width: 15px; height: 15px; border-width: 2.5px; }
}

/* ---------- Sign-up button turns into a check mark ---------- */
#submit.is-done { color: transparent; position: relative; pointer-events: none; }
#submit.is-done::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: ic-pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .blocks.is-gated::after, .blocks.is-gated > .lstep::before { transition: none; }
  .blocks.is-gated > .lstep.just-opened > :first-child, #submit.is-done::after { animation: none; }
}

/* ---------- Topic cards on the landing: equal columns across the full width ---------- */
.course-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.course-grid .course-card { padding: 32px 34px 28px; min-height: 0; gap: 18px; }
.course-grid .course-head { display: flex; align-items: center; gap: 18px; padding-right: 72px; }
.course-grid .course-head .course-icon { flex: none; width: 72px; height: 72px; border-radius: 20px; }
.course-grid .course-card h3 { margin: 0; font-size: clamp(1.2rem, 1.05rem + .5vw, 1.5rem); line-height: 1.2; text-wrap: balance; }
.course-grid .course-card p { font-size: 1rem; line-height: 1.6; max-width: 56ch; }
.course-grid .course-meta { margin-top: auto; padding-top: 6px; }
.course-grid .card-foot { padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--c) 18%, transparent); }
.course-grid .course-card .rosette { width: 300px; right: -96px; top: -96px; opacity: .2; }
@media (max-width: 560px) {
  .course-grid .course-card { padding: 24px 22px 22px; }
  .course-grid .course-head { gap: 14px; padding-right: 0; }
  .course-grid .course-head .course-icon { width: 58px; height: 58px; border-radius: 16px; }
}


/* ---------- Спокойное движение: без прыжков и тяжёлых эффектов ---------- */
[data-reveal], [data-reveal="left"], [data-reveal="right"], [data-reveal="zoom"] { transform: none; transition: opacity .45s ease; transition-delay: calc(var(--i, 0) * 40ms); }
[data-reveal].in { opacity: 1; transform: none; }
.hero [data-enter] { transform: none; animation-duration: .6s; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
.lstep, .lstep.locked { transform: none; transition: opacity .35s ease; }
.phone { animation: none; }
.phone.hit { animation: jolt .35s; }
.hero-bg .g1, .hero-bg .g2, .cta-band svg, .auth-side svg.g, .app-head svg.g { animation: none; }
.tip-warn .tip-ico, .cert-panel.ready .seal-mini, .road-item.current .road-node { animation: none; }
.topbar.scrolled, .topbar.solid { background: rgba(15, 35, 64, .96); backdrop-filter: none; }
.lesson-bar { background: rgba(244, 247, 242, .98); backdrop-filter: none; }
.modal-back { backdrop-filter: none; }
@media (max-width: 900px) { .nav { backdrop-filter: none; } }

/* ---------- Заголовок: слова меняются на месте, страница не двигается ---------- */
.rot { display: inline-grid; vertical-align: top; color: var(--foil-l); }
.rot > span { grid-area: 1 / 1; justify-self: start; white-space: nowrap; position: relative; opacity: 0; filter: blur(6px); transition: opacity .7s ease, filter .7s ease; }
.rot > span.on { opacity: 1; filter: none; }
.rot > span::after { display: none; content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .1em; border-radius: 4px; background: linear-gradient(90deg, var(--foil), transparent); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .25s; }
.rot > span.on::after { transform: scaleX(1); }
#hero-post[hidden] { display: none; }

/* ---------- Телефон ---------- */
.phone-stage { perspective: none; padding: 10px 0; }
.phone-glow { inset: 4% -6%; background: radial-gradient(closest-side, rgba(26, 175, 208, .38), rgba(226, 179, 60, .18) 55%, transparent); filter: blur(40px); }
.phone {
  width: min(330px, 100%); aspect-ratio: 9 / 19; border-radius: 52px; padding: 11px;
  background: linear-gradient(145deg, #5B6E8C 0%, #273650 22%, #141E30 55%, #3A4A66 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), inset 0 0 0 5px #0B1220, 0 50px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .5);
  transform: rotate(-3deg); animation: none; transition: none;
}
.phone.hit { animation: none; }
.phone-notch { display: none; }
.phone-btn { position: absolute; width: 4px; border-radius: 3px; background: linear-gradient(90deg, #1b2537, #4b5c78); }
.phone-btn.b1 { left: -3px; top: 21%; height: 7%; }
.phone-btn.b2 { left: -3px; top: 31%; height: 11%; }
.phone-btn.b3 { right: -3px; top: 27%; height: 14%; background: linear-gradient(270deg, #1b2537, #4b5c78); }
.phone-screen { border-radius: 42px; background: var(--ph-bg); --ph-bg: #F2F3F7; --ph-bar: rgba(248, 248, 250, .96); --ph-acc: #2F7CF6; --ph-in: #E9E9EE; --ph-ava: linear-gradient(140deg, #8E9AAF, #5E6B80); transition: box-shadow .4s; }
.phone-screen[data-theme="chat"] { --ph-bg: #EFE7DD; --ph-bar: #F6F1EA; --ph-acc: #1FA855; --ph-in: #fff; --ph-ava: linear-gradient(140deg, #F5A35C, #E0663A);
  background-image: radial-gradient(rgba(120, 95, 60, .09) 1.2px, transparent 1.4px), radial-gradient(rgba(120, 95, 60, .06) 1.2px, transparent 1.4px); background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px; }
.phone-screen[data-theme="bot"] { --ph-bg: #DCE8F3; --ph-bar: #F7FAFD; --ph-acc: #2A9AD8; --ph-in: #fff; --ph-ava: linear-gradient(140deg, #4CC3F0, #2A7BD8);
  background-image: linear-gradient(160deg, #CFE3F2, #E6DFF2 60%, #F1E4D6); }
.phone-screen.hit { box-shadow: inset 0 0 0 3px rgba(239, 64, 88, .75), inset 0 0 40px rgba(239, 64, 88, .25); }
.phone-status { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 26px 0 30px; font-size: .78rem; color: #0E1420; background: var(--ph-bar); }
.phone-status b { font-weight: 700; font-variant-numeric: tabular-nums; }
.phone-status .island { position: absolute; left: 50%; top: 9px; translate: -50% 0; width: 92px; height: 26px; border-radius: 20px; background: #05080E; }
.st-ic { display: flex; align-items: center; gap: 5px; }
.st-ic svg { width: 16px; height: 11px; fill: #0E1420; }
.batt { position: relative; width: 23px; height: 11px; border: 1.3px solid rgba(14, 20, 32, .45); border-radius: 3.5px; padding: 1px; }
.batt::after { content: ''; position: absolute; right: -3.5px; top: 3px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: rgba(14, 20, 32, .45); }
.batt i { display: block; height: 100%; width: 78%; border-radius: 2px; background: #0E1420; }
.phone-bar { position: relative; z-index: 2; gap: 9px; padding: 6px 14px 10px 10px; background: var(--ph-bar); border-bottom: 1px solid rgba(0, 0, 0, .07); }
.phone-bar .back { width: 10px; height: 18px; color: var(--ph-acc); flex: none; }
.phone-bar .ava { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ph-ava); color: #fff; font: 700 1rem/1 var(--f-display); }
.phone-bar .ava svg { width: 19px; height: 19px; }
.phone-bar .who { flex: 1; min-width: 0; }
.phone-bar .who b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-bar small { font-size: .7rem; color: #7A8494; }
.phone-screen[data-theme="chat"] .phone-bar small { color: var(--ph-acc); }
.phone-bar .call { width: 19px; height: 19px; fill: var(--ph-acc); flex: none; }
.phone-day { align-self: center; margin: 0 0 4px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); color: #6B7484; font-size: .68rem; font-weight: 600; }
.phone-msgs { padding: 10px 12px 12px; gap: 7px; justify-content: flex-end; }
.msg { position: relative; max-width: 84%; padding: 8px 11px 6px; border-radius: 18px 18px 18px 5px; font-size: .86rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); animation: msg-in .35s ease both; }
.msg time { display: block; margin-top: 2px; text-align: right; font-size: .62rem; color: #8A93A2; }
.phone-screen[data-theme="sms"] .msg { background: var(--ph-in); box-shadow: none; }
.msg.typing { padding: 12px 13px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.phone-input { display: flex; align-items: center; gap: 8px; padding: 8px 12px 26px; background: var(--ph-bar); border-top: 1px solid rgba(0, 0, 0, .06); }
.phone-input .plus { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--ph-acc); font-size: 1.3rem; line-height: 1; }
.phone-input .field { flex: 1; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(0, 0, 0, .08); color: #A0A7B3; font-size: .8rem; }
.phone-input .mic svg { width: 20px; height: 20px; fill: var(--ph-acc); display: block; }
.home-ind { position: absolute; z-index: 3; left: 50%; bottom: 8px; translate: -50% 0; width: 118px; height: 4.5px; border-radius: 3px; background: #0E1420; opacity: .8; }
.scan-label { top: 112px; }
.stamp { top: 50%; }
@media (max-width: 960px) { .phone { transform: none; width: min(300px, 82vw); } }
@media (prefers-reduced-motion: reduce) { .rot > span { transition: none; } }

/* ---------- «Мошенник или нет?»: подсказки слева и карточка-уведомление ---------- */
.phone { transform: rotate(3deg); }
@media (max-width: 960px) { .phone { transform: none; } }
.game { align-items: stretch; gap: 48px; }
.game .section-head { margin-bottom: 0; display: flex; flex-direction: column; }
.game-side { margin-top: 28px; padding: 22px 22px 18px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(15, 35, 64, .35); }
.game-side-t { margin: 0 0 12px; font: 700 1rem/1.3 var(--f-display); color: var(--ink); }
.game-signs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.game-signs li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; font-size: .95rem; color: var(--text); transition: background .35s, color .35s; }
.game-signs li span { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); transition: background .35s, color .35s; }
.game-signs li span .ic, .game-signs li span svg { width: 17px; height: 17px; }
.game-signs li.lit { background: var(--alarm-bg); color: #9A1529; font-weight: 600; }
.game-signs li.lit span { background: var(--alarm); color: #fff; }
.game-signs li.clean { background: var(--safe-bg); color: #0F5C40; font-weight: 600; }
.game-signs li.clean span { background: var(--safe); color: #fff; }
.game-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.game-score b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.game-score em { font-style: normal; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.game-score em.ok { background: var(--safe-bg); color: #0F5C40; }
.game-score em.bad { background: var(--alarm-bg); color: #9A1529; }

.game-board { min-height: 0; padding: 34px 28px; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 80% at 85% 0%, #2A4F86 0%, var(--ink) 60%, #0A1830 100%); }
.game-board::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.3px) 0 0 / 18px 18px; }
.game-board .game-progress i { background: rgba(255, 255, 255, .18); }
.game-board .game-progress i.cur { background: #fff; }
.game-board .game-progress i.ok { background: var(--safe); }
.game-board .game-progress i.bad { background: var(--alarm); }
.game-stack { width: min(440px, 100%); height: 268px; }
.game-card { padding: 18px 18px 16px; gap: 12px; border-radius: 22px; background: #fff; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .6); }
.game-card .from { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.game-card .from span { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(140deg, #8E9AAF, #5E6B80); color: #fff; }
.game-card[data-ava="bank"] .from span { background: linear-gradient(140deg, #F0717E, #D63447); }
.game-card[data-ava="gov"] .from span { background: linear-gradient(140deg, #4CC3F0, #2A7BD8); }
.game-card[data-ava="phone"] .from span { background: linear-gradient(140deg, #45D483, #1FA855); }
.game-card[data-ava="trend"] .from span { background: linear-gradient(140deg, #F7C04A, #E08A1E); }
.game-card[data-ava="shield"] .from span { background: linear-gradient(140deg, #7F8CF5, #4F5BD5); }
.game-card .from span .ic, .game-card .from span svg { width: 19px; height: 19px; color: #fff; }
.game-card .from b { font-size: .98rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .from small { font-size: .76rem; font-weight: 500; color: var(--muted); }
.game-card .text { padding: 12px 14px; border-radius: 16px 16px 16px 5px; background: #F1F3F6; font-size: 1rem; line-height: 1.5; }
.game-card.behind { transform: translateY(16px) scale(.94); opacity: .5; }
.game-card .verdict { margin-top: auto; font-size: .9rem; }
.game-board .game-actions { margin-top: 22px; }
.game-board .btn-primary { background: #fff; color: var(--ink); }
.game-board .game-result { color: #fff; }
.game-board .game-result b { color: #fff; }
.game-board .game-result .lead { color: rgba(255, 255, 255, .8); }
.game-board .game-result .btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
@media (max-width: 860px) { .game-board { padding: 26px 16px; } .game-stack { height: 300px; } }
.game-root { width: 100%; max-width: 470px; }
.game-stack { width: 100%; height: auto; display: grid; grid-template-rows: minmax(330px, auto); }
.game-stack .game-card { position: relative; inset: auto; grid-area: 1 / 1; }
.game-signs.clean li span { background: var(--safe-bg); color: #0F5C40; }
@media (max-width: 860px) { .game-stack { grid-template-rows: minmax(360px, auto); height: auto; } }
