:root {
  --paper: #f7f5ef;
  --panel: #fffdf8;
  --panel-subtle: #eef2ec;
  --ink: #17211d;
  --muted: #5e6b65;
  --line: #d9ddd5;
  --teal: #0f766e;
  --teal-dark: #0b4f4b;
  --lime: #dff56a;
  --preview-bg: #121c18;
  --preview-surface: #182621;
  --preview-border: #2a3d36;
  --code-bg: #0a110e;
  --code-text: #6ee7b7;
  --font-sans: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  top: -90px;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--panel);
  color: var(--ink);
  border: 2px solid var(--teal-dark);
  border-radius: 10px;
  font-weight: 700;
}

.skip-link:focus {
  top: 10px;
}

.container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
}

/* Compact Global Header */
.site-header {
  position: static;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.site-header .nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--teal-dark);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.site-navigation {
  display: flex; align-items: center; gap: 18px;
}

.site-navigation a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent;
}

.site-navigation a:hover,
.site-navigation a:focus-visible {
  color: var(--teal-dark);
  text-decoration: none;
}

.site-navigation a[aria-current="page"],
.site-navigation a[data-active="true"] {
  color: var(--ink);
  font-weight: 800;
  border-bottom-color: var(--teal-dark);
}

.header-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.language-selector {
  display: flex; align-items: center; flex: 0 0 auto; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: #edf0e9;
}

.language-selector a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 4px 10px; color: var(--muted); font-size: 12px; font-weight: 750; border-radius: 999px; text-decoration: none;
}

.language-selector a:hover {
  color: var(--teal-dark);
  text-decoration: none;
}

.language-selector a[aria-current="page"] {
  background: var(--panel); color: var(--teal-dark); box-shadow: 0 1px 4px #17211d15;
}

.menu-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; background: var(--panel); color: var(--ink); cursor: pointer; white-space: nowrap;
}

.menu-toggle:hover {
  background: var(--panel-subtle);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

@media (max-width: 980px) {
  .site-header .nav-inner { gap: 8px; }
  .brand { margin-right: auto; }
  .menu-toggle { display: inline-flex; }
  .site-navigation { display: none; width: 100%; order: 4; padding-top: 14px; border-top: 1px solid var(--line); }
  .site-navigation.is-open { display: flex; flex-wrap: wrap; gap: 6px 24px; }
}
@media (max-width: 580px) {
  .site-header .nav-inner { padding: 14px 20px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; font-size: 11px; }
}
@media (max-width: 359px) { .brand>span:last-child { display: none; } }

/* Hero / Intro */
.hero {
  padding: 40px 0 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.hero .eyebrow {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 20ch;
}

.hero p {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
  max-width: 72ch;
  margin: 0 0 14px;
}

.hero .demo-boundary {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 78ch;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0 14px;
}

.nav-btn,
.hero-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-btn {
  background: var(--ink);
  color: #ffffff;
}

.nav-btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
  text-decoration: none;
}

.hero-secondary-btn {
  background: var(--panel);
  color: var(--ink);
}

.hero-secondary-btn:hover {
  background: var(--panel-subtle);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  text-decoration: none;
}

.hero .compact-stats {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}

.compact-stats span {
  padding: 0 6px;
  color: var(--teal);
}

/* Playlists Disclosure Banner */
.playlists-banner {
  display: block;
  margin: 0 0 28px;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.playlists-banner summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 6px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.playlists-banner summary::-webkit-details-marker {
  display: none;
}

.playlists-banner summary::after {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel-subtle);
  color: var(--teal-dark);
  font-weight: 800;
  flex-shrink: 0;
}

.playlists-banner[open] summary::after {
  content: '−';
}

.playlists-banner .playlist-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pill {
  background: var(--panel-subtle);
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.pill:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
  text-decoration: none;
}

/* Section Heading & Filter Bar */
#workflows {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  scroll-margin-top: 24px;
  margin-bottom: 14px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.filter-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

.filter-btn.active {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
}

#filter-status {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Workflow Cards — Coherent Compact State + On-Demand Preview Below */
.suites-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  min-width: 0;
}

.suite-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.suite-card[id] {
  scroll-margin-top: 24px;
}

.suite-card:target {
  outline: 2px solid var(--teal-dark);
  outline-offset: 4px;
}

.suite-card:hover {
  border-color: #b8c2ba;
}

.suite-media {
  padding: 24px 26px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
  width: 100%;
}

.suite-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e6f2ef;
  border: 1px solid #b6d8d2;
  padding: 4px 10px;
  border-radius: 999px;
}

