/* Teleharness public landing stylesheet
   Direction: The product performs (Libre Franklin + Source Serif 4, Rose grey & emerald green) */

:root {
  /* Dealt palette: Rose grey, green */
  --bg: #ebe5e3;
  --surface: #e1dad7;
  --surface-deep: #d7ceca;
  --ink: #2b2622;
  --muted: #524945;
  --accent: #0f7d45;
  --accent-hover: #0b6336;
  --accent-ink: #ffffff;

  /* Native Teleharness product fragment palette (used strictly inside [data-ui]) */
  --ui-bg: #1c1a18;
  --ui-panel: #252321;
  --ui-panel-2: #302d2a;
  --ui-ink: #f2f2f2;
  --ui-muted: #b6b6b8;
  --ui-border: rgba(255, 255, 255, 0.14);
  --ui-green: #22a562;
  --ui-amber: #c98a2e;
  --ui-blue: #4f8fe6;
  --ui-coral: #c45834;

  /* Typography */
  --font-display: "Libre Franklin", system-ui, -apple-system, sans-serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Strict five-step type scale */
  --step-small: 0.9375rem;
  --step-body: 1.0625rem;
  --step-lead: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --step-head: clamp(2rem, 1.35rem + 2.4vw, 3.25rem);
  --step-hero: clamp(2.15rem, 6.4vw, 6.25rem);

  /* Layout rhythm */
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-gap: clamp(88px, 10vw, 144px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #161413;
  --surface: #201d1b;
  --surface-deep: #2a2623;
  --ink: #f1f1f0;
  --muted: #b4b2b0;
  --accent: #189857;
  --accent-hover: #137f48;
  --accent-ink: #ffffff;
  --ui-bg: #100f0e;
  --ui-panel: #1b1917;
  --ui-panel-2: #262320;
  --ui-border: rgba(255, 255, 255, 0.14);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0;
  color: var(--ink);
}

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ==========================================================================
   Motion layer (progressive enhancement: hidden only when JS enables .js-anim)
   ========================================================================== */

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.line-inner {
  display: block;
}

html.js-anim .line-inner {
  transform: translateY(104%);
  opacity: 0;
}

html.js-anim.is-ready .line-inner {
  transform: translateY(0);
  opacity: 1;
  transition: transform 860ms var(--ease-out), opacity 520ms var(--ease-out);
}

html.js-anim.is-ready .line-mask:nth-child(2) .line-inner {
  transition-delay: 110ms;
}

html.js-anim [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

html.js-anim [data-reveal="left"] {
  transform: translateX(-22px);
}

html.js-anim [data-reveal="scale"] {
  transform: translateY(18px) scale(0.98);
}

html.js-anim [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: transform 680ms var(--ease-out), opacity 560ms var(--ease-out);
}

html.js-anim [data-reveal][data-delay="1"].is-in { transition-delay: 80ms; }
html.js-anim [data-reveal][data-delay="2"].is-in { transition-delay: 160ms; }
html.js-anim [data-reveal][data-delay="3"].is-in { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js-anim .line-inner,
  html.js-anim [data-reveal],
  html.js-anim [data-reveal="left"],
  html.js-anim [data-reveal="scale"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Topbar: clean single row, no glass, no hairline
   ========================================================================== */

.topbar {
  padding-block: 20px;
}

.topbar-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-body);
  letter-spacing: -0.02em;
  justify-self: start;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-self: center;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.nav-links a:hover {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}

.nav-util {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 8px 6px;
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms var(--ease-out);
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ==========================================================================
   Hero: Controls on the sentence + live moving product stage
   ========================================================================== */

.hero {
  padding-top: clamp(14px, 2.2vw, 32px);
  padding-bottom: clamp(48px, 6vw, 84px);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}

.hero-title {
  font-size: var(--step-hero);
  line-height: 0.94;
  letter-spacing: -0.04em;
  max-width: 15ch;
}

.hero-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

[data-ui].hero-chip {
  min-width: 0;
  background: var(--ui-bg);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-display);
}

[data-ui] .chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--step-small);
  color: var(--ui-muted);
}

[data-ui] .chip-value {
  color: var(--ui-ink);
  font-weight: 600;
}

[data-ui] .chip-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  background: var(--ui-panel);
  padding: 4px;
  border-radius: 7px;
}

[data-ui] .chip-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ui-muted);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  padding: 7px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

