/* ============================================================================
   Tensor — Glassmorphism SaaS Landing Page & Interactive Chat Showcase
   Palette: #060C1C bg, #8FE8F8 primary accent, #1F6FB5 secondary, #F4F6FF text
   Typography: Bricolage Grotesque (display) + DM Sans (interface & prose)
   ========================================================================== */

:root {
  --bg: #060c1c;
  --bg-elev: #0a1226;
  --panel: rgba(12, 21, 43, 0.58);
  --panel-solid: #0c152b;
  --side: rgba(8, 16, 34, 0.52);
  --glass-bg: rgba(14, 24, 48, 0.48);
  --glass-strong: rgba(16, 28, 56, 0.68);
  --glass-border: rgba(244, 246, 255, 0.13);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --surface-soft: rgba(143, 232, 248, 0.08);
  --ink: #f4f6ff;
  --ink-2: #c9d4ea;
  --muted: #8b9bb8;
  --line: rgba(244, 246, 255, 0.09);
  --line-strong: rgba(143, 232, 248, 0.24);
  --accent: #8fe8f8;
  --accent-2: #1f6fb5;
  --accent-ink: #060c1c;
  --soft: rgba(31, 111, 181, 0.22);
  --grid-dot: rgba(244, 246, 255, 0.045);
  --shadow-frame:
    0 42px 110px -28px rgba(0, 0, 0, 0.88),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-card:
    0 20px 52px -26px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --fluid-a: rgba(31, 111, 181, 0.78);
  --fluid-b: rgba(143, 232, 248, 0.58);
  --fluid-c: rgba(114, 92, 246, 0.68);
  --fluid-d: rgba(152, 85, 247, 0.52);
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-elev: #e9eff8;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-solid: #ffffff;
  --side: rgba(237, 242, 249, 0.68);
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-border: rgba(11, 18, 32, 0.11);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --surface-soft: rgba(31, 111, 181, 0.08);
  --ink: #0b1220;
  --ink-2: #2b384e;
  --muted: #52627b;
  --line: rgba(11, 18, 32, 0.1);
  --line-strong: rgba(31, 111, 181, 0.28);
  --accent: #1f6fb5;
  --accent-2: #087e9a;
  --accent-ink: #ffffff;
  --soft: rgba(31, 111, 181, 0.12);
  --grid-dot: rgba(11, 18, 32, 0.06);
  --shadow-frame:
    0 36px 88px -24px rgba(15, 32, 68, 0.18),
    0 0 0 1px rgba(11, 18, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-card:
    0 16px 40px -22px rgba(15, 32, 68, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --fluid-a: rgba(31, 111, 181, 0.42);
  --fluid-b: rgba(56, 189, 248, 0.45);
  --fluid-c: rgba(99, 102, 241, 0.36);
  --fluid-d: rgba(139, 92, 246, 0.32);
  color-scheme: light;
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  position: relative;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
summary {
  cursor: pointer;
}

button {
  background: transparent;
  border: 0;
}

h1,
h2,
h3,
h4,
.brand,
.rail-brand,
.footer-wordmark {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.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;
}

/* --- Ambient Backdrop ---------------------------------------------------- */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, var(--grid-dot) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(100% 75% at 50% 0%, #000 18%, transparent 80%);
  -webkit-mask-image: radial-gradient(100% 75% at 50% 0%, #000 18%, transparent 80%);
}

.ambient-glow--top {
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, 125vw);
  height: 540px;
  background: radial-gradient(
    ellipse at center,
    rgba(31, 111, 181, 0.28),
    rgba(143, 232, 248, 0.12) 42%,
    rgba(114, 92, 246, 0.09) 62%,
    transparent 76%
  );
  filter: blur(54px);
}

.ambient-glow--mid {
  position: absolute;
  top: 42%;
  right: -12%;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 111, 181, 0.14), rgba(143, 232, 248, 0.05) 50%, transparent 72%);
  filter: blur(70px);
}

html[data-theme="light"] .ambient-glow--top {
  background: radial-gradient(
    ellipse at center,
    rgba(31, 111, 181, 0.16),
    rgba(8, 126, 154, 0.08) 45%,
    transparent 74%
  );
}

main,
footer {
  position: relative;
  z-index: 1;
}

/* --- Invisible Header Container / Scroll-Revealed Glass Navigation Dock --- */
/* The sticky bar sits above every page layer (z-50) and carries its own
   near-opaque surface so scrolled content can never bleed through the
   navigation links. */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 22, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  pointer-events: none;
  transition: background-color 220ms ease, border-color 220ms ease;
}

html[data-theme="light"] .bar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: #e4e4e7;
}

#siteHeader.is-scrolled {
  background: rgba(9, 13, 22, 0.97);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] #siteHeader.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: #e4e4e7;
}

.navwrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 32px 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: auto;
  transition: padding 220ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

#navigation {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  transition:
    background-color 240ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 240ms ease,
    box-shadow 240ms ease,
    backdrop-filter 240ms ease;
}

#navigation a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 160ms ease, background-color 160ms ease;
}

#navigation a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

#siteHeader.is-scrolled #navigation {
  background: rgba(10, 18, 38, 0.84);
  border-color: var(--line-strong);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  box-shadow:
    0 16px 38px -12px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#siteHeader.is-scrolled #navigation a {
  color: var(--ink);
}

#siteHeader.is-scrolled .signin {
  background: rgba(10, 18, 38, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.65);
}

html[data-theme="light"] #siteHeader.is-scrolled #navigation {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(31, 111, 181, 0.24);
  box-shadow:
    0 14px 34px -12px rgba(15, 32, 68, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] #siteHeader.is-scrolled .signin {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(11, 18, 32, 0.1);
  box-shadow: 0 10px 24px -12px rgba(15, 32, 68, 0.14);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.signin {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 180ms ease;
}

.signin:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.n-theme-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-2);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.n-theme-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.n-theme-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button,
.outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button {
  background: linear-gradient(135deg, var(--accent) 0%, #5fd3ee 50%, var(--accent-2) 100%);
  color: #051020;
  border: 1px solid rgba(143, 232, 248, 0.45);
  box-shadow: 0 12px 30px -10px rgba(31, 111, 181, 0.6);
}

html[data-theme="light"] .button {
  background: linear-gradient(135deg, #1f6fb5 0%, #115896 100%);
  color: #ffffff;
  border: 1px solid rgba(21, 91, 150, 0.4);
  box-shadow: 0 10px 24px -10px rgba(31, 111, 181, 0.42);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -10px rgba(143, 232, 248, 0.48);
}

html[data-theme="light"] .button:hover {
  box-shadow: 0 14px 30px -10px rgba(31, 111, 181, 0.48);
}

.button.small {
  padding: 9px 16px;
  font-size: 13.5px;
}

.outline {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--glass-highlight);
  color: var(--ink);
}

.outline.small-btn {
  padding: 9px 16px;
  font-size: 13.5px;
}

.outline:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

#menu {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  color: var(--ink);
}

