/* Mirrors the app's design tokens (lib/core/theme): colours, spacing, radii
   and Poppins, so the pages read as part of the app. */

@font-face { font-family: Poppins; src: url(assets/fonts/Poppins-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(assets/fonts/Poppins-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Poppins; src: url(assets/fonts/Poppins-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Poppins; src: url(assets/fonts/Poppins-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --background: #08080c;
  --background-alt: #0d0d13;
  --surface: #15151d;
  --surface-elevated: #1c1c26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --primary: #ff2e6e;
  --primary-bright: #ff6fa0;
  --primary-deep: #c9184a;
  --violet: #7c3aed;
  --text-primary: #f4f5fb;
  --text-secondary: #9ca0b3;
  --text-tertiary: #63677b;

  --s-xxs: 4px; --s-xs: 8px; --s-sm: 12px; --s-md: 16px;
  --s-lg: 20px; --s-xl: 24px; --s-xxl: 32px; --s-xxxl: 48px;
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px;
  --gutter: 20px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 46, 110, 0.14), transparent 70%),
    radial-gradient(700px 380px at -10% 0%, rgba(124, 58, 237, 0.12), transparent 70%),
    var(--background);
  background-repeat: no-repeat;
  color: var(--text-secondary);
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--primary-bright); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: var(--s-xs); }
.skip:focus { left: var(--s-md); padding: var(--s-xs) var(--s-sm); background: var(--surface); border-radius: var(--r-xs); z-index: 10; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(8, 8, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-md); min-height: 64px; flex-wrap: wrap; padding-top: var(--s-xs); padding-bottom: var(--s-xs); }
.brand { display: flex; align-items: center; gap: var(--s-xs); color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: 16px; }
.brand img { border-radius: var(--r-xs); }
.nav { display: flex; gap: var(--s-xxs); flex-wrap: wrap; }
.nav a {
  color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 6px var(--s-sm); border-radius: 999px; border: 1px solid transparent;
}
.nav a:hover { color: var(--text-primary); background: var(--surface-elevated); }
.nav a[aria-current="page"] { color: var(--primary-bright); background: rgba(255, 46, 110, 0.16); border-color: var(--primary); }

main { flex: 1; padding-top: var(--s-xxl); padding-bottom: var(--s-xxxl); }

/* Page heading */
.eyebrow { margin: 0 0 var(--s-xs); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary-bright); }
h1 { margin: 0; color: var(--text-primary); font-size: clamp(28px, 6vw, 38px); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.lede { margin: var(--s-sm) 0 0; font-size: 16px; color: var(--text-secondary); }
.meta { margin: var(--s-md) 0 0; font-size: 13px; color: var(--text-tertiary); }

[id] { scroll-margin-top: 120px; }
h2 { margin: var(--s-xxl) 0 var(--s-xs); color: var(--text-primary); font-size: 19px; line-height: 1.35; font-weight: 600; }
h3 { margin: var(--s-lg) 0 var(--s-xxs); color: var(--text-primary); font-size: 15px; font-weight: 600; }
p, ul, ol { margin: 0 0 var(--s-sm); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: var(--s-xxs); }
li::marker { color: var(--primary-bright); }
strong { color: var(--text-primary); font-weight: 600; }

/* Cards, like the app's ProfileCard */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  margin: var(--s-lg) 0;
}
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.notice {
  display: flex; gap: var(--s-sm); align-items: flex-start;
  background: rgba(21, 21, 29, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-sm) var(--s-md);
  font-size: 14px;
}
.notice svg { flex: none; margin-top: 3px; color: var(--text-tertiary); }

.toc { font-size: 14px; }
.toc p { margin: 0 0 var(--s-xs); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); }
.toc ol { margin: 0; columns: 2 220px; column-gap: var(--s-xl); }
.toc a { color: var(--text-secondary); text-decoration: none; }
.toc a:hover { color: var(--primary-bright); }

/* Data table: what goes where */
.table-wrap { overflow-x: auto; margin: var(--s-md) 0; border: 1px solid var(--border); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td:first-child, th:first-child { width: 34%; }
th, td { text-align: left; vertical-align: top; padding: var(--s-sm) var(--s-md); border-bottom: 1px solid var(--border); }
th { background: var(--surface-elevated); color: var(--text-primary); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--text-primary); font-weight: 500; }

/* Landing */
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-md); padding: var(--s-xl) 0 var(--s-md); }
.hero img { border-radius: var(--r-md); box-shadow: 0 12px 40px rgba(255, 46, 110, 0.25); }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s-sm); margin: var(--s-xl) 0; }
.link-card {
  display: flex; gap: var(--s-sm); align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-md); text-decoration: none; color: var(--text-primary);
  transition: border-color .15s, background .15s;
}
.link-card:hover { border-color: var(--border-strong); background: var(--surface-elevated); color: var(--text-primary); }
.link-card .icon {
  flex: none; width: 34px; height: 34px; border-radius: var(--r-xs);
  display: grid; place-items: center; background: var(--surface-elevated); color: var(--primary-bright);
}
.link-card strong { display: block; font-size: 14px; }
.link-card small { display: block; font-size: 12px; color: var(--text-tertiary); line-height: 1.4; }

.button {
  display: inline-flex; align-items: center; gap: var(--s-xs);
  padding: 11px var(--s-lg); border-radius: 999px; text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px rgba(255, 46, 110, 0.3);
}
.button:hover { color: #fff; filter: brightness(1.08); }

details { border-bottom: 1px solid var(--border); }
details:last-of-type { border-bottom: 0; }
summary { cursor: pointer; list-style: none; padding: var(--s-sm) 0; color: var(--text-primary); font-weight: 500; display: flex; justify-content: space-between; gap: var(--s-md); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--primary-bright); font-weight: 600; }
details[open] summary::after { content: "−"; }
details > div { padding-bottom: var(--s-sm); }

.footer { border-top: 1px solid var(--border); background: var(--background-alt); }
.footer-inner { padding-top: var(--s-lg); padding-bottom: var(--s-xl); font-size: 12px; color: var(--text-tertiary); }
.footer-inner p { margin: 0 0 var(--s-xxs); }

@media (max-width: 520px) {
  .topbar-inner { justify-content: center; }
  .card { padding: var(--s-md); }
}
