@font-face {
  font-family: "ChoiceSpin Editorial";
  src: url("/fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "ChoiceSpin Text";
  src: url("/fonts/Figtree-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --eb-page: #f7f5ef;
  --eb-surface: #f4f2eb;
  --eb-surface-soft: #fbfaf6;
  --eb-ink: #172019;
  --eb-muted: #5f6861;
  --eb-line: #d5d8d1;
  --eb-line-strong: #bdc3bb;
  --eb-brand: #1d704d;
  --eb-brand-hover: #145b3e;
  --eb-action: #1d704d;
  --eb-action-hover: #145b3e;
  --eb-yellow: #e8c468;
  --eb-red: #ce3b54;
  --eb-green: #88bc57;
  --eb-danger: #b52d44;
  --eb-code: #111821;
  --eb-code-line: #273544;
  --eb-shell: 70rem;
  --eb-display: "ChoiceSpin Editorial", "Segoe UI", system-ui, sans-serif;
  --eb-text: "ChoiceSpin Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --eb-focus: rgba(29, 112, 77, 0.45);
}

html:not([data-theme="light"]) {
  color-scheme: dark;
  --eb-page: #101411;
  --eb-surface: #151a16;
  --eb-surface-soft: #1a201b;
  --eb-ink: #f2f3ed;
  --eb-muted: #b5bbb5;
  --eb-line: rgba(242, 243, 237, 0.16);
  --eb-line-strong: rgba(242, 243, 237, 0.28);
  --eb-brand: #62c493;
  --eb-brand-hover: #82d6aa;
  --eb-danger: #ff8799;
  --eb-code: #0e141b;
  --eb-code-line: #30404f;
}

html {
  scroll-padding-top: 74px;
}

.embed-builder-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--eb-page) !important;
  color: var(--eb-ink);
  font-family: var(--eb-text);
  font-size: 16px;
  line-height: 1.55;
}

.embed-builder-page main {
  padding-top: 0;
}

.embed-builder-page button,
.embed-builder-page input,
.embed-builder-page textarea {
  font: inherit;
}

.embed-builder-page button,
.embed-builder-page label,
.embed-builder-page summary {
  touch-action: manipulation;
}

.embed-builder-page [hidden] {
  display: none !important;
}

.embed-builder-page a {
  color: inherit;
  text-underline-offset: 3px;
}

.embed-builder-page button:focus-visible,
.embed-builder-page a:focus-visible,
.embed-builder-page input:focus-visible,
.embed-builder-page textarea:focus-visible,
.embed-builder-page summary:focus-visible,
.embed-builder-page .code-output:focus-visible {
  outline: 3px solid var(--eb-focus);
  outline-offset: 3px;
}

