:root,
[data-theme='dark'] {
  color-scheme: dark;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: #e8e8f0;
  --text-muted: color-mix(in srgb, #e8e8f0 72%, transparent);
  --bg: #15161e;
  --surface: #1c1d28;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6fa8dc;
  --accent-hover: #8bbce8;
  --max-width: 960px;
}

[data-theme='light'] {
  color-scheme: light;
  --text: #1a1b26;
  --text-muted: color-mix(in srgb, #1a1b26 68%, transparent);
  --bg: #f4f5f9;
  --surface: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #3d7cb8;
  --accent-hover: #2f6aa3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-muted);
}

.site-nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle__icon {
  position: absolute;
  display: flex;
}

.theme-toggle__icon--sun {
  opacity: 0;
}

.theme-toggle__icon--moon {
  opacity: 1;
}

.theme-toggle[data-theme='light'] .theme-toggle__icon--sun {
  opacity: 1;
}

.theme-toggle[data-theme='light'] .theme-toggle__icon--moon {
  opacity: 0;
}

main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
}

.hero-icon {
  border-radius: 20px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto;
  max-width: 36ch;
  color: var(--text-muted);
}

.chrome-store-badge {
  display: block;
  margin: 1.25rem auto 0;
  line-height: 0;
  text-decoration: none;
}

.chrome-store-badge img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.button:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--text);
}

.button--primary {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

section {
  scroll-margin-top: 4rem;
  margin-bottom: 3rem;
}

section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

section h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

section p,
section li {
  color: var(--text-muted);
}

section ul,
section ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

section li + li {
  margin-top: 0.35rem;
}

code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.card {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
}

.screenshot {
  margin: 1.25rem 0 2rem;
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: zoom-in;
}

.screenshot figcaption {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.screenshot-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}

.screenshot-grid .screenshot {
  margin: 0;
}

.screenshot-grid .screenshot img {
  border-radius: 8px;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 14, 0.78);
  backdrop-filter: blur(10px);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: min(96vw, 1440px);
  max-height: 92vh;
  transform: scale(0.97);
  transition: transform 0.22s ease;
}

.lightbox.is-open .lightbox__dialog {
  transform: scale(1);
}

.lightbox__stage {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.lightbox__frame {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox__nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, white 14%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, #15161e 78%, transparent);
  color: #e8e8f0;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.lightbox__nav:hover {
  background: color-mix(in srgb, #15161e 92%, transparent);
  border-color: color-mix(in srgb, white 28%, transparent);
  transform: scale(1.04);
}

.lightbox__nav:active {
  transform: scale(0.98);
}

.lightbox__nav:focus-visible {
  outline: 2px solid #6fa8dc;
  outline-offset: 2px;
}

.lightbox__nav[hidden] {
  display: none;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 4.5rem);
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, white 12%, transparent);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition: opacity 0.15s ease;
}

.lightbox__image.is-changing {
  opacity: 0.35;
}

.lightbox__counter {
  margin: 0;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, white 52%, transparent);
  text-align: center;
}

.lightbox__caption {
  margin: 0;
  max-width: 48rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, white 78%, transparent);
  text-align: center;
  line-height: 1.5;
}

.lightbox__caption[hidden] {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, white 14%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, #15161e 82%, transparent);
  color: #e8e8f0;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lightbox__close:hover {
  background: color-mix(in srgb, #15161e 92%, transparent);
  border-color: color-mix(in srgb, white 28%, transparent);
}

.lightbox__close:focus-visible {
  outline: 2px solid #6fa8dc;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .lightbox {
    padding: 0.75rem;
  }

  .lightbox__close {
    top: 0.35rem;
    right: 0.35rem;
  }

  .lightbox__stage {
    gap: 0.35rem;
  }

  .lightbox__nav {
    width: 2.35rem;
    height: 2.35rem;
  }

  .lightbox__image {
    border-radius: 10px;
    max-height: calc(92vh - 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox__dialog,
  .lightbox__image,
  .lightbox__nav {
    transition: none;
  }
}

kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font: 0.85em ui-monospace, 'Cascadia Code', monospace;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border: 1px solid var(--border);
  color: var(--text);
}

.privacy-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer p {
  margin: 0.25rem 0;
}

@media (min-width: 720px) {
  .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .site-header__end {
    width: 100%;
    justify-content: space-between;
  }

  main {
    padding: 2rem 1rem 3rem;
  }

  .site-footer {
    padding: 1.25rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .hero p {
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    text-align: center;
  }
}
