/* Anamnema showcase: mobile first, full-width bands, light and dark. */
:root {
  --bg: #ffffff;
  --bg-alt: #f3f5f9;
  --fg: #172033;
  --muted: #586379;
  --line: #e1e6ef;
  --card: #ffffff;
  --accent: #3b6df0;
  --accent-2: #19b3a3;
  --accent-fg: #ffffff;
  --box: #fff7e6;
  --box-line: #f0c56b;
  --hero-bg: #0f1420;
  --hero-fg: #eef2fa;
  --hero-muted: #aab4c8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --radius: 14px;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --bg-alt: #151c2b;
    --fg: #e6ebf5;
    --muted: #a3aec4;
    --line: #26304a;
    --card: #1a2233;
    --accent: #7c9dff;
    --accent-2: #4fd6c6;
    --accent-fg: #0b1020;
    --box: #2a2414;
    --box-line: #8a6d2a;
    --hero-bg: #0a0e17;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 6.5vw, 3.6rem); margin: .3rem 0 1rem; }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); margin: 0 0 .8rem; }
p { margin: 0 0 1rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--hero-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--hero-fg);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 3.6rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -.01em; }
.mark { width: 1.6rem; height: 1.6rem; color: var(--accent-2); }
.topbar nav ul { list-style: none; margin: 0; padding: 0; }
.topbar nav a { color: var(--hero-fg); text-decoration: none; font-weight: 550; opacity: .85; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { opacity: 1; }
.topbar nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-2); }
.nav-wide { display: none; }
.nav-narrow { position: static; }
.nav-narrow summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.nav-narrow summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 1rem; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; }
.burger::after { top: 5px; }
.nav-narrow[open] .burger { background: transparent; }
.nav-narrow[open] .burger::before { top: 0; transform: rotate(45deg); }
.nav-narrow[open] .burger::after { top: 0; transform: rotate(-45deg); }
.nav-narrow nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--hero-bg); border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
}
.nav-narrow nav ul { padding: .5rem var(--gutter) 1rem; }
.nav-narrow nav a { display: block; padding: .85rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1.1rem; }
.nav-narrow nav li:last-child a { border-bottom: 0; }
@media (min-width: 60rem) {
  .nav-wide { display: block; }
  .nav-wide ul { display: flex; gap: 1.6rem; }
  .nav-wide a { padding: .4rem 0; }
  .nav-narrow { display: none; }
}

