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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  --sidebar-width: 240px;
  --accent: #0969da;
  --accent-dim: #0550ae;
  --accent-glow: rgba(9, 105, 218, 0.10);
  --bg-body: #ffffff;
  --bg-sidebar: #f6f8fa;
  --bg-surface: #f0f2f5;
  --bg-surface-hover: #e8ebef;
  --border: #d0d7de;
  --border-hover: #0969da;
  --text-primary: #1f2328;
  --text-secondary: #59636e;
  --text-muted: #8b949e;
  --code-bg: #ddf4ff;
  --code-border: #54aeff;
  --code-text: #0550ae;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --accent: #58a6ff;
    --accent-dim: #388bfd;
    --accent-glow: rgba(88, 166, 255, 0.10);
    --bg-body: #161b22;
    --bg-sidebar: #0d1117;
    --bg-surface: #21262d;
    --bg-surface-hover: #30363d;
    --border: #30363d;
    --border-hover: #58a6ff;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #656d76;
    --code-bg: #162c46;
    --code-border: #388bfd;
    --code-text: #79c0ff;
  }
}

html[data-theme="dark"] {
  --accent: #58a6ff;
  --accent-dim: #388bfd;
  --accent-glow: rgba(88, 166, 255, 0.10);
  --bg-body: #161b22;
  --bg-sidebar: #0d1117;
  --bg-surface: #21262d;
  --bg-surface-hover: #30363d;
  --border: #30363d;
  --border-hover: #58a6ff;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #656d76;
  --code-bg: #162c46;
  --code-border: #388bfd;
  --code-text: #79c0ff;
}

body {
  margin: 0;
  font-family: 'Red Hat Display', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  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 var(--border);
  background: var(--bg-sidebar);
  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: var(--bg-surface);
}

