:root {
  --background: #ffffff;
  --foreground: #171717;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  color: var(--nb-fg);
  background: var(--nb-bg);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

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

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}


/* Neobrutalism theme (YouTube-red palette) */
:root {
  --nb-bg: #ffcece;
  --nb-fg: #111111;
  --nb-accent: #ff0000;
  --nb-accent-hover: #e60000;
  --nb-accent-press: #cc0000;
  --nb-card: #ffffff;
  --nb-border: #000000;
  --nb-shadow: 6px 6px 0 var(--nb-border);
}
@media (prefers-color-scheme: dark) {
  :root {
    --nb-bg: #ffcece;
    --nb-fg: #111111;
    --nb-card: #ffffff;
  }
}

/* Header */
.nb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 4px solid var(--nb-border);
  background: var(--nb-card);
  box-shadow: var(--nb-shadow);
}

.nb-brand {
  border: 3px solid var(--nb-border);
  background: #fff;
  color: var(--nb-fg);
  padding: 6px 10px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--nb-border);
}

.nb-brand:hover { background: #f5f5f5; }

.nb-nav {
  display: flex;
  gap: 12px;
  margin-left: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.nb-navlink {
  border: 3px solid var(--nb-border);
  background: var(--nb-bg);
  color: var(--nb-fg);
  padding: 6px 10px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--nb-border);
}
.nb-navlink:hover { background: #ffe5e5; }
.nb-navlink--active { background: var(--nb-accent); color: #fff; }
.nb-navlink--active:hover { background: var(--nb-accent-hover); }

.nb-nav .nb-brand {
  margin-left: 0;
}

.nb-nav .nb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nb-navlink--loading {
  pointer-events: none;
  opacity: 0.7;
}

.nb-navlink-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

.nb-credits {
  margin-left: auto;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
}

.nb-credits--loading {
  font-size: 12px;
  color: #666;
}


.nb-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--nb-border);
  background: var(--nb-bg);
  color: var(--nb-fg);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--nb-border);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nb-menu-icon {
  position: relative;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: background 0.2s ease;
}

.nb-menu-icon::before,
.nb-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}

.nb-menu-icon::before {
  top: -6px;
}

.nb-menu-icon::after {
  top: 6px;
}

.nb-menu-toggle[aria-expanded="true"] {
  background: var(--nb-accent);
  color: #fff;
}

.nb-menu-toggle[aria-expanded="true"] .nb-menu-icon {
  background: transparent;
}

.nb-menu-toggle[aria-expanded="true"] .nb-menu-icon::before {
  top: 0;
  transform: rotate(45deg);

}

.nb-menu-toggle[aria-expanded="true"] .nb-menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .nb-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .nb-menu-toggle {
    display: inline-flex;
  }

  .nb-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 12px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 10px;
    border: 3px solid var(--nb-border);
    border-radius: 12px;
    background: var(--nb-card);
    box-shadow: 4px 4px 0 var(--nb-border);
  }

  .nb-nav.nb-nav--open {
    display: flex;
  }

  .nb-navlink {
    display: block;
    width: 100%;
    text-align: center;
  }

  .nb-nav .nb-brand {
    display: block;
    width: 100%;
    text-align: center;
  }

  .nb-nav .nb-btn {
    width: 100%;
  }

}


