:root {
  color-scheme: dark;
  /* Background palette */
  --bg: #090d16;
  --bg-elevated: #0f1624;
  /* Card surfaces */
  --card: rgba(255, 255, 255, 0.045);
  --card-strong: rgba(255, 255, 255, 0.09);
  /* Glass system */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: 1px solid rgba(255, 255, 255, 0.11);
  --glass-highlight: rgba(255, 255, 255, 0.18);
  --glass-blur: blur(16px) saturate(180%);
  /* Neon accent palette */
  --neon-cyan: #06b6d4;
  --neon-indigo: #6366f1;
  --neon-pink: #d946ef;
  /* Typography */
  --text: #f3f4f6;
  --muted: #9ca3af;
  --quiet: #8b94a8;
  /* Borders */
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  /* Semantic accents */
  --accent: var(--neon-cyan);
  --accent-2: var(--neon-indigo);
  --good: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  /* Elevation */
  --shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  /* Border radii */
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --max: 1180px;
  font-family: Inter, 'Apple SD Gothic Neo', 'Noto Sans KR', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --card: rgba(15, 23, 42, 0.02);
  --card-strong: rgba(15, 23, 42, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: 1px solid rgba(15, 23, 42, 0.08);
  --glass-highlight: rgba(15, 23, 42, 0.05);
  --glass-blur: blur(16px) saturate(130%);
  --text: #0f172a;
  --muted: #475569;
  --quiet: #64748b;
  --line: rgba(15, 23, 42, 0.05);
  --line-strong: rgba(15, 23, 42, 0.1);
  --shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Glowing Background Mesh Blobs */
.glow-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.58;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.5s ease;
  animation: float-glow 25s infinite alternate ease-in-out;
}

[data-theme="light"] .glow-blob {
  opacity: 0.15;
  filter: blur(120px);
}

.glow-cyan {
  top: -10%;
  left: 5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--neon-cyan) 0%, rgba(6, 182, 212, 0) 70%);
}

.glow-indigo {
  bottom: 10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--neon-indigo) 0%, rgba(99, 102, 241, 0) 70%);
  animation-delay: -5s;
}

.glow-pink {
  top: 40%;
  left: 35%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--neon-pink) 0%, rgba(217, 70, 239, 0) 70%);
  animation-delay: -10s;
}

@keyframes float-glow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4%, 5%) scale(1.15);
  }
  100% {
    transform: translate(-3%, -2%) scale(0.95);
  }
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", "JetBrains Mono", ui-monospace, Consolas, monospace;
}

code {
  color: #bef8ff;
  background: rgba(34, 211, 238, 0.06);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(34, 211, 238, 0.15);
}

[data-theme="light"] code {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.1);
}

button,
a.button {
  min-height: 40px;
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(34 211 238 / 0.72);
  outline-offset: 3px;
  border-radius: 4px;
}

[data-theme="light"] button:focus-visible,
[data-theme="light"] a:focus-visible,
[data-theme="light"] textarea:focus-visible,
[data-theme="light"] [tabindex]:focus-visible {
  outline-color: rgb(2 132 199 / 0.8);
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4);
  align-items: center;
  max-width: calc(var(--max) + 2rem);
  min-height: 72px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  backdrop-filter: var(--glass-blur);
}

/* Wraps lang-toggle + theme-toggle side by side */
.header-controls {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.brand,
.site-nav,
.theme-toggle {
  border: var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  transition-property: border-color, background-color, transform, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 44px;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.brand:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--card-strong);
  transform: translateY(-1px);
}

[data-theme="light"] .brand:hover {
  border-color: rgba(15, 23, 42, 0.15);
}

.brand-mark {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 28px rgb(34 211 238 / 0.4);
}

.site-nav {
  display: flex;
  min-height: 44px;
  gap: 0.25rem;
  align-items: center;
  padding: 0.25rem;
  border-radius: 999px;
}

.site-nav a {
  min-height: 36px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition-property: color, background-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.site-nav a[aria-current="true"],
.site-nav a:hover {
  background: var(--card-strong);
  color: var(--text);
}

.theme-toggle {
  min-height: 44px;
  border-radius: 999px;
  color: var(--text);
  padding: 0.55rem 0.9rem;
  transition-property: background-color, border-color, scale, transform;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--card-strong);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(15, 23, 42, 0.15);
}

/* Language toggle — segmented EN|KO pill */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition-property: border-color, background-color, transform;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.lang-toggle:hover {
  border-color: rgba(6, 182, 212, 0.35);
  background: var(--card-strong);
  transform: translateY(-1px);
}

.lang-sep {
  color: var(--line-strong);
  font-weight: 400;
  user-select: none;
}

