/* LoomSegment — AI Video Knowledge Segmentation · Cinematic film-editing aesthetic */

:root {
  --primary: #FF6B35;
  --primary-hover: #FF8555;
  --primary-soft: rgba(255, 107, 53, 0.12);
  --secondary: #7C3AED;
  --secondary-soft: rgba(124, 58, 237, 0.12);
  --highlight: #00C2FF;
  --highlight-soft: rgba(0, 194, 255, 0.1);
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.12);
  --ink: #FAFAFA;
  --muted: rgba(250, 250, 250, 0.62);
  --muted-light: rgba(250, 250, 250, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --bg: #0F0F12;
  --bg-alt: #121216;
  --card: #18181B;
  --card-hover: #1E1E22;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 28px);
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.55);
  --display: "Space Grotesk", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --announce-h: 38px;
  --header-h: 64px;
  --site-top-h: calc(var(--announce-h) + var(--header-h));
  --card-pad: clamp(16px, 2.5vw, 22px);
  --card-gap: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.auth-page { min-height: 100vh; background: var(--bg); }
body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--highlight); text-decoration: none; }
a:hover { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p { margin: 0; }

[hidden] { display: none !important; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--site-top-h);
}

.site-shell main { flex: 1; }

h1, h2, h3, h4, .page-title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.lead {
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--muted);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.text-link { font-weight: 600; font-size: 0.9rem; color: var(--highlight); }
.text-link:hover { color: var(--primary); }

/* ── Announce + header ── */
.announce-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  min-height: var(--announce-h);
  padding: 7px var(--gutter);
  background: linear-gradient(90deg, #121216 0%, #1a1228 50%, #121216 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.25);
  color: rgba(250, 250, 250, 0.88);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

.announce-bar a {
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.announce-bar a:hover { color: var(--primary-hover); }

.site-header {
  position: fixed;
  top: var(--announce-h);
  left: 0; right: 0;
  z-index: 100;
  background: rgba(15, 15, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  min-width: 0;
}

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

.logo-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.logo-mark svg { width: 28px; height: 28px; display: block; }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-text span {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted-light);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

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

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: rgba(255, 107, 53, 0.5);
}

.btn-primary:hover { background: var(--primary-hover); color: #fff; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 13px 24px; font-size: 0.95rem; }
.btn-full { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible, .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ══════════════════════════════════════
   HOME — Film editing workstation
   ══════════════════════════════════════ */
.film-home { background: var(--bg); }

.film-home-toolbar {
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: clamp(28px, 5vw, 44px) 0;
  text-align: center;
}

.film-home-toolbar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.film-home-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  max-width: 22ch;
  line-height: 1.2;
  margin-inline: auto;
}

.film-home-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted-light);
  margin-top: 6px;
}

.film-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Workstation shell */
.workstation {
  padding: 0;
  background: #0a0a0d;
  border-bottom: 1px solid var(--line);
}

.workstation-shell {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  min-height: 420px;
  max-height: 520px;
}

.workstation-sidebar {
  border-right: 1px solid var(--line);
  background: var(--card);
  padding: 14px 0;
  overflow-y: auto;
}

.ws-sidebar-head {
  padding: 0 14px 10px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.ws-source-list { display: flex; flex-direction: column; gap: 2px; }

.ws-source-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  border-left: 2px solid transparent;
}

.ws-source-item.is-active {
  background: rgba(255, 107, 53, 0.08);
  color: var(--ink);
  border-left-color: var(--primary);
}

.ws-source-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.ws-viewport {
  display: flex;
  flex-direction: column;
  background: #08080a;
  min-width: 0;
}

.ws-video-frame {
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
  min-height: 280px;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(124, 58, 237, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(255, 107, 53, 0.06) 0%, transparent 50%),
    #08080a;
}

.ws-video-placeholder {
  text-align: center;
  padding: 24px;
}

.ws-video-placeholder strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.ws-video-placeholder span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-light);
}