.builder-shell {
  width: min(var(--eb-shell), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--eb-yellow);
  color: #172033 !important;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

/* Keep the same quiet header proportions and colors as the main site. */
.embed-builder-page .site-header {
  --sc-header-nav-label-size: 0.93rem;
  --sc-header-nav-letter-spacing: 0;
}

/* The shared header is transparent because other pages hide it while
   scrolling. This page keeps it fixed, so it needs a solid backing. The
   selector outranks the shared theme rules for both light and dark mode. */
html body.embed-builder-page .site-header {
  background: color-mix(in srgb, var(--eb-page) 92%, transparent) !important;
  background-color: color-mix(in srgb, var(--eb-page) 92%, transparent) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.embed-builder-page .site-header::before {
  opacity: 1 !important;
  border-bottom: 1px solid var(--eb-line);
  background: transparent !important;
}

.embed-builder-page .header__inner {
  max-width: 1420px;
  margin-inline: auto;
}

.embed-builder-page .site-header .logo {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.embed-builder-page .site-header .logo-text {
  color: var(--eb-ink) !important;
}

.embed-builder-page .site-header .about-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--eb-ink) !important;
  font-family: inherit !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.embed-builder-page .site-header .about-nav a:hover {
  background: var(--eb-surface) !important;
  box-shadow: none !important;
  text-decoration: none;
}

.embed-builder-page .site-header #themeToggle.theme-toggle {
  width: 44px !important;
  min-width: 44px;
  height: 44px !important;
  min-height: 44px;
}

/* A plain first screen. The product is the visual. */
.builder-hero {
  padding: clamp(94px, 9vw, 112px) 0 clamp(42px, 5vw, 56px);
  border-bottom: 1px solid var(--eb-line);
  background: var(--eb-page);
}

.builder-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

body[data-builder-mode="website"] .builder-hero__inner {
  align-items: center;
  text-align: center;
}

.builder-switch-link {
  align-self: flex-end;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: clamp(20px, 3vw, 34px);
  color: var(--eb-brand) !important;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.builder-switch-link:hover {
  color: var(--eb-brand-hover) !important;
  text-decoration: underline;
}

.builder-hero h1 {
  max-width: 980px;
  margin: 0;
  color: var(--eb-ink);
  font-family: var(--eb-display);
  font-size: clamp(2.5rem, 5vw, 3.65rem);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.builder-hero--stream h1 {
  max-width: 930px;
}

.builder-hero__lead {
  max-width: 790px;
  margin: 18px 0 0;
  color: var(--eb-muted);
  font-size: clamp(1.03rem, 1.7vw, 1.24rem);
  text-wrap: pretty;
}

/* Builder workspace */
.builder-layout {
  display: grid;
  grid-template-columns: minmax(370px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 0;
  padding-block: 40px 72px;
}

.settings-card,
.preview-card {
  min-width: 0;
}

.settings-card {
  padding: 8px 42px 0 0;
  border-right: 1px solid var(--eb-line);
}

.preview-card {
  position: sticky;
  top: 76px;
  padding: 8px 0 0 42px;
}

.panel-heading {
  min-height: 62px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.panel-heading h2 {
  margin: 0;
  color: var(--eb-ink);
  font-family: var(--eb-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--eb-muted);
  font-size: 0.8rem;
}

.text-button {
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--eb-brand);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
}

.text-button:hover {
  background: var(--eb-surface);
}

.setup-step {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 24px 0 28px 58px;
  border: 0;
  border-top: 1px solid var(--eb-line);
}

.setup-step:last-child {
  padding-bottom: 0;
}

.setup-step::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16px;
  width: 2px;
  background: var(--eb-line);
}

.setup-step:first-of-type::before {
  top: 38px;
  background: linear-gradient(var(--eb-brand), var(--eb-yellow));
}

.setup-step:nth-of-type(2)::before {
  background: linear-gradient(var(--eb-yellow), var(--eb-red));
}

.setup-step:last-of-type::before {
  bottom: 30px;
  background: linear-gradient(var(--eb-red), var(--eb-green));
}

.setup-step legend {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
  padding: 0;
  color: var(--eb-ink);
  font-size: 1rem;
  font-weight: 760;
}

.setup-step legend span {
  position: absolute;
  top: -4px;
  left: -58px;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--eb-brand);
  color: #ffffff;
  box-shadow: 0 0 0 6px var(--eb-page);
  font-size: 0.8rem;
  font-weight: 850;
}

.setup-step:nth-of-type(2) legend span {
  background: var(--eb-yellow);
  color: #172033;
}

.setup-step:nth-of-type(3) legend span {
  background: var(--eb-red);
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--eb-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

#embed-entries,
#wheel-title {
  width: 100%;
  border: 1px solid var(--eb-line-strong);
  border-radius: 10px;
  background: var(--eb-page);
  color: var(--eb-ink);
}

#embed-entries {
  min-height: 150px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.45;
}

#wheel-title {
  min-height: 44px;
  padding: 9px 12px;
}

#embed-entries:focus,
#wheel-title:focus {
  border-color: var(--eb-brand);
}

#embed-entries[aria-invalid="true"] {
  border-color: var(--eb-danger);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 7px;
  color: var(--eb-muted);
  font-size: 0.7rem;
}

.field-error {
  margin: 8px 0 0;
  color: var(--eb-danger);
  font-size: 0.76rem;
  font-weight: 700;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--eb-line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.choice-card:hover {
  background: var(--eb-surface-soft);
}

.choice-card:has(input:checked) {
  border-color: var(--eb-brand);
  background: color-mix(in srgb, var(--eb-brand) 8%, var(--eb-page));
  box-shadow: inset 0 0 0 1px var(--eb-brand);
}

.choice-card input {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--eb-brand);
}

