@import url("theme.css");

html {
  scroll-padding-top: 84px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
}

/* The hero glow reaches past the edge. clip (not hidden) makes no scroll box. */
.is-landing > main {
  overflow-x: clip;
}

a {
  color: var(--accent-2);
}

img {
  max-width: 100%;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.logo img {
  border-radius: 8px;
}

.crumb {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.top-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-links a {
  padding: 6px 11px;
  border-radius: 9px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.top-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.theme-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  cursor: pointer;
  color: var(--text);
}

.theme-btn:hover {
  color: var(--accent);
}

/* ---------- buttons ---------- */

.btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.btn.lg {
  min-height: 50px;
  padding: 0 24px;
  font-size: 1rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn .ver {
  font-weight: 500;
  opacity: 0.72;
}

/* ---------- landing ---------- */

.hero {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -60px -10% auto 30%;
  height: 520px;
  background:
    radial-gradient(closest-side, rgba(var(--accent-2-rgb), 0.18), transparent),
    radial-gradient(closest-side at 30% 60%, rgba(var(--accent-rgb), 0.14), transparent);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-badge .pill {
  font-size: 0.66rem;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.5rem, 5.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero .sub {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cta-note {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.hero-shot {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
}

.hero-shot img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.providers-strip {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.providers-strip span.label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 6px;
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-weight: 650;
  font-size: 0.9rem;
}

.provider-chip small {
  color: var(--text-muted);
  font-weight: 500;
}

.provider-chip .brand-logo {
  width: 18px;
  height: 18px;
  color: var(--text);
}

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}

.section-head h2 {
  margin: 10px 0 10px;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.04rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition:
    border-color 0.2s ease,
    transform 0.25s var(--ease);
}

.feature:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
}

.feature .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 14px;
}

.feature .ico svg {
  width: 20px;
  height: 20px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.shots figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-align: center;
}

.how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.how .card-step {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.how .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--accent-ink);
  font-weight: 800;
  margin-bottom: 12px;
}

.how h3 {
  margin: 0 0 6px;
}

.how p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.final-cta {
  margin: 0 20px 72px;
}

.final-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px;
  border-radius: 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(var(--accent-2-rgb), 0.16), transparent 60%),
    radial-gradient(ellipse 60% 120% at 0% 100%, rgba(var(--accent-rgb), 0.12), transparent 60%),
    var(--bg-card);
  text-align: center;
}

.final-cta h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.035em;
}

.final-cta p {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.final-cta .cta {
  justify-content: center;
}

/* ---------- docs ---------- */

.docs {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 40px;
}

.docs-nav,
.toc {
  position: sticky;
  top: 60px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 28px 0;
}

.nav-group {
  margin-bottom: 22px;
}

.nav-group p,
.toc p {
  margin: 0 0 8px;
  padding: 0 12px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav-group ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-group a {
  position: relative;
  display: block;
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav-group a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-group a[aria-current="page"] {
  color: var(--text);
  font-weight: 650;
  background: var(--bg-card);
}

.toc a {
  display: block;
  padding: 4px 0;
  color: var(--text-faint);
  text-decoration: none;
  font-size: 0.84rem;
}

.toc a:hover {
  color: var(--text);
}

.toc a.is-active {
  color: var(--text);
  font-weight: 600;
}

.nav-toggle {
  display: none;
}

.docs-main {
  min-width: 0;
  padding: 40px 0 64px;
}

/* ---------- prose ---------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.7;
}

.prose h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.prose .lead {
  margin: 0 0 28px;
  font-size: 1.12rem;
  color: var(--text-muted);
}

.prose h2 {
  position: relative;
  margin: 44px 0 12px;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.prose h2 .anchor {
  position: absolute;
  left: -22px;
  color: var(--text-faint);
  text-decoration: none;
  opacity: 0;
}

.prose h2:hover .anchor {
  opacity: 1;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 1.1rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 14px;
}

.prose li {
  margin: 4px 0;
}

.prose li::marker {
  color: var(--text-faint);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.prose pre {
  position: relative;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  overflow-x: auto;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.84rem;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.prose pre:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.copy-btn:hover {
  color: var(--accent);
}

.prose table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.prose img.shot {
  display: block;
  margin: 8px auto 6px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.prose figure {
  margin: 20px 0 24px;
}

.prose figcaption {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.callout {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-title {
  margin: 0 0 4px !important;
  font-weight: 700;
}

.callout.tip {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: color-mix(in srgb, var(--bg-card) 92%, rgb(var(--accent-rgb)));
}

.callout.tip .callout-title {
  color: var(--accent);
}

.callout.warn {
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}

.callout.warn .callout-title {
  color: var(--warn);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0 !important;
}

.steps > li {
  position: relative;
  counter-increment: step;
  margin: 0 0 18px !important;
  padding-left: 44px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700;
  font-size: 0.84rem;
}

.steps > li > strong:first-child {
  font-weight: 700;
}

.tabs [role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}

.tabs [role="tab"] {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
}

.tabs [role="tab"][aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.tabs [role="tabpanel"][hidden] {
  display: none;
}

.dl-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background:
    radial-gradient(ellipse 70% 120% at 100% 0%, rgba(var(--accent-2-rgb), 0.1), transparent 60%),
    var(--bg-card);
}

.dl-card .dl-copy {
  flex: 1;
  min-width: 200px;
}

.dl-card strong {
  display: block;
}

.dl-card small {
  color: var(--text-muted);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.provider-card {
  display: block;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
}

.provider-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.provider-card strong {
  display: block;
  font-size: 1rem;
}

.provider-card span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.diagram {
  margin: 8px 0 22px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow-x: auto;
}

.diagram svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.diagram text {
  font-family: var(--font);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.prev-next a {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.prev-next a:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.prev-next a.next {
  text-align: right;
  grid-column: 2;
}

.prev-next small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.edit {
  margin-top: 20px;
  font-size: 0.84rem;
}

.edit a {
  color: var(--text-faint);
}

.status-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: var(--accent-dim);
  font-weight: 600;
}

.status-box .status-copy {
  flex: 1;
  min-width: 220px;
}

.status-box strong {
  display: block;
  color: var(--accent);
}

.status-box small {
  color: var(--text-muted);
  font-weight: 500;
}

/* Installed, but the published build is newer. */
.status-box.update {
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
}

.status-box.update strong {
  color: var(--warn);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-faint);
}

.site-footer-inner span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.not-found {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .docs {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .features,
  .shots,
  .how {
    grid-template-columns: 1fr;
  }

  .shots figure {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 820px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    top: 60px;
    z-index: 20;
    margin: 0 -16px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
  }

  .nav-toggle strong {
    color: var(--text);
  }

  .nav-toggle svg {
    margin-left: auto;
  }

  .docs-nav {
    display: none;
    position: static;
    max-height: none;
    padding: 16px 0 4px;
    border-bottom: 1px solid var(--border);
  }

  .docs-nav.is-open {
    display: block;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .top-links a:not(:first-child):not(:last-of-type) {
    display: none;
  }

  .crumb {
    display: none;
  }

  .prose h2 .anchor {
    display: none;
  }
}