[data-ui] .chip-seg-btn[aria-pressed="true"] {
  background: var(--ui-ink);
  color: var(--ui-bg);
}

[data-ui] .chip-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: var(--ui-panel);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 7px;
  padding: 8px 12px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 150ms var(--ease-out);
}

[data-ui] .chip-toggle:hover {
  background: var(--ui-panel-2);
}

[data-ui] .ui-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ui-green);
  flex: none;
}

[data-ui] .ui-dot.is-amber {
  background: var(--ui-amber);
}

[data-ui] .ui-dot.is-blue {
  background: var(--ui-blue);
}

[data-ui] .ui-dot.is-coral {
  background: var(--ui-coral);
}

.hero-subgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.hero-lead {
  font-size: var(--step-lead);
  line-height: 1.4;
  color: var(--ink);
  max-width: 44ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-surface {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out);
}

.btn-surface:hover {
  background: var(--surface-deep);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
}

/* Hero live product stage */
.hero-stage {
  margin-top: clamp(20px, 2.6vw, 32px);
  background: var(--surface);
  border-radius: 12px;
  padding: clamp(12px, 1.5vw, 18px);
}

.hero-stage-media {
  border-radius: 8px;
  overflow: hidden;
  background: var(--ui-bg);
}

.hero-stage-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
}

[data-ui].hero-telemetry {
  margin-top: 12px;
  background: var(--ui-bg);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-display);
  font-size: var(--step-small);
}

[data-ui] .telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

[data-ui] .telemetry-muted {
  color: var(--ui-muted);
}

/* ==========================================================================
   Section spacing and headings
   ========================================================================== */

.section {
  padding-top: var(--section-gap);
}

.sec-head {
  font-size: var(--step-head);
  line-height: 1.04;
  max-width: 18ch;
  margin-bottom: clamp(28px, 3.6vw, 48px);
}

/* ==========================================================================
   Section 1: Showcase (One row, three states)
   ========================================================================== */

.states-stack {
  display: grid;
  gap: 28px;
}

.state-item {
  display: grid;
  grid-template-columns: minmax(140px, 210px) minmax(0, 1fr);
  gap: clamp(18px, 3.2vw, 44px);
  align-items: center;
}

.state-name {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.state-name.is-active {
  color: var(--ink);
}

[data-ui].th-row {
  min-width: 0;
  background: var(--ui-bg);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: center;
  font-family: var(--font-display);
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

[data-ui].th-row.is-interactive {
  background: var(--ui-panel);
  border-color: rgba(255, 255, 255, 0.28);
}

[data-ui].th-row.is-verified {
  border-color: rgba(34, 165, 98, 0.55);
}

[data-ui] .th-row-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

[data-ui] .th-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: var(--step-body);
  font-weight: 700;
  color: var(--ui-ink);
}

[data-ui] .th-row-meta {
  font-size: var(--step-small);
  color: var(--ui-muted);
}

[data-ui] .th-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

[data-ui] .ui-btn {
  appearance: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--ui-border);
  background: var(--ui-panel-2);
  color: var(--ui-ink);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

[data-ui] .ui-btn:hover {
  background: #3b3632;
}

[data-ui] .ui-btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

[data-ui] .ui-btn-accent:hover {
  background: var(--accent-hover);
}

[data-ui] .ui-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--ui-panel);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ui-ink);
}

/* ==========================================================================
   Section 2: How it works (Call and response column + wide result)
   ========================================================================== */

.cr-list {
  display: grid;
  gap: clamp(44px, 5.5vw, 72px);
}

.cr-step {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}

.cr-prompt {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink);
}

.cr-body {
  min-width: 0;
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.cr-step.is-wide .cr-body {
  max-width: none;
}

.code-call {
  min-width: 0;
  background: var(--surface);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.code-call pre {
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  font-size: var(--step-small);
  line-height: 1.45;
  color: var(--ink);
}

.copy-btn {
  flex: none;
  appearance: none;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

.copy-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

[data-ui].cr-response {
  min-width: 0;
  margin-left: clamp(0px, 3.5vw, 48px);
  background: var(--ui-bg);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  display: grid;
  gap: 10px;
}

[data-ui] .cr-resp-line {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  overflow-wrap: anywhere;
}

[data-ui] .cr-resp-link {
  color: #7ee2ab;
  font-weight: 600;
}

.cr-wide-result {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.cr-wide-shot {
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ui-bg);
}

.cr-wide-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

[data-ui].cr-stack-panel {
  min-width: 0;
  background: var(--ui-bg);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
}

[data-ui] .stack-services {
  display: grid;
  gap: 10px;
}

[data-ui] .stack-svc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--ui-panel);
  border-radius: 6px;
  font-size: var(--step-small);
}

/* ==========================================================================
   Section 3: Capabilities (Staggered fragment cells, 3x2 checkerboard)
   ========================================================================== */

.stagger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stagger-cell {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
}

.stagger-cell.media-first {
  flex-direction: column-reverse;
}

.stagger-copy {
  padding: 24px 24px 20px;
  display: grid;
  gap: 10px;
}

.stagger-copy h3 {
  font-size: var(--step-lead);
  line-height: 1.18;
}

.stagger-copy p {
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink);
}

