@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}

:root {
  --bg: #f7f4ef;
  --bg-gray: #ebe6de;
  --bg-dark: #1a2332;
  --bg-code: #1a2332;
  --text: #12141a;
  --text-secondary: #4a4e57;
  --text-tertiary: #6b7080;
  --link: #0b7a75;
  --link-hover: #096660;
  --border: rgba(18, 20, 26, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 980px;
  --font: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  --nav-h: 44px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

:not(pre) > code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  margin: 1.25em 0;
  overflow-x: auto;
}

pre code {
  display: block;
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
}

.hidden {
  display: none !important;
}

/* —— Global nav —— */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-h);
  background: rgba(247, 244, 239, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.015em;
  flex-shrink: 0;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  opacity: 0.72;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: none;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: currentColor;
  opacity: 0.9;
}

.nav-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* —— Buttons —— */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.button-primary {
  background: var(--link);
  color: #fff;
}

.button-primary:hover {
  background: var(--link-hover);
  text-decoration: none;
  color: #fff;
}

.button-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.button-secondary {
  background: transparent;
  color: var(--link);
  box-shadow: inset 0 0 0 1px var(--link);
}

.button-secondary:hover {
  background: var(--link);
  color: #fff;
  text-decoration: none;
}

.button-full {
  width: 100%;
  margin-top: 8px;
}

/* —— Hero —— */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 22px 80px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.4211;
  font-weight: 400;
  letter-spacing: 0.012em;
  color: var(--text-secondary);
  margin: 20px 0 0;
  max-width: 28em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.hero-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-demo {
  position: relative;
  width: min(100%, 360px);
  height: 240px;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tag-demo-file {
  position: absolute;
  left: 28px;
  top: 48px;
  right: 28px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: file-in 700ms var(--ease) both;
}

.tag-demo-filename {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}

.tag-demo-atom {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tag-demo-stamp {
  position: absolute;
  right: 36px;
  top: 112px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #f7f4ef;
  background: var(--link);
  padding: 8px 14px;
  border-radius: 8px;
  transform: rotate(-6deg);
  animation: stamp-in 600ms var(--ease) 280ms both;
}

.tag-demo-horizon {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 36px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--link) 20%,
    var(--link) 80%,
    transparent
  );
  opacity: 0.45;
  animation: horizon-drift 8s var(--ease) infinite alternate;
}

@keyframes file-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(-6deg) translateY(-18px) scale(1.08);
  }
  to {
    opacity: 1;
    transform: rotate(-6deg) translateY(0) scale(1);
  }
}

@keyframes horizon-drift {
  from {
    transform: translateX(-6px);
  }
  to {
    transform: translateX(6px);
  }
}

/* —— Sections —— */
.section {
  padding: 80px 22px;
}

.section-light {
  background: var(--bg);
}

.section-gray {
  background: var(--bg-gray);
}

.section-dark {
  background: var(--bg-dark);
  color: #f5f5f7;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-headline {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.003em;
  line-height: 1.08349;
  margin: 0 0 16px;
  text-align: center;
}

.section-headline.light {
  color: #f5f5f7;
}

.section-lead {
  font-size: 19px;
  line-height: 1.4211;
  color: var(--text-secondary);
  text-align: center;
  max-width: 40em;
  margin: 0 auto 48px;
}

.section-lead.light {
  color: #a1a1a6;
}

.section-lead strong {
  color: var(--text);
  font-weight: 600;
}

.link-light {
  color: #2997ff;
}

/* —— Compare —— */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.compare-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.compare-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.compare-visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  position: relative;
}

.compare-bad {
  background: var(--bg-gray);
}

