/* =====================================================================
   World Space Community — site styles
   Layout concept: a calm night sky. Dark navy ground, a faint static
   starfield, one bright teal (from the logo) for actions, mono labels
   borrowed from mission telemetry for small details.
   ===================================================================== */

:root {
  /* colour — taken from the logo teal (#50A4AB) */
  --space:       #060a14;   /* page background */
  --space-2:     #0b1221;   /* raised bands */
  --surface:     #0f182b;   /* cards */
  --surface-2:   #142037;   /* card hover / inputs */
  --line:        #213150;   /* hairlines */
  --ink:         #eaf2f5;   /* main text */
  --ink-dim:     #a3b4c3;   /* secondary text */
  --teal:        #50a4ab;   /* logo colour: borders, icons */
  --accent:      #6ad8df;   /* bright teal: buttons, links */
  --accent-ink:  #03181b;   /* text on accent */
  --glow:        rgba(80, 164, 171, 0.16);

  /* type */
  --font-body:    "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.25rem;
  --step-2:  1.6rem;
  --step-3:  clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.6rem + 3.4vw, 4rem);

  --radius:   14px;
  --radius-s: 8px;
  --wrap:     1160px;
  --gutter:   20px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Static starfield: three tiled layers of tiny dots + a soft glow at the top. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 23px 41px,  rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1px 1px at 141px 97px, rgba(255,255,255,.5),  transparent 60%),
    radial-gradient(1.5px 1.5px at 77px 163px, rgba(190,235,240,.7), transparent 60%),
    radial-gradient(1px 1px at 189px 13px, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1px 1px at 61px 251px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 233px 211px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 310px 140px, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(ellipse 80% 50% at 70% -10%, var(--glow), transparent 70%);
  background-size: 260px 260px, 260px 260px, 260px 260px, 330px 330px, 330px 330px, 410px 410px, 410px 410px, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #9be9ee; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--radius-s); font-weight: 700;
}
.skip-link:focus { left: 12px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.muted { color: var(--ink-dim); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: 700 1rem/1 var(--font-body);
  padding: 0.85em 1.35em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #8de5ea; color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--ink); background: var(--surface); }
.btn-lg { font-size: 1.1rem; padding: 1em 1.6em; }
.btn-sm { font-size: 0.92rem; padding: 0.6em 1em; }

.text-link {
  display: inline-flex; align-items: center; gap: .35em;
  font-weight: 700; text-decoration: none;
}
.text-link svg { width: 1em; height: 1em; transition: transform .15s ease; }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(6, 10, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em;
  margin-right: auto; min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand img { width: 46px; height: auto; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink-dim); text-decoration: none; font-weight: 600;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--ink);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav { gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--space-2); border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 16px;
  }
  .nav-links:not(.open) { display: none; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }
  .nav .btn-discord-nav { padding: 0.6em 0.9em; font-size: 0.9rem; }
}
@media (max-width: 460px) {
  .nav .brand span { display: none; }
}

/* ---------- sections ---------- */
main { flex: 1; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: clamp(40px, 6vw, 64px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head > div { display: grid; gap: 10px; max-width: 640px; }
.section-head p { color: var(--ink-dim); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy .lede { font-size: var(--step-1); color: var(--ink-dim); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.hero-note { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-dim); letter-spacing: .04em; }

.hero-art { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: center; }
.hero-art .orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(80,164,171,.35);
}
.hero-art .orbit.o2 { inset: 13%; border-style: solid; border-color: rgba(80,164,171,.18); }
.hero-art .orbit.o3 { inset: 26%; border-color: rgba(80,164,171,.12); border-style: solid; }
.hero-art img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 0 30px rgba(80,164,171,.25)); }
.hero-art .tag {
  position: absolute; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
  color: var(--ink-dim); background: var(--space-2); border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 6px; white-space: nowrap;
}
.hero-art .tag b { color: var(--accent); font-weight: 600; }
.hero-art .t1 { top: 6%; left: -2%; }
.hero-art .t2 { bottom: 9%; right: -2%; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; order: -1; }
}

