/* Interactive try-it playground */

:root {
  --brand-green: var(--primary);
  --brand-orange: var(--accent);
}

.playground {
  --pg-primary: #106e3c;
  --pg-accent: #e9850b;
  --pg-bg: #ffffff;
  --pg-surface: #ffffff;
  --pg-muted: #4a5560;
  --pg-border: rgba(182, 182, 182, 0.55);
  --pg-chrome: #1e1e1e;
  --pg-panel: #252526;
  --pg-panel-2: #2d2d30;
  --pg-text: #d4d4d4;
  --pg-text-dim: #9d9d9d;
  --pg-tab: #3c3c3c;
}

.playground__grid {
  display: grid;
  gap: var(--space-lg);
  align-items: stretch;
}

@media (min-width: 1024px) {
  .playground__grid {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.2fr);
    gap: var(--space-xl);
    min-height: 560px;
  }

  .playground--full .playground__grid {
    min-height: calc(100vh - var(--header-height) - 6rem);
  }
}

/* ── IDE panel ── */
.playground-ide {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid #111;
  background: var(--pg-panel);
  box-shadow: var(--shadow-lg);
  color: var(--pg-text);
}

.playground-ide__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--pg-chrome);
  border-bottom: 1px solid #111;
}

.playground-ide__dots {
  display: flex;
  gap: 0.35rem;
}

.playground-ide__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.playground-ide__dots span:nth-child(1) { background: #ff5f57; }
.playground-ide__dots span:nth-child(2) { background: #febc2e; }
.playground-ide__dots span:nth-child(3) { background: #28c840; }

.playground-ide__title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pg-text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.playground-ide__tabs {
  display: flex;
  gap: 0;
  background: var(--pg-chrome);
  border-bottom: 1px solid #111;
  overflow-x: auto;
}

.playground-ide__tab {
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pg-text-dim);
  background: transparent;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.playground-ide__tab:hover {
  color: var(--pg-text);
  background: var(--pg-tab);
}

.playground-ide__tab[aria-selected="true"] {
  color: #fff;
  background: var(--pg-panel);
  border-bottom-color: var(--pg-accent);
}

.playground-ide__body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: var(--pg-panel);
}

.playground-panel {
  display: none;
}

.playground-panel.is-active {
  display: block;
}

.playground-panel[hidden] {
  display: none !important;
}

.playground-ide .form-group {
  margin-bottom: 0.9rem;
}

.playground-ide .form-label {
  color: var(--pg-text-dim);
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.playground-ide .form-input,
.playground-ide .form-textarea,
.playground-ide select.form-input {
  background: var(--pg-panel-2);
  border-color: #3e3e42;
  color: #fff;
}

.playground-ide .form-input:focus,
.playground-ide .form-textarea:focus,
.playground-ide select.form-input:focus {
  border-color: var(--pg-accent);
  box-shadow: 0 0 0 3px rgba(233, 133, 11, 0.2);
}

.playground-ide .color-field {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.playground-ide .color-field input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid #3e3e42;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.playground-ide .color-field input[type="text"] {
  flex: 1;
}

.playground-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid #3e3e42;
}

.playground-toggle__label {
  font-size: 0.8125rem;
  color: var(--pg-text);
}

.playground-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--pg-accent);
}

.playground-ide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem;
  border-top: 1px solid #111;
  background: var(--pg-chrome);
}

.playground-ide__actions .btn {
  flex: 1;
  min-width: 120px;
  justify-content: center;
}

.playground-ide__actions .btn--ghost {
  color: var(--pg-text);
  border-color: #3e3e42;
}

.playground-ide__actions .btn--ghost:hover {
  background: var(--pg-tab);
  color: #fff;
}

/* ── Preview + device frames ── */
.playground-preview-wrap {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-md);
}

.playground-device-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.playground-device-bar__group {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.playground-device-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.playground-device-bar__btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.playground-device-bar__btn:hover {
  color: var(--brand-green);
}

.playground-device-bar__btn[aria-pressed="true"] {
  background: #fff;
  color: var(--brand-green);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.playground-device-bar__btn:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.playground-device-bar__meta {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.playground-device-bar__hint {
  width: 100%;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.playground-device-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
  padding: 1rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--brand-green) 8%, transparent), transparent 55%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      color-mix(in srgb, var(--brand-grey) 18%, transparent) 11px,
      color-mix(in srgb, var(--brand-grey) 18%, transparent) 12px
    ),
    var(--bg-subtle);
  overflow: auto;
}

.playground-device-shell {
  position: relative;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.playground-device {
  --pg-device-width: 1280px;
  width: var(--pg-device-width);
  max-width: none;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform-origin: top left;
  transition:
    border-radius 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  will-change: transform;
}

.playground-device.is-resizing {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-orange) 45%, transparent), var(--shadow-md);
}