.ws-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.15);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  margin: 16px auto 0;
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.1s;
}

.ws-play-btn:hover { background: rgba(255, 107, 53, 0.25); transform: scale(1.05); }

.ws-timecode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted-light);
  background: var(--card);
}

.ws-inspector {
  border-left: 1px solid var(--line);
  background: var(--card);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-inspector-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.ws-inspector-title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.ws-inspector-summary {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.ws-inspector-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.ws-inspector-meta {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.ws-inspector-meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ws-inspector-meta span:first-child { color: var(--muted-light); }
.ws-inspector-meta span:last-child { color: var(--ink); font-family: var(--mono); font-size: 0.7rem; }

/* Timeline */
.ws-timeline-wrap {
  padding: 16px var(--gutter) 20px;
  background: #0a0a0d;
}

.ws-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-light);
  letter-spacing: 0.04em;
}

.ws-timeline-ruler {
  display: flex;
  justify-content: space-between;
  padding: 0 2px 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted-light);
}

.ws-timeline-track {
  position: relative;
  height: 52px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
}

.ws-segment-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: filter 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.ws-segment-block:hover { filter: brightness(1.15); }
.ws-segment-block.is-active { box-shadow: 0 0 0 2px var(--highlight); z-index: 2; }

.ws-segment-block.seg-overview { background: linear-gradient(135deg, #FF6B35, #e85a28); left: 0%; width: 15.5%; }
.ws-segment-block.seg-setup { background: linear-gradient(135deg, #7C3AED, #6d28d9); left: 15.5%; width: 6.8%; }
.ws-segment-block.seg-practices { background: linear-gradient(135deg, #22C55E, #16a34a); left: 22.3%; width: 18.2%; }
.ws-segment-block.seg-mistakes { background: linear-gradient(135deg, #00C2FF, #0099cc); left: 40.5%; width: 7.3%; }
.ws-segment-block.seg-faq { background: linear-gradient(135deg, #FF6B35, #7C3AED); left: 47.8%; width: 12.4%; }

.ws-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--highlight);
  box-shadow: 0 0 8px var(--highlight);
  z-index: 5;
  pointer-events: none;
  left: 53%;
  transition: left 0.08s ease;
}

.ws-playhead::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -5px;
  width: 12px;
  height: 12px;
  background: var(--highlight);
  border-radius: 2px;
  transform: rotate(45deg);
}

.ws-timeline-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* Home sections below workstation */
.film-section {
  padding: clamp(48px, 8vw, 80px) 0;
}

.film-section.is-alt { background: var(--bg-alt); }

.section-head {
  margin-bottom: clamp(24px, 4vw, 36px);
}

.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 10px;
}

.section-head p { max-width: 58ch; font-size: 0.95rem; }

.section-inline-title {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: 8px;
}

.section-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 58ch;
}

/* Knowledge cards on home */
.home-segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--card-gap);
}

.home-segment-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.home-segment-card:hover {
  border-color: rgba(255, 107, 53, 0.3);
  background: var(--card-hover);
}

.home-segment-card .timecode {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--primary);
}

.home-segment-card strong {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.35;
}

.home-segment-card p {
  font-size: 0.82rem;
  line-height: 1.55;
  flex: 1;
}

.card-scenario {
  font-size: 0.72rem;
  color: var(--muted-light);
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.card-scenario span {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.segment-length-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.length-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.length-30 { color: var(--primary); border-color: rgba(255, 107, 53, 0.35); background: var(--primary-soft); }
.length-60 { color: var(--secondary); border-color: rgba(124, 58, 237, 0.35); background: var(--secondary-soft); }
.length-90 { color: var(--highlight); border-color: rgba(0, 194, 255, 0.35); background: var(--highlight-soft); }
.length-auto { color: var(--muted); }

.video-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.video-type-grid span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
}

.home-segment-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted-light);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Knowledge search demo */
.knowledge-search-demo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.ksd-search-bar {
  display: flex;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.ksd-search-bar input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--ink);
  font-size: 0.9rem;
}

.ksd-search-bar input:focus {
  outline: none;
  border-color: var(--highlight);
}

.ksd-result {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
}

.ksd-result-thumb {
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.15), rgba(124, 58, 237, 0.15));
  display: grid;
  place-items: center;
  min-height: 160px;
  font-size: 2rem;
  color: var(--highlight);
}