/* page hero (inner pages) */
.page-hero { padding-block: clamp(44px, 6vw, 72px) 8px; }
.page-hero .wrap { display: grid; gap: 14px; }
.page-hero p { color: var(--ink-dim); font-size: var(--step-1); max-width: 40em; }

/* ---------- stats ---------- */
.stats { border-block: 1px solid var(--line); background: rgba(11,18,33,.6); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid.n3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.stat { padding: 28px 20px; display: grid; gap: 4px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }
@media (max-width: 720px) {
  .stats-grid.n4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid.n4 .stat:nth-child(3) { border-left: 0; }
  .stats-grid.n4 .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats-grid.n3 .stat { padding: 24px 8px; }
  .stats-grid.n3 .stat-label { font-size: .68rem; letter-spacing: .06em; }
}

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  display: grid; align-content: start; gap: 12px;
  padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(15,24,43,.4));
  border: 1px solid var(--line);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(80,164,171,.14); color: var(--accent);
  border: 1px solid rgba(80,164,171,.35);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature p { color: var(--ink-dim); }
.feature .text-link { margin-top: 4px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* ---------- cards: posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.post-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
  min-width: 0;
}
.post-card:hover { border-color: var(--teal); background: var(--surface-2); transform: translateY(-2px); }
.post-card h3 { font-size: 1.2rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card p { color: var(--ink-dim); font-size: 0.98rem; }
.post-meta {
  margin-top: auto; padding-top: 6px;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-family: var(--font-mono); font-size: .76rem; color: var(--ink-dim); letter-spacing: .02em;
}
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta svg { width: 14px; height: 14px; }

.tag-pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(80,164,171,.13); color: #bfeef1;
  border: 1px solid rgba(80,164,171,.3);
  white-space: nowrap;
}

/* ---------- cards: mentors ---------- */
.mentor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.mentor-grid.full { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mentor-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 28px 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  min-width: 0;
}
.mentor-photo {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--teal); box-shadow: 0 0 0 6px rgba(80,164,171,.12);
  margin-bottom: 6px;
}
.mentor-initials {
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 800; color: var(--ink);
  background: radial-gradient(circle at 30% 30%, #2a5c6b, #12243b 70%);
}
.mentor-card h3 { font-size: 1.18rem; }
.mentor-role { color: var(--ink-dim); font-size: .95rem; line-height: 1.4; }
.mentor-bio { color: var(--ink-dim); font-size: .97rem; text-align: left; margin-top: 4px; }
.mentor-card .btn { margin-top: auto; width: 100%; }
.mentor-card .mentor-bio + .btn { margin-top: 14px; }
.mentor-card .tag-pill { align-self: center; }
.mentor-card .tag-pill { margin-bottom: 6px; }
.mentor-card.compact .btn { margin-top: auto; }

/* ---------- filters & search ---------- */
.toolbar { display: grid; gap: 16px; margin-bottom: 28px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 600 .95rem/1 var(--font-body);
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface); color: var(--ink-dim);
  border: 1px solid var(--line); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-row.sub .chip { font-size: .88rem; padding: 8px 13px; background: transparent; }
.chip-row.sub .chip[aria-pressed="true"] { background: rgba(106,216,223,.16); color: var(--accent); border-color: var(--accent); }
.chip-count { font-family: var(--font-mono); font-size: .75rem; opacity: .8; }

.search {
  position: relative; max-width: 420px; width: 100%;
}
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-dim); pointer-events: none; }
.search input {
  width: 100%; font: 400 1rem/1.2 var(--font-body);
  padding: 12px 14px 12px 42px; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
}
.search input::placeholder { color: #7f91a3; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,216,223,.2); }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.result-count { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-dim); letter-spacing: .04em; }

.empty-state {
  text-align: center; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-dim); display: grid; gap: 12px; justify-items: center;
}

