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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  --sidebar-width: 240px;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #e8e8e8;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  display: flex;
  min-height: 100vh;
}

.content-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 24px 16px;
  border-right: 1px solid #1f1f1f;
  background: #0a0a0a;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 24px;
  border-radius: 10px;
}

.sidebar-logo:hover {
  background: #141414;
}

.logo-icon {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  max-width: 140px;
}

.nav-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin: 20px 12px 8px;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #999;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  background: #141414;
  color: #fff;
}

.sidebar-nav {
  flex: none;
}

.sidebar-nav--reference {
  flex: none;
  margin-bottom: 8px;
}

.sidebar-run {
  flex: none;
  margin-bottom: 8px;
}

.sidebar-run__link,
.sidebar-run__pill {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 4px 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #111;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  color: #ccc;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-run__link > span,
.sidebar-run__pill > span {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.sidebar-run__audience {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #8a8a8a;
}

.sidebar-run__link:hover .sidebar-run__audience,
.sidebar-run__pill:hover .sidebar-run__audience {
  color: #b0b0b0;
}

.sidebar-run__link:hover,
.sidebar-run__pill:hover {
  border-color: #444;
  background: #141414;
  color: #fff;
}

.sidebar-run__link--local {
  border-color: #2d3a4a;
  background: #0f1419;
}

.sidebar-run__link--local:hover {
  border-color: #3d5a80;
  background: #121a24;
}

.sidebar-run__info-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #7eb8ff;
}

.sidebar-run__info-icon--cloud {
  color: #a78bfa;
}

.sidebar-run__pill {
  border-color: #3a2a4a;
  background: #151018;
  color: #c4b5fd;
}

.sidebar-run__pill:hover {
  border-color: #5b3d7a;
  background: #1f1528;
  color: #e9d5ff;
}

.sidebar-run__playlist {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin: 4px 4px 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  color: #aaa;
  transition: background 0.15s, color 0.15s;
}

.sidebar-run__playlist:hover {
  background: #141414;
  color: #fff;
}

.sidebar-run__playlist span {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.sidebar-run__youtube-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #ff0000;
}

.sidebar-run__playlist:hover .sidebar-run__youtube-icon {
  color: #ff3333;
}

.sidebar-back {
  margin-bottom: 8px;
}

.demo-toc {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0;
}

.demo-toc__link {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #888;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.demo-toc__link:hover,
.demo-toc__link.active {
  background: #141414;
  color: #fff;
  border-left-color: #6366f1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  flex-shrink: 0;
}

.sidebar-footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 0 8px 16px;
}

.sidebar-footer__aap-logo {
  display: block;
  width: 100%;
  max-width: 188px;
  height: auto;
}

.sidebar-footer__info {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
  border: none;
  background: none;
  color: #666;
  cursor: help;
}

.sidebar-footer__info:hover,
.sidebar-footer__info:focus-visible {
  color: #bbb;
  outline: none;
}

.sidebar-footer__info-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.sidebar-footer__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: 210px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #ddd;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sidebar-footer__info:hover .sidebar-footer__tooltip,
.sidebar-footer__info:focus-visible .sidebar-footer__tooltip {
  opacity: 1;
  visibility: visible;
}

.sidebar-footer__credit {
  margin: 0 0 12px;
  padding: 16px 12px 0;
  border-top: 1px solid #1f1f1f;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}

.sidebar-footer__credit a {
  color: #aaa;
  font-weight: 500;
}

.sidebar-footer__credit a:hover {
  color: #fff;
}

.sidebar-footer__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #888;
  transition: background 0.15s, color 0.15s;
}

.sidebar-footer__link:hover {
  background: #141414;
  color: #fff;
}

.sidebar-footer__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Main */
.main {
  flex: 1;
  padding: 32px 40px 48px;
  max-width: 1200px;
}

.hero {
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #fff;
}

.hero p {
  font-size: 16px;
  color: #888;
  margin: 0 0 20px;
  max-width: 560px;
}

/* Search */
.search-bar {
  position: relative;
  max-width: 420px;
}

.search-bar__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #666;
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-bar__input::placeholder {
  color: #666;
}

.search-bar__input:focus {
  outline: none;
  border-color: #555;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.filter-empty {
  margin: -24px 0 32px;
  font-size: 14px;
  color: #666;
}

.filter-empty.hidden {
  display: none;
}

/* Filter pills */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filters__row--blocks {
  gap: 6px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #aaa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-pill--status {
  padding: 10px 18px;
  font-size: 14px;
}

.filter-pill--block {
  padding: 5px 12px;
  font-size: 12px;
  background: #151018;
  border-color: #3a2a4a;
  color: #c4b5fd;
}

.filter-pill:hover {
  border-color: #444;
  color: #fff;
}

.filter-pill--block:hover {
  border-color: #5b3d7a;
  color: #e9d5ff;
  background: #1f1528;
}

.filter-pill.active {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.filter-pill--block.active {
  background: rgba(139, 92, 246, 0.22);
  color: #f3e8ff;
  border-color: #7c3aed;
}

.filter-pill .count {
  opacity: 0.6;
  margin-left: 4px;
}

.demo-card__blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.demo-card__block {
  padding: 3px 8px;
  border-radius: 6px;
  background: #151018;
  border: 1px solid #3a2a4a;
  font-size: 11px;
  font-weight: 500;
  color: #c4b5fd;
}

/* Sections */
.section {
  margin-bottom: 48px;
}

.section-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin: 0 0 16px;
}

/* Card grids */
.card-grid {
  display: grid;
  gap: 20px;
}

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

.card-grid--all {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Demo card */
.demo-card {
  border-radius: 16px;
  background: #141414;
  border: 1px solid #222;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.demo-card:not(.demo-card--soon):hover {
  transform: translateY(-2px);
  border-color: #444;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.demo-card--soon {
  opacity: 0.82;
}

.demo-card--soon:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: #333;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.demo-card--soon .demo-card__link {
  cursor: pointer;
}

.demo-card--ai-generated:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
}

