/* ============ MEDGE — site styles ============ */
:root {
  --glass: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  --glass-line: rgba(214,160,255,.15);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,.07);
  --sec-y: clamp(80px, 10vw, 140px);
  --gap: clamp(14px, 1.4vw, 18px);
  --text-2: #c3b5d6;   /* a touch brighter than the token for AA contrast on glass */
  --text-3: #9284a8;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--f-body); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--neon); color: #fff; }
[hidden] { display: none !important; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: min(1320px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 3000; padding: 10px 16px; border-radius: 10px; background: #fff; color: #12061c; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

/* focus: always visible for keyboard users */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
.btn:focus-visible, .chip:focus-visible { border-radius: 999px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }

/* ---------- ambient layers ---------- */
#bg-noise { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 99; opacity: .1;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.2) 2px 3px); }
.grid-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); opacity: .45; }
#progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 600; pointer-events: none; }
#progress i { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px rgba(210,60,255,.8); }

/* ---------- cursor ---------- */
#cursor, #cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 1000; border-radius: 50%; transform: translate(-50%, -50%); display: none; }
.has-cursor #cursor, .has-cursor #cursor-dot { display: block; }
#cursor { width: 38px; height: 38px; border: 1px solid rgba(210,60,255,.7); transition: width .25s var(--ease), height .25s var(--ease), background .25s, border-color .25s; mix-blend-mode: screen; }
#cursor-dot { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
#cursor.is-hover { width: 70px; height: 70px; background: rgba(210,60,255,.12); border-color: var(--cyan); }
#cursor .lbl { position: absolute; inset: 0; display: grid; place-items: center; font: 600 12px var(--f-mono); letter-spacing: .12em; color: #fff; opacity: 0; text-transform: uppercase; }
#cursor.has-label .lbl { opacity: 1; }