/* category headers on Learn */
.cat-intro { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin-bottom: 18px; }
.cat-intro p { color: var(--ink-dim); max-width: 46em; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: start; }
.faq-grid > div:first-child { display: grid; gap: 14px; }
.faq-grid > div:first-child p { color: var(--ink-dim); }
.faq-list { display: grid; gap: 10px; min-width: 0; }
.faq-list details {
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
}
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 20px;
  font-weight: 700; font-size: 1.06rem;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.3rem; color: var(--accent); line-height: 1; flex: none;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details > div { padding: 0 20px 18px; color: var(--ink-dim); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Discord banner ---------- */
.discord-banner {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 120% at 100% 50%, rgba(106,216,223,.22), transparent 60%),
    linear-gradient(115deg, #0c2a33 0%, #0d1e36 60%, #0b1529 100%);
  border-block: 1px solid rgba(80,164,171,.35);
}
.discord-banner::after {
  content: ""; position: absolute; right: -120px; top: 50%; width: 520px; height: 140px;
  border: 2px solid rgba(106,216,223,.18); border-radius: 50%; transform: translateY(-50%) rotate(-18deg);
  pointer-events: none;
}
.discord-inner {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  padding-block: clamp(40px, 6vw, 64px);
}
.discord-inner > div { display: grid; gap: 10px; max-width: 640px; min-width: 0; }
.discord-inner h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem); }
.discord-inner p { color: #c3d3dc; font-size: var(--step-1); }

/* ---------- footer ---------- */
.site-footer { background: var(--space-2); border-top: 1px solid var(--line); padding-block: 56px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-grid.no-learn { grid-template-columns: 2fr 1fr 1fr; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand p { color: var(--ink-dim); max-width: 30em; font-size: .97rem; }
.footer-col h3 { font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--ink-dim); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-dim); background: var(--surface);
}
.socials a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.socials svg { width: 19px; height: 19px; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  color: var(--ink-dim); font-size: .9rem;
}
.footer-email { color: var(--ink-dim); font-size: .95rem; user-select: all; }
@media (max-width: 860px) { .footer-grid, .footer-grid.no-learn { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid, .footer-grid.no-learn { grid-template-columns: 1fr; } }

/* ---------- article ---------- */
.article-wrap { max-width: 760px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-bottom: 26px; }
.back-link svg { width: 18px; height: 18px; transform: rotate(180deg); }
.article-head { display: grid; gap: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.article-head h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); }
.article-head .lede { font-size: var(--step-1); color: var(--ink-dim); }
.article-head .post-meta { margin-top: 0; padding-top: 0; font-size: .82rem; }

.prose { font-size: 1.12rem; line-height: 1.75; color: #d9e4ea; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; color: var(--ink); }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--teal); }
.prose strong { color: var(--ink); }
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 5px;
}
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px 18px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; font-size: .92rem; line-height: 1.6; }
.prose blockquote {
  margin-inline: 0; padding: 14px 20px; border-left: 3px solid var(--teal);
  background: rgba(80,164,171,.08); border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--ink);
}
.prose img { border-radius: var(--radius-s); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }

.article-cta {
  margin-top: 48px; padding: 24px; border-radius: var(--radius);
  border: 1px solid rgba(80,164,171,.4); background: rgba(80,164,171,.08);
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
}
.article-cta p { color: var(--ink-dim); }
.article-cta strong { display: block; color: var(--ink); font-size: 1.1rem; }

/* ---------- misc ---------- */
.become-mentor {
  margin-top: 48px; padding: 28px; border-radius: var(--radius);
  border: 1px dashed rgba(80,164,171,.5);
  display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center;
}
.become-mentor > div { display: grid; gap: 6px; max-width: 620px; }
.become-mentor p { color: var(--ink-dim); }
.section.flush-top { padding-top: 0; }
.search { display: block; }
.become-mentor h2 { font-size: var(--step-2); }
.article-head .tag-pill { justify-self: start; }