.playground-device[data-device="mobile"] {
  --pg-device-width: 390px;
  border-radius: 32px;
  border: 3px solid #141414;
  box-shadow:
    0 0 0 1px #333,
    0 22px 48px rgba(0, 0, 0, 0.28);
}

.playground-device[data-device="mobile"]::before {
  content: "";
  display: block;
  width: 96px;
  height: 10px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #141414;
}

.playground-device[data-device="mobile"]::after {
  content: "";
  display: block;
  width: 108px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #2a2a2a;
  order: 99;
}

.playground-device[data-device="tablet"] {
  --pg-device-width: 768px;
  border-radius: 22px;
  border: 3px solid #222;
  box-shadow:
    0 0 0 1px #444,
    0 18px 40px rgba(0, 0, 0, 0.22);
}

.playground-device[data-device="desktop"] {
  --pg-device-width: 1280px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, #000);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 50px rgba(0, 0, 0, 0.28);
}

.playground-preview__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.playground-device[data-device="mobile"] .playground-preview__chrome {
  display: none;
}

.playground-device[data-device="tablet"] .playground-preview__chrome {
  padding: 0.55rem 0.75rem;
}

.playground-preview__chrome-dots {
  display: flex;
  gap: 0.35rem;
}

.playground-preview__chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-grey);
}