/* --- Hero Section -------------------------------------------------------- */
.hero {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(44px, 5vw, 72px) 32px 20px;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 840px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.75rem, 5.6vw, 4.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}

.hero-lead {
  max-width: 650px;
  margin: 20px auto 0;
  font-size: clamp(16.5px, 1.45vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  min-height: 1.7em;
}

#heroRotatingText {
  display: inline-block;
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

#heroRotatingText.is-swapping {
  opacity: 0;
  transform: translateY(-4px);
}

.ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.floater {
  pointer-events: auto;
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-card);
  animation: notely-float 7s ease-in-out infinite;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.floater:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.floater-icon {
  color: var(--accent);
  font-size: 13px;
}

.floater--1 { top: 20%; left: 3%; animation-delay: 0s; }
.floater--2 { top: 18%; right: 4%; animation-delay: -1.8s; }
.floater--3 { bottom: 16%; left: 5%; animation-delay: -3.4s; }
.floater--4 { bottom: 14%; right: 5%; animation-delay: -5.1s; }

@keyframes notely-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@media (max-width: 1120px) {
  .hero-floaters {
    display: none;
  }
}

/* --- Interactive Tensor Chat Showcase + Horizon Bloom Arc ---------------- */
.studio-wrap {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(150px, 11vw, 190px) 32px clamp(72px, 8vw, 112px);
}

/* Horizon Bloom: Dark planetary contrast zone beneath bright horizon rim */
.horizon-bloom {
  --hb-edge: #7c3aed;
  --hb-mid: #c084fc;
  --hb-core: #ffffff;
  --hb-edge-2: #6366f1;
  --hb-planet-top: #010104;
  --hb-planet-mid: #020307;
  --hb-planet-bot: #04060d;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: none;
  height: 540px;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

html[data-theme="light"] .horizon-bloom {
  --hb-edge: #7c3aed;
  --hb-mid: #3b82f6;
  --hb-core: #ffffff;
  --hb-edge-2: #2563eb;
  --hb-planet-top: #cbd5e1;
  --hb-planet-mid: #e2e8f0;
  --hb-planet-bot: #f3f6fb;
}

.horizon-bloom__atmosphere {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  width: min(88vw, 1080px);
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 54% 60% at 50% 72%,
    rgba(245, 208, 254, 0.32) 0%,
    rgba(168, 85, 247, 0.44) 30%,
    rgba(124, 58, 237, 0.24) 56%,
    rgba(37, 99, 235, 0.08) 76%,
    transparent 100%
  );
  filter: blur(44px);
  opacity: 0.96;
}

html[data-theme="light"] .horizon-bloom__atmosphere {
  background: radial-gradient(
    ellipse 54% 60% at 50% 74%,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(96, 165, 250, 0.36) 32%,
    rgba(59, 130, 246, 0.16) 58%,
    rgba(124, 58, 237, 0.08) 76%,
    transparent 100%
  );
}

.horizon-bloom__svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.horizon-bloom__stars circle {
  fill: #e9d5ff;
}

html[data-theme="light"] .horizon-bloom__stars {
  opacity: 0;
}

.horizon-bloom__flare-orb {
  transform-box: fill-box;
  transform-origin: center center;
  animation: horizonBloomPulse 7s ease-in-out infinite;
}