/* ---------- Learn: "see all" under capped sections ---------- */
.see-all-row { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- events ---------- */
.event-list { display: grid; gap: 16px; }
.event-card {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 24px; align-items: start;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.event-date {
  display: grid; justify-items: center; gap: 2px;
  padding: 12px 6px; border-radius: 12px;
  border: 1px solid rgba(80,164,171,.45); background: rgba(80,164,171,.1);
  font-family: var(--font-mono); text-transform: uppercase;
}
.ev-month { font-size: .76rem; letter-spacing: .12em; color: var(--accent); }
.ev-day { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ev-wd { font-size: .7rem; letter-spacing: .1em; color: var(--ink-dim); }
.event-body { display: grid; gap: 10px; min-width: 0; }
.event-body h3 { font-size: 1.3rem; }
.event-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.soon-pill {
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
.rel-pill {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px; border: 1px dashed rgba(106,216,223,.5); color: var(--accent);
}
.event-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.event-meta li { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-dim); font-size: .96rem; }
.event-meta svg { width: 16px; height: 16px; flex: none; color: var(--teal); }
.event-local {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .8rem; color: #bfeef1;
}
.event-local svg { width: 15px; height: 15px; flex: none; }
.event-desc { color: var(--ink-dim); max-width: 62ch; }
.event-actions { display: grid; gap: 10px; justify-items: end; }
.cal-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; font-size: .86rem; color: var(--ink-dim); }
.cal-links a { font-weight: 600; }
.event-ended { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }

.event-card.past { background: transparent; border-style: dashed; }
.event-card.past .event-date { background: transparent; border-color: var(--line); }
.event-card.past .ev-month, .event-card.past .ev-day { color: var(--ink-dim); }

.event-card.compact { grid-template-columns: 72px minmax(0, 1fr) auto; padding: 20px; gap: 20px; align-items: center; }
.event-card.compact h3 { font-size: 1.15rem; }
.event-card.compact .ev-day { font-size: 1.8rem; }

.tz-note { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-dim); letter-spacing: .02em; }
.events-subhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin: 8px 0 18px; }
.events-subhead h2 { font-size: var(--step-2); }
#past-events { margin-top: 56px; }

@media (max-width: 720px) {
  .event-card, .event-card.compact { grid-template-columns: 62px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .event-actions { grid-column: 1 / -1; justify-items: start; }
  .cal-links { justify-content: flex-start; }
  .ev-day { font-size: 1.7rem; }
}

/* ---------- article tables ---------- */
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.prose table { width: 100%; border-collapse: collapse; font-size: .98rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }

/* ---------- notice shown only when a page is opened as a local file ---------- */
.file-notice {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  max-width: 760px; margin-inline: auto;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 14px 14px 18px; border-radius: var(--radius-s);
  background: #2a2110; color: #f6e7c4; border: 1px solid #a8801f;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: .95rem; line-height: 1.5;
}
.file-notice p { flex: 1; min-width: 0; }
.file-notice strong { color: #ffe29a; }
.file-notice code { font-family: var(--font-mono); font-size: .85em; background: rgba(255,255,255,.08); padding: .05em .35em; border-radius: 4px; }
.file-notice button { flex: none; background: none; border: 0; color: inherit; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; }
.file-notice button:hover { background: rgba(255,255,255,.1); }
.file-notice svg { width: 18px; height: 18px; }
#home-mentor-cta .become-mentor { margin-top: 0; }

/* event sign-up + details buttons */
.event-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.event-card.compact .event-buttons { flex-direction: column; align-items: stretch; }
@media (max-width: 720px) {
  .event-buttons { justify-content: flex-start; }
  .event-card.compact .event-buttons { flex-direction: row; }
}

/* ---------- article figures and math ---------- */
.prose figure { margin: 2em 0; display: grid; justify-items: center; gap: 12px; }
.prose figure img {
  background: #fff; border-radius: 10px;
  width: auto; height: auto; max-width: 100%; max-height: 380px;
  box-shadow: 0 0 0 1px var(--line);
}
.prose figcaption { color: var(--ink-dim); font-size: .95rem; text-align: center; max-width: 60ch; }
.prose .math-display {
  margin-block: 1.3em; padding: 6px 2px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.prose .math-display mjx-container[display="true"] { margin: 0 !important; min-width: max-content; }
.prose mjx-container { color: var(--ink); }
.prose .math-inline mjx-container { font-size: 100%; }
@media (min-width: 900px) {
  .prose .math-display.wide { width: min(1080px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
}
.prose figure a { display: block; max-width: 100%; line-height: 0; }
.prose figure a:focus-visible { outline-offset: 4px; }
