/* ==========================================================================
   DeviceManager — AI Assistant page (/devicemanager/ai-assistant/)
   Page key: ai. Uses core tokens; accent = DeviceManager violet via --pa.
   ========================================================================== */

/* ---------- Shared page atoms ---------- */
/* core leaves revealed elements at clip-path: inset(0 round 16px), which shaves the
   first/last glyphs of short text blocks; only the "clip" variant needs it */
html.motion [data-reveal]:not([data-reveal="clip"]).is-in { clip-path: none; }
.inline-link { color: var(--pa); text-decoration: underline; text-decoration-color: rgba(var(--pa-rgb), 0.4); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.inline-link:hover { text-decoration-color: var(--pa); }
.ilink { color: var(--pa); text-decoration: underline; text-decoration-color: rgba(var(--pa-rgb), 0.35); text-underline-offset: 2px; }
.fig-cap { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.fig-cap::before { content: ""; width: 18px; height: 1px; background: var(--line-strong); }
.story-h { font-size: clamp(1.55rem, 1.05rem + 1.9vw, 2.75rem); margin-bottom: 16px; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; line-height: 1.3; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); }
.used { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.used__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-right: 2px; }
.used__chip { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.3; padding: 3px 8px; border-radius: 6px; color: var(--pa); background: rgba(var(--pa-rgb), 0.1); border: 1px solid rgba(var(--pa-rgb), 0.3); }
.msg { font-size: 14px; line-height: 1.5; }
.msg--user { align-self: flex-end; max-width: 84%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: linear-gradient(180deg, rgba(var(--pa-rgb), 0.24), rgba(var(--pa-rgb), 0.12)); border: 1px solid rgba(var(--pa-rgb), 0.38); color: var(--text); }

/* == 1. HERO == */
.ai-hero { position: relative; isolation: isolate; overflow: clip; display: flex; align-items: center; min-height: min(calc(100svh - 52px), 980px); padding-top: calc(var(--header-h) + clamp(32px, 4vw, 56px)); padding-bottom: clamp(48px, 5vw, 72px); }
.ai-hero__glow { right: -16%; top: -26%; }
.ai-hero::after { /* faint violet floor glow under the chat panel */ content: ""; position: absolute; z-index: -1; pointer-events: none; right: 4%; bottom: -10%; width: 52%; height: 50%; background: radial-gradient(closest-side, rgba(var(--pa-rgb), 0.16), transparent); }
.ai-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(36px, 4.5vw, 76px); align-items: center; }
.ai-hero__title { font-size: clamp(2.35rem, 1.1rem + 3.4vw, 4.35rem); text-wrap: wrap; }
.ai-hero__lead { margin-top: 22px; max-width: 56ch; }
.ai-hero__ctas { margin-top: 28px; }
.ai-proof { list-style: none; padding: 0; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.ai-proof li { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0; color: var(--text-2); white-space: nowrap; }
.ai-proof svg { width: 15px; height: 15px; color: var(--pa); }
html.motion .ai-proof li { animation: ai-in 0.8s var(--ease-out) both; }
html.motion .ai-proof li:nth-child(1) { animation-delay: 0.55s; }
html.motion .ai-proof li:nth-child(2) { animation-delay: 0.63s; }
html.motion .ai-proof li:nth-child(3) { animation-delay: 0.71s; }
html.motion .ai-proof li:nth-child(4) { animation-delay: 0.79s; }
.ai-hero__visual { position: relative; min-width: 0; }
/* hero visual animates on load (not on intersection) so it also peeks in on phones */
html.motion .ai-hero__visual { animation: ai-rise 1.3s var(--ease-out) 0.15s both; transform-origin: 50% 100%; }
@keyframes ai-rise { from { opacity: 0; transform: perspective(1400px) rotateX(14deg) translate3d(0, 60px, 0) scale(0.97); } }

/* ---------- Chat panel ---------- */
.chat-fig { position: relative; margin: 0; }
.chat { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: clamp(480px, 61svh, 560px); border-radius: 22px; border: 1px solid var(--line-strong); background: radial-gradient(110% 55% at 100% 0%, rgba(var(--pa-rgb), 0.11), transparent 62%), linear-gradient(180deg, #0e131d, #090c13); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 50px 120px -40px rgba(0, 0, 0, 0.95), 0 40px 110px -50px rgba(var(--pa-rgb), 0.6); overflow: hidden; }
.chat::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; z-index: 1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent); }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.chat__avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #0b0718; background: linear-gradient(140deg, #cbbcff, var(--pa)); box-shadow: 0 0 26px -4px rgba(var(--pa-rgb), 0.85); }
.chat__avatar svg { width: 19px; height: 19px; stroke-width: 2; }
.chat__title { display: flex; flex-direction: column; min-width: 0; margin-right: auto; line-height: 1.3; }
.chat__title strong { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.chat__title small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__prov { display: inline-flex; align-items: center; gap: 7px; flex: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; color: var(--ok); border: 1px solid rgba(62, 230, 154, 0.3); background: rgba(62, 230, 154, 0.07); }
.chat__new { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; color: var(--text-2); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-strong); }
.chat__new svg { width: 13px; height: 13px; }
.chat__thread { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 10px; min-height: 0; overflow: hidden; }
.msg--ai { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.msg__av { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--pa); background: rgba(var(--pa-rgb), 0.12); border: 1px solid rgba(var(--pa-rgb), 0.3); }
.msg__av svg { width: 15px; height: 15px; }
.msg__body { display: grid; gap: 11px; min-width: 0; color: var(--text-2); }
.msg__body strong { color: var(--text); font-weight: 600; }
.msg__more { font-size: 12.5px; }
.mtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mtable th { text-align: left; font-weight: 500; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); padding: 7px 10px; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--line); }
.mtable td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable td:first-child { font-family: var(--font-mono); font-size: 11.5px; color: var(--text); }
.sdot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 1px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 8px var(--bad); }
/* bars + meters used by the scripted answers */
.bars { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 22px; gap: 10px; align-items: center; font-size: 12px; }
.bar__name { font-family: var(--font-mono); font-size: 11px; color: var(--text); white-space: nowrap; }
.bar__track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar__track i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--warn), var(--bad)); transform-origin: left; transform: scaleX(var(--v)); }
.bar__n { text-align: right; font-family: var(--font-mono); color: var(--text); }
.bars__cap { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.meter { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); display: grid; gap: 4px; }
.meter small { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.meter b { font-size: 1.05rem; color: var(--text); letter-spacing: -0.02em; font-weight: 600; }
.meter span { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter span i { display: block; height: 100%; background: var(--ok); transform-origin: left; transform: scaleX(var(--v)); }
.meter.is-warn b { color: var(--warn); }
.meter.is-warn span i { background: var(--warn); }

.chat__composer { display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); }
.chat__mic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--text-2); }
.chat__mic svg { width: 18px; height: 18px; }
.chat__input { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; }
.chat__ph { color: var(--text-3); }
.chat__typed:not(:empty) + .chat__ph { display: none; }
.chat__typed.is-caret::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--pa); animation: ai-caret 1s steps(1) infinite; }
@keyframes ai-caret { 50% { opacity: 0; } }
.chat__ask { height: 40px; padding: 0 18px; flex: none; display: grid; place-items: center; border-radius: 12px; font-weight: 600; font-size: 14px; color: #0b0718; background: var(--pa); box-shadow: 0 8px 24px -10px rgba(var(--pa-rgb), 0.9); transition: transform 0.25s var(--ease-out), box-shadow 0.3s; }
.chat__ask.is-press { transform: scale(0.92); box-shadow: 0 0 0 6px rgba(var(--pa-rgb), 0.22); }

/* status line ("Searching devices…") */
.status { display: flex; align-items: center; gap: 10px; padding-left: 40px; font-family: var(--font-mono); font-size: 12px; }
.status__spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid rgba(var(--pa-rgb), 0.25); border-top-color: var(--pa); animation: ai-spin 0.8s linear infinite; }
.status__txt { background: linear-gradient(90deg, var(--text-3) 0%, var(--text) 45%, var(--text-3) 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ai-shimmer 1.6s linear infinite; }
.status__stop { margin-left: auto; font-family: var(--font-sans); font-size: 11.5px; color: var(--text-3); padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line-strong); }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* empty-state starter questions */
.starters-wrap { display: grid; gap: 12px; }
.starters__intro { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.starters { display: flex; flex-wrap: wrap; gap: 8px; }
.starter { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); }

