/* ThemeKit docs — accent + chrome tuned to feel close to the library's own
   palette. Starlight exposes these CSS custom properties for theming. */
:root {
  --sl-color-accent-low: #1b2333;
  --sl-color-accent: #4f7cff;
  --sl-color-accent-high: #c7d6ff;

  --sl-color-text-accent: #6f97ff;

  /* Slightly rounded, product-doc feel for code + cards. */
  --sl-content-width: 50rem;
}

/* Light mode accents */
:root[data-theme='light'] {
  --sl-color-accent-low: #d8e3ff;
  --sl-color-accent: #2f5fe0;
  --sl-color-accent-high: #16224a;
  --sl-color-text-accent: #2f5fe0;
}

/* Hero banner logo: keep it crisp and not oversized in the header. */
.site-title img {
  max-height: 1.75rem;
  width: auto;
}

/* The hero banner is a wide (≈1.9:1) marketing image; Starlight's default puts it
   in the narrow 4fr column so it reads small. Give it the larger share and let it
   fill the column. */
@media (min-width: 50rem) {
  .hero {
    grid-template-columns: 4fr 6fr;
  }
}
.hero > img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Component gallery cards (used on the Components page). */
.tk-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.tk-gallery a {
  display: block;
  border: 1px solid var(--sl-color-gray-5);
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  background: var(--sl-color-bg-nav);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tk-gallery a:hover {
  border-color: var(--sl-color-accent);
  transform: translateY(-2px);
}
.tk-gallery img {
  display: block;
  width: 100%;
  /* Uniform tiles — every screenshot is letterboxed into the same box so rows
     line up cleanly regardless of the component's native aspect ratio. */
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--sl-color-gray-6);
  padding: 0.5rem;
}
.tk-gallery .tk-label {
  display: block;
  padding: 0.6rem 0.8rem;
  font-size: var(--sl-text-sm);
  font-weight: 600;
  color: var(--sl-color-white);
}

/* Striking showcase figures — full-bleed-ish, rounded, framed, never overflowing. */
.tk-shot {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  margin: 1.75rem auto;
  border: 1px solid var(--sl-color-gray-5);
  border-radius: 1rem;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.5);
  background: var(--sl-color-gray-6);
}
.tk-shot--sm {
  max-width: 640px;
}
figure.tk-figure {
  margin: 2rem 0;
}
figure.tk-figure figcaption {
  margin-top: 0.6rem;
  text-align: center;
  font-size: var(--sl-text-sm);
  color: var(--sl-color-gray-3);
}
/* Two-up showcase rows — exactly 2 per row (like the README), capped so the
   phone screenshots never blow up to full width. Collapses to 1 on narrow screens. */
.tk-shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 760px;
  margin: 1.75rem auto;
}
.tk-shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--sl-color-gray-5);
  border-radius: 0.75rem;
  background: var(--sl-color-gray-6);
}
@media (max-width: 640px) {
  .tk-shots {
    grid-template-columns: 1fr;
  }
}

/* Author attribution — landing line + site-wide footer. */
.tk-author {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: var(--sl-text-sm);
  color: var(--sl-color-gray-2);
}
.tk-author a {
  font-weight: 700;
  color: var(--sl-color-text-accent);
}
.tk-footer-credit {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sl-color-gray-6);
  font-size: var(--sl-text-xs);
  color: var(--sl-color-gray-3);
}
.tk-footer-credit a {
  font-weight: 600;
  color: var(--sl-color-text-accent);
}