.stagger-media {
  padding: 0 0 0 20px;
  overflow: hidden;
}

.stagger-cell.media-first .stagger-media {
  padding: 0 20px 0 0;
}

.stagger-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-radius: 8px 0 0 0;
}

.stagger-cell.media-first .stagger-media img {
  border-radius: 0 0 8px 0;
}

/* ==========================================================================
   Section 4: Subsystem Inspector (Interactive live screen explorer)
   ========================================================================== */

.inspector-shell {
  display: grid;
  gap: 20px;
}

[data-ui].inspector-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[data-ui] .insp-tab {
  appearance: none;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 7px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

[data-ui] .insp-tab:hover {
  background: var(--surface-deep);
}

[data-ui] .insp-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--bg);
}

.inspector-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border-radius: 12px;
  padding: clamp(16px, 2.2vw, 28px);
}

.inspector-frame {
  border-radius: 8px;
  overflow: hidden;
  background: var(--ui-bg);
}

.inspector-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  transition: opacity 180ms var(--ease-out);
}

.inspector-frame img.is-switching {
  opacity: 0.25;
}

.inspector-caption {
  display: grid;
  gap: 16px;
}

.inspector-caption h3 {
  font-size: var(--step-head);
  line-height: 1.06;
}

.inspector-caption p {
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 38ch;
}

.inspector-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.thumb-shot {
  border-radius: 8px;
  overflow: hidden;
  background: var(--ui-bg);
  cursor: pointer;
  border: 0;
  padding: 0;
  text-align: left;
}

.thumb-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

/* ==========================================================================
   Section 5: Proof strip + Honest Comparison Table
   ========================================================================== */

.proof-strip {
  padding-block: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 44px;
  align-items: center;
}

.proof-intro {
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--muted);
}

.proof-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 26px;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.compare-wrap {
  background: var(--surface);
  border-radius: 10px;
  padding: clamp(12px, 2vw, 24px);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-small);
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 13px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(43, 38, 34, 0.14);
}

[data-theme="dark"] .compare-table th,
[data-theme="dark"] .compare-table td {
  border-bottom-color: rgba(241, 241, 240, 0.14);
}

.compare-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

.compare-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  width: 24%;
}

.compare-table .col-th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.tradeoffs-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 48px;
}

.tradeoff-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.tradeoff-col h3 {
  font-size: var(--step-lead);
}

.tradeoff-col p {
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 52ch;
}

.facts-line {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

/* ==========================================================================
   Section 6: FAQ (Question index, one sticky answer)
   ========================================================================== */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.faq-list-title {
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 20px;
}

.faq-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.faq-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 0;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms var(--ease-out);
}

.faq-btn:hover,
.faq-btn[aria-expanded="true"] {
  color: var(--ink);
}

.faq-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
  flex: none;
  transform: translateY(-2px);
  transition: background-color 160ms var(--ease-out);
}

.faq-btn[aria-expanded="true"] .faq-dot {
  background: var(--accent);
}

.faq-mobile-answer {
  display: none;
  padding: 6px 0 14px 23px;
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.5;
}

.faq-pane {
  position: sticky;
  top: 96px;
  padding-top: 38px;
}

.faq-answer {
  font-family: var(--font-text);
  font-size: var(--step-lead);
  line-height: 1.4;
  color: var(--ink);
  max-width: 36ch;
  transition: opacity 160ms var(--ease-out);
}

.faq-answer.is-fading {
  opacity: 0;
}

/* ==========================================================================
   Section 7: Closing CTA (Full-bleed accent field, first step already open)
   ========================================================================== */