.ksd-result-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ksd-result-body strong {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}

.ksd-confidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--success);
  background: var(--success-soft);
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

/* Problem strip */
.problem-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--card-gap);
}

.problem-item {
  padding: var(--card-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.problem-item span {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.problem-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  margin: 8px 0 6px;
}

.problem-item p { font-size: 0.82rem; line-height: 1.55; }

/* Source logos strip */
.source-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 20px 0 0;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.source-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--highlight);
}

/* ── Tag chips + stat badges ── */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.tag-chip.is-active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.tag-primary { color: var(--primary); border-color: rgba(255, 107, 53, 0.35); background: var(--primary-soft); }
.tag-secondary { color: var(--secondary); border-color: rgba(124, 58, 237, 0.35); background: var(--secondary-soft); }
.tag-highlight { color: var(--highlight); border-color: rgba(0, 194, 255, 0.35); background: var(--highlight-soft); }
.tag-positive { color: var(--success); border-color: rgba(34, 197, 94, 0.35); background: var(--success-soft); }
.tag-live { color: var(--primary); border-color: var(--primary); animation: pulse-tag 2s infinite; }
.tag-neutral { color: var(--muted); }

@keyframes pulse-tag {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.stat-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 90px;
}

.stat-badge strong {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
  font-weight: 600;
}

.stat-badge span {
  font-size: 0.68rem;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-primary strong { color: var(--primary); }
.stat-secondary strong { color: var(--secondary); }
.stat-highlight strong { color: var(--highlight); }

/* ── Film panels ── */
.film-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.film-panel-accent { border-color: rgba(255, 107, 53, 0.2); }

.film-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.film-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.film-panel-body { padding: 16px; }

.feature-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 3vw, 24px);
  overflow: hidden;
}

/* ── Page hero + subpages ── */
.page-hero {
  padding: clamp(36px, 6vw, 56px) 0 clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.04) 0%, transparent 100%);
}

.page-showcase { padding: clamp(32px, 5vw, 48px) 0; }
.page-showcase.is-alt { background: var(--bg-alt); }
.page-body { padding: clamp(32px, 5vw, 48px) 0; }

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted-light);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--highlight); }

.section.is-alt { background: var(--bg-alt); }
.section.tight { padding: clamp(32px, 5vw, 48px) 0; }

.sub-cta {
  text-align: center;
  padding: clamp(32px, 5vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.sub-cta h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: 10px;
}

.sub-cta p {
  max-width: 52ch;
  margin: 0 auto 4px;
  font-size: 0.92rem;
}

.sub-cta .btn-row { justify-content: center; }

/* UI alerts */
.ui-alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  border: 1px solid var(--line);
}

.ui-alert strong { color: var(--ink); display: block; margin-bottom: 2px; }
.ui-alert-ok { background: var(--success-soft); border-color: rgba(34, 197, 94, 0.3); }
.ui-alert-info { background: var(--highlight-soft); border-color: rgba(0, 194, 255, 0.3); }

.is-running { animation: pulse-run 0.6s ease; }
@keyframes pulse-run {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Studio workflow ── */
.studio-workflow-timeline { display: flex; flex-direction: column; gap: 16px; }

.workflow-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.workflow-head strong { color: var(--ink); }
.workflow-head span { color: var(--muted-light); font-family: var(--mono); font-size: 0.72rem; }

.workflow-track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}