.choice-card strong {
  padding-right: 18px;
  color: var(--eb-ink);
  font-size: 0.82rem;
}

.choice-card small {
  color: var(--eb-muted);
  font-size: 0.69rem;
  line-height: 1.35;
}

.appearance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--eb-line);
  border-radius: 10px;
  background: var(--eb-surface);
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--eb-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--eb-focus);
  outline-offset: 2px;
}

.segmented-control input:checked + span {
  background: var(--eb-page);
  color: var(--eb-ink);
  box-shadow: 0 1px 5px rgba(23, 32, 51, 0.12);
}

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

.palette-option {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--eb-line);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.palette-option:has(input:checked) {
  border-color: var(--eb-brand);
  box-shadow: inset 0 0 0 1px var(--eb-brand);
}

.palette-option input {
  position: absolute;
  opacity: 0;
}

.palette-option > span {
  min-width: 0;
  display: flex;
  overflow: hidden;
  border-radius: 5px;
}

.palette-option i {
  width: 25%;
  height: 23px;
  display: block;
  background: var(--swatch);
}

.palette-option b {
  overflow: hidden;
  color: var(--eb-muted);
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-option input:focus-visible + span {
  outline: 3px solid var(--eb-focus);
  outline-offset: 3px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  margin-top: 19px;
  border-top: 1px solid var(--eb-line);
}

.toggle-row {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--eb-line);
  cursor: pointer;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--eb-brand);
}

.toggle-row span {
  display: grid;
  gap: 2px;
}

.toggle-row strong {
  color: var(--eb-ink);
  font-size: 0.76rem;
}

.toggle-row small {
  color: var(--eb-muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.range-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 18px;
  margin-top: 18px;
  color: var(--eb-ink);
  font-size: 0.78rem;
}

.range-field output {
  color: var(--eb-muted);
}

.range-field input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  accent-color: var(--eb-brand);
}

.advanced-settings {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--eb-line);
}

.advanced-settings summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--eb-ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.advanced-settings[open] summary {
  margin-bottom: 9px;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--eb-green) 45%, var(--eb-line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--eb-green) 75%, var(--eb-ink));
  font-size: 0.7rem;
  font-weight: 750;
  white-space: nowrap;
}

.preview-frame-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--eb-line-strong);
  border-radius: 16px;
  background:
    linear-gradient(45deg, var(--eb-surface) 25%, transparent 25%),
    linear-gradient(-45deg, var(--eb-surface) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--eb-surface) 75%),
    linear-gradient(-45deg, transparent 75%, var(--eb-surface) 75%),
    var(--eb-page);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  box-shadow: 0 20px 54px rgba(23, 32, 51, 0.1);
}

.preview-card--stream .preview-frame-shell {
  background-color: #22272d;
}

.preview-frame-shell[data-aspect="edit"] {
  max-width: 520px;
  aspect-ratio: 2 / 3;
}

.preview-frame-shell[data-aspect="controls"] {
  max-width: 620px;
  aspect-ratio: 4 / 5;
}

.preview-frame-shell[data-aspect="landscape"] {
  aspect-ratio: 16 / 9;
}

.preview-frame-shell[data-aspect="portrait"] {
  width: min(66%, 390px);
  aspect-ratio: 9 / 16;
}

/* Match the minimum heights in the copied code, so a phone preview is as tall
   as the real embed. */
body[data-builder-mode="website"] .preview-frame-shell[data-aspect="square"] {
  min-height: 460px;
}

body[data-builder-mode="website"] .preview-frame-shell[data-aspect="controls"] {
  min-height: 560px;
}

body[data-builder-mode="website"] .preview-frame-shell[data-aspect="edit"] {
  min-height: 760px;
}

.preview-frame-shell iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
}

/* Mirrors the credit line the copied code places under the frame. */
.preview-credit {
  margin: 10px 0 0;
  color: var(--eb-muted);
  font: 14px/1.4 system-ui, sans-serif;
  text-align: center;
}

.preview-credit a {
  color: var(--eb-brand);
}

.preview-card__foot {
  min-height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-top: 13px;
  color: var(--eb-muted);
  font-size: 0.78rem;
}

.preview-card__foot a {
  color: var(--eb-brand);
  font-weight: 720;
}