.cta-band {
  margin-top: var(--section-gap);
  background: var(--accent);
  color: var(--accent-ink);
  min-height: 76svh;
  display: grid;
  align-items: center;
  padding-block: clamp(64px, 8vw, 108px);
}

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}

.cta-copy {
  display: grid;
  gap: 20px;
}

.cta-copy h2 {
  color: var(--accent-ink);
  font-size: var(--step-hero);
  line-height: 0.94;
  max-width: 11ch;
}

.cta-copy p {
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--step-lead);
  max-width: 36ch;
}

[data-ui].cta-dialog {
  min-width: 0;
  background: var(--ui-bg);
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 26px;
  display: grid;
  gap: 18px;
  font-family: var(--font-display);
}

[data-ui] .dialog-title {
  font-size: var(--step-lead);
  font-weight: 700;
  color: var(--ui-ink);
}

[data-ui] .dialog-label {
  display: grid;
  gap: 8px;
  font-size: var(--step-small);
  color: var(--ui-muted);
}

[data-ui] .dialog-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 7px;
  border: 1px solid var(--ui-border);
  background: var(--ui-panel);
  color: var(--ui-ink);
  font-family: var(--font-display);
  font-size: var(--step-body);
}

[data-ui] .dialog-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--ui-panel);
  padding: 4px;
  border-radius: 8px;
}

[data-ui] .dialog-seg-btn {
  appearance: none;
  border: 0;
  min-height: 40px;
  border-radius: 6px;
  background: transparent;
  color: var(--ui-muted);
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
}

[data-ui] .dialog-seg-btn[aria-pressed="true"] {
  background: var(--ui-ink);
  color: var(--ui-bg);
}

[data-ui] .dialog-cmd {
  min-width: 0;
  background: var(--ui-panel);
  border-radius: 7px;
  padding: 12px 14px;
  margin: 0;
  overflow-x: auto;
  font-size: var(--step-small);
  color: var(--ui-ink);
}

[data-ui] .dialog-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 7px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: var(--step-body);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

[data-ui] .dialog-submit:hover {
  background: var(--accent-hover);
}

/* ==========================================================================
   Footer: A single quiet line
   ========================================================================== */

.site-footer {
  padding-top: clamp(56px, 8svh, 96px);
  padding-bottom: 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  font-family: var(--font-display);
  font-size: var(--step-small);
}

.footer-left {
  color: var(--muted);
  justify-self: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-right {
  color: var(--muted);
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.footer-right a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================================================
   Responsive breakpoints: Tablet (<= 980px) and Mobile (<= 640px)
   ========================================================================== */

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .topbar-grid {
    grid-template-columns: auto 1fr;
  }

  .hero-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-subgrid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .state-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .state-name {
    text-align: left;
    order: 2;
    font-size: var(--step-body);
  }

  .cr-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  [data-ui].cr-response {
    margin-left: 0;
  }

  .cr-wide-result {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .inspector-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  /* Keep comparison table readable without horizontal clipping on tablet */
  .compare-table .col-ext-md {
    display: none;
  }

  .tradeoffs-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-pane {
    display: none;
  }

  .faq-item.is-open .faq-mobile-answer {
    display: block;
  }

  .cta-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .footer-left,
  .footer-links,
  .footer-right {
    justify-self: start;
    justify-content: flex-start;
  }
}

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

  .topbar-grid {
    gap: 10px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .nav-util {
    padding: 6px 4px;
  }

  .nav-cta {
    padding: 0 11px;
    min-height: 36px;
  }

  .hero-title {
    max-width: none;
  }

  [data-ui] .chip-seg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-ui].th-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .code-call {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }

  .code-call pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .copy-btn {
    align-self: flex-start;
  }

  [data-ui] .cr-resp-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .stagger-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stagger-cell {
    min-height: auto;
  }

  .stagger-cell.media-first {
    flex-direction: column;
  }

  .stagger-cell.media-first .stagger-media {
    padding: 0 20px 0 0;
  }

  .inspector-thumbs {
    display: none;
  }

  /* Clean 3-column comparison table on phone: zero side-scroll, zero clipped words */
  .compare-table .col-ext-sm {
    display: none;
  }

  .compare-table th,
  .compare-table td {
    padding: 11px 8px;
  }

  .compare-table tbody th {
    width: 38%;
  }

  .proof-names {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }

  .cta-band {
    min-height: auto;
  }

  [data-ui] .dialog-cmd {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
