/* ── Hero image ─────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 2rem 0 0.5rem;
}

.hero-img {
  max-width: min(720px, 100%);
  height: auto;
  border-radius: 0.75rem;
}

/* Light/dark hero swap */
.hero-dark { display: none; }
.hero-light { display: inline; }

.dark .hero-dark { display: inline; }
.dark .hero-light { display: none; }

/* ── Experimental banner ─────────────────────────────────── */
.beta-banner {
  position: sticky;
  top: 0;
  z-index: 51;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  background: hsl(45 100% 94%);
  border-bottom: 1px solid hsl(45 80% 85%);
  color: hsl(var(--muted-foreground));
}

.beta-banner ~ header {
  top: 33px;
}

.beta-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1em 0.45em;
  border-radius: 4px;
  background: hsl(45 100% 50% / 0.2);
  color: hsl(40 90% 40%);
  vertical-align: middle;
  margin-right: 0.25em;
}

.dark .beta-banner {
  background: hsl(40 30% 12%);
  border-bottom-color: hsl(40 20% 20%);
}

.dark .beta-pill {
  color: hsl(45 100% 70%);
}

/* ── Logo dark mode — invert black SVG to white ─────────── */
.dark img[src*="logo"] {
  filter: invert(1);
}

/* ── Sidebar section chevrons — rotate on expand ────────── */
.sidebar-chevron {
  transition: transform 0.2s ease;
}

details.sidebar-section[open] > summary .sidebar-chevron {
  transform: rotate(90deg);
}

/* Sidebar hierarchy indentation */
details.sidebar-section > ul {
  margin-left: 0.75rem;
  padding-left: 1rem;
  border-left: 1px solid hsl(var(--border));
  margin-top: 0.125rem;
  margin-bottom: 0.25rem;
}

/* ── pymdownx.tabbed - alternate style ──────────────────── */
.tabbed-set {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  margin: 1em 0;
  border-radius: 0.375rem;
}

.tabbed-set > input {
  display: none;
}

.tabbed-labels {
  display: flex;
  width: 100%;
  overflow: auto;
  scrollbar-width: none;
  border-bottom: 1px solid hsl(var(--border));
}

.tabbed-labels > label {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5em 1.25em;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  user-select: none;
}

.tabbed-labels > label:hover {
  color: hsl(var(--foreground));
}

/* Active tab label — selectors up to 8 tabs */
.tabbed-set > input:nth-child(1):checked ~ .tabbed-labels > label:nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > label:nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > label:nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-labels > label:nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-labels > label:nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-labels > label:nth-child(6),
.tabbed-set > input:nth-child(7):checked ~ .tabbed-labels > label:nth-child(7),
.tabbed-set > input:nth-child(8):checked ~ .tabbed-labels > label:nth-child(8) {
  color: hsl(var(--foreground));
  border-bottom-color: hsl(var(--primary));
}

/* Override shadcn base.css: article .tabbed-set div.tabbed-content { display: none } */
article .tabbed-set div.tabbed-content {
  display: block !important;
  width: 100%;
}

article .tabbed-set div.tabbed-content > .tabbed-block {
  display: none;
  padding: 0.75em 0;
}

/* Show active tab content — selectors up to 8 tabs */
.tabbed-set > input:nth-child(1):checked ~ .tabbed-content > .tabbed-block:nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-content > .tabbed-block:nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-content > .tabbed-block:nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-content > .tabbed-block:nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-content > .tabbed-block:nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-content > .tabbed-block:nth-child(6),
.tabbed-set > input:nth-child(7):checked ~ .tabbed-content > .tabbed-block:nth-child(7),
.tabbed-set > input:nth-child(8):checked ~ .tabbed-content > .tabbed-block:nth-child(8) {
  display: block !important;
}

/* ── Card grid ────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

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

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card-grid a.card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--card-foreground);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card-grid a.card:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 4px oklch(0% 0 0 / 0.06);
}

.card-grid a.card .card-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.card-grid a.card .card-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.45;
}

.card-grid a.card.card-soon {
  opacity: 0.55;
  border-style: dashed;
  cursor: default;
}

.card-grid a.card.card-soon:hover {
  border-color: var(--border);
  box-shadow: none;
}

.card-grid .card-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.15em 0.5em;
  border-radius: 9999px;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  margin-left: 0.5em;
  vertical-align: middle;
}