.compare-good {
  background: linear-gradient(180deg, #d8ebe9 0%, var(--bg-gray) 100%);
}

.compare-audio {
  background: linear-gradient(180deg, #e4ebe3 0%, var(--bg-gray) 100%);
}

.audio-waves {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 48px;
}

.audio-waves span {
  display: block;
  width: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2a9d96, #0b7a75);
}

.audio-waves span:nth-child(1) { height: 24px; }
.audio-waves span:nth-child(2) { height: 40px; }
.audio-waves span:nth-child(3) { height: 32px; }
.audio-waves span:nth-child(4) { height: 20px; }

.compare-label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.rect {
  width: 120px;
  height: 68px;
  border-radius: 8px;
}

.rect.flat {
  background: linear-gradient(135deg, #86868b, #6e6e73);
}

.rect.sphere {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #4cb8b1, #0b7a75);
}

.compare-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
}

.compare-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* —— Format cards —— */
.format-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.format-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.format-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.format-diagram {
  height: 120px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-gray);
}

.panorama {
  width: 160px;
  height: 48px;
  border-radius: 80px / 24px;
  background: linear-gradient(90deg, #4cb8b1, #0b7a75, #1a5f5b, #0b7a75, #4cb8b1);
}

.format-vr180 {
  gap: 4px;
}

.eye {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7dcdc7, #0b7a75);
}

.ambix-channels {
  display: flex;
  gap: 8px;
}

.ambix-channels span {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2a9d96, #0b7a75);
}

.format-card code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

.format-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
}

.format-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* —— Tools grid —— */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--link);
  background: rgba(11, 122, 117, 0.1);
}

.tool-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.tool-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.tool-card code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* —— Steps —— */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--link);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
}

.steps p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* —— Demo workbench —— */
.demo-workbench {
  background: linear-gradient(165deg, #1a1a1c 0%, #1d1d1f 45%, #141416 100%);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 80px rgba(0, 0, 0, 0.45);
}

.demo-rail {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-rail-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #636366;
  transition: color 0.3s var(--ease);
}

.demo-rail-step.is-active {
  color: #f5f5f7;
}

.demo-rail-step.is-done {
  color: #64d2ff;
}

.demo-rail-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.demo-rail-step.is-active .demo-rail-num {
  background: #2997ff;
  border-color: #2997ff;
  color: #fff;
}

.demo-rail-step.is-done .demo-rail-num {
  background: rgba(100, 210, 255, 0.15);
  border-color: rgba(100, 210, 255, 0.4);
  color: #64d2ff;
}

.demo-rail-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.demo-rail-line {
  flex: 1;
  height: 1px;
  margin: 0 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.demo-col-wide {
  grid-column: span 2;
}

.demo-panel {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 20px;
  min-height: 0;
}

.demo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.demo-panel-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #86868b;
}

.demo-text-btn {
  border: 0;
  background: none;
  color: #64d2ff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
}

.demo-text-btn:hover {
  color: #7ddcff;
  text-decoration: underline;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
  padding: 32px 24px;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: #a1a1a6;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}

.dropzone-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 50%, rgba(41, 151, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.dropzone:hover .dropzone-glow,
.dropzone.hover .dropzone-glow,
.dropzone:focus-visible .dropzone-glow {
  opacity: 1;
}

.dropzone:hover,
.dropzone.hover,
.dropzone:focus-visible {
  border-color: rgba(41, 151, 255, 0.55);
  background: rgba(41, 151, 255, 0.05);
  color: #f5f5f7;
}

.dropzone.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.dropzone-icon {
  color: #64d2ff;
  opacity: 0.9;
}

.dropzone-title {
  font-size: 17px;
  font-weight: 600;
  color: #f5f5f7;
  letter-spacing: -0.02em;
}

.dropzone-hint {
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  line-height: 1.45;
}

.dropzone-pill {
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #34c759;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.25);
}

.workspace {
  animation: demo-fade-in 0.45s var(--ease);
}

.dropzone:has(+ .workspace:not(.hidden)) {
  display: none;
}

@keyframes demo-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 20px;
}

.file-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(41, 151, 255, 0.12);
  color: #64d2ff;
}

.file-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  color: #f5f5f7;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-family: var(--mono);
  font-size: 11px;
  color: #86868b;
}