.playground-preview__chrome-dots span:nth-child(1) { background: #ef4444; }
.playground-preview__chrome-dots span:nth-child(2) { background: #fbbf24; }
.playground-preview__chrome-dots span:nth-child(3) { background: #34d399; }

.playground-preview__url {
  flex: 1;
  margin-left: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-preview {
  flex: 1;
  overflow: auto;
  background: var(--pg-bg);
  color: #292524;
  scroll-behavior: smooth;
  max-height: 520px;
  /* Preview reflows by frame width, not the browser window */
  container-type: inline-size;
  container-name: demo;
  position: relative;
}

.demo-preview.is-nav-locked {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .demo-preview {
    scroll-behavior: auto;
  }

  .playground-device,
  .playground-device-shell {
    transition: none;
  }

  .demo-preview * {
    transition: none !important;
  }
}

/* Mini site — premium charity template (matches main site language) */
.demo-site {
  --pg-muted: #5c5c5c;
  --pg-ink: #0c5830;
  --pg-faint: #b6b6b6;
  --pg-paper: #ffffff;
  --pg-soft: #f2f2f2;
  --pg-font-display: var(--font-display);
  --pg-font-body: var(--font-body);
  --pg-radius: 10px;
  --pg-radius-btn: 999px;
  width: 100%;
  font-family: var(--pg-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--pg-ink);
  background:
    radial-gradient(ellipse 90% 50% at 100% -10%, color-mix(in srgb, var(--pg-accent) 8%, transparent), transparent 55%),
    var(--pg-bg, var(--pg-paper));
}

.demo-site.is-text-large {
  font-size: 16.5px;
  zoom: 1.12;
}

@supports not (zoom: 1) {
  .demo-site.is-text-large {
    font-size: 16.5px;
  }

  .demo-site.is-text-large .demo-hero__brand {
    font-size: clamp(2.1rem, 8cqi, 2.95rem);
  }

  .demo-site.is-text-large .demo-hero__title {
    font-size: clamp(1.3rem, 4cqi, 1.65rem);
  }

  .demo-site.is-text-large .demo-hero__text,
  .demo-site.is-text-large .demo-section__lead,
  .demo-site.is-text-large .demo-service__text,
  .demo-site.is-text-large .demo-rail__text,
  .demo-site.is-text-large .demo-cta__text,
  .demo-site.is-text-large .demo-band__text {
    font-size: 1.05em;
  }

  .demo-site.is-text-large .demo-section__title,
  .demo-site.is-text-large .demo-cta__title,
  .demo-site.is-text-large .demo-band__title,
  .demo-site.is-text-large .demo-service__title,
  .demo-site.is-text-large .demo-rail__title {
    font-size: 1.12em;
  }

  .demo-site.is-text-large .demo-btn,
  .demo-site.is-text-large .demo-site__donate {
    font-size: 0.95em;
    padding-block: 0.8em;
  }
}

.demo-site.is-corners-soft {
  --pg-radius: 10px;
  --pg-radius-btn: 999px;
}

.demo-site.is-corners-round {
  --pg-radius: 18px;
  --pg-radius-btn: 999px;
}

.demo-site.is-corners-sharp {
  --pg-radius: 4px;
  --pg-radius-btn: 6px;
}

.demo-site__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.15rem;
  background: color-mix(in srgb, var(--pg-primary) 94%, #000);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-site__topbar a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.demo-site__topbar a:hover {
  border-bottom-color: #fff;
}

.demo-site__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: color-mix(in srgb, var(--pg-bg, #fff) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--pg-primary) 12%, transparent);
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(10px);
}

.demo-site__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.demo-site__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--pg-font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  color: var(--pg-primary);
  text-decoration: none;
  min-width: 0;
}

.demo-site__brand > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
}

@container demo (min-width: 480px) {
  .demo-site__brand > span:last-child {
    max-width: none;
  }
}

.demo-site__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--pg-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.demo-site__menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.65rem;
  border: 1px solid color-mix(in srgb, var(--pg-primary) 18%, transparent);
  border-radius: var(--pg-radius, 8px);
  background: #fff;
  color: var(--pg-primary);
  cursor: pointer;
  font-family: inherit;
}

.demo-site__menu:focus-visible {
  outline: 2px solid var(--pg-accent);
  outline-offset: 2px;
}

.demo-site__menu-icon {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.demo-site.is-nav-open .demo-site__menu-icon {
  background: transparent;
  box-shadow: none;
  position: relative;
}

.demo-site.is-nav-open .demo-site__menu-icon::before,
.demo-site.is-nav-open .demo-site__menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.demo-site.is-nav-open .demo-site__menu-icon::before { transform: rotate(45deg); }
.demo-site.is-nav-open .demo-site__menu-icon::after { transform: rotate(-45deg); }

.demo-site__menu-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.demo-site__nav {
  display: none;
  gap: 1.1rem;
  font-size: 0.78rem;
  font-weight: 650;
  margin-inline: 0.75rem;
}

.demo-site__nav a {
  color: var(--pg-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.demo-site__nav a:hover {
  color: var(--pg-primary);
}

.demo-site.is-nav-open .demo-site__header {
  z-index: 40;
  background: #fff;
}

.demo-site__drawer {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 5.5rem 1.35rem 2rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, color-mix(in srgb, var(--pg-primary) 10%, transparent), transparent 55%),
    #fff;
}

.demo-site__drawer:not([hidden]) {
  display: flex;
  position: absolute;
  inset: 0;
  z-index: 35;
  width: 100%;
  height: 100%;
  overflow: auto;
  animation: demo-drawer-in 0.28s ease;
}

@keyframes demo-drawer-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-site__drawer:not([hidden]) { animation: none; }
}

.demo-site__drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.demo-site__drawer-nav a {
  display: block;
  padding: 0.85rem 0.15rem;
  color: var(--pg-primary);
  text-decoration: none;
  font-family: var(--pg-font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 7cqi, 1.9rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
  border-bottom: 1px solid color-mix(in srgb, var(--pg-primary) 12%, transparent);
}

.demo-site__drawer-nav a:hover,
.demo-site__drawer-nav a:focus-visible {
  color: var(--pg-accent);
}

.demo-site__drawer-cta {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  padding-block: 0.9rem;
}

.demo-site__drawer-cta.is-hidden {
  display: none !important;
}

@container demo (max-width: 480px) {
  .demo-site__topbar span:last-child { display: none; }
}

@container demo (min-width: 720px) {
  .demo-site__nav { display: flex; }
  .demo-site__menu { display: none; }
  .demo-site__drawer,
  .demo-site__drawer:not([hidden]) { display: none !important; }
}

@container demo (max-width: 719px) {
  .demo-site__donate { display: none; }
}

.demo-site__donate {
  padding: 0.5rem 0.95rem;
  border-radius: var(--pg-radius-btn, 999px);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--pg-accent);
  transition: background 0.2s ease, color 0.2s ease;
}

.demo-site__donate.is-solid {
  background: var(--pg-accent);
  color: #fff;
}

.demo-site__donate.is-outline {
  background: transparent;
  color: var(--pg-accent);
}

.demo-site__donate.is-hidden {
  display: none !important;
}

.demo-site__main {
  display: block;
}

/* Hero — brand-first composition */
.demo-hero {
  position: relative;
  isolation: isolate;
  padding: 2.35rem 1.2rem 2.6rem;
  overflow: hidden;
  background: var(--pg-soft);
}

.demo-hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, color-mix(in srgb, var(--pg-accent) 18%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 80% at 0% 100%, color-mix(in srgb, var(--pg-primary) 16%, transparent), transparent 52%),
    linear-gradient(165deg, #fff 0%, var(--pg-soft) 100%);
  pointer-events: none;
}

.demo-hero__inner {
  position: relative;
  z-index: 1;
}

.demo-hero.is-centred {
  text-align: center;
}

.demo-hero.is-centred .demo-hero__inner {
  margin-inline: auto;
  max-width: 34rem;
}

.demo-hero.is-centred .demo-hero__visual {
  display: none;
}

.demo-hero.is-split .demo-hero__inner {
  display: grid;
  gap: 1.35rem;
}

@container demo (min-width: 640px) {
  .demo-hero.is-split .demo-hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
    gap: 1.5rem;
  }
}

.demo-hero__brand {
  margin: 0 0 0.65rem;
  font-family: var(--pg-font-display);
  font-size: clamp(1.85rem, 7cqi, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--pg-primary);
}

.demo-hero.is-centred .demo-hero__brand {
  font-size: clamp(2.1rem, 8cqi, 3rem);
}

.demo-hero__title {
  font-family: var(--pg-font-display);
  font-size: clamp(1.15rem, 3.6cqi, 1.45rem);
  font-weight: 700;
  color: var(--pg-ink);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

@container demo (min-width: 900px) {
  .demo-hero__title {
    font-size: 1.55rem;
  }
}

.demo-hero__text {
  color: var(--pg-muted);
  margin: 0 0 1.25rem;
  max-width: 34ch;
  font-size: 0.92rem;
  line-height: 1.55;
}

.demo-hero.is-centred .demo-hero__text {
  margin-inline: auto;
}

.demo-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.demo-hero.is-centred .demo-hero__actions {
  justify-content: center;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: var(--pg-radius-btn, 999px);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.demo-btn:hover {
  transform: translateY(-1px);
}

.demo-btn--primary.is-solid {
  background: var(--pg-accent);
  color: #fff;
  border-color: var(--pg-accent);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--pg-accent) 28%, transparent);
}

.demo-btn--primary.is-outline {
  background: transparent;
  color: var(--pg-accent);
  border-color: var(--pg-accent);
}

.demo-btn--ghost {
  background: #fff;
  color: var(--pg-primary);
  border-color: color-mix(in srgb, var(--pg-primary) 20%, transparent);
}

.demo-hero__visual {
  position: relative;
  isolation: isolate;
  min-height: 11.5rem;
  overflow: hidden;
  padding: 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: linear-gradient(145deg, var(--pg-primary) 0%, color-mix(in srgb, var(--pg-primary) 55%, var(--pg-accent)) 100%);
}

.demo-hero__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 42%),
    radial-gradient(circle at 15% 90%, color-mix(in srgb, var(--pg-accent) 50%, transparent), transparent 48%);
  pointer-events: none;
}