/* scripted animation helpers */
.chat.is-live .anim-in { animation: ai-in 0.55s var(--ease-out) both; }
.chat .w { opacity: 0; animation: ai-fade 0.45s ease forwards; animation-delay: var(--dl, 0ms); }
.chat .blk { opacity: 0; animation: ai-in 0.6s var(--ease-out) forwards; animation-delay: var(--dl, 0ms); }
.chat .blk .bar__track i, .chat .blk .meter span i { animation: ai-grow 1s var(--ease-out) both; animation-delay: calc(var(--dl, 0ms) + 200ms); }
.chat.is-fading .chat__thread > * { opacity: 0 !important; transition: opacity 0.35s; }
@keyframes ai-in { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes ai-fade { to { opacity: 1; } }
@keyframes ai-grow { from { transform: scaleX(0); } }

/* floating context chips around the panel */
.float-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; background: rgba(12, 16, 24, 0.86); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9); animation: ai-float 7s ease-in-out infinite; }
.float-chip svg { width: 15px; height: 15px; color: var(--pa); }
.float-chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.float-chip--a { left: -44px; bottom: 118px; }
.float-chip--b { right: 36px; top: -18px; animation-delay: -3.5s; }
@keyframes ai-float { 50% { transform: translate3d(0, -8px, 0); } }

@media (max-width: 1240px) {
  .float-chip--a { left: -14px; }
}
@media (min-width: 1025px) and (max-height: 820px) {
  .ai-hero { padding-top: calc(var(--header-h) + 22px); padding-bottom: 40px; }
  .ai-hero__title { font-size: clamp(2.35rem, 0.9rem + 3vw, 3.75rem); }
  .ai-hero__lead { margin-top: 16px; font-size: 1.08rem; }
  .ai-hero__ctas, .ai-proof { margin-top: 22px; }
  .chat { height: 470px; }
}
@media (max-width: 1024px) {
  .ai-hero { min-height: 0; }
  .ai-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .ai-hero__visual { max-width: 680px; }
}
@media (max-width: 640px) {
  .ai-hero { padding-top: calc(var(--header-h) + 34px); padding-bottom: 48px; }
  .ai-hero__lead { margin-top: 18px; }
  .ai-hero__ctas { margin-top: 24px; }
  .ai-hero__ctas { flex-wrap: nowrap; gap: 10px; }
  .ai-hero__ctas .btn--lg { min-height: 48px; padding: 13px 16px; font-size: 0.9rem; gap: 8px; }
  .ai-proof { margin-top: 22px; gap: 8px 16px; }
  .chat { height: 452px; border-radius: 18px; }
  .chat__head { padding: 12px 14px; gap: 10px; }
  .chat__new, .chat__title small { display: none; }
  .chat__thread { padding: 16px 12px 8px; gap: 12px; }
  .msg { font-size: 13px; }
  .msg--ai { grid-template-columns: 24px minmax(0, 1fr); gap: 9px; }
  .msg__av { width: 24px; height: 24px; border-radius: 8px; }
  .mtable { font-size: 11.5px; }
  .mtable th, .mtable td { padding: 6px 7px; }
  .mtable td:first-child { font-size: 10.5px; }
  .bar { grid-template-columns: 86px minmax(0, 1fr) 18px; }
  .status { padding-left: 33px; }
  .chat__composer { padding: 10px; gap: 8px; }
  .chat__mic, .chat__input, .chat__ask { height: 38px; }
  .chat__mic { width: 38px; }
  .chat__ask { padding: 0 14px; }
  .float-chip { font-size: 11.5px; padding: 7px 11px; }
  .float-chip--a { display: none; }
  .float-chip--b { right: 12px; top: -15px; }
}

/* == 2. QUESTIONS + ask-from-anywhere == */
.ai-qs { padding-bottom: calc(var(--space-section) * 0.85); }
.qrows { display: grid; gap: 12px; margin-bottom: clamp(64px, 9vw, 130px); }
.qrows .marquee { --gap: 12px; }
.qchip { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); font-size: 1rem; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.qchip svg { width: 18px; height: 18px; color: var(--pa); flex: none; }
.marquee--reverse .qchip { background: rgba(var(--pa-rgb), 0.07); border-color: rgba(var(--pa-rgb), 0.24); }