/* Generated output is the main action, so it stays visually distinct. */
.output-band {
  border-block: 1px solid var(--eb-line);
  background: var(--eb-surface-soft);
}

.output-band__inner {
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
  align-items: start;
  gap: 26px 52px;
  padding-block: 58px;
}

.output-copy h2,
.section-heading h2,
.commands-copy h2,
.final-cta h2 {
  margin: 0;
  color: var(--eb-ink);
  font-family: var(--eb-display);
  font-size: clamp(1.9rem, 3.5vw, 2.55rem);
  font-weight: 730;
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.output-copy p,
.section-heading > p,
.final-cta p {
  color: var(--eb-muted);
}

.code-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--eb-code-line);
  border-radius: 14px;
  background: var(--eb-code);
  box-shadow: 0 18px 40px rgba(17, 24, 33, 0.16);
}

.code-card__tabs {
  display: flex;
  gap: 4px;
  padding: 7px 7px 0;
}

.code-card__label {
  padding: 13px 16px;
  color: #b7c4cb;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.code-tab {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #aebac3;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
}

.code-tab.is-active {
  background: #243542;
  color: #ffffff;
}

.code-output {
  min-height: 118px;
  max-height: 230px;
  margin: 0;
  padding: 17px;
  overflow: auto;
  border-block: 1px solid var(--eb-code-line);
  background: #0d141b;
  color: #dceaf1;
  font: 0.76rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-card__actions {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 760;
  text-decoration: none !important;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button--accent {
  background: var(--eb-action);
  color: #ffffff;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--eb-action) 25%, transparent);
}

.button--accent:hover:not(:disabled) {
  background: var(--eb-action-hover);
}

.button--dark,
.embed-builder-page a.button--dark {
  background: var(--eb-ink);
  color: var(--eb-page);
}

.button--muted,
.button:disabled {
  cursor: not-allowed;
  background: var(--eb-surface);
  color: var(--eb-muted);
  box-shadow: none;
}

.copy-status {
  color: #c9d3d9;
  font-size: 0.76rem;
}

.privacy-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 17px;
  border-top: 1px solid var(--eb-line);
  color: var(--eb-muted);
  font-size: 0.74rem;
}

.privacy-note code,
.developer-card code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--eb-surface);
  color: var(--eb-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Open editorial sections with separators instead of repeated cards. */
.content-section {
  padding-block: clamp(66px, 8vw, 94px);
}

.content-section--tinted {
  border-block: 1px solid var(--eb-line);
  background: var(--eb-surface-soft);
}

.section-heading {
  max-width: 780px;
}

.section-heading > p {
  max-width: 710px;
  margin: 14px 0 0;
}

.steps-grid,
.platform-grid,
.quality-grid {
  display: grid;
  margin-top: 38px;
}

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

.steps-grid li {
  min-width: 0;
  padding: 4px 32px 2px;
  border-left: 1px solid var(--eb-line);
}

.steps-grid li:first-child {
  padding-left: 0;
  border-left: 0;
}

.steps-grid li > span {
  display: block;
  margin-bottom: 18px;
  color: var(--eb-brand);
  font-size: 1.35rem;
  font-weight: 760;
}

.steps-grid li:nth-child(2) > span {
  color: color-mix(in srgb, var(--eb-yellow) 85%, #8b6a00);
}

.steps-grid li:nth-child(3) > span {
  color: var(--eb-red);
}

.steps-grid h3,
.platform-grid h3,
.quality-grid h3,
.developer-card h3 {
  margin: 0 0 8px;
  color: var(--eb-ink);
  font-size: 1rem;
}

.steps-grid p,
.platform-grid p,
.platform-grid li,
.quality-grid p,
.developer-card p,
.developer-card li {
  margin: 0;
  color: var(--eb-muted);
  font-size: 0.82rem;
}

.platform-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.platform-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platform-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 980px;
}

.platform-grid code,
.quality-grid code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--eb-surface);
  color: var(--eb-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

/* A worked example stays readable and scrolls sideways instead of wrapping. */
.code-sample {
  margin: 0 0 24px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--eb-code-line);
  border-radius: 12px;
  background: var(--eb-code);
  color: #dceaf1;
  font: 0.76rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 2;
}

.developer-card .code-sample code {
  padding: 0;
  background: none;
  color: inherit;
}