.demo-hero__visual-kicker,
.demo-hero__visual-title,
.demo-hero__visual-text,
.demo-hero__visual-meta {
  position: relative;
  z-index: 1;
}

.demo-hero__visual-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.demo-hero__visual-title {
  margin: 0 0 0.4rem;
  font-family: var(--pg-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.demo-hero__visual-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  max-width: 28ch;
}

.demo-hero__visual-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Impact strip */
.demo-impact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 1.15rem 0.5rem;
  background: #fff;
  border-block: 1px solid color-mix(in srgb, var(--pg-primary) 12%, transparent);
}

.demo-impact__item {
  text-align: center;
  padding: 0.35rem 0.5rem;
  position: relative;
}

.demo-impact__item + .demo-impact__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: color-mix(in srgb, var(--pg-faint) 70%, transparent);
}

.demo-impact__value {
  display: block;
  font-family: var(--pg-font-display);
  font-size: clamp(1.05rem, 4cqi, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--pg-primary);
  line-height: 1.1;
}

.demo-impact__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--pg-muted);
  letter-spacing: 0.02em;
}

@container demo (max-width: 420px) {
  .demo-impact__value { font-size: 1rem; }
  .demo-impact__label { font-size: 0.58rem; }
}

/* Sections */
.demo-section {
  padding: 2rem 1.2rem;
  background: #fff;
}

.demo-section--soft {
  background: var(--pg-soft);
}

.demo-section__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pg-accent);
}

.demo-section__title {
  font-family: var(--pg-font-display);
  font-size: clamp(1.25rem, 4cqi, 1.55rem);
  font-weight: 800;
  color: var(--pg-primary);
  letter-spacing: -0.035em;
  margin: 0 0 0.55rem;
  line-height: 1.15;
}

.demo-section__lead {
  margin: 0 0 1.35rem;
  color: var(--pg-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 38rem;
}

/* Editorial rails */
.demo-rails {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid color-mix(in srgb, var(--pg-primary) 14%, transparent);
}

.demo-rail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--pg-faint) 55%, transparent);
}

.demo-rail__index {
  font-family: var(--pg-font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--pg-accent);
  line-height: 1.5;
}

.demo-rail__title {
  margin: 0 0 0.25rem;
  font-family: var(--pg-font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pg-primary);
}

.demo-rail__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--pg-muted);
}

/* Services — numbered rows, not cards */
.demo-services {
  display: grid;
  gap: 0;
  border-top: 1px solid color-mix(in srgb, var(--pg-primary) 14%, transparent);
}