.workflow-step {
  flex: 1;
  min-width: 140px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workflow-step.step-active { border-color: var(--primary); background: var(--primary-soft); }
.workflow-step.step-done { border-color: rgba(34, 197, 94, 0.3); }

.workflow-step-marker span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.workflow-step.step-active .workflow-step-marker span { background: var(--primary); color: #fff; }
.workflow-step.step-done .workflow-step-marker span { background: var(--success); color: #fff; }

.workflow-step strong { font-size: 0.85rem; color: var(--ink); }
.workflow-primary { font-size: 0.78rem; color: var(--muted); }
.workflow-secondary { font-size: 0.72rem; color: var(--muted-light); }

.workflow-connector {
  display: grid;
  place-items: center;
  padding: 0 4px;
  color: var(--muted-light);
  font-size: 0.9rem;
}

.workflow-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Segments grid ── */
.segments-grid-wrap { display: flex; flex-direction: column; gap: 16px; }

.segments-grid-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.segments-grid-head strong { color: var(--ink); }
.segments-grid-head span { color: var(--muted-light); font-family: var(--mono); font-size: 0.72rem; }

.segments-filter-bar { display: flex; flex-direction: column; gap: 10px; }

.segments-filter-search {
  display: flex;
  gap: 8px;
}

.segments-filter-search input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--ink);
  font-size: 0.85rem;
}

.segments-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.segments-filter-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.filter-select label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-light);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-select select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.82rem;
}

.segment-scenario {
  font-size: 0.72rem;
  color: var(--muted-light);
  display: flex;
  gap: 6px;
}

.segment-scenario span {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--primary);
  text-transform: uppercase;
  flex-shrink: 0;
}

.segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--card-gap);
}

.segment-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}

.segment-card:hover { border-color: rgba(255, 107, 53, 0.25); }

.segment-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.segment-timecode, .segment-duration {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--primary);
}

.segment-duration { color: var(--muted-light); }

.segment-title { font-size: 0.9rem; color: var(--ink); line-height: 1.35; }
.segment-summary { font-size: 0.8rem; line-height: 1.55; flex: 1; }
.segment-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.segment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}

.segment-source { color: var(--muted-light); }

.segments-grid-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Knowledge library ── */
.knowledge-library-grid { display: flex; flex-direction: column; gap: 16px; }

.library-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}

.library-head strong { color: var(--ink); }

.library-search-demo {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}

.library-search-demo input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.85rem;
}

.library-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.library-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.library-card:hover { border-color: rgba(0, 194, 255, 0.3); transform: translateY(-2px); }

.library-card-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(124, 58, 237, 0.12));
  display: grid;
  place-items: center;
  position: relative;
}

.library-timecode {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
}

.library-play {
  font-size: 1.5rem;
  color: var(--highlight);
  opacity: 0.8;
}

.library-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.library-card-body strong { font-size: 0.85rem; color: var(--ink); line-height: 1.35; }
.library-meta { font-size: 0.72rem; color: var(--muted-light); }
.library-stats { font-size: 0.72rem; color: var(--muted); }
.library-actions { display: flex; gap: 6px; margin-top: 4px; }

.library-answer strong { display: block; color: var(--ink); margin-bottom: 6px; }
.library-answer-meta { font-size: 0.72rem; color: var(--muted-light); font-family: var(--mono); margin: 8px 0; }

.library-footer { display: flex; flex-wrap: wrap; gap: 10px; }

.library-collections { display: flex; flex-direction: column; gap: 24px; }

.library-collection-row { display: flex; flex-direction: column; gap: 12px; }

.library-collection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.library-collection-head strong { font-size: 0.92rem; color: var(--ink); }
.library-collection-head span { font-size: 0.72rem; color: var(--muted-light); font-family: var(--mono); }

.library-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--card-gap);
  overflow-x: auto;
  padding-bottom: 4px;
}

/* ── Integrations sync banner ── */
.integration-sync-banner {
  padding: var(--card-pad);
  margin-bottom: var(--card-gap);
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.08), rgba(124, 58, 237, 0.06));
  border: 1px solid rgba(0, 194, 255, 0.2);
  border-radius: var(--radius-lg);
}

