/* pindulabs.com/anki/ — documentation section styles.
   Layers on the site tokens (styles.css) plus shared prose.css/blog.css;
   everything here is section chrome: nav row, doc lists, figures, signup. */

/* ---------- Screenshot carousel (ported from readpindu home.css; the
   crossfade uses opacity, so slides skip the .shot dark-mode dimming) ---------- */
.carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.carousel-slides {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.carousel-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: rgba(0, 0, 0, 0.6);
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast);
  z-index: 2;
}
.carousel-arrow:hover { color: rgba(0, 0, 0, 0.9); }
.carousel-arrow svg { width: 24px; height: 48px; }
.carousel-arrow-left { left: calc(-40px - var(--space-1)); }
.carousel-arrow-right { right: calc(-40px - var(--space-1)); }
@media (max-width: 900px) {
  .carousel-arrow { display: none; }
}
.carousel-dots { display: flex; gap: var(--space-1); }
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background var(--transition-fast);
  padding: 0;
}
.carousel-dot:hover { background: rgba(0, 0, 0, 0.6); }
.carousel-dot.active { background: rgba(0, 0, 0, 0.8); }
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .carousel-dot { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.3); }
  html:not(.theme-light) .carousel-dot:hover { background: rgba(255, 255, 255, 0.6); }
  html:not(.theme-light) .carousel-dot.active { background: #FFFFFF; }
  html:not(.theme-light) .carousel-arrow { color: rgba(255, 255, 255, 0.6); }
  html:not(.theme-light) .carousel-arrow:hover { color: rgba(255, 255, 255, 0.9); }
}
html.theme-dark .carousel-dot { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.3); }
html.theme-dark .carousel-dot:hover { background: rgba(255, 255, 255, 0.6); }
html.theme-dark .carousel-dot.active { background: #FFFFFF; }
html.theme-dark .carousel-arrow { color: rgba(255, 255, 255, 0.6); }
html.theme-dark .carousel-arrow:hover { color: rgba(255, 255, 255, 0.9); }

.code-chip {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  letter-spacing: 0.06em;
  background: var(--overlay-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 10px;
  white-space: nowrap;
}

/* ---------- Landing CTA ---------- */
.anki-cta { margin: var(--space-3) 0; text-align: center; }
.anki-cta a {
  display: inline-block;
  font-weight: 600;
  color: var(--link);
  background: transparent;
  border: 1px solid var(--link);
  border-radius: var(--radius);
  padding: 8px 18px;
  text-decoration: none;
}
.anki-cta a:hover, .anki-cta a:focus-visible {
  color: #FFFFFF;
  background: var(--teal);
  border-color: var(--teal);
}

/* ---------- Section page frame ---------- */
.anki .subtitle {
  font-size: var(--fs-lg);
  color: var(--muted);
  margin-top: 0;
}

/* prose.css clears h2/h3 on both sides for the right-floated half figures;
   here the left-margin TOC is also a float, so a page whose first h2 follows
   the TOC would clear past its whole height. Clear only the figure side. */
.anki h2, .anki h3 { clear: right; }

.anki .anki-facts {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
}
.anki .anki-facts li {
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.anki .anki-facts li:last-child { border-bottom: 0; }
.anki .anki-doc { list-style: none; padding: 0; }
.anki .anki-doc li { margin-bottom: var(--space-1); }
.anki .anki-doc .desc { color: var(--muted); }
.anki figure { margin: var(--space-4) 0; }
.anki figcaption {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--space-1);
}

/* ---------- Section nav (shared partial: anki-nav.html) ---------- */
.anki-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  row-gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  margin: var(--space-3) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--hairline-soft);
}
.anki-nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.anki-nav a:hover, .anki-nav a:focus-visible { color: var(--text); }
.anki-nav a.root { color: var(--text); font-weight: 500; }
.anki-nav .sep { color: var(--muted); opacity: 0.5; }
.anki-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Subdued email capture: functional row, no CTA band */
.anki-signup { margin: var(--space-4) 0; }
.anki-signup label {
  display: block;
  margin-bottom: var(--space-1);
}
.anki-signup .row {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.anki-signup input[type="email"] {
  flex: 1;
  min-width: 200px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.anki-signup input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--teal);
}
.anki-signup button {
  font: inherit;
  font-weight: 600;
  color: var(--link);
  background: transparent;
  border: 1px solid var(--link);
  border-radius: var(--radius);
  padding: 8px 18px;
  cursor: pointer;
}
.anki-signup button:hover, .anki-signup button:focus-visible {
  color: #FFFFFF;
  background: var(--teal);
  border-color: var(--teal);
}
.anki-signup button:disabled { cursor: wait; opacity: 0.6; }
.anki-signup .form-status {
  display: none;
  margin: var(--space-1) 0 0;
  font-size: var(--fs-sm);
}
.anki-signup .form-status.show { display: block; }
.anki-signup .form-status.success { color: #8FAE8D; }
.anki-signup .form-status.error { color: #C85C5C; }