.demo-service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--pg-faint) 55%, transparent);
}

.demo-service__index {
  font-family: var(--pg-font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--pg-primary);
  line-height: 1.5;
}

.demo-service__title {
  margin: 0 0 0.3rem;
  font-family: var(--pg-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--pg-primary);
}

.demo-service__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--pg-muted);
}

@container demo (min-width: 720px) {
  .demo-services {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 1.25rem;
    border-top: 0;
  }

  .demo-service {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 1.15rem 0 0;
    border-bottom: 0;
    border-top: 3px solid var(--pg-primary);
  }
}

/* Workshop band */
.demo-band {
  display: grid;
  gap: 1rem;
  padding: 1.75rem 1.2rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pg-primary) 8%, #fff), #fff 55%),
    #fff;
  border-block: 1px solid color-mix(in srgb, var(--pg-primary) 12%, transparent);
}

@container demo (min-width: 640px) {
  .demo-band {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 1.5rem;
  }
}

.demo-band__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pg-accent);
}

.demo-band__title {
  margin: 0 0 0.4rem;
  font-family: var(--pg-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pg-primary);
}

.demo-band__text {
  margin: 0;
  max-width: 34rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--pg-muted);
}

.demo-band__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--pg-font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pg-primary);
  text-decoration: none;
  border-bottom: 2px solid color-mix(in srgb, var(--pg-primary) 30%, transparent);
  padding-bottom: 0.15rem;
  justify-self: start;
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
}

.demo-band__link:hover {
  color: var(--pg-accent);
  border-bottom-color: var(--pg-accent);
  gap: 0.65rem;
}

/* CTA */
.demo-cta {
  position: relative;
  margin: 0;
  padding: 2rem 1.2rem;
  border-radius: 0;
  background:
    radial-gradient(ellipse 70% 100% at 100% 0%, color-mix(in srgb, var(--pg-accent) 28%, transparent), transparent 50%),
    linear-gradient(145deg, var(--pg-primary), color-mix(in srgb, var(--pg-primary) 72%, #000));
  color: #fff;
  text-align: left;
  border-left: 4px solid var(--pg-accent);
}

.demo-cta__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--pg-accent) 70%, #fff);
}

.demo-cta__title {
  font-family: var(--pg-font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 4cqi, 1.55rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem;
}

.demo-cta__text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  margin: 0 0 1.15rem;
  max-width: 36ch;
  line-height: 1.5;
}

.demo-cta .demo-btn--primary.is-solid {
  background: var(--pg-accent);
  border-color: var(--pg-accent);
  color: #fff;
}

.demo-cta .demo-btn--primary.is-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