.logo-icon {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-bg { fill: #0550ae; }
.logo-play { fill: #0969da; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .logo-bg { fill: #1f3a5f; }
  html:not([data-theme="light"]) .logo-play { fill: #58a6ff; }
}
html[data-theme="dark"] .logo-bg { fill: #1f3a5f; }
html[data-theme="dark"] .logo-play { fill: #58a6ff; }

.logo-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  max-width: 140px;
}

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

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.sidebar-nav {
  flex: none;
}

.sidebar-back {
  margin-bottom: 8px;
  border-left: 3px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  background: var(--accent-glow);
}

.sidebar-back:hover {
  background: var(--bg-surface);
}

.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: var(--text-muted);
  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: var(--bg-surface);
  color: var(--text-primary);
  border-left-color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  width: 100%;
}

.theme-toggle:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.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;
  filter: brightness(0) saturate(100%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .sidebar-footer__aap-logo {
    filter: none;
  }
}

html[data-theme="dark"] .sidebar-footer__aap-logo {
  filter: none;
}

.sidebar-footer__credit {
  margin: 0 0 12px;
  padding: 16px 12px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.sidebar-footer__credit a {
  color: var(--text-secondary);
  font-weight: 500;
}

.sidebar-footer__credit a:hover {
  color: var(--text-primary);
}

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

.sidebar-footer__link:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

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

.sidebar-footer__link--issue {
  color: #bf8700;
}

.sidebar-footer__link--issue:hover {
  color: #9a6700;
  background: var(--bg-surface);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .sidebar-footer__link--issue {
    color: #f0ab00;
  }
  html:not([data-theme="light"]) .sidebar-footer__link--issue:hover {
    color: #f5c451;
  }
}

html[data-theme="dark"] .sidebar-footer__link--issue {
  color: #f0ab00;
}
html[data-theme="dark"] .sidebar-footer__link--issue:hover {
  color: #f5c451;
}

/* 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: var(--text-primary);
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  max-width: 620px;
}

.hero__link {
  color: var(--accent);
  text-decoration: underline;
}

/* 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: var(--text-muted);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-empty {
  margin: -24px 0 32px;
  font-size: 14px;
  color: var(--text-muted);
}

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

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  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:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

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

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

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 48px;
}

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

.card-grid--featured {
  grid-template-columns: repeat(3, minmax(0, 260px));
}

/* Demo card — featured cards keep the full visual style */
.demo-card {
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.demo-card--featured {
  border-left: 3px solid var(--accent);
}

.demo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 0 0 2px var(--accent-glow);
}

html:not([data-theme="dark"]) .demo-card:hover {
  box-shadow: 0 12px 32px rgba(9, 105, 218, 0.18), 0 0 0 2px var(--accent-glow);
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .demo-card:hover {
    box-shadow: 0 12px 32px rgba(9, 105, 218, 0.18), 0 0 0 2px var(--accent-glow);
  }
}

.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--featured .demo-card__thumb {
  aspect-ratio: 16 / 4;
}

.demo-card__icon {
  font-size: 32px;
  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__body {
  padding: 12px 14px 14px;
}

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

.demo-card__category {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.demo-card__status--active {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-primary);
}

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

.demo-card__blurb {
  font-size: 12px;
  color: var(--text-secondary);
  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;
}

.demo-card--featured .demo-card__tags {
  display: none;
}

.tag {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

.demo-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.demo-card__author {
  font-style: italic;
  color: var(--text-muted);
}

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

/* ── Compact demo rows (non-featured "All demos" table) ────────── */
.demo-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.demo-table__header th {
  padding: 6px 14px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.demo-row {
  background: var(--bg-surface);
  transition: background 0.15s, box-shadow 0.15s;
  border-radius: 10px;
}

.demo-row:nth-child(even) {
  background: var(--bg-body);
}

.demo-row:hover {
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 1px var(--accent);
}

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

.demo-row td {
  padding: 10px 14px;
  vertical-align: middle;
  border: none;
}

.demo-row td:first-child {
  border-radius: 10px 0 0 10px;
  width: 44px;
  text-align: center;
}

.demo-row td:last-child {
  border-radius: 0 10px 10px 0;
}

.demo-row__icon {
  font-size: 22px;
  line-height: 1;
}

.demo-row__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-row__title a {
  color: inherit;
  text-decoration: none;
}

.demo-row__title a:hover {
  color: var(--accent);
}

.demo-row__blurb {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-row__category {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
  white-space: nowrap;
}

.demo-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.demo-row__tags .tag {
  font-size: 10px;
  padding: 2px 6px;
  border-width: 1px;
}

.demo-row__author {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}

/* ── Detail page body (markdown content) ─────────────────────── */
.detail-body {
  line-height: 1.7;
  color: var(--text-secondary);
}

/* 1 + 6 + 7: Styled tables with sticky headers and zebra-striping */
.detail-body table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 8px;
}

.detail-body table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-bottom: 2px solid var(--accent-dim);
}

.detail-body table td {
  padding: 10px 14px;
  text-align: left;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.detail-body table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.detail-body table tbody tr:hover td {
  background: var(--bg-surface-hover);
}

.detail-body table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.detail-body table a:hover {
  text-decoration: underline;
  color: var(--accent-dim);
}

/* 10: Playbook links as pill chips */
.detail-body table code {
  font-size: 12px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--code-text);
  white-space: nowrap;
}

/* Hide the h1 from markdown — the layout already renders the title */
.detail-body > h1:first-child {
  display: none;
}

/* 4: Lead paragraph — first visible <p> in detail-body is larger */
.detail-body > p:first-of-type {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  max-width: 720px;
  margin-bottom: 28px;
}

/* 8: Section spacing and dividers between h2 sections */
.detail-body h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.detail-body h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* 5: Prerequisites callout box */
.detail-body h2 + ul,
.detail-body h2 + ol {
  max-width: 720px;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.detail-body h2 + ul li,
.detail-body h2 + ol li {
  margin-bottom: 8px;
}

/* Special styling when heading is "Prerequisites" */
.detail-body .prereq-box {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-surface);
  padding: 16px 20px;
  max-width: 720px;
}

/* 9: Related demos section gets card-like rows */
.detail-body table:last-of-type tbody tr {
  transition: background 0.15s;
}

.detail-body table:last-of-type tbody tr:hover td {
  background: var(--bg-surface);
}

/* ── 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: var(--text-secondary);
  margin: 0 0 16px;
}

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

.detail-status--active {
  color: var(--accent);
}

.detail-one-liner {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  max-width: 680px;
}

.detail-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.detail-meta-bar {
  margin: 12px 0 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-meta-bar__author {
  font-style: italic;
}

.detail-special-thanks {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 40px;
  font-style: italic;
  color: var(--text-muted);
}

.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: var(--bg-surface);
  border: 1px solid var(--border);
}

.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: var(--text-primary);
}

.detail-section p {
  color: var(--text-secondary);
  max-width: 680px;
}

.detail-list {
  color: var(--text-secondary);
  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-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 var(--border);
}

.detail-table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-surface);
}

.detail-table td {
  color: var(--text-secondary);
}

.detail-table td a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.detail-table td a:hover {
  text-decoration: underline;
}

.detail-see-other {
  margin: 0 0 8px;
  max-width: 720px;
}
.detail-see-other a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}
.detail-see-other a:hover {
  text-decoration: underline;
}

.detail-back-to-all {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.detail-back-to-all a {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.detail-back-to-all a:hover {
  text-decoration: underline;
}

.detail-table code {
  font-size: 12px;
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

/* Video embed — responsive 16:9 iframe */
.detail-video {
  position: relative;
  width: 100%;
  max-width: 760px;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.detail-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.workflow-diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  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;
}

/* Edge label colors are applied post-render by JS in default.html.
   Do not add fill/color/background rules here — they fight inline !important. */

.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: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-surface-hover);
}

/* Detail page links */
.detail-section a,
.detail-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-section a:hover,
.detail-list a:hover {
  color: var(--accent-dim);
}

.detail-section code {
  font-size: 13px;
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

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

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

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

  .demo-row__tags,
  .demo-row__author {
    display: none;
  }
}