.example-permalink {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.example-permalink:hover {
  color: var(--teal-dark);
}

.suite-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.suite-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.pipeline-gates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gate-badge {
  background: var(--panel-subtle);
  border: 1px solid #cbd4cc;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  white-space: normal;
  line-height: 1.3;
}

.gate-badge.highlight {
  background: #e6f4f1;
  border-color: var(--teal);
  color: var(--teal-dark);
}

.gate-badge.hitl {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}

.suite-video-col {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.suite-thumb-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f172a;
  display: block;
}

.suite-video-updating {
  width: 100%;
  min-height: 88px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--panel-subtle);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-weight: 600;
  font-size: 0.92rem;
}

.hub-showreel-video {
  width: 100%;
  max-width: 860px;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f172a;
  display: block;
  margin-top: 12px;
}

.video-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.v-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  text-align: center;
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.v-link:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
  text-decoration: none;
}

.v-link + .v-link {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--ink);
}

.v-link + .v-link:hover {
  background: var(--panel-subtle);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

.video-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
}

/* Expandable Sample Data Section (Compact When Collapsed, Dark Terminal When Open) */
.suite-sim {
  display: block;
  width: 100%;
  min-width: 0;
  border-top: 1px solid var(--line);
  background: var(--panel-subtle);
  padding: 6px 26px;
}

.suite-sim summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--teal-dark);
  min-height: 44px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.suite-sim summary::-webkit-details-marker {
  display: none;
}

.suite-sim summary::after {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--teal-dark);
  font-weight: 800;
  flex-shrink: 0;
}

.suite-sim[open] {
  background: var(--preview-bg);
  color: #f1f5f9;
  padding: 12px 26px 20px;
}

.suite-sim[open] summary {
  color: var(--lime);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--preview-border);
}

.suite-sim[open] summary::after {
  content: '−';
  background: var(--preview-surface);
  border-color: var(--preview-border);
  color: var(--lime);
}

.sim-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}

.sim-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-btn {
  background: var(--preview-surface);
  border: 1px solid var(--preview-border);
  color: #cbd5e1;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.scenario-btn:hover {
  border-color: var(--lime);
  color: #ffffff;
}

.scenario-btn.active {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}

.code-box {
  background: var(--code-bg);
  border: 1px solid var(--preview-border);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--code-text);
  max-height: 240px;
  overflow-y: auto;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  min-width: 0;
  max-width: 100%;
}

.suite-sim[open] .video-note {
  color: #cbd5e1;
  margin-top: 10px;
}

/* Card Footer Actions (Always Visible) */
.sim-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.84rem;
  gap: 12px;
  width: 100%;
}

.sim-meta {
  color: var(--muted);
  font-weight: 600;
}

.hire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-hire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  white-space: nowrap;
  text-decoration: none;
}

.btn-hire:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-hire.btn-hire-secondary {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-hire.btn-hire-secondary:hover {
  background: var(--panel-subtle);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

/* Noscript Fallback Grid */
.fallback-grid article {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

/* Measurement Choice Bar */
.measurement-choice {
  margin: 36px auto 0;
  padding: 18px max(24px, calc((100vw - 1124px) / 2));
  background: #eef0e9;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.measurement-choice p {
  max-width: 900px;
  margin: 0 0 10px;
  color: var(--muted);
}

.measurement-choice > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.measurement-choice a,
.measurement-settings {
  color: var(--teal-dark);
  text-decoration: underline;
  font-weight: 700;
}

.measurement-settings {
  background: var(--panel);
  border: 1px solid var(--teal-dark);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  min-height: 44px;
}

.measurement-settings:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Shared Visible-Label Footer */
.site-footer {
  margin-top: 0;
  padding: 48px max(24px, calc((100vw - 1124px) / 2));
  background: var(--ink);
  color: #ffffff;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, minmax(140px, 1fr));
  gap: 28px;
  align-items: start;
}

.site-footer .footer-brand strong {
  display: block; font-family: var(--font-serif); font-size: 30px; margin-bottom: 12px; color: white;
}

.site-footer .footer-brand p {
  color: #bdc8c2;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer nav strong {
  font-size: 13px; color: #e7eee9; margin-bottom: 10px;
}

.site-footer nav strong a {
  color: inherit;
  text-decoration: none;
}

.site-footer nav a {
  display: inline-flex; align-items: center; min-height: 36px; color: #bdc8c2; font-size: 14px; line-height: 1.5; text-decoration: none;
}

.site-footer nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer .footer-note {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #2d3c35;
  font-size: 0.82rem;
  color: #bdc8c2;
  line-height: 1.55;
}

/* Responsive Breakpoints */
@media (max-width: 920px) {
  .suite-media {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 24px 0 18px;
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7.5vw, 2.35rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-btn,
  .hero-secondary-btn {
    width: 100%;
  }

  .suite-media {
    padding: 18px 16px 14px;
  }

  .suite-sim {
    padding: 6px 16px;
  }

  .suite-sim[open] {
    padding: 10px 16px 16px;
  }

  .sim-footer {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .hire-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .btn-hire {
    width: 100%;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