/* Footer */
.demo-footer {
  display: grid;
  gap: 1.35rem;
  padding: 1.75rem 1.2rem 1.5rem;
  background:
    linear-gradient(180deg, #15201c 0%, #0f1613 100%);
  color: #c5d4cb;
  font-size: 0.78rem;
}

@container demo (min-width: 640px) {
  .demo-footer {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
    gap: 1.5rem;
  }
}

.demo-footer__brand {
  font-family: var(--pg-font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}

.demo-footer__tagline {
  margin: 0;
  color: #c5d4cb;
  line-height: 1.45;
  max-width: 28ch;
}

.demo-footer__meta {
  margin: 0.75rem 0 0;
  color: #8fa89a;
  font-size: 0.7rem;
}

.demo-footer__address {
  margin: 0;
  line-height: 1.5;
  color: #c5d4cb;
}

.demo-footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.demo-footer a:hover {
  border-bottom-color: #fff;
}

.demo-footer__heading {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fa89a;
  margin: 0 0 0.55rem;
}

.demo-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Legacy hooks kept for older markup / full playground toggles */
.demo-about-grid,
.demo-cards {
  display: grid;
  gap: 0.85rem;
}

.demo-hero__card { display: none; }

/* Homepage studio — professional live IDE */
.playground-studio-section {
  position: relative;
  overflow: hidden;
}

.playground-studio-section::before {
  content: '';
  position: absolute;
  inset: 10% -12% auto 40%;
  height: min(70%, 36rem);
  background:
    radial-gradient(ellipse at 20% 40%, color-mix(in srgb, var(--primary) 12%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.playground-studio-section .container {
  position: relative;
  z-index: 1;
}

.playground-studio {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.playground-studio__intro {
  max-width: 28rem;
}

.playground-studio__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--text);
  margin: 0.55rem 0 1rem;
}

.playground-studio__lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.playground-studio__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.playground-studio__points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
}

.playground-studio__points span {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.playground-studio__app {
  --pg-ctrl-bg: #121a17;
  --pg-ctrl-bg-2: #1a2420;
  --pg-ctrl-border: rgba(255, 255, 255, 0.1);
  --pg-ctrl-text: #eef4f0;
  --pg-ctrl-muted: #a7b8ae;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, #0a0f0d);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--pg-ctrl-bg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 60px rgba(16, 110, 60, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.12);
}

.playground-studio__titlebar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.95rem;
  background: #0d1311;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.playground-studio__traffic {
  display: flex;
  gap: 0.35rem;
}

.playground-studio__traffic span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.playground-studio__traffic span:nth-child(1) { background: #ff5f57; }
.playground-studio__traffic span:nth-child(2) { background: #febc2e; }
.playground-studio__traffic span:nth-child(3) { background: #28c840; }

.playground-studio__path {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--pg-ctrl-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playground-studio__path-folder {
  color: color-mix(in srgb, var(--accent) 80%, #fff);
}

.playground-studio__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d7ebe0;
}

.playground-studio__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: studio-live-pulse 1.8s ease-out infinite;
}

@keyframes studio-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.playground-studio__workspace {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.playground-studio__sidebar {
  display: grid;
  gap: 1.15rem;
  padding: 1.1rem 1rem 1.25rem;
  background:
    linear-gradient(180deg, #16201c 0%, var(--pg-ctrl-bg) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--pg-ctrl-text);
}

.playground-studio__sidebar-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.playground-studio__sidebar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.playground-studio__group {
  display: grid;
  gap: 0.65rem;
}

.playground-studio__group-label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pg-ctrl-muted);
}

.playground-studio__sidebar .playground-teaser__field,
.playground-studio__sidebar .playground-teaser__field--grow {
  max-width: none;
  flex: none;
  width: 100%;
}

.playground-studio__sidebar .playground-teaser__swatch-label,
.playground-studio__sidebar .playground-teaser__field-label {
  color: var(--pg-ctrl-muted);
}

.playground-studio__sidebar .playground-teaser__field .form-input {
  background: var(--pg-ctrl-bg-2);
  border-color: var(--pg-ctrl-border);
  color: #fff;
}

.playground-studio__sidebar .playground-teaser__field .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 133, 11, 0.22);
}

.playground-studio__sidebar .playground-device-bar__group {
  width: 100%;
  justify-content: stretch;
  background: rgba(0, 0, 0, 0.28);
  border-color: var(--pg-ctrl-border);
}

.playground-studio__sidebar .playground-device-bar__btn {
  flex: 1;
  justify-content: center;
  color: var(--pg-ctrl-muted);
}

.playground-studio__sidebar .playground-device-bar__btn:hover {
  color: #fff;
}

.playground-studio__sidebar .playground-device-bar__btn[aria-pressed="true"] {
  background: #fff;
  color: #121a17;
  box-shadow: none;
}

.playground-studio__sidebar .playground-device-bar__meta {
  margin: 0;
  color: var(--pg-ctrl-muted);
}

.playground-studio__canvas {
  min-width: 0;
  overflow: hidden;
  background: #0f1512;
}

.playground-studio__device-note {
  margin: 0.25rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--pg-ctrl-muted);
}

.playground-studio__device-note a {
  color: #ffc078;
  text-decoration: none;
  font-weight: 700;
}

.playground-studio__device-note a:hover {
  text-decoration: underline;
}

.playground--teaser .playground-device-stage {
  min-height: 560px;
  padding: 1.5rem 1rem 1.75rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    linear-gradient(180deg, #18231e 0%, #101613 100%);
}

.playground--teaser .playground-device {
  min-height: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 22px 48px rgba(0, 0, 0, 0.35);
}

.playground--teaser .playground-device[data-device="mobile"] .demo-preview {
  max-height: 620px;
  overflow-x: hidden;
  overflow-y: auto;
}

.playground--teaser .playground-device-shell {
  max-width: 100%;
}

.playground-studio__statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.55rem 0.9rem;
  background: #0a100e;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  color: var(--pg-ctrl-muted);
}

.playground-studio__status-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.playground-studio__statusbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.playground-studio__ghost-btn,
.playground-studio__primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.playground-studio__ghost-btn {
  border: 1px solid var(--pg-ctrl-border);
  background: transparent;
  color: var(--pg-ctrl-text);
}

.playground-studio__ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.playground-studio__primary-btn {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
}

.playground-studio__primary-btn:hover {
  background: var(--accent-hover);
}

.playground-studio__ghost-btn:focus-visible,
.playground-studio__primary-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .playground-studio__workspace {
    grid-template-columns: minmax(15rem, 17.5rem) minmax(0, 1fr);
  }

  .playground-studio__sidebar {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    align-content: start;
  }
}

@media (min-width: 1024px) {
  .playground-studio {
    grid-template-columns: minmax(15rem, 0.78fr) minmax(0, 1.45fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }

  .playground-studio__intro {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .playground-studio__live-dot {
    animation: none;
  }
}

/* Homepage teaser — shared control atoms (also used by full playground) */
.playground-teaser__intro {
  margin-bottom: var(--space-xl);
  max-width: 38rem;
}

.playground-teaser__shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* Control chrome — dark tool surface, distinct from the light demo site */
.playground-teaser__toolbar,
.playground-full__editor {
  --pg-ctrl-bg: #15201c;
  --pg-ctrl-bg-2: #1e2b26;
  --pg-ctrl-border: rgba(255, 255, 255, 0.14);
  --pg-ctrl-text: #f2f6f3;
  --pg-ctrl-muted: #c5d4cb; /* ≥4.5:1 on ctrl backgrounds */
}

.playground-teaser__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  padding: 0.95rem 1.15rem;
  background: linear-gradient(180deg, #1f2c27 0%, var(--pg-ctrl-bg) 100%);
  border-bottom: 1px solid #0f1613;
  color: var(--pg-ctrl-text);
}

.playground-teaser__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
  flex: 1 1 280px;
  min-width: 0;
}

.playground-teaser__swatches {
  display: flex;
  gap: 0.65rem;
}

.playground-teaser__swatch {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
}

.playground-teaser__swatch-label,
.playground-teaser__field-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pg-ctrl-muted);
}

.playground-teaser__swatch input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--pg-ctrl-border);
  border-radius: 10px;
  background: var(--pg-ctrl-bg-2);
  cursor: pointer;
}