.demo-card--tmm-created:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.1);
}

.demo-card__link {
  display: block;
  color: inherit;
}

.demo-card__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.demo-card__thumb--video {
  background: #0a0a0a !important;
}

.demo-card--featured .demo-card__thumb {
  aspect-ratio: 16 / 9;
}

.demo-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}


.demo-card__icon {
  font-size: 48px;
  opacity: 0.9;
}

.demo-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-card__badge--level {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(8px);
}

.demo-card__badge--soon {
  background: #333;
  color: #aaa;
}

.demo-card__badge--ai-generated {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  backdrop-filter: blur(8px);
}

.demo-card__badge--tmm-created {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  backdrop-filter: blur(8px);
}

.demo-card__body {
  padding: 16px 18px 18px;
}

.demo-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.demo-card__meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.demo-card__ai-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.3;
}

.demo-card__ai-badge--assisted {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.demo-card__ai-badge--rule-based {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.demo-card__category {
  font-size: 12px;
  color: #666;
  text-transform: capitalize;
}

.demo-card__status--active {
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #fff;
}

.demo-card--featured .demo-card__title {
  font-size: 18px;
}

.demo-card__blurb {
  font-size: 13px;
  color: #888;
  margin: 0 0 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  padding: 3px 8px;
  border-radius: 6px;
  background: #1f1f1f;
  font-size: 11px;
  color: #999;
}

.demo-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #555;
}

.demo-card.hidden {
  display: none;
}

/* Detail page */
.detail-hero {
  margin-bottom: 32px;
}

.detail-hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.detail-hero__content {
  flex: 1;
  min-width: 0;
}

.detail-hero__main {
  margin-bottom: 16px;
}

.detail-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.detail-hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.detail-hero .subtitle {
  font-size: 18px;
  color: #888;
  margin: 0 0 16px;
}

.detail-section__lede {
  margin: -4px 0 16px;
  font-size: 14px;
  color: #888;
}

.ao-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ao-block-item {
  position: relative;
}

.ao-block {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: #151018;
  border: 1px solid #3a2a4a;
  font-size: 13px;
  font-weight: 500;
  color: #c4b5fd;
  font-family: inherit;
  line-height: 1.4;
  cursor: help;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button.ao-block:hover,
button.ao-block:focus-visible {
  background: #1f1528;
  border-color: #5b3d7a;
  box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.2);
  outline: none;
}

.ao-block--static {
  cursor: default;
}

.ao-blocks__glossary-link {
  color: #a78bfa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ao-blocks__glossary-link:hover {
  color: #c4b5fd;
}

.ao-block-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(300px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(160deg, #1a1024 0%, #120a18 100%);
  border: 1px solid #3a2a4a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 30;
}

.ao-block-item:hover .ao-block-popover,
.ao-block-item:focus-within .ao-block-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ao-block-popover__category {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a78bfa;
}

.ao-block-popover__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #f3e8ff;
  line-height: 1.3;
}

.ao-block-popover__definition {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #c4b5fd;
}

#ao-building-blocks {
  overflow: visible;
}

