/* Shared styles for about / guide / privacy. Brand tokens mirror constants/theme.ts (Colors.celeste). */
:root {
  --bg: #0f1011;
  --surface: #191b1d;
  --surface-2: #202326;
  --line: #242629;
  --fg: #ffffff;
  --body: #d6d9dc;
  --muted: #8e9499;
  --celeste: #6ec3c5;
  --orange: #ff5e3a;
  --on-orange: #ffffff;
  --link: #6ec3c5;
  --header-bg: rgba(15, 16, 17, 0.8);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f5f7f8;
    --surface-2: #eceff1;
    --line: #e1e5e8;
    --fg: #0f1011;
    --body: #33383c;
    --muted: #5d656b;
    --celeste: #2f9ea1;
    --orange: #e8431f;
    --link: #1f7f82;
    --header-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(15, 16, 17, 0.08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { max-width: 100%; }
h1, h2, h3 { color: var(--fg); letter-spacing: -0.02em; line-height: 1.2; }
strong { color: var(--fg); }

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand span b { color: var(--orange); font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--body);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--fg); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav .btn { margin-left: 6px; padding: 8px 16px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--on-orange) !important;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); background: var(--orange); }
.btn.secondary {
  background: transparent;
  color: var(--fg) !important;
  border: 1px solid var(--line);
}
.btn.secondary:hover { background: var(--surface); }

/* ---- layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.prose { max-width: 760px; margin: 0 auto; padding: 40px 16px 72px; }
main.prose h1 { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; margin: 0 0 12px; }
main.prose h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2.2em 0 0.5em;
  padding-top: 0.9em;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
main.prose h3 { font-size: 1.1rem; margin: 1.7em 0 0.3em; scroll-margin-top: 80px; }
main.prose p, main.prose li { color: var(--body); }
main.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0 0; }
main.prose .meta { color: var(--muted); margin: 0 0 24px; }
code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
}
.toc, .summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 22px 0;
}
.summary h2 { border: 0 !important; margin-top: 0.4em !important; padding-top: 0 !important; }
.toc ol { margin: 8px 0 0; padding-left: 1.4em; columns: 2 280px; column-gap: 28px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
.tablewrap, main.prose table { margin: 14px 0; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
main.prose > table { display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; background: var(--surface); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---- about page ---- */
.hero { text-align: center; padding: 64px 16px 40px; }
.hero .logo {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 0 0 1px var(--line), 0 16px 48px rgba(255, 94, 58, 0.22);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  margin: 26px auto 14px;
  max-width: 16em;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p { color: var(--muted); font-size: 1.2rem; max-width: 34em; margin: 0 auto 28px; }
.hero .cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.section { padding: 48px 0; }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; margin: 0 0 8px; text-align: center; }
.section .sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 36em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: rgba(110, 195, 197, 0.14);
  margin-bottom: 14px;
}
.card.hot .ico { background: rgba(255, 94, 58, 0.14); }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split h2 { text-align: left; }
.split p { margin: 0 0 12px; }
.panel {
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.panel .stat { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.panel .stat:last-child { border-bottom: 0; }
.panel .stat b { font-size: 1.8rem; color: var(--fg); letter-spacing: -0.02em; }
.panel .stat b.o { color: var(--orange); }
.panel .stat b.c { color: var(--celeste); }
.panel .stat span { color: var(--muted); }
.band {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 48px 20px;
  margin: 24px 0 8px;
}
.band h2 { margin: 0 0 8px; }
.band p { color: var(--muted); margin: 0 auto 24px; max-width: 32em; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; background: var(--bg); }
.site-footer .cols {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 16px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}
.site-footer p { color: var(--muted); font-size: 0.93rem; margin: 10px 0 0; max-width: 24em; }
.site-footer h4 { margin: 0 0 10px; color: var(--fg); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer li a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-footer li a:hover { color: var(--fg); }
.site-footer .legal {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 24px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .cols > div:first-child { grid-column: 1 / -1; }
  .site-nav a { padding: 8px 8px; font-size: 0.9rem; }
  .site-nav .btn { display: none; }
  .brand span { font-size: 1rem; }
  .hero { padding-top: 40px; }
}