@keyframes horizonBloomPulse {
  0%, 100% {
    opacity: 0.82;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.studio-shell {
  position: relative;
  z-index: 2;
  padding: clamp(8px, 1.15vw, 12px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(ellipse 75% 40% at 50% 0%, rgba(168, 85, 247, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, rgba(24, 32, 60, 0.72) 0%, rgba(9, 14, 28, 0.88) 100%);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  box-shadow:
    0 46px 120px -24px rgba(0, 0, 0, 0.94),
    0 0 64px -22px rgba(124, 58, 237, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.studio-shell::before {
  content: "";
  position: absolute;
  inset: 0 18% auto 18%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(216, 180, 254, 0.65), rgba(143, 232, 248, 0.55), transparent);
  pointer-events: none;
  z-index: 3;
}

html[data-theme="light"] .studio-shell {
  border-color: rgba(15, 23, 42, 0.11);
  background:
    radial-gradient(ellipse 75% 40% at 50% 0%, rgba(124, 58, 237, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(235, 242, 252, 0.84) 100%);
  box-shadow:
    0 36px 96px -22px rgba(15, 32, 68, 0.18),
    0 0 42px -18px rgba(31, 111, 181, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

html[data-theme="light"] .studio-shell::before {
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.32), rgba(31, 111, 181, 0.36), transparent);
}

.studio {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 572px;
  background: #0c1428;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 24px 64px -20px rgba(0, 0, 0, 0.84),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

html[data-theme="light"] .studio {
  background: #ffffff;
  border-color: rgba(11, 18, 32, 0.09);
  box-shadow:
    0 20px 56px -20px rgba(15, 32, 68, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

/* Slim Left Icon Rail */
.rail-slim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 15px 8px;
  background: linear-gradient(180deg, #101a35 0%, #0b1326 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .rail-slim {
  background: linear-gradient(180deg, #f7f9fd 0%, #f1f5fb 100%);
  border-right-color: rgba(11, 18, 32, 0.075);
}

.rail-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.rail-icon-btn svg,
.rail-plus-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-icon-btn:hover,
.rail-icon-btn.is-active {
  background: rgba(255, 255, 255, 0.085);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.11);
}

html[data-theme="light"] .rail-icon-btn:hover,
html[data-theme="light"] .rail-icon-btn.is-active {
  background: rgba(31, 111, 181, 0.1);
  color: var(--accent);
  border-color: rgba(31, 111, 181, 0.22);
}

.rail-plus-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #9366ff 0%, #6d28d9 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 10px 24px -6px rgba(124, 58, 237, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms ease;
}

.rail-plus-btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow:
    0 14px 28px -5px rgba(139, 92, 246, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.rail-mode-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.rail-mode-icons button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14.5px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.rail-mode-icons button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.rail-mode-icons button[aria-selected="true"] {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.24) 0%, rgba(59, 130, 246, 0.16) 100%);
  color: #e9d5ff;
  border-color: rgba(167, 139, 250, 0.42);
  box-shadow:
    0 8px 18px -6px rgba(124, 58, 237, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

html[data-theme="light"] .rail-mode-icons button:hover {
  background: rgba(31, 111, 181, 0.08);
}

html[data-theme="light"] .rail-mode-icons button[aria-selected="true"] {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.12) 0%, rgba(31, 111, 181, 0.12) 100%);
  color: #5b21b6;
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 12px -4px rgba(124, 58, 237, 0.18);
}

.rail-slim-bottom {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* Main Studio Column */
.studio-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(ellipse 72% 46% at 50% 0%, rgba(124, 58, 237, 0.13), transparent 72%),
    radial-gradient(ellipse 52% 38% at 85% 18%, rgba(31, 111, 181, 0.1), transparent 68%),
    #0e172f;
}

html[data-theme="light"] .studio-main {
  background:
    radial-gradient(ellipse 68% 42% at 50% 0%, rgba(124, 58, 237, 0.055), transparent 70%),
    radial-gradient(ellipse 46% 36% at 85% 18%, rgba(31, 111, 181, 0.045), transparent 66%),
    #ffffff;
}

.studio-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.085);
  background: linear-gradient(180deg, rgba(19, 29, 57, 0.9) 0%, rgba(14, 23, 47, 0.84) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .studio-head {
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.96) 0%, rgba(244, 247, 252, 0.92) 100%);
  border-bottom-color: rgba(11, 18, 32, 0.075);
}

.studio-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.studio-crumb {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.divider {
  color: var(--muted);
  opacity: 0.42;
}

.dim {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Centered Chat / Workspace Segmented Control */
.studio-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3.5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(6, 10, 24, 0.56);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.38);
}

html[data-theme="light"] .studio-mode-switch {
  border-color: rgba(11, 18, 32, 0.08);
  background: rgba(11, 18, 32, 0.05);
  box-shadow: inset 0 1px 2px rgba(15, 32, 68, 0.06);
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  border-radius: 8.5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mode-pill svg {
  width: 13.5px;
  height: 13.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-pill:hover {
  color: var(--ink);
}

.mode-pill.is-active {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 100%);
  color: #ffffff;
  box-shadow:
    0 6px 16px -4px rgba(124, 58, 237, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.studio-head-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.sample {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.demo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5.5px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

html[data-theme="light"] .demo-toggle {
  border-color: rgba(11, 18, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 2px 6px -2px rgba(15, 32, 68, 0.08);
}

.demo-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.demo-toggle-icon {
  font-size: 8.5px;
  color: var(--accent);
}

.studio-more-btn {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

html[data-theme="light"] .studio-more-btn {
  border-color: rgba(11, 18, 32, 0.09);
  background: #ffffff;
}

.studio-more-btn svg {
  width: 15px;
  height: 15px;
}

.studio-more-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.studio-menu-pop {
  position: absolute;
  top: 56px;
  right: 16px;
  z-index: 25;
  min-width: 210px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(12, 17, 32, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.78);
  display: grid;
  gap: 3px;
}

html[data-theme="light"] .studio-menu-pop {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px -14px rgba(15, 32, 68, 0.2);
}

.studio-menu-pop[hidden],
.chat[hidden],
.studio-workspace-pane[hidden] {
  display: none !important;
}

.studio-menu-pop button,
.studio-menu-pop a {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 140ms ease, color 140ms ease;
}

.studio-menu-pop button:hover,
.studio-menu-pop a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

/* Chat Area inside Studio Main */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 26px 22px;
  min-width: 0;
  background: transparent;
}

.thread {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  min-height: 325px;
  max-height: 375px;
  overflow-y: auto;
  padding: 10px 6px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: msg-enter 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.msg-row.is-user {
  justify-content: flex-end;
}

@keyframes msg-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-body {
  max-width: min(620px, 92%);
  min-width: 0;
}

.msg-row.is-user .msg-bubble {
  background: linear-gradient(135deg, #6d28d9 0%, #4338ca 52%, #2563eb 100%);
  color: #f8faff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 17px 17px 4px 17px;
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1.52;
  box-shadow:
    0 14px 30px -12px rgba(79, 70, 229, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.msg-row.is-assistant .msg-body {
  width: 100%;
}

.msg-row.is-assistant .msg-bubble {
  background: linear-gradient(180deg, rgba(22, 33, 62, 0.84) 0%, rgba(14, 22, 44, 0.9) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.115);
  box-shadow:
    0 18px 40px -22px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 6px 18px 18px 18px;
  padding: 17px 20px;
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink);
}

html[data-theme="light"] .msg-row.is-assistant .msg-bubble {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-color: rgba(11, 18, 32, 0.085);
  box-shadow:
    0 12px 30px -16px rgba(15, 32, 68, 0.13),
    inset 0 1px 0 #ffffff;
}

.msg-meta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.msg-row.is-user .msg-meta {
  text-align: right;
}

/* AI Typed Status Lines with Passing Reflective Light Sweep (No Cursor, No Blink) */
.studio-phase-bar {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 0;
}

.studio-phase-text {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  background: linear-gradient(
    105deg,
    rgba(196, 206, 228, 0.56) 0%,
    rgba(196, 206, 228, 0.66) 36%,
    rgba(255, 255, 255, 0.98) 47%,
    rgba(216, 180, 254, 0.98) 51%,
    rgba(143, 232, 248, 0.94) 55%,
    rgba(196, 206, 228, 0.66) 66%,
    rgba(196, 206, 228, 0.56) 100%
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 1;
  transition: opacity 180ms ease;
  animation: phase-light-sweep 2.1s linear infinite;
}

html[data-theme="light"] .studio-phase-text {
  background: linear-gradient(
    105deg,
    rgba(71, 85, 105, 0.72) 0%,
    rgba(71, 85, 105, 0.78) 36%,
    rgba(124, 58, 237, 0.98) 48%,
    rgba(31, 111, 181, 0.98) 54%,
    rgba(71, 85, 105, 0.78) 66%,
    rgba(71, 85, 105, 0.72) 100%
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.studio-phase-text.is-fading {
  opacity: 0;
}

@keyframes phase-light-sweep {
  0% { background-position: 180% 0%; }
  100% { background-position: -60% 0%; }
}

.msg-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 7px;
}

.msg-text {
  color: var(--ink-2);
  white-space: pre-line;
  font-size: 13.75px;
  line-height: 1.65;
}

/* Structured Demo Response Cards */
.demo-structured {
  margin-top: 13px;
  display: grid;
  gap: 8px;
  animation: msg-enter 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.demo-note-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: start;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.demo-note-item:hover {
  border-color: rgba(143, 232, 248, 0.24);
  background: rgba(143, 232, 248, 0.045);
}

.demo-note-item strong {
  color: var(--ink);
  font-weight: 600;
}

html[data-theme="light"] .demo-note-item {
  background: #ffffff;
  border-color: rgba(11, 18, 32, 0.085);
  box-shadow: 0 3px 10px -6px rgba(15, 32, 68, 0.1);
}

html[data-theme="light"] .demo-note-item:hover {
  border-color: rgba(31, 111, 181, 0.28);
  background: #f9fbff;
}

.demo-note-num {
  width: 26px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(143, 232, 248, 0.1);
  border: 1px solid rgba(143, 232, 248, 0.22);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

html[data-theme="light"] .demo-note-num {
  background: rgba(31, 111, 181, 0.09);
  border-color: rgba(31, 111, 181, 0.22);
}

.demo-flashcard {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(143, 232, 248, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 65% 55% at 100% 0%, rgba(139, 92, 246, 0.12), transparent 68%),
    rgba(255, 255, 255, 0.036);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  padding: 15px 16px;
}

html[data-theme="light"] .demo-flashcard {
  border-color: rgba(31, 111, 181, 0.24);
  background:
    radial-gradient(ellipse 65% 55% at 100% 0%, rgba(124, 58, 237, 0.06), transparent 68%),
    #ffffff;
  box-shadow: 0 8px 20px -12px rgba(15, 32, 68, 0.12);
}

.demo-flashcard-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.demo-flip-btn,
.demo-reveal-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(143, 232, 248, 0.24);
  background: rgba(143, 232, 248, 0.08);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--accent);
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.demo-flip-btn:hover,
.demo-reveal-btn:hover {
  background: rgba(143, 232, 248, 0.16);
  border-color: rgba(143, 232, 248, 0.42);
}

html[data-theme="light"] .demo-flip-btn,
html[data-theme="light"] .demo-reveal-btn {
  border-color: rgba(31, 111, 181, 0.24);
  background: rgba(31, 111, 181, 0.07);
}

.demo-flashcard-q {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 11px;
}

.demo-flashcard-a {
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.demo-quiz-q {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

html[data-theme="light"] .demo-quiz-q {
  background: #ffffff;
  border-color: rgba(11, 18, 32, 0.085);
}

.demo-quiz-q strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.48;
  color: var(--ink);
}

.demo-quiz-ans {
  font-size: 12.75px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.demo-plan-day {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

html[data-theme="light"] .demo-plan-day {
  background: #ffffff;
  border-color: rgba(11, 18, 32, 0.085);
}

.demo-plan-day b {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .msg-actions {
  border-top-color: rgba(11, 18, 32, 0.075);
}

.msg-actions button {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

html[data-theme="light"] .msg-actions button {
  border-color: rgba(11, 18, 32, 0.1);
  background: #ffffff;
}

.msg-actions button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

/* Composer Card ("Ask Tensor…") */
.studio-composer {
  width: 100%;
  max-width: 780px;
  margin: auto auto 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  padding: 12px 14px 11px;
  background: linear-gradient(180deg, rgba(16, 23, 44, 0.94) 0%, rgba(10, 15, 30, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 38px -14px rgba(0, 0, 0, 0.78);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

html[data-theme="light"] .studio-composer {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  border-color: rgba(11, 18, 32, 0.12);
  box-shadow:
    0 12px 28px -12px rgba(15, 32, 68, 0.12),
    inset 0 1px 0 #ffffff;
}

.studio-composer:focus-within {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.15),
    0 18px 40px -14px rgba(0, 0, 0, 0.78);
}

.studio-composer input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14.5px;
  padding: 4px 5px 7px;
  color: var(--ink);
}

.studio-composer input::placeholder {
  color: var(--muted);
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.composer-plus-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink-2);
  flex-shrink: 0;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

html[data-theme="light"] .composer-plus-btn {
  border-color: rgba(11, 18, 32, 0.1);
  background: rgba(11, 18, 32, 0.035);
}

.composer-plus-btn svg {
  width: 14.5px;
  height: 14.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.composer-plus-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.composer-tag {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(139, 92, 246, 0.12);
  color: #e2d1ff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

html[data-theme="light"] .composer-tag {
  border-color: rgba(124, 58, 237, 0.24);
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
}

.composer-hint {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#send {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #8b5cf6 0%, #3b82f6 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 20px -6px rgba(99, 102, 241, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  flex-shrink: 0;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

#send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 10px 24px -5px rgba(99, 102, 241, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#send:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  box-shadow: none;
}

#send.is-pulsing {
  transform: scale(0.92);
}

/* Workspace Tab View inside Studio */
.studio-workspace-pane {
  flex: 1;
  padding: 24px 26px;
  overflow-y: auto;
}

.ws-pane-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 16px;
}

.ws-pane-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(22, 33, 62, 0.72) 0%, rgba(13, 21, 42, 0.82) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

html[data-theme="light"] .ws-pane-card {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
  border-color: rgba(11, 18, 32, 0.09);
  box-shadow: 0 10px 26px -14px rgba(15, 32, 68, 0.1);
}

.ideas-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}

.context-box {
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(143, 232, 248, 0.18);
  background: rgba(143, 232, 248, 0.05);
}

html[data-theme="light"] .context-box {
  border-color: rgba(31, 111, 181, 0.18);
  background: rgba(31, 111, 181, 0.05);
}

.context-box strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}

.context-box small {
  display: block;
  font-size: 12.25px;
  line-height: 1.5;
  color: var(--muted);
}

.rail-history,
.ideas-prompts,
.ideas-actions {
  display: grid;
  gap: 7px;
}

.rail-history button,
.ideas-prompts button,
.ideas-actions button {
  width: 100%;
  padding: 9.5px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--ink-2);
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

html[data-theme="light"] .rail-history button,
html[data-theme="light"] .ideas-prompts button,
html[data-theme="light"] .ideas-actions button {
  border-color: rgba(11, 18, 32, 0.08);
  background: #ffffff;
}

.rail-history button:hover,
.ideas-prompts button:hover,
.ideas-actions button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.rail-history button.is-active,
.ideas-prompts button.is-active {
  border-color: rgba(139, 92, 246, 0.5);
  color: #e9d5ff;
  background: rgba(139, 92, 246, 0.14);
}

html[data-theme="light"] .rail-history button.is-active,
html[data-theme="light"] .ideas-prompts button.is-active {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.09);
}

/* --- Marketing Sections (Glassmorphism Cards) ---------------------------- */
.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(64px, 7.5vw, 108px) 32px;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: balance;
  color: var(--ink);
}

.section-sub {
  margin-top: 14px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* Section 01: Toolkit */
.toolkit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 17, 36, 0.62);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.36),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: fit-content;
  max-width: 100%;
  margin-bottom: 24px;
}

html[data-theme="light"] .toolkit-tabs {
  border-color: rgba(11, 18, 32, 0.09);
  background: rgba(232, 239, 249, 0.72);
  box-shadow: inset 0 1px 2px rgba(15, 32, 68, 0.06);
}

.toolkit-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9.5px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.toolkit-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .toolkit-tab:hover {
  background: rgba(255, 255, 255, 0.55);
}

.toolkit-tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(28, 43, 82, 0.92) 0%, rgba(16, 28, 56, 0.94) 100%);
  border-color: rgba(143, 232, 248, 0.28);
  color: var(--accent);
  box-shadow:
    0 8px 20px -8px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

html[data-theme="light"] .toolkit-tab[aria-selected="true"] {
  background: #ffffff;
  border-color: rgba(31, 111, 181, 0.24);
  color: var(--accent);
  box-shadow:
    0 6px 16px -6px rgba(15, 32, 68, 0.14),
    inset 0 1px 0 #ffffff;
}

.toolkit-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: clamp(28px, 4.2vw, 56px);
  align-items: center;
  padding: clamp(26px, 3.6vw, 44px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(ellipse 68% 58% at 92% 8%, rgba(31, 111, 181, 0.18), transparent 68%),
    radial-gradient(ellipse 52% 45% at 8% 92%, rgba(124, 58, 237, 0.09), transparent 70%),
    linear-gradient(168deg, rgba(16, 27, 54, 0.78) 0%, rgba(9, 16, 34, 0.88) 100%);
  backdrop-filter: blur(24px) saturate(1.28);
  -webkit-backdrop-filter: blur(24px) saturate(1.28);
  box-shadow:
    0 28px 68px -28px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.toolkit-stage::before {
  content: "";
  position: absolute;
  inset: 0 12% auto 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 232, 248, 0.42), transparent);
  pointer-events: none;
}

html[data-theme="light"] .toolkit-stage {
  border-color: rgba(11, 18, 32, 0.1);
  background:
    radial-gradient(ellipse 65% 55% at 92% 8%, rgba(31, 111, 181, 0.08), transparent 68%),
    linear-gradient(168deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.9) 100%);
  box-shadow:
    0 24px 56px -22px rgba(15, 32, 68, 0.14),
    inset 0 1px 0 #ffffff;
}

html[data-theme="light"] .toolkit-stage::before {
  background: linear-gradient(90deg, transparent, rgba(31, 111, 181, 0.24), transparent);
}

.toolkit-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.toolkit-copy h3 {
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  letter-spacing: -0.032em;
  line-height: 1.16;
  text-wrap: balance;
  margin-bottom: 12px;
}

.toolkit-copy p {
  color: var(--ink-2);
  opacity: 0.86;
  font-size: 15.25px;
  line-height: 1.65;
}

.toolkit-points {
  margin: 22px 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.toolkit-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: var(--ink-2);
}

.toolkit-points li::before {
  content: "✓";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(143, 232, 248, 0.11);
  border: 1px solid rgba(143, 232, 248, 0.25);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

html[data-theme="light"] .toolkit-points li::before {
  background: rgba(31, 111, 181, 0.1);
  border-color: rgba(31, 111, 181, 0.24);
}

.toolkit-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolkit-preview {
  position: relative;
  padding: 18px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(10, 17, 36, 0.9) 0%, rgba(7, 13, 28, 0.95) 100%);
  box-shadow:
    0 20px 44px -20px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 10px;
}

html[data-theme="light"] .toolkit-preview {
  border-color: rgba(11, 18, 32, 0.1);
  background: linear-gradient(180deg, #f8faff 0%, #f1f5fc 100%);
  box-shadow:
    0 16px 36px -18px rgba(15, 32, 68, 0.14),
    inset 0 1px 0 #ffffff;
}

.tk-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tk-card-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tk-card-badge {
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid rgba(143, 232, 248, 0.24);
  background: rgba(143, 232, 248, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

html[data-theme="light"] .tk-card-badge {
  border-color: rgba(31, 111, 181, 0.22);
  background: rgba(31, 111, 181, 0.08);
}

.tk-card-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(22, 33, 62, 0.56) 0%, rgba(15, 24, 48, 0.64) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 13.25px;
  line-height: 1.52;
  color: var(--ink-2);
  transition: border-color 160ms ease, transform 160ms ease;
}

.tk-card-row:hover {
  border-color: rgba(143, 232, 248, 0.22);
  transform: translateY(-1px);
}

html[data-theme="light"] .tk-card-row {
  border-color: rgba(11, 18, 32, 0.08);
  background: #ffffff;
  box-shadow: 0 4px 12px -6px rgba(15, 32, 68, 0.1);
}

.tk-row-idx {
  width: 28px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(143, 232, 248, 0.1);
  border: 1px solid rgba(143, 232, 248, 0.22);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

html[data-theme="light"] .tk-row-idx {
  background: rgba(31, 111, 181, 0.08);
  border-color: rgba(31, 111, 181, 0.22);
}

.tk-row-body strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

/* Section 02: Glassmorphism Bento Grid (Balanced 3-Card Layout) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bento-card {
  --art-x: 50%;
  --art-y: 0%;
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(168deg, rgba(16, 27, 54, 0.78) 0%, rgba(9, 16, 34, 0.88) 100%);
  backdrop-filter: blur(22px) saturate(1.28);
  -webkit-backdrop-filter: blur(22px) saturate(1.28);
  box-shadow:
    0 24px 58px -28px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: border-color 220ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms ease;
}

.bento-card > * {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .bento-card {
  border-color: rgba(11, 18, 32, 0.095);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.9) 100%);
  box-shadow:
    0 18px 46px -22px rgba(15, 32, 68, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0 10% auto 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 232, 248, 0.45), transparent);
  opacity: 0.72;
  pointer-events: none;
  z-index: 2;
  transition: opacity 220ms ease;
}

.bento-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    460px circle at var(--art-x) var(--art-y),
    rgba(143, 232, 248, 0.16) 0%,
    rgba(43, 92, 214, 0.12) 38%,
    transparent 72%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 260ms ease;
}

html[data-theme="light"] .bento-card::after {
  background: radial-gradient(
    460px circle at var(--art-x) var(--art-y),
    rgba(31, 111, 181, 0.11) 0%,
    rgba(8, 126, 154, 0.06) 42%,
    transparent 72%
  );
}

.bento-card:hover,
.bento-card:focus-within {
  border-color: rgba(143, 232, 248, 0.36);
  transform: translateY(-2px);
  box-shadow:
    0 28px 64px -22px rgba(31, 111, 181, 0.38),
    0 0 32px -10px rgba(143, 232, 248, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.bento-card:hover::before,
.bento-card:focus-within::before,
.bento-card:hover::after,
.bento-card:focus-within::after {
  opacity: 1;
}

html[data-theme="light"] .bento-card:hover,
html[data-theme="light"] .bento-card:focus-within {
  border-color: rgba(31, 111, 181, 0.32);
  box-shadow:
    0 24px 54px -20px rgba(31, 111, 181, 0.2),
    0 0 26px -8px rgba(31, 111, 181, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.bento-card--wide {
  grid-column: span 2;
  background:
    radial-gradient(ellipse 58% 48% at 88% 12%, rgba(124, 58, 237, 0.1), transparent 68%),
    linear-gradient(168deg, rgba(16, 27, 54, 0.8) 0%, rgba(9, 16, 34, 0.9) 100%);
}

html[data-theme="light"] .bento-card--wide {
  background:
    radial-gradient(ellipse 58% 48% at 88% 12%, rgba(124, 58, 237, 0.05), transparent 68%),
    linear-gradient(168deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.92) 100%);
}

.bento-card--accent {
  background:
    radial-gradient(ellipse 68% 58% at 15% 0%, rgba(31, 111, 181, 0.2), transparent 68%),
    linear-gradient(155deg, rgba(22, 40, 78, 0.78) 0%, rgba(10, 17, 36, 0.88) 100%);
  border-color: rgba(143, 232, 248, 0.22);
}

html[data-theme="light"] .bento-card--accent {
  background:
    radial-gradient(ellipse 68% 58% at 15% 0%, rgba(31, 111, 181, 0.08), transparent 68%),
    linear-gradient(155deg, rgba(245, 249, 255, 0.96) 0%, rgba(255, 255, 255, 0.94) 100%);
  border-color: rgba(31, 111, 181, 0.2);
}

.bento-meta {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.bento-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

.bento-card p {
  font-size: 14.5px;
  color: var(--ink-2);
  opacity: 0.82;
  line-height: 1.62;
  max-width: 56ch;
}

.bento-collections {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.glass-module {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(13, 22, 46, 0.84) 0%, rgba(8, 15, 32, 0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: border-color 180ms ease, transform 180ms ease;
}

.glass-module::before {
  content: "";
  position: absolute;
  inset: 0 20% auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(143, 232, 248, 0.55), transparent);
}

.glass-module:hover {
  border-color: rgba(143, 232, 248, 0.3);
  transform: translateY(-2px);
}

html[data-theme="light"] .glass-module {
  border-color: rgba(11, 18, 32, 0.09);
  background: #ffffff;
  box-shadow: 0 8px 20px -12px rgba(15, 32, 68, 0.12);
}

html[data-theme="light"] .glass-module::before {
  background: linear-gradient(90deg, rgba(31, 111, 181, 0.45), transparent);
}

.glass-module-tag {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.glass-module strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.glass-module small {
  display: block;
  margin-top: 5px;
  font-size: 11.75px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bento-chat-snippet {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  gap: 9px;
}

.snippet-q {
  margin-left: auto;
  max-width: 90%;
  padding: 9px 13px;
  border-radius: 13px 13px 4px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
  color: #f4f6ff;
  font-size: 12.75px;
  line-height: 1.45;
  box-shadow:
    0 10px 22px -10px rgba(79, 70, 229, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.snippet-a {
  padding: 11px 13px;
  border-radius: 5px 13px 13px 13px;
  background: rgba(8, 15, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 12.75px;
  line-height: 1.52;
  color: var(--ink-2);
}

html[data-theme="light"] .snippet-a {
  background: #ffffff;
  border-color: rgba(11, 18, 32, 0.09);
  box-shadow: 0 6px 16px -10px rgba(15, 32, 68, 0.1);
}

/* Bento Document Intelligence Rows */
.bento-doc-list,
.bento-timeline,
.bento-surface-preview {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.bento-doc-row,
.timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(8, 15, 32, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  color: var(--ink-2);
  transition: border-color 160ms ease, transform 160ms ease;
}

.bento-doc-row:hover {
  border-color: rgba(143, 232, 248, 0.24);
  transform: translateX(2px);
}

html[data-theme="light"] .bento-doc-row,
html[data-theme="light"] .timeline-row {
  background: #ffffff;
  border-color: rgba(11, 18, 32, 0.085);
  box-shadow: 0 4px 12px -6px rgba(15, 32, 68, 0.08);
}

.bento-doc-row span:nth-child(2),
.timeline-row span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.bento-doc-row small {
  margin-left: auto;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.doc-pill,
.tl-badge {
  padding: 2.5px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.doc-pill--pdf {
  border-color: rgba(244, 114, 182, 0.34);
  background: rgba(244, 114, 182, 0.12);
  color: #f9a8d4;
}

.doc-pill--md {
  border-color: rgba(143, 232, 248, 0.34);
  background: rgba(143, 232, 248, 0.12);
  color: #8fe8f8;
}

.doc-pill--docx {
  border-color: rgba(167, 139, 250, 0.36);
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
}

html[data-theme="light"] .doc-pill--pdf {
  border-color: rgba(219, 39, 119, 0.24);
  background: rgba(219, 39, 119, 0.08);
  color: #be185d;
}

html[data-theme="light"] .doc-pill--md {
  border-color: rgba(8, 126, 154, 0.25);
  background: rgba(8, 126, 154, 0.08);
  color: #0e7490;
}

html[data-theme="light"] .doc-pill--docx {
  border-color: rgba(109, 40, 217, 0.24);
  background: rgba(109, 40, 217, 0.08);
  color: #6d28d9;
}

.timeline-row.is-now {
  border-color: var(--line-strong);
  background: rgba(31, 111, 181, 0.14);
}

html[data-theme="light"] .timeline-row.is-now {
  background: rgba(31, 111, 181, 0.09);
}

.bento-surface-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.surface-swatch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
}

.surface-swatch--dark {
  background: #060c1c;
  color: #f4f6ff;
  border-color: rgba(143, 232, 248, 0.22);
}

.surface-swatch--light {
  background: #f3f6fb;
  color: #0b1220;
  border-color: rgba(11, 18, 32, 0.14);
}

.swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.surface-swatch--dark .swatch-dot {
  background: #8fe8f8;
  box-shadow: 0 0 10px rgba(143, 232, 248, 0.65);
}

.surface-swatch--light .swatch-dot {
  background: #1f6fb5;
}

.surface-swatch strong {
  display: block;
  font-size: 11.5px;
  line-height: 1.2;
}

.surface-swatch small {
  display: block;
  font-size: 10px;
  opacity: 0.72;
  margin-top: 2px;
}

/* Section 03: Workflow + Glassmorphism Verification Card */
.workflow-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.workflow-steps {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 16px;
}

.workflow-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 15px;
  align-items: start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  transition: border-color 180ms ease;
}

.workflow-steps li:hover {
  border-top-color: rgba(143, 232, 248, 0.28);
}

.step-num {
  width: 34px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 232, 248, 0.22);
  background: rgba(143, 232, 248, 0.08);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

html[data-theme="light"] .step-num {
  border-color: rgba(31, 111, 181, 0.22);
  background: rgba(31, 111, 181, 0.08);
}

.workflow-steps h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.workflow-steps p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

.glass-verify-card {
  --art-x: 50%;
  --art-y: 0%;
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 22px;
  border: 1px solid rgba(143, 232, 248, 0.24);
  background:
    radial-gradient(ellipse 70% 55% at 88% 0%, rgba(124, 58, 237, 0.14), transparent 70%),
    linear-gradient(164deg, rgba(20, 34, 68, 0.84) 0%, rgba(10, 17, 36, 0.92) 100%);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow:
    0 32px 76px -26px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: border-color 220ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms ease;
}

html[data-theme="light"] .glass-verify-card {
  border-color: rgba(31, 111, 181, 0.22);
  background:
    radial-gradient(ellipse 70% 55% at 88% 0%, rgba(124, 58, 237, 0.06), transparent 70%),
    linear-gradient(164deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 247, 255, 0.92) 100%);
  box-shadow:
    0 24px 60px -22px rgba(15, 32, 68, 0.16),
    inset 0 1px 0 #ffffff;
}

.glass-verify-card > * {
  position: relative;
  z-index: 1;
}

.glass-verify-card::before {
  content: "";
  position: absolute;
  inset: 0 10% auto 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 232, 248, 0.48), transparent);
  opacity: 0.78;
  pointer-events: none;
  z-index: 2;
  transition: opacity 220ms ease;
}

.glass-verify-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    460px circle at var(--art-x) var(--art-y),
    rgba(143, 232, 248, 0.18) 0%,
    rgba(43, 92, 214, 0.13) 40%,
    transparent 74%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 260ms ease;
}

html[data-theme="light"] .glass-verify-card::after {
  background: radial-gradient(
    460px circle at var(--art-x) var(--art-y),
    rgba(31, 111, 181, 0.12) 0%,
    rgba(8, 126, 154, 0.07) 42%,
    transparent 74%
  );
}

.glass-verify-card:hover,
.glass-verify-card:focus-within {
  border-color: rgba(143, 232, 248, 0.42);
  transform: translateY(-2px);
  box-shadow:
    0 34px 78px -24px rgba(31, 111, 181, 0.42),
    0 0 34px -10px rgba(143, 232, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.glass-verify-card:hover::before,
.glass-verify-card:focus-within::before,
.glass-verify-card:hover::after,
.glass-verify-card:focus-within::after {
  opacity: 1;
}

html[data-theme="light"] .glass-verify-card:hover,
html[data-theme="light"] .glass-verify-card:focus-within {
  border-color: rgba(31, 111, 181, 0.36);
  box-shadow:
    0 26px 60px -22px rgba(31, 111, 181, 0.22),
    0 0 28px -8px rgba(31, 111, 181, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.glass-verify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.glass-verify-badge {
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(143, 232, 248, 0.09);
  border: 1px solid rgba(143, 232, 248, 0.24);
  color: var(--accent);
}

html[data-theme="light"] .glass-verify-badge {
  background: rgba(31, 111, 181, 0.08);
  border-color: rgba(31, 111, 181, 0.24);
}

.glass-verify-card h3 {
  margin: 20px 0 10px;
  font-size: clamp(21px, 2.2vw, 25px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.glass-verify-sub {
  font-size: 14.25px;
  color: var(--ink-2);
  opacity: 0.82;
  margin-bottom: 18px;
  line-height: 1.55;
}

.glass-verify-reveal summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid rgba(143, 232, 248, 0.24);
  background: rgba(143, 232, 248, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.glass-verify-reveal summary:hover {
  background: rgba(143, 232, 248, 0.14);
  border-color: rgba(143, 232, 248, 0.4);
}

.glass-verify-reveal summary::after {
  content: "▾";
  font-size: 11px;
  transition: transform 180ms ease;
}

.glass-verify-reveal[open] summary::after {
  transform: rotate(180deg);
}

html[data-theme="light"] .glass-verify-reveal summary {
  border-color: rgba(31, 111, 181, 0.24);
  background: rgba(31, 111, 181, 0.08);
}

.glass-verify-reveal summary::-webkit-details-marker {
  display: none;
}

.glass-verify-answer {
  margin-top: 14px;
  padding: 15px 17px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(7, 13, 28, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .glass-verify-answer {
  border-color: rgba(11, 18, 32, 0.085);
  background: #ffffff;
  box-shadow: 0 6px 18px -10px rgba(15, 32, 68, 0.1);
}

.glass-verify-answer p {
  font-size: 14.25px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* Section 04: About & FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.faq-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}

.faq-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.faq-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-list {
  display: grid;
  gap: 11px;
}

.faq-list details {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(16, 26, 52, 0.7) 0%, rgba(10, 17, 36, 0.78) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 17px 21px;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.faq-list details:hover {
  border-color: rgba(143, 232, 248, 0.25);
}

.faq-list details[open] {
  border-color: rgba(143, 232, 248, 0.32);
  background: linear-gradient(170deg, rgba(20, 33, 66, 0.82) 0%, rgba(11, 19, 40, 0.88) 100%);
  box-shadow:
    0 18px 42px -24px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .faq-list details {
  border-color: rgba(11, 18, 32, 0.09);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px -14px rgba(15, 32, 68, 0.1);
}

html[data-theme="light"] .faq-list details[open] {
  border-color: rgba(31, 111, 181, 0.28);
  background: #ffffff;
  box-shadow: 0 16px 36px -18px rgba(15, 32, 68, 0.15);
}

.faq-list summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 17px;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: background-color 160ms ease, border-color 160ms ease;
}

html[data-theme="light"] .faq-list summary::after {
  border-color: rgba(11, 18, 32, 0.09);
  background: rgba(31, 111, 181, 0.06);
}

.faq-list details[open] summary::after {
  content: "−";
  border-color: rgba(143, 232, 248, 0.28);
  background: rgba(143, 232, 248, 0.1);
}

html[data-theme="light"] .faq-list details[open] summary::after {
  border-color: rgba(31, 111, 181, 0.26);
  background: rgba(31, 111, 181, 0.1);
}

.faq-list details p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
  opacity: 0.84;
  max-width: 65ch;
}

/* Section 05: Progressive Spreading Cursor & Touch Color Glow Final CTA */
.final-cta {
  --cta-x: 50%;
  --cta-y: 50%;
  --cta-active: 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: clamp(84px, 10vw, 132px) 32px;
  text-align: center;
  touch-action: pan-y;
}

.cta-spread-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  filter: blur(42px) saturate(1.22);
  opacity: 0.96;
}

.cta-spotlight {
  position: absolute;
  left: var(--cta-x);
  top: var(--cta-y);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(0.82 + var(--cta-active) * 0.18));
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle,
    rgba(143, 232, 248, 0.18) 0%,
    rgba(31, 111, 181, 0.12) 44%,
    transparent 72%
  );
  filter: blur(28px);
  opacity: calc(var(--cta-active) * 0.45);
  will-change: left, top, opacity, transform;
  transition: opacity 280ms ease;
}

html[data-theme="light"] .cta-spotlight {
  background: radial-gradient(
    circle,
    rgba(31, 111, 181, 0.14) 0%,
    rgba(8, 126, 154, 0.08) 46%,
    transparent 72%
  );
}

.final-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 0 auto;
}

.final-cta h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.final-cta p:not(.section-kicker) {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--muted);
}

/* --- Unified Tall Footer with Bottom-Anchored Wordmark & Rising Atmospheric Glow --- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--side) 0%, var(--bg) 100%);
  overflow: hidden;
}

.footer-unified {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-glow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  min-width: 100%;
  bottom: -24px;
  height: 410px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 64% 58% at 50% 100%,
      rgba(143, 232, 248, 0.44) 0%,
      rgba(124, 58, 237, 0.42) 32%,
      rgba(43, 92, 214, 0.28) 58%,
      transparent 84%
    ),
    radial-gradient(
      ellipse 88% 46% at 50% 100%,
      rgba(168, 85, 247, 0.28) 0%,
      transparent 74%
    );
  filter: blur(36px);
  opacity: 1;
}

html[data-theme="light"] .footer-glow {
  background:
    radial-gradient(
      ellipse 64% 58% at 50% 100%,
      rgba(59, 130, 246, 0.34) 0%,
      rgba(124, 58, 237, 0.2) 38%,
      rgba(8, 126, 154, 0.14) 66%,
      transparent 85%
    ),
    radial-gradient(
      ellipse 88% 46% at 50% 100%,
      rgba(99, 102, 241, 0.18) 0%,
      transparent 74%
    );
  filter: blur(34px);
  opacity: 1;
}

.footer-top,
.footer-wordmark,
.footer-legal {
  position: relative;
  z-index: 2;
}

.footer-top {
  order: 1;
  display: grid;
  grid-template-columns: 1.55fr repeat(3, 1fr);
  gap: 36px;
}

.footer-brand p {
  margin-top: 12px;
  max-width: 36ch;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.social-glass-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-highlight);
  color: var(--ink-2);
  transition: transform 170ms ease, border-color 170ms ease, color 170ms ease, background-color 170ms ease;
}

.social-glass-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-soft);
}

.social-glass-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.social-glass-btn svg.is-brand-fill {
  fill: currentColor;
  stroke: none;
}

.footer-col h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  color: var(--muted);
  transition: color 150ms ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-wordmark {
  order: 2;
  user-select: none;
  text-align: center;
  font-size: clamp(5rem, 17.5vw, 13.8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.82;
  margin: 14px 0 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(235, 241, 255, 0.72) 66%, rgba(196, 181, 253, 0.34) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .footer-wordmark {
  background: linear-gradient(180deg, #1f6fb5 0%, #144d84 72%, rgba(20, 77, 132, 0.45) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-legal {
  order: 3;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms cubic-bezier(0.16, 1, 0.3, 1), transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-waiting {
  opacity: 0;
  transform: translateY(14px);
}

/* --- Responsive Breakpoints ---------------------------------------------- */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento-card--wide {
    grid-column: span 2;
  }
  .toolkit-stage,
  .workflow-grid,
  .faq-layout {
    grid-template-columns: 1fr;
  }
  .ws-pane-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .navwrap {
    padding: 8px 18px 0;
    height: 68px;
  }
  #navigation {
    display: none;
  }
  #menu {
    display: grid;
  }
  #siteHeader.is-scrolled #menu,
  #siteHeader.is-scrolled .n-theme-btn {
    background: rgba(10, 18, 38, 0.86);
    border-color: var(--line-strong);
  }
  html[data-theme="light"] #siteHeader.is-scrolled #menu,
  html[data-theme="light"] #siteHeader.is-scrolled .n-theme-btn {
    background: rgba(255, 255, 255, 0.9);
  }
  #navigation.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 14px;
    right: 14px;
    padding: 12px;
    border-radius: 16px;
    background: var(--glass-strong);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-frame);
    gap: 4px;
  }
  #navigation.open a {
    padding: 12px 14px;
    min-height: 44px;
  }
  .signin {
    display: none;
  }
  .hero {
    padding: 32px 18px 16px;
  }
  .studio-wrap {
    padding: 120px 12px 56px;
  }
  .horizon-bloom {
    top: 0;
    height: 340px;
  }
  .studio-shell {
    padding: 8px;
    border-radius: 22px;
  }
  .studio {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 15px;
  }
  .rail-slim {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
  }
  html[data-theme="light"] .rail-slim {
    border-bottom-color: rgba(11, 18, 32, 0.08);
  }
  .rail-mode-icons {
    flex-direction: row;
    margin-top: 0;
  }
  .rail-slim-bottom {
    display: none;
  }
  .studio-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
  }
  .studio-head-left {
    display: none;
  }
  .studio-mode-switch {
    justify-self: start;
  }
  .mode-pill {
    padding: 5px 11px;
    font-size: 12px;
    gap: 5px;
  }
  .demo-toggle {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  .chat {
    padding: 14px;
  }
  .thread {
    min-height: 260px;
    max-height: 315px;
  }
  .composer-hint,
  .studio-head .sample {
    display: none;
  }
  .section {
    padding: 52px 18px;
  }
  .toolkit-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .toolkit-tabs::-webkit-scrollbar {
    display: none;
  }
  .bento-card,
  .glass-verify-card {
    padding: 22px;
  }
  .bento-grid,
  .bento-collections,
  .footer-top {
    grid-template-columns: 1fr;
  }
  .bento-card--wide {
    grid-column: span 1;
  }
  .footer-unified {
    padding: 46px 18px 0;
    gap: 20px;
  }
  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .reveal.is-waiting {
    opacity: 1;
    transform: none;
  }
}

/* Tensor canonical finish: quiet chrome and one cyan moment */
.ambient-backdrop,
.hero-floaters,
.light-rays,
.horizon-bloom {
  display: none !important;
}

.hero {
  max-width: 1240px;
  padding-top: clamp(40px, 5.5vw, 72px);
  padding-bottom: 20px;
}

.hero h1 {
  max-width: 780px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero-lead {
  max-width: 620px;
  margin-top: 16px;
  color: var(--ink-2);
}

.ctas {
  margin-top: 24px;
}

.ctas .button,
.ctas .outline {
  border-radius: 10px;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.studio-wrap {
  padding-top: 20px;
  padding-bottom: 80px;
}

.studio-shell {
  border-radius: 16px;
  background: var(--panel-solid);
  backdrop-filter: none;
  box-shadow: 0 24px 64px -32px rgba(0, 0, 0, 0.72);
}

.studio-shell::before {
  display: none;
}

.studio {
  border-radius: 10px;
}

.rail-slim,
html[data-theme="light"] .rail-slim {
  background: var(--bg-elev);
}

.rail-plus-btn {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: none;
}

.rail-plus-btn:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.06);
}

.rail-mode-icons button[aria-selected="true"] {
  background: var(--surface-soft);
  color: var(--accent);
  border-color: var(--line-strong);
  box-shadow: none;
}

html[data-theme="light"] .rail-mode-icons button[aria-selected="true"] {
  background: var(--surface-soft);
  color: var(--accent);
  border-color: var(--line-strong);
  box-shadow: none;
}