.glossary-hero {
  margin-bottom: 32px;
}

.glossary-hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
}

.glossary-hero__lede {
  margin: 0;
  max-width: 640px;
  font-size: 15px;
  color: #888;
  line-height: 1.6;
}

.glossary-section {
  margin-bottom: 48px;
}

.glossary-section h2 {
  margin-bottom: 16px;
  font-size: 22px;
  color: #f3e8ff;
}

.glossary-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.glossary-card {
  padding: 20px;
  border-radius: 12px;
  background: #151018;
  border: 1px solid #3a2a4a;
  border-top: 3px solid #3a2a4a;
  scroll-margin-top: 24px;
  display: flex;
  flex-direction: column;
}

.glossary-card[data-category="triggers"] { border-top-color: #a0a0a0; }
.glossary-card[data-category="ai"] { border-top-color: #92C5F9; }
.glossary-card[data-category="control_flow"] { border-top-color: #F89B78; }
.glossary-card[data-category="approval_cat"] { border-top-color: #9AD8D8; }
.glossary-card[data-category="aap"] { border-top-color: #E0E0E0; }
.glossary-card[data-category="actions"] { border-top-color: #B6A6E9; }

.glossary-card:target {
  border-color: #7c3aed;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.35);
}

.glossary-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.glossary-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.glossary-card__icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.glossary-card__icon--mono {
  filter: brightness(0) invert(0.85);
}

.glossary-card__icon--logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

/* Category accent colors — matching AO product canvas step colors */
.glossary-card[data-category="triggers"] .glossary-card__icon-wrap {
  background: rgba(160, 160, 160, 0.15);
}
.glossary-card[data-category="triggers"] .glossary-card__icon--mono {
  filter: brightness(0) invert(0.85);
  opacity: 0.9;
}

.glossary-card[data-category="ai"] .glossary-card__icon-wrap {
  background: rgba(146, 197, 249, 0.15);
}
.glossary-card[data-category="ai"] .glossary-card__icon--mono {
  filter: brightness(0) saturate(100%) invert(76%) sepia(30%) saturate(600%) hue-rotate(180deg);
}

.glossary-card[data-category="control_flow"] .glossary-card__icon-wrap {
  background: rgba(248, 155, 120, 0.15);
}
.glossary-card[data-category="control_flow"] .glossary-card__icon--mono {
  filter: brightness(0) saturate(100%) invert(72%) sepia(40%) saturate(500%) hue-rotate(330deg);
}

.glossary-card[data-category="approval_cat"] .glossary-card__icon-wrap {
  background: rgba(154, 216, 216, 0.15);
}
.glossary-card[data-category="approval_cat"] .glossary-card__icon--mono {
  filter: brightness(0) saturate(100%) invert(82%) sepia(20%) saturate(500%) hue-rotate(130deg);
}

.glossary-card[data-category="aap"] .glossary-card__icon-wrap {
  background: rgba(224, 224, 224, 0.12);
}

.glossary-card[data-category="actions"] .glossary-card__icon-wrap {
  background: rgba(182, 166, 233, 0.15);
}
.glossary-card[data-category="actions"] .glossary-card__icon--mono {
  filter: brightness(0) saturate(100%) invert(72%) sepia(20%) saturate(800%) hue-rotate(220deg);
}

.glossary-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
}

.glossary-card--linked {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.glossary-card--linked:hover {
  background: #1c1225;
  border-color: #5b3d7a;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
  transform: translateY(-2px);
}

.glossary-card__demos-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #a78bfa;
}

.glossary-card__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #c4b5fd;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-divider {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 0;
}

.arcade-embed {
  width: 100%;
}

.arcade-embed__frame {
  position: relative;
  padding-bottom: calc(50.6849% + 41px);
  height: 0;
  width: 100%;
}

.arcade-embed__frame iframe,
.arcade-embed__coming-soon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.arcade-embed--placeholder .arcade-embed__frame {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
}

.arcade-embed__coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 15px;
  font-weight: 500;
}

.demo-youtube__frame {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  border: 1px solid #222;
}

.demo-youtube__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-youtube__actions {
  margin: 16px 0 0;
}

.demo-youtube__subscribe {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ee0000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.15s, transform 0.15s;
}

.demo-youtube__subscribe:hover {
  background: #cc0000;
  color: #fff;
}

.detail-section {
  margin-bottom: 40px;
}

.detail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px 40px;
  align-items: start;
  margin-bottom: 40px;
}

.detail-overview .detail-section {
  margin-bottom: 0;
}

.detail-overview__value {
  padding: 20px 22px;
  border-radius: 12px;
  background: #0f0f0f;
  border: 1px solid #222;
}

.detail-overview__value h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.detail-overview__value .detail-list {
  max-width: none;
  margin: 0;
  padding-left: 1.1rem;
  font-size: 14px;
}

.detail-overview .detail-section p {
  max-width: none;
}

.detail-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #fff;
}

.detail-section p {
  color: #aaa;
  max-width: 680px;
}

.detail-list {
  color: #aaa;
  max-width: 680px;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.detail-list li {
  margin-bottom: 8px;
}

.detail-list li:last-child {
  margin-bottom: 0;
}

.detail-steps {
  color: #aaa;
  max-width: 720px;
  margin: 0 0 16px;
  padding-left: 1.35rem;
  line-height: 1.6;
}

.detail-steps li {
  margin-bottom: 10px;
}

.detail-steps li:last-child {
  margin-bottom: 0;
}

.detail-steps code,
.detail-walkthrough__tip code {
  font-size: 0.92em;
  color: #d4d4d4;
}

.detail-walkthrough__tip {
  max-width: 720px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #141414;
  color: #aaa;
  font-size: 14px;
  line-height: 1.5;
}

.detail-walkthrough__tip strong {
  color: #e8e8e8;
  font-weight: 600;
}

.detail-diagram {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
  overflow-x: auto;
  white-space: pre;
}

.workflow-diagram {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px 16px;
  overflow-x: auto;
}

.workflow-diagram .mermaid {
  display: flex;
  justify-content: center;
  margin: 0;
  background: transparent;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Mermaid draws a rect wrapper around image nodes — hide it so PNG cards sit flush */
.workflow-diagram .mermaid svg .node:has(image) > rect {
  fill: none !important;
  stroke: none !important;
}

.cta-row {
  display: none;
}

.btn-download {
  gap: 8px;
}

.btn-download__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-download--loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: #fff;
  color: #0a0a0a;
}

.btn-primary:hover {
  background: #e8e8e8;
}

.btn-secondary {
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
}

.btn-secondary:hover {
  border-color: #555;
  background: #222;
}

.media-placeholder {
  background: #111;
  border: 1px dashed #333;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: #666;
}

.media-placeholder h3 {
  font-size: 14px;
  font-weight: 600;
  color: #888;
  margin: 0 0 8px;
}

.media-placeholder ul {
  text-align: left;
  display: inline-block;
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: #555;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

.back-link:hover {
  color: #fff;
}

.detail-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.detail-status--soon {
  color: #fbbf24;
}

.detail-status--ai-generated {
  color: #a5b4fc;
}

.detail-status--tmm-created {
  color: #fca5a5;
}

.detail-status--active {
  color: #4ade80;
}

.detail-one-liner {
  font-size: 16px;
  color: #888;
  margin: 0 0 16px;
  max-width: 680px;
}

.playbooks-external-note {
  font-size: 13px;
  color: #888;
  margin: 0 0 12px;
}

.playbooks-external-note a {
  color: #92c5f9;
}

.detail-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.detail-table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}

.detail-table th,
.detail-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #222;
}

.detail-table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  background: #111;
}

.detail-table td {
  color: #bbb;
}

.detail-table code {
  font-size: 12px;
  background: #1a1a1a;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ddd;
}

.playbook-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c4b5fd;
  text-decoration: none;
}

.playbook-link__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  color: #a78bfa;
}

.playbook-link:hover .playbook-link__icon {
  opacity: 1;
}

.playbook-link:hover code {
  background: #252525;
  color: #fff;
}

.playbooks-dev {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 560px;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px dashed #333;
  background: #111;
}

.playbooks-dev__icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.playbooks-dev__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #fbbf24;
}

.playbooks-dev__text {
  margin: 0;
  font-size: 14px;
  color: #888;
}

.detail-table--playbooks td:first-child {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #1f1f1f;
  }

  .main {
    padding: 24px 20px 32px;
  }

  .detail-hero__row {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-hero__actions {
    justify-content: flex-start;
  }

  .detail-overview {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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