/* Klippy. Fonts: Manrope (text) and JetBrains Mono (labels), both SIL OFL, self-hosted. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arabic: IBM Plex Sans Arabic (SIL OFL), downloaded only when Arabic letters are on the page */
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/plex-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
    U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/plex-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
    U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/plex-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
    U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/plex-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
    U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  /* night violet: deep ink, lavender light, a dusk-pink horizon */
  --bg: #100d1b;
  --bg-2: #0c0a16;
  --surface: #171329;
  --surface-2: #211b39;
  --line: #dcd1ff1a;
  --line-2: #dcd1ff2e;
  --ink: #f3efff;
  --soft: #c2bad6;
  --muted: #8a829d;
  --accent: #b6a0ee;
  --accent-hi: #c9b8f5;
  --accent-ink: #160f2b;
  --dusk: #e48a9c;
  --ok: #9fe3c0;
  --danger: #ff8f9a;
  --sans: "Manrope", "Plex Arabic", "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", "Plex Arabic", ui-monospace, Menlo, Consolas, monospace;
  /* the real caption font of rendered clips is DejaVu Sans Bold */
  --caption: "DejaVu Sans", Verdana, "Plex Arabic", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.045em; line-height: 1.08; margin: 0; }
p { margin: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(1320px, calc(100% - 112px)); margin-inline: auto; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0; position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 22px; font-weight: 500; letter-spacing: -0.06em; color: var(--ink); }
.brand svg { color: var(--ink); }
.pill-nav {
  display: flex; gap: 26px; padding: 13px 24px; border: 1px solid var(--line); border-radius: 100px;
  background: #ffffff0a; box-shadow: inset 0 1px 0 #ffffff0a; font-size: 13px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.pill-nav a { color: var(--soft); text-decoration: none; transition: color .25s; }
.pill-nav a:hover { color: #fff; }
.top-actions { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
/* language menu: a globe that opens a short list (works without JavaScript; site.js closes it) */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; color: var(--soft); border: 1px solid transparent; transition: color .2s, border-color .2s, background .2s; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: #fff; border-color: var(--line-2); background: #ffffff0a; }
.lang-menu ul { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 20; min-width: 170px; margin: 0; padding: 6px;
  list-style: none; border: 1px solid var(--line-2); border-radius: 16px; background: #171329f2; box-shadow: 0 20px 50px #0009; }
.lang-menu a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: var(--soft); text-decoration: none; }
.lang-menu a:hover { background: #ffffff0d; color: #fff; }
.lang-menu a[aria-current]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--soft); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
button.link:hover { color: #fff; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 16px 26px;
  border-radius: 100px; border: 1px solid transparent; font: 500 14px/1 var(--sans); text-decoration: none;
  color: var(--ink); background: var(--surface-2); cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .25s, box-shadow .35s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { flex: none; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 18px 50px -18px #b6a0eecc; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.glass { background: #ffffff0a; border-color: var(--line-2); color: #eee9fa; box-shadow: inset 0 1px 0 #ffffff12; }
.btn.small { padding: 12px 20px; font-size: 13px; gap: 16px; }
.danger-btn { border-color: var(--danger); color: var(--danger); background: transparent; }

.flash { margin-top: 8px; margin-bottom: 8px; padding: 12px 16px; border-radius: 12px; font-size: 14px;
  background: #9fe3c014; border: 1px solid #9fe3c040; color: var(--ok); position: relative; z-index: 11; }

.note-flash { background: #b6a0ee14; border-color: #b6a0ee40; color: var(--soft); }

/* ---------- landing ---------- */
.hero .top { position: absolute; top: 0; left: 0; right: 0; }
.hero .flash { position: absolute; top: 96px; left: 0; right: 0; }
.track { position: relative; height: 250svh; min-height: calc(760px + 150svh); }
.hero { position: sticky; top: 0; height: 100svh; min-height: 760px; overflow: hidden; isolation: isolate; }

.sky { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 12% at 50% 64%, #f5a3b455, transparent 70%),
    radial-gradient(38% 9% at 22% 52%, #b9578a38, transparent 70%),
    radial-gradient(42% 8% at 80% 49%, #9c4a8a33, transparent 70%),
    linear-gradient(180deg, #0e0b1c 0%, #171131 30%, #2c1b55 48%, #6a3477 58%, #c56d8f 63.6%, #2a1b46 64%, #1a1232 72%, #0d0a18 100%);
}
.sky::after { /* light on the water */
  content: ""; position: absolute; left: 0; right: 0; top: 64%; bottom: 0; opacity: .55;
  background: repeating-linear-gradient(180deg, #ffffff00 0 5px, #e9b6d81a 5px 6px);
  -webkit-mask-image: radial-gradient(60% 75% at 50% 0%, #000, transparent 78%);
  mask-image: radial-gradient(60% 75% at 50% 0%, #000, transparent 78%);
}

.hero-head { position: absolute; left: 0; right: 0; top: 150px; }
.eyebrow { font: 400 11px/1 var(--mono); letter-spacing: .12em; color: #ada2cb; }
.hero h1 { font-size: clamp(44px, 4.5vw, 74px); font-weight: 700; letter-spacing: -0.05em; line-height: 1.02; margin-top: 22px; max-width: 9.5em; }
.lead { margin-top: 22px; max-width: 25em; font-size: 17px; line-height: 1.6; color: var(--soft); }
.hero h1 em { font-style: normal; color: var(--accent); }


.hero-cta { margin-top: 34px; }
.consent { font-size: 12px; color: var(--muted); margin-top: 14px; max-width: 34em; }
.consent a { color: var(--soft); }

/* a live chat next to the phone: calm, then it explodes, then Klippy catches the moment */
.chat { position: absolute; inset-inline-end: max(56px, calc((100% - 1320px) / 2)); top: 50%; width: 270px; transform: translateY(-46%);
  border: 1px solid var(--line); border-radius: 20px; background: #15102acc; box-shadow: inset 0 1px 0 #ffffff0d; }
.chat-head { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line);
  font: 400 10px/1 var(--mono); letter-spacing: .12em; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 7px; color: #ff7d8f; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff4d67; box-shadow: 0 0 10px #ff4d67; }
.chat-window { height: 320px; overflow: hidden; padding: 0 16px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 88%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 88%, transparent); }
.chat-roll { animation: roll 16s linear infinite; }
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.msg { font-size: 13px; line-height: 1.35; color: #ddd5f0; padding: 5px 0; }
.msg b { font-weight: 600; margin-inline-end: 4px; }
.msg .u0 { color: #b6a0ee; } .msg .u1 { color: #ff9fb2; } .msg .u2 { color: #8fd8ff; } .msg .u3 { color: #ffd36e; }
.msg.hot { color: #fff; font-weight: 600; }
.msg.event { margin: 8px 0 14px; padding: 9px 11px; border-radius: 12px; background: #b6a0ee24; border: 1px solid #b6a0ee55;
  color: var(--ink); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.msg.event svg { flex: none; color: var(--accent); }

/* the phone: a slab with a screen in front and a back, turned by scroll (landing.js) */
.stage {
  opacity: 0; transition: opacity .5s ease; /* landing.js places it, then it fades in (noscript.css) */
  position: absolute; left: 50%; top: 50%; width: 236px; height: 500px; transform: translate(-50%, -47%);
  perspective: 1500px;
}
.spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform-origin: 50% 50%;
  transform: rotateY(-16deg) rotateZ(2deg); will-change: transform; } /* landing.js turns it with the scroll */
.phone { position: relative; width: 236px; height: 500px; transform-style: preserve-3d; }
/* side wall: an extruded rounded rectangle of flat facets with baked light (generated, see
   SAAS_PLAN.md §8 "Tasarım"); side buttons; the camera plateau's step on the back */
.f { position: absolute; left: 0; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.f0 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #4a506a, #8792c0 30%, #8792c0 70%, #4a506a); transform: translate3d(-4.39px, 18.34px, -2.00px) rotateZ(-82.50deg) rotateX(90deg); }
.f1 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #50566f, #919cc9 30%, #919cc9 70%, #50566f); transform: translate3d(-1.97px, 9.34px, -2.00px) rotateZ(-67.50deg) rotateX(90deg); }
.f2 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #545a72, #98a3cf 30%, #98a3cf 70%, #545a72); transform: translate3d(2.68px, 1.27px, -2.00px) rotateZ(-52.50deg) rotateX(90deg); }
.f3 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #555b74, #9ba6d2 30%, #9ba6d2 70%, #555b74); transform: translate3d(9.27px, -5.32px, -2.00px) rotateZ(-37.50deg) rotateX(90deg); }
.f4 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #555b73, #9aa5d1 30%, #9aa5d1 70%, #555b73); transform: translate3d(17.34px, -9.98px, -2.00px) rotateZ(-22.50deg) rotateX(90deg); }
.f5 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #525871, #95a0cd 30%, #95a0cd 70%, #525871); transform: translate3d(26.34px, -12.39px, -2.00px) rotateZ(-7.50deg) rotateX(90deg); }
.f6 { width: 164.60px; height: 26px; background: linear-gradient(180deg, #50566f, #919dc9 30%, #919dc9 70%, #50566f); transform: translate3d(35.70px, -13.00px, -2.00px) rotateZ(0.00deg) rotateX(90deg); }
.f7 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #4e546c, #8d98c5 30%, #8d98c5 70%, #4e546c); transform: translate3d(199.66px, -12.39px, -2.00px) rotateZ(7.50deg) rotateX(90deg); }
.f8 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #474e67, #818dbb 30%, #818dbb 70%, #474e67); transform: translate3d(208.66px, -9.98px, -2.00px) rotateZ(22.50deg) rotateX(90deg); }
.f9 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #3f4660, #737faf 30%, #737faf 70%, #3f4660); transform: translate3d(216.73px, -5.32px, -2.00px) rotateZ(37.50deg) rotateX(90deg); }
.f10 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #373e59, #6470a1 30%, #6470a1 70%, #373e59); transform: translate3d(223.32px, 1.27px, -2.00px) rotateZ(52.50deg) rotateX(90deg); }
.f11 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(227.98px, 9.34px, -2.00px) rotateZ(67.50deg) rotateX(90deg); }
.f12 { width: 10.00px; height: 26px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(230.39px, 18.34px, -2.00px) rotateZ(82.50deg) rotateX(90deg); }
.f13 { width: 114.60px; height: 26px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(178.70px, 80.00px, -2.00px) rotateZ(90.00deg) rotateX(90deg); }
.f14 { width: 314.60px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(78.70px, 296.00px, 0.00px) rotateZ(90.00deg) rotateX(90deg); }
.f15 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(230.39px, 457.66px, 0.00px) rotateZ(97.50deg) rotateX(90deg); }
.f16 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(227.98px, 466.66px, 0.00px) rotateZ(112.50deg) rotateX(90deg); }
.f17 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(223.32px, 474.73px, 0.00px) rotateZ(127.50deg) rotateX(90deg); }
.f18 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(216.73px, 481.32px, 0.00px) rotateZ(142.50deg) rotateX(90deg); }
.f19 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(208.66px, 485.98px, 0.00px) rotateZ(157.50deg) rotateX(90deg); }
.f20 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(199.66px, 488.39px, 0.00px) rotateZ(172.50deg) rotateX(90deg); }
.f21 { width: 164.60px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(35.70px, 489.00px, 0.00px) rotateZ(180.00deg) rotateX(90deg); }
.f22 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(26.34px, 488.39px, 0.00px) rotateZ(-172.50deg) rotateX(90deg); }
.f23 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(17.34px, 485.98px, 0.00px) rotateZ(-157.50deg) rotateX(90deg); }
.f24 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(9.27px, 481.32px, 0.00px) rotateZ(-142.50deg) rotateX(90deg); }
.f25 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #343b57, #5f6c9e 30%, #5f6c9e 70%, #343b57); transform: translate3d(2.68px, 474.73px, 0.00px) rotateZ(-127.50deg) rotateX(90deg); }
.f26 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #3b415c, #6b77a8 30%, #6b77a8 70%, #3b415c); transform: translate3d(-1.97px, 466.66px, 0.00px) rotateZ(-112.50deg) rotateX(90deg); }
.f27 { width: 10.00px; height: 22px; background: linear-gradient(180deg, #434a64, #7a86b5 30%, #7a86b5 70%, #434a64); transform: translate3d(-4.39px, 457.66px, 0.00px) rotateZ(-97.50deg) rotateX(90deg); }
.f28 { width: 314.60px; height: 22px; background: linear-gradient(180deg, #464d67, #808cbb 30%, #808cbb 70%, #464d67); transform: translate3d(-157.30px, 296.00px, 0.00px) rotateZ(-90.00deg) rotateX(90deg); }
.f29 { width: 114.60px; height: 26px; background: linear-gradient(180deg, #464d67, #808cbb 30%, #808cbb 70%, #464d67); transform: translate3d(-57.30px, 80.00px, -2.00px) rotateZ(-90.00deg) rotateX(90deg); }
.sb0 { width: 20px; height: 9px; background: linear-gradient(180deg, #4e546c, #8d98c5 35%, #8d98c5 65%, #4e546c); transform: translate3d(-11.60px, 117.50px, 0px) rotateZ(-90deg) rotateX(90deg); }
.sb1 { width: 45px; height: 9px; background: linear-gradient(180deg, #4e546c, #8d98c5 35%, #8d98c5 65%, #4e546c); transform: translate3d(-24.10px, 178.00px, 0px) rotateZ(-90deg) rotateX(90deg); }
.sb2 { width: 45px; height: 9px; background: linear-gradient(180deg, #4e546c, #8d98c5 35%, #8d98c5 65%, #4e546c); transform: translate3d(-24.10px, 236.00px, 0px) rotateZ(-90deg) rotateX(90deg); }
.sb3 { width: 68px; height: 9px; background: linear-gradient(180deg, #3b425d, #6c78a9 35%, #6c78a9 65%, #3b425d); transform: translate3d(203.60px, 197.50px, 0px) rotateZ(90deg) rotateX(90deg); }
.sb4 { width: 42px; height: 9px; background: linear-gradient(180deg, #3b425d, #6c78a9 35%, #6c78a9 65%, #3b425d); transform: translate3d(216.60px, 334.50px, 0px) rotateZ(90deg) rotateX(90deg); }
.pstep { width: 234px; height: 4px; background: linear-gradient(180deg, #5f6c9e, #343b57); transform: translate3d(1px, 148.00px, -13.00px) rotateX(-90deg); }
.face { position: absolute; left: 0; right: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front { top: 0; bottom: 0; border-radius: 36px; transform: translateZ(11px); border: 7px solid #07060b; background: #000;
  box-shadow: 0 0 0 1.4px #8f9ad0, inset 0 0 0 1px #1b1a24; }
.back-plateau { top: 0; height: 150px; border-radius: 36px 36px 0 0; transform: rotateY(180deg) translateZ(15px);
  background: linear-gradient(112deg, #24305c 0%, #33417a 38%, #4b5a9e 70%, #6e7cbc 100%);
  box-shadow: inset 0 1px 0 #ffffff40, inset 0 -1px 0 #0000004d; }
.back-glass { top: 150px; bottom: 0; border-radius: 0 0 36px 36px; transform: rotateY(180deg) translateZ(11px);
  background: linear-gradient(112deg, #1f2850 0%, #2a3566 45%, #3d4a8a 80%, #55629f 100%);
  box-shadow: inset 0 1px 0 #00000059; }
.lens { position: absolute; width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #5b6ab0 0 6%, #11142a 16%, #05060d 40%, #1a1d33 52%, #0b0c17 60%, #262c4c 63%, #9aa6d6 67%, #3c4677 74%, #20284d 100%);
  box-shadow: 0 2px 4px #0006, inset 0 0 0 1px #ffffff1f; }
.l1 { left: 16px; top: 16px; } .l2 { left: 16px; top: 82px; } .l3 { left: 72px; top: 49px; }
.flash-led { position: absolute; left: 190px; top: 30px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, #fff8e8 0 30%, #e8d9b8 45%, #b9ab8c 70%, #6c6656 100%); }
.lidar { position: absolute; left: 189px; top: 96px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, #1a1a22 0 50%, #2c2f44 60%, #0d0d14 100%); box-shadow: inset 0 0 0 1px #ffffff1a; }
.mic { position: absolute; left: 196px; top: 70px; width: 5px; height: 5px; border-radius: 50%; background: #0b0d1a; }
.back-mark { position: absolute; left: 50%; top: 42%; width: 46px; transform: translate(-50%, -50%); color: #ffffff38; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.island { position: absolute; top: 9px; left: 50%; width: 66px; height: 19px; border-radius: 12px; background: #000; transform: translateX(-50%); }
.ui-top { position: absolute; top: 38px; left: 13px; right: 13px; display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px #0008; }
.avatar-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent);
  color: var(--accent-ink); font-size: 10px; font-weight: 700; text-shadow: none; }
.ui-ago { margin-left: auto; font: 400 9.5px var(--mono); opacity: .8; }
.ph-cap { position: absolute; left: 0; right: 0; top: 46%; text-align: center; font: 700 21px/1.1 var(--caption);
  text-transform: uppercase; color: #fff; letter-spacing: .01em;
  text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000, 1.4px 1.4px #000, -1.4px -1.4px #000, 1.4px -1.4px #000, -1.4px 1.4px #000; }
.ph-cap .w { animation: word 2.1s steps(1) infinite; }
.ph-cap .w2 { animation-delay: .7s; }
.ph-cap .w3 { animation-delay: 1.4s; }
@keyframes word { 0% { color: #ffe135; } 33.3% { color: #fff; } }
.ui-panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 46px 13px 14px;
  background: linear-gradient(180deg, #08061000, #080610d9 34%, #080610f2); }
.ui-title { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #fff; margin-bottom: 10px; }
.wave { display: block; width: 100%; height: 32px; }
.wave .talk { fill: #b6a0ee8c; }
.wave .hot { fill: #ffd36e; }
.wave .out { fill: #ffffff24; }
.wave .cut { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wave-labels { display: flex; justify-content: space-between; width: 79%; margin-top: 6px;
  font: 400 8.5px/1 var(--mono); letter-spacing: .08em; color: #cfc6e6; }
.ui-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; font-size: 12px; font-weight: 600; text-align: center; }
.ui-buttons span { padding: 9px 0; border-radius: 100px; }
.ui-no { border: 1px solid #ffffff38; color: #fff; }
.ui-yes { background: var(--accent); color: var(--accent-ink); display: grid; }
.ui-yes b { grid-area: 1 / 1; font-weight: 600; }
.yes-b { opacity: 0; }
.ui-toast { position: absolute; top: 36px; left: 11px; right: 11px; display: flex; align-items: center; gap: 7px;
  padding: 9px 11px; border-radius: 14px; background: #1b1530f0; border: 1px solid #b6a0ee66; box-shadow: 0 8px 24px #0008;
  font-size: 10.5px; font-weight: 600; color: var(--ink); opacity: 0; transform: translateY(-10px); }
.ui-toast svg { color: var(--accent); flex: none; }
/* the way into the phone: a dark screen that grows until it is the page (landing.js) */
.portal { position: absolute; left: 6px; top: 5px; width: 224px; height: 490px; border-radius: 31px; background: var(--bg);
  opacity: 0; pointer-events: none; box-shadow: 0 0 0 1px #b6a0ee44, 0 0 80px #6540d144; }


.hint { position: absolute; left: 50%; top: 100%; margin-top: 56px; transform: translateX(-50%); white-space: nowrap;
  font: 400 9px/1 var(--mono); letter-spacing: .14em; color: #a79dc4; }

/* sections */
.block { padding-top: 120px; }
.rule { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 18px;
  font: 400 11px/1.4 var(--mono); letter-spacing: .12em; color: var(--muted); }
.rule a { text-decoration: none; letter-spacing: .04em; }
.rule a:hover { color: var(--ink); }
.num { font: 400 12px var(--mono); color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 72px; margin: 52px 0 0; }
.facts dt { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.facts dd { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; max-width: 52ch; }

/* how it works: one pinned scene. Each feature arrives, its drawing plays with the scroll, then it
   leaves and the next one arrives. landing.js sets --e (arrived), --x (left) and --t (drawing). */
/* it starts inside the phone: the track overlaps the end of the hero's, so the scene is already
   pinned while the dark screen finishes growing (landing.js fades it in), with no empty scroll */
.story-track { position: relative; z-index: 2; height: 920vh; margin-top: calc(-1 * (max(100svh, 760px) + 30svh)); }
.anchor { position: absolute; top: calc(30svh + 24px); }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column;
  padding: 28px 0 32px; background: var(--bg); }
.pin-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; align-items: center; }
.pin-viz { --ph: min(66vh, 560px); position: relative; height: var(--ph); }
.pin-text { position: relative; height: 100%; }
.feat { --e: 0; --x: 0; --t: 0; opacity: calc(var(--e) - var(--x)); }
.feat[data-i="0"] { --e: 1; --t: 1; }
.panel { position: absolute; left: 0; right: 0; top: 50%; margin: 0 auto; width: 100%; max-width: calc(var(--ph) * 4 / 3); aspect-ratio: 4 / 3;
  border: 1px solid var(--line-2); border-radius: 24px; overflow: hidden; background: #110d20;
  box-shadow: inset 0 1px 0 #ffffff0d, 0 50px 140px -50px #6540d1aa;
  transform: translateY(calc(-50% + (1 - var(--e)) * 70px)) scale(calc(.9 + var(--e) * .1 + var(--x) * .08)); }
.viz { display: block; width: 100%; height: 100%; }
.panel.feat, .feat-text, .hero-head, .chat, .portal { will-change: transform, opacity; }
.stage.placed { opacity: 1; }
.feat-text { position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(calc(-50% + (1 - var(--e)) * 56px - var(--x) * 56px)); }
.feat-text .num { display: block; margin-bottom: 18px; }
.feat-text h3 { font-size: clamp(34px, 3.6vw, 60px); font-weight: 700; letter-spacing: -0.05em; line-height: 1.02; }
.feat-text p { margin-top: 20px; color: var(--soft); font-size: 18px; line-height: 1.65; max-width: 24em; }
.k1 { --k: .1; } .k2 { --k: .2; } .k3 { --k: .3; } .k4 { --k: .4; } .k5 { --k: .5; }
.k6 { --k: .6; } .k7 { --k: .7; } .k8 { --k: .8; } .k9 { --k: .9; }
.fade { opacity: clamp(0, calc((var(--t) - var(--k, 0)) * 10), 1); }
.rise { transform: translateY(calc((1 - clamp(0, calc((var(--t) - var(--k, 0)) * 10), 1)) * 14px)); }
.fade-out { opacity: calc(1 - clamp(0, calc((var(--t) - .7) * 10), 1)); }
.draw { fill: none; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - clamp(0, calc((var(--t) - var(--k, 0)) * var(--sp, 1.3)), 1)); }
.lbl { font: 400 11px var(--mono); letter-spacing: .1em; fill: var(--muted); }
.lbl.dim { fill: #6d6585; }
.lbl.strong { fill: var(--ink); }
.lbl.ok { fill: var(--ok); }
.gridlines path { stroke: #ffffff0f; stroke-width: 1; }
.thresh { stroke: #ff9fb2; stroke-width: 1.2; stroke-dasharray: 4 6; opacity: .7; }
.line { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line.pink { stroke: #ff9fb2; }
.line.blue { stroke: #8fd8ff; }
.lane-base { stroke: #ffffff0f; }
.dot { fill: #ffd36e; }
.word { font: 700 15px var(--caption); fill: #ffe135; }
.pin { fill: #ffd36e; }
.pin-ring { fill: none; stroke: #ffd36e; stroke-width: 1.5; opacity: .5; }
.tag-bg { fill: #ffd36e1c; stroke: #ffd36e66; }
.tag-tx { font: 500 11px var(--mono); letter-spacing: .08em; fill: #ffd36e; }
.tick { stroke: #ffd36e88; stroke-dasharray: 3 4; }
.bar { fill: #ffffff10; }
.bar-fill { fill: #b6a0ee40; }
.chip { fill: #ffd36e; }
.lift { transform: translateY(calc(clamp(0, calc(var(--t) * 1.8), 1) * -96px));
  opacity: calc(1 - clamp(0, calc((var(--t) - .55) * 8), 1)); }
.link { stroke: var(--accent); stroke-width: 1.6; --sp: 3; }
.card { fill: #ffffff08; stroke: var(--line-2); }
.card-t { font: 600 16px var(--sans); fill: var(--ink); }
.wave-bars .talk { fill: var(--accent); }
.wave-bars .out { fill: #b6a0ee3d; }
.wave-bars .hot { fill: #ffd36e; }
.cover { fill: #110d20; transform: translateX(calc(clamp(0, calc(var(--t) * 1.5), 1) * 462px)); }
.cut { stroke: var(--ink); stroke-width: 2; }
.cut.end { stroke: #ffd36e; }
.slide-l { transform: translateX(calc((1 - clamp(0, calc((var(--t) - .5) * 10), 1)) * -16px)); }
.slide-r { transform: translateX(calc((1 - clamp(0, calc((var(--t) - .8) * 10), 1)) * 16px)); }
.ts { font: 400 11px var(--mono); fill: var(--muted); }
.tx { font: 500 15px var(--sans); fill: var(--soft); }
.tx.loud { font: 700 15px var(--caption); fill: #ffe135; }
.brace { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.dawn { fill: #f19a92; opacity: calc(var(--t) * .1); }
.arc { fill: none; stroke: #ffffff1c; stroke-dasharray: 2 6; }
.horizon { stroke: #ffffff26; }
.orbit { transform-box: view-box; transform-origin: 260px 250px; transform: rotate(calc(-62deg + var(--t) * 124deg)); }
.moon { fill: #ddd5f5; opacity: calc(1 - var(--t)); }
.sun { fill: #ffd36e; opacity: var(--t); }
.note { fill: #ffffff0c; stroke: var(--line-2); }
.viz svg { color: var(--accent); }
.note-t { font: 500 12.5px var(--sans); fill: var(--ink); }
/* 04 captions: the words light up one by one, then the same line in the other two looks */
.cam { fill: #ffffff1f; stroke: #ffffff40; }
.frame-edge { fill: none; stroke: var(--line-2); }
.capt { font: 700 13px var(--caption); paint-order: stroke; stroke: #000; stroke-width: 3.5px; stroke-linejoin: round; }
.capt.plain { stroke: none; font-size: 12.5px; }
.capbox { fill: #000000a6; }
.cw { --h: calc(clamp(0, (var(--t) - var(--k)) * 25, 1) * (1 - clamp(0, (var(--t) - var(--k) - var(--l)) * 25, 1)));
  fill: rgb(255 calc(255 - 30 * var(--h)) calc(255 - 202 * var(--h))); }
.g-pop .cw { fill: rgb(calc(255 - 195 * var(--h)) 255 calc(255 - 165 * var(--h))); }
.a1 { --k: .16; --l: .12; } .a2 { --k: .28; --l: .12; } .a3 { --k: .40; --l: .26; }
.b1 { --k: .67; --l: .05; } .b2 { --k: .72; --l: .05; } .b3 { --k: .77; --l: .06; }
.c1 { --k: .84; --l: .05; } .c2 { --k: .89; --l: .05; } .c3 { --k: .94; --l: .2; }
.g-bold { opacity: calc(1 - clamp(0, (var(--t) - .66) * 20, 1)); }
.g-pop { opacity: calc(clamp(0, (var(--t) - .66) * 20, 1) - clamp(0, (var(--t) - .83) * 20, 1)); }
.g-box { opacity: clamp(0, (var(--t) - .83) * 20, 1); }
.speech rect { fill: var(--accent); opacity: .55; }
.playhead { stroke: #ffd36e; stroke-width: 2; transform: translateX(calc(clamp(0, (var(--t) - .1) / .56, 1) * 256px)); }
.strong-tx { font-weight: 700; fill: var(--ink); }
.pill { fill: #ffffff08; stroke: var(--line-2); }
.pill-on { fill: var(--accent); }
.pill-t { font: 500 11px var(--mono); fill: var(--soft); }
.pill-t.dark { fill: var(--accent-ink); font-weight: 700; }
.on-bold { opacity: calc(1 - clamp(0, (var(--t) - .66) * 20, 1)); }
.on-pop { opacity: calc(clamp(0, (var(--t) - .66) * 20, 1) - clamp(0, (var(--t) - .83) * 20, 1)); }
.on-box { opacity: clamp(0, (var(--t) - .83) * 20, 1); }
/* 07 learning: each approved clip's end let run longer; the next clip already is */
.lt-track { fill: #ffffff0a; }
.lt-prop { fill: #b6a0ee26; }
.lt-ext { fill: #b6a0ee66; transform-box: fill-box; transform-origin: left center; transform: scaleX(0); }
.lt-h { stroke: var(--ink); stroke-width: 2; }
.lt-h.end { stroke: #ffd36e; }
.e1 { --k: .12; } .e2 { --k: .24; } .e3 { --k: .36; }
.lt-ext.e1, .lt-ext.e2, .lt-ext.e3 { transform: scaleX(clamp(0, (var(--t) - var(--k)) * 8, 1)); }
.lt-h.end.e1, .lt-h.end.e2, .lt-h.end.e3 { transform: translateX(calc(clamp(0, (var(--t) - var(--k)) * 8, 1) * 26px)); }
.lt-learned { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.lt-div { stroke: #ffffff1c; stroke-dasharray: 3 5; }

/* footer */
.foot { margin-top: 140px; }
.app .foot { margin-top: 72px; }
.foot-cta { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 72px; }
.foot-cta h2 { font-size: clamp(36px, 4.4vw, 72px); font-weight: 700; letter-spacing: -0.05em; max-width: 11em; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line);
  padding: 22px 0 36px; font-size: 13px; color: var(--muted); }
.foot-row span:last-child { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-row a { text-decoration: none; transition: color .2s; }
.foot-row a:hover { color: var(--ink); }

/* ---------- app pages: dashboard, legal, errors ---------- */
.app main { width: min(1080px, calc(100% - 40px)); margin: 12px auto 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; margin-bottom: 16px; }
.card h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.05em; }
.card h2 { font-size: 22px; letter-spacing: -0.04em; margin-bottom: 12px; }
.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 28px 0 10px; }
.card.narrow { max-width: 560px; margin: 64px auto; text-align: center; }
.card.narrow p { margin-top: 12px; color: var(--soft); }
.card.narrow .btn { margin-top: 24px; }
.card.warn { border-color: #ffd36e55; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.card.danger { border-color: #ff8f9a40; }
.who { display: flex; align-items: center; gap: 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar.blank { display: inline-block; }
.name { font-size: 22px; font-weight: 500; letter-spacing: -0.04em; margin: 2px 0 0; }
.tag { font: 400 10px/1 var(--mono); letter-spacing: .1em; padding: 5px 9px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--soft); vertical-align: middle; margin-left: 8px; }
.note { font-size: 14px; color: var(--muted); border-inline-start: 2px solid var(--accent); padding-inline-start: 12px; margin: 16px 0 0; }
/* clips: watch, decide, edit (phone first: one column, the video fills the width) */
.nav-link { font-size: 13px; color: var(--soft); text-decoration: none; }
.nav-link:hover { color: #fff; }
.clips-head { margin: 8px 0 22px; }
.clips-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.05em; margin-bottom: 8px; }
.narrow-left { max-width: 620px; }
.narrow-left p + p { margin-top: 10px; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.clip-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; scroll-margin-top: 16px; }
.clip-media { position: relative; background: #000; aspect-ratio: 9 / 16; max-height: 72vh; margin: 0 auto; }
.clip-media video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.clip-busy { position: absolute; inset: 0 0 auto 0; margin: 0; padding: 12px 12px 28px; text-align: center; font-size: 14px;
  background: linear-gradient(#000c, transparent); color: #fff; pointer-events: none; }
.clip-body { padding: 16px 18px 18px; }
.clip-body h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 12px; }
.clip-status { font: 400 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.clip-status.st-approved { color: var(--ok); }
.clip-error { color: var(--danger); font-size: 14px; margin-bottom: 10px; }
.clip-actions form { margin: 0; }
.clip-actions .btn svg { flex: none; }
.clip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.clip-actions .btn { padding: 12px 18px; gap: 8px; }

/* live tracking state and the latest moments */
.live-state { display: flex; align-items: baseline; gap: 10px; color: var(--soft); }
.live-state::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
  transform: translateY(-1px); }
.live-state.state-on::before { background: var(--ok); }
.live-state.state-live::before { background: #ff4d67; box-shadow: 0 0 10px #ff4d67; }
.moments { list-style: none; margin: 0 0 10px; padding: 0; }
.moments li { display: grid; grid-template-columns: minmax(90px, auto) 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.m-kind { font-weight: 600; }
.kind-laugh { color: #ffd36e; } .kind-shock { color: #8fd8ff; } .kind-command { color: var(--accent); }
.m-when { color: var(--muted); }
.m-status { font: 400 11px var(--mono); letter-spacing: .06em; padding: 4px 9px; border-radius: 100px; border: 1px solid var(--line-2); color: var(--soft); }
.m-status.st-done { color: var(--ok); border-color: #9fe3c055; }
.m-status.st-failed { color: var(--danger); border-color: #ff8f9a55; }
.check { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.choices { display: grid; gap: 10px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choices.four { grid-template-columns: repeat(4, 1fr); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg-2); transition: border-color .15s ease; }
.choice-body strong { font-size: 15px; font-weight: 600; }
.choice-body .muted { font-size: 13.5px; }
.choice:hover .choice-body { border-color: var(--line-2); }
.choice input:checked + .choice-body { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #b6a0ee0d; }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-body.sample { align-items: center; justify-content: center; min-height: 92px; text-align: center; gap: 10px; }
.choice-body .label { font: 400 10px var(--mono); color: var(--muted); letter-spacing: .1em; }
/* caption samples: the same look as the rendered captions */
.cap { font-family: var(--caption); font-weight: 700; }
.cap-bold, .cap-pop { text-transform: uppercase; color: #fff; font-size: 15px;
  text-shadow: 1.5px 0 #000, -1.5px 0 #000, 0 1.5px #000, 0 -1.5px #000, 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000; }
.cap-bold .hl { color: #ffe135; }
.cap-pop .hl { color: #3cff5a; font-size: 1.18em; }
.cap-box { display: inline-block; color: #fff; background: #000000a6; padding: 4px 8px; border-radius: 4px; font-size: 13px; }
.cap-box .hl { color: #ffe135; }
.editor { display: grid; grid-template-columns: 1fr 210px; gap: 26px; align-items: start; }
/* the facecam box only matters for the camera-below layout; otherwise show just the preview */
.settings:has(input[name="layout"][value="split"]:not(:checked)) .editor { grid-template-columns: 210px; justify-content: center; }
.settings:has(input[name="layout"][value="split"]:not(:checked)) .editor-left { display: none; }
.frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid { position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 10% 10%; }
.box { position: absolute; border: 2px solid var(--accent); background: #b6a0ee29; border-radius: 6px; }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 14px; }
.sliders label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
input[type=range] { accent-color: var(--accent); width: 100%; }
#preview { width: 210px; height: auto; aspect-ratio: 9 / 16; border-radius: 16px; border: 1px solid var(--line);
  background: #000; display: block; box-shadow: 0 20px 50px #0007; }
textarea, select { width: 100%; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 12px 14px; font: 15px/1.5 var(--sans); }
textarea:focus, select:focus { border-color: var(--accent); outline: none; }
select { width: auto; min-width: 220px; }
.actions { margin-top: 26px; display: flex; justify-content: flex-end; }

.legal { padding: 36px; max-width: 820px; margin-inline: auto; }
.legal h1 { margin-bottom: 8px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--soft); }
.legal p { margin: 10px 0; }
.legal ul { padding-inline-start: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); }

/* ---------- smaller screens ---------- */
@media (min-width: 1181px) {
  /* the headline stops before the phone in the middle, in every language */
  .hero h1 { max-width: min(9.5em, calc(50vw - 200px)); }
}
@media (max-width: 1180px) {
  .chat { display: none; }
  .stage { left: 70%; }
}
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .pill-nav { display: none; }
  .facts { grid-template-columns: 1fr; gap: 32px; }
  .foot-cta { flex-direction: column; align-items: flex-start; }
  .story { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pin-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 26px; align-items: start; margin-top: 18px; }
  .pin-viz { --ph: min(46vh, calc((100vw - 48px) * .75)); height: var(--ph); }
  .feat-text { top: 0; transform: translateY(calc((1 - var(--e)) * 36px - var(--x) * 36px)); }
  .feat-text .num { margin-bottom: 10px; }
  .feat-text p { margin-top: 12px; font-size: 16px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .top { padding: 20px 0; }
  .top-actions { gap: 12px; }
  .hero { min-height: 540px; }
  .story-track { margin-top: calc(-1 * (max(100svh, 540px) + 30svh)); }
  .track { min-height: calc(540px + 150svh); }
  .hero-head { top: 92px; bottom: 32px; display: flex; flex-direction: column; }
  .hero h1 { font-size: 36px; margin-top: 14px; }
  .eyebrow { font-size: 10px; }
  /* the same phone, scaled to the room between headline and button (landing.js sets --fit) */
  .stage { left: 50%; top: 55%; transform: translate(-50%, -50%) scale(var(--fit, .7)); }
  .lead { display: none; }
  .hint { display: none; }
  .hero-cta { margin-top: auto; }
  .hero-cta .btn { width: 100%; }
  .consent { text-align: center; margin-inline: auto; }
  .block { padding-top: 88px; }
  .rule span:last-child { display: none; }
  .feat-text h3 { font-size: 30px; }
  .pin-viz { --ph: min(46vh, calc((100vw - 32px) * .75)); }
  .foot { margin-top: 100px; }
  .foot-cta .btn { width: 100%; }
  .choices.three { grid-template-columns: 1fr; }
  .choices.four { grid-template-columns: repeat(2, 1fr); }
  .editor { grid-template-columns: 1fr; }
  #preview { margin: 0 auto; }
  .card { padding: 20px; }
  .card.warn { flex-direction: column; align-items: flex-start; }
  .actions .btn { width: 100%; }
  .legal { padding: 22px; }
}
@media (max-height: 760px) and (min-width: 641px) {
  .hero-head { top: 110px; }
  .stage { transform: translate(-50%, -47%) scale(.86); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track { height: auto; min-height: 0; }
  .hero { position: relative; }
  .spin { will-change: auto; }
  .ph-cap .w, .chat-roll { animation: none; }
  .ph-cap .w1 { color: #ffe135; }
  .btn, .btn svg { transition: none; }
}

/* ---------- right to left (Arabic) ---------- */
[dir="rtl"] .stage, [dir="rtl"] .panel { direction: ltr; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translate(2px, -2px); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .brand, [dir="rtl"] .eyebrow, [dir="rtl"] .rule,
[dir="rtl"] .num, [dir="rtl"] .lbl, [dir="rtl"] .tag-tx, [dir="rtl"] .chat-head, [dir="rtl"] .wave-labels,
[dir="rtl"] .tag, [dir="rtl"] .choice-body .label, [dir="rtl"] .hint { letter-spacing: 0; }
[dir="rtl"] .hero h1 { line-height: 1.25; }
[dir="rtl"] .feat-text h3, [dir="rtl"] .foot-cta h2, [dir="rtl"] .rows h2 { line-height: 1.3; }
@media (max-width: 1180px) {
  [dir="rtl"] .stage { left: 30%; }
}
@media (max-width: 640px) {
  [dir="rtl"] .stage { left: 50%; }
}

/* pricing and the plan card (S5) */
.pricing { padding: 36px 0 12px; }
.pricing-head { max-width: 660px; margin-bottom: 28px; }
.pricing-head h1 { font-size: clamp(34px, 4vw, 54px); font-weight: 700; letter-spacing: -0.05em; line-height: 1.05;
  margin: 16px 0 12px; }
.pricing-head p { color: var(--soft); font-size: 17px; line-height: 1.6; margin: 0; }
.early { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; margin: 0 0 24px;
  background: #b6a0ee14; border: 1px solid #b6a0ee44; color: var(--ink); font-size: 15px; line-height: 1.5; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px;
  display: flex; flex-direction: column; gap: 12px; }
.plan.featured { border-color: #b6a0ee66; box-shadow: 0 30px 80px -40px #b6a0ee88; }
.plan.soon { opacity: .7; }
.plan h2 { font-size: 20px; letter-spacing: -0.03em; margin: 0; display: flex; align-items: center; gap: 10px; }
.price { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; margin: 4px 0 0; }
.price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.save { margin: 0; color: var(--ok); font: 400 11px/1.4 var(--mono); letter-spacing: .08em; }
.plan ul { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; gap: 10px; color: var(--soft);
  font-size: 15px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .55em; border-radius: 50%;
  background: var(--accent); }
.plan-actions { display: grid; gap: 10px; }
.plan-actions .btn { width: 100%; }
.pricing-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.pricing-note a { color: var(--soft); }
.plan-line { margin: 0 0 6px; font-size: 16px; }
.plan-buttons { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* the signed-in app: a side menu and pages (dashboard redesign, 2026-11-15) */
.console main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.console .foot { margin-top: 48px; }
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 40px; padding-top: 28px; }
.side { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 22px;
  min-height: calc(100vh - 80px); }
.side-brand { padding: 4px 10px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--soft);
  text-decoration: none; font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.side-nav a:hover { background: #ffffff08; color: var(--ink); }
.side-nav a[aria-current="page"] { background: #b6a0ee1a; color: var(--ink); box-shadow: inset 0 0 0 1px #b6a0ee38; }
.side-nav a[aria-current="page"] svg { color: var(--accent); }
.side-nav .badge { margin-inline-start: auto; min-width: 22px; text-align: center; padding: 3px 7px; border-radius: 100px;
  background: var(--accent); color: var(--accent-ink); font: 500 11px/1 var(--mono); }
.side-user { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.avatar.small { width: 38px; height: 38px; }
.side-user-text { display: grid; gap: 2px; min-width: 0; }
.side-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-role { font-size: 12px; color: var(--muted); }
.side-user form { grid-column: 1 / -1; }
.side-out { font-size: 12px; color: var(--muted); }

.app-content { min-width: 0; padding-bottom: 12px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 6px 0 22px; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.045em; margin: 0 0 6px; }
.pill-state { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--line-2); font-size: 13px; color: var(--soft); background: #ffffff06; }
.pill-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill-state.state-on::before { background: var(--ok); }
.pill-state.state-live { color: #fff; border-color: #ff4d6766; }
.pill-state.state-live::before { background: #ff4d67; box-shadow: 0 0 10px #ff4d67; }
.pill-state.state-soon::before { background: #ffd36e; }

.setup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.setup-head h2 { margin: 0; }
.steps-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.steps-list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps-list li:first-child { border-top: 0; }
.steps-list strong { font-size: 15px; font-weight: 600; }
.steps-list p { margin: 4px 0 0; line-height: 1.55; }
.steps-list .done strong { color: var(--soft); }
.step-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); }
.done .step-mark { background: var(--ok); border-color: var(--ok); color: #0e1f17; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: grid; gap: 8px; align-content: start; padding: 18px 20px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
a.stat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.stat-k { font: 400 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat b { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat-note { font-size: 12px; color: var(--muted); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.overview-grid .card { margin: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); text-decoration: none; }
.link-arrow:hover { color: var(--ink); }
.clip-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.clip-tile { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); color: #fff; text-decoration: none; border: 1px solid var(--line); }
.clip-tile img, .tile-blank { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-tile::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #000c); }
.tile-status { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; padding: 4px 8px; border-radius: 100px;
  font: 500 10px/1 var(--mono); letter-spacing: .05em; background: #000a; color: var(--ink); }
.tile-status.st-approved { background: var(--ok); color: #0e1f17; }
.tile-status.st-ready { background: var(--accent); color: var(--accent-ink); }
.tile-title { position: absolute; inset-inline: 10px; bottom: 10px; z-index: 1; font-size: 12px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 26px 12px; color: var(--soft);
  border: 1px dashed var(--line-2); border-radius: 16px; }
.empty svg { color: var(--accent); }
.empty p { max-width: 34ch; margin: 0 0 6px; }
.moments-foot { margin-top: 12px; }

.advanced { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.advanced summary { cursor: pointer; color: var(--soft); font-size: 14px; }
.save-bar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; padding: 12px; margin-top: 8px;
  border-radius: 18px; background: #171329e6; border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.plan-big { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; color: var(--soft); }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .55em; border-radius: 50%; background: var(--accent); }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; }
.who { flex-wrap: wrap; }
.who-text { flex: 1; min-width: 0; }
.who-text p { margin: 0; overflow-wrap: anywhere; }
.who .tag { white-space: nowrap; display: inline-block; vertical-align: middle; }
.who form, .who > .btn { flex: none; }

@media (max-width: 960px) {
  /* minmax(0, ...) and min-width: 0 keep the scrolling menu row from widening the page */
  .app-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 14px; }
  .side { position: static; min-height: 0; min-width: 0; gap: 12px; }
  .side-nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .side-nav a { flex: none; padding: 9px 12px; }
  .side-user { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page-head { flex-direction: column; }
  .stat b { font-size: 26px; }
  /* phones: the menu becomes a tab bar at the bottom of the screen */
  .console { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .side-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0; overflow: visible; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: #100d1bf0;
    border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
  .side-nav a { position: relative; flex-direction: column; gap: 4px; padding: 6px 2px; border-radius: 10px;
    font-size: 10.5px; line-height: 1.15; text-align: center; }
  .side-nav a[aria-current="page"] { background: transparent; box-shadow: none; }
  .side-nav .badge { position: absolute; top: 1px; inset-inline-start: calc(50% + 5px); margin: 0; min-width: 18px;
    padding: 2px 5px; font-size: 10px; }
  .save-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .who .avatar { width: 48px; height: 48px; }
  .who form, .who > .btn { flex-basis: 100%; }
  .who form .btn, .who > .btn { width: 100%; }
}

/* the clip editor: preview, trim on a timeline, framing, captions line by line */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.editor-page .foot { display: none; }
.editor-page main { width: min(1440px, calc(100% - 32px)); margin: 0 auto; }
.ed { display: grid; gap: 14px; padding: 14px 0 22px; }
.ed-top { display: flex; align-items: center; gap: 12px; }
.ed-back { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px 8px 4px; border-radius: 10px; color: var(--soft); text-decoration: none; font-size: 14px; }
.ed-back:hover { color: var(--ink); background: #ffffff08; }
[dir="rtl"] .ed-back svg { transform: scaleX(-1); }
.ed-title { flex: 1; min-width: 0; }
.ed-title input { width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink);
  font: 700 20px/1.2 var(--sans); letter-spacing: -0.02em; }
.ed-title input:hover { border-color: var(--line); }
.ed-title input:focus { border-color: var(--line-2); background: #ffffff06; outline: none; }
.ed-top-actions { display: flex; align-items: center; gap: 8px; }
.ed-state { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ed-state.warn { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--line);
  background: #ffffff06; color: var(--soft); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover:not(:disabled) { color: var(--ink); background: #ffffff10; border-color: var(--line-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn[aria-pressed="true"] { color: var(--accent); border-color: #b6a0ee55; background: #b6a0ee14; }
#mute[aria-pressed="true"] .wave-a { opacity: 0; }
#mute[aria-pressed="true"] { color: var(--muted); border-color: var(--line); background: #ffffff06; }
.ed-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.ed-stage { display: grid; gap: 10px; justify-items: center; }
.ed-view { position: relative; height: clamp(320px, calc(100vh - 420px), 640px); aspect-ratio: 9 / 16; overflow: hidden; border-radius: 18px; background: #07050d;
  border: 1px solid var(--line-2); box-shadow: 0 30px 80px -40px #6540d1aa; }
.ed-view canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.ed-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px;
  text-align: center; font-size: 13px; color: var(--soft); background: #07050de6; }
.ed-loading[hidden] { display: none; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid #ffffff22; border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.failed .spinner { display: none; }
.ed-transport { display: flex; align-items: center; gap: 8px; }
.play-btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--accent);
  color: var(--accent-ink); cursor: pointer; transition: transform .15s, background .15s; }
.play-btn:hover { background: var(--accent-hi); }
.play-btn:active { transform: scale(.94); }
.play-btn .i-pause, .playing .play-btn .i-play { display: none; }
.playing .play-btn .i-pause { display: block; }
.ed-time { margin: 0 6px; font: 500 13px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-time b { color: var(--ink); font-weight: 500; }
#video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* as tall as the preview; the settings scroll inside, so the timeline never jumps */
.ed-panel { height: calc(clamp(320px, calc(100vh - 420px), 640px) + 66px); overflow-y: auto; padding: 0 18px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ed-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; margin: 0 -18px 16px; padding: 0 10px;
  border-bottom: 1px solid var(--line); background: var(--surface); }
.ed-tabs [role="tab"] { margin-bottom: -1px; padding: 15px 12px 12px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); font: 600 14px var(--sans); cursor: pointer; transition: color .15s, border-color .15s; }
.ed-tabs [role="tab"]:hover { color: var(--soft); }
.ed-tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.ed-pane { display: grid; gap: 14px; align-content: start; }
.ed-pane[hidden], .ed-pane [hidden] { display: none; }
.ed-pane .note { margin: 0; }
.ed-pane > .btn, .cap-tools .btn { justify-self: start; }
.ed-pane p.muted { margin: 0; line-height: 1.6; }
.cut-rows { display: grid; gap: 10px; }
.cut-row { display: grid; grid-template-columns: 56px 128px auto; align-items: center; justify-content: start; gap: 10px; }
.cut-row label { font-size: 14px; color: var(--soft); }
.time-in { width: 100%; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--ink);
  font: 500 15px var(--mono); text-align: center; }
.time-in:focus, .cap-text:focus { border-color: var(--accent); outline: none; }
kbd { margin-inline-start: 4px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); font: 500 11px var(--mono); color: var(--muted); }
.cut-len { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.cut-len b { color: var(--ink); font-weight: 600; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.seg.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 9px 6px; border-radius: 10px; text-align: center; font-size: 13px; color: var(--soft); transition: background .15s, color .15s; }
.seg-opt input:checked + span { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px #b6a0ee55; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.src-view { position: relative; width: min(100%, calc((100vh - 560px) * 16 / 9)); min-width: min(100%, 360px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #07050d; border: 1px solid var(--line-2); }
.src-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.src-boxes { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.src-box { position: absolute; border: 2px solid var(--accent); border-radius: 4px; cursor: move; }
.box-view { box-shadow: 0 0 0 9999px #07050da6; }
.box-game { background: #b6a0ee1f; }
.box-cam { border-color: #ffd36e; background: #ffd36e1f; }
.src-box.fixed { cursor: default; }
.src-box span { position: absolute; top: 4px; inset-inline-start: 4px; padding: 2px 6px; border-radius: 6px; background: #000000b0; color: #fff;
  font: 600 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.src-box .corner { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 4px 0 2px 0; background: var(--accent); cursor: nwse-resize; }
.box-cam .corner { background: #ffd36e; }
.range-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; color: var(--soft); }
.range-row[hidden] { display: none; }
.range-row b { font: 500 13px var(--mono); color: var(--ink); }
.ed input[type="range"] { width: 100%; accent-color: var(--accent); }
#capOn { display: grid; gap: 14px; }
.cap-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-tools .btn svg { vertical-align: -2px; }
.cap-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cap-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 3px; border-radius: 12px;
  border: 1px solid transparent; transition: background .15s, border-color .15s; }
.cap-row.now { border-color: #ffd36e55; background: #ffd36e0d; }
.cap-time { padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 500 12px var(--mono); cursor: pointer; }
.cap-time:hover { color: var(--ink); background: #ffffff0a; }
.cap-text { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  font: 600 14px var(--sans); }
.cap-del { width: 32px; height: 32px; }

.ed-timeline { padding: 10px 12px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tl-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 100px; border: 1px solid var(--line);
  background: #ffffff06; color: var(--soft); font: 500 13px var(--sans); cursor: pointer; }
.chip-btn[aria-pressed="true"] { color: var(--accent); border-color: #b6a0ee55; background: #b6a0ee14; }
.tl-len { margin: 0; font-size: 13px; color: var(--muted); }
.tl-len b { color: var(--ink); font-weight: 600; }
.tl-zoom { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.tl-zoom input { width: 140px; }
.tl-zoom .icon-btn { width: 30px; height: 30px; }
.tl-scroll { position: relative; overflow-x: auto; overflow-y: hidden; border-radius: 12px; background: var(--bg); scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent; touch-action: pan-x; }
.tl { position: relative; height: 154px; user-select: none; -webkit-user-select: none; }
.tl-ruler { position: absolute; top: 0; left: 0; z-index: 1; width: 100%; height: 24px; cursor: pointer; touch-action: none; }
.tl-lane { position: absolute; left: 0; z-index: 1; width: 100%; }
.tl-lane canvas { display: block; width: 100%; height: 100%; }
.tl-video { top: 26px; height: 50px; }
.tl-audio { top: 79px; height: 34px; }
.tl-caps { top: 117px; height: 32px; }
.tl-shade { position: absolute; top: 24px; bottom: 0; left: 0; z-index: 2; background: #07050dc2; pointer-events: none; }
.tl-sel { position: absolute; top: 24px; bottom: 0; left: 0; z-index: 4; box-sizing: border-box; border: 2px solid var(--accent);
  border-radius: 8px; pointer-events: none; }
.tl-h { position: absolute; top: -2px; bottom: -2px; width: 14px; background: var(--accent); cursor: ew-resize; pointer-events: auto; touch-action: none; }
.tl-in { left: -8px; border-radius: 8px 2px 2px 8px; }
.tl-out { right: -8px; border-radius: 2px 8px 8px 2px; }
.tl-h::after { content: ""; position: absolute; top: 50%; left: 50%; width: 2px; height: 18px; margin: -9px 0 0 -1px; border-radius: 2px;
  background: var(--accent-ink); opacity: .55; }
.tl-h:hover, .tl-h:active { background: var(--accent-hi); }
.tl-prop { position: absolute; top: 15px; left: -5px; z-index: 3; width: 0; height: 0; border-left: 5px solid transparent;
  border-right: 5px solid transparent; border-top: 8px solid #ffd36e; }
.tl-head { position: absolute; top: 0; bottom: 0; left: -1px; z-index: 5; width: 2px; background: #fff; pointer-events: none; }
.tl-head i { position: absolute; top: 0; left: -5px; width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; background: #fff; }
.cap-block { position: absolute; top: 3px; bottom: 3px; left: 0; z-index: 3; overflow: hidden; border-radius: 6px; border: 1px solid #ffd36e66;
  background: #ffd36e24; color: #ffe9b0; font: 600 11px var(--sans); cursor: grab; touch-action: none; }
.cap-block:active { cursor: grabbing; }
.cap-block span { display: block; padding: 7px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.cap-block .edge { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.cap-block .edge.l { left: 0; }
.cap-block .edge.r { right: 0; }
.cap-block:hover .edge { background: #ffd36e40; }
.tl-keys { margin: 8px 2px 0; font-size: 12px; color: var(--muted); }

@media (max-width: 1000px) {
  /* phone and tablet: the preview, then the timeline under the thumb, then the settings */
  .ed { display: flex; flex-direction: column; }
  .ed-body { display: contents; }
  .ed-top { order: 1; }
  .ed-stage { order: 2; }
  .ed-timeline { order: 3; }
  .ed-panel { order: 4; }
  .ed-view { height: min(54vh, 560px); }
  .ed-panel { height: auto; overflow: visible; }
  .ed-tabs { position: static; }
  .src-view { width: 100%; min-width: 0; }
  .tl-keys { display: none; }
}
@media (max-width: 640px) {
  .editor-page main { width: calc(100% - 20px); }
  .ed-top { flex-wrap: wrap; gap: 6px; }
  .ed-title { order: 3; flex-basis: 100%; }
  .ed-title input { font-size: 17px; }
  .ed-top-actions { margin-inline-start: auto; }
  .ed-state { display: none; }
  .ed-view { height: min(50vh, 470px); }
  .cut-row { grid-template-columns: 52px minmax(0, 1fr); }
  .cut-row .btn { grid-column: 1 / -1; }
  .tl-zoom input { width: 80px; }
  .tl-len { display: none; }
  .seg-opt span { padding: 9px 2px; font-size: 12px; }
  .ed-panel { padding: 0 14px 14px; }
  .ed-tabs { margin: 0 -14px 14px; }
}