.lang-opt {
  padding: 0.15rem 0.3rem;
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

/* Highlight the active locale segment */
.lang-toggle[data-locale="en"] .lang-opt[data-lang="en"],
.lang-toggle[data-locale="ko"] .lang-opt[data-lang="ko"] {
  color: var(--text);
  background: var(--card-strong);
}

.theme-toggle:active,
.button:active,
.phrase-grid button:active,
.check-card button:active,
.copy-button:active {
  scale: 0.96;
}

.section-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vh, 5.5rem) 1.5rem;
}

/* Subtle horizontal rule between major sections */
.section-shell + .section-shell {
  border-top: 1px solid var(--line);
}

.section-stack {
  display: grid;
  gap: var(--space-8);
}

.section-heading {
  display: grid;
  max-width: 52rem;
  gap: var(--space-2);
}

.section-heading p:not(.eyebrow) {
  margin-top: var(--space-1);
  color: var(--muted);
  line-height: 1.7;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(20rem, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding-top: clamp(2rem, 5vh, 4.5rem);
  padding-bottom: clamp(2rem, 5vh, 4.5rem);
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.eyebrow,
.feature-kicker,
.target-card span,
.scenario-card header span,
.flow-index {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: balance;
  font-weight: 850;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] h1 {
  background: linear-gradient(135deg, #0f172a 30%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Korean glyphs are full-width; relax the tight Latin caps so headings do not clip. */
html[lang="ko"] h1 {
  max-width: 22ch;
}

html[lang="ko"] h2 {
  max-width: 26ch;
}

h2 {
  max-width: 14ch;
  margin-bottom: 0.9rem;
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: balance;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] h2 {
  background: linear-gradient(135deg, #0f172a 40%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  color: var(--muted);
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-subcopy {
  max-width: 44rem;
  margin-bottom: 1.6rem;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.35rem;
}

/* Glass Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  font-weight: 750;
  text-decoration: none;
  transition-property: border-color, background-color, transform, box-shadow, color, scale;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.button-primary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
  color: white;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.3);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(99, 102, 241, 0.45);
  border-color: rgba(255, 255, 255, 0.4);
}

.button-ghost {
  border: var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  box-shadow: var(--shadow);
}

.button-ghost:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: var(--card-strong);
  transform: translateY(-2px);
}

[data-theme="light"] .button-ghost:hover {
  border-color: rgba(2, 132, 199, 0.35);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.badge-row li {
  min-height: 32px;
  padding: 0.42rem 0.66rem;
  border: var(--glass-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow);
}

/* Frosted Containers & Cards */
.signal-card,
.feature-card,
.demo-card,
.target-card,
.scenario-card,
.flow-grid li,
.diagram,
.code-panel,
.check-card,
.start-card,
.faq-grid details {
  border: var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  transition-property: border-color, background-color, transform, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.signal-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
}

.signal-card::before {
  position: absolute;
  inset: -30% -40%;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle, rgba(6, 182, 212, 0.15), transparent 30%),
    radial-gradient(circle at 74% 45%, rgba(99, 102, 241, 0.15), transparent 30%);
  filter: blur(8px);
}

.signal-card-header,
.progress-readout,
.demo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.signal-card-header {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.62rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  color: var(--good);
  background: rgba(52, 211, 153, 0.08);
  font-variant-numeric: tabular-nums;
}

#wave-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 12px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  outline: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-readout {
  margin-top: 0.8rem;
  color: var(--quiet);
  font-size: 0.84rem;
  line-height: 1.45;
}

.feature-grid,
.scenario-grid,
.flow-grid,
.checklist,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.scenario-card,
.flow-grid li,
.check-card,
.start-card,
.faq-grid details,
.target-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature-card:hover,
.flow-grid li:hover,
.target-card:hover,
.scenario-card:hover,
.check-card:hover,
.start-card:hover,
.faq-grid details:hover {
  border-color: rgba(6, 182, 212, 0.3);
  background: var(--card-strong);
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .feature-card:hover,
[data-theme="light"] .flow-grid li:hover,
[data-theme="light"] .target-card:hover,
[data-theme="light"] .check-card:hover,
[data-theme="light"] .start-card:hover,
[data-theme="light"] .faq-grid details:hover {
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.demo-section {
  display: grid;
  gap: 2rem;
}

.demo-layout,
.architecture-grid,
.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.demo-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
}

.demo-card-header a,
.site-footer a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
  transition-property: color, text-decoration-color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.demo-card-header a:hover,
.site-footer a:hover {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.phrase-grid {
  display: grid;
  gap: 0.65rem;
}

.phrase-grid button,
.check-card button,
.copy-button {
  min-height: 44px;
  border: var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  padding: 0.8rem 1rem;
  transition-property: border-color, background-color, transform, box-shadow, scale;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  box-shadow: var(--shadow);
}

[data-theme="light"] .phrase-grid button,
[data-theme="light"] .check-card button,
[data-theme="light"] .copy-button {
  background: rgba(15, 23, 42, 0.03);
}

.phrase-grid button:hover,
.check-card button:hover,
.copy-button:hover {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-1px);
}

.demo-launch {
  width: 100%;
}

.demo-note {
  margin-bottom: 0;
  color: var(--quiet);
  font-size: 0.9rem;
}

.demo-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.target-card {
  min-height: 15rem;
}

.target-card textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  border: var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  padding: 0.9rem;
  font: inherit;
  line-height: 1.55;
  transition-property: border-color, background-color, box-shadow;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

.target-card textarea:focus {
  border-color: rgba(6, 182, 212, 0.5);
  outline: none;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

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

.scenario-card {
  display: grid;
  gap: 1rem;
}

.scenario-card h3 {
  margin-bottom: 0;
}

.scenario-card p {
  margin-bottom: 0;
}

.scenario-meta {
  display: grid;
  gap: 0.85rem;
}

.scenario-meta section {
  display: grid;
  gap: 0.45rem;
}

.scenario-meta strong {
  color: var(--quiet);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scenario-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scenario-chips span {
  padding: 0.32rem 0.52rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgb(255 255 255 / 0.055);
  font-size: 0.78rem;
}

[data-theme="light"] .scenario-chips span {
  background: rgb(15 23 42 / 0.045);
}

[data-theme="light"] .target-card textarea {
  background: rgba(255, 255, 255, 0.8);
}

.flow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.flow-index {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 800;
}

.architecture-grid {
  align-items: stretch;
}

.diagram,
.code-panel pre,
.start-card pre {
  overflow: auto;
  margin: 0;
  color: #d9e7ff;
  line-height: 1.7;
  white-space: pre;
}

[data-theme="light"] .diagram,
[data-theme="light"] .code-panel pre,
[data-theme="light"] .start-card pre {
  color: #0f172a;
}

.diagram {
  min-height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.code-panel {
  display: grid;
  gap: 0.8rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tab-list button {
  min-height: 40px;
  border: var(--glass-border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--muted);
  transition-property: border-color, background-color, color;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.tab-list button[aria-selected="true"],
.tab-list button:hover {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
  color: var(--text);
}

.code-panel pre,
.start-card pre {
  padding: 1.25rem;
  border: var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .code-panel pre,
[data-theme="light"] .start-card pre {
  background: rgba(241, 245, 249, 0.9);
}

.copy-button,
.check-card button {
  justify-content: center;
  padding: 0.72rem 0.9rem;
  text-align: center;
}

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

.check-card {
  display: grid;
  gap: 0.75rem;
}

.check-card p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.check-card output {
  min-height: 2.5rem;
  padding: 0.65rem;
  border-radius: 14px;
  color: var(--quiet);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
  line-height: 1.45;
  border: var(--glass-border);
}

[data-check-state="pass"] output {
  color: var(--good);
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
}

[data-check-state="warn"] output {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}

[data-check-state="fail"] output {
  color: var(--danger);
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.2);
}

/* Light theme: darken result text to meet WCAG 1.4.3 AA (>=4.5:1) on the
   near-white tinted output backgrounds. Saturated dark-theme accents only
   reach ~1.5-2.3:1 here, so they are overridden per state. */
[data-theme="light"] .check-card output {
  color: #475569;
}

[data-theme="light"] [data-check-state="pass"] output {
  color: #047857;
}

[data-theme="light"] [data-check-state="warn"] output {
  color: #92600a;
}

[data-theme="light"] [data-check-state="fail"] output {
  color: #b91c1c;
}

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

.start-card {
  min-height: 100%;
}

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

.faq-grid details {
  padding: 1.25rem;
}

.faq-grid summary {
  min-height: 40px;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  display: flex;
  align-items: center;
}

.faq-grid p {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 4rem;
  color: var(--quiet);
}

/* Call Center Custom Styling Hooks */
.waicc-root {
  --waicc-accent: var(--neon-cyan);
}

.waicc-fab {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo)) !important;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.waicc-panel {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6) !important;
}

.waicc-highlight {
  outline-color: var(--neon-cyan) !important;
}

/* Media Queries */
@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: center;
    overflow: auto;
  }

  .hero,
  .demo-layout,
  .architecture-grid,
  .start-grid {
    grid-template-columns: 1fr;
  }

  .demo-card {
    position: relative;
    top: auto;
  }

  .feature-grid,
  .scenario-grid,
  .flow-grid,
  .checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    position: relative;
  }

  .brand {
    max-width: 100%;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
  }

  .hero-actions,
  .progress-readout,
  .demo-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .theme-toggle {
    width: 100%;
  }

  .header-controls {
    flex-wrap: wrap;
    gap: var(--space-1);
  }

  .lang-toggle,
  .theme-toggle {
    flex: 1 1 auto;
    justify-content: center;
  }

  .feature-grid,
  .scenario-grid,
  .flow-grid,
  .checklist,
  .faq-grid,
  .demo-targets {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

	  .feature-card:hover,
	  .flow-grid li:hover,
	  .target-card:hover,
	  .scenario-card:hover,
	  .check-card:hover,
  .start-card:hover,
  .button-primary:hover {
    transform: none;
  }
}