/* Generic NB button */
.nb-btn {
  border: 3px solid var(--nb-border);
  border-radius: 8px;
  background: var(--nb-bg);
  color: var(--nb-fg);
  padding: 8px 12px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--nb-border);
  cursor: pointer;
}
.nb-btn:hover { background: #ffe5e5; }
.nb-btn--accent {
  background: var(--nb-accent);
  color: #fff;
}
.nb-btn--accent:hover { background: var(--nb-accent-hover); }

/* Home main helper */
.nb-main { padding: 24px; }
.nb-section {
  margin-top: 64px;
}

.nb-section:first-of-type {
  margin-top: 48px;
}

@media (max-width: 900px) {
  .nb-section {
    margin-top: 48px;
  }
}



/* Text helpers */
.nb-text { color: var(--nb-fg) !important; }
.nb-muted { color: #222 !important; }


/* Generic neobrutalist card */
.nb-card {
  border: 3px solid var(--nb-border);
  background: var(--nb-card);
  box-shadow: var(--nb-shadow);
  border-radius: 10px;
  padding: 16px;
}

/* Hero section */
.nb-hero { padding: 48px 0; }
.nb-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 900px) { .nb-hero-grid { grid-template-columns: 1fr; } }
.nb-kicker { display:inline-block; border:3px solid var(--nb-border); background:#fff; color:#111; padding:4px 8px; font-weight:800; box-shadow:3px 3px 0 var(--nb-border); margin-bottom:10px; }
.nb-hero-title { color: var(--nb-fg); font-size: clamp(28px, 5vw, 56px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
.nb-hero-sub { max-width: 60ch; color: #222; }
.nb-hero-ctas { display:flex; gap:12px; margin-top: 14px; flex-wrap: wrap; }
.nb-hero-preview { padding: 0; }
.nb-thumb-demo {
  aspect-ratio: 16/9;
  border-top: 3px solid var(--nb-border);
  border-left: 3px solid var(--nb-border);
  border-right: 3px solid var(--nb-border);
  border-bottom: 6px solid var(--nb-border);
  background: #000;
  overflow: hidden;
}

.nb-thumb-demo iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Features section */
.nb-features { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.nb-feature-title { font-weight: 800; margin-bottom: 6px; }
.nb-card-grid {
  display: grid;
  row-gap: 32px;
  column-gap: 24px;
}

@media (min-width: 768px) {
  .nb-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

.nb-card--feature {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.nb-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 3px solid var(--nb-border);
  border-radius: 8px;
  background: var(--nb-bg);
  color: var(--nb-fg);
  font-weight: 800;
  padding: 8px 12px;
  box-shadow: 4px 4px 0 var(--nb-border);
  width: fit-content;
  transition: transform 0.05s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}

.nb-card-cta:hover {
  background: #ffe5e5;
  transform: translateY(-1px);
  box-shadow: 5px 5px 0 var(--nb-border);
}

.nb-card-cta:focus-visible {
  outline: 3px dashed var(--nb-border);
  outline-offset: 4px;
}
.nb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  color: var(--nb-fg);
}

.nb-list li {
  position: relative;
  padding: 12px 18px 12px 48px;
  border: 2px solid var(--nb-border);
  border-radius: 10px;
  background: var(--nb-card);
  box-shadow: 3px 3px 0 var(--nb-border);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
}

.nb-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--nb-accent);
  box-shadow: 2px 2px 0 var(--nb-border);
}
@media (max-width: 600px) {
  .nb-list li {
    padding: 12px 16px 12px 40px;
  }

  .nb-list li::before {
    left: 16px;
  }
}



.nb-faq-card {
  border: 3px solid var(--nb-border);
  background: var(--nb-card);
  box-shadow: 6px 6px 0 var(--nb-border);
  border-radius: 12px;
  padding: 32px;
  display: grid;
  gap: 16px;
}

.nb-faq-card > h2 {
  margin-bottom: 4px;
}

.nb-faq-item {
  border: 2px solid var(--nb-border);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--nb-card);
  box-shadow: 3px 3px 0 var(--nb-border);
  color: var(--nb-fg);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.nb-faq-item:not([open]):hover {
  box-shadow: 4px 4px 0 var(--nb-border);
}

.nb-faq-item > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
}

.nb-faq-item > summary::-webkit-details-marker {
  display: none;
}

.nb-faq-item > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  font-weight: 800;
  transition: transform 0.2s ease;
}

.nb-faq-item[open] > summary::after {
  transform: rotate(45deg);
}

.nb-faq-item > p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}







/* Footer */
.nb-footer {
  margin-top: 24px;
  padding: 16px 18px;
  border-top: 4px solid var(--nb-border);
  background: var(--nb-card);
  box-shadow: var(--nb-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.nb-footer a {
  text-decoration: underline;
}


/* Timeline */
.nb-timeline { list-style: none; margin: 0; padding: 8px 0; position: relative; }
.nb-tl-item { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 8px 0; }
.nb-tl-item::before { content: ""; position: absolute; left: 15px; top: -8px; bottom: -8px; width: 4px; background: var(--nb-border); }
.nb-tl-item:first-child::before { top: 14px; }
.nb-tl-item:last-child::before { bottom: 22px; }
.nb-tl-node { width: 16px; height: 16px; border: 3px solid var(--nb-border); background: #fff; box-shadow: 3px 3px 0 var(--nb-border); border-radius: 50%; margin: 4px auto 0; position: relative; z-index: 1; }
.nb-tl--done .nb-tl-node { background: var(--nb-accent); }
.nb-tl-content p { margin-top: 2px; }
.nb-badge { display: inline-block; border: 2px solid var(--nb-border); background: #fff; padding: 1px 6px; font-weight: 800; box-shadow: 3px 3px 0 var(--nb-border); font-size: 12px; margin-left: 8px; }
.nb-badge--done { background: #ffe5e5; }

/* Error Boundary styles */
.error-boundary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 2rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin: 1rem;
}

.error-boundary__container {
  text-align: center;
  max-width: 500px;
}

.error-boundary__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-boundary__title {
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.error-boundary__message {
  color: #7f1d1d;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.error-boundary__error-id {
  color: #991b1b;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.error-boundary__error-id code {
  background: #fee2e2;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
}

.error-boundary__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.error-boundary__button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.error-boundary__button--primary {
  background: #dc2626;
  color: white;
  border: none;
}

.error-boundary__button--primary:hover {
  background: #b91c1c;
}

.error-boundary__button--secondary {
  background: white;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.error-boundary__button--secondary:hover {
  background: #fef2f2;
}

.error-boundary__details {
  text-align: left;
  margin-top: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.error-boundary__details summary {
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.error-boundary__stack,
.error-boundary__component-stack {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  overflow-x: auto;
  margin: 0.5rem 0;
  white-space: pre-wrap;
}