.developer-card h3 + p,
.developer-card h3 + ul,
.developer-card h3 + .code-sample {
  margin-top: 0;
}

.developer-card p + h3,
.developer-card ul + h3 {
  margin-top: 22px;
}

.platform-grid article,
.quality-grid article {
  min-width: 0;
  padding-top: 22px;
  border-top: 2px solid var(--eb-brand);
}

/* The four accent colours repeat, so longer grids keep the same rhythm. */
.platform-grid article:nth-child(4n + 2),
.quality-grid article:nth-child(4n + 2) {
  border-top-color: var(--eb-yellow);
}

.platform-grid article:nth-child(4n + 3),
.quality-grid article:nth-child(4n + 3) {
  border-top-color: var(--eb-red);
}

.platform-grid article:nth-child(4n + 4),
.quality-grid article:nth-child(4n + 4) {
  border-top-color: var(--eb-green);
}

.platform-label {
  display: block;
  margin-bottom: 16px;
  color: var(--eb-brand);
  font-size: 0.7rem;
  font-weight: 800;
}

.platform-grid ol {
  margin: 12px 0 0;
  padding-left: 19px;
}

.platform-grid li + li {
  margin-top: 7px;
}

.platform-grid h3 + ol {
  margin-top: 0;
}

.platform-grid ol + p {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--eb-line);
}

.plain-note {
  margin: 26px 0 0;
  padding: 14px 0 14px 17px;
  border-left: 3px solid var(--eb-yellow);
  color: var(--eb-muted);
  font-size: 0.82rem;
}

.quality-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.quality-grid a {
  color: var(--eb-brand);
  font-weight: 700;
}

.developer-layout,
.source-size-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: 54px;
}

/* Grid items default to their widest line; long code must scroll instead. */
.developer-layout > *,
.source-size-layout > * {
  min-width: 0;
}

.developer-card {
  padding-left: 28px;
  border-left: 3px solid var(--eb-brand);
}

.developer-card ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 24px;
  margin: 17px 0;
  padding-left: 19px;
}

.setup-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 26px;
  padding: 17px 0;
  border-block: 1px solid var(--eb-line);
  color: var(--eb-muted);
  font-size: 0.82rem;
}

.setup-callout strong {
  flex: 0 0 auto;
  color: var(--eb-ink);
}

.setup-callout p {
  margin: 0;
}

.setup-callout p + p {
  margin-top: 8px;
  color: var(--eb-ink);
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.size-grid article {
  min-width: 0;
  padding: 5px 24px;
  border-left: 1px solid var(--eb-line);
}

.size-grid article:first-child {
  padding-left: 0;
  border-left: 0;
}

.size-grid span {
  display: block;
  color: var(--eb-muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.size-grid strong {
  display: block;
  margin: 5px 0 11px;
  color: var(--eb-brand);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
}

.size-grid p {
  margin: 0;
  color: var(--eb-muted);
  font-size: 0.8rem;
}

/* A single editorial stream-use section keeps working ideas ahead of roadmap copy. */
.commands-section {
  padding-block: clamp(66px, 8vw, 94px);
  background: #102219;
  color: #f2f3ed;
}

.commands-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 36px 54px;
}

.commands-copy h2 {
  color: #f2f3ed;
}

.commands-copy > p {
  color: #b8c6bd;
}

.stream-use-list {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.stream-use-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 16px;
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.stream-use-list article > span {
  color: #62c493;
  font-family: var(--eb-display);
  font-size: 0.78rem;
  font-weight: 750;
}

.stream-use-list h3 {
  margin: 0;
  color: #f2f3ed;
  font-size: 0.98rem;
}

.stream-use-list p {
  margin: 5px 0 0;
  color: #b8c6bd;
  font-size: 0.8rem;
}

.command-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr);
  gap: 28px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.command-status h3 {
  margin: 0;
  color: #62c493;
  font-size: 0.94rem;
}

.command-status p {
  margin: 0;
  color: #b8c6bd;
  font-size: 0.82rem;
}

.command-status code {
  color: #f2f3ed;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 760;
}

.command-status__body {
  display: grid;
  gap: 14px;
}

/* The command reference reads as a two-column glossary on wide screens and
   stacks on narrow ones, so a streamer can scan it while setting up a scene. */
.command-list {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
}

.command-list dt {
  margin: 0;
}

.command-list dd {
  margin: 0;
  color: #b8c6bd;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .command-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .command-list dd {
    margin-bottom: 10px;
  }
}

/* FAQ and the closing path remain open and easy to scan. */
.faq-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 54px;
}

