/* Doc samples — same design tokens as the main site, the newsletter
   samples, and the blog samples. Scoped under .samples so it never bleeds
   into index.html. */

:root {
  --bg: #08090a;
  --bg-elev: #0d0e10;
  --bg-card: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --fg: #e6e7e9;
  --fg-muted: #9aa0a6;
  --fg-subtle: #6b7075;
  --accent-1: #96c7f2;
  --accent-2: #00254d;
  --accent-3: #1d4f86;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

.samples {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: -0.005em;
  background-image: radial-gradient(
      1200px 600px at 50% -10%,
      rgba(150, 199, 242, 0.16),
      transparent 70%
    ),
    radial-gradient(
      900px 500px at 80% 10%,
      rgba(0, 37, 77, 0.55),
      transparent 70%
    );
  background-repeat: no-repeat;
}

/* ----- Top bar ----- */
.samples .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
}

.samples .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.samples .brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(
    135deg,
    var(--accent-1) 0%,
    var(--accent-2) 100%
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.samples .brand-name {
  font-weight: 500;
  color: var(--fg);
}

.samples .topbar-meta {
  color: var(--fg-subtle);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ----- Layout shell ----- */
.samples .shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 32px 64px;
}

@media (max-width: 900px) {
  .samples .shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 8px 20px 48px;
  }
}

/* ----- Sidebar ----- */
.samples .sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 48px);
}

.samples .sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}

.samples .sidebar-title {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.samples .sidebar-sub {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0;
}

.samples .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.samples .nav::-webkit-scrollbar {
  width: 6px;
}

.samples .nav::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.samples .nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.samples .nav-item:hover,
.samples .nav-item:focus-visible {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
  outline: none;
}

.samples .nav-item.is-active {
  border-color: var(--accent-1);
  background: rgba(150, 199, 242, 0.08);
  box-shadow: 0 0 0 1px var(--accent-1) inset;
}

.samples .nav-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.samples .nav-venue {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 999px;
}

.samples .nav-item.is-active .nav-venue {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(150, 199, 242, 0.12);
}

.samples .nav-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.35;
  letter-spacing: -0.005em;
}

/* ----- Detail pane ----- */
.samples .pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.samples .detail-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
}

.samples .detail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--fg-subtle);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.samples .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.025);
}

.samples .pill.is-brand {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(150, 199, 242, 0.1);
}

.samples .detail-subject {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 60%,
    var(--accent-1) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.samples .detail-live {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  margin: 12px 0 0;
}
.samples .detail-live a {
  color: var(--accent-1);
  text-decoration: none;
  border-bottom: 1px solid rgba(150, 199, 242, 0.4);
  padding-bottom: 1px;
}
.samples .detail-live a:hover {
  border-bottom-color: var(--accent-1);
}
.samples .detail-blurb {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Blog stage: a tall framed canvas on a dark page. Blog content is light-on-dark,
   ~760px wide, so we frame it with generous whitespace on each side. */
.samples .stage {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  background: #ffffff;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.samples .stage-frame {
  display: block;
  width: 100%;
  height: clamp(960px, 90vh, 1600px);
  border: 0;
  background: #ffffff;
}

/* ----- Empty / error state ----- */
.samples .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 64px 24px;
  text-align: center;
  color: var(--fg-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg, 16px);
}

.samples .empty[hidden] {
  display: none;
}

.samples .empty strong {
  color: var(--fg);
  font-weight: 500;
}

/* ----- Footer ----- */
.samples .foot {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 32px 48px;
  color: var(--fg-subtle);
  font-size: 12px;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.samples .foot a {
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}

.samples .foot a:hover,
.samples .foot a:focus-visible {
  color: var(--fg);
  border-color: var(--border-strong);
}
/* ----- Mobile (≤600px) ----- */
@media (max-width: 600px) {
  .samples .brand,
  .samples .brand-name,
  .samples .topbar-meta {
    white-space: nowrap;
  }

  .samples .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 16px;
  }
  .samples .topbar-meta {
    font-size: 11px;
  }

  .samples .shell {
    padding: 8px 16px 48px;
    gap: 20px;
  }

  /* Disable the sticky sidebar in the stacked mobile layout — it
     doesn't help once the sidebar renders above the pane anyway, and
     it locks the nav to a tiny viewport when there are many entries. */
  .samples .sidebar {
    position: static;
    max-height: none;
  }
  .samples .nav {
    max-height: 280px;
    overflow-y: auto;
  }
  .samples .nav-item {
    padding: 10px 12px;
  }

  .samples .detail-head {
    padding: 18px;
  }
  .samples .detail-subject {
    font-size: 22px;
  }
  .samples .detail-blurb {
    font-size: 14px;
  }

  /* Shrink the stage so the iframe isn't dominating a phone screen
     before JS resizes it; the JS still resizes up to fit content. */
  .samples .stage-frame {
    height: 720px;
  }
  .samples .stage {
    border-radius: 10px;
  }

  .samples .empty {
    padding: 40px 18px;
  }

  .samples .foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: center;
    padding: 16px 12px;
  }
  .samples .foot a {
    align-self: center;
  }
}

@media (max-width: 380px) {
  .samples .brand-name {
    font-size: 12px;
  }
  .samples .stage-frame {
    height: 560px;
  }
}