.playground-teaser__swatch input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 3px;
}

.playground-teaser__swatch input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 6px;
}

.playground-teaser__field {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 220px;
}

.playground-teaser__field--grow {
  flex: 1 1 200px;
  max-width: 320px;
}

.playground-teaser__field .form-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  background: var(--pg-ctrl-bg-2);
  border-color: var(--pg-ctrl-border);
  color: #fff;
}

.playground-teaser__field .form-input::placeholder {
  color: #a8bdb2;
}

.playground-teaser__field .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 133, 11, 0.25);
}

.playground-teaser__toolbar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.playground--teaser .playground-device-bar__group,
.playground--full .playground-device-bar__group {
  background: rgba(0, 0, 0, 0.28);
  border-color: var(--pg-ctrl-border);
}

.playground--teaser .playground-device-bar__btn,
.playground--full .playground-device-bar__btn {
  color: var(--pg-ctrl-muted);
}

.playground--teaser .playground-device-bar__btn:hover,
.playground--full .playground-device-bar__btn:hover {
  color: #fff;
}

.playground--teaser .playground-device-bar__btn[aria-pressed="true"],
.playground--full .playground-device-bar__btn[aria-pressed="true"] {
  background: #fff;
  color: #15201c;
  box-shadow: none;
}

.playground--teaser .playground-device-bar__meta,
.playground--full .playground-device-bar__meta {
  margin-left: 0;
  font-size: 0.6875rem;
  color: var(--pg-ctrl-muted);
}

.playground-teaser__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.playground-teaser__footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-left: auto;
}

/* Full playground — same shell, deeper editor */
.playground--full .playground-teaser__shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: var(--shadow-lg);
}

.playground--full .playground-device-stage {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  padding: 1rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--brand-green) 8%, transparent), transparent 55%),
    #e8ebe9;
}

.playground--full .playground-device-shell {
  max-width: 100%;
  align-self: center;
}

.playground--full .playground-device {
  min-height: 0;
  height: auto;
  width: 100%;
  box-sizing: border-box;
}

.playground--full .playground-device[data-device="desktop"] {
  border-radius: 12px;
}

.playground--full .demo-preview,
.playground--full .demo-site {
  width: 100%;
  box-sizing: border-box;
}

.playground--full .demo-preview {
  flex: 1 1 auto;
  max-height: 520px;
  overflow-x: hidden;
  overflow-y: auto;
}

.playground--full .playground-device[data-device="desktop"] .demo-preview,
.playground--full .playground-device[data-device="tablet"] .demo-preview {
  max-height: 520px;
  min-height: 420px;
}

.playground--full .playground-device[data-device="mobile"] .demo-preview {
  max-height: 560px;
  min-height: 480px;
}

.playground--full .playground-device[data-device="mobile"],
.playground--full .playground-device[data-device="tablet"] {
  height: auto;
}

.playground-ctrl-label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.playground-ctrl-label__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.playground-customizer__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f6f3;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.playground-customizer__toggle:hover,
.playground-customizer__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.playground-customizer__chevron {
  transition: transform 0.2s ease;
}

.playground-customizer.is-collapsed .playground-customizer__chevron {
  transform: rotate(-90deg);
}