.faq-list details {
  border-bottom: 1px solid var(--eb-line-strong);
}

.faq-list summary {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 18px 42px 18px 0;
  cursor: pointer;
  color: var(--eb-ink);
  font-weight: 760;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  color: var(--eb-brand);
  font-size: 1.3rem;
  font-weight: 500;
}

.faq-list details[open] summary::after {
  content: "\\2212";
}

.faq-list details p {
  margin: -2px 0 22px;
  padding-right: 32px;
  color: var(--eb-muted);
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  margin-block: 34px 72px;
  padding-block: 38px;
  border-block: 1px solid var(--eb-line);
}

.final-cta h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.final-cta p {
  max-width: 750px;
  margin-bottom: 0;
}

.embed-builder-page .site-footer {
  margin-top: 0;
}

.embed-builder-page .footer__inner {
  display: grid;
  gap: 16px;
  padding-block: 20px 24px;
}

.embed-builder-page .footer__inner > p {
  margin: 0;
}

/* Progressive enhancement: content starts visible and only offscreen sections move. */
[data-eb-reveal] {
  opacity: 1;
  transform: none;
}

.eb-motion [data-eb-reveal].eb-reveal-pending {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
}

.eb-motion [data-eb-reveal].is-visible {
  animation: ebReveal 580ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ebReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 1000px) {
  .builder-layout,
  .output-band__inner,
  .developer-layout,
  .source-size-layout,
  .commands-layout,
  .faq-section {
    grid-template-columns: 1fr;
  }

  .settings-card {
    padding: 8px 0 42px;
    border-right: 0;
    border-bottom: 1px solid var(--eb-line);
  }

  .preview-card {
    position: static;
    padding: 42px 0 0;
  }

  .preview-frame-shell {
    max-height: 700px;
  }

  .output-band__inner {
    gap: 24px;
  }

  .quality-grid,
  .platform-grid {
    grid-template-columns: 1fr 1fr;
  }

  .platform-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .developer-card {
    max-width: 760px;
  }

  .size-grid {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  .embed-builder-page .site-header .about-nav a:not(:first-child) {
    display: none;
  }

  .builder-shell {
    width: min(var(--eb-shell), calc(100% - 28px));
  }

  .builder-hero {
    padding-block: 94px 48px;
  }

  .builder-switch-link {
    align-self: flex-start;
    margin-bottom: 30px;
  }

  body[data-builder-mode="website"] .builder-hero__inner {
    align-items: flex-start;
    text-align: left;
  }

  .builder-hero h1 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .choice-grid--three,
  .appearance-row,
  .toggle-grid,
  .platform-grid--three,
  .size-grid {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 80px;
  }

  .palette-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .toggle-grid {
    border-top: 0;
  }

  .developer-card ul {
    grid-template-columns: 1fr;
  }

  .setup-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-status {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .steps-grid li,
  .steps-grid li:first-child {
    padding: 20px 0;
    border-left: 0;
    border-top: 1px solid var(--eb-line);
  }
}

@media (max-width: 560px) {
  .embed-builder-page .header__inner {
    padding-inline: 10px;
  }

  .embed-builder-page .site-header .about-nav a {
    font-size: 0.74rem;
  }

  .builder-layout {
    padding-block: 30px 52px;
  }

  .setup-step {
    padding-left: 48px;
  }

  .setup-step legend span {
    left: -48px;
  }

  .setup-step::before {
    left: 16px;
  }

  .preview-frame-shell[data-aspect="portrait"] {
    width: 74%;
  }

  .preview-card__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .output-band__inner,
  .content-section,
  .commands-section {
    padding-block: 54px;
  }

  .code-card__actions,
  .final-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .quality-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .final-cta {
    margin-block: 30px 54px;
  }
}

@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;
  }

  .eb-motion [data-eb-reveal].eb-reveal-pending,
  .eb-motion [data-eb-reveal].is-visible {
    opacity: 1 !important;
    transform: none !important;
  }
}