.anywhere { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(32px, 5.5vw, 96px); align-items: center; }
.anywhere__copy .h3 { margin-bottom: 14px; }
.anywhere__copy .checklist { margin-top: 22px; }
.mock { border-radius: 16px; border: 1px solid var(--line-strong); background: #0a0e15; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 40px 100px -40px rgba(0, 0, 0, 0.9), 0 30px 90px -50px rgba(var(--pa-rgb), 0.5); }
.mock__bar { height: 32px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #121826, #0d121c); }
.mock__url { margin-inline: auto; max-width: 72%; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock__app { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); height: clamp(250px, 27vw, 350px); overflow: hidden; }
.mock__side { display: grid; align-content: start; gap: 13px; padding: 14px 12px; border-right: 1px solid var(--line); }
.mock__side i { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); }
.mock__side i:first-child { width: 26px; height: 26px; border-radius: 8px; background: rgba(var(--pa-rgb), 0.4); margin-bottom: 4px; }
.mock__main { --dim: clamp(0, (var(--p) - 0.18) * 6, 1); opacity: calc(1 - 0.82 * var(--dim)); filter: blur(calc(var(--dim) * 1.5px)); display: grid; align-content: start; gap: 14px; padding: 16px 18px; }
.mock__crumb { font-size: 13px; color: var(--text-3); }
.mock__crumb b { color: var(--text); font-weight: 600; }
.mock__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mock__kpis div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.mock__kpis small { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.mock__kpis b { font-size: 1.3rem; letter-spacing: -0.03em; font-weight: 600; }
.mock__kpis .is-warn b { color: var(--warn); }
.mock__rows { display: grid; gap: 8px; }
.mock__rows i { display: block; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.mock__panel { z-index: 2; --open: clamp(0, (var(--p) - 0.3) * 2.4, 1); position: absolute; top: 0; right: 0; bottom: 0; width: min(60%, 300px); display: grid; align-content: start; gap: 11px; padding: 14px; border-left: 1px solid rgba(var(--pa-rgb), 0.4); background: linear-gradient(180deg, #131a29, #0c111b); box-shadow: -30px 0 70px -20px rgba(0, 0, 0, 0.85); transform: translate3d(calc((1 - var(--open)) * 106%), 0, 0); }
.mock__ph { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mock__ph svg { width: 17px; height: 17px; color: var(--pa); }
.mock__ph span { margin-left: auto; font-size: 11px; color: var(--pa); white-space: nowrap; }
.mock__ctx { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-2); border: 1px dashed rgba(var(--pa-rgb), 0.45); background: rgba(var(--pa-rgb), 0.07); }
.mock__ctx svg { width: 13px; height: 13px; color: var(--pa); }
.mock__q { justify-self: end; font-size: 12.5px; padding: 7px 11px; border-radius: 12px 12px 3px 12px; background: rgba(var(--pa-rgb), 0.18); border: 1px solid rgba(var(--pa-rgb), 0.38); }
.mock__a { display: grid; gap: 7px; }
.mock__a i { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.11); }
.mock__a i:nth-child(2) { width: 86%; }
.mock__a i:nth-child(3) { width: 58%; }
.mock__used { font-family: var(--font-mono); font-size: 10px; color: var(--pa); }
.mock__ask { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: 13px; color: #0b0718; background: var(--pa); box-shadow: 0 10px 30px -8px rgba(var(--pa-rgb), 0.9); opacity: calc(1 - clamp(0, (var(--p) - 0.3) * 3, 1)); }
.mock__ask svg { width: 15px; height: 15px; }
.mock__ask::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--pa); animation: ai-ring 2.2s var(--ease-out) infinite; }
@keyframes ai-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }

@media (max-width: 900px) {
  .anywhere { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  .qrows { gap: 10px; margin-bottom: 56px; }
  .qchip { font-size: 0.875rem; padding: 10px 15px; gap: 8px; }
  .qchip svg { width: 16px; height: 16px; }
  .mock__app { grid-template-columns: 38px minmax(0, 1fr); height: 236px; }
  .mock__side { padding: 12px 8px; gap: 10px; }
  .mock__side i:first-child { width: 22px; height: 22px; }
  .mock__main { padding: 12px; gap: 10px; }
  .mock__kpis { gap: 6px; }
  .mock__kpis div { padding: 7px 8px; }
  .mock__kpis b { font-size: 1rem; }
  .mock__panel { width: 74%; padding: 11px; gap: 8px; }
  .mock__ph { font-size: 12px; }
  .mock__url { font-size: 9px; }
}

/* == 3. HOW IT WORKS — flow story == */
.ai-how__head { padding-top: var(--space-section); }
.ai-how__head .section-head, .ai-act__head .section-head { margin-bottom: 0; }
.flow-story { --step-h: 72svh; }
.flow-stage { --ratio: 5 / 6; width: min(100%, calc(76svh * (var(--ratio)))); }
html.motion .flow-stage, html.motion .act-stage { border-radius: 26px; border: 1px solid var(--line); background: radial-gradient(70% 50% at 50% 0%, rgba(var(--pa-rgb), 0.08), transparent 70%), radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 1.5px) 0 0 / 22px 22px, rgba(255, 255, 255, 0.012); }
.flow-view { position: absolute; inset: 10px 14px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 4%, #000 94%, transparent); mask-image: linear-gradient(180deg, transparent, #000 4%, #000 94%, transparent); }
.flow { position: relative; padding: 14px 3px; transform: translate3d(0, calc(var(--pan, 0) * -1px), 0); transition: transform 1s var(--ease-out); }
.fnode { position: relative; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), #0a0e16; transition: opacity 0.6s, filter 0.6s, border-color 0.6s, box-shadow 0.6s; }
html.motion .fnode:not(.is-on) { opacity: 0.32; filter: saturate(0); }
.flow-story[data-step="0"] .fnode--q,
.flow-story[data-step="1"] .fnode--model,
.flow-story[data-step="2"] .fnode--gate,
.flow-story[data-step="3"] .fnode--ans,
.flow-story[data-step="3"] .fnode--audit { border-color: rgba(var(--pa-rgb), 0.6); box-shadow: 0 0 0 4px rgba(var(--pa-rgb), 0.08), 0 24px 60px -24px rgba(var(--pa-rgb), 0.6); }
.fnode__tag { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.fnode__tag svg { width: 14px; height: 14px; color: var(--pa); }
.fwire { position: relative; height: 30px; margin-left: 30px; border-left: 1px dashed var(--line-strong); transition: border-color 0.5s; }
.fwire span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.fwire::before { content: ""; position: absolute; left: -3.5px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--pa); box-shadow: 0 0 10px var(--pa); opacity: 0; }
.fwire.is-on { border-left: 1px solid rgba(var(--pa-rgb), 0.6); }
.fwire.is-on span { color: var(--text-2); }
html.motion .fwire.is-on::before { animation: ai-wire 1.3s linear infinite; }
@keyframes ai-wire { 0% { transform: translateY(0); opacity: 0; } 20%, 80% { opacity: 1; } 100% { transform: translateY(24px); opacity: 0; } }

.fq { display: flex; gap: 12px; align-items: flex-start; }
.fq__av { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 650; color: #0b0718; background: linear-gradient(140deg, #d6caff, var(--pa)); }
.fq__body small { display: block; margin-bottom: 3px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.fq__body p { font-size: 15px; line-height: 1.4; color: var(--text); }
.fm { display: flex; align-items: center; gap: 10px; }
.fm__main { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.fm__main strong { font-size: 14.5px; font-weight: 600; }
.fm__main small { font-size: 12px; color: var(--text-3); }
.fm__cut { position: relative; flex: none; width: 58px; height: 22px; }
.fm__line { position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed rgba(255, 107, 107, 0.65); }
.fm__x { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; display: grid; place-items: center; border-radius: 50%; color: var(--bad); background: #1a0d10; border: 1px solid rgba(255, 107, 107, 0.6); }
.fm__x svg { width: 12px; height: 12px; stroke-width: 2.6; }
.flow-story[data-step="1"] .fm__x { animation: ai-xpulse 1.6s ease-in-out infinite; }
@keyframes ai-xpulse { 50% { box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.15); } }
.fm__db { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12px; color: var(--text-3); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); }
.fm__db svg { width: 15px; height: 15px; }
.fm__note { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em; color: #ff9a9a; }
.fm__note svg { width: 13px; height: 13px; }
.lk { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lk li { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.3; padding: 4px 8px; border-radius: 6px; color: var(--text-3); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); transition: color 0.5s, background-color 0.5s, border-color 0.5s, box-shadow 0.5s; transition-delay: calc(var(--k, 0) * 380ms + 250ms); }
html:not(.motion) .lk li.is-hit,
.flow-story:is([data-step="2"], [data-step="3"]) .lk li.is-hit { color: var(--pa); border-color: rgba(var(--pa-rgb), 0.6); background: rgba(var(--pa-rgb), 0.13); box-shadow: 0 0 16px -4px rgba(var(--pa-rgb), 0.75); }
.fgate { display: grid; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.fgate p { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.35; color: var(--text-2); }
.fgate svg { width: 14px; height: 14px; color: var(--warn); flex: none; }
.fans { margin-bottom: 10px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.fans strong { color: var(--text); font-weight: 600; }
.faud { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 12px; }
.faud span { display: grid; gap: 3px; align-content: start; min-width: 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.4; color: var(--text); }
.faud small { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }

@media (max-width: 900px) {
  .flow-story { --step-h: 62svh; }
  html.motion .flow-stage, html.motion .act-stage { border-radius: 18px; }
  .flow-view, .act-view { inset: 6px 8px; }
  .flow-stage { --ratio: 21 / 20; width: min(100%, calc(40svh * (var(--ratio)))); }
}
@media (max-width: 640px) {
  .fnode { padding: 11px 12px; border-radius: 12px; }
  .fwire { height: 24px; margin-left: 24px; }
  .fq__body p { font-size: 14px; }
  .fm__cut { width: 40px; }
  .fm__db { padding: 6px 8px; font-size: 11px; }
  .lk { gap: 5px; }
  .lk li { font-size: 10px; padding: 3px 6px; }
  .fgate p { font-size: 11.5px; }
  .faud { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
html:not(.motion) .flow-stage { aspect-ratio: auto; width: 100%; max-width: 640px; }
html:not(.motion) .flow-view { position: static; -webkit-mask-image: none; mask-image: none; }

/* == 4. YOUR MODEL, YOUR CHOICE == */
.ai-model { overflow: clip; isolation: isolate; }
.ai-model__glow { left: -30%; top: 10%; opacity: 0.7; }
.lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.lane { position: relative; display: grid; gap: 22px; align-content: start; padding: clamp(18px, 2.2vw, 30px); border-radius: var(--radius-l); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--bg-elev); overflow: hidden; isolation: isolate; }
.lane--local { border-color: rgba(var(--pa-rgb), 0.32); background: radial-gradient(90% 70% at 50% 0%, rgba(var(--pa-rgb), 0.1), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--bg-elev); box-shadow: 0 40px 90px -50px rgba(var(--pa-rgb), 0.6); }
.lane__head { display: flex; gap: 14px; align-items: flex-start; }
.lane__head .icon-box { margin: 0; }
.lane__head p { margin-top: 4px; font-size: 0.92rem; color: var(--text-2); line-height: 1.5; }
.lane__k { margin-bottom: 10px; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.lane__note { margin-top: 12px; font-size: 0.85rem; line-height: 1.5; color: var(--text-3); }

.net { --draw: clamp(0, (var(--p) - 0.25) * 2.6, 1); --seal: clamp(0, (var(--p) - 0.55) * 3, 1); --cy: 60px; position: relative; height: 150px; }
.net__zone { position: absolute; left: 0; top: 0; bottom: 0; width: 46%; border-radius: 16px; border: 1.5px dashed rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.015); }
.net__zlabel, .net__out { position: absolute; top: 10px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.net__zlabel { left: 14px; }
.net__out { right: 2px; color: rgba(110, 168, 255, 0.8); }
.net__node { position: absolute; z-index: 2; top: calc(var(--cy) - 23px); width: 124px; display: grid; justify-items: center; gap: 8px; text-align: center; transform: translateX(-50%); }
.net__node svg { width: 46px; height: 46px; padding: 11px; border-radius: 13px; border: 1px solid var(--line-strong); background: #0d121c; color: var(--text); }
.net__node b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.net__node--a { left: 23%; }
.net__node--b { left: calc(100% - 62px); }
.net__node--ext svg { color: var(--info); border-color: rgba(110, 168, 255, 0.45); box-shadow: 0 0 30px -8px rgba(110, 168, 255, 0.7); }
.net__wire { position: absolute; z-index: 1; top: calc(var(--cy) - 1px); left: 23%; right: 62px; height: 2px; }
.net__line { position: absolute; inset: 0; border-radius: 2px; background: linear-gradient(90deg, var(--pa) 30%, var(--info)); transform-origin: left; transform: scaleX(var(--draw)); }
.net__pk { position: absolute; inset: -3px 0 auto; height: 8px; opacity: clamp(0, (var(--p) - 0.6) * 4, 1); }
.net__pk i { position: absolute; inset: 0; animation: ai-pk 2.6s linear infinite; }
.net__pk i::before { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px var(--pa), 0 0 18px var(--pa); }
.net__pk i:nth-child(2) { animation-delay: -0.87s; }
.net__pk i:nth-child(3) { animation-delay: -1.73s; }
@keyframes ai-pk { 0% { transform: translateX(0); opacity: 0; } 12%, 88% { opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
.net__gate { position: absolute; z-index: 3; left: 46%; top: var(--cy); display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--text); background: var(--bg-elev); border: 1px solid rgba(110, 168, 255, 0.5); transform: translate(-50%, -50%) scale(calc(0.6 + 0.4 * var(--draw))); opacity: var(--draw); }
.net__gate svg { width: 11px; height: 11px; color: var(--info); }
.net--local .net__zone { width: calc(100% - 20px); border-style: solid; border-color: rgba(var(--pa-rgb), calc(0.25 + 0.45 * var(--seal))); background: rgba(var(--pa-rgb), calc(0.025 + 0.04 * var(--seal))); box-shadow: inset 0 0 50px -14px rgba(var(--pa-rgb), calc(0.5 * var(--seal))), 0 0 0 calc(5px * var(--seal)) rgba(var(--pa-rgb), 0.06); }
.net--local .net__node--a { left: calc((100% - 20px) * 0.2); }
.net--local .net__node--b { left: calc((100% - 20px) * 0.8); }
.net--local .net__node--b svg { color: var(--pa); border-color: rgba(var(--pa-rgb), 0.45); box-shadow: 0 0 30px -8px rgba(var(--pa-rgb), 0.8); }
.net--local .net__wire { left: calc((100% - 20px) * 0.2); right: calc(20px + (100% - 20px) * 0.2); }
.net--local .net__line { background: linear-gradient(90deg, var(--pa), #cbbcff); }
.net__pk--loop i { animation: ai-pkloop 2.8s ease-in-out infinite; }
.net__pk--loop i:nth-child(2) { animation-delay: -1.4s; }
@keyframes ai-pkloop { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(100%); } }
.net__seal { position: absolute; z-index: 3; left: calc(100% - 20px); top: var(--cy); display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: #0b0718; background: var(--pa); box-shadow: 0 0 24px -4px rgba(var(--pa-rgb), 0.9); transform: translate(-50%, -50%) scale(var(--seal)); }
.net__seal svg { width: 12px; height: 12px; stroke-width: 2.4; }

/* settings dialog mock + admin controls */
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5.5vw, 96px); align-items: center; margin-top: clamp(48px, 7vw, 96px); }
.cfgcard { --sw: clamp(0, (var(--p) - 0.42) * 7, 1); max-width: 500px; margin-inline: auto; display: grid; gap: 10px; padding: 20px 22px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12); background: linear-gradient(180deg, #172033, #121a2a); box-shadow: 0 50px 110px -40px rgba(0, 0, 0, 0.95), 0 30px 80px -50px rgba(var(--pa-rgb), 0.6); font-size: 13.5px; color: var(--text-2); }
.cfgcard__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 1.05rem; color: var(--text); }
.cfgcard__x svg { width: 16px; height: 16px; color: var(--text-3); }
.cfgcard__row { display: flex; align-items: center; gap: 10px; color: var(--text); line-height: 1.35; }
.cfgcard__k { margin-top: 4px; font-weight: 600; color: var(--text); font-size: 13px; }
.cbox { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 4px; background: #3b82f6; color: #fff; }
.cbox svg { width: 11px; height: 11px; stroke-width: 3.2; }
.rdo { position: relative; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.4); }
.rdo::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); }
.radio--a .rdo::after { opacity: calc(1 - var(--sw)); }
.radio--b .rdo::after { opacity: var(--sw); }

.cfgcard__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 4px 0; }
.cfgcard__fields label { display: grid; gap: 5px; min-width: 0; }
.cfgcard__fields label:nth-child(-n+3) { opacity: calc(0.25 + 0.75 * var(--sw)); }
.cfgcard__fields .is-wide { grid-column: 1 / -1; }
.cfgcard em, .cfgcard__row em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--pa); }
.cfgcard__row em { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: rgba(var(--pa-rgb), 0.1); border: 1px solid rgba(var(--pa-rgb), 0.28); }
.fld--dim { color: var(--text-3); }
.cfgcard__fields small { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld { display: block; padding: 8px 10px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text); background: #0e1524; border: 1px solid rgba(255, 255, 255, 0.12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfgcard__foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.cbtn { padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 550; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.16); }
.cbtn--p { background: #2563eb; border-color: transparent; color: #fff; }
.cfgcard__ok { --ok-in: clamp(0, (var(--p) - 0.82) * 8, 1); display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--ok); background: rgba(62, 230, 154, 0.1); border: 1px solid rgba(62, 230, 154, 0.35); opacity: var(--ok-in); transform: scale(calc(0.7 + 0.3 * var(--ok-in))); }
.cfgcard__ok svg { width: 12px; height: 12px; stroke-width: 3; }
.cfg__copy .h3 { margin-bottom: 14px; }
.cfg__copy .body { max-width: 52ch; }
.cfg__copy .footnote { margin-top: 22px; max-width: 52ch; }

@media (max-width: 900px) {
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .cfg { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .lane { gap: 14px; padding: 16px; }
  .lane__head p { font-size: 0.85rem; }
  .lane .tags { gap: 5px; }
  .lane .tags li { font-size: 10.5px; padding: 4px 8px; }
  .lane__k { margin-bottom: 8px; }
  .lane__note { margin-top: 10px; }
  .net { height: 132px; --cy: 54px; }
  .net__node { width: 104px; }
  .net__node svg { width: 40px; height: 40px; padding: 9px; border-radius: 11px; }
  .net__node b { font-size: 9.5px; }
  .net__node--a { left: 23%; }
  .net__node--b { left: calc(100% - 52px); }
  .net__wire { right: 52px; }
  .net__zlabel { left: 10px; }
  .lane__note { font-size: 0.8rem; }
  .cfgcard { padding: 16px; font-size: 12.5px; gap: 9px; }
  .cfgcard__fields { gap: 8px; }
  .cfgcard__fields small { font-size: 10.5px; }
  .fld { font-size: 11px; padding: 7px 8px; }
}

/* == 5. GROUNDED IN YOUR HISTORY == */
.ground__copy .lead { margin-top: 20px; }
.ground__copy .checklist { margin-top: 26px; }
.ground__copy em { font-style: normal; color: var(--text); }
.ground__visual { position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: center; }
.tix { position: relative; display: grid; gap: 10px; }
.tix::after { /* connector from the ticket stack into the answer */ content: ""; position: absolute; right: -18px; top: 50%; width: 18px; height: 1px; background: linear-gradient(90deg, rgba(62, 230, 154, 0.2), rgba(62, 230, 154, 0.8)); transform-origin: left; transform: scaleX(clamp(0, (var(--p) - 0.3) * 6, 1)); }
.tix__item { --q: clamp(0, (var(--p) - 0.05 - var(--o, 0)) * 5, 1); display: grid; gap: 5px; justify-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev); opacity: var(--q); transform: translate3d(calc((1 - var(--q)) * -24px), 0, 0); }
.tix__item:nth-child(2) { --o: 0.07; }
.tix__item:nth-child(3) { --o: 0.14; }
.tix__id { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.tix__item .chip { font-size: 9px; padding: 2px 7px; }
.tix__item small { font-size: 11px; line-height: 1.35; color: var(--text-3); }
.acard { margin: 0; padding: 18px; border-radius: 20px; border: 1px solid var(--line-strong); background: radial-gradient(100% 60% at 100% 0%, rgba(var(--pa-rgb), 0.08), transparent 60%), linear-gradient(180deg, #0f141e, #0a0e15); box-shadow: 0 50px 110px -40px rgba(0, 0, 0, 0.9), 0 30px 80px -50px rgba(var(--pa-rgb), 0.5); }
.acard__q { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.acard__body { display: grid; gap: 10px; }
.ab { --q: clamp(0, (var(--p) - var(--o, 0)) * 5, 1); opacity: var(--q); transform: translate3d(0, calc((1 - var(--q)) * 14px), 0); }
.ab--1 { --o: 0.32; }
.ab--2 { --o: 0.44; }
.ab--3 { --o: 0.56; }
.ab--4 { --o: 0.68; }
.ab--1, .ab--2 { padding: 12px 14px; border-radius: 12px; background: rgba(62, 230, 154, 0.05); border: 1px solid rgba(62, 230, 154, 0.2); }
.ab--gen { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.02); border: 1px dashed var(--line-strong); }
.ab p { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.ab__label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3; color: var(--text-2); border: 1px solid var(--line-strong); }
.ab__label svg { width: 12px; height: 12px; flex: none; }
.ab__label--rec { color: var(--ok); border-color: rgba(62, 230, 154, 0.38); background: rgba(62, 230, 154, 0.08); }
.ab--4 { padding-top: 4px; }

@media (max-width: 640px) {
  .ground__visual { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tix { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tix::after { display: none; }
  .tix__item { padding: 8px 9px; }
  .tix__id { font-size: 10.5px; }
  .tix__item small { display: none; }
  .acard { padding: 14px; border-radius: 16px; }
  .ab p { font-size: 13.5px; }
}

/* == 6. SUGGESTED ACTIONS — act story == */
.ai-act__head { padding-top: var(--space-section); }
.act-story { --step-h: 72svh; }
.act-stage { --ratio: 1 / 1; }
.act-view { position: absolute; inset: 10px 14px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 4%, #000 95%, transparent); mask-image: linear-gradient(180deg, transparent, #000 4%, #000 95%, transparent); }
.act { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 12px 3px; transform: translate3d(0, calc(var(--pan, 0) * -1px), 0); transition: transform 1s var(--ease-out); }
.act-card { padding: 18px; border-radius: 18px; border: 1px solid rgba(var(--pa-rgb), 0.42); background: linear-gradient(180deg, rgba(var(--pa-rgb), 0.1), rgba(var(--pa-rgb), 0.02) 45%), #0c1019; box-shadow: 0 40px 90px -45px rgba(var(--pa-rgb), 0.7); }
.act-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.act-card__kind, .act-card__exp { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.act-card__kind { color: var(--pa); }
.act-card__exp { color: var(--text-3); letter-spacing: 0.04em; text-transform: none; }
.act-card__kind svg, .act-card__exp svg { width: 13px; height: 13px; }
.act-card__title { margin-bottom: 12px; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--text); }
.act-card__list { border-top: 1px solid var(--line); }
.act-card__list > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.act-card__list dt { padding-top: 2px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.act-card__list dd { color: var(--text-2); }
.act-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.act-card__hint { margin-right: auto; font-size: 12px; color: var(--text-3); }
.abtn { display: inline-grid; place-items: center; height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.abtn--ghost { color: var(--text-2); border: 1px solid var(--line-strong); }
.abtn--p { color: #0b0718; background: var(--pa); transition: background-color 0.5s, box-shadow 0.5s; }
.abtn--p > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 5px; transition: opacity 0.4s; }
.abtn--p svg { width: 14px; height: 14px; stroke-width: 3; }
.abtn__b { opacity: 0; }
html.motion .act-story[data-step="1"] .abtn--p { box-shadow: 0 0 0 5px rgba(var(--pa-rgb), 0.22), 0 0 30px -4px rgba(var(--pa-rgb), 0.8); }
html.motion .act-story[data-step="2"] .abtn--p { background: var(--ok); box-shadow: 0 0 26px -6px rgba(62, 230, 154, 0.9); }
html.motion .act-story[data-step="2"] .abtn__a { opacity: 0; }
html.motion .act-story[data-step="2"] .abtn__b { opacity: 1; }
.act-slot { display: grid; }
.act-slot > * { grid-area: 1 / 1; align-self: start; }
.act-checks { list-style: none; padding: 4px 2px; display: grid; gap: 9px; }
.act-checks li { display: flex; align-items: center; gap: 11px; font-size: 14px; line-height: 1.35; color: var(--text-3); transition: color 0.4s; }
.ck { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line-strong); color: transparent; transition: background-color 0.35s, border-color 0.35s, color 0.35s, box-shadow 0.35s; }
.ck svg { width: 13px; height: 13px; stroke-width: 3; transform: scale(0.3); transition: transform 0.45s var(--ease-spring); }
.act-checks li.is-ticked, html:not(.motion) .act-checks li { color: var(--text); }
.act-checks li.is-ticked .ck, html:not(.motion) .act-checks .ck { color: #04130b; background: var(--ok); border-color: var(--ok); box-shadow: 0 0 14px -2px rgba(62, 230, 154, 0.7); }
.act-checks li.is-ticked .ck svg, html:not(.motion) .act-checks .ck svg { transform: none; }
.act-result { display: grid; gap: 8px; }
.act-result__ok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 11px 13px; border-radius: 12px; font-size: 13.5px; color: var(--text); background: rgba(62, 230, 154, 0.06); border: 1px solid rgba(62, 230, 154, 0.28); }
.act-result__ok .chip svg { width: 11px; height: 11px; stroke-width: 3; }
.act-result__ok .ilink { margin-left: auto; font-size: 13px; }
.arow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.arow__t { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.arow .chip { font-size: 9px; padding: 3px 8px; }
.act-scope { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.scope { padding: 16px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--bg-elev); }
.scope__k { margin-bottom: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ok); }
.scope ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.scope li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.35; color: var(--text); }
.scope li svg { width: 16px; height: 16px; flex: none; color: var(--ok); }
.scope li small { margin-left: auto; padding-left: 6px; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); white-space: nowrap; }
.scope--never { border-color: rgba(255, 107, 107, 0.32); background: rgba(255, 107, 107, 0.04); }
.scope--never .scope__k { color: var(--bad); }
.scope--never li { color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(255, 107, 107, 0.65); }
.scope--never li svg { color: var(--bad); }

@media (max-width: 900px) {
  .act-story { --step-h: 62svh; }
  .act-stage { --ratio: 21 / 20; }
}
@media (max-width: 640px) {
  .act { gap: 10px; }
  .act-card { padding: 14px; border-radius: 15px; }
  .act-card__title { font-size: 0.98rem; margin-bottom: 8px; }
  .act-card__list > div { grid-template-columns: 58px minmax(0, 1fr); padding: 6px 0; font-size: 12px; }
  .act-card__foot { margin-top: 10px; }
  .act-card__hint { font-size: 11px; }
  .abtn { height: 32px; padding: 0 11px; font-size: 12px; }
  .act-checks { gap: 7px; }
  .act-checks li { font-size: 13px; }
  .arow { grid-template-columns: minmax(0, 1fr) auto; font-size: 12px; }
  .arow__t { display: none; }
  .act-scope { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .scope { padding: 12px 13px; border-radius: 13px; }
  .scope__k { margin-bottom: 8px; }
  .scope ul { gap: 7px; }
  .scope li { font-size: 12.5px; }
  .scope--never ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html:not(.motion) .act-stage { aspect-ratio: auto; width: 100%; max-width: 620px; }
html:not(.motion) .act-view { position: static; -webkit-mask-image: none; mask-image: none; }
html:not(.motion) .act-slot > * { grid-area: auto; }
html:not(.motion) .act-slot { gap: 14px; }

/* == 7. SAFETY BY DESIGN == */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.bento__big { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.bento__big .h3 { margin-top: auto; margin-bottom: 10px; }
.bento__big p { max-width: 52ch; }

.bento__cell { padding: 20px; }
.bento__cell .h4 { font-size: 1.02rem; margin-bottom: 6px; }
.bento__cell p { font-size: 0.9rem; }
.inj { margin-bottom: 26px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: #080b11; }
.inj .inj__src { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--text-3); }
.inj__src svg { width: 14px; height: 14px; }
.inj__src span { color: var(--text-3); opacity: 0.8; }
.inj .inj__text { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.inj__text mark { color: #ffc2c2; background: linear-gradient(90deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.2)) no-repeat 0 0 / 0% 100%; transition: background-size 1.3s var(--ease-in-out) 0.25s; }
.bento__big.is-in .inj__text mark, html:not(.motion) .inj__text mark { background-size: 100% 100%; }
.inj__out { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.inj__out .chip svg { width: 12px; height: 12px; }
html.motion .bento__big .inj__out .chip { opacity: 0; transform: translateY(6px) scale(0.92); transition: opacity 0.5s, transform 0.6s var(--ease-spring); }
html.motion .bento__big.is-in .inj__out .chip { opacity: 1; transform: none; }
html.motion .bento__big.is-in .inj__out .chip:nth-child(1) { transition-delay: 1.3s; }
html.motion .bento__big.is-in .inj__out .chip:nth-child(2) { transition-delay: 1.5s; }
html.motion .bento__big.is-in .inj__out .chip:nth-child(3) { transition-delay: 1.7s; }

.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nums .stat { padding: 28px 24px; border-left: 1px solid var(--line); }
.nums .stat:first-child { border-left: 0; padding-left: 0; }
.nums .stat__num .unit { font-size: 0.5em; letter-spacing: -0.02em; }

@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__big { grid-row: auto; }
  .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nums .stat { padding: 22px 18px; }
  .nums .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .nums .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .bento { gap: 10px; }
  .bento__big { padding: 16px; }
  .inj { padding: 13px; margin-bottom: 18px; }
  .inj .inj__text { font-size: 11.5px; }
  .bento__cell { padding: 14px; }
  .bento__cell .icon-box { margin-bottom: 10px; }
  .bento__cell .h4 { font-size: 0.92rem; }
  .bento__cell p { font-size: 0.8rem; line-height: 1.45; }
  .nums .stat { padding: 18px 12px; }
  .nums .stat__label { font-size: 0.8rem; }
}

/* == 8. VOICE + AI SUMMARY E-MAIL == */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.duo__col { display: grid; gap: 26px; align-content: start; }
.duo__copy .h3 { margin-bottom: 10px; }
.duo__copy .tags { margin-top: 18px; }
.duo__aside { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; }
.duo__aside svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--pa); }
.voice__viz { position: relative; display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 356px; padding: 28px 22px 22px; border-radius: var(--radius-l); border: 1px solid var(--line); background: radial-gradient(80% 70% at 50% 0%, rgba(var(--pa-rgb), 0.17), transparent 70%), var(--bg-elev); overflow: hidden; }
.voice__mic { position: relative; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; color: #0b0718; background: var(--pa); box-shadow: 0 0 44px -6px rgba(var(--pa-rgb), 0.95); }
.voice__mic svg { position: relative; width: 26px; height: 26px; stroke-width: 2; }
.voice__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--pa-rgb), 0.7); animation: ai-ring2 2.4s var(--ease-out) infinite; }
.voice__ring--2 { animation-delay: 1.2s; }
@keyframes ai-ring2 { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.3); opacity: 0; } }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 58px; }
.wave i { --a: 0.45; width: 4px; height: 100%; border-radius: 3px; background: linear-gradient(180deg, #d6caff, var(--pa)); transform: scaleY(0.12); animation: ai-wave 1.1s ease-in-out infinite; }
.wave i:nth-child(n+6):nth-child(-n+23) { --a: 0.75; }
.wave i:nth-child(n+10):nth-child(-n+19) { --a: 1; }
.wave i:nth-child(2n) { animation-duration: 0.9s; animation-delay: -0.3s; }
.wave i:nth-child(3n) { animation-duration: 1.3s; animation-delay: -0.6s; }
.wave i:nth-child(5n) { animation-duration: 0.75s; animation-delay: -0.15s; }
.wave i:nth-child(7n) { animation-delay: -0.9s; }
@keyframes ai-wave { 0%, 100% { transform: scaleY(0.12); } 50% { transform: scaleY(var(--a)); } }
.voice__meta { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.voice__rec { display: inline-flex; align-items: center; gap: 7px; color: var(--bad); }
.route { position: relative; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin-top: 6px; }
.route::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 18px; height: 1px; background: linear-gradient(90deg, rgba(var(--pa-rgb), 0.75), rgba(var(--pa-rgb), 0.25)); }
.route::after { content: ""; position: absolute; left: 12.5%; top: 15px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--pa), 0 0 18px var(--pa); animation: ai-route 3.2s var(--ease-in-out) infinite; }
@keyframes ai-route { 0% { left: 12.5%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 87.5%; opacity: 0; } }
.route li { position: relative; display: grid; justify-items: center; gap: 7px; text-align: center; font-size: 11.5px; line-height: 1.3; color: var(--text-2); }
.route li svg { width: 37px; height: 37px; padding: 9px; border-radius: 11px; color: var(--text); background: #0d121c; border: 1px solid var(--line-strong); }
.route li:nth-child(3) svg { color: var(--pa); border-color: rgba(var(--pa-rgb), 0.45); box-shadow: 0 0 22px -6px rgba(var(--pa-rgb), 0.8); }

.mail { border-radius: var(--radius-l); border: 1px solid var(--line-strong); background: #0b0f17; overflow: hidden; box-shadow: 0 50px 110px -45px rgba(0, 0, 0, 0.95), 0 30px 90px -55px rgba(var(--pa-rgb), 0.5); }
.mail__bar { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 14px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #121826, #0d121c); }
.mail__meta { display: grid; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text); }
.mail__meta span { display: inline-block; width: 70px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.mail__body { display: grid; gap: 15px; padding: 18px; }
.mb { --q: clamp(0, (var(--p) - var(--o, 0)) * 6, 1); opacity: var(--q); transform: translate3d(0, calc((1 - var(--q)) * 16px), 0); }
.mb--1 { --o: 0.28; }
.mb--2 { --o: 0.4; }
.mb--3 { --o: 0.52; }
.mb--4 { --o: 0.64; }
.mb__k { margin-bottom: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pa); }
.mb__k--warn { color: var(--warn); }
.mb__h { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.38; color: var(--text); }
.mb ul { display: grid; gap: 3px; padding-left: 18px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.mb li::marker { color: var(--text-3); }
.mb--pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mail__kf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mail__kf div { display: grid; padding: 10px 12px; border-left: 1px solid var(--line); }
.mail__kf div:first-child { border-left: 0; }
.mail__kf b { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); }
.mail__kf small { font-size: 10.5px; color: var(--text-3); }
.ai-more__note { margin-top: 28px; }

@media (max-width: 900px) {
  .duo { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}
@media (max-width: 640px) {
  .duo__col { gap: 20px; }
  .voice__viz { min-height: 0; padding: 22px 12px 18px; gap: 12px; }
  .voice__mic { width: 56px; height: 56px; }
  .wave { height: 44px; gap: 3px; }
  .wave i { width: 3px; }
  .route li { font-size: 10.5px; }
  .route li svg { width: 33px; height: 33px; padding: 8px; }
  .route::before, .route::after { top: 16px; }
  .route::after { top: 13px; }
  .mail__meta { padding: 12px 14px; font-size: 12px; }
  .mail__body { padding: 14px; gap: 12px; }
  .mb__h { font-size: 0.95rem; }
  .mb ul { font-size: 12.5px; }
  .mb--pair { gap: 10px; }
  .mail__kf div { padding: 8px 9px; }
  .mail__kf b { font-size: 1rem; }
  .mail__kf small { font-size: 9.5px; }
}

/* == 9. FAQ == */
@media (max-width: 640px) {
  .ai-faq .faq__item { padding: 18px 0; }
  .ai-faq .faq__item dt { font-size: 1.02rem; }
  .ai-faq .faq__item dd { font-size: 0.92rem; line-height: 1.55; }
}
.faq__item dd a { color: var(--pa); text-decoration: underline; text-decoration-color: rgba(var(--pa-rgb), 0.4); text-underline-offset: 3px; }
.faq__item dd a:hover { text-decoration-color: var(--pa); }
.ai-faq .section-head .lead a { white-space: nowrap; }

/* == Phone alignment pass == */
.flow > *, .act > * { transition: opacity 0.45s, filter 0.6s, border-color 0.6s, box-shadow 0.6s, transform 0.9s var(--ease-out); }
html.motion .flow > .is-out, html.motion .act > .is-out { opacity: 0 !important; }
@media (max-width: 900px) {
  html.motion .flow-stage, html.motion .act-stage { aspect-ratio: auto; width: 100%; height: 100%; max-height: 48svh; }
}
@media (max-width: 640px) {
  .fm { flex-wrap: wrap; row-gap: 8px; }
  .fm__main { flex-basis: 100%; }
  .tix__item { transform: translate3d(0, calc((1 - var(--q)) * 12px), 0); }
}
@media (max-width: 900px) and (max-height: 760px) {
  .flow-story .story__panel .lead, .act-story .story__panel .lead { font-size: 0.95rem; line-height: 1.5; }
  .flow-story .story-h, .act-story .story-h { font-size: 1.4rem; margin-bottom: 10px; }
  .flow-story .eyebrow, .act-story .eyebrow { margin-bottom: 10px; }
  .story__dots { margin-top: 12px; }
  .act-card { padding: 11px 12px; }
  .act-card__top { margin-bottom: 6px; }
  .act-card__title { font-size: 0.9rem; margin-bottom: 6px; }
  .act-card__list > div { padding: 4px 0; grid-template-columns: 52px minmax(0, 1fr); font-size: 11.5px; line-height: 1.4; }
  .act-card__foot { margin-top: 8px; }
  .abtn { height: 30px; }
  .act-checks li { font-size: 12.5px; }
  .act-scope { gap: 6px; }
  .scope { padding: 9px 11px; }
  .scope__k { margin-bottom: 6px; }
  .scope ul { gap: 4px; }
  .scope li { font-size: 11.5px; gap: 7px; }
  .scope li svg { width: 14px; height: 14px; }
  .scope--never ul { row-gap: 4px; }
}
/* Hero H1: CSS-only entrance so it paints with the first frame (good LCP) */
html.motion .ai-h1-in { animation: ai-h1 1.1s var(--ease-out) both; }
@keyframes ai-h1 { from { opacity: 0.01; transform: translate3d(0, 24px, 0); } }