.file-badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #64d2ff;
  background: rgba(100, 210, 255, 0.1);
  border: 1px solid rgba(100, 210, 255, 0.2);
}

.viz-block {
  margin-top: 4px;
}

.viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #86868b;
  margin: 0;
}

.moov-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.moov-badge.is-good {
  color: #34c759;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.25);
}

.moov-badge.is-warn {
  color: #ff9f0a;
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.25);
}

.layout-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.layout-seg {
  position: relative;
  min-width: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: flex-grow 0.6s var(--ease);
  overflow: hidden;
}

.layout-seg span {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.65);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}

.layout-seg:hover span {
  opacity: 1;
}

.layout-ftyp {
  background: linear-gradient(180deg, #98989d, #86868b);
}
.layout-mdat {
  background: linear-gradient(180deg, #7ddcff, #64d2ff);
}
.layout-moov {
  background: linear-gradient(180deg, #4aa3ff, #2997ff);
}
.layout-free {
  background: linear-gradient(180deg, #5a5a5e, #48484a);
}

.layout-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: #86868b;
}

.layout-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.load-progress {
  margin-top: 16px;
}

.load-progress-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.load-progress-fill {
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #2997ff, #64d2ff);
  border-radius: 2px;
  animation: load-indeterminate 1.2s ease-in-out infinite;
}

@keyframes load-indeterminate {
  0% { transform: translateX(-100%); width: 40%; }
  50% { width: 60%; }
  100% { transform: translateX(350%); width: 40%; }
}

.load-progress-text {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #86868b;
}

.meta-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.meta-status-empty {
  color: #86868b;
  background: rgba(255, 255, 255, 0.06);
}

.meta-status-found {
  color: #34c759;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.meta-status-none {
  color: #ff9f0a;
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.2);
}

.metadata-panel {
  min-height: 220px;
}

.metadata-panel.empty .metadata-list {
  display: none;
}

.metadata-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 48px 16px;
  font-size: 14px;
  color: #86868b;
  text-align: center;
  line-height: 1.5;
}

.metadata-empty svg {
  color: #48484a;
}

.metadata-empty code {
  background: rgba(255, 255, 255, 0.08);
  color: #64d2ff;
}

.metadata-help {
  margin: 0;
  padding: 0 16px 16px;
  text-align: center;
  font-size: 12px;
}

.metadata-help a {
  color: #64d2ff;
}

.metadata-help span {
  margin: 0 8px;
  color: #48484a;
}

.metadata-panel:not(.empty) .metadata-empty {
  display: none;
}

.metadata-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meta-group {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  animation: demo-fade-in 0.35s var(--ease) backwards;
}

.meta-group:nth-child(2) { animation-delay: 0.05s; }
.meta-group:nth-child(3) { animation-delay: 0.1s; }

.meta-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #86868b;
  margin: 0;
}

.meta-chip {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.meta-chip-v1 {
  color: #bf5af2;
  background: rgba(191, 90, 242, 0.15);
}

.meta-chip-v2 {
  color: #64d2ff;
  background: rgba(100, 210, 255, 0.12);
}

.meta-chip-audio {
  color: #bf5af2;
  background: rgba(191, 90, 242, 0.15);
}

.meta-chip-warn {
  color: #ff9f0a;
  background: rgba(255, 159, 10, 0.12);
}

.meta-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meta-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-row-label {
  color: #86868b;
}

.meta-row-value {
  font-family: var(--mono);
  font-size: 11px;
  color: #f5f5f7;
  text-align: right;
  word-break: break-word;
}

.meta-row-value.is-good {
  color: #34c759;
}

.controls.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.controls-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.option-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #86868b;
}

.chip-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seg-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: #a1a1a6;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.seg-btn:hover:not(:disabled) {
  color: #f5f5f7;
}

.seg-btn.is-selected {
  background: #2997ff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(41, 151, 255, 0.35);
}