/* Hero */
.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(59, 109, 240, .35), transparent 60%),
    radial-gradient(40rem 24rem at -10% 110%, rgba(25, 179, 163, .25), transparent 60%),
    var(--hero-bg);
  color: var(--hero-fg);
  padding: clamp(2.2rem, 7vw, 5rem) 0 clamp(2.2rem, 6vw, 4rem);
}
.hero-text { max-width: 46rem; }
.eyebrow {
  display: inline-block; margin: 0; padding: .25rem .7rem; border-radius: .8rem;
  background: rgba(79, 214, 198, .12); color: #7fe3d7; font-size: .85rem; font-weight: 650; letter-spacing: .02em;
}
.lede { color: var(--hero-muted); font-size: clamp(1.05rem, 2.4vw, 1.2rem); }
.lede p:first-child { color: var(--hero-fg); }
.lede strong { color: var(--hero-fg); }
.lede a:not(.buttons a) { color: #9db7ff; }
.hero-img {
  display: block; width: 100%; margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
@media (max-width: 40rem) {
  .hero-home .hero-img {
    width: calc(100% + 2 * var(--gutter)); max-width: none; margin-left: calc(-1 * var(--gutter));
    border-radius: 0;
  }
}

/* Buttons and status */
.buttons { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0; }
.buttons a {
  flex: 1 1 auto; text-align: center; min-height: 2.9rem; display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.25rem; border-radius: 999px; text-decoration: none; font-weight: 650;
  border: 1px solid rgba(255, 255, 255, .25); color: var(--hero-fg);
  transition: transform .15s ease, background-color .15s ease;
}
.buttons a:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
.buttons a:hover { transform: translateY(-1px); background-color: rgba(255, 255, 255, .08); }
.buttons a:first-child:hover { background: #2f5fe0; }
@media (min-width: 40rem) { .buttons a { flex: 0 0 auto; } }
.status {
  font-size: .95rem; padding: .8rem 1rem; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
}
.status strong::before {
  content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .5rem; border-radius: 50%;
  background: #f5b942; box-shadow: 0 0 0 4px rgba(245, 185, 66, .2); vertical-align: .08em;
}

/* Flow overview (How it works) */
.flow { margin: 2rem 0 0; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; counter-reset: none; }
@media (min-width: 46rem) { .flow ol { grid-template-columns: repeat(4, 1fr); } }
.flow a {
  display: flex; align-items: center; gap: .65rem; height: 100%; padding: .75rem .85rem;
  border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  color: var(--hero-fg); text-decoration: none; font-weight: 600; font-size: .95rem; line-height: 1.3;
}
.flow a:hover { background: rgba(255, 255, 255, .1); }
.flow .letter, .step-letter {
  flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800;
}
.flow figcaption { margin-top: .9rem; color: var(--hero-muted); font-size: .95rem; }
.flow figcaption::before { content: "↻  "; color: var(--accent-2); }

/* Bands */
.band { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.band:nth-of-type(odd) { background: var(--bg-alt); }
.prose { max-width: 46rem; }
.prose.box {
  background: var(--box); border: 1px solid var(--box-line); border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2rem); max-width: 52rem;
}
@media (min-width: 60rem) {
  .band-prose .prose {
    max-width: none; display: grid; grid-template-columns: minmax(16rem, 1fr) 2fr; column-gap: clamp(2rem, 5vw, 4.5rem);
  }
  .band-prose .prose > h2 { grid-column: 1; grid-row: 1 / span 30; align-self: start; position: sticky; top: 5rem; }
  .band-prose .prose > * { grid-column: 2; }
  .band-prose .prose > table { grid-column: 1 / -1; }
  .band-prose .prose > table ~ * { grid-column: 2; }
}
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
pre {
  background: var(--hero-bg); color: #dfe6f3; padding: 1rem; overflow-x: auto; border-radius: 12px;
  font-size: .85rem; line-height: 1.5;
}
code { font-size: .92em; overflow-wrap: anywhere; }
pre code { overflow-wrap: normal; }

/* Tables become cards */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.5rem 0; }
table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
table tbody, table tr { display: grid; gap: .8rem; }
table td {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
table td::before {
  content: attr(data-label); display: block; margin-bottom: .4rem;
  font-size: .8rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--accent);
}
@media (min-width: 46rem) {
  .prose:has(table) { max-width: none; }
  .prose:has(table) > :not(table) { max-width: 46rem; }
  table tr { grid-template-columns: repeat(3, 1fr); }
}

/* Steps (How it works) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 46rem) { .steps { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
.step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow);
}
.step h2 { font-size: 1.2rem; margin: .2rem 0 .5rem; }
.step p { margin: 0; color: var(--muted); }
.step-letter { width: 2.4rem; height: 2.4rem; font-size: 1.05rem; }

/* FAQ */
.faq { max-width: 52rem; display: grid; gap: .8rem; }
.qa { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem; min-height: 3.2rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary h2 { font-size: 1.08rem; margin: 0; }
.qa summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--bg-alt); color: var(--accent); font-weight: 700; font-size: 1.2rem;
}
.qa[open] summary::after { content: "−"; }
.answer { padding: 0 1.25rem 1.1rem; color: var(--muted); }
.answer p:last-child { margin-bottom: 0; }

/* Voices (Our story) */
.voices { display: grid; gap: 1.2rem; }
@media (min-width: 60rem) { .voices { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
.voice {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.3rem, 4vw, 2rem); position: relative;
}
.voice::before {
  content: "“"; position: absolute; top: .2rem; right: 1.2rem; font: 700 4.5rem/1 Georgia, serif; color: var(--accent); opacity: .18;
}
.speaker { display: flex; align-items: center; gap: .6rem; font-weight: 750; color: var(--accent); margin-bottom: .6rem; }
.avatar {
  display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800;
}
.voice h2 { font-size: 1.3rem; }

/* Team */
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 46rem) { .team { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
@media (min-width: 66rem) { .team { grid-template-columns: repeat(3, 1fr); } }
.person {
  display: flex; flex-direction: column; gap: .9rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow);
}
.avatar-img {
  flex: none; width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent-2);
}
.person h2 { font-size: 1.15rem; margin: .1rem 0 .4rem; }
.person p { margin: 0 0 .5rem; color: var(--muted); }
.person p:last-child { margin-bottom: 0; }
.person .role { color: var(--accent); font-weight: 650; font-size: .9rem; }

/* Sources and footer */
.band-sources { padding: 1.5rem 0; background: var(--bg) !important; border-top: 1px solid var(--line); }
.sources summary { cursor: pointer; font-weight: 650; color: var(--muted); }
.sources ul { color: var(--muted); font-size: .9rem; padding-left: 1.2rem; }
.md-link { margin: .6rem 0 0; font-size: .9rem; }
.footer { background: var(--hero-bg); color: var(--hero-muted); padding: 2.5rem 0 3rem; font-size: .95rem; }
.footer a { color: var(--hero-fg); }
.footer-inner { display: grid; gap: 1.5rem; }
.brand-footer { color: var(--hero-fg); margin-bottom: .4rem; }
.disclaimer { font-size: .85rem; opacity: .85; }
/* Reference tables: one card per row */
.page-credits table tr, .page-get-started table tr {
  gap: .2rem 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.page-credits table td, .page-get-started table td { border: 0; box-shadow: none; padding: .2rem 0; background: none; border-radius: 0; }
.page-credits table td::before, .page-get-started table td::before { margin-bottom: .1rem; }
.page-get-started table td:first-child { font-weight: 700; }
@media (min-width: 46rem) { .page-credits table tr { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .page-credits table tr { grid-template-columns: 1.1fr 1.6fr 1.1fr .7fr; } }
@media (min-width: 60rem) { .page-credits table tr:has(td:nth-child(3):last-child) { grid-template-columns: 1fr 1.1fr 2fr; } }
/* Two-column reference tables (name and owner): compact tiles */
.page-credits table:has(td:nth-child(2):last-child) tbody { display: grid; gap: .6rem; }
.page-credits table:has(td:nth-child(2):last-child) tr { grid-template-columns: 1fr 1fr; padding: .7rem 1rem; gap: .1rem 1rem; }
@media (min-width: 46rem) { .page-credits table:has(td:nth-child(2):last-child) tbody { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .page-credits table:has(td:nth-child(2):last-child) tbody { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 46rem) { .page-get-started table tr { grid-template-columns: 1fr 1.2fr 1.4fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
@media (min-width: 52rem) { .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; } .footer-links { justify-content: flex-end; } }