.playground-customizer.is-collapsed .playground-full__tabs,
.playground-customizer.is-collapsed .playground-full__editor {
  display: none;
}

.playground-customizer.is-collapsed .playground-teaser__toolbar {
  align-items: center;
  border-bottom: 0;
}

.playground-ctrl-label__eyebrow {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffc078; /* orange on dark — stronger than brand orange alone */
}

.playground-full__toolbar {
  align-items: center;
  gap: 0.85rem 1rem;
}

.playground-full__tabs {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--pg-ctrl-border);
}

.playground-full__tab {
  padding: 0.45rem 0.9rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pg-ctrl-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.playground-full__tab:hover {
  color: #fff;
}

.playground-full__tab[aria-selected="true"] {
  background: var(--brand-orange);
  color: #1a1208;
}

.playground-full__tab:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.playground-full__editor {
  padding: 1rem 1.15rem 1.15rem;
  background: var(--pg-ctrl-bg-2);
  border-bottom: 3px solid var(--brand-orange);
  color: var(--pg-ctrl-text);
}

.playground-full__grid {
  display: grid;
  gap: 0.85rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.playground-full__grid--content {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.playground-full__span-2 {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .playground-full__span-2 {
    grid-column: span 2;
  }
}

.playground-full__editor .form-group {
  margin-bottom: 0;
}

.playground-full__editor .form-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pg-ctrl-muted);
  margin-bottom: 0.3rem;
}

.playground-full__editor .form-input,
.playground-full__editor select.form-input {
  background: #15201c;
  border-color: var(--pg-ctrl-border);
  color: #fff;
}

.playground-full__editor .form-input::placeholder {
  color: #a8bdb2;
}

.playground-full__editor .form-input:focus,
.playground-full__editor select.form-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(233, 133, 11, 0.25);
}

.playground-full__editor .color-field {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.playground-full__editor .color-field input[type="color"] {
  width: 42px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--pg-ctrl-border);
  border-radius: 10px;
  background: #15201c;
  cursor: pointer;
}

.playground-full__editor .color-field input[type="text"] {
  color: #fff;
}

.playground-toggle--light {
  border-top: 0;
  padding: 0.35rem 0;
  align-self: center;
}

.playground-toggle--light .playground-toggle__label {
  color: var(--pg-ctrl-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.playground-full__hint {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--pg-ctrl-muted);
}

.playground-full__lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--pg-ctrl-muted);
}

.pg-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.pg-preset {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--pg-ctrl-border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--pg-ctrl-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pg-preset:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.pg-preset.is-selected,
.pg-preset[aria-pressed="true"] {
  border-color: var(--brand-orange);
  background: rgba(233, 133, 11, 0.14);
}

.pg-preset__swatches {
  display: flex;
  gap: 0.25rem;
}

.pg-preset__swatches i {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pg-preset__label {
  font-size: 0.72rem;
  font-weight: 700;
}

.pg-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.pg-swatch-pick {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.pg-swatch-pick__chip {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.pg-swatch-pick__chip--light {
  border-color: rgba(255, 255, 255, 0.35);
}

.pg-swatch-pick__chip input[type="color"] {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.pg-swatch-pick__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pg-ctrl-muted);
}

.pg-font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.pg-font-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--pg-ctrl-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--pg-ctrl-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pg-font-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.pg-font-card.is-selected,
.pg-font-card[aria-pressed="true"] {
  border-color: var(--brand-orange);
  background: rgba(233, 133, 11, 0.14);
}

.pg-font-card__sample {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pg-font-card__name {
  font-size: 0.85rem;
  font-weight: 800;
}

.pg-font-card__desc {
  font-size: 0.72rem;
  color: var(--pg-ctrl-muted);
  font-family: var(--font-body);
}

.pg-choice-block {
  margin-bottom: 0.95rem;
}

.pg-choice-block__label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pg-ctrl-muted);
}

.pg-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pg-choice {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--pg-ctrl-border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--pg-ctrl-text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pg-choice:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.pg-choice.is-selected,
.pg-choice[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: #15201c;
}

.playground-full__footer-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex: 1 1 200px;
}

@media (max-width: 720px) {
  .playground-full__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .playground-teaser__toolbar-end {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .playground-full__tabs {
    width: 100%;
    justify-content: stretch;
  }

  .playground-full__tab {
    flex: 1;
    text-align: center;
  }

  .playground-teaser__field,
  .playground-teaser__field--grow {
    max-width: none;
    flex: 1 1 100%;
  }

  .playground--teaser .playground-device-bar__btn .pg-device-label {
    display: none;
  }
}

.playground-page {
  padding-top: calc(var(--header-height) + var(--space-md));
  padding-bottom: var(--space-xl);
}

.playground-page__header {
  margin-bottom: var(--space-lg);
  max-width: 40rem;
}