.integration-sync-banner strong {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.integration-sync-banner p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.int-sync-badge {
  display: inline-flex;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--highlight);
  background: var(--highlight-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 194, 255, 0.3);
}

/* ── Pricing billing basis ── */
.pricing-billing-basis { margin-bottom: var(--card-gap); }

.billing-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.billing-metric-card {
  padding: var(--card-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.billing-metric-icon { font-size: 1.2rem; display: block; margin-bottom: 8px; }

.billing-metric-card h3 {
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.billing-metric-card p {
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

.billing-examples {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.billing-examples span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-light);
}

.page-body.is-alt { background: var(--bg-alt); }

/* ── AI Chapters ── */
.ai-chapters-toc { display: flex; flex-direction: column; gap: 14px; }

.chapters-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}

.chapters-head strong { color: var(--ink); }
.chapters-head span { color: var(--muted-light); font-family: var(--mono); font-size: 0.72rem; }

.chapters-list { display: flex; flex-direction: column; gap: 4px; }

.chapter-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.chapter-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.chapter-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--secondary);
  min-width: 24px;
}

.chapter-info { flex: 1; min-width: 0; }
.chapter-info strong { display: block; font-size: 0.88rem; color: var(--ink); }
.chapter-info span { font-size: 0.72rem; color: var(--muted-light); font-family: var(--mono); }

.chapter-controls { display: flex; gap: 4px; flex-shrink: 0; }

.chapter-row-body {
  padding: 0 14px 12px 50px;
  border-top: 1px solid var(--line);
}

.chapter-segment-list { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }

.chapter-segment {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
}

.chapter-segment span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--primary);
  min-width: 40px;
}

.chapter-segment strong { color: var(--muted); font-weight: 500; }

.chapters-footer { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── FAQ builder ── */
.faq-builder-panel { display: flex; flex-direction: column; gap: 14px; }

.faq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}

.faq-head strong { color: var(--ink); }
.faq-head span { color: var(--muted-light); font-size: 0.72rem; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-row {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.faq-question strong { font-size: 0.9rem; color: var(--ink); }
.faq-answer { font-size: 0.82rem; line-height: 1.6; margin-bottom: 10px; }

.faq-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--muted-light);
}

.faq-timestamp { font-family: var(--mono); color: var(--primary); }
.faq-footer { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Learning paths ── */
.learning-paths-builder { display: flex; flex-direction: column; gap: 14px; }

.paths-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}

.paths-head strong { color: var(--ink); }
.paths-head span { color: var(--muted-light); font-size: 0.72rem; }

.paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--card-gap);
}

.path-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-card-head strong { display: block; font-size: 0.92rem; color: var(--ink); }
.path-card-head span { font-size: 0.75rem; color: var(--muted-light); }

.path-segments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}

.path-segments li {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.path-segments li span {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--primary);
  min-width: 36px;
}

.path-segments li strong { color: var(--muted); font-weight: 500; }

.path-stats { font-size: 0.72rem; color: var(--muted-light); }
.path-actions { display: flex; gap: 6px; }
.paths-footer { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Team use cases ── */
.team-use-case { display: flex; flex-direction: column; gap: 10px; }

.team-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.team-row span:first-child {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-light);
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-row strong { color: var(--ink); flex: 1; }

.team-quote {
  margin-top: 12px;
  padding: 16px;
  background: rgba(124, 58, 237, 0.08);
  border-left: 3px solid var(--secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.team-quote p {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 8px;
}

.team-quote span { font-size: 0.75rem; color: var(--muted-light); }

/* ── Integrations ── */
.integration-network {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  margin-bottom: var(--card-gap);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}

.int-network-sources, .int-network-outputs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.int-node {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card);
}

.int-source { color: var(--highlight); border-color: rgba(0, 194, 255, 0.3); }
.int-output { color: var(--primary); border-color: rgba(255, 107, 53, 0.3); }

.int-network-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.int-flow-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(180deg, var(--highlight), var(--primary));
}

.int-flow-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.int-network-hub strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.int-network-hub span { font-size: 0.75rem; color: var(--muted-light); }

.integration-connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--card-gap);
}

