:root {
  color-scheme: light dark;
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #101828;
  --color-text: #0f172a;
  --color-text-muted: #475467;
  --color-accent: #2563eb;
  --color-accent-muted: rgba(37, 99, 235, 0.1);
  --color-border: #d0d5dd;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --color-success: #16a34a;
  --color-muted-surface: #f0f4ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.container {
  width: min(1200px, 90vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  z-index: 10;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  font-size: 1.8rem;
}

.brand-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.site-menu a {
  font-weight: 500;
}

.site-menu a.active {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 1.5rem;
  height: 0.2rem;
  background: var(--color-text);
  display: block;
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
}

.nav-toggle-bar::before {
  top: -0.4rem;
}

.nav-toggle-bar::after {
  top: 0.4rem;
}

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0.5rem 0 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.2s ease;
}

.btn.primary {
  background: var(--color-accent);
  color: #fff;
}

.btn.ghost {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.hero-panel ul {
  padding-left: 1.25rem;
  margin: 0;
}

.panel-label {
  margin-top: 0;
  font-weight: 600;
  color: var(--color-text-muted);
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--color-surface);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.card-link {
  font-weight: 600;
}

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li::before {
  content: "✓";
  color: var(--color-accent);
  margin-right: 0.5rem;
}

.doc-links {
  display: grid;
  gap: 0.5rem;
  background: var(--color-accent-muted);
  padding: 1.5rem;
  border-radius: 1rem;
}

.doc-links a {
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  font-weight: 500;
}

.deploy-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.5rem;
}

pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
}

.hint {
  color: var(--color-text-muted);
}

.cta {
  text-align: center;
  background: var(--color-surface-alt);
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.8);
}

.site-footer {
  background: #0b1120;
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 0;
}

.site-footer a {
  color: #93c5fd;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 720px) {
  .site-menu {
    flex-direction: column;
    background: var(--color-surface);
    position: absolute;
    right: 1rem;
    top: 4.5rem;
    padding: 1rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    display: none;
  }

  .site-menu.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

.channel-section {
  padding-top: 3.5rem;
}

.channel-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.channel-actions {
  display: flex;
  gap: 0.75rem;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.channel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.channel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  background: var(--color-muted-surface);
}

.channel-title {
  margin: 0 0 0.2rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.channel-handle,
.channel-updated {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.channel-description {
  color: var(--color-text-muted);
  margin: 0.75rem 0;
}

.channel-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.channel-meta dt {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.channel-meta dd {
  margin: 0;
  color: var(--color-text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: var(--color-muted-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}

.stat-label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.stat-value {
  margin: 0.25rem 0 0;
  font-weight: 700;
  font-size: 1.4rem;
}

.video-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.video-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #fff;
}

.video-thumb {
  width: 100%;
  border-radius: 0.6rem;
  object-fit: cover;
  background: var(--color-muted-surface);
}

.video-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.video-meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.video-list-empty {
  margin: 0;
  color: var(--color-text-muted);
}

.span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .video-item {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }
}