.seg-btn:disabled {
  cursor: not-allowed;
}

.toggle-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toggle-card {
  cursor: pointer;
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, background 0.2s;
}

.toggle-card input:checked + .toggle-card-inner {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.35);
}

.toggle-card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ff9f0a;
  background: rgba(255, 159, 10, 0.12);
}

.toggle-card-icon-atom {
  color: #64d2ff;
  background: rgba(100, 210, 255, 0.12);
  font-family: var(--mono);
}

.toggle-card-icon-audio {
  color: #bf5af2;
  background: rgba(191, 90, 242, 0.15);
  font-family: var(--mono);
  font-size: 10px;
}

.toggle-card.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.toggle-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-card-text strong {
  font-size: 14px;
  font-weight: 500;
  color: #f5f5f7;
}

.toggle-card-text small {
  font-size: 12px;
  color: #86868b;
}

.toggle-card-text code {
  background: rgba(255, 255, 255, 0.08);
  color: #64d2ff;
}

.toggle-card-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.toggle-card input:checked + .toggle-card-inner .toggle-card-check {
  border-color: #34c759;
  background: #34c759;
}

.toggle-card input:checked + .toggle-card-inner .toggle-card-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.inject-preview {
  padding: 16px;
  border-radius: 10px;
  background: rgba(41, 151, 255, 0.06);
  border: 1px solid rgba(41, 151, 255, 0.18);
}

.inject-preview-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64d2ff;
}

.inject-preview-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inject-preview-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: #d1d1d6;
  line-height: 1.4;
}

.inject-preview-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2997ff;
}

.inject-preview-list code {
  background: rgba(255, 255, 255, 0.1);
  color: #64d2ff;
}

.inject-actions {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.button-inject {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
}

.inject-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-wrap {
  margin-top: 14px;
}

.status-line {
  margin: 0;
  font-size: 13px;
  color: #86868b;
  min-height: 1.2em;
}

.status-line[data-tone="success"] {
  color: #34c759;
}

.status-line[data-tone="error"] {
  color: #ff453a;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.25);
  animation: demo-fade-in 0.4s var(--ease);
}

.result-card-icon {
  color: #34c759;
  flex-shrink: 0;
}

.result-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.result-card-body strong {
  font-size: 13px;
  font-weight: 500;
  color: #f5f5f7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card-body span {
  font-family: var(--mono);
  font-size: 11px;
  color: #86868b;
}

/* —— CTA + footer —— */
.cta-section {
  text-align: center;
}

.cta-inner .section-lead {
  margin-bottom: 24px;
}

.cta-foot {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.cta-foot span {
  margin: 0 8px;
  color: var(--text-tertiary);
}

.site-footer {
  padding: 48px 22px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-gray);
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 64px;
  justify-content: space-between;
}

.footer-brand {
  flex-shrink: 0;
}

.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.footer-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.5;
}

.footer-col a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  max-width: 980px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--text-tertiary);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--text-secondary);
  text-decoration: none;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 32px;
    flex-wrap: wrap;
  }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding-top: 40px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .compare-grid,
  .format-grid,
  .compare-grid-3,
  .compare-grid-4,
  .format-grid-3,
  .tools-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-col-wide {
    grid-column: span 1;
  }

  .controls-grid {
    grid-template-columns: 1fr;
  }

  .demo-rail-label {
    display: none;
  }

  .demo-rail-line {
    margin: 0 8px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 22px 12px;
    background: rgba(251, 251, 253, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
    font-size: 15px;
    opacity: 1;
    border-bottom: 1px solid var(--border);
  }

  .nav-icon {
    width: 16px;
    height: 16px;
  }

  .nav-icon svg {
    width: 16px;
    height: 16px;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}

@media (max-width: 734px) {
  .option-row {
    flex-direction: column;
    align-items: stretch;
  }

  .chip-group {
    justify-content: stretch;
  }

  .seg-btn {
    flex: 1;
    text-align: center;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--link);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

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

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