/* ---------- preloader ---------- */
#boot { position: fixed; inset: 0; z-index: 2000; background: var(--bg); display: grid; place-items: center; }
#boot .boot-inner { width: min(560px, 90vw); font: 14.5px/1.9 var(--f-mono); color: var(--text-2); }
#boot .boot-logo { width: 200px; height: auto; margin-bottom: 28px; filter: drop-shadow(0 0 20px rgba(210,60,255,.6)); }
#boot .boot-line { opacity: 0; white-space: normal; overflow-wrap: anywhere; padding-left: 7ch; text-indent: -7ch; line-height: 1.6; margin-bottom: 4px; }
#boot .boot-line b { color: var(--green); font-weight: 500; }
#boot .boot-bar { margin-top: 22px; height: 2px; background: var(--surface-2); position: relative; overflow: hidden; }
#boot .boot-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--grad); box-shadow: var(--glow); }
#boot .boot-pct { margin-top: 10px; display: flex; justify-content: space-between; color: var(--text-3); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 500; padding: 18px 0; transition: background .4s, padding .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(6,3,14,.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; }
.nav-logo img { height: 46px; width: auto; filter: drop-shadow(0 0 10px rgba(210,60,255,.45)); }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { white-space: nowrap; font: 500 16px var(--f-body); color: var(--text-2); padding: 11px 15px; border-radius: 999px; transition: color .2s, background .2s; position: relative; }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--surface-2); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.nav-status { font: 500 15px var(--f-mono); letter-spacing: .14em; color: var(--green); display: flex; align-items: center; gap: 8px; text-transform: uppercase; white-space: nowrap; }
.nav-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.btn { --b: var(--line-strong); display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font: 600 14px var(--f-body); border: 1px solid var(--b); background: rgba(255,255,255,.04); position: relative; overflow: hidden; transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; isolation: isolate; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .3s; z-index: -1; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn:hover { border-color: transparent; box-shadow: var(--glow); }
.btn:hover::before { opacity: 1; }
.btn:hover::after { transform: translateX(120%); }
.btn--solid { background: var(--grad); border-color: transparent; box-shadow: var(--glow); color: #fff; }
.btn--solid::before { background: linear-gradient(110deg, #22e1ff, #7c5cff, #ff4fd8); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--sm { padding: 9px 16px; font-size: 15px; }
.btn--sm svg { width: 14px; height: 14px; }
.nav .nav-cta { padding: 14px 26px; font-size: 16px; }
.nav-burger { display: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); margin-left: auto; }
.nav-burger span { display: block; width: 16px; height: 1.5px; background: var(--text); margin: 4px auto; transition: transform .3s; }
.nav.is-open .nav-burger span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav.is-open .nav-burger span:last-child { transform: translateY(-2.75px) rotate(-45deg); }
@media (max-width: 1500px) { .nav-status { display: none; } }
@media (max-width: 1300px) {
  .nav-links, .nav .nav-cta { display: none; }
  .nav-burger { display: block; }
  /* 7 Nov: the open menu is a full-screen opaque sheet (the hero buttons used to show right under a half-height panel) */
  .nav.is-open { background: #0a0614; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--line); }
  .nav.is-open .nav-links { display: flex; position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 84px 20px max(28px, env(safe-area-inset-bottom, 0px)); background: #0a0614; border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; overscroll-behavior: contain; max-height: none; }
  .nav.is-open .nav-logo, .nav.is-open .nav-burger, .nav.is-open .tour-fab { position: relative; z-index: 2; }
  .nav.is-open .nav-links a { font-size: 19px; padding: 14px 16px; }
  .nav.is-open .nav-links a { font-size: 17px; padding: 13px 16px; }
}

/* ---------- section scaffolding ---------- */
section { position: relative; }
.sec { padding: var(--sec-y) 0; }
.sec--tight { padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 72px); }
.sec--flush-top { padding-top: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13.5px var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; box-shadow: 0 0 8px currentColor; transform-origin: left; }
.sec-head .eyebrow::before { transform: scaleX(.2); transition: transform 1s var(--ease) .1s, width 1s var(--ease) .1s; }
.sec-head.lit .eyebrow::before { transform: scaleX(1); width: 38px; }
.eyebrow .idx { color: var(--text-3); }
.h-xl { font: 800 clamp(40px, 7.2vw, 112px)/.94 var(--f-display); letter-spacing: -.035em; margin: 0; text-transform: uppercase; }
.h-lg { font: 700 clamp(32px, 4.8vw, 68px)/1.02 var(--f-display); letter-spacing: -.03em; margin: 16px 0 0; }
.lead { font-size: clamp(16px, 1.3vw, 19px); color: var(--text-2); max-width: 560px; margin: 20px 0 0; line-height: 1.6; }
.sec-head { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 24px 56px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .lead { margin: 0; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }
.reveal-line { display: block; overflow: hidden; padding-bottom: .04em; }
.reveal-line > span { display: inline-block; will-change: transform; }
.sub-h { margin: clamp(48px, 6vw, 72px) 0 22px; font: 500 14.5px var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 14px; }
.sub-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
h3 { margin: 0; }

/* ---------- glass system (shared by every card) ---------- */
.glass { position: relative; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--glass-hi); transition: border-color .35s, transform .45s var(--ease), box-shadow .35s, background .35s; isolation: isolate; }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--acc, #d23cff) 18%, transparent), transparent 55%); }
.glass::after { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: linear-gradient(90deg, transparent, var(--acc, var(--neon)), var(--cyan), transparent); box-shadow: 0 0 12px var(--acc, var(--neon)); }
.glass:hover { border-color: color-mix(in srgb, var(--acc, #d23cff) 45%, transparent); box-shadow: var(--glass-hi), 0 24px 60px rgba(0,0,0,.35), 0 0 40px color-mix(in srgb, var(--acc, #d23cff) 10%, transparent); }
.glass:hover::before, .glass:hover::after { opacity: 1; }

/* ---------- HUD bits ---------- */
.hud-corners { position: absolute; inset: 0; pointer-events: none; }
.hud-corners::before, .hud-corners::after { content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid var(--cyan); opacity: .7; }
.hud-corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-corners::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 13.5px var(--f-mono); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); background: rgba(255,255,255,.025); white-space: nowrap; }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.chip:nth-child(2) .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.chip:nth-child(3) .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* ---------- HERO ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 120px 0 90px; }
#hero-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.no-webgl #hero-gl { background: radial-gradient(circle at 74% 44%, rgba(210,60,255,.45), transparent 28%), radial-gradient(circle at 74% 44%, rgba(34,225,255,.25), transparent 42%), linear-gradient(transparent 62%, rgba(124,92,255,.18)); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 26vh; background: linear-gradient(transparent, var(--bg)); z-index: 1; pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(4,2,10,.86) 0%, rgba(4,2,10,.6) 34%, rgba(4,2,10,.08) 62%, transparent 100%), radial-gradient(ellipse 55% 65% at 20% 58%, rgba(4,2,10,.55), transparent 70%); }
.hero-frame { position: absolute; inset: 96px 3vw 34px; z-index: 1; pointer-events: none; }
.hero-frame i { position: absolute; width: 28px; height: 28px; border: 1px solid rgba(34,225,255,.45); }
.hero-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hero-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hero-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.hero-kicker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-sub { display: grid; grid-template-columns: minmax(0, 540px) auto; gap: 40px; align-items: end; margin-top: 34px; }
.hero-sub p { margin: 0; font-size: clamp(16px, 1.35vw, 19px); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1100px) { .hero-sub { grid-template-columns: 1fr; gap: 26px; } }
.hero-hud { position: absolute; z-index: 2; font: 500 14px/1.8 var(--f-mono); letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; }
.hero-hud b { color: var(--cyan); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-hud.tl { top: 116px; right: calc(3vw + 22px); text-align: right; }
.hero-hud.bl { bottom: 52px; left: calc(3vw + 22px); }
.hero-hud.br { bottom: 52px; right: calc(3vw + 22px); text-align: right; }
.scroll-cue { display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(var(--cyan), transparent); animation: cue 1.8s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 760px) { .hero-hud.tl, .hero-hud.br, .hero-frame { display: none; } }
/* contrast: headline always reads over the WebGL scene */
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.9); }
.hero h1 .grad-text { background: linear-gradient(100deg, #ff7be5 0%, #e98bff 40%, #a9b6ff 70%, #6ff0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.95)) drop-shadow(0 0 28px rgba(210,60,255,.35)); }
.hero-sub p { color: #e6dbf5; text-shadow: 0 1px 12px rgba(0,0,0,.9); }
.hero-sub p .hl { color: #fff; font-weight: 600; }
.hero .chip { background: rgba(10,6,20,.7); color: #e6dbf5; border-color: var(--line-strong); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (max-width: 860px) { .hero::before { background: linear-gradient(180deg, rgba(4,2,10,.35), rgba(4,2,10,.82) 46%, rgba(4,2,10,.55)); } }
@media (max-width: 560px) {
  .h-xl { font-size: 10.4vw; }
  .hero { padding-top: 104px; align-items: flex-end; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding: 20px 0; overflow: hidden; background: linear-gradient(90deg, rgba(210,60,255,.05), rgba(34,225,255,.05)); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 52px; width: max-content; animation: mq 50s linear infinite; }
.marquee span { font: 600 clamp(15px, 1.5vw, 21px) var(--f-display); letter-spacing: -.01em; color: var(--text-2); display: flex; align-items: center; gap: 52px; white-space: nowrap; }
.marquee span::after { content: "✦"; color: var(--neon); font-size: .7em; text-shadow: 0 0 12px var(--neon); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--glass-line); border-radius: var(--r); overflow: hidden; background: var(--glass); box-shadow: var(--glass-hi); }
.stat { padding: 30px 24px; border-right: 1px solid var(--line); position: relative; }
.stat::before { content: ""; position: absolute; left: 24px; top: 0; width: 28px; height: 2px; background: var(--grad); box-shadow: 0 0 10px rgba(210,60,255,.7); }
.stat:last-child { border-right: 0; }
.stat .n { font: 700 clamp(28px, 2.8vw, 42px)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: 10px; font: 500 13.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, 1fr); } .stat:nth-child(3) { border-right: 0; } .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); padding: 22px 16px; } .stat::before { left: 16px; } .stat:nth-child(2n) { border-right: 0 !important; } }

/* ---------- clients ---------- */
.clients-head { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin: clamp(48px, 6vw, 80px) 0 26px; }
.clients-head p { margin: 0; color: var(--text-2); font-size: 16px; max-width: 760px; }
.clients-head b { color: var(--text); font-weight: 600; }
/* owner, 12 Nov 2026: Mega Switchgears group logo above "Trusted by" */
.group-of { display: inline-flex; align-items: center; gap: 12px; margin: clamp(48px, 6vw, 80px) 0 0; color: var(--text-3); font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.group-of img { height: 32px; width: auto; display: block; }
.group-of:hover { color: var(--text-2); }
.group-of + .clients-head { margin-top: 22px; }
@media (max-width: 560px) { .group-of { gap: 10px; font-size: 11px; } .group-of img { height: 28px; } }
.logo-rail { display: grid; gap: 14px; padding: 6px 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; gap: 14px; width: max-content; margin: 0; padding: 0; list-style: none; animation: mq 70s linear infinite; }
.logo-track.rev { animation-direction: reverse; animation-duration: 80s; }
.logo-rail:hover .logo-track { animation-play-state: paused; }
.logo { flex: none; height: 76px; min-width: 150px; padding: 0 30px; display: grid; place-items: center; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-hi); transition: border-color .3s, background .3s, box-shadow .3s; }
.logo img { height: 38px; width: auto; max-width: 190px; object-fit: contain; opacity: .62; transition: opacity .3s, filter .3s; }
.logo:hover { border-color: rgba(210,60,255,.45); background: rgba(210,60,255,.07); box-shadow: 0 0 30px rgba(210,60,255,.18); }
.logo:hover img { opacity: 1; filter: drop-shadow(0 0 10px rgba(210,60,255,.7)); }
.industries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
@media (max-width: 640px) { .logo { height: 60px; min-width: 112px; padding: 0 20px; } .logo img { height: 28px; max-width: 140px; } }

/* ---------- problems ---------- */
.probs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1000px) { .probs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .probs { grid-template-columns: 1fr; } }
.prob { --acc: #ff4d6d; padding: 24px 24px 22px; display: flex; flex-direction: column; }
.prob-top { display: flex; justify-content: space-between; align-items: center; }
.prob .num { font: 500 13.5px var(--f-mono); color: var(--text-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px 4px 7px; border-radius: 999px; }
.pill svg { width: 12px; height: 12px; stroke: currentColor; }
.pill.bad { color: #ff9fb0; background: rgba(255,77,109,.1); border: 1px solid rgba(255,77,109,.3); }
.pill.good { color: var(--green); background: rgba(46,230,166,.08); border: 1px solid rgba(46,230,166,.3); }
.prob h3 { margin: 16px 0 10px; font: 600 20px/1.2 var(--f-display); letter-spacing: -.02em; }
.prob .pain { margin: 0 0 18px; color: #ffb3c1; font-size: 14.5px; }
.prob .fix { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.prob .fix p { margin: 10px 0 0; color: var(--text); font-size: 14.5px; }
.prob:hover { --acc: #2ee6a6; }



/* ---------- capabilities ---------- */

/* ---------- applications ---------- */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1000px) { .apps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .apps { grid-template-columns: 1fr; } }
.app { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 18px; align-items: start; }
.app:hover { transform: translateY(-4px); }
.app .pic { width: 92px; height: 92px; border-radius: 16px; background: radial-gradient(circle at 50% 35%, #ffffff, #e6dcf0 70%, #cbb9dc); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 10px 30px rgba(0,0,0,.45), 0 0 0 4px rgba(210,60,255,.08); transition: box-shadow .4s, transform .5s var(--ease); }
.app:hover .pic { transform: translateY(-2px) rotate(-2deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 14px 36px rgba(0,0,0,.5), 0 0 0 4px rgba(210,60,255,.25), 0 0 30px rgba(210,60,255,.3); }
.app .pic img { max-width: 86%; max-height: 86%; object-fit: contain; }
.app .pic.glyph { background: linear-gradient(135deg, rgba(210,60,255,.3), rgba(34,225,255,.18)); }
.app .pic.glyph svg { width: 42px; height: 42px; stroke: #fff; }
.app h3 { margin: 2px 0 6px; font: 600 17px/1.25 var(--f-display); letter-spacing: -.02em; }
.app p { margin: 0 0 12px; font-size: 15.5px; color: var(--text-2); }
.app-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.app-links a, .app-links span { font: 500 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); transition: border-color .2s, background .2s, color .2s; }
.app-links .dl { color: var(--cyan); }
.app-links .dl:hover { border-color: var(--cyan); background: rgba(34,225,255,.08); }
.app-links .ref { color: var(--amber); border-color: rgba(255,181,71,.3); }
.app-links .live-l { display: inline-flex; align-items: center; gap: 7px; color: var(--green); border-color: rgba(46,230,166,.35); background: rgba(46,230,166,.06); }
.app-links .live-l:hover { background: rgba(46,230,166,.16); border-color: var(--green); }
.app-links .live-l i, .live-b i, .lshot .bar em i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }

/* ---------- LIVE PLATFORMS ---------- */
.live-sec { overflow: clip; }
.live-glow { position: absolute; inset: 10% -10% auto; height: 70%; pointer-events: none; background: radial-gradient(ellipse 40% 50% at 20% 50%, rgba(255,79,216,.12), transparent 70%), radial-gradient(ellipse 40% 50% at 55% 50%, rgba(255,181,71,.08), transparent 70%), radial-gradient(ellipse 40% 50% at 85% 50%, rgba(34,225,255,.1), transparent 70%); filter: blur(10px); }
.live { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); perspective: 1600px; }
@media (max-width: 1100px) { .live { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; } }
.lcard { display: flex; flex-direction: column; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 7%, transparent), rgba(255,255,255,.015) 40%); box-shadow: var(--glass-hi), 0 30px 80px rgba(0,0,0,.4); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s, border-color .4s; }
.lcard:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--acc) 65%, transparent); box-shadow: var(--glass-hi), 0 40px 100px rgba(0,0,0,.5), 0 0 60px color-mix(in srgb, var(--acc) 22%, transparent); }
.lshot { position: relative; display: block; margin: 12px 12px 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); background: #0b0716; }
.lshot .bar { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.035); font: 500 12.5px var(--f-mono); color: var(--text-3); }
.lshot .bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.16); }
.lshot .bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lshot .bar em { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-style: normal; color: var(--green); letter-spacing: .12em; }
.lshot .scr { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.lshot .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity .9s, transform 6s linear; }
.lshot .scr img.on { opacity: 1; transform: scale(1.05); }
.lshot .scan, .holo .scan { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, rgba(34,225,255,.1) 50%, transparent); height: 30%; animation: scan 5s linear infinite; pointer-events: none; mix-blend-mode: screen; }
.lshot::after { content: "Launch ↗"; position: absolute; inset: 28px 0 0; display: grid; place-items: center; font: 700 15px var(--f-display); letter-spacing: .02em; color: #fff; background: radial-gradient(circle, color-mix(in srgb, var(--acc) 35%, transparent), rgba(4,2,10,.55)); opacity: 0; transition: opacity .35s; }
.lshot:hover::after, .lshot:focus-visible::after { opacity: 1; }
.lbody { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lbody .lk { font: 600 13px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.lbody h3 { font: 700 clamp(22px, 1.9vw, 27px)/1.1 var(--f-display); letter-spacing: -.025em; }
.lbody p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.lbody .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.lbody .btn { align-self: flex-start; margin-top: auto; }

/* ---------- MIRA + OLLIE ---------- */
.ollie-sec { overflow: clip; }
.ollie-sec .orb { position: absolute; width: 900px; height: 900px; border-radius: 50%; left: -200px; top: 50%; transform: translateY(-50%); background: radial-gradient(circle, rgba(133,0,131,.45), rgba(133,0,131,0) 62%); filter: blur(20px); pointer-events: none; }
.ollie-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; position: relative; }
@media (max-width: 960px) { .ollie-grid { grid-template-columns: 1fr; } }
.ollie-stage { position: relative; aspect-ratio: 1; max-width: 600px; width: 100%; margin-inline: auto; display: grid; place-items: center; }
.ollie-stage .ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-strong); }
.ollie-stage .ring.r1 { inset: 6%; animation: spin 40s linear infinite; border-style: dashed; }
.ollie-stage .ring.r2 { inset: 16%; border-color: rgba(34,225,255,.25); animation: spin 26s linear infinite reverse; }
.ollie-stage .ring.r3 { inset: 0; border: 0; background: conic-gradient(from 0deg, transparent 0 70%, rgba(210,60,255,.5) 85%, transparent 100%); -webkit-mask: radial-gradient(circle, transparent 69.5%, #000 70%, #000 70.6%, transparent 71%); mask: radial-gradient(circle, transparent 69.5%, #000 70%, #000 70.6%, transparent 71%); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ollie-stage .pad { position: absolute; bottom: 9%; width: 52%; height: 12%; border-radius: 50%; background: radial-gradient(ellipse, rgba(210,60,255,.55), transparent 70%); filter: blur(6px); }
.ollie-stage .holo-beam { position: absolute; bottom: 14%; width: 40%; height: 70%; background: linear-gradient(to top, rgba(210,60,255,.25), transparent); clip-path: polygon(30% 100%, 70% 100%, 100% 0, 0 0); filter: blur(2px); opacity: .55; }
#ollie-canvas-host { position: relative; z-index: 2; width: 100%; aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; }
#ollie-canvas-host canvas, #ollie-canvas-host img { width: 100% !important; height: 100% !important; }
.ollie-tag { position: absolute; z-index: 3; font: 500 13px var(--f-mono); letter-spacing: .1em; color: var(--text-2); padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(10,6,20,.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-transform: uppercase; }
.ollie-tag b { color: var(--amber); font-weight: 500; }
.ollie-tag.t1 { top: 12%; left: 0; } .ollie-tag.t2 { top: 34%; right: -2%; } .ollie-tag.t3 { bottom: 18%; left: 2%; }
.ollie-hint { margin: 4px 0 12px; text-align: center; font: 500 13.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); position: relative; z-index: 3; }
.ollie-hint::before { content: "◎ "; }
.ollie-tricks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; position: relative; z-index: 3; }
.ollie-tricks button { font: 500 14.5px var(--f-mono); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(10,6,20,.7); transition: background .2s, border-color .2s, transform .2s; }
.ollie-tricks button:hover { border-color: var(--amber); background: rgba(255,181,71,.12); transform: translateY(-2px); }
.ollie-tricks button:active { transform: scale(.95); }

.chat { margin-top: 30px; border: 1px solid var(--line-strong); border-radius: 22px; background: rgba(10,6,20,.84); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 40px 120px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset, 0 0 60px rgba(210,60,255,.08); position: relative; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat-head .av { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #850083, #d23cff); display: grid; place-items: center; box-shadow: 0 0 18px rgba(210,60,255,.5); flex: none; }
.chat-head .av svg { width: 18px; height: 18px; }
.chat-head .nm { font: 600 15px var(--f-body); }
.chat-head .st { font: 500 13.5px var(--f-mono); color: var(--green); }
.chat-head .seg { margin-left: auto; display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); font: 500 14.5px var(--f-body); }
.chat-head .seg span { padding: 5px 12px; border-radius: 999px; color: var(--text-3); }
.chat-head .seg span.on { background: rgba(255,255,255,.1); color: var(--text); }
.chat-body { height: 340px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.msg { max-width: 86%; padding: 12px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; animation: msgIn .35s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.u { align-self: flex-end; background: linear-gradient(135deg, rgba(210,60,255,.28), rgba(124,92,255,.22)); border: 1px solid rgba(210,60,255,.35); border-bottom-right-radius: 4px; }
.msg.a { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.a .tool { font: 500 13.5px var(--f-mono); color: var(--green); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.msg.a ul { margin: 6px 0 0; padding-left: 18px; }
.msg.a b { color: #fff; }
.msg.a a { color: var(--cyan); text-decoration: underline; }
.msg.sys { align-self: center; font: 500 13.5px var(--f-mono); color: var(--amber); background: rgba(255,181,71,.08); border: 1px dashed rgba(255,181,71,.4); }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); animation: tp 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 50% { transform: translateY(-4px); opacity: .4; } }
/* chips keep clear of the perched owl on the right */
.chat-chips { display: flex; gap: 8px; padding: 0 calc(var(--perch, 75px) + 34px) 14px 18px; flex-wrap: wrap; min-height: calc(var(--perch, 75px) - 4px); align-content: flex-end; }
.chat-chips button { font-size: 15px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); transition: all .2s; text-align: left; }
.chat-chips button:hover { color: var(--text); border-color: var(--neon); background: rgba(210,60,255,.1); }
.chat-input { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); position: relative; }
.chat-field { position: relative; flex: 1; min-width: 0; display: flex; }
.chat-input input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; color: var(--text); font: 15px var(--f-body); outline: none; transition: border-color .2s, box-shadow .2s; }
.chat-input input:focus { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(210,60,255,.18); }
.chat-input > button { width: 46px; flex: none; border-radius: 12px; background: var(--grad); display: grid; place-items: center; transition: transform .2s, box-shadow .2s; }
.chat-input > button:hover { transform: translateY(-1px); box-shadow: var(--glow); }
/* Ollie perched on the right end of the input's top edge (feet on the border) */
.chat-perch { --ps: 75px; position: absolute; right: calc(12px - var(--ps) * .26); bottom: calc(100% - 1px); width: var(--ps); height: var(--ps); pointer-events: none; z-index: 4; }
.chat-perch canvas { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: calc(var(--ps) * 1.5) !important; height: calc(var(--ps) * 1.5) !important; }
.chat-perch img.ollie-flat { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.chat { --perch: 75px; }
@media (max-width: 640px) { .chat-perch { --ps: 62px; } .chat { --perch: 62px; } }
.chat-foot { padding: 0 18px 14px; font: 13.5px var(--f-mono); color: var(--text-3); }
.ollie-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.ollie-feats div { font-size: 14px; color: var(--text-2); padding: 12px 14px; border-left: 2px solid var(--amber); background: linear-gradient(90deg, rgba(255,181,71,.07), transparent); border-radius: 0 10px 10px 0; }
@media (max-width: 560px) { .ollie-feats { grid-template-columns: 1fr; } .ollie-tag { display: none; } .chat-head .seg { display: none; } .chat-body { height: 300px; } }

/* ---------- floating Ollie dock ---------- */
#ollie-dock { position: fixed; right: 22px; bottom: 18px; z-index: 450; width: 120px; height: 120px; cursor: pointer; transform: translateY(160%); transition: transform .7s var(--ease), opacity .4s; opacity: 0; border-radius: 50%; }
#ollie-dock.is-in { transform: none; opacity: 1; }
#ollie-dock canvas, #ollie-dock img { width: 100% !important; height: 100% !important; }
#ollie-dock .bubble { position: absolute; right: 92%; bottom: 72%; white-space: nowrap; font: 500 15px var(--f-body); padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: #fff; color: #1a0b22; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; transform: translateY(6px) scale(.96); transition: all .3s var(--ease); pointer-events: none; }
#ollie-dock .bubble.show { opacity: 1; transform: none; }
@media (max-width: 640px) { #ollie-dock { width: 84px; height: 84px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); } #ollie-dock .bubble { font-size: 14.5px; white-space: normal; width: max-content; max-width: 200px; } }

/* ---------- projects ---------- */
.feat { display: grid; gap: clamp(72px, 9vw, 128px); }
.case { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.feat > .case:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.feat > .case:nth-child(even) .case-media { order: 2; }
@media (max-width: 960px) { .feat > .case, .feat > .case:nth-child(even) { grid-template-columns: 1fr; } .feat > .case:nth-child(even) .case-media { order: 0; } }
.case-media { position: relative; perspective: 1400px; }
.case-media::before { content: ""; position: absolute; inset: -12% -8%; background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 30%, transparent), transparent); filter: blur(30px); z-index: -1; }
.case-media::after { content: attr(data-no); position: absolute; top: -0.55em; right: -0.1em; font: 800 clamp(90px, 12vw, 180px)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--acc) 45%, transparent); z-index: -1; letter-spacing: -.05em; pointer-events: none; }
.feat > .case:nth-child(even) .case-media::after { right: auto; left: -0.1em; }
@media (max-width: 640px) { .case-media::after { font-size: 76px; right: 0; } .feat > .case:nth-child(even) .case-media::after { left: 0; } }
.holo { position: relative; border-radius: 18px; border: 1px solid var(--line-strong); background: #0b0716; overflow: hidden; transform-style: preserve-3d; box-shadow: 0 50px 120px rgba(0,0,0,.55), 0 0 60px color-mix(in srgb, var(--acc, #d23cff) 22%, transparent); aspect-ratio: 16 / 10; }
.holo .bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03); font: 500 12.5px var(--f-mono); color: var(--text-3); }
.holo .bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.15); }
.holo .bar span { margin-left: 10px; letter-spacing: .08em; }
.holo .scr { position: absolute; inset: 30px 0 0; overflow: hidden; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 60%); }
.holo .scr img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: opacity .8s, transform 8s linear; }
.holo .scr img.k { position: absolute; inset: 0; opacity: 0; }
.holo .scr img.k.on { opacity: 1; transform: scale(1.06); }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(400%); } }
.play-btn { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: rgba(10,6,20,.55); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; }
.play-btn::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid var(--neon); animation: ping 2s infinite; }
@keyframes ping { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.play-btn svg { width: 26px; height: 26px; margin-left: 4px; fill: #fff; }
.play-btn:hover { transform: translate(-50%, -50%) scale(1.08); background: var(--neon); }
[data-video]:not(.has-film) { display: none !important; }
.case-meta { font: 500 13.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc, var(--cyan)); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.case-meta .no { color: var(--text-3); }
.case h3, .case .mtitle { font: 700 clamp(26px, 2.9vw, 40px)/1.06 var(--f-display); letter-spacing: -.03em; margin: 14px 0 12px; }
.case .client { font-size: 14px; color: var(--text-3); margin-bottom: 16px; }
.case p.pitch { font-size: 17px; color: var(--text-2); margin: 0 0 22px; }
.case ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 9px; }
.case li { font-size: 14.5px; color: var(--text-2); padding-left: 22px; position: relative; }
.case li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--acc, var(--neon)); box-shadow: 0 0 6px var(--acc, var(--neon)); }
.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.case-stats div { background: var(--bg-2); padding: 14px 12px; }
.case-stats b { display: block; font: 700 21px var(--f-display); letter-spacing: -.02em; color: var(--text); }
.case-stats span { font: 500 12.5px var(--f-mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 520px) { .case-stats { grid-template-columns: repeat(2, 1fr); } }
.case-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.more-head { margin: clamp(80px, 10vw, 140px) 0 28px; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: 500 14.5px var(--f-mono); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); letter-spacing: .06em; transition: border-color .2s, color .2s; }
.filters button:hover { border-color: var(--line-strong); color: var(--text); }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1000px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .pgrid { grid-template-columns: 1fr; } }
.pcard { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0; }
.pcard:hover { transform: translateY(-6px); }
.pcard .th { aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--acc) 40%, transparent), transparent 60%), #0b0716; position: relative; border-bottom: 1px solid var(--line); }
.pcard .th img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .8s var(--ease); opacity: .92; }
.pcard:hover .th img { transform: scale(1.06); }
.pcard .th .glyph { position: absolute; inset: 0; display: grid; place-items: center; font: 800 56px var(--f-display); color: color-mix(in srgb, var(--acc) 60%, white); opacity: .5; letter-spacing: -.04em; }
.live-b { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--f-mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--green); padding: 4px 9px; border-radius: 999px; background: rgba(4,2,10,.8); border: 1px solid rgba(46,230,166,.4); }
.pcard .bd { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .cat { font: 500 12.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.pcard h3 { font: 600 18px/1.25 var(--f-display); letter-spacing: -.02em; margin: 0; }
.pcard p { font-size: 14px; color: var(--text-2); margin: 0; }
.pcard .go { margin-top: auto; padding-top: 10px; font: 500 14.5px var(--f-mono); color: var(--text-3); display: flex; align-items: center; gap: 6px; transition: color .2s, gap .3s var(--ease); }
.pcard:hover .go { color: var(--text); gap: 10px; }

/* ---------- videos ---------- */
.theater { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-strong); background: #000; aspect-ratio: 16 / 9; box-shadow: 0 60px 160px rgba(124,92,255,.25); }
.theater video, .theater img.poster { width: 100%; height: 100%; object-fit: cover; }
.theater video { object-fit: contain; background: #000; }
.theater .ovl { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(18px, 3vw, 40px); background: linear-gradient(transparent 40%, rgba(4,2,10,.88)); pointer-events: none; }
.theater .ovl h3 { font: 700 clamp(20px, 3vw, 44px)/1.05 var(--f-display); margin: 6px 0 0; letter-spacing: -.03em; }
.theater .ovl p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; }
.theater.is-playing .ovl, .theater.is-playing .play-btn { display: none; }
@media (max-width: 560px) { .theater { border-radius: 16px; } .theater .play-btn { width: 64px; height: 64px; } .theater .ovl p { display: none; } .theater .ovl { background: linear-gradient(transparent 10%, rgba(4,2,10,.94) 66%); } } /* phones: the title sits on the poster art, so it needs a darker scrim */
.vgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
@media (max-width: 1000px) { .vgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .vgrid { grid-template-columns: repeat(2, 1fr); } }
.vthumb { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: #0b0716; cursor: pointer; transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; text-align: left; padding: 0; }
.vthumb:hover, .vthumb.on { border-color: var(--neon); transform: translateY(-3px); box-shadow: 0 0 30px rgba(210,60,255,.25); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.vthumb:hover img { transform: scale(1.05); }
.vthumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font: 600 15px/1.3 var(--f-body); background: linear-gradient(transparent, rgba(0,0,0,.88)); }
.vthumb em { position: absolute; top: 8px; right: 8px; font: 500 12.5px var(--f-mono); font-style: normal; padding: 3px 7px; border-radius: 6px; background: rgba(0,0,0,.65); }
.vthumb .pl { position: absolute; left: 50%; top: 42%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(10,6,20,.6) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 6v12l9-6z' fill='white'/></svg>") center / 18px no-repeat; border: 1px solid rgba(255,255,255,.4); opacity: 0; transition: opacity .3s; }
.vthumb:hover .pl { opacity: 1; }
@media (max-width: 640px) { .vthumb span { font-size: 14px; padding: 20px 9px 8px; } }

/* ---------- hardware ---------- */
.hw { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 1000px) { .hw { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .hw { grid-template-columns: 1fr; } }
.hw-card { padding: 22px; overflow: hidden; transform-style: preserve-3d; }
.hw-card .img { aspect-ratio: 1.15; min-height: 0; overflow: hidden; display: grid; place-items: center; position: relative; margin-bottom: 16px; }
.hw-card .img::before { content: ""; position: absolute; width: 70%; height: 16%; bottom: 8%; border-radius: 50%; background: radial-gradient(ellipse, rgba(210,60,255,.55), transparent 70%); filter: blur(8px); }
.hw-card .img::after { content: ""; position: absolute; inset: 10%; border-radius: 50%; border: 1px dashed var(--line-strong); animation: spin 30s linear infinite; }
.hw-card img { position: relative; z-index: 1; max-height: 82%; width: auto; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); transition: transform .6s var(--ease); }
.hw-card:hover img { transform: translateY(-8px) scale(1.04); }
.hw-card h3 { margin: 0 0 6px; font: 600 18px var(--f-display); letter-spacing: -.02em; }
.hw-card p { margin: 0 0 10px; font-size: 15.5px; color: var(--text-2); }
.hw-card .ports { font: 500 13.5px var(--f-mono); color: var(--cyan); }
.hw-card dl { margin: 14px 0 0; display: grid; gap: 6px; font-size: 15px; }
.hw-card dl div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
.hw-card dt { color: var(--text-3); font-family: var(--f-mono); font-size: 13.5px; }
.hw-card dd { margin: 0; text-align: right; color: var(--text); }
.pmx { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 860px) { .pmx { grid-template-columns: 1fr; } }
.pmx table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--glass-line); border-radius: var(--r); overflow: hidden; background: var(--glass); font-size: 14px; }
.pmx th { text-align: left; font: 500 13px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); padding: 12px 16px; background: rgba(210,60,255,.08); }
.pmx td { padding: 10px 16px; border-top: 1px solid var(--line); }
.pmx tr:hover td { background: rgba(210,60,255,.05); }
.pmx td b { font-weight: 500; color: var(--text-3); }
.pmx td b.y { color: var(--green); }
.pmx th:not(:first-child), .pmx td:not(:first-child) { text-align: center; white-space: nowrap; }
@media (max-width: 420px) { .pmx th, .pmx td { padding: 9px 10px; font-size: 15px; } .pmx th { font-size: 12.5px; letter-spacing: .06em; } }

/* brochures */
.bros { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; perspective: 1200px; }
@media (max-width: 420px) { .bros { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.bro { position: relative; display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--glass); transition: border-color .3s, box-shadow .3s; transform-style: preserve-3d; }
.bro:hover { border-color: var(--neon); box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 30px rgba(210,60,255,.25); }
.bro .pg { display: block; overflow: hidden; background: #fff; }
.bro img { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; transition: transform .7s var(--ease); }
.bro:hover img { transform: scale(1.05); }
.bro .cap-t { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.bro em { font: 500 12.5px var(--f-mono); font-style: normal; color: var(--cyan); white-space: nowrap; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.term { border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(6,3,12,.92); font: 15.5px/1.7 var(--f-mono); overflow: hidden; box-shadow: 0 0 60px rgba(210,60,255,.08); }
.term-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; color: var(--text-3); font-size: 13.5px; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term form { padding: 20px; display: grid; gap: 14px; }
.term label { display: grid; gap: 4px; color: var(--text-3); font-size: 14.5px; }
.term label span::before { content: "> "; color: var(--neon); }
.term input, .term textarea, .term select { background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); color: var(--text); font: 15px var(--f-mono); padding: 8px 0; outline: none; transition: border-color .2s; border-radius: 0; width: 100%; }
.term select option { background: #0a0614; }
.term input:focus, .term textarea:focus, .term select:focus { border-color: var(--cyan); }
.term textarea { resize: vertical; min-height: 90px; }
.term-send { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.term .ok { color: var(--green); font-size: 14.5px; min-height: 1.2em; }
.cinfo { display: grid; gap: 12px; align-content: start; }
.cinfo a { --acc: #22e1ff; display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: center; padding: 16px 18px; }
.cinfo a:hover { transform: translateX(4px); }
.cinfo .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(210,60,255,.12); border: 1px solid var(--line-strong); }
.cinfo .ic svg { width: 20px; height: 20px; stroke: var(--text); }
.cinfo small { display: block; font: 500 13px var(--f-mono); letter-spacing: .12em; color: var(--text-3); text-transform: uppercase; }
.cinfo strong { font-weight: 500; font-size: 15.5px; word-break: break-word; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 64px 0 36px; position: relative; overflow: hidden; }
footer::before { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--neon), var(--cyan), transparent); box-shadow: 0 0 16px var(--neon); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.foot-brand p { margin: 0; color: var(--text-2); font-size: 14px; max-width: 340px; }
.foot-grid nav { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.foot-grid nav b { font: 500 13.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.foot-grid nav a { transition: color .2s; width: fit-content; word-break: break-word; }
.foot-grid nav a:hover { color: var(--text); }
.foot-row { margin-top: 44px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font: 14.5px var(--f-mono); color: var(--text-3); }
.foot-row a:hover { color: var(--text); }
.foot-big { font: 800 clamp(64px, 17vw, 260px)/.8 var(--f-display); letter-spacing: -.05em; text-align: center; background: linear-gradient(180deg, rgba(210,60,255,.35), rgba(210,60,255,0)); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 30px 0 0; user-select: none; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 900; }
.modal .bk { position: absolute; inset: 0; background: rgba(2,1,6,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; }
.modal .box { position: absolute; inset: 4vh 4vw; border: 1px solid var(--line-strong); border-radius: 24px; background: #07040f; overflow-y: auto; overscroll-behavior: contain; opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .35s var(--ease), transform .45s var(--ease); box-shadow: 0 60px 160px rgba(0,0,0,.6), 0 0 80px rgba(210,60,255,.12); }
.modal.open .bk { opacity: 1; } .modal.open .box { opacity: 1; transform: none; }
@media (max-width: 640px) { .modal .box { inset: 0; border-radius: 0; } }
.modal .x, .vbox .x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(10,6,20,.85); display: grid; place-items: center; transition: background .2s, transform .2s; }
.modal .x:hover, .vbox .x:hover { background: var(--neon); transform: rotate(90deg); }
.modal .x { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 5; }
.modal .in { padding: clamp(22px, 4vw, 56px); }
.case--modal { display: block; }
.modal .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.modal .gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 30px; }
.modal .gal img, .modal .gal video { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #0b0716; }
.modal .gal .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .modal .gal { grid-template-columns: 1fr; } }
.modal .mhead { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
@media (max-width: 900px) { .modal .mhead { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- lightbox video ---------- */
.vbox { position: fixed; inset: 0; z-index: 950; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 4vw; opacity: 0; transition: opacity .3s; }
.vbox.open { opacity: 1; }
.vbox video { width: min(1400px, 100%); max-height: 86vh; border-radius: 14px; border: 1px solid var(--line-strong); background: #000; }
.vbox .x { position: absolute; top: max(18px, env(safe-area-inset-top)); right: 18px; z-index: 2; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track, .logo-track { animation: none !important; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track > [aria-hidden], .logo-track > [aria-hidden] { display: none; }
  .holo .scr img.k.on, .lshot .scr img.on { transform: none; }
}
.vgroup { grid-column: 1 / -1; margin: 18px 0 2px; font: 500 13.5px var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 12px; }
.vgroup::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.app-links .film-l { font: 500 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(210,60,255,.35); color: #e59bff; background: rgba(210,60,255,.07); transition: background .2s, border-color .2s; }
.app-links .film-l:hover { background: rgba(210,60,255,.18); border-color: var(--neon); }

/* =====================================================================
   STYLE A — calm, premium dark (owner choice, 19 Oct 2026)
   Medge purple on graphite, one cool accent (cyan) only for tiny data
   highlights, softer glow, quieter borders, cleaner display type.
   ===================================================================== */
:root {
  --bg: #07060b;
  --bg-2: #0d0b13;
  --neon: #a35cff;               /* Medge purple, lifted for dark */
  --neon-2: #8a63ff;             /* violet */
  --accent: #a35cff;
  --cyan: #6fd8f0;               /* data highlights only */
  --grad: linear-gradient(110deg, #c08bff 0%, #9a63ff 55%, #7d6bff 100%);
  --glow: 0 0 18px rgba(163,92,255,.22);
  --line: rgba(255,255,255,.07);
  --line-strong: rgba(255,255,255,.14);
  --glass: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  --glass-line: rgba(255,255,255,.08);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,.05);
  --text: #f3f1f7;
  --text-2: #bdb7c9;
  --text-3: #8e879c;
  --f-display: "Inter Tight", "Inter", system-ui, sans-serif;
}
body { background: var(--bg); }
#scanlines { display: none; }
#bg-noise { opacity: .025; }
.has-cursor #cursor, .has-cursor #cursor-dot { display: none; }
::selection { background: #7d4bd6; }

/* type: display face only for big headlines; Inter everywhere else */
.h-xl { font: 700 clamp(42px, 7vw, 112px)/.95 var(--f-display); letter-spacing: -.045em; }
.h-lg { font: 650 clamp(34px, 4.6vw, 66px)/1.02 var(--f-display); letter-spacing: -.04em; }
.app h3, .prob h3, .pcard h3, .hw-card h3, .lbody h3, .case h3, .case .mtitle, .theater .ovl h3, .stat .n, .case-stats b, .marquee span, .foot-big {
  font-family: var(--f-display);
}
.app h3, .prob h3, .pcard h3, .hw-card h3 { font-weight: 600; letter-spacing: -.02em; }
.case h3, .case .mtitle, .lbody h3, .theater .ovl h3 { font-weight: 650; letter-spacing: -.035em; }
.stat .n { font-weight: 600; letter-spacing: -.04em; }
.marquee span { font-weight: 500; color: var(--text-3); }
.marquee span::after { content: "·"; color: var(--text-3); text-shadow: none; font-size: 1em; }
.eyebrow { color: #c4a6ff; }
.eyebrow::before { box-shadow: none; opacity: .7; }

/* calmer hero */
.hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,.7); }
.hero h1 .grad-text { background: linear-gradient(100deg, #d9b8ff 0%, #b48bff 50%, #9a86ff 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 3px rgba(0,0,0,.8)); }
.hero-frame i { border-color: rgba(255,255,255,.14); }
.hero-hud b { color: var(--text-2); }
.chip .dot, .chip:nth-child(2) .dot, .chip:nth-child(3) .dot { background: #a35cff; box-shadow: none; }

/* fewer pulsing dots */
.nav-status i, .app-links .live-l i, .live-b i, .lshot .bar em i { animation: none; box-shadow: none; }
.nav-status { color: #9fe3c8; }
.nav-links a.is-active::after { background: #a35cff; box-shadow: none; }
#progress i { box-shadow: none; }

/* buttons */
.btn { background: rgba(255,255,255,.03); }
.btn--solid { background: linear-gradient(110deg, #8b4cf5, #7656f5); box-shadow: 0 8px 24px rgba(122,76,255,.25); }
.btn--solid::before { background: linear-gradient(110deg, #8441f0, #6f4ef3); }
.btn:hover { box-shadow: 0 8px 28px rgba(122,76,255,.28); }
.btn::after { display: none; }

/* one accent across cards (overrides per-project rainbow accents) */
.case, .pcard, .lcard, .prob, .cinfo a, .glass { --acc: #a35cff !important; }
.glass::after { opacity: 0 !important; }
.glass:hover { border-color: rgba(255,255,255,.16); box-shadow: var(--glass-hi), 0 18px 50px rgba(0,0,0,.35); }
.glass::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(163,92,255,.08), transparent 60%); }
.stat::before { box-shadow: none; opacity: .8; }
.case-media::before { opacity: .45; }
.case-media::after { -webkit-text-stroke-color: rgba(255,255,255,.07); }
.holo { box-shadow: 0 40px 100px rgba(0,0,0,.5); border-color: rgba(255,255,255,.1); }
.holo .scan, .lshot .scan { display: none; }
.play-btn::before { animation: none; border-color: rgba(255,255,255,.25); }
.play-btn:hover { background: #8f4dff; }
.case li::before { box-shadow: none; }
.hud-corners::before, .hud-corners::after { border-color: rgba(255,255,255,.2); }

/* problems: semantic but quiet */
.prob .pain { color: var(--text-2); }
.pill.bad { color: #f0a7b4; background: rgba(255,90,120,.06); border-color: rgba(255,90,120,.2); }
.pill.good { color: #9fe3c8; background: rgba(46,230,166,.05); border-color: rgba(46,230,166,.2); }
.prob .fix { border-top-color: rgba(255,255,255,.08); }

/* story: neutral callouts */

/* applications + live */
.app .pic { background: radial-gradient(circle at 50% 35%, #fbfafc, #e9e6ee 70%, #d8d3df); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 8px 24px rgba(0,0,0,.4); }
.app:hover .pic { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 10px 28px rgba(0,0,0,.45); transform: translateY(-2px); }
.app-links .dl { color: #cbb6ff; }
.app-links .dl:hover { border-color: rgba(163,92,255,.5); background: rgba(163,92,255,.08); }
.app-links .ref { color: var(--text-2); border-color: var(--line-strong); }
.app-links .film-l { color: #d2b8ff; border-color: rgba(163,92,255,.3); background: rgba(163,92,255,.06); }
.live-glow { display: none; }
.lcard { border-color: rgba(255,255,255,.09); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); box-shadow: var(--glass-hi), 0 24px 70px rgba(0,0,0,.4); }
.lcard:hover { border-color: rgba(163,92,255,.4); box-shadow: var(--glass-hi), 0 30px 80px rgba(0,0,0,.5); transform: translateY(-4px); }
.lshot { border-color: rgba(255,255,255,.1); }
.lshot::after { background: rgba(7,6,11,.55); }
.lbody .lk { color: #c4a6ff; }

/* MIRA + Ollie */
.ollie-sec .orb { background: radial-gradient(circle, rgba(133,0,131,.22), rgba(133,0,131,0) 62%); }
.ollie-stage .ring.r3 { animation-duration: 10s; opacity: .6; }
.ollie-stage .holo-beam { opacity: .3; }
.ollie-tag { border-color: rgba(255,255,255,.12); }
.ollie-tag b { color: #d2b8ff; }
.ollie-hint { color: #c4a6ff; }
.ollie-feats div { border-left-color: rgba(163,92,255,.6); background: linear-gradient(90deg, rgba(163,92,255,.06), transparent); }
.chat { box-shadow: 0 30px 90px rgba(0,0,0,.5); border-color: rgba(255,255,255,.12); }
.chat-head .av { background: linear-gradient(135deg, #850083, #a35cff); box-shadow: none; }
.chat-head .st { color: #9fe3c8; }
.msg.a .tool { color: #9fe3c8; }
.chat-input > button { background: linear-gradient(135deg, #8f4dff, #7a5cff); }

/* flow, tables, misc */
.pmx th { color: #c4a6ff; background: rgba(255,255,255,.03); }
.pmx td b.y { color: #b7a0ff; }
.hw-card .ports { color: #b9a6e8; }
.hw-card .img::before { background: radial-gradient(ellipse, rgba(163,92,255,.35), transparent 70%); }
.logo:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); box-shadow: none; }
.logo:hover img { filter: none; }
.vthumb:hover, .vthumb.on { border-color: rgba(163,92,255,.6); box-shadow: none; }
.theater { box-shadow: 0 40px 120px rgba(0,0,0,.5); border-color: rgba(255,255,255,.1); }
.bro:hover { border-color: rgba(163,92,255,.5); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.bro em, .vgroup { color: var(--text-3); }
.term { box-shadow: none; }
.term label span::before { color: #a35cff; }
.term input:focus, .term textarea:focus, .term select:focus { border-color: #a35cff; }
footer::before { background: linear-gradient(90deg, transparent, rgba(163,92,255,.6), transparent); box-shadow: none; }
.foot-big { background: linear-gradient(180deg, rgba(163,92,255,.18), rgba(163,92,255,0)); -webkit-background-clip: text; background-clip: text; }
:focus-visible { outline-color: #c4a6ff; }

/* ---------- VOICE TOUR ---------- */
.btn--tour { border-color: rgba(163,92,255,.45); background: rgba(163,92,255,.1); }
.hero-lang { flex-basis: 100%; display: flex; gap: 8px; margin-top: 4px; }
.hero-lang button, .tp-lang button { font: 500 15px var(--f-body); padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); background: rgba(10,8,16,.6); transition: border-color .2s, color .2s, background .2s; }
.hero-lang button[aria-pressed="true"], .tp-lang button[aria-pressed="true"] { color: #fff; border-color: rgba(163,92,255,.6); background: rgba(163,92,255,.18); }
.hero-lang button:hover, .tp-lang button:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.explain-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 7px 14px 7px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: var(--text-2); font: 500 15px var(--f-body); transition: border-color .2s, color .2s, background .2s; }
.explain-btn svg { width: 16px; height: 16px; color: #c4a6ff; }
.explain-btn:hover { color: var(--text); border-color: rgba(163,92,255,.5); background: rgba(163,92,255,.08); }
.hero-kicker .explain-btn, .clients-head .explain-btn { margin-top: 0; }
.hero-kicker .explain-btn { background: rgba(10,6,20,.7); }
.h-lg + .explain-btn { display: flex; width: fit-content; }

.tour-fab { position: fixed; z-index: 449; right: 150px; bottom: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 13px; border-radius: 999px; font: 600 15px var(--f-body); color: #fff; background: linear-gradient(110deg, #8f4dff, #7a5cff); box-shadow: 0 10px 30px rgba(0,0,0,.45); transform: translateY(160%); opacity: 0; transition: transform .6s var(--ease), opacity .4s; }
.tour-fab svg { width: 17px; height: 17px; }
.tour-fab.is-in { transform: none; opacity: 1; }
body.tour-on .tour-fab { transform: translateY(160%); opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .tour-fab { right: 100px; bottom: 26px; padding: 9px 13px 9px 11px; font-size: 14.5px; } }

#tour-dim { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: rgba(3,2,6,.5); opacity: 0; transition: opacity .6s; }
body.tour-dim #tour-dim { opacity: 1; }
body.tour-dim .tour-focus { position: relative; z-index: 41; }
.tour-focus { outline: 1px solid rgba(163,92,255,.45); outline-offset: -10px; border-radius: 22px; transition: outline-color .4s; }
.hero.tour-focus { outline-offset: -14px; }

#tour-panel { position: fixed; z-index: 470; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(620px, calc(100% - 24px)); transform: translate(-50%, 20px); opacity: 0; transition: transform .45s var(--ease), opacity .35s;
  padding: 14px 16px 12px; border-radius: 20px; background: rgba(14,12,20,.9); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 80px rgba(0,0,0,.55); overflow: hidden; }
#tour-panel.open { transform: translate(-50%, 0); opacity: 1; }
.tp-top { display: flex; align-items: center; gap: 12px; }
.tp-head { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-k { font: 500 13px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.tp-head b { font: 600 15px var(--f-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-lang { display: flex; gap: 4px; }
.tp-lang button { padding: 7px 13px; font-size: 14px; }
.tp-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--text); flex: none; transition: background .2s, border-color .2s; }
.tp-ic svg { width: 16px; height: 16px; }
.tp-ic:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); }
.tp-ic:disabled { opacity: .35; }
.tp-main { width: 46px; height: 46px; background: linear-gradient(135deg, #8f4dff, #7a5cff); border-color: transparent; }
.tp-main:hover { background: linear-gradient(135deg, #9d5fff, #8a6dff); }
.tp-x { width: 34px; height: 34px; }
.tp-cap { margin: 12px 2px 12px; min-height: 3em; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.tp-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-dots { display: flex; gap: 2px; flex-wrap: wrap; }
.tp-dots button { width: 18px; height: 22px; display: grid; place-items: center; }
.tp-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.2); transition: background .3s, width .3s; }
.tp-dots button.on i { width: 16px; border-radius: 4px; background: #a35cff; }
.tp-dots button:hover i { background: rgba(255,255,255,.5); }
.tp-ctl { display: flex; align-items: center; gap: 8px; }
.tp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.06); }
.tp-bar i { display: block; height: 100%; background: #a35cff; transform-origin: left; transform: scaleX(0); transition: transform .25s linear; }
#tour-panel.is-single .tp-dots, #tour-panel.is-single #tp-prev, #tour-panel.is-single #tp-next { display: none; }
#tour-panel.is-single .tp-bottom { justify-content: flex-end; }
.tp-eq { display: flex; align-items: flex-end; gap: 2px; height: 18px; width: 18px; flex: none; }
.tp-eq i { flex: 1; background: #a35cff; border-radius: 1px; height: 30%; animation: eq 1s ease-in-out infinite; }
.tp-eq i:nth-child(2) { animation-delay: .2s; } .tp-eq i:nth-child(3) { animation-delay: .4s; } .tp-eq i:nth-child(4) { animation-delay: .1s; }
#tour-panel.is-paused .tp-eq i { animation-play-state: paused; }
@keyframes eq { 50% { height: 100%; } }
body.tour-on #ollie-dock { bottom: calc(var(--tour-h, 170px) + 30px); }
@media (max-width: 640px) {
  #tour-panel { padding: 12px 12px 10px; border-radius: 16px; }
  .tp-top { flex-wrap: wrap; gap: 8px 10px; }
  .tp-lang { order: 3; width: 100%; }
  .tp-cap { font-size: 14.5px; margin: 10px 0; }
  .tp-dots button { width: 14px; }
  body.tour-on #ollie-dock { bottom: calc(var(--tour-h, 200px) + 20px); }
}
@media (prefers-reduced-motion: reduce) { .tp-eq i { animation: none; height: 60%; } }
.lbody .ltitle { display: flex; align-items: center; gap: 10px; }
.lbody .ltitle img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.chat-head .av { background: none; overflow: hidden; }
.chat-head .av img { width: 36px; height: 36px; }
@media (max-width: 640px) {
  .tp-dots { flex-wrap: nowrap; gap: 0; }
  .tp-dots button { width: 12px; height: 22px; }
  .tp-dots i { width: 5px; height: 5px; }
  .tp-dots button.on i { width: 10px; }
  .tp-ctl { gap: 6px; }
  .tp-ic { width: 34px; height: 34px; }
  .tp-main { width: 42px; height: 42px; }
}

/* ---------- owner: hero headline keeps the original look (Unbounded + pink→violet→cyan) ---------- */
.hero h1, .hero h1 .reveal-line > span { font-family: "Unbounded", "Inter", system-ui, sans-serif; font-weight: 800; letter-spacing: -.035em; }
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.9); }
.hero h1 .grad-text { background: linear-gradient(100deg, #ff7be5 0%, #e98bff 40%, #a9b6ff 70%, #6ff0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.95)); }
.hero h1 { font-size: min(clamp(34px, 8.4vw, 132px), calc((100vw - 56px) / 10.6)); }

/* ---------- draggable floating Ollie ---------- */
#ollie-dock { touch-action: none; cursor: grab; }
#ollie-dock.dragging { cursor: grabbing; transition: opacity .4s; }
#ollie-dock.on-left .bubble { right: auto; left: 92%; border-radius: 14px 14px 14px 4px; }
/* owner: the original display font (Unbounded) for every heading */
:root { --f-display: "Unbounded", "Inter", system-ui, sans-serif; }
/* the perched owl's canvas is 1.5x its box and must not be squeezed by the global max-width rule */
.chat-perch canvas, #ollie-canvas-host canvas, #ollie-dock canvas { max-width: none !important; }
@media (min-width: 1101px) { .live .lcard:last-child:nth-child(3n+1) { grid-column: 2; } }

/* ---------- SAVINGS SIMULATOR ---------- */
.sim { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--gap); align-items: stretch; }
@media (max-width: 900px) { .sim { grid-template-columns: 1fr; } }
.sim-in, .sim-out { padding: clamp(20px, 2.4vw, 30px); }
.sim-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sim-k { font: 500 13.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.sim-tag { font: 500 13px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #d2b8ff; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(163,92,255,.35); background: rgba(163,92,255,.08); }
.sl { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.sl-t { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--text-2); }
.sl-t output { font: 600 14px var(--f-mono); color: var(--text); font-variant-numeric: tabular-nums; }
.sl input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; margin: 0; }
.sl input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #8f4dff, #7a5cff) 0 / var(--p, 50%) 100% no-repeat, rgba(255,255,255,.1); }
.sl input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); }
.sl input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: #8f4dff; }
.sl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: #fff; border: 4px solid #8f4dff; box-shadow: 0 2px 10px rgba(0,0,0,.5); transition: transform .15s; }
.sl input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid #8f4dff; }
.sl input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.sim-how { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 15px; color: var(--text-3); }
.sim-how summary { cursor: pointer; font: 500 14.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.sim-how p { margin: 10px 0 0; line-height: 1.55; }
.sim-out { display: flex; flex-direction: column; gap: 18px; }
.sim-total b#s-total { display: block; margin-top: 6px; font: 700 clamp(40px, 5.4vw, 72px)/1 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, #e4ccff, #a98bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sim-sub { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; font-size: 15.5px; color: var(--text-3); }
.sim-sub b { color: var(--text); font-weight: 600; }
.levers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.levers li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 84px; gap: 14px; align-items: center; }
.lv-t b { display: block; font-size: 14px; font-weight: 600; }
.lv-t span { display: block; font-size: 14.5px; color: var(--text-3); line-height: 1.35; margin-top: 2px; }
.lv-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #7a5cff, #b48bff); transform-origin: left; transform: scaleX(0); transition: transform .9s var(--ease); }
.sim:not(.in) .lv-bar i { transform: scaleX(0) !important; }
.levers em { font: 600 15.5px var(--f-mono); font-style: normal; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.levers li:nth-child(n) .lv-bar i { transition-delay: calc(var(--d, 0) * 1ms); }
.sim-mira { margin: auto 0 0; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(163,92,255,.07); border: 1px solid rgba(163,92,255,.22); font-size: 14px; color: var(--text-2); }
.sim-mira img { width: 24px; height: 24px; border-radius: 7px; flex: none; margin-top: 1px; }
.sim-mira b { color: var(--text); }
@media (max-width: 560px) { .levers li { grid-template-columns: 1fr 74px; } .lv-bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- APPLICATIONS (grouped) + SMART FACTORY ---------- */
.apps { display: block; }
.app-groups { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 1100px) { .app-groups { grid-template-columns: 1fr 1fr; } .ag--energy { grid-column: 1 / -1; } }
@media (max-width: 680px) { .app-groups { grid-template-columns: 1fr; } }
.ag { border-radius: 22px; padding: 14px; border: 1px solid var(--glass-line); background: linear-gradient(180deg, rgba(163,92,255,.05), rgba(255,255,255,.01)); }
.ag header { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 12px; }
.ag-n { font: 600 14.5px var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: #d2b8ff; }
.ag-d { font-size: 15px; color: var(--text-3); }
.ag-list { display: grid; gap: 10px; }
.ag--energy .ag-list { grid-template-columns: 1fr 1fr; }
@media (max-width: 680px) { .ag--energy .ag-list { grid-template-columns: 1fr; } }
.ag .app { grid-template-columns: 76px 1fr; gap: 14px; padding: 14px; }
/* product cut-outs on dark glass: soft key light behind, no white tile */
.app .pic, .ag .app .pic { width: 76px; height: 76px; border-radius: 18px; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.2), rgba(163,92,255,.12) 48%, rgba(255,255,255,.02) 74%); border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.app .pic img { max-width: 84%; max-height: 84%; filter: drop-shadow(0 8px 10px rgba(0,0,0,.55)) saturate(.85) contrast(1.05); }
.app:hover .pic { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.4); }
.app .pic.glyph { background: radial-gradient(circle at 50% 42%, rgba(163,92,255,.35), rgba(163,92,255,.06) 70%); }
.ag .app h3 { font-size: 16px; }
.ag .app p { font-size: 15px; margin-bottom: 10px; }

.sf { position: relative; margin-top: 8px; }
.sf-lines { display: block; width: 100%; height: 110px; overflow: visible; }
.sf-lines path { fill: none; stroke: rgba(163,92,255,.55); stroke-width: 1.5; stroke-dasharray: 600; stroke-dashoffset: 600; vector-effect: non-scaling-stroke; }
.sf.merged .sf-lines path { animation: sfdraw 1.2s var(--ease) forwards; }
.sf.merged .sf-lines path:nth-child(2) { animation-delay: .12s; } .sf.merged .sf-lines path:nth-child(3) { animation-delay: .24s; }
@keyframes sfdraw { to { stroke-dashoffset: 0; } }
.sf-chips { position: absolute; inset: 0 0 auto; height: 110px; pointer-events: none; }
.sf-chip { position: absolute; top: 0; transform: translate(-50%, -50%); font: 600 13px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #fff; padding: 5px 11px; border-radius: 999px; background: #7a5cff; box-shadow: 0 6px 20px rgba(0,0,0,.4); opacity: 0; }
.sf-chip--energy { left: 21.9%; } .sf-chip--ops { left: 61.6%; } .sf-chip--beyond { left: 86.7%; }
@media (max-width: 1100px) { .sf-lines, .sf-chips { display: none; } .sf { margin-top: 24px; } }
.sf.merged .sf-chip { animation: sfchip 1.3s var(--ease) forwards; }
.sf.merged .sf-chip--ops { animation-delay: .12s; } .sf.merged .sf-chip--beyond { animation-delay: .24s; }
@keyframes sfchip { 0% { opacity: 0; top: 0; } 15% { opacity: 1; } 80% { opacity: 1; left: 50%; top: 100%; } 100% { opacity: 0; left: 50%; top: 100%; transform: translate(-50%, -50%) scale(.6); } }
.sf-card { display: grid; grid-template-columns: 130px 1fr; gap: 24px; align-items: center; padding: 22px 26px; max-width: 860px; margin: 0 auto; opacity: .4; transform: scale(.97); transition: opacity .8s var(--ease) .9s, transform .8s var(--ease) .9s, border-color .8s .9s, box-shadow .8s .9s; }
.sf.merged .sf-card { opacity: 1; transform: none; border-color: rgba(163,92,255,.45); box-shadow: var(--glass-hi), 0 30px 80px rgba(0,0,0,.45), 0 0 60px rgba(163,92,255,.14); }
.sf-core { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.sf-core i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(163,92,255,.35); }
.sf-core i:nth-child(2) { inset: 14px; border-style: dashed; animation: spin 18s linear infinite; }
.sf-core i:nth-child(3) { inset: 28px; border-color: rgba(255,255,255,.14); }
.sf-core b { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #8f4dff, #7a5cff); }
.sf-core b svg { width: 28px; height: 28px; stroke: #fff; }
.sf.merged .sf-core i:first-child { animation: sfpulse 1.2s var(--ease) 1s 2; }
@keyframes sfpulse { 50% { transform: scale(1.12); border-color: rgba(163,92,255,.8); } }
.sf-k { font: 500 13.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: #c4a6ff; }
.sf-body h3 { font: 650 clamp(22px, 2.2vw, 30px)/1.1 var(--f-display); letter-spacing: -.03em; margin: 6px 0 8px; }
.sf-body p { margin: 0 0 12px; color: var(--text-2); font-size: 14.5px; }
.app-links .sf-replay { cursor: pointer; background: none; font: 500 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); color: #cbb6ff; }
@media (max-width: 640px) { .sf-card { grid-template-columns: 1fr; text-align: left; gap: 10px; } .sf-core { width: 88px; height: 88px; } .sf-core b { width: 40px; height: 40px; } .sf-lines, .sf-chips { height: 70px; } }
@media (prefers-reduced-motion: reduce) { .sf-lines path { stroke-dashoffset: 0; } .sf-card { opacity: 1; transform: none; } .sf-chip { display: none; } }

/* phones: keep the floating tour button + dock off the pinned "How it works" story copy */
body.in-how .tour-fab, body.in-how #ollie-dock, body.in-how #dock-bubble { opacity: 0 !important; pointer-events: none !important; }
.lshot .lhero { position: absolute; right: 10px; bottom: 8px; width: 42%; max-width: 220px; z-index: 3; pointer-events: none; filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); }

/* MIRA chat: model switch, play buttons, games, PLC write approval */
.chat-head .seg button { padding: 5px 12px; border: 0; border-radius: 999px; background: none; color: var(--text-3); font: inherit; cursor: pointer; }
.chat-head .seg button[aria-pressed="true"] { background: rgba(168,85,247,.22); color: var(--text); }
.chat-head .seg button:focus-visible { outline: 2px solid #a855f7; outline-offset: 1px; }
@media (max-width: 560px) { .chat-head .seg { display: flex !important; font-size: 13.5px; } .chat-head .seg button { padding: 4px 9px; } }
.chat-chips button.play { border-color: rgba(168,85,247,.55); background: rgba(168,85,247,.14); color: #f1e6ff; }
.msg .deep { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.3); font-size: .95em; }
.msg .game { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.msg .game button { text-align: left; padding: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.msg .game button:hover:not(:disabled) { border-color: #a855f7; background: rgba(168,85,247,.12); }
.msg .game button b { display: block; font-size: 15px; }
.msg .game button span { display: block; font-size: 14.5px; color: var(--text-3); margin-top: 3px; }
.msg .game button.bad { border-color: #ff5d7a; background: rgba(255,93,122,.14); }
.msg .wr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.msg .wr code { flex-basis: 100%; font: 500 14.5px ui-monospace, monospace; color: #e6d3ff; }
.msg .wr button, .msg .again { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: var(--text); font: 600 14.5px var(--f-body); cursor: pointer; }
.msg .wr .ok { background: #8b2bd9; border-color: #8b2bd9; color: #fff; }
.msg .wr button:disabled, .msg .again:disabled { opacity: .45; cursor: default; }
@media (max-width: 420px) { .msg .game { grid-template-columns: 1fr; } }

/* ===== MIRA play platform: Play drawer, voice, message preview ===== */
.chat-head .chat-sound { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); font-size: 15px; line-height: 1; cursor: pointer; transition: background .2s, border-color .2s; flex: none; }
.chat-head .chat-sound:hover { background: rgba(143,77,255,.22); border-color: #a855f7; }
.chat-head .chat-sound:focus-visible, .chat-mic:focus-visible, .chat-lang:focus-visible, .tile:focus-visible, .moves button:focus-visible, .wa-send:focus-visible, .wa-x:focus-visible { outline: 2px solid #a855f7; outline-offset: 2px; }
.chat-head .chat-sound:not([hidden]) + .seg { margin-left: 0; }
.chat-head .chat-sound[hidden] + .seg { margin-left: auto; }

.chat-chips button.play { border-color: #8f4dff; background: linear-gradient(135deg, rgba(143,77,255,.34), rgba(122,92,255,.2)); color: #fff; font-weight: 600; }
.chat-chips button.play.on { background: linear-gradient(135deg, #8f4dff, #7a5cff); }

.deck { margin: 0 12px 10px; padding: 12px; border-radius: 16px; border: 1px solid rgba(143,77,255,.38); background: linear-gradient(160deg, rgba(143,77,255,.16), rgba(20,12,40,.7) 60%); }
.deck[hidden] { display: none; }
.deck-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.deck-t { font: 700 13.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #d9c4ff; }
.deck-stat { font: 500 14px var(--f-body); color: var(--text-3); white-space: nowrap; }
.deck-stat b { color: #fff; }
.deck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; text-align: left; padding: 9px 10px; border-radius: 13px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045); color: var(--text); font: inherit; cursor: pointer; transition: background .2s, border-color .2s; min-height: 54px; }
.tile i { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 17px; background: linear-gradient(135deg, #6d3df0, #a35cff); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.tile b { font: 600 15px var(--f-body); line-height: 1.2; align-self: end; }
.tile span { font: 13.5px var(--f-body); color: var(--text-3); line-height: 1.25; align-self: start; }
.tile:hover { border-color: #a855f7; background: rgba(143,77,255,.18); }
.tile:active { background: rgba(143,77,255,.3); }
.tile[hidden] { display: none; }
.deck-sub { margin: 12px 0 8px; font: 700 13px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #b79bff; }
.moves { display: flex; flex-wrap: wrap; gap: 7px; }
.moves button { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--text-2); font: 500 15px var(--f-body); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.moves button:hover { border-color: #a855f7; background: rgba(143,77,255,.2); color: #fff; }
.moves button[aria-pressed="true"] { background: rgba(143,77,255,.34); border-color: #a855f7; color: #fff; }
@media (min-width: 900px) and (max-width: 1200px), (max-width: 640px) { .deck-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .deck { margin: 0 10px 8px; padding: 10px; max-height: 232px; overflow-y: auto; scrollbar-width: thin; }
  .deck-stat { font-size: 13.5px; }
  .tile { min-height: 50px; padding: 7px 8px; grid-template-columns: 30px 1fr; column-gap: 7px; }
  .tile i { width: 30px; height: 30px; font-size: 15px; }
  .tile b { font-size: 14.5px; } .tile span { font-size: 13px; }
}

/* voice controls in the input row */
.chat-input > .chat-mic { width: 44px; background: rgba(143,77,255,.18); border: 1px solid rgba(143,77,255,.5); color: #e6d3ff; position: relative; transition: background .2s, border-color .2s, color .2s; }
.chat-input > .chat-mic[hidden], .chat-lang[hidden] { display: none; }
.chat-input > .chat-mic:hover { background: rgba(143,77,255,.34); border-color: #a855f7; box-shadow: none; transform: none; }
.chat-input > .chat-mic.live { background: #d94b8f; border-color: #ff8bbd; color: #fff; }
.chat-input > .chat-mic.live::after { content: ""; position: absolute; inset: -4px; border-radius: 15px; border: 2px solid rgba(255,139,189,.7); animation: micpulse 1.2s ease-out infinite; }
@keyframes micpulse { from { opacity: .9; transform: scale(.94); } to { opacity: 0; transform: scale(1.18); } }
.chat-input > button:hover { transform: none; }
.chat-lang { width: 80px; flex: none; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 15px var(--f-body); padding: 0 6px; cursor: pointer; color-scheme: dark; }
.chat-lang:hover { border-color: #a855f7; }
@media (max-width: 420px) { .chat-input { gap: 6px; padding: 10px; } .chat-lang { width: 66px; padding: 0 2px; font-size: 14px; } .chat-input > .chat-mic, .chat-input > button { width: 40px; } }

/* messages: localised line, message actions, games */
.msg .loc { margin: 0 0 8px; padding: 8px 10px; border-left: 3px solid #a855f7; background: rgba(143,77,255,.14); border-radius: 0 10px 10px 0; font-size: 14px; }
.msg .wa-row { margin-top: 10px; }
.msg .wa-send { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #e6d3ff; font: 600 14.5px var(--f-body); cursor: pointer; transition: background .2s, border-color .2s; }
.msg .wa-send:hover { background: rgba(143,77,255,.28); border-color: #a855f7; }



/* phone-style message preview (generic chat look; no brand marks) */
.wa { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.wa[hidden] { display: none; }
.wa-bk { position: fixed; inset: 0; background: rgba(8,4,20,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wa-x { position: fixed; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(10,6,20,.8); color: #fff; font-size: 16px; cursor: pointer; transition: background .2s; }
.wa-x:hover { background: #8f4dff; }
.wa-wrap { position: relative; z-index: 2; display: grid; gap: 14px; justify-items: center; opacity: 0; transition: opacity .3s var(--ease); }
.wa.open .wa-wrap { opacity: 1; }
.wa-note { max-width: 330px; margin: 0; text-align: center; color: #d9c4ff; font-size: 15px; line-height: 1.45; }
.wa-phone { width: min(320px, 86vw); height: min(560px, 74vh); border-radius: 34px; border: 8px solid #17102c; background: #e9e2d6; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 30px 90px rgba(0,0,0,.6), 0 0 60px rgba(143,77,255,.35); display: flex; flex-direction: column; overflow: hidden; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #111; }
.wa-status { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 4px; background: #3b2a78; color: #fff; font-size: 14px; font-weight: 600; }
.wa-bars { display: flex; gap: 2px; align-items: flex-end; } .wa-bars i { width: 3px; background: #fff; border-radius: 1px; } .wa-bars i:nth-child(1) { height: 5px; } .wa-bars i:nth-child(2) { height: 8px; } .wa-bars i:nth-child(3) { height: 11px; }
.wa-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; background: #3b2a78; color: #fff; }
.wa-back { font-size: 26px; line-height: 1; margin-right: -2px; }
.wa-av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #6d3df0, #a35cff); display: grid; place-items: center; flex: none; }
.wa-who { display: grid; line-height: 1.2; min-width: 0; } .wa-who b { font-size: 15px; font-weight: 600; } .wa-who small { font-size: 14px; opacity: .8; }
.wa-dots { margin-left: auto; font-size: 20px; }
.wa-chat { flex: 1; overflow-y: auto; padding: 12px 10px; background: #e9e2d6 radial-gradient(rgba(60,40,110,.09) 1px, transparent 1.4px) 0 0 / 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.wa-day { align-self: center; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,.85); font-size: 13px; letter-spacing: .06em; color: #5a5470; }
.wa-msg { position: relative; align-self: flex-start; max-width: 92%; padding: 7px 9px 18px; border-radius: 0 10px 10px 10px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.15); font-size: 15.5px; line-height: 1.38; animation: wain .35s var(--ease); word-wrap: break-word; }
.wa-msg[hidden], .wa-typing[hidden] { display: none; }
@keyframes wain { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.wa-sender { font-size: 15px; font-weight: 700; color: #7a3cf0; margin-bottom: 2px; }
.wa-meta { position: absolute; right: 8px; bottom: 3px; font-size: 12.5px; color: #7b7690; } .wa-meta em { font-style: normal; color: #3b9bff; margin-left: 2px; }
.wa-typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 13px; border-radius: 0 10px 10px 10px; background: #fff; }
.wa-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9a94b0; animation: watype 1s infinite; } .wa-typing i:nth-child(2) { animation-delay: .15s; } .wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes watype { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
.wa-reply { display: flex; justify-content: space-between; align-items: center; margin: 8px; padding: 9px 14px; border-radius: 22px; background: #fff; color: #8a859c; font-size: 15px; }
.wa-reply i { font-style: normal; }
@media (max-width: 420px) { .wa-note { font-size: 14.5px; } .wa-phone { height: min(520px, 70vh); } }
@media (prefers-reduced-motion: reduce) { .chat-input > .chat-mic.live::after, .wa-typing i, .wa-msg { animation: none; } }

/* Ollie's perch stays above the send button now that the input row also holds the language picker and mic */
.chat-field { position: static; }
.chat-perch { right: calc(80px - var(--ps) * .26); }
@media (max-width: 420px) { .chat-perch { right: calc(60px - var(--ps) * .26); } }
.chat-left { padding: 0 18px 12px; margin-top: -8px; font: 500 13.5px var(--f-mono); color: #b79bff; }
.chat-left[hidden] { display: none; }
body.in-chat .tour-fab, body.in-chat #ollie-dock { opacity: 0 !important; pointer-events: none !important; }

/* ===== Capabilities as a flow (r9): sense → connect → see → think ===== */
.cf { position: relative; }
.cf-wires { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 1; }
.cf-wire { fill: none; stroke: rgba(163,92,255,.55); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke .3s, stroke-width .3s; }
.cf-glow { fill: none; stroke: rgba(163,92,255,.0); stroke-width: 7; transition: stroke .3s; }
.cf.in .cf-wire { stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ease) calc(.35s + var(--li) * .12s), stroke .3s; }
.cf-link.hot .cf-wire { stroke: #c9a8ff; stroke-width: 2.2; }
.cf-link.hot .cf-glow { stroke: rgba(163,92,255,.18); }
.cf-pulse { fill: #e9dcff; opacity: 0; filter: drop-shadow(0 0 4px #a35cff); transition: opacity .6s 1.4s; }
.cf.in .cf-pulse { opacity: .9; }
.cf-link.hot .cf-pulse { fill: #fff; }
.cf-stages { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 52px; align-items: stretch; }
.cf-stage { position: relative; display: flex; flex-direction: column; border-radius: 22px; padding: 14px; border: 1px solid var(--glass-line); background: linear-gradient(180deg, rgba(163,92,255,.05), rgba(255,255,255,.01)); }
.cf-stage header { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 12px; }
.cf-n { font: 600 14.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: #d2b8ff; }
.cf-n i { font-style: normal; color: var(--text-3); margin-right: 4px; }
.cf-d { font-size: 15px; color: var(--text-3); }
.cf-list { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.cf-node { position: relative; z-index: 2; border-radius: 18px; border: 1px solid rgba(255,255,255,.09); background: linear-gradient(180deg, rgba(30,18,52,.92), rgba(18,10,32,.92)); box-shadow: var(--glass-hi); transition: border-color .25s, box-shadow .25s, background .25s; opacity: 0; transform: translateY(22px); }
.cf.in .cf-node { opacity: 1; transform: none; transition: opacity .7s var(--ease) calc(var(--si) * .18s), transform .7s var(--ease) calc(var(--si) * .18s), border-color .25s, box-shadow .25s, background .25s; }
.cf-node:hover, .cf-node.is-on { border-color: rgba(163,92,255,.55); box-shadow: var(--glass-hi), 0 0 0 1px rgba(163,92,255,.18), 0 18px 50px rgba(0,0,0,.35); }
.cf-node.is-on { background: linear-gradient(180deg, rgba(56,28,96,.95), rgba(24,12,44,.95)); }
.cf-btn { display: grid; grid-template-columns: 44px 1fr 18px; gap: 12px; align-items: start; width: 100%; padding: 14px 14px 10px; text-align: left; border-radius: 18px; cursor: pointer; }
.cf-btn:focus-visible { outline: 2px solid #c9a8ff; outline-offset: 2px; border-radius: 18px; }
.cf-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(163,92,255,.12); border: 1px solid rgba(255,255,255,.1); transition: background .25s, border-color .25s; }
.cf-ic svg { width: 22px; height: 22px; stroke: var(--text); }
.cf-node:hover .cf-ic, .cf-node.is-on .cf-ic { background: linear-gradient(135deg, #8f4dff, #7a5cff); border-color: transparent; }
.cf-t { display: grid; gap: 4px; min-width: 0; }
.cf-t b { font: 600 16px/1.2 var(--f-display); letter-spacing: -.02em; color: var(--text); }
.cf-t em { font-style: normal; font-size: 15px; line-height: 1.4; color: var(--text-2); }
.cf-plus { position: relative; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1px solid var(--line-strong); }
.cf-plus::before, .cf-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 1.5px; background: #c9a8ff; transform: translate(-50%, -50%); transition: transform .25s var(--ease); }
.cf-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.cf-btn[aria-expanded="true"] .cf-plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.cf-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 14px; }
.cf-chips .chip { font-size: 13px; padding: 4px 8px; }
.cf-node--end { border-color: rgba(163,92,255,.45); background: radial-gradient(120% 90% at 50% 0%, rgba(143,77,255,.32), rgba(18,10,32,.95) 70%); }
.cf-node--end .cf-ic { background: linear-gradient(135deg, #8f4dff, #c33bff); border-color: transparent; box-shadow: 0 0 24px rgba(195,59,255,.45); }
/* inline detail (phones) */
.cf-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.cf-more-in { overflow: hidden; min-height: 0; }
.cf-node.open .cf-more { grid-template-rows: 1fr; }
.cf-more-in > p:first-child { margin: 0 14px 10px; font-size: 14px; color: var(--text-2); }
.cf-more .tags, .cf-panel .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-more .tags { padding: 0 14px; }
.cf .tags .chip { white-space: normal; }
.cf-route { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font: 500 13.5px var(--f-mono); letter-spacing: .04em; color: var(--text-3); }
.cf-route b { color: #d9c4ff; font-weight: 600; }
.cf-more .cf-route { padding: 0 14px 14px; }
/* shared detail panel (desktop) */
.cf-panel { position: relative; z-index: 2; display: grid; grid-template-columns: 56px minmax(180px, 260px) 1fr; gap: 22px; align-items: start; margin-top: 22px; padding: 22px 24px; min-height: 150px; }
.cf-p-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #8f4dff, #7a5cff); }
.cf-p-ic svg { width: 28px; height: 28px; stroke: #fff; }
.cf-p-k { font: 500 13.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #c4a6ff; }
.cf-p-h h3 { font: 650 22px/1.15 var(--f-display); letter-spacing: -.03em; margin: 6px 0 0; }
.cf-p-b > p:first-child { margin: 0 0 12px; color: var(--text-2); font-size: 15px; }
.cf-hint { margin: 10px 0 0; text-align: center; font: 500 13.5px var(--f-mono); letter-spacing: .08em; color: var(--text-3); }
.cf-join { display: none; }
@media (min-width: 900px) {
  .cf-more { display: none; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .cf-stages { gap: 36px; }
  .cf-stage { padding: 10px; }
  .cf-btn { grid-template-columns: 36px 1fr 16px; gap: 9px; padding: 12px 10px 8px; }
  .cf-ic { width: 36px; height: 36px; border-radius: 11px; } .cf-ic svg { width: 19px; height: 19px; }
  .cf-t b { font-size: 14.5px; } .cf-t em { font-size: 15px; }
  .cf-chips { padding: 0 10px 12px 10px; }
  .cf-panel { grid-template-columns: 48px 1fr; } .cf-p-b { grid-column: 1 / -1; }
}
/* phones + tablets: a vertical flow, details open in place */
@media (max-width: 899px) {
  .cf-wires, .cf-panel, .cf-hint { display: none; }
  .cf-stages { grid-template-columns: 1fr; gap: 0; }
  .cf-stage { padding: 12px; }
  .cf-chips { padding-left: 70px; }
  .cf-join { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0 0 34px; min-height: 64px; font: 500 13.5px var(--f-mono); letter-spacing: .04em; color: var(--text-3); }
  .cf-stage { margin-bottom: 0; }
  .cf-stage + .cf-stage { margin-top: 0; }
  .cf-stage:has(.cf-join) { border-bottom-left-radius: 22px; }
  .cf-join i { position: absolute; left: 33px; top: 100%; width: 2px; height: 50px; background: linear-gradient(rgba(163,92,255,.7), rgba(163,92,255,.15)); overflow: hidden; }
  .cf-join i::after { content: ""; position: absolute; left: -2px; top: -6px; width: 6px; height: 6px; border-radius: 50%; background: #e9dcff; box-shadow: 0 0 6px #a35cff; animation: cfdrop 1.6s linear infinite; }
  .cf-join b { color: #d9c4ff; }
  .cf-stages { row-gap: 30px; }
}
@keyframes cfdrop { from { transform: translateY(0); } to { transform: translateY(56px); } }
@media (max-width: 420px) {
  .cf-btn { grid-template-columns: 38px 1fr 18px; gap: 10px; padding: 12px 12px 8px; }
  .cf-ic { width: 38px; height: 38px; border-radius: 11px; }
  .cf-chips { padding: 0 12px 12px 60px; }
  .cf-join { padding-left: 28px; }
  .cf-join i { left: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-node, .cf.in .cf-node { opacity: 1; transform: none; transition: border-color .25s, background .25s; }
  .cf-wire { stroke-dashoffset: 0; }
  .cf-join i::after { animation: none; display: none; }
  .cf-more { transition: none; }
}

/* ===== Smart Factory card: what it is (r10) ===== */
.sf-card { display: block; max-width: 1040px; padding: 24px 26px; }
.sf-top { display: grid; grid-template-columns: 130px 1fr; gap: 24px; align-items: center; }
.sf-body p b { color: var(--text); font-weight: 600; }
.sf-mult-line { padding: 8px 12px; border-left: 3px solid #c33bff; background: rgba(195,59,255,.08); border-radius: 0 10px 10px 0; }



/* ===== MIRA (r9): one plain-words game, answer charts + tables ===== */
.deck-grid--one { grid-template-columns: 1fr !important; }
.tile--wide { min-height: 60px; }
.tile--wide span { font-size: 14.5px; }
.msg .game button { display: grid; gap: 8px; }
.msg .game button > b { font-size: 15.5px; }
.msg .game button b span { display: inline; margin: 0; font-size: inherit; color: inherit; }
.gm { display: grid !important; gap: 4px; margin: 0 !important; }
.msg .game .gm > span { display: grid; margin: 0; grid-template-columns: 52px 1fr; align-items: center; gap: 6px; }
.gm em { font: 500 13px var(--f-body); font-style: normal; color: var(--text-3); }
.gm i { display: block; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #8f4dff calc(var(--v) * 100%), rgba(255,255,255,.08) 0); }
.msg .game button.bad .gm i { background: linear-gradient(90deg, #ff5d7a calc(var(--v) * 100%), rgba(255,255,255,.08) 0); }
.msg .mc { margin: 10px 0 4px; padding: 8px 10px 6px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.msg .mc svg { width: 100%; height: auto; overflow: visible; }
.msg .mc rect { fill: rgba(163,92,255,.5); }
.msg .mc rect.hi { fill: #c9a8ff; }
.msg .mc rect.mk { fill: #ff8bbd; }
.msg .mc line.lim { stroke: #ffb547; stroke-width: 1; stroke-dasharray: 3 3; }
.msg .mc text { font: 500 7px var(--f-mono); fill: var(--text-3); }
.msg .mc figcaption { font: 500 13px var(--f-mono); color: var(--text-3); margin-top: 2px; }
.msg .mt-wrap { margin: 10px 0 4px; overflow-x: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); }
.msg .mt { width: 100%; border-collapse: collapse; font-size: 15px; }
.msg .mt th { text-align: left; font: 600 13px var(--f-mono); letter-spacing: .04em; color: var(--text-3); padding: 7px 9px; background: rgba(255,255,255,.04); white-space: nowrap; }
.msg .mt td { padding: 6px 9px; border-top: 1px solid rgba(255,255,255,.06); font-variant-numeric: tabular-nums; }
.msg .mt tr.hi td { background: rgba(143,77,255,.18); color: #fff; }
.msg .st { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #2ee6a6; }
.msg .st--idle, .msg .st--warning { background: #ffb547; } .msg .st--stopped, .msg .st--critical { background: #ff5d7a; } .msg .st--info { background: #8fb8ff; }
/* phones: the chat column may shrink to the screen (it overflowed by ~34 px at 375) */
.ollie-grid > * { min-width: 0; }
@media (max-width: 420px) { .chat-head { flex-wrap: wrap; row-gap: 8px; } .chat-head .seg { margin-left: auto; } .chat-input #chat-in { min-width: 0; } .chat-field { min-width: 0; flex: 1 1 auto; } }
@media (max-width: 640px) { .sf-top { grid-template-columns: 1fr; gap: 10px; } .sf-card { padding: 18px 16px; } }
#ollie-dock .bubble { white-space: normal; width: max-content; max-width: 270px; line-height: 1.4; } @media (max-width: 640px) { #ollie-dock .bubble { max-width: 210px; } }
/* big Ollie's first-visit hello */
.stage-bubble { position: absolute; z-index: 9999; left: 50%; top: 4%; transform: translate(-50%, 8px); width: min(340px, 86%); padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.96); color: #2a1530; font: 500 15.5px/1.45 var(--f-body); box-shadow: 0 12px 34px rgba(0,0,0,.35); opacity: 0; transition: opacity .45s, transform .45s; pointer-events: none; text-align: left; }
.stage-bubble b { color: #680166; }
.stage-bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: rgba(255,255,255,.96); }
.stage-bubble.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .stage-bubble { transition: none; } }

/* ===== Applications: one uniform card grid across all groups (QA 20-10) =====
   4 columns ≥1100 px, 2 columns ≥600 px, 1 column below. Groups span whole columns and share the same
   column gap, so every card has the same width; fixed slots (title 2 lines, text 3 lines, meta line,
   action row pinned to the bottom) plus one min-height give every card the same height. Hover = colour only. */
.app-groups { --cols: 4; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gap); row-gap: 30px; align-items: stretch; }
.ag { grid-column: span 2; padding: 0; border: 0; background: none; border-radius: 0; min-width: 0; }
.ag header { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 2px 12px; border-top: 2px solid rgba(163,92,255,.45); }
.ag--ops header { border-top-color: rgba(255,79,216,.5); } .ag--beyond header { border-top-color: rgba(34,225,255,.5); }
.ag-n { margin: 0; }
.ag--energy { grid-column: 1 / -1; }
.ag-list, .ag--energy .ag-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.ag--energy .ag-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1099px) { .app-groups { --cols: 2; } .ag, .ag--energy { grid-column: 1 / -1; } .ag--energy .ag-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .app-groups { --cols: 1; } .ag-list, .ag--energy .ag-list { grid-template-columns: 1fr; } }
.app, .ag .app { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 236px; height: 100%; }
@media (max-width: 1099px) { .app, .ag .app { min-height: 200px; } }
.app:hover, .ag .app:hover { transform: none; }
.app:hover .pic { transform: none; }
.app-h { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 52px; }
.app .pic, .ag .app .pic { width: 52px; height: 52px; border-radius: 14px; }
.app .pic.glyph svg { width: 28px; height: 28px; }
.app h4 { margin: 0; font: 600 16px/1.25 var(--f-display); letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app .app-d { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-2); min-height: 4.5em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.app-x { min-height: 22px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.app-x .ref, .app-x .more-l { font: 500 13px var(--f-mono); letter-spacing: .04em; color: var(--text-3); }
.app-x .more-l { color: #cbb6ff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(203,182,255,.4); }
.app-x .more-l:hover { color: #fff; }
.app .app-links { margin-top: auto; flex-wrap: nowrap; }
.app .app-links > * { white-space: nowrap; }
@media (max-width: 640px) { .app .app-links > * { min-height: 44px; display: inline-flex; align-items: center; } }
.sf-chip--energy { left: 50%; } .sf-chip--ops { left: 25%; } .sf-chip--beyond { left: 75%; }

/* ===================== MIRA AI + Ollie (r14 redesign) =====================
   Scoped to #ollie (and the preview dialog). Hover changes colour only: no button moves with the cursor. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (min-width: 961px) { #ollie .ollie-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; } }
#ollie .ollie-stage { max-width: 560px; }
#ollie .ollie-tag b { transition: color .3s; }
#ollie[data-ollie="thinking"] .ollie-tag.t1 b { color: #ffd79a; }
#ollie[data-ollie="speaking"] .ollie-tag.t1 b { color: #9fe3c8; }
#ollie[data-ollie="listening"] .ollie-tag.t1 b { color: #ff9cc8; }
#ollie[data-ollie="happy"] .ollie-tag.t1 b { color: #e2d0ff; }
#ollie[data-ollie="error"] .ollie-tag.t1 b { color: #ff9a9a; }
#ollie .ollie-feats { gap: 10px; margin-top: 20px; }
#ollie .ollie-feats div { font-size: 15.5px; line-height: 1.45; padding: 11px 14px; border-left: 2px solid rgba(163,92,255,.65); background: linear-gradient(90deg, rgba(163,92,255,.08), transparent); color: var(--text-2); }

/* panel */
#ollie .chat { --perch: 75px; margin-top: 26px; border-radius: 24px; border: 1px solid rgba(190,150,255,.17); background: linear-gradient(180deg, rgba(26,15,48,.94), rgba(10,6,20,.96) 40%); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); }
#ollie .chat-head { gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07); flex-wrap: nowrap; }
#ollie .chat-head .av { width: 40px; height: 40px; border-radius: 12px; }
#ollie .chat-head .av img { width: 40px; height: 40px; }
#ollie .chat-id { min-width: 0; flex: 1 1 auto; }
#ollie .chat-head .nm { font: 600 15.5px/1.2 var(--f-body); color: #fff; }
#ollie .chat-head .st { display: flex; align-items: center; gap: 6px; margin-top: 3px; font: 500 13.5px var(--f-mono); color: #9fe3c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ollie .chat-head .st i { width: 7px; height: 7px; border-radius: 50%; background: #2ee6a6; box-shadow: 0 0 0 3px rgba(46,230,166,.18); flex: none; }
#ollie .chat-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
#ollie .ic-btn { position: relative; width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 11px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #cdb8f5; display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s, color .2s; font-size: 0; }
#ollie .ic-btn[hidden] { display: none; }
#ollie .ic-btn:hover { background: rgba(143,77,255,.18); border-color: rgba(168,85,247,.6); color: #fff; }
#ollie .ic-btn[aria-pressed="true"] { background: rgba(143,77,255,.3); border-color: #a855f7; color: #fff; }
#ollie .ic-btn:focus-visible { outline: 2px solid #c9a8ff; outline-offset: 2px; }
#ollie #chat-voice .i-on, #ollie #chat-voice[aria-pressed="true"] .i-off { display: none; }
#ollie #chat-voice[aria-pressed="true"] .i-on { display: block; }
#ollie .ic-slash { position: absolute; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px rgba(16,9,30,.95); }
#ollie .ic-btn[aria-pressed="true"] .ic-slash { display: none; }
#ollie .chat-head .seg { margin: 0; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); display: flex; }
#ollie .chat-head .seg button { padding: 6px 12px; border-radius: 999px; font: 600 15px var(--f-body); color: var(--text-3); transition: background .2s, color .2s; }
#ollie .chat-head .seg button:hover { color: #fff; }
#ollie .chat-head .seg button[aria-pressed="true"] { background: #8f4dff; color: #fff; }

/* conversation */
#ollie .chat-view { position: relative; }
#ollie .chat-body { position: relative; height: clamp(300px, 44vh, 400px); padding: 18px 16px 14px; gap: 12px; overscroll-behavior: contain; }
#ollie .chat-body:focus-visible { outline: 2px solid rgba(168,85,247,.7); outline-offset: -3px; border-radius: 6px; }
#ollie .chat-jump { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; z-index: 3; padding: 7px 14px; border-radius: 999px; background: #8f4dff; color: #fff; font: 600 14.5px var(--f-body); box-shadow: 0 10px 26px rgba(0,0,0,.45); cursor: pointer; }
#ollie .chat-jump[hidden] { display: none; }
#ollie .chat-jump:hover { background: #a35cff; }
#ollie .chat-jump:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#ollie .msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
#ollie .msg.a { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); border-bottom-left-radius: 6px; color: #ece3fa; }
#ollie .msg.u { background: linear-gradient(135deg, #7436e6, #8f4dff); border: 0; color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 22px rgba(116,54,230,.25); }
#ollie .msg.sys { max-width: 92%; text-align: center; font: 500 15px/1.45 var(--f-body); color: #ffd79a; background: rgba(255,181,71,.07); border: 1px solid rgba(255,181,71,.25); border-radius: 12px; padding: 8px 12px; }
#ollie .msg .slow { display: block; margin-top: 4px; font-size: 14.5px; color: var(--text-3); }
#ollie .msg .slow[hidden] { display: none; }
#ollie .msg .wr-note { display: block; margin-top: 8px; font-size: 14.5px; color: var(--text-3); }
#ollie .msg .wa-row { margin-top: 10px; }
#ollie .msg .wa-send { min-height: 32px; }

/* game */
#ollie .msg .game button { min-height: 44px; }
#ollie .msg .game button:disabled { cursor: default; }
#ollie .msg .game button:disabled:not(.bad) { opacity: .55; }
#ollie .msg .game button.picked:not(.bad) { opacity: .9; border-style: dashed; border-color: rgba(255,255,255,.45); }
#ollie .msg .game button:focus-visible { outline: 2px solid #c9a8ff; outline-offset: 2px; }
#ollie .msg .g-timer { display: flex; align-items: center; gap: 10px; margin-top: 10px; font: 600 13.5px var(--f-mono); color: #d9c4ff; }
#ollie .msg .g-timer i { position: relative; flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
#ollie .msg .g-timer i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #a35cff, #ff8bbd); transform-origin: left; animation: gtimer linear forwards; animation-duration: inherit; }
#ollie .msg.paused .g-timer i::after { animation-play-state: paused; }
@keyframes gtimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
#ollie .msg .g-res { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 15px; color: var(--text-2); }
#ollie .msg .g-res b { color: #fff; }
#ollie .msg .g-res .again { margin-left: auto; min-height: 34px; background: #8f4dff; border-color: #8f4dff; color: #fff; }
#ollie .msg .g-res .again:hover:not(:disabled) { background: #a35cff; }
#ollie .msg .g-meta { margin: 8px 0 0; font-size: 14.5px; color: var(--text-3); }
#ollie .msg .again:focus-visible, #ollie .msg .wr button:focus-visible { outline: 2px solid #c9a8ff; outline-offset: 2px; }

/* Play drawer */
#ollie .deck { margin: 0 14px 12px; padding: 12px; border-radius: 16px; border: 1px solid rgba(143,77,255,.3); background: linear-gradient(160deg, rgba(143,77,255,.13), rgba(20,12,40,.55) 60%); max-height: none; overflow: visible; }
#ollie .deck[hidden] { display: none; }
#ollie .deck-t { font: 700 13.5px var(--f-mono); letter-spacing: .14em; color: #d9c4ff; }
#ollie .tile { width: 100%; }
#ollie .moves button { min-height: 34px; }

/* voice bar: listening / speaking / notices */
#ollie .vbar { display: flex; align-items: center; gap: 12px; margin: 0 14px 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(168,85,247,.45); background: linear-gradient(135deg, rgba(143,77,255,.22), rgba(20,12,40,.75)); animation: vbIn .25s var(--ease); }
#ollie .vbar[hidden] { display: none; }
#ollie .vb--listening { border-color: rgba(255,139,189,.6); background: linear-gradient(135deg, rgba(217,75,143,.24), rgba(20,12,40,.75)); }
#ollie .vb--notice { border-color: rgba(255,181,71,.45); background: rgba(255,181,71,.07); }
@keyframes vbIn { from { opacity: 0; } }
#ollie .vb-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
#ollie .vb-txt b { font: 600 15.5px/1.3 var(--f-body); color: #fff; }
#ollie .vb-txt small { font: 14.5px/1.4 var(--f-body); color: #d6c4f5; }
#ollie .vb--notice .vb-txt small { color: #f0dcc0; }
#ollie .vb-btn { flex: none; min-height: 34px; padding: 7px 14px; border-radius: 999px; border: 1px solid #a855f7; background: #8f4dff; color: #fff; font: 600 15px var(--f-body); cursor: pointer; transition: background .2s, border-color .2s; }
#ollie .vb-btn:hover { background: #a35cff; }
#ollie .vb-btn.ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #eadcff; }
#ollie .vb-btn.ghost:hover { background: rgba(255,255,255,.08); }
#ollie .vb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#ollie .vb-meter { display: flex; align-items: center; justify-content: center; gap: 3px; width: 34px; height: 28px; flex: none; }
#ollie .vb-meter i { width: 4px; height: 100%; border-radius: 4px; background: linear-gradient(#ffb0d4, #a35cff); transform: scaleY(var(--l, .25)); transition: transform .08s linear; }
#ollie .vbar:not(.is-live) .vb-meter i { animation: vbwave 1s ease-in-out infinite; }
#ollie .vbar:not(.is-live) .vb-meter i:nth-child(2) { animation-delay: .12s; } #ollie .vbar:not(.is-live) .vb-meter i:nth-child(3) { animation-delay: .24s; }
#ollie .vbar:not(.is-live) .vb-meter i:nth-child(4) { animation-delay: .36s; } #ollie .vbar:not(.is-live) .vb-meter i:nth-child(5) { animation-delay: .48s; }
#ollie .vb--loading .vb-meter i { animation-duration: 1.8s !important; opacity: .6; }
#ollie .vb--speaking .vb-meter i { background: linear-gradient(#9fe3c8, #a35cff); }
@keyframes vbwave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
#ollie .vb-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 14px var(--f-body); background: #ffb547; color: #1a0b22; }
#ollie .vb-ic--info { background: #a35cff; color: #fff; font-style: italic; font-family: Georgia, serif; }

/* suggestions */
#ollie .chat-chips { gap: 8px; padding: 0 calc(var(--perch) + 26px) 12px 14px; }
#ollie .chat-chips button { font: 500 15px var(--f-body); padding: 7px 13px; min-height: 34px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); color: var(--text-2); transition: color .2s, border-color .2s, background .2s, opacity .2s; }
#ollie .chat-chips button:hover { color: #fff; border-color: #a855f7; background: rgba(143,77,255,.14); }
#ollie .chat-chips button:focus-visible { outline: 2px solid #c9a8ff; outline-offset: 2px; }
#ollie .chat-chips button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
#ollie .chat-chips button.play { border-color: #8f4dff; background: rgba(143,77,255,.22); color: #fff; font-weight: 600; }
#ollie .chat-chips button.play.on { background: #8f4dff; }

/* composer */
#ollie .chat-input { gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); align-items: stretch; position: relative; }
#ollie .chat-field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
#ollie .chat-input input { height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); font: 15px var(--f-body); color: var(--text); }
#ollie .chat-input input::placeholder { color: #8f80a8; }
#ollie .chat-input input:focus { border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168,85,247,.2); }
#ollie .chat-input input.interim { color: #e2d0ff; font-style: italic; }
#ollie .chat-field.is-private input { border-color: #ffb547; box-shadow: 0 0 0 3px rgba(255,181,71,.16); }
#ollie .chat-count { position: absolute; right: 10px; top: 50%; translate: 0 -50%; padding: 2px 6px; border-radius: 6px; background: rgba(16,9,30,.9); font: 500 13px var(--f-mono); color: var(--text-3); pointer-events: none; }
#ollie .chat-count[hidden] { display: none; }
#ollie .chat-count.max { color: #ff9cc8; }
#ollie .voice-grp { display: flex; flex: none; border: 1px solid rgba(168,85,247,.45); border-radius: 14px; overflow: hidden; background: rgba(143,77,255,.12); }
#ollie .voice-grp .chat-lang { width: auto; height: 46px; margin: 0; padding: 0 4px 0 10px; border: 0; border-right: 1px solid rgba(168,85,247,.35); border-radius: 0; background: transparent; color: #eadcff; font: 600 15px var(--f-body); cursor: pointer; }
#ollie .voice-grp .chat-lang:hover { background: rgba(143,77,255,.18); }
#ollie .voice-grp .chat-lang:focus-visible, #ollie .voice-grp .chat-mic:focus-visible { outline: 2px solid #c9a8ff; outline-offset: -2px; }
#ollie .voice-grp .chat-mic { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 0; background: transparent; color: #eadcff; cursor: pointer; transition: background .2s, color .2s; }
#ollie .voice-grp .chat-mic:hover { background: rgba(143,77,255,.3); color: #fff; }
#ollie .voice-grp .chat-mic.live { background: #d94b8f; color: #fff; animation: micGlow 1.4s ease-in-out infinite; }
#ollie .voice-grp:has(.chat-mic.live) { border-color: #ff8bbd; }
@keyframes micGlow { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(255,255,255,0); } 50% { box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); } }
#ollie .chat-input > .chat-send { width: 46px; height: 46px; flex: none; border-radius: 14px; background: linear-gradient(135deg, #8f4dff, #7a5cff); color: #fff; display: grid; place-items: center; cursor: pointer; transition: opacity .2s, background .2s; box-shadow: none; transform: none; }
#ollie .chat-input > .chat-send:hover:not(:disabled) { background: linear-gradient(135deg, #a35cff, #8f6cff); }
#ollie .chat-input > .chat-send:disabled { opacity: .4; cursor: not-allowed; }
#ollie .chat-input > .chat-send.is-busy { opacity: .9; cursor: progress; }
#ollie .chat-input > .chat-send:focus-visible { outline: 2px solid #c9a8ff; outline-offset: 2px; }
#ollie .chat-send .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
#ollie .chat-send.is-busy .spin { display: block; }
#ollie .chat-send.is-busy .i-send { display: none; }
/* Ollie stands on the top edge of the composer, above the send button */
#ollie .chat-perch { right: calc(37px - var(--ps) * .5); bottom: calc(100% - 1px); }
#ollie .chat-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 16px 14px; min-height: 31px; font: 14.5px/1.45 var(--f-body); color: var(--text-3); }
#ollie .chat-foot b { color: var(--text-2); font-weight: 600; }
#ollie .chat-left { margin: 0; padding: 0; white-space: nowrap; font: 500 13.5px var(--f-mono); color: #b79bff; }
#ollie .chat-left.low { color: #ffb547; }

/* phones and tablets: heading first, then Ollie, then the chat */
@media (max-width: 960px) {
  #ollie .ollie-grid { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  #ollie .ollie-right { display: contents; }
  #ollie .ollie-right > * { order: 3; }
  #ollie .ollie-right > .eyebrow { order: 1; } #ollie .ollie-right > .h-lg { order: 2; }
  #ollie .ollie-left { order: 4; margin-top: 10px; } #ollie .chat { order: 5; margin-top: 4px; } #ollie .ollie-feats { order: 6; }
  #ollie .ollie-stage { max-width: 380px; }
}
@media (max-width: 640px) {
  #ollie .chat { --perch: 62px; border-radius: 20px; }
  #ollie .chat-head { padding: 12px 12px 12px 14px; gap: 10px; }
  #ollie .chat-head .av, #ollie .chat-head .av img { width: 36px; height: 36px; }
  #ollie .st-more { display: none; }
  #ollie .chat-head .seg button { padding: 5px 10px; font-size: 14.5px; }
  #ollie .ic-btn { width: 34px; height: 34px; }
  #ollie .chat-body { height: clamp(280px, 52vh, 380px); padding: 14px 12px 10px; }
  #ollie .msg { max-width: 92%; font-size: 14px; }
  #ollie .chat-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 0 12px 12px; margin-right: calc(var(--perch) + 18px); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  #ollie .chat-chips::-webkit-scrollbar { display: none; }
  #ollie .chat-chips button { flex: none; }
  #ollie .chat-input { padding: 10px 12px; gap: 6px; }
  #ollie .chat-input input { font-size: 16px; padding: 0 12px; } /* 16px: no zoom-on-focus on iPhone */
  #ollie .voice-grp .chat-lang { padding: 0 2px 0 8px; font-size: 14px; }
  #ollie .voice-grp .chat-mic, #ollie .chat-input > .chat-send { width: 44px; }
  #ollie .chat-perch { right: calc(34px - var(--ps) * .5); }
  #ollie .deck, #ollie .vbar { margin-left: 12px; margin-right: 12px; }
  #ollie .vbar { flex-wrap: wrap; }
  #ollie .vbar .vb-txt { flex-basis: calc(100% - 50px); }
  #ollie .vbar .vb-btn:first-of-type { margin-left: auto; }
  #ollie .chat-foot { flex-direction: column; gap: 2px; padding: 0 14px 12px; }
}
@media (max-width: 360px) { #ollie #chat-sound { display: none; } }
@media (prefers-reduced-motion: reduce) {
  #ollie .vb-meter i, #ollie .vbar, #ollie .voice-grp .chat-mic.live, #ollie .msg .g-timer i::after { animation: none !important; transition: none; }
  #ollie .chat-send .spin { animation-duration: 2s; }
}
/* preview dialog */
.wa-note b { color: #fff; }
/* contact form inline errors (QA 20-10) */
.term .ferr { display: block; font: 500 14.5px var(--f-body); font-style: normal; color: #ff8fa3; margin-top: 4px; }
.term .ferr:empty { display: none; }
.term input[aria-invalid="true"] { border-color: #ff5d7a; }
.term-send .ok.err { color: #ff8fa3; }
.term label:has(input[required]) > span::after { content: " *"; color: #ff8fa3; }
/* touch screens: every control in the site lead's sections is at least 44 px tall (QA 20-10) */
@media (pointer: coarse), (max-width: 640px) {
  .btn--sm, .explain-btn, .hero-lang button, .tp-lang button, .filters button, .tour-fab, .app-links > *, .app-x .more-l, .app-links .sf-replay { min-height: 44px; display: inline-flex; align-items: center; }
  .foot-grid nav a, .foot-row a, .nav.is-open .nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .nav-logo { min-height: 44px; display: inline-flex; align-items: center; }
  .sim-how summary { min-height: 44px; display: flex; align-items: center; }
  .sim input[type=range] { min-height: 44px; }
  .term input, .term select { min-height: 44px; }
  .term select { height: 44px; } /* Safari ignores min-height on a select */
}
/* the game stays two-up on phones so all four machines and the timer fit in view */
@media (max-width: 640px) {
  #ollie .msg .game { grid-template-columns: 1fr 1fr; gap: 6px; }
  #ollie .msg .game button { padding: 8px; gap: 6px; }
  #ollie .msg .game button > b { font-size: 15px; line-height: 1.25; }
  #ollie .msg .game .gm > span { grid-template-columns: 40px 1fr; gap: 4px; }
  #ollie .gm em { font-size: 12.5px; }
}
@media (pointer: coarse), (max-width: 640px) { .app-x { min-height: 44px; } }
/* phones: the floating tour button shrinks to a 48 px round icon so it covers less of the content (label kept for screen readers) */
@media (max-width: 640px) { .tour-fab { width: 48px; height: 48px; padding: 0; justify-content: center; } .tour-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .tour-fab svg { width: 20px; height: 20px; } }
/* dock bubble: side and above/below chosen in JS (whichever has room and covers no content) (QA 20-10) */
#ollie-dock .bubble:not(.to-right) { left: auto; right: 92%; border-radius: 14px 14px 4px 14px; }
#ollie-dock .bubble.to-right { right: auto; left: 92%; border-radius: 14px 14px 14px 4px; }
#ollie-dock .bubble.below { bottom: auto; top: 78%; }
#ollie-dock .bubble:not(.show) { pointer-events: none; }
/* dock stays in the corner safe area (notches, home bar) */
#ollie-dock { right: max(22px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); }
@media (max-width: 640px) { #ollie-dock { right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); } }
/* MIRA chat on touch screens: 44 px targets for the header tools and the Swift / Deep switch */
@media (pointer: coarse), (max-width: 640px) {
  #chat .chat-tools .ic-btn { width: 44px; height: 44px; }
  #chat-model button { min-height: 44px; min-width: 52px; }
  #chat .chat-chips button, #chat .chat-input button, #chat .moves button, #chat .tile { min-height: 44px; }
}
/* wider viewing area: smaller side margins everywhere (owner, 21 Oct) */
.wrap { width: min(1680px, 100% - 40px); }
@media (min-width: 1100px) { .wrap { width: min(1680px, 100% - 56px); } }
@media (max-width: 640px) { .wrap { width: calc(100% - 24px); } }
/* ---------- language switch without layout shift (EN / हिन्दी / ગુજરાતી, 21 Oct) ----------
   1. Indic fonts in every stack, after Inter, so Devanagari / Gujarati glyphs use one known face.
   2. Every control that changes language gets a set line-height (Inter's own 1.21, so English sizes are
      unchanged). "font:" shorthands reset line-height to "normal", which grew to the taller Indic
      fallback font and made buttons 2-4 px taller in HI / GU (and the whole hero CTA row with them).
   3. Labels that change language are stacked (all three in one grid cell, only the current one visible),
      so a button is always as wide as its longest label and nothing re-wraps.
   4. Tour caption box has a fixed height; long sentences are split in js/tour.js to fit it. */
:root {
  --f-indic: "Noto Sans Devanagari", "Noto Sans Gujarati", "Kohinoor Devanagari", "Gujarati Sangam MN", "Shruti", "Mangal";
  --f-body: "Inter", var(--f-indic), system-ui, -apple-system, sans-serif;
  --f-display: "Unbounded", "Inter", var(--f-indic), system-ui, sans-serif;
}
.btn, .btn--sm, .explain-btn, .tour-fab, .hero-lang button, .tp-lang button, .tp-k, .tp-head b, .chat-lang, #ollie .voice-grp .chat-lang { line-height: 1.21; }
.tp-head b { line-height: 1.3; } /* room for Devanagari / Gujarati marks above and below, inside the ellipsis clip */
.lbl-stack { display: inline-grid; justify-items: center; }
.lbl-stack > span { grid-area: 1 / 1; white-space: nowrap; visibility: hidden; }
.lbl-stack > span.on { visibility: visible; }
.tp-cap { min-height: 0; height: calc(3 * 1.5em); overflow: hidden; }
@media (max-width: 640px) { .tp-cap { height: calc(4 * 1.5em); } }

/* owner 1 Nov 2026: small floating Ollie retired (js/main.js syncDock never shows him) */
#ollie-dock, #dock-bubble { display: none !important; }

/* MIRA AI + Ollie fits one screen on laptops/desktops (owner, 2 Nov 2026): heading + Ollie on the left,
   the chat fills the right column's full height, feature notes under the chat. Phones/tablets keep the stacked layout. */
@media (min-width: 1100px) and (min-height: 640px) {
  #ollie.ollie-sec { padding: calc(var(--nav-h, 86px) + 10px) 0 18px; min-height: 100svh; box-sizing: border-box; display: flex; align-items: center; }
  #ollie > .wrap { width: min(1680px, 100% - 56px); }
  #ollie .ollie-grid { height: calc(100svh - var(--nav-h, 86px) - 28px); grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; column-gap: clamp(28px, 3.5vw, 64px); row-gap: 0; align-items: stretch; }
  #ollie .ollie-left, #ollie .ollie-right { display: contents; }
  #ollie .ollie-right > .eyebrow { grid-column: 1; grid-row: 1; margin: 0; }
  #ollie .ollie-right > .h-lg { grid-column: 1; grid-row: 2; margin: 8px 0 0; font-size: clamp(38px, min(3.4vw, 6.4vh), 64px); line-height: 1; }
  #ollie .ollie-right > .explain-btn { grid-column: 1; grid-row: 3; justify-self: start; margin-top: 12px; }
  #ollie .ollie-right > .lead { grid-column: 1; grid-row: 4; margin: 12px 0 0; font-size: clamp(15px, 1.9vh, 17px); line-height: 1.5; max-width: 60ch; }
  #ollie .ollie-left > .ollie-stage { grid-column: 1; grid-row: 5 / 7; align-self: center; justify-self: center; height: 100%; width: auto; max-width: 100%; max-height: 520px; min-height: 0; aspect-ratio: 1; }
  #ollie .ollie-left > .ollie-hint { display: none; }
  #ollie .ollie-right > .chat { grid-column: 2; grid-row: 1 / 6; margin: 0; min-height: 0; display: flex; flex-direction: column; }
  #ollie .chat > .chat-view { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; overflow: hidden; }
  #ollie .chat-view > .chat-body { height: auto; flex: 1 1 auto; min-height: 120px; }
  #ollie .chat > .chat-chips { flex-wrap: wrap; overflow: visible; }
  /* fix 3 Nov: on short screens the open Play deck was squeezed and its tiles spilled over the question chips —
     deck, chips and input never shrink; the deck scrolls inside itself, and the question chips fold away while it is open */
  #ollie .chat > .deck, #ollie .chat > .chat-chips, #ollie .chat > .vbar, #ollie .chat > .chat-input, #ollie .chat > .chat-foot { flex: none; }
  #ollie .chat > .deck { max-height: min(46%, 340px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  #ollie .chat.deck-open > .chat-chips > button:not(.play) { display: none; }
  #ollie .chat > .chat-chips::-webkit-scrollbar { display: none; }
  #ollie .chat > .chat-chips > * { flex: none; white-space: nowrap; }
  #ollie .ollie-right > .ollie-feats { grid-column: 2; grid-row: 6; margin-top: 12px; gap: 8px; }
  #ollie .ollie-feats div { padding: 8px 12px; font-size: 14.5px; }
}

/* chat starter chips (owner, 2 Nov): one line each, Play icon beside its word, row swipes sideways when it overflows */
#ollie .chat-chips { flex-wrap: wrap; overflow: visible; align-items: center; align-content: flex-end; row-gap: 8px; }
#ollie .chat-chips::-webkit-scrollbar { display: none; }
#ollie .chat-chips button { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; min-height: 38px; padding: 8px 14px; }
#ollie .chat-chips button.play span { font-size: 15px; line-height: 1; }

/* case studies (owner, 2 Nov 2026): problem → what we did → result */
.case--cs .cs-block { margin-top: 14px; }
.case--cs .cs-block:first-of-type { margin-top: 10px; }
.cs-k { display: block; font: 600 12.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc, #c4a6ff); margin-bottom: 6px; }
.cs-block p { margin: 0; color: var(--text-2); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.6; }
.cs-res p { color: var(--text); font-weight: 500; }
.cs-block ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cs-block li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.cs-block li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--acc, #a35cff); }
.case--modal .cs-block { margin-top: 16px; }
.pcard .cs-prob-s { margin: 6px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Applications: verticals → Smart Factory hub (owner, 2 Nov 2026) */
.vert { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 56px); align-items: center; margin-top: 8px; }
.vlines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.vl-base { fill: none; stroke: rgba(163,92,255,.22); stroke-width: 1.5; }
.vl-flow { fill: none; stroke: url(#none); stroke: #c06bff; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 10 220; animation: vflow 3.2s linear infinite; filter: drop-shadow(0 0 6px rgba(192,107,255,.8)); }
@keyframes vflow { from { stroke-dashoffset: 230; } to { stroke-dashoffset: 0; } }
.vcol { display: grid; gap: 14px; position: relative; z-index: 1; }
.vcard { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; transition: border-color .25s, transform .25s; }
.vcard:hover { border-color: rgba(192,107,255,.55); transform: translateY(-2px); }
.vcol--r .vcard { flex-direction: row; }
.vpic { flex: none; width: 64px; height: 64px; border-radius: 14px; background: radial-gradient(circle at 50% 60%, rgba(163,92,255,.22), rgba(255,255,255,.03)); display: grid; place-items: center; }
.vpic img { width: 52px; height: 52px; object-fit: contain; }
.vtxt h3 { margin: 0; font: 650 18px/1.2 var(--f-display); letter-spacing: -.01em; }
.vtxt p { margin: 4px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.vlinks { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.vlinks a { font: 500 13px var(--f-mono); color: #c4a6ff; display: inline-flex; align-items: center; gap: 6px; }
.vlinks a:hover { color: #fff; }
.vlinks .live-l i { width: 7px; height: 7px; border-radius: 50%; background: #2ee6a6; box-shadow: 0 0 0 3px rgba(46,230,166,.18); }
.vhub { position: relative; z-index: 1; text-align: center; padding: clamp(24px, 3vw, 40px) clamp(18px, 2vw, 30px); border-radius: 28px; background: radial-gradient(120% 90% at 50% 0%, rgba(163,92,255,.28), rgba(14,8,28,.92) 70%); border: 1px solid rgba(192,107,255,.4); box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset, 0 30px 90px rgba(122,76,255,.25); }
.vhub-core { position: relative; width: 96px; height: 96px; margin: 0 auto 16px; display: grid; place-items: center; }
.vhub-core i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(192,107,255,.45); animation: vpulse 3s ease-out infinite; }
.vhub-core i:nth-child(2) { animation-delay: 1s; } .vhub-core i:nth-child(3) { animation-delay: 2s; }
@keyframes vpulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.vhub-core b { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #8f4dff, #c03bff); box-shadow: 0 10px 30px rgba(143,77,255,.5); }
.vhub-core b svg { width: 32px; height: 32px; stroke: #fff; }
.vhub-k { font: 600 12.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: #c4a6ff; }
.vhub h3 { margin: 8px 0 10px; font: 700 clamp(28px, 2.6vw, 40px)/1.05 var(--f-display); letter-spacing: -.02em; }
.vhub p { margin: 0 0 18px; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.vert-more { margin: 28px 0 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .vl-flow, .vhub-core i { animation: none; } }
@media (max-width: 1080px) {
  .vert { grid-template-columns: 1fr 1fr; }
  .vhub { grid-column: 1 / -1; grid-row: 1; }
  .vlines { display: none; }
}
@media (max-width: 640px) { .vert { grid-template-columns: 1fr; } .vcol { gap: 10px; } .vpic { width: 54px; height: 54px; } .vpic img { width: 44px; height: 44px; } }
.vpic svg { width: 34px; height: 34px; }

/* fix 3 Nov: on short desktop screens the chat card ran past its grid row and its footer sat on top of the Ollie feature list —
   there the feature list steps aside and the chat takes the full column */
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 860px) {
  #ollie .ollie-right > .ollie-feats { display: none; }
  #ollie .ollie-right > .chat { grid-row: 1 / 7; }
}

/* fix 3 Nov: Applications / Videos pages start with a flush-top section, so its eyebrow and heading sat under the fixed nav and logo */
.subpage main > section:first-of-type { padding-top: clamp(112px, 11vw, 168px); }
/* fix 3 Nov: phones: the footer email broke mid-word ("…controls.c / om") in its half-width column — give "Talk to us" the full row */
@media (max-width: 480px) { .foot-grid nav:last-child { grid-column: 1 / -1; } }
/* fix 3 Nov: phones: the case-study window title ("CASE 01 · WOVEN SACKS · EAST AFRICA") wrapped and its second line sat on the screenshot */
.holo .bar { min-width: 0; }
.holo .bar i { flex: none; }
.holo .bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* fix 3 Nov: the chat starter chips and the Applications card links (both added 2 Nov) missed the 44 px touch rule above (QA 20-10) */
@media (pointer: coarse), (max-width: 640px) {
  #ollie .chat-chips button { min-height: 44px; }
  .vlinks { gap: 4px 18px; margin-top: 4px; }
  .vlinks a { min-height: 44px; }
}
/* fix 3 Nov: phones: the 2 Nov chip rule (wrap, overflow visible) beat the phone row above, so the questions stacked into a
   tall column whose ends were cut off under the perched Ollie — on phones they are one row that swipes sideways again */
@media (max-width: 640px) { #ollie .chat-chips { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; align-items: center; } }
/* fix 3 Nov: laptop screens (e.g. 1100×640, 1440×900): in the narrow chat column the six question chips wrapped one per line,
   ate half the chat and squeezed the conversation (and a Spot-the-fault round) to a sliver — there they are one row that
   scrolls sideways (wheel, trackpad or swipe), with the same fade as on phones */
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 960px) {
  #ollie .chat > .chat-chips { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; align-items: center; padding-right: 0; margin-right: calc(var(--perch, 75px) + 18px);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
/* fix 3 Nov: during a Spot-the-fault round the question chips fold away (like with the Play deck open) so all four machines and the timer fit */
#ollie .chat.game-on > .chat-chips > button:not(.play) { display: none; }
/* fix 3 Nov: with the "▶ Film" button back (films load on every page again), Film + Live demo + Brochure no longer fit one
   line in a four-up Applications card and Brochure ran into the next card — let the row wrap */
.app .app-links { flex-wrap: wrap; row-gap: 6px; }
/* fix 3 Nov: at four-up card widths (~1100 px) "Energy Monitoring (EMS)" was clamped to "Energy Monitoring…": titles are short, show them whole */
.app h4 { -webkit-line-clamp: 3; }
/* fix 3 Nov: phones held sideways (e.g. 844×390): the open menu ran past the bottom of the screen and Hardware / Contact
   could not be reached — it now fits the screen (two columns when short) and scrolls if it still has to */
@media (max-width: 1300px) {
  .nav.is-open .nav-links { max-height: none; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 1300px) and (max-height: 520px) {
  .nav.is-open .nav-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; }
  .nav.is-open .nav-links a { padding: 10px 16px; }
}
/* fix 3 Nov: short laptop screens (≤ 760 px tall): the four Spot-the-fault machines are drawn tighter so both rows fit the chat */
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 760px) {
  #ollie .msg .game { gap: 6px; margin-top: 8px; }
  #ollie .msg .game button { padding: 6px 10px; gap: 3px; }
  #ollie .msg .game button > b { font-size: 14.5px; }
  #ollie .msg .game .gm { gap: 1px; }
  #ollie .msg .game .gm em { font-size: 12px; line-height: 1.2; }
}


/* ================= PHONE FIXES (4 Nov 2026) =================
   1. case studies: the .feat grid track was sized by its widest child (a 460 px screenshot), so card text ran past the
      390 px screen and was clipped by html{overflow-x:clip}. Tracks are now minmax(0,1fr) and children may shrink.
   2. Ollie's intro bubble sat at z-index 9999 and floated over the fixed nav; it now stays inside its stage.
   3. the round "Give me a tour" button no longer floats over content on phones: tour.js parks it in the nav bar, left of the menu button.
   4. phone hero is vertically centred (headline + CTAs in the first screen) and the decorative scroll cue (which overlapped the language chips) is dropped.
   5. applications: cards size to their content on phones (no reserved empty rows), Smart Factory card is fully lit without waiting for the desktop merge animation. */
.feat { grid-template-columns: minmax(0, 1fr); }
.case > *, .case-copy, .case-media { min-width: 0; }
@media (max-width: 960px) { .feat > .case, .feat > .case:nth-child(even) { grid-template-columns: minmax(0, 1fr); } }
.case p, .case li, .cs-block p, .cs-block li, .case h3, .case .mtitle, .case .client { overflow-wrap: anywhere; }
.ollie-stage { isolation: isolate; }
.stage-bubble { z-index: 6; }
@media (max-width: 860px) {
  .nav .tour-fab { position: static; flex: none; margin-left: auto; right: auto; bottom: auto; width: 46px; height: 46px; min-width: 46px; min-height: 46px; padding: 0; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.4); transform: scale(.5); opacity: 0; pointer-events: none; z-index: auto; transition: transform .4s var(--ease), opacity .3s; }
  .nav .tour-fab.is-in { transform: none; opacity: 1; pointer-events: auto; }
  body.tour-on .nav .tour-fab, body.in-chat .nav .tour-fab, body.in-how .nav .tour-fab { transform: scale(.5); opacity: 0 !important; pointer-events: none !important; }
  .nav .tour-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav .tour-fab svg { width: 20px; height: 20px; }
  .nav .tour-fab ~ .nav-burger { margin-left: 8px; }
  .nav .wrap { gap: 0; }
}
@media (max-width: 560px) {
  .hero { align-items: center; padding: 92px 0 96px; }
  .hero-hud.bl { display: none; }
}
@media (max-width: 1100px) { .sf-card { opacity: 1; transform: none; } }
@media (max-width: 599px) {
  .app, .ag .app { min-height: 0; height: auto; }
  .app .app-d { min-height: 0; }
  .app-x:empty { display: none; }
  .app-x { min-height: 0; }
}

/* ---- iOS Safari / notch specifics (4 Nov 2026) ---- */
/* inputs under 16 px make iOS Safari zoom the whole page when focused (and leave it zoomed): chat box + contact form use 16 px on touch screens */
@media (pointer: coarse), (max-width: 860px) {
  .chat-input input, #chat-in, .term input, .term textarea, .term select { font-size: 16px; }
}
/* viewport-fit=cover: keep content out from under the notch in landscape, and the nav under the status area */
@media (max-width: 900px) {
  .wrap { width: calc(100% - max(40px, 2 * max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)))); }
  .nav { padding-top: max(18px, env(safe-area-inset-top, 0px)); }
}
/* iOS: vh is the tall viewport (address bar hidden), so use the dynamic one where supported */
@media (max-width: 640px) { .wrap { width: calc(100% - max(24px, 2 * max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)))); } }
@supports (height: 1dvh) {
  .modal .box { inset: 4dvh 4vw; }
  @media (max-width: 640px) { .modal .box { inset: 0; padding-bottom: env(safe-area-inset-bottom, 0px); } }
  .vbox video { max-height: 86dvh; }
  .wa-phone { height: min(560px, 74dvh); }
  @media (max-width: 420px) { .wa-phone { height: min(520px, 70dvh); } }
}

/* tour panel on phones: 44 px touch targets for prev / stop / next and the step dots (were 34 px and 12 x 22 px) */
@media (max-width: 640px), (pointer: coarse) {
  .tp-ic { width: 44px; height: 44px; }
  .tp-main { width: 48px; height: 48px; }
  .tp-dots button { width: 14px; height: 44px; }
}

/* phones in landscape (844 x 390): headline + CTAs in the first screen; copy and buttons side by side */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 64px 0 16px; align-items: center; }
  .hero h1 { font-size: min(clamp(30px, 8.4vw, 132px), 11vh, calc((100vw - 56px) / 10.6)); }
  .hero-kicker { margin-bottom: 10px; }
  .hero-sub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 14px; align-items: center; }
  .hero-hud, .hero-frame { display: none; }
}

/* long chips (live-platform tags) wrap inside their card instead of running past it */
.lbody .tags .chip { white-space: normal; max-width: 100%; }
@media (max-width: 400px) { #ollie .chat-head .st { font-size: 12.5px; } }

/* landscape phones: slimmer fixed nav so it leaves room for content */
@media (max-height: 500px) and (orientation: landscape) {
  .nav { padding-top: max(6px, env(safe-area-inset-top, 0px)); padding-bottom: 6px; }
  .nav-logo img { height: 34px; }
  .nav-burger { width: 44px; height: 44px; }
  .nav.is-open .nav-links { inset: 0; padding-top: 64px; max-height: none; overflow-y: auto; }
}
/* phones: the label in a screenshot's title bar (e.g. "CASE 02 · SPECIALITY CHEMICALS · GUJARAT") wraps instead of being cut with an ellipsis */
@media (max-width: 640px) {
  .lshot .bar { height: auto; min-height: 28px; padding: 6px 10px; }
  .lshot .bar span { white-space: normal; overflow: visible; text-overflow: clip; flex: 1 1 0; min-width: 0; line-height: 1.3; }
}

html.menu-lock, html.menu-lock body { overflow: hidden; overscroll-behavior: none; }


/* ===== clip-fix 7 Nov 2026 ===== */
/* Ollie + his festival prop (diya, flag, kite, lantern...) stay fully inside the chat box: the 1.5x canvas ends 4px inside the box edge */
#ollie .chat-perch { right: calc(var(--ps) * .25 + 4px); }
@media (max-width: 640px) { #ollie .chat-perch { right: calc(var(--ps) * .25 + 4px); } }
/* MIRA header on phones: name and status never wrap or get cut; the tools shrink instead */
#ollie .chat-head .nm { white-space: nowrap; }
@media (max-width: 480px) {
  #ollie .chat-head { gap: 8px; padding: 12px 10px 12px 12px; }
  #ollie .chat-head .av, #ollie .chat-head .av img { width: 32px; height: 32px; }
  #ollie .chat-tools { gap: 4px; }
  #ollie .ic-btn { width: 32px; height: 32px; }
  #ollie .chat-head .seg button { padding: 4px 8px; font-size: 14px; }
  #ollie .chat-head .st { overflow: visible; }
  #ollie .chat-input input::placeholder { font-size: 14.5px; }
}

/* film poster: on phones the title wraps to two lines and met the centred play button; the button rides higher and the title is smaller */
@media (max-width: 560px) { .theater .play-btn { top: 36%; width: 56px; height: 56px; } .theater .ovl h3 { font-size: clamp(16px, 5vw, 20px); } }
/* video thumbnails: the caption sits on a stronger scrim so white titles stay readable on bright screenshots */
.vthumb span { background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.9) 34%); }
/* app / problem cards show their whole description (no 3-4 line clamp cutting a sentence mid-way) */
.app .app-d, .pcard .cs-prob-s, .app h4 { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
/* tour fab and filter pills: purple backgrounds darkened so white text passes AA (>= 4.5:1) */
.tour-fab { background: linear-gradient(110deg, #8b4cf5, #7656f5); }
/* clip-fix 7 Nov 2026: the round tour button is never smaller than a 44 px touch target */
.tour-fab { min-width: 44px; min-height: 44px; box-sizing: border-box; }
@media (max-width: 640px) { .tour-fab { width: 48px; height: 48px; } }