.int-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.int-card h3 { font-size: 0.95rem; color: var(--ink); }
.int-card p { font-size: 0.82rem; flex: 1; }

.int-status {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-light);
}

.int-connected { border-color: rgba(34, 197, 94, 0.3); }
.int-connected .int-status { color: var(--success); }

/* ── Security ── */
.security-panel { display: flex; flex-direction: column; gap: var(--card-gap); }

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.security-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
}

.security-card h3 { font-size: 0.92rem; color: var(--ink); margin-bottom: 8px; }
.security-card p { font-size: 0.82rem; line-height: 1.55; }

.audit-log { display: flex; flex-direction: column; gap: 8px; }

.audit-row {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}

.audit-action { font-family: var(--mono); font-size: 0.68rem; color: var(--primary); }
.audit-row strong { color: var(--muted); font-weight: 500; }

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--card-gap);
  align-items: start;
}

.plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.plan-card h3 { font-size: 1.1rem; color: var(--ink); }
.plan-card > p { font-size: 0.85rem; }

.plan-price {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
}

.plan-price span { font-size: 0.85rem; color: var(--muted-light); font-weight: 400; }
.plan-note { font-size: 0.75rem; color: var(--primary); }

.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 8px;
  border-radius: 999px;
}

.plan-featured {
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.15), var(--shadow);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.plan-features li {
  font-size: 0.82rem;
  padding-left: 18px;
  position: relative;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-size: 0.75rem;
}

/* Segment calculator */
.segment-calculator {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-head strong { display: block; color: var(--ink); font-size: 0.9rem; }
.calc-head span { font-size: 0.75rem; color: var(--muted-light); }

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.calc-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.calc-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.calc-result {
  padding: 14px;
  background: rgba(255, 107, 53, 0.08);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--radius);
  text-align: center;
}

.calc-result strong {
  display: block;
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--primary);
}

.calc-result span { font-size: 0.72rem; color: var(--muted-light); }
.calc-note { font-size: 0.75rem; color: var(--muted-light); }

/* ── Use cases hub ── */
.use-cases-hub { display: flex; flex-direction: column; gap: 16px; }

.use-cases-head strong { display: block; color: var(--ink); font-size: 0.9rem; }
.use-cases-head span { font-size: 0.75rem; color: var(--muted-light); }

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--card-gap);
}

.use-case-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--card-pad);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.use-case-card:hover {
  border-color: rgba(255, 107, 53, 0.3);
  transform: translateY(-2px);
  color: inherit;
}

.use-case-card strong { font-size: 0.92rem; color: var(--ink); }
.use-case-card p { font-size: 0.82rem; flex: 1; }
.use-case-link { font-size: 0.78rem; font-weight: 600; color: var(--primary); }
.use-cases-footer { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── About page ── */
.about-film-hero {
  padding: clamp(40px, 7vw, 64px) 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.06) 0%, rgba(124, 58, 237, 0.04) 100%);
}

.about-film-intro { max-width: 640px; }

.about-film-section { padding: clamp(40px, 6vw, 64px) 0; }

.about-content { display: flex; flex-direction: column; gap: var(--card-gap); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.about-card {
  padding: var(--card-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.about-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-card h2 {
  font-size: 1.05rem;
  margin: 10px 0 8px;
}

.about-card p { font-size: 0.85rem; line-height: 1.6; }

.about-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--card-gap);
  padding: var(--card-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  text-align: center;
}

.about-metrics strong {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--primary);
}

.about-metrics span { font-size: 0.75rem; color: var(--muted-light); }

.about-legal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.about-legal-block h3 {
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.about-legal-block p {
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.film-origin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--card-gap);
}

.origin-card {
  padding: var(--card-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.film-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.origin-card p { font-size: 0.85rem; margin-top: 10px; line-height: 1.6; }

.about-film-footer { padding: clamp(32px, 5vw, 48px) 0; }

.film-cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: var(--radius-xl);
}

.film-cta-panel h2 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 6px; }
.film-cta-panel p { font-size: 0.88rem; }

/* ── Footer ── */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); }

