/* Meili CDC landing page. No build step; plain CSS with custom properties. */

/* ---------- tokens ---------- */
:root {
  --pink: #FF5CAA;
  --coral: #FF4E62;
  --violet: #6C47FF;
  --navy: #1E1A34;
  --grad: linear-gradient(120deg, #FF5CAA 0%, #FF4E62 45%, #6C47FF 100%);
  --grad-strong: linear-gradient(120deg, #D61F73 0%, #C0235C 40%, #6C47FF 100%);
  --grad-text: linear-gradient(100deg, #E0247A 0%, #F0405A 40%, #6C47FF 100%);

  --bg: #FFFFFF;
  --bg-soft: #F8F6FD;
  --surface: #FFFFFF;
  --surface-2: #F3F0FA;
  --border: #E7E2F2;
  --border-strong: #D6CFE8;
  --text: #1E1A34;
  --text-2: #3F3A5C;
  --muted: #5F597A;
  --accent: #C81E6C;
  --accent-2: #5634E6;
  --accent-soft: rgba(255, 92, 170, .10);
  --violet-soft: rgba(108, 71, 255, .10);
  --flow: rgba(108, 71, 255, .35);
  --halo: rgba(255, 92, 170, .18);
  --shadow-sm: 0 1px 2px rgba(30, 26, 52, .06), 0 2px 8px rgba(30, 26, 52, .05);
  --shadow: 0 2px 6px rgba(30, 26, 52, .06), 0 18px 48px -12px rgba(30, 26, 52, .22);
  --shadow-lg: 0 30px 80px -20px rgba(64, 32, 120, .35), 0 8px 24px -8px rgba(30, 26, 52, .18);
  --nav-bg: rgba(255, 255, 255, .75);
  --term-bg: #15122A;
  --term-text: #E9E6F5;
  --radius: 16px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15112A;
    --bg-soft: #1E1A34;
    --surface: #221D3C;
    --surface-2: #2A2448;
    --border: #353056;
    --border-strong: #463F6E;
    --text: #F5F3FB;
    --text-2: #D3CEE6;
    --muted: #ACA6C6;
    --accent: #FF86C2;
    --accent-2: #A994FF;
    --accent-soft: rgba(255, 92, 170, .14);
    --violet-soft: rgba(108, 71, 255, .20);
    --flow: rgba(169, 148, 255, .40);
    --halo: rgba(255, 92, 170, .25);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
    --nav-bg: rgba(21, 17, 42, .72);
    --term-bg: #0E0B1C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15112A;
  --bg-soft: #1E1A34;
  --surface: #221D3C;
  --surface-2: #2A2448;
  --border: #353056;
  --border-strong: #463F6E;
  --text: #F5F3FB;
  --text-2: #D3CEE6;
  --muted: #ACA6C6;
  --accent: #FF86C2;
  --accent-2: #A994FF;
  --accent-soft: rgba(255, 92, 170, .14);
  --violet-soft: rgba(108, 71, 255, .20);
  --flow: rgba(169, 148, 255, .40);
  --halo: rgba(255, 92, 170, .25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  --nav-bg: rgba(21, 17, 42, .72);
  --term-bg: #0E0B1C;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
/* Safety net only: every block below is sized to fit; nothing relies on this. */
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--accent-2); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
code, pre { font-family: var(--mono); }
:not(pre) > code {
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .08em .38em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 92, 170, .28); }
.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 {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; color: var(--bg); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 1000px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }
@media (min-width: 1800px) { .wrap { max-width: 1400px; } .wrap.narrow { max-width: 1080px; } body { font-size: 18px; } }

.small { font-size: .9rem; color: var(--muted); }
.text-link { font-weight: 600; text-decoration: none; color: var(--accent-2); }
.text-link:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .72em 1.2em; border-radius: 12px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; line-height: 1.2;
  transition: transform .18s ease, box-shadow .2s ease, background-color .2s, color .2s, border-color .2s;
  font-family: inherit;
}
.btn svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn svg.fill { fill: currentColor; stroke: none; }
.btn-lg { padding: .88em 1.4em; font-size: 1.04rem; }
.btn-primary { background: var(--grad-strong); color: #fff; box-shadow: 0 10px 30px -10px rgba(214, 31, 115, .6); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(108, 71, 255, .65); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent-2); transform: translateY(-2px); }
.btn-white { background: #fff; color: #3B1C8C; }
.btn-white:hover { color: #3B1C8C; transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); }
.btn-outline-white { color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-outline-white:hover { color: #fff; background: rgba(255, 255, 255, .12); transform: translateY(-2px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: transparent; border: 1px solid var(--border); color: var(--text); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px -18px rgba(30, 26, 52, .5); }
.nav-in { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a {
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .94rem;
  padding: 8px 11px; border-radius: 9px; transition: color .15s, background-color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-links .nav-dl { color: var(--accent); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.gh-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border-radius: 11px; border: 1px solid var(--border); text-decoration: none;
  color: var(--text); font-weight: 600; font-size: .92rem; background: var(--surface);
  transition: border-color .2s, transform .2s;
}
.gh-btn:hover { color: var(--text); border-color: var(--accent-2); }
.gh-btn > svg { width: 18px; height: 18px; fill: currentColor; }
.gh-stars { display: inline-flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.gh-stars[hidden] { display: none; }
.gh-stars svg { width: 13px; height: 13px; fill: #F5B400; }
.menu-btn { display: none; }
.menu-btn path { transition: transform .25s, opacity .2s; transform-origin: center; }
.menu-btn[aria-expanded="true"] .m1 { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .m2 { opacity: 0; }
.menu-btn[aria-expanded="true"] .m3 { transform: translateY(-5px) rotate(-45deg); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

@media (max-width: 1080px) {
  .menu-btn { display: inline-grid; }
  .nav-actions { margin-left: auto; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 66px; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 18px; background: var(--bg);
    border-bottom: 1px solid var(--border); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .35);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 12px; font-size: 1rem; }
}
@media (max-width: 520px) {
  .gh-label { display: none; }
  .gh-stars { border-left: 0; padding-left: 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.b1 { width: min(520px, 60%); aspect-ratio: 1; background: #FF5CAA; top: -200px; left: 0; opacity: .28; }
.b2 { width: min(560px, 60%); aspect-ratio: 1; background: #6C47FF; top: -120px; right: 0; opacity: .25; }
.b3 { width: min(420px, 40%); aspect-ratio: 1; background: #FF4E62; bottom: -200px; left: 35%; opacity: .14; }
.grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; }
.hero-in > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px 6px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); max-width: 100%;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #1FBF75; box-shadow: 0 0 0 0 rgba(31, 191, 117, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(31, 191, 117, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 191, 117, 0); } }
.hero h1 { font-size: clamp(2.15rem, 1.2rem + 4.2vw, 4.3rem); font-weight: 800; letter-spacing: -.035em; margin: 22px 0 18px; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .grad-text { background-image: linear-gradient(100deg, #FF7AB9, #FF6A7C 45%, #A48BFF); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad-text { background-image: linear-gradient(100deg, #FF7AB9, #FF6A7C 45%, #A48BFF); } }
.lead { font-size: clamp(1.04rem, 1rem + .3vw, 1.22rem); color: var(--text-2); max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-row.center { justify-content: center; }
.hero-meta { margin-top: 14px; font-size: .9rem; color: var(--muted); }

.term {
  margin-top: 28px; background: var(--term-bg); color: var(--term-text);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .06);
  max-width: 640px;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.term-bar i, .frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; flex: none; }
.term-bar i:nth-child(2), .frame-bar i:nth-child(2) { background: #FEBC2E; }
.term-bar i:nth-child(3), .frame-bar i:nth-child(3) { background: #28C840; }
.term-bar span { margin-left: 8px; font-size: .78rem; color: #A9A3C4; font-family: var(--mono); }
.term-body { position: relative; display: flex; align-items: flex-start; }
.term-body pre { flex: 1; min-width: 0; }
.term pre, .code-block pre {
  margin: 0; padding: 16px 18px; overflow-x: auto; font-size: .86rem; line-height: 1.7;
  white-space: pre; tab-size: 2; scrollbar-width: thin;
}
.term pre { padding-right: 18px; }
@media (max-width: 900px) {
  .term pre, .code-block pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
.tc { color: #8F88AE; }
.tp { color: #FF7AB9; user-select: none; }

.copy {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 .78rem/1 var(--font); color: #E9E6F5; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14); padding: 7px 11px; border-radius: 8px; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.copy:hover { background: rgba(255, 255, 255, .16); }
.copy.copied { background: #1FBF75; border-color: #1FBF75; color: #0A2618; }

.hero-shot { position: relative; min-width: 0; }
.hero-tilt { position: relative; }


.hero-shot { width: 100%; }
@media (min-width: 1024px) {
  .hero { padding: 64px 0 56px; }
  .hero-in { grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); gap: 48px; }
  .hero h1 { font-size: clamp(2.2rem, .6rem + 2.4vw, 3.6rem); }
  .hero .lead { font-size: 1.08rem; }
  .hero .cta-row { gap: 10px; flex-wrap: nowrap; }
  .hero .cta-row .btn-lg { padding: .74em 1em; font-size: .98rem; white-space: nowrap; }
}
/* On wide screens the frame bleeds past the right edge; .hero clips it. */
@media (min-width: 1280px) {
  .hero-shot { width: calc(100% + 64px); }
}
@media (min-width: 1600px) { .hero-shot { width: calc(100% + 140px); } }

.logos {
  list-style: none; padding: 0; margin: 64px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.logos li {
  font-size: .86rem; font-weight: 600; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); padding: 6px 13px; border-radius: 999px;
}

/* ---------- frames ---------- */
.shot {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in;
  text-align: left; color: inherit; font: inherit; border-radius: 16px;
}
.frame {
  display: block; position: relative; overflow: hidden; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.frame-bar {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.frame-url {
  margin-left: 12px; flex: 1; min-width: 0; max-width: 340px; height: 22px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font: 500 .72rem/20px var(--mono); padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; background: var(--surface-2); }
.shot:hover .frame { box-shadow: 0 40px 90px -24px rgba(108, 71, 255, .45), 0 8px 24px -8px rgba(30, 26, 52, .2); }
.frame-term img { aspect-ratio: auto; object-fit: contain; background: #15122A; }
.frame-term .frame-bar { background: #241F3D; border-color: #2E2850; }
.frame-term .frame-url { background: #15122A; border-color: #2E2850; color: #A9A3C4; }

.theme-dark-only { display: none !important; }
:root[data-theme="dark"] .theme-dark-only { display: block !important; }
:root[data-theme="dark"] .theme-light-only { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark-only { display: block !important; }
  :root:not([data-theme="light"]) .theme-light-only { display: none !important; }
}

/* ---------- sections ---------- */
.section { padding: 80px 0; position: relative; }
@media (min-width: 1024px) { .section { padding: 112px 0; } }
.sec-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.sec-head h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 800; margin: 10px 0 14px; }
.sec-head p { color: var(--text-2); font-size: 1.08rem; }
.kicker {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* architecture */
.arch-sec { background: var(--bg-soft); border-block: 1px solid var(--border); overflow: hidden; }
.arch-fig { margin: 0 auto; max-width: 1100px; }
.arch { display: block; width: 100%; height: auto; font-family: var(--font); }
.arch-narrow { display: none; max-width: 440px; margin: 0 auto; }
@media (max-width: 719px) { .arch-wide { display: none; } .arch-narrow { display: block; } }
.arch .flow { fill: none; stroke: var(--flow); stroke-width: 1.6; stroke-dasharray: 5 7; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.arch .node rect { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.arch .dst rect { stroke: var(--accent-2); stroke-opacity: .45; stroke-width: 1.4; }
.arch .dot { fill: var(--pink); }
.arch .lbl { fill: var(--text); font-size: 13.5px; font-weight: 600; }
.arch .sub { fill: var(--muted); font-size: 11px; font-weight: 500; }
.arch-narrow .lbl { font-size: 12.5px; }
.arch .dst .lbl { font-size: 15px; }
.arch-narrow .dst .lbl { font-size: 12.5px; }
.arch .mlogo { fill: var(--pink); }
.arch .hub-halo { fill: var(--halo); animation: halo 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { opacity: .35; transform: scale(1.02); } }
.arch .hub-t { fill: #fff; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.arch-narrow .hub-t { font-size: 26px; }
.arch .hub-s { fill: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 500; }
.arch .chips rect { fill: rgba(255, 255, 255, .18); stroke: rgba(255, 255, 255, .3); }
.arch .chips text { fill: #fff; font-size: 12px; font-weight: 600; }

.steps3 { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 16px; }
@media (min-width: 860px) { .steps3 { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.steps3 li { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.steps3 .n { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-strong); color: #fff; font-weight: 800; }
.steps3 h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps3 p { color: var(--text-2); font-size: .97rem; }

/* features */
.fgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.fcard {
  position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.fcard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.fcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.fcard:hover::before { transform: scaleX(1); }
.ficon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); margin-bottom: 18px; }
.ficon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.fcard h3 { font-size: 1.14rem; margin-bottom: 8px; }
.fcard p { color: var(--text-2); font-size: .97rem; }

/* tour */
.tour-sec { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 18%, var(--bg-soft) 82%, var(--bg) 100%); }
.tour { position: relative; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.tour > *, .tour-step, .tour-text, .tour-inline { min-width: 0; }
.tour-step { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm); }
.tour-n { font: 600 .78rem/1 var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.tour-step h3 { font-size: 1.35rem; margin-bottom: 8px; }
.tour-step p:not(.tour-n) { color: var(--text-2); }
.tour-inline { margin-top: 20px; }
.tour-inline .frame { box-shadow: var(--shadow); }
.tour-stage { display: none; }

@media (min-width: 1080px) {
  .tour { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 56px; }
  .tour-steps { gap: 0; padding: 4vh 0 12vh; }
  .tour-step {
    min-height: 62vh; display: flex; align-items: center; background: none; border: 0; box-shadow: none; padding: 0 0 0 26px;
    position: relative; opacity: .38; transition: opacity .4s ease;
  }
  .tour-step::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--border); transition: background .4s; }
  .tour-step.is-active { opacity: 1; }
  .tour-step.is-active::before { background: var(--grad); }
  .tour-step h3 { font-size: 1.7rem; }
  .tour-step p:not(.tour-n) { font-size: 1.06rem; }
  .tour-inline { display: none; }
  .tour-stage { display: block; position: relative; }
  .tour-sticky { position: sticky; top: calc(50vh - min(28vw, 360px) + 10px); padding-bottom: 4vh; }
  .tour-imgs { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
  .tour-img {
    position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%;
    opacity: 0; transform: scale(1.04) translateY(14px); transition: opacity .55s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
    pointer-events: none;
  }
  .tour-img.is-active { opacity: 1; transform: none; pointer-events: auto; }
  .tour-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
  .tour-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
  .tour-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--border-strong); transition: width .3s, background .3s; }
  .tour-dots span.on { width: 26px; background: var(--grad); }
}

/* gallery */
.gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.g-item { margin: 0; min-width: 0; }
.g-item figcaption, .phone-item figcaption { margin-top: 12px; font-weight: 600; font-size: .95rem; color: var(--text-2); text-align: center; }
.g-item .frame { box-shadow: var(--shadow); }
.g-item .shot:hover .frame, .phone-item .shot:hover .phone { transform: translateY(-5px); }
@media (min-width: 760px) { .g-wide { grid-column: 1 / -1; } .g-wide .shot { max-width: 980px; margin: 0 auto; } }
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 64px; }
@media (min-width: 900px) { .phones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.phone-item { margin: 0; min-width: 0; }
.phone-item .shot { max-width: 250px; margin: 0 auto; border-radius: 40px; }
.phone {
  display: block; position: relative; padding: 7px; border-radius: 34px; background: #0D0B16;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #2B2640; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
/* The screen keeps the capture's own aspect ratio: the image always fills it by width,
   so nothing is cropped left or right whatever size the screenshots are. A status bar
   strip above it holds the dynamic island, so the notch never covers the app header. */
.phone-screen { display: block; overflow: hidden; border-radius: 27px; background: #fff; }
.phone-status { display: flex; align-items: center; justify-content: space-between; height: 0; padding: 0 9%; padding-top: 9%; position: relative; background: #fff; }
.phone-status::before { content: "9:41"; position: absolute; left: 10%; top: 50%; transform: translateY(-50%); font: 700 10px/1 var(--font); color: #111; }
.phone-status::after { content: ""; position: absolute; right: 10%; top: 50%; width: 18px; height: 8px; margin-top: -4px; border-radius: 2px; border: 1.5px solid #111; box-sizing: border-box; }
.phone-island { position: absolute; left: 50%; top: 50%; width: 30%; height: 44%; transform: translate(-50%, -50%); background: #0D0B16; border-radius: 99px; }
.phone img { display: block; width: 100%; height: auto; object-fit: cover; object-position: top center; background: #fff; }

/* performance */
.perf-sec { background: var(--bg-soft); border-block: 1px solid var(--border); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px 22px; box-shadow: var(--shadow-sm); text-align: center; }
.stat-n {
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.05;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
:root[data-theme="dark"] .stat-n { background-image: linear-gradient(100deg, #FF7AB9, #FF6A7C 45%, #A48BFF); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat-n { background-image: linear-gradient(100deg, #FF7AB9, #FF6A7C 45%, #A48BFF); } }
.stat-l { margin-top: 10px; font-weight: 700; }
.stat-s { margin-top: 4px; font-size: .86rem; color: var(--muted); }
@media (max-width: 400px) { .stat { padding: 20px 12px; } .stat-n { font-size: 1.75rem; } }
.perf-notes { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.perf-notes .checks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px 28px; width: 100%; }
.checks li { position: relative; padding-left: 30px; color: var(--text-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 19px; height: 19px; border-radius: 50%;
  background: var(--grad-strong) center / 11px no-repeat;
  -webkit-mask: none;
}
.checks li::after {
  content: ""; position: absolute; left: 6px; top: calc(.28em + 5px); width: 7px; height: 4px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}

/* security */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.split > * { min-width: 0; }
@media (min-width: 1080px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; } }
.sec-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.sitem { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.sitem h3 { font-size: 1.04rem; margin-bottom: 6px; }
.sitem p { color: var(--text-2); font-size: .95rem; }
.sec-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 1080px) { .sec-side { position: sticky; top: 96px; } }
.cli-card { padding: 24px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.cli-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.cli-card > p { color: var(--text-2); font-size: .97rem; margin-bottom: 16px; }

.code-block { position: relative; display: flex; align-items: flex-start; background: var(--term-bg); color: var(--term-text); border-radius: 12px; border: 1px solid rgba(255, 255, 255, .06); }
.code-block pre { flex: 1; min-width: 0; padding-right: 12px; }
.code-block .copy, .term-body .copy { position: static; flex: none; margin: 10px 10px 0 0; }

/* MCP */
.mcp-sec { background: radial-gradient(120% 90% at 100% 0%, #3A1E66 0%, #1E1A34 55%, #15112A 100%); color: #F5F3FB; overflow: hidden; }
.mcp-glow { position: absolute; width: min(640px, 70%); aspect-ratio: 1; left: 0; bottom: -320px; border-radius: 50%; background: #FF5CAA; filter: blur(110px); opacity: .22; pointer-events: none; }
.mcp-sec .wrap { position: relative; }
.mcp-copy h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.7rem); font-weight: 800; margin: 10px 0 16px; }
.mcp-copy > p { color: #D3CEE6; font-size: 1.06rem; margin-bottom: 20px; }
.mcp-sec :not(pre) > code { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; }
.kicker-on-dark { color: #FF9ACB; }
.checks-on-dark li { color: #E2DEF0; }
.term-dark { max-width: none; background: rgba(8, 6, 18, .7); }
.mcp-shot .frame { border-color: rgba(255, 255, 255, .1); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .05); }
.mcp-shot .frame-bar { background: #2A2448; border-color: #353056; }
.mcp-shot .frame-url { background: #1E1A34; border-color: #353056; color: #ACA6C6; }
.mcp-sec a:focus-visible, .mcp-sec button:focus-visible { outline-color: #FF9ACB; }
@media (min-width: 1080px) { .split-rev { align-items: center; } }

/* tabs */
.tabs { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.tablist { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); overflow-x: auto; }
.tablist [role="tab"] {
  flex: 1 1 auto; white-space: nowrap; font: 600 .95rem/1 var(--font); color: var(--text-2); background: none; border: 0;
  padding: 12px 14px; border-radius: 11px; cursor: pointer; transition: background-color .2s, color .2s;
}
.tablist [role="tab"]:hover { color: var(--text); background: var(--surface); }
.tablist [role="tab"][aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 -2px 0 var(--accent); }
.tabpanel { padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tabpanel[hidden] { display: none; }
.tab-note { color: var(--text-2); font-size: .97rem; }
@media (min-width: 768px) { .tabpanel { padding: 28px; } }

/* download */
.dl-sec { overflow: hidden; }
.dl-sec::before {
  content: ""; position: absolute; inset: 20% 0 auto; height: 60%; background: var(--grad); opacity: .08; filter: blur(80px); pointer-events: none; z-index: -1;
}
.dl-extra { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.dl-extra > * { min-width: 0; }
@media (min-width: 860px) { .dl-extra { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
.dl-extra { margin-top: 26px; }
.dl-extra h3 { font-size: 1.02rem; margin-bottom: 10px; }
.dl-extra .small { margin-bottom: 10px; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 600; font-size: 1.04rem; position: relative; border-radius: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 22px 20px; color: var(--text-2); }

/* final CTA */
.final-cta { padding: 0 0 96px; }
.final-in {
  text-align: center; color: #fff; border-radius: 28px; padding: 56px 22px; position: relative; overflow: hidden;
  background: radial-gradient(80% 120% at 0% 0%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(120deg, #C81E6C 0%, #B42A5E 35%, #5634E6 100%);
  box-shadow: 0 40px 90px -30px rgba(108, 71, 255, .55);
}
.final-in h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem); font-weight: 800; }
.final-in p { margin-top: 10px; font-size: 1.1rem; color: rgba(255, 255, 255, .95); }
.final-in .btn:focus-visible { outline-color: #fff; }

/* footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 56px 0 28px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 860px) { .foot-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); } }
.foot-brand p { color: var(--text-2); margin-top: 12px; max-width: 30em; font-size: .97rem; }
.foot-brand .small { color: var(--muted); }
.foot-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.foot-cols h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-cols a { color: var(--text-2); text-decoration: none; font-size: .95rem; }
.foot-cols a:hover { color: var(--accent); text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }


/* download cards */
.ver-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px; border-radius: 999px;
  background: var(--violet-soft); border: 1px solid var(--border-strong); color: var(--accent-2);
  font: 600 .86rem/1.2 var(--mono); text-decoration: none;
}
.ver-pill:hover { color: var(--accent); border-color: var(--accent-2); }
.ver-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.ver-pill.live .ver-dot { background: #1FBF75; box-shadow: 0 0 0 3px rgba(31, 191, 117, .2); }
.dl-mobile { max-width: 760px; margin: -16px auto 28px; color: var(--text-2); font-size: .97rem; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.dl-mobile[hidden] { display: none; }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 8px; }
@media (min-width: 900px) { .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.dl-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 34px 22px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: border-color .25s, box-shadow .25s, transform .25s;
}
.dl-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.dl-card.highlighted {
  border-color: transparent; box-shadow: var(--shadow-lg);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  border-width: 2px;
}
.os-badge {
  display: none; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--grad-strong); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(108, 71, 255, .6);
}
.dl-card.highlighted .os-badge { display: block; }
.platform-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, var(--accent-soft), var(--violet-soft)); margin-bottom: 14px; }
.platform-icon svg { width: 34px; height: 34px; fill: var(--text); }
.platform-icon .tux-body { fill: var(--text); }
.platform-icon .tux-belly, .platform-icon .tux-eye { fill: #fff; }
.platform-icon .tux-pupil { fill: #1E1A34; }
.platform-icon .tux-beak { fill: #F5A524; }
:root[data-theme="dark"] .platform-icon .tux-body { fill: #0B0916; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .platform-icon .tux-body { fill: #0B0916; } }
.dl-card h3 { font-size: 1.2rem; margin-bottom: 16px; }
.dl-primary { width: 100%; justify-content: center; padding: .8em 1em; }
.btn-text { display: grid; text-align: left; line-height: 1.2; min-width: 0; }
.btn-title { font-weight: 700; font-size: 1rem; }
.btn-sub { font-size: .78rem; font-weight: 500; opacity: .92; }
.dl-matrix { width: 100%; display: grid; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.matrix-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; text-align: left; }
.row-label { font-size: .86rem; color: var(--muted); font-weight: 600; }
.row-val { font-size: .84rem; color: var(--text-2); text-align: right; }
.pill-group { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 8px; font-size: .8rem; font-weight: 700;
  color: var(--accent-2); background: var(--violet-soft); border: 1px solid transparent; text-decoration: none;
  transition: background-color .15s, color .15s, transform .15s, border-color .15s;
}
.pill:hover { color: #fff; background: var(--accent-2); transform: translateY(-1px); }
:root[data-theme="dark"] .pill:hover { color: #15112A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill:hover { color: #15112A; } }
.pill.is-rec { border-color: var(--accent-2); }
.dl-mini { min-width: 0; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.dl-mini h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dl-foot { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: center; margin-top: 30px; }
.btn-ghost svg, .btn-primary svg { fill: none; }
.gs-foot { margin-top: 30px; text-align: center; }
.gs-foot > p { color: var(--text-2); max-width: 36em; margin: 0 auto; }
.gs-foot .cta-row { margin-top: 18px; }
.nav-links .nav-docs { color: var(--text); font-weight: 600; }

/* ---------- reveal animations ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s ease, transform .85s cubic-bezier(.2, .7, .2, 1); }
html.js .reveal-zoom { transform: translateY(20px) scale(.94); }
html.js .reveal-right { transform: translateX(36px); }
html.js .reveal.in { opacity: 1; transform: none; }
.fgrid .reveal:nth-child(3n+2), .stats .reveal:nth-child(2), .gallery .reveal:nth-child(3n+2), .phones .reveal:nth-child(2), .steps3 .reveal:nth-child(2) { transition-delay: .08s; }
.fgrid .reveal:nth-child(3n), .stats .reveal:nth-child(3), .gallery .reveal:nth-child(3n), .phones .reveal:nth-child(3), .steps3 .reveal:nth-child(3) { transition-delay: .16s; }
.stats .reveal:nth-child(4), .phones .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(11, 9, 22, .94); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(11, 9, 22, .6); }
.lightbox[open] { display: block; animation: lbIn .25s ease; }
@keyframes lbIn { from { opacity: 0; } }
.lb-inner { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px 16px 24px; touch-action: pan-y; }
.lb-fig { margin: 0; display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 100%; min-width: 0; }
.lb-fig img { max-width: min(100%, 1800px); max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); background: #fff; transition: opacity .2s, transform .25s; }
.lb-fig img.swap { opacity: 0; transform: scale(.98); }
.lb-fig figcaption { max-width: 820px; text-align: center; color: #E2DEF0; font-size: .95rem; padding: 0 8px; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #fff; cursor: pointer; transition: background-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn:focus-visible { outline: 3px solid #FF9ACB; outline-offset: 2px; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 12px; right: 12px; }
.lb-actual-btn { top: 12px; right: 68px; width: auto; padding: 0 14px; border-radius: 23px; font: 600 .82rem/1 var(--font); gap: 6px; display: inline-flex; align-items: center; }
.lightbox.actual .lb-inner { overflow: auto; place-items: start; padding: 64px 16px 24px; touch-action: auto; }
.lightbox.actual .lb-fig { width: max-content; max-width: none; }
.lightbox.actual .lb-fig img { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox:not(.actual) .lb-fig img { cursor: zoom-in; }
.lightbox.actual .lb-fig figcaption { display: none; }
.lb-prev { left: 12px; top: 50%; margin-top: -23px; }
.lb-next { right: 12px; top: 50%; margin-top: -23px; }
.lb-count { position: absolute; top: 24px; left: 20px; font: 500 .85rem var(--mono); color: #B9B3D3; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: 14px; margin: 0; }
  .lb-inner { padding-bottom: 76px; }
  .lb-fig img { max-height: calc(100vh - 210px); }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow); transition: opacity .2s, transform .2s; z-index: 80; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- live dashboard replica (hero) ---------- */
/* Designed at 1280x800 and scaled as one unit by hero.js (--s), so it looks
   like the real app at any size. */
.hero-frame { box-shadow: var(--shadow-lg); }
.hero-frame .frame-bar { position: relative; }
.app-vp { position: relative; width: 100%; aspect-ratio: 1280 / 800; overflow: hidden; }
.app {
  --s: .5;
  --a-bg: #FCF8FC; --a-side: #FFFFFF; --a-card: #FFFFFF; --a-line: #EEE8F3; --a-line2: #E4DCEC;
  --a-text: #1E1A34; --a-text2: #3F3A5C; --a-muted: #6E6887; --a-hover: #F7F2FA;
  --a-green: #1FAE5B; --a-green-bg: #E5F6EC; --a-violet: #6C47FF; --a-violet-bg: #EEEAFF;
  --a-amber: #B26A00; --a-amber-bg: #FFF2DB; --a-red: #E5304F; --a-red-bg: #FFF0F2; --a-gray-bg: #F1EEF5;
  --a-chart: 255, 92, 170; --a-grid: rgba(120, 110, 150, .16); --a-axis: #8A84A1;
  position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform: scale(var(--s)); transform-origin: 0 0;
  background: var(--a-bg); color: var(--a-text); font-family: var(--font); font-size: 14px; line-height: 1.35; text-align: left;
  -webkit-user-select: none; user-select: none;
}
:root[data-theme="dark"] .app {
  --a-bg: #170F26; --a-side: #170F26; --a-card: #1F1533; --a-line: #2E2347; --a-line2: #3A2E58;
  --a-text: #F4F1FB; --a-text2: #D4CEE6; --a-muted: #A79FC2; --a-hover: #241A3B;
  --a-green: #34D683; --a-green-bg: rgba(52, 214, 131, .14); --a-violet: #A994FF; --a-violet-bg: rgba(169, 148, 255, .16);
  --a-amber: #FFC25C; --a-amber-bg: rgba(255, 194, 92, .14); --a-red: #FF5C78; --a-red-bg: rgba(255, 92, 120, .09); --a-gray-bg: #2B2142;
  --a-chart: 255, 92, 170; --a-grid: rgba(200, 190, 230, .10); --a-axis: #9D96B8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app {
    --a-bg: #170F26; --a-side: #170F26; --a-card: #1F1533; --a-line: #2E2347; --a-line2: #3A2E58;
    --a-text: #F4F1FB; --a-text2: #D4CEE6; --a-muted: #A79FC2; --a-hover: #241A3B;
    --a-green: #34D683; --a-green-bg: rgba(52, 214, 131, .14); --a-violet: #A994FF; --a-violet-bg: rgba(169, 148, 255, .16);
    --a-amber: #FFC25C; --a-amber-bg: rgba(255, 194, 92, .14); --a-red: #FF5C78; --a-red-bg: rgba(255, 92, 120, .09); --a-gray-bg: #2B2142;
    --a-chart: 255, 92, 170; --a-grid: rgba(200, 190, 230, .10); --a-axis: #9D96B8;
  }
}
.app .num { font-variant-numeric: tabular-nums; }
.app svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-in { display: flex; height: 100%; }

.app-side { flex: none; width: 220px; background: var(--a-side); border-right: 1px solid var(--a-line); padding: 16px 12px 12px; display: flex; flex-direction: column; }
.a-logo { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.a-logo b { display: block; font-size: 15px; font-weight: 600; }
.a-logo small { display: block; font-size: 11.5px; color: var(--a-muted); }
.a-mark { font: 900 italic 22px/1 var(--font); letter-spacing: -3px; color: #F0306E; }
.a-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.a-nav li { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--a-text2); font-weight: 500; font-size: 14px; border: 1px solid transparent; }
.a-nav li svg { width: 18px; height: 18px; flex: none; color: var(--a-text2); }
.a-nav li.on { background: var(--a-card); border-color: var(--a-line2); color: var(--a-text); font-weight: 600; box-shadow: 0 1px 3px rgba(30, 26, 52, .06); }
.a-nav li.on svg { color: #E0287E; }
.a-nav .nl { flex: 1; white-space: nowrap; }
.cnt { min-width: 24px; padding: 2px 7px; border-radius: 99px; background: var(--a-gray-bg); color: var(--a-text2); font-size: 11.5px; font-weight: 600; text-align: center; }
.cnt-red { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #F0476A; color: #fff; font-size: 11.5px; font-weight: 700; box-shadow: 0 0 0 4px rgba(240, 71, 106, .15); }
.cnt-red.pop, .k-v.pop { animation: aPop .5s ease; }
.hdots { display: inline-flex; gap: 4px; }
.hdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--a-green); transition: background-color .3s; }
.hdots i.down { background: var(--a-red); }
.a-bottom { margin-top: auto; display: grid; gap: 8px; }
.a-new { display: flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: 10px; color: #fff; font-weight: 600; font-size: 13.5px; background: linear-gradient(100deg, #E0287E, #8B3FD9); }
.a-new svg { width: 15px; height: 15px; stroke-width: 2.2; }
.a-collapse { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--a-text2); height: 28px; }
.a-collapse svg { width: 14px; height: 14px; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-top { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--a-line); }
.crumb { font-size: 14px; color: var(--a-text2); }
.top-r { display: flex; align-items: center; gap: 10px; }
.sw { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--a-line2); background: var(--a-card); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.sw svg { width: 13px; height: 13px; }
.sw i, .dcard i.ok { width: 9px; height: 9px; border-radius: 50%; background: var(--a-green); box-shadow: 0 0 0 3px var(--a-green-bg); }
.sw em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--a-green); background: var(--a-green-bg); padding: 3px 7px; border-radius: 7px; }
.top-ic svg { width: 18px; height: 18px; color: var(--a-text2); }
.top-ic .t-moon { display: none; }
:root[data-theme="dark"] .top-ic .t-moon { display: block; }
:root[data-theme="dark"] .top-ic .t-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top-ic .t-moon { display: block; } :root:not([data-theme="light"]) .top-ic .t-sun { display: none; } }
.who { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--a-line2); background: var(--a-card); }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 700; background: linear-gradient(135deg, #FF5CAA, #FF4E62); }
.who b { display: block; font-size: 12.5px; }
.who small { display: block; font-size: 10.5px; color: var(--a-muted); }
.who svg { width: 13px; height: 13px; }

.app-content { flex: 1; padding: 22px 24px 0; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; }
.page-h h4 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.page-h p { margin-top: 6px; font-size: 13.5px; color: var(--a-text2); }
.page-act { display: flex; gap: 8px; }
.pbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--a-line2); background: var(--a-card); font-weight: 600; font-size: 13px; }
.pbtn svg { width: 15px; height: 15px; }
.pbtn-p { border-color: transparent; color: #fff; background: linear-gradient(100deg, #E0287E, #9B3FD0); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; height: 128px; background: var(--a-card); border: 1px solid var(--a-line); border-radius: 14px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: border-color .3s, box-shadow .3s; }
.k-h { display: flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--a-text2); white-space: nowrap; }
.k-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #FF5CAA, #FF4E62); flex: none; }
.k-ic svg { width: 14px; height: 14px; stroke-width: 2.2; }
.k-ic-v { background: linear-gradient(135deg, #8B6BFF, #6C47FF); }
.k-ic-r { background: linear-gradient(135deg, #FF4E62, #E0287E); }
.k-red { width: 8px; height: 8px; border-radius: 50%; background: var(--a-red); margin-left: auto; }
.k-v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; transform-origin: left center; }
.k-v small { font-size: 15px; font-weight: 500; color: var(--a-muted); margin-left: 4px; }
.k-s { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--a-muted); white-space: nowrap; overflow: hidden; }
.dot-g { width: 7px; height: 7px; border-radius: 50%; background: var(--a-green); }
.sbar { display: flex; height: 6px; border-radius: 9px; overflow: hidden; background: var(--a-gray-bg); gap: 2px; margin-top: 2px; }
.sbar i { transition: flex .6s ease; }
.sb-s { background: var(--a-green); } .sb-n { background: var(--a-violet); } .sb-p { background: var(--a-amber); }
.kpi.alarm { border-color: rgba(229, 48, 79, .45); }
.kpi.alarm.flash { box-shadow: 0 0 0 4px var(--a-red-bg), 0 0 0 1px var(--a-red); }
.kpi.warn { box-shadow: 0 0 0 4px var(--a-amber-bg); border-color: var(--a-amber); }
@keyframes aPop { 40% { transform: scale(1.18); } }

.dests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dcard { height: 96px; background: var(--a-card); border: 1px solid var(--a-line); border-radius: 14px; padding: 13px 16px; transition: border-color .4s, background-color .4s; overflow: hidden; }
.dcard b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.dcard em { font-style: normal; font-size: 11.5px; font-weight: 600; color: #E0287E; background: rgba(255, 92, 170, .12); padding: 2px 8px; border-radius: 7px; }
.dcard small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--a-text2); }
.dcard strong { font-weight: 700; margin-left: 8px; }
.d-err { display: none !important; color: var(--a-red) !important; line-height: 1.45; font-size: 11.5px !important; }
.dcard.down { border-color: var(--a-red); background: var(--a-red-bg); }
.dcard.down i.ok { background: var(--a-red); box-shadow: 0 0 0 3px rgba(229, 48, 79, .18); animation: aBlink 1s ease-in-out infinite; }
.dcard.down .d-okv { display: none; }
.dcard.down .d-err { display: block !important; }
@keyframes aBlink { 50% { opacity: .4; } }

.bottom { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 14px; height: 300px; }
.acard { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 14px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.ac-h { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--a-line); flex: none; }
.ac-h svg { width: 17px; height: 17px; color: var(--a-text2); }
.ac-h b { font-size: 15px; font-weight: 600; }
.ac-h small { margin-left: auto; font-size: 12.5px; color: var(--a-muted); }
.chart-wrap { position: relative; flex: 1; min-height: 0; }
#app-chart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.feed { list-style: none; margin: 0; padding: 0 16px; overflow: hidden; flex: 1; }
.feed li { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--a-line); font-size: 12.5px; animation: aFeedIn .5s ease; }
.feed li span { min-width: 0; }
.feed li small { display: block; color: var(--a-muted); font-size: 11.5px; margin-top: 2px; }
.feed code { font: 600 11px var(--mono); color: var(--a-text2); margin-right: 6px; }
.fd { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.fd-v { background: var(--a-violet); } .fd-g { background: var(--a-green); } .fd-r { background: var(--a-red); } .fd-a { background: #F5B400; } .fd-p { background: #FF5CAA; }
@keyframes aFeedIn { from { opacity: 0; transform: translateY(-12px); } }
.pipes-h { margin: 6px 0 0; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; }
.pipes-h small { font-size: 12.5px; color: var(--a-text2); font-weight: 500; }

.app-toast {
  position: absolute; right: 22px; bottom: 22px; display: flex; gap: 11px; align-items: flex-start; width: 340px;
  padding: 13px 16px; border-radius: 12px; background: var(--a-card); color: var(--a-text); border: 1px solid var(--a-line2);
  box-shadow: 0 18px 40px -12px rgba(20, 10, 40, .4); border-left: 4px solid var(--a-red);
  opacity: 0; transform: translateY(18px); transition: opacity .35s, transform .45s cubic-bezier(.2, .7, .2, 1); pointer-events: none;
}
.app-toast.show { opacity: 1; transform: none; }
.app-toast.ok { border-left-color: var(--a-green); }
.app-toast > i { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--a-red); }
.app-toast.ok > i { background: var(--a-green); }
.app-toast b { display: block; font-size: 13.5px; }
.app-toast small { display: block; font-size: 12px; color: var(--a-muted); margin-top: 3px; }

/* caption chip lives in the (unscaled) browser bar, outside the data */
.app-cap {
  position: absolute; right: 10px; top: 50%; display: inline-flex; align-items: center; gap: 6px; max-width: 55%;
  padding: 3px 11px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #fff; background: linear-gradient(120deg, #C81E6C, #6C47FF); box-shadow: 0 6px 18px -6px rgba(108, 71, 255, .6);
  opacity: 0; transform: translate(10px, -50%); transition: opacity .35s, transform .45s cubic-bezier(.2, .7, .2, 1);
}
.app-cap.show { opacity: 1; transform: translate(0, -50%); }
.app-cap .spark-ic { font-size: .66rem; }
@media (max-width: 480px) { .hero-frame .frame-url { max-width: 40%; } .app-cap { max-width: 62%; font-size: .68rem; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .arch .pkt { display: none; }
  .arch .flow { animation: none; }
}

