@font-face {
  font-family: "Nunito";
  src: url("/assets/nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --stage-top: #1e2456;
  --stage-bottom: #0c0e21;
  --bg: #f6f7fc;
  --surface: #ffffff;
  --ink: #1b1f3b;
  --ink-muted: #545b85;
  --line: #e1e4f2;
  --link: #5b3fe0;
  --link-hover: #4f34c0;
  --callout-bg: #efebff;
  --callout-line: #d9cffe;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e21;
    --surface: #151937;
    --ink: #e8ecff;
    --ink-muted: #a6afdd;
    --line: #262b52;
    --link: #a48bff;
    --link-hover: #c2b2ff;
    --callout-bg: #1b1d45;
    --callout-line: #342f7a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--surface); padding: 0.5rem 0.9rem; border-radius: 8px;
}
.skip:focus { left: 0.75rem; z-index: 10; }

/* Header uses the in-app stage gradient in both themes */
.site-header {
  background: linear-gradient(180deg, var(--stage-top), var(--stage-bottom));
  color: #fff;
}
.site-header .inner {
  max-width: 46rem; margin: 0 auto; padding: 0.9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem;
}
.brand:hover { color: #fff; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; gap: 1.1rem; font-weight: 700; font-size: 0.975rem; }
.site-nav a { color: #c9d0f5; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: #a48bff; text-decoration-thickness: 2px; }

main { max-width: 46rem; margin: 0 auto; padding: 2.25rem 1.25rem 3rem; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); font-weight: 900; margin: 0 0 0.35rem; }
h2 { font-size: 1.35rem; font-weight: 800; margin: 2.5rem 0 0.6rem; padding-top: 0.25rem; }
h3 { font-size: 1.08rem; font-weight: 800; margin: 1.6rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--ink-muted); }
strong { font-weight: 800; }

.meta { color: var(--ink-muted); margin-bottom: 1.75rem; }

.callout {
  background: var(--callout-bg);
  border: 1px solid var(--callout-line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 0.35rem;
  margin: 1.5rem 0 1rem;
}
.callout h2 { margin-top: 0; font-size: 1.15rem; }

.toc {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.25rem; margin: 0 0 1rem; background: var(--surface);
}
.toc summary { font-weight: 800; cursor: pointer; }
.toc ol { margin: 0.7rem 0 0.25rem; padding-left: 1.3rem; columns: 2 14rem; column-gap: 2rem; }
.toc li { break-inside: avoid; font-size: 0.975rem; }

.table-wrap { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 30rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.95rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 800; font-size: 0.9rem; color: var(--ink-muted); }
td:first-child { font-weight: 800; }

.path {
  display: inline; font-weight: 800;
  background: var(--callout-bg); border-radius: 6px; padding: 0.05em 0.25em;
}

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 0.85rem 1.1rem; margin-bottom: 0.7rem;
}
.faq summary { font-weight: 800; cursor: pointer; }
.faq details[open] summary { margin-bottom: 0.5rem; }
.faq details > :last-child { margin-bottom: 0.25rem; }

.contact-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.1rem 1.25rem; margin: 1rem 0;
}
.contact-card p:last-child { margin-bottom: 0; }

/* Home */
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero img { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 10px 30px rgba(79, 52, 192, 0.35); }
.hero h1 { margin-top: 1.1rem; }
.hero p { color: var(--ink-muted); font-size: 1.15rem; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.9rem; margin-top: 2rem; }
.link-card {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.1rem 1.25rem;
}
.link-card:hover { color: var(--ink); border-color: var(--link); }
.link-card strong { display: block; color: var(--link); font-size: 1.08rem; }
.link-card span { color: var(--ink-muted); font-size: 0.975rem; }

.store-button {
  display: inline-block; margin-top: 0.4rem; padding: 0.8rem 1.4rem;
  background: #000; color: #fff; border-radius: 12px;
  font-weight: 800; text-decoration: none;
}
.store-button:hover { color: #fff; background: #1b1f3b; }
@media (prefers-color-scheme: dark) {
  .store-button { background: #fff; color: #000; }
  .store-button:hover { color: #000; background: #e8ecff; }
}
.hero .store-note { font-size: 0.95rem; margin-top: 0.8rem; }
.features ul { padding-left: 1.2rem; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .inner {
  max-width: 46rem; margin: 0 auto; padding: 1.25rem;
  color: var(--ink-muted); font-size: 0.925rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; justify-content: space-between;
}
.site-footer nav { display: flex; gap: 1.1rem; }

@media (max-width: 36rem) {
  /* Stack the providers table so no column is cut off on phones */
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td { padding: 0; border: 0; }
  td:first-child { margin-bottom: 0.2rem; }
}

@media (max-width: 30rem) {
  .brand span { display: none; }
  body { font-size: 1rem; }
}
