*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:      #12142b;
  --ink-2:    #1b1d36;
  --soft:     #5d6b86;
  --muted:    #707790;
  --glass:    rgba(255,255,255,.72);
  --glass-bd: rgba(255,255,255,.95);
  --shadow:   0 10px 40px rgba(104,116,200,.14);
  --r-xl:     clamp(26px, 3.4vw, 56px);
  --r-lg:     clamp(16px, 1.6vw, 26px);
  --h1:       clamp(22px, min(3.2vw, 5vh), 56px);
  --h3:       clamp(13px, min(1.5vw, 2.3vh), 22px);
  --small:    clamp(11px, min(1vw, 1.7vh), 15px);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(60% 50% at 88% 6%,  #fbeedd 0%, rgba(251,238,221,0) 70%),
    radial-gradient(55% 55% at 6% 12%,  #b4bde9 0%, rgba(180,189,233,0) 70%),
    radial-gradient(60% 60% at 92% 95%, #aab8ee 0%, rgba(170,184,238,0) 70%),
    radial-gradient(50% 40% at 40% 100%, #c9c4e4 0%, rgba(201,196,228,0) 70%),
    #d2d3ee;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
svg { display: block; }
a { color: inherit; }

.bg-lines { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bg-lines path { fill: none; stroke: rgba(92,150,220,.45); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ── SHELL ─────────────────────────────────────────────────────────── */
.shell {
  position: fixed;
  inset: clamp(10px, 3.5vh, 54px) clamp(10px, 5.6vw, 112px);
  display: flex;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(200,205,240,.35));
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 40px 90px rgba(88,98,170,.28);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

/* ── RAIL ──────────────────────────────────────────────────────────── */
.rail {
  position: relative; z-index: 10;
  width: clamp(58px, 6.6vw, 114px);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: clamp(14px, 3.2vh, 48px) 0;
  flex-shrink: 0;
}
.rail-nav { display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 18px); }

.rail-btn {
  --s: clamp(36px, min(3.2vw, 6vh), 56px);
  position: relative;
  width: var(--s); height: var(--s); border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.8);
  box-shadow: 0 4px 14px rgba(104,116,200,.12);
  color: #404868;
  transition: transform .2s, background .2s, color .2s;
}
.rail-btn svg, .send svg, .cta svg, .acc-q svg, .meta-l svg, .answer-x svg {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.rail-btn svg { width: 44%; height: 44%; }
.rail-btn:hover { transform: translateY(-2px); }
.rail-btn.active { background: var(--ink); color: #fff; }

.rail-btn::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%);
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5;
}
.rail-btn:hover::after { opacity: 1; transform: translate(0, -50%); }

.rail-logo {
  --s: clamp(36px, min(3.2vw, 6vh), 56px);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: calc(var(--s) * .42);
}

/* ── PANEL ─────────────────────────────────────────────────────────── */
.panel {
  flex: 1; min-width: 0; min-height: 0;
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    radial-gradient(45% 40% at 85% 0%,   rgba(251,236,214,.85) 0%, rgba(251,236,214,0) 70%),
    radial-gradient(40% 55% at 100% 70%, rgba(176,191,244,.75) 0%, rgba(176,191,244,0) 70%),
    radial-gradient(40% 40% at 0% 30%,   rgba(206,214,247,.7) 0%, rgba(206,214,247,0) 70%),
    linear-gradient(160deg, #ffffff 0%, #f5f7fe 55%, #eef1fc 100%);
  box-shadow: 0 2px 0 rgba(255,255,255,.9) inset;
}

.topbar {
  height: clamp(54px, 11vh, 110px);
  flex-shrink: 0;
  display: grid; grid-template-columns: 1fr; align-items: center;
  padding: 0 clamp(16px, 3vw, 50px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--small); color: #4b5675; }
.brand .logo { height: clamp(22px, 4.2vh, 38px); width: auto; display: block; }

/* ── SCREENS ───────────────────────────────────────────────────────── */
.screens { position: relative; flex: 1; min-height: 0; }
.screen {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s .35s;
}
.screen.active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.soft { color: var(--soft); }
.grid3 { display: grid; grid-template-columns: 2.2fr 1fr 1fr; gap: clamp(10px, 1.5vw, 24px); }

/* ── CARDS ─────────────────────────────────────────────────────────── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(12px, 2.2vh, 30px) clamp(12px, 1.5vw, 26px);
  min-height: 0; min-width: 0;
  display: flex; flex-direction: column;
}
.card h3 { font-weight: 600; font-size: var(--h3); line-height: 1.25; letter-spacing: -.01em; }
.label { margin-top: auto; padding-top: clamp(6px, 1.2vh, 14px); font-size: var(--small); font-weight: 500; color: var(--muted); }

.plat {
  --s: clamp(26px, min(2.9vw, 6.4vh), 54px);
  width: var(--s); height: var(--s); border-radius: 22%;
  display: grid; place-items: center; flex-shrink: 0;
}
.plat img { width: 100%; height: 100%; object-fit: contain; }

.download-card { grid-column: 2 / -1; align-self: start; justify-content: flex-start; gap: clamp(8px, 1.2vh, 14px); padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.download-intro { position: relative; z-index: 1; }
.download-intro h2 { font-size: clamp(16px, 1.5vw, 22px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.download-intro .note { margin-top: 4px; line-height: 1.4; }
.download-grid { position: relative; isolation: isolate; display: grid; gap: clamp(7px, .9vh, 10px); }
.download-grid .download-btn { position: relative; z-index: 1; }
.download-grid .download-btn:first-of-type { background: #fff; }
.download-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0;
  min-height: clamp(46px, 5.4vh, 56px); padding: 8px 16px;
  background: linear-gradient(105deg, rgba(255,255,255,.96), rgba(249,249,255,.82)); border: 1px solid rgba(220,223,245,.9); border-radius: 15px;
  color: var(--ink); font-weight: 650; font-size: clamp(12px, .98vw, 15px); text-align: left;
  box-shadow: 0 5px 15px rgba(104,116,200,.09), inset 0 1px rgba(255,255,255,.95);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.download-btn img { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; }
.download-btn:hover { transform: translateY(-2px); border-color: #b6a1ff; background: linear-gradient(105deg, #fff, #f4f0ff); box-shadow: 0 9px 20px rgba(104,92,200,.16); }
.download-btn:focus-visible, [data-checkout]:focus-visible { outline: 3px solid #8c64ff; outline-offset: 3px; }
.download-notice {
  position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 14px;
  background: var(--ink); color: #fff; box-shadow: 0 8px 28px rgba(18,20,43,.22);
  font-size: 14px; line-height: 1.4; text-align: center;
}
.download-notice[hidden] { display: none; }

/* ── HOME ──────────────────────────────────────────────────────────── */
.home-wrap {
  height: 100%;
  width: min(100%, 1120px); margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 40px) clamp(8px, 1.5vh, 18px);
  display: flex; flex-direction: column; gap: clamp(8px, 1.8vh, 20px);
}

.robot-slot { position: absolute; right: clamp(32px, 4vw, 64px); bottom: calc(100% - 18px); width: clamp(128px, 10vw, 140px); z-index: 0; pointer-events: none; }
.robot { width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(70,80,150,.25)); animation: none; }
.bubble {
  position: absolute; right: 0; bottom: calc(100% - 10px);
  background: #fff; border-radius: 16px; padding: 7px 12px;
  font-size: var(--small); font-weight: 500; line-height: 1.3; color: var(--ink);
  box-shadow: 0 6px 20px rgba(100,110,190,.2);
  white-space: nowrap; z-index: 2;
}
.bubble::before { content: ''; position: absolute; right: 22px; bottom: -4px; width: 8px; height: 8px; transform: rotate(45deg); background: #fff; }

.cards { position: relative; z-index: 1; flex: 1; min-height: 0; grid-template-rows: clamp(100px, 15vh, 158px) minmax(0, 1fr); grid-auto-rows: auto; }
.cards .card { grid-column: 2 / -1; overflow: hidden; }
.cards .download-card { grid-row: 2; overflow: visible; }

.hero-intro { grid-row: 1 / -1; min-width: 0; display: flex; align-items: center; padding: clamp(8px, 1.4vh, 16px) 0; }
.hero-copy { width: 100%; max-width: 480px; min-width: 0; display: flex; flex-direction: column; gap: clamp(12px, 1.8vh, 20px); }
.hero-h { font-size: clamp(32px, min(3.5vw, 5.8vh), 48px); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; }
.grad { background: linear-gradient(100deg, #8038ff, #8c64ff 45%, #a129ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-p { font-size: clamp(14px, 1.2vw, 18px); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.hero-btns { display: flex; flex-wrap: wrap; gap: clamp(8px, .8vw, 12px); margin-top: clamp(2px, .6vh, 8px); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: clamp(12px, 1vw, 14px);
  padding: clamp(10px, 1.5vh, 13px) clamp(14px, 1.4vw, 22px); border-radius: clamp(10px, 1vw, 14px); white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.btn-ghost { background: #fff; border: 1px solid #e6e8f5; box-shadow: 0 4px 14px rgba(104,116,200,.1); }
.btn-ghost:hover { transform: translateY(-2px); }
.btn-ghost svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Floating Ask Myka entry point */
.chat-widget-dock {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end; align-items: center; flex: 0 0 auto;
  min-width: 0; padding: 12px clamp(24px, 3vw, 40px) clamp(24px, 3vh, 36px);
}
.ask-widget {
  position: relative; flex: 0 1 auto; max-width: 100%; min-width: 0;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 54px; padding: 4px 20px 4px 4px;
  color: #24263f; font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.98);
  border-radius: 999px; box-shadow: 0 10px 30px rgba(59,66,128,.2), inset 0 1px rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: transform .2s, box-shadow .2s;
}
.ask-widget:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(59,66,128,.26), inset 0 1px rgba(255,255,255,.9); }
.ask-widget:focus-visible { outline: 3px solid rgba(118,87,243,.35); outline-offset: 4px; }
.ask-robot { position: relative; width: 60px; height: 60px; flex: 0 0 auto; overflow: visible; filter: drop-shadow(0 5px 7px rgba(55,46,130,.2)); animation: robot-pop 2.8s ease-in-out infinite; }
.robot-head { fill: #fff; stroke: #dce2fb; stroke-width: 2; }
.robot-face { fill: #171a38; }
.robot-ear { fill: #cfd7fa; }
.robot-antenna { fill: none; stroke: #dce2fb; stroke-width: 3; stroke-linecap: round; }
.robot-antenna-dot { fill: #ffcb67; }
.robot-eye, .robot-smile { fill: none; stroke: #5ee1ff; stroke-width: 3; stroke-linecap: round; }
@keyframes robot-pop { 0%, 100% { transform: translateY(5px) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }

/* Composer */
.composer-wrap { position: relative; width: 100%; min-height: 0; display: flex; flex: 1; flex-direction: column; gap: 12px; }
.composer-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 clamp(6px, 1vw, 14px) clamp(4px, .8vh, 10px);
  font-size: var(--small); color: var(--muted);
}
.meta-l, .meta-r { display: inline-flex; align-items: center; gap: 8px; }
.meta-l svg { width: 1.3em; height: 1.3em; }
.ring-s { width: 1.6em; height: auto; }

.composer {
  background: rgba(255,255,255,.85); border: 1px solid #fff;
  border-radius: clamp(18px, 2vw, 30px);
  box-shadow: 0 10px 40px rgba(104,116,200,.15);
  padding: clamp(8px, 1.4vh, 16px) clamp(10px, 1.2vw, 18px);
  display: flex; flex-direction: column; gap: clamp(6px, 1.4vh, 16px);
}
.composer-row { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
#chat-input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: calc(var(--small) * 1.1); padding: clamp(4px, 1vh, 10px) 0;
}
#chat-input::placeholder { color: #6e7690; }
.send {
  --s: clamp(32px, min(3.2vw, 6vh), 50px);
  width: var(--s); height: var(--s); border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; transition: transform .2s, opacity .2s;
}
.send svg { width: 46%; height: 46%; }
.send:hover { transform: scale(1.06); }
.send:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Answer bubble */
.answer {
  flex: 1; min-height: 120px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(12px, 2vh, 22px);
  background: rgba(246,248,255,.64); border: 1px solid rgba(255,255,255,.88);
  border-radius: 20px; overscroll-behavior: contain; scroll-behavior: smooth;
}
.answer[hidden] { display: none; }
.answer-turn { display: flex; flex-direction: column; gap: 5px; width: fit-content; max-width: min(88%, 480px); }
.answer-turn.user { align-self: flex-end; align-items: flex-end; }
.answer-turn.assistant { align-self: flex-start; align-items: flex-start; }
.answer-speaker { padding: 0 5px; font-size: 11px; font-weight: 600; color: var(--muted); }
.answer-bubble { padding: 10px 14px; border-radius: 16px; font-size: calc(var(--small) * 1.08); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-turn.user .answer-bubble { color: #fff; background: linear-gradient(125deg, #7657f3, #9b59ee); border-bottom-right-radius: 5px; }
.answer-turn.assistant .answer-bubble { color: var(--ink); background: rgba(255,255,255,.92); border: 1px solid rgba(229,232,247,.86); border-bottom-left-radius: 5px; box-shadow: 0 4px 18px rgba(75,84,145,.08); }
.answer-x { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: rgba(18,20,43,.06); display: grid; place-items: center; transition: background .2s, transform .2s; }
.answer-x:hover { background: rgba(18,20,43,.12); transform: rotate(4deg); }
.answer-x svg { width: 16px; height: 16px; }
.typing { display: inline-flex; gap: 5px; padding: 6px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #99a2c2; animation: dot 1.2s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.7); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Full conversation dialog */
.chat-dialog {
  position: fixed; inset: 0; margin: auto;
  width: min(620px, calc(100vw - 48px));
  height: min(700px, calc(100dvh - 48px));
  min-height: min(360px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px);
  padding: clamp(16px, 2.4vh, 26px); overflow: hidden;
  flex-direction: column; gap: 16px;
  color: var(--ink); background: rgba(247,248,255,.91);
  border: 1px solid rgba(255,255,255,.94); border-radius: clamp(22px, 2.2vw, 32px);
  box-shadow: 0 28px 100px rgba(28,32,77,.32);
  -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
}
.chat-dialog:not([open]) { display: none; }
.chat-dialog[open] { display: flex; animation: chat-open .2s ease-out; }
.chat-dialog::backdrop {
  background: rgba(38,42,83,.24);
  -webkit-backdrop-filter: blur(12px) saturate(1.14); backdrop-filter: blur(12px) saturate(1.14);
}
@keyframes chat-open { from { opacity: 0; transform: scale(.98); } }
.chat-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.chat-dialog-identity { display: flex; align-items: center; gap: 12px; }
.chat-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #7657f3, #aa53ec); font-size: 16px; font-weight: 700; box-shadow: 0 4px 12px rgba(118,87,243,.25); }
.chat-dialog-identity h2 { font-size: 16px; font-weight: 700; }
.chat-dialog-identity p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.chat-mount { display: flex; flex: 1; min-height: 0; }
.chat-mount .composer-wrap { height: 100%; }
.chat-mount .composer-meta { flex: 0 0 auto; padding-bottom: 0; }
.chat-mount .composer { flex: 0 0 auto; }
.chat-mount .chat-privacy { flex: 0 0 auto; text-align: center; }
@supports not ((backdrop-filter: blur(1px))) {
  .chat-dialog::backdrop { background: rgba(38,42,83,.48); }
  .chat-dialog { background: #f7f8ff; }
}

/* ── SECONDARY SCREENS ─────────────────────────────────────────────── */
.inner {
  height: 100%; width: min(100%, 1060px); margin: 0 auto;
  padding: clamp(4px, 2vh, 30px) clamp(14px, 3vw, 40px) clamp(14px, 4vh, 48px);
  display: flex; flex-direction: column; gap: clamp(12px, 3vh, 32px); min-height: 0;
}
.inner.center { align-items: stretch; }
.screen-h { font-size: var(--h1); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; flex-shrink: 0; }

.cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: var(--small);
  padding: clamp(10px, 1.8vh, 18px) clamp(18px, 2vw, 32px); border-radius: 999px;
  box-shadow: 0 10px 26px rgba(18,20,43,.25); transition: transform .2s;
}
.cta:hover { transform: translateY(-2px); }
.cta svg { width: 1.3em; height: 1.3em; }
.cta-sm { margin-top: auto; }

/* How */
#screen-how .inner, #screen-install .inner { gap: clamp(10px, 1.6vh, 18px); }
.guide-subtitle { font-size: 13px; color: var(--muted); line-height: 1.5; }
.guide-tabs { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.guide-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #e4e5f3; border-radius: 999px; background: rgba(255,255,255,.8); font-size: 12px; font-weight: 600; white-space: nowrap; }
.guide-tab .plat { width: 24px; height: 24px; }
.guide-tab.active { background: #ede8ff; border-color: #ad98f2; color: #5036a4; }
.guide-tab:focus-visible, .plat-tab:focus-visible { outline: 3px solid #b6a1ff; outline-offset: 2px; }
.guide-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 12px; }
.guide-scroll .cta { margin-top: 20px; }
.guide-service-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 14px; }
.steps { min-height: 0; grid-template-columns: repeat(3, 1fr); }
.step-number { width: 40px; height: 40px; border-radius: 12px; background: #eee8ff; color: #6b4dce; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.step p { margin-top: clamp(6px, 1.2vh, 12px); font-size: var(--small); line-height: 1.55; color: var(--muted); }
.step h3 { margin-top: clamp(8px, 1.6vh, 20px); }
.step-ico { --s: clamp(36px, min(4.2vw, 8vh), 64px); width: var(--s); height: var(--s); border-radius: 24%; display: grid; place-items: center; }
.step-ico svg { width: 52%; height: 52%; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Install */
.install-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(130px, 17vw, 220px) 1fr; gap: clamp(10px, 1.5vw, 24px); }
.plat-list { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); }
.plat-tab {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--glass); border: 1px solid var(--glass-bd); border-radius: var(--r-lg);
  padding: clamp(6px, 1.2vh, 12px) clamp(10px, 1vw, 16px);
  font-weight: 600; font-size: var(--small); box-shadow: var(--shadow); transition: transform .2s, background .2s, color .2s;
}
.plat-tab:hover { transform: translateX(3px); }
.plat-tab.active { background: var(--ink); color: #fff; }
.plat-tab .plat { --s: clamp(26px, min(2.6vw, 5vh), 40px); }
.code-card { overflow: hidden; }
.setup-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 12px 0 2px; border-radius: calc(var(--r-lg) - 8px);
}
.setup-scroll:focus-visible { outline: 2px solid #c5b6f4; outline-offset: 2px; }
.setup-guide { padding-bottom: clamp(24px, 4vh, 40px); }
.tab-pane { display: none; flex-direction: column; gap: clamp(8px, 1.6vh, 16px); min-height: 0; }
.tab-pane.active { display: flex; }
.setup-guide.active { display: block; }
.setup-guide h3 { font-size: 20px; margin-bottom: 6px; }
.setup-guide .guide-summary { font-size: 13px; }
.setup-steps { padding-left: 22px; margin-top: 14px; }
.setup-steps li { padding: 0 0 14px 4px; }
.setup-steps li::marker { color: #7657cf; font-weight: 700; }
.setup-steps h4 { font-size: 14px; margin-bottom: 4px; }
.code-card .setup-guide p { font-size: 12px; line-height: 1.65; }
.setup-guide p code { color: #55428c; background: #eeeaf8; border-radius: 4px; padding: 1px 4px; overflow-wrap: anywhere; }
.guide-code-title { font-size: 12px; margin: 4px 0 8px; color: var(--soft); }
.setup-guide .code-block { margin-bottom: 18px; padding-top: 36px; }
.setup-note { padding: 12px; border-radius: 12px; background: #efedf8; color: var(--soft); margin-bottom: 14px; }
.tab-pane p { font-size: var(--small); line-height: 1.6; color: var(--soft); }
.tab-pane b { color: var(--ink); font-weight: 600; }
.tab-pane .download-btn { align-self: flex-start; width: auto; margin-top: 4px; }
.code-block { position: relative; background: var(--ink); border-radius: calc(var(--r-lg) - 6px); padding: clamp(12px, 2vh, 22px) clamp(12px, 1.4vw, 22px); overflow: auto; }
.code-block pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: clamp(10px, min(.95vw, 1.7vh), 14px); line-height: 1.65; color: #cfd6f6; white-space: pre; }
.copy-btn { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 8px; transition: background .2s; }
.copy-btn:hover { background: rgba(255,255,255,.22); }

/* Soft, inset guide scrollbars without the native arrow buttons. */
:is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list)::-webkit-scrollbar {
  width: 8px; height: 8px; background: transparent;
}
:is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list)::-webkit-scrollbar-track {
  background: transparent; border-radius: 50px; margin: 8px;
}
:is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list)::-webkit-scrollbar-thumb {
  background: #c4c8df; border: 2px solid transparent; background-clip: padding-box;
  border-radius: 50px;
}
:is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list)::-webkit-scrollbar-thumb:hover {
  background-color: #abb2d2;
}
:is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list)::-webkit-scrollbar-button {
  display: none; width: 0; height: 0;
}
:is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list)::-webkit-scrollbar-corner {
  background: transparent;
}
@supports not selector(::-webkit-scrollbar) {
  :is(.setup-scroll, .guide-scroll, .code-block, .guide-tabs, .plat-list) {
    scrollbar-width: thin; scrollbar-color: #c4c8df transparent;
  }
}

/* Pricing */
.price-card { flex-direction: row; flex: 1; max-height: 56vh; gap: clamp(14px, 3vw, 48px); padding: clamp(16px, 3.4vh, 44px) clamp(18px, 3vw, 48px); align-items: center; }
.price-left { flex: 0 0 34%; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(4px, 1vh, 10px); }
.pill { background: rgba(124,108,242,.14); color: #5a49d8; font-weight: 600; font-size: var(--small); padding: 6px 14px; border-radius: 999px; }
.price { font-size: clamp(54px, min(8vw, 14vh), 120px); font-weight: 700; letter-spacing: -.05em; line-height: 1; background: linear-gradient(135deg, #12142b, #5a49d8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.price-left .label { margin: 0; padding: 0; }
.price-period { font-size: .22em; letter-spacing: -.02em; }
.price-right { flex: 1; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 20px); }
.features { list-style: none; display: grid; gap: clamp(6px, 1.4vh, 14px); }
.features li { display: flex; align-items: center; gap: 12px; font-size: calc(var(--small) * 1.15); font-weight: 500; }
.features i { --s: 1.6em; width: var(--s); height: var(--s); border-radius: 50%; background: #e7f6ec; color: #1f9d55; font-style: normal; font-size: .8em; display: grid; place-items: center; flex-shrink: 0; }
.note { font-size: var(--small); color: var(--muted); }
.note a { color: var(--ink); font-weight: 600; }
.chat-privacy { margin-top: 6px; font-size: 11px; line-height: 1.4; color: var(--muted); }

/* FAQ */
.accordion { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); min-height: 0; }
.acc-item { background: var(--glass); border: 1px solid var(--glass-bd); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.acc-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; font-weight: 600; font-size: calc(var(--small) * 1.12); padding: clamp(10px, 1.8vh, 18px) clamp(14px, 1.6vw, 24px); }
.acc-q svg { width: 1.4em; height: 1.4em; flex-shrink: 0; transition: transform .25s; color: var(--muted); }
.acc-item.open .acc-q svg { transform: rotate(180deg); }
.acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.acc-item.open .acc-a { grid-template-rows: 1fr; }
.acc-a p { overflow: hidden; font-size: var(--small); line-height: 1.6; color: var(--soft); padding: 0 clamp(14px, 1.6vw, 24px); }
.acc-item.open .acc-a p { padding-bottom: clamp(10px, 1.8vh, 18px); }

/* ── SMALL SCREENS ─────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .shell { flex-direction: column-reverse; inset: 10px; }
  .rail { width: 100%; flex-direction: row; padding: 8px 12px; }
  .rail-nav { flex-direction: row; }
  .rail-btn::after { display: none; }
  .brand span, .meta-r { display: none; }
  .topbar { height: 56px; }
  .grid3 { grid-template-columns: 1fr; }
  .robot-slot { display: none; }
  .cards { flex: none; grid-template-rows: 1fr; }
  .cards .card { display: none; }
  .hero-intro { grid-row: auto; padding: clamp(16px, 4vh, 32px) 0; }
  .hero-h { font-size: clamp(30px, 9.5vw, 48px); }
  .chat-widget-dock { padding: 10px 22px 22px; }
  .ask-widget { min-height: 50px; padding: 3px 16px 3px 3px; }
  .ask-robot { width: 56px; height: 56px; }
  .install-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .guide-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; }
  .guide-tab { flex: 0 0 auto; }
  .plat-list { flex-direction: row; overflow-x: auto; padding: 2px 2px 6px; }
  .plat-tab { padding: 8px 12px; flex: 0 0 auto; justify-content: center; }
  .plat-tab .plat { width: 24px; height: 24px; }
  .steps { grid-template-columns: 1fr; max-height: none; }
  .step .label, .step-ico { display: none; }
  .price-card { flex-direction: column; max-height: none; }
  .price-left { flex: none; }
  .chat-dialog { width: calc(100vw - 24px); height: min(700px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); min-height: min(320px, calc(100dvh - 24px)); padding: 14px; border-radius: 24px; gap: 10px; }
  .chat-mount .chat-privacy { font-size: 10px; }
}

@media (max-width: 820px) and (max-height: 650px) {
  .hero-intro { padding: 8px 0; }
  .hero-h { font-size: clamp(30px, min(8vw, 8vh), 40px); }
  .hero-copy { gap: 10px; }
  .hero-btns { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}



[data-checkout]:disabled { cursor: wait; opacity: .7; }

/* Subscriber setup keeps files, PDF upload and installation on Myka. */
.setup-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setup-action, .setup-start, .setup-primary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  border-radius: 14px; padding: 10px 15px; font-size: 12px; font-weight: 650;
  border: 1px solid #dcdff2; background: #fff; box-shadow: 0 3px 12px rgba(104,116,200,.07);
}
.setup-action { flex: 0 0 auto; }
.setup-start { margin: 12px 0 4px; background: #f0ebff; border-color: #ddd2ff; color: #5d429b; }
.setup-primary { align-self: flex-start; background: var(--ink); color: #fff; border-color: var(--ink); }
.setup-action:hover, .setup-start:hover { background: #f3f0ff; }
.setup-primary:hover { background: #333453; }
.setup-action:focus-visible, .setup-start:focus-visible, .setup-primary:focus-visible, .setup-text-link:focus-visible { outline: 3px solid #b6a1ff; outline-offset: 3px; }
.setup-file { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px; background: #f6f5fc; border: 1px solid #e7e5f4; border-radius: 16px; margin: 6px 0 8px; }
.setup-file > div { min-width: 0; }
.setup-file strong { font-size: 13px; }
.setup-file-preview { margin-bottom: 18px; }
.setup-file-preview summary { cursor: pointer; color: #67528d; font-size: 12px; padding: 8px 0; }
.setup-file-preview .code-block { max-height: 340px; }
.setup-dialog {
  margin: auto; width: min(760px, calc(100vw - 32px)); height: min(850px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px);
  border: 1px solid rgba(255,255,255,.95); border-radius: 28px; padding: 24px;
  background: #fafbff; color: var(--ink); box-shadow: 0 24px 80px rgba(35,36,78,.25); overflow: hidden;
}
.setup-dialog[open] { display: flex; flex-direction: column; gap: 16px; }
.setup-dialog::backdrop { background: rgba(45,47,89,.24); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.setup-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.setup-eyebrow { color: #7f6fa3; font-size: 10px; letter-spacing: .12em; font-weight: 650; margin-bottom: 5px; }
.setup-dialog-head h2 { font-size: clamp(19px, 2.4vw, 26px); letter-spacing: -.025em; }
.setup-dialog-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 20px 2px; }
.setup-intro { font-size: 13px; color: var(--soft); line-height: 1.6; margin-bottom: 18px; }
.setup-section { display: flex; flex-direction: column; gap: 11px; margin-bottom: 16px; padding: 20px; border: 1px solid #e5e6f2; border-radius: 20px; background: #fff; }
.setup-section h3 { font-size: 15px; }
.setup-section p { font-size: 12px; line-height: 1.65; color: var(--soft); }
.setup-section label { font-size: 12px; font-weight: 600; }
.setup-section input { min-width: 0; width: 100%; padding: 12px; background: #f8f8fd; border: 1px solid #dfe1ee; border-radius: 12px; font-size: 12px; }
.setup-section input:focus { outline: 2px solid #b9a6f0; outline-offset: 1px; }
.setup-key-row { display: flex; align-items: center; gap: 8px; }
.setup-key-row input { flex: 1; }
.setup-key-row .setup-primary { align-self: stretch; }
.setup-text-link { font-size: 12px; text-decoration: underline; color: #66449b; text-underline-offset: 3px; }
.setup-account { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.setup-badge { font-size: 11px; color: #31704d; background: #e9f5ed; border-radius: 50px; padding: 7px 11px; }
.setup-section .setup-test-answer { padding: 12px; background: #f2effc; color: var(--ink); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.setup-document-status { font-weight: 600; }
.setup-feedback { flex: 0 0 auto; padding: 12px 14px; border-radius: 14px; background: #efebfb; color: #513c80; font-size: 12px; line-height: 1.5; }
.setup-feedback.is-error { background: #fff0ef; color: #923d38; }
.setup-dialog [hidden] { display: none !important; }
.setup-dialog button:disabled { cursor: wait; opacity: .6; }
.setup-dialog-body::-webkit-scrollbar { width: 8px; background: transparent; }
.setup-dialog-body::-webkit-scrollbar-thumb { background: #c4c8df; border: 2px solid transparent; background-clip: padding-box; border-radius: 50px; }
.setup-dialog-body::-webkit-scrollbar-track { background: transparent; margin: 8px; border-radius: 50px; }
.setup-dialog-body::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) { .setup-dialog-body { scrollbar-width: thin; scrollbar-color: #c4c8df transparent; } }
@media (max-width: 600px) {
  .setup-dialog { width: calc(100vw - 20px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); padding: 16px; border-radius: 22px; }
  .setup-section { padding: 15px; }
  .setup-heading { align-items: flex-start; }
  .setup-heading .screen-h { font-size: clamp(22px, 6vw, 34px); }
  .setup-heading .setup-action { padding: 9px 11px; }
}
