:root {
  --p-bg: #0B0F1A;
  --p-surface: #131A2B;
  --p-text: #E6E9F2;
  --p-muted: #9AA4BF;
  --p-primary: #7C5CFF;
  --p-accent: #22D3EE;
  --p-btn: #6A4BFF;
  --p-btn-text: #ffffff;
  --p-line: rgba(230, 233, 242, 0.12);
  --p-glow: rgba(124, 92, 255, 0.35);
  --p-radius-sm: 12px;
  --p-header: 4.25rem;
  --p-max: 46rem;
  --p-pad: clamp(1.25rem, 4vw, 2rem);
  --p-font: "Inter", sans-serif;
  --p-display: "Space Grotesk", "Inter", sans-serif;
  --p-mono: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="light"] {
  --p-bg: #F4F6FB;
  --p-surface: #ffffff;
  --p-text: #141824;
  --p-muted: #3E4860;
  --p-primary: #5B3FD4;
  --p-accent: #0E7490;
  --p-btn: #5B3FD4;
  --p-line: rgba(20, 24, 36, 0.12);
  --p-glow: rgba(91, 63, 212, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100%;
  font-family: var(--p-font);
  color: var(--p-text);
  background: var(--p-bg);
  line-height: 1.6;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: var(--p-pad);
  top: 0.65rem;
  z-index: 80;
  transform: translateY(-160%);
  background: var(--p-btn);
  color: var(--p-btn-text);
  padding: 0.55rem 0.85rem;
  border-radius: var(--p-radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { transform: none; }

.wrap {
  width: min(var(--p-max), calc(100% - 2 * var(--p-pad)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--p-header);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--p-bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--p-line);
}

.header-inner,
.footer-inner {
  width: min(70rem, calc(100% - 2 * var(--p-pad)));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--p-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.04em;
  color: var(--p-text);
  text-decoration: none;
}

a.logo img {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: block;
}

.tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--p-radius-sm);
  border: 1px solid var(--p-line);
  background: transparent;
  color: var(--p-text);
  cursor: pointer;
}

.icon-btn .icon-moon { display: none; }
html[data-theme="light"] .icon-btn .icon-sun { display: none; }
html[data-theme="light"] .icon-btn .icon-moon { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--p-radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--p-btn); color: var(--p-btn-text); }

:focus-visible {
  outline: 2px solid var(--p-accent);
  outline-offset: 3px;
}

.kicker {
  font-family: var(--p-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--p-accent);
}

.doc {
  padding-top: clamp(2.2rem, 6vh, 3.6rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
  display: grid;
  gap: 1.15rem;
}

h1 {
  font-family: var(--p-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 1rem + 3.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.lede { color: var(--p-muted); font-size: 1.05rem; }

.doc h2 {
  font-family: var(--p-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 0.8rem;
}

.doc p,
.doc li { color: var(--p-text); }

.doc ul,
.doc ol {
  display: grid;
  gap: 0.4rem;
  padding-left: 1.15rem;
}

.doc a { color: var(--p-accent); }

.doc section { display: grid; gap: 0.55rem; }

.updated {
  font-family: var(--p-mono);
  font-size: 0.78rem;
  color: var(--p-muted);
}

.store-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  padding: 0;
}

.store-list li {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius-sm);
}

.store-list p { margin: 0; }

.store-name {
  font-family: var(--p-mono);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--p-line);
  padding-block: 1.25rem 1.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem 1.2rem;
  color: var(--p-muted);
  font-size: 0.92rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.legal-links a {
  color: var(--p-text);
  text-decoration: none;
}

.legal-links a[aria-current="page"] { color: var(--p-accent); }

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--p-glow);
  }
  .legal-links a:hover { text-decoration: underline; }
}