.footer-cta {
  padding: clamp(40px, 6vw, 56px) 0;
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.06) 0%, transparent 100%);
  text-align: center;
}

.footer-cta-inner h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  margin-bottom: 10px;
}

.footer-cta-inner p {
  max-width: 48ch;
  margin: 0 auto;
  font-size: 0.92rem;
}

.footer-cta-inner .btn-row { justify-content: center; }

.footer-wrap { padding: clamp(32px, 5vw, 48px) 0 24px; }

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.footer-tagline {
  max-width: 36ch;
  font-size: 0.85rem;
  text-align: right;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
  margin-bottom: 28px;
}

.footer-col h5 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 4px 0;
}

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

.footer-bottom { padding-top: 16px; border-top: 1px solid var(--line); }

.footer-meta {
  font-size: 0.75rem;
  color: var(--muted-light);
  text-align: center;
}

/* ── Modals ── */
.site-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.site-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 32px);
  box-shadow: var(--shadow-lg);
}

.site-modal-wide { max-width: 560px; }

.site-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
}

.site-modal-close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }

.site-modal-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  padding-right: 32px;
}

.site-modal-lead {
  font-size: 0.88rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.site-modal-form { display: flex; flex-direction: column; gap: 14px; }

.form-group,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label,
.form-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.form-group input,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.form-group input::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted-light); }

.form-group input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.03);
}

.form-field select {
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FAFAFA66' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-field textarea { min-height: 88px; resize: vertical; }

.form-field input[type="file"] {
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.form-field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.form-field input[type="file"]::file-selector-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.form-field input[type="number"] { font-variant-numeric: tabular-nums; }

.form-success {
  font-size: 0.85rem;
  color: var(--success);
  padding: 10px 12px;
  background: var(--success-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-divider {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted-light);
  position: relative;
}

.form-divider::before, .form-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--line);
}

.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

.demo-workflow-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.wf-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.wf-step span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.wf-step strong { display: block; font-size: 0.85rem; color: var(--ink); margin-bottom: 2px; }
.wf-step p { font-size: 0.78rem; line-height: 1.5; }

/* ── Auth page ── */
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-visual {
  padding: clamp(32px, 5vw, 48px);
  background: linear-gradient(160deg, #121216 0%, #1a1228 50%, #0F0F12 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-copy h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: auto;
}

.auth-metric {
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-metric strong {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--primary);
}

.auth-metric span { font-size: 0.72rem; color: var(--muted-light); }

.auth-quote {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
}

.auth-foot { font-size: 0.72rem; color: var(--muted-light); margin-top: auto; }

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 40px);
}

.auth-wrap { width: 100%; max-width: 400px; }

.auth-wrap h2 { font-size: 1.4rem; margin-bottom: 8px; }

.auth-card {
  margin-top: 24px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.auth-note { margin-top: 16px; font-size: 0.85rem; text-align: center; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .workstation-shell { grid-template-columns: 180px 1fr 240px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .header-row { grid-template-columns: 1fr auto; }
  .nav-main { display: none; }
  .workstation-shell { grid-template-columns: 1fr; max-height: none; }
  .workstation-sidebar, .ws-inspector { display: none; }
  .ksd-result { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .audit-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-tagline { text-align: left; }
  .workflow-track { flex-direction: column; }
  .workflow-connector { transform: rotate(90deg); padding: 4px 0; }
  .film-home-toolbar-inner { align-items: center; text-align: center; }
}
