/* ── Tokens ───────────────────────────────────────────────────────── */
:root {
  --bg:        #F5EFE6;  /* Warm Ivory */
  --surface:   #FFFFFF;
  --sf2:       #EDE7DC;
  --sf3:       #E5DDD0;
  --border:    rgba(214,183,122,.30);
  --border2:   rgba(214,183,122,.60);
  --fg:        #431D2B;  /* Deep Burgundy */
  --muted:     #713449;  /* Wine Burgundy */
  --muted2:    #9B6B7A;
  --accent:    #D6B77A;  /* Champagne Gold */
  --accent-dk: #B8964F;
  --gold:      #D6B77A;
  --green:     #2E7D32;
  --red:       #C62828;
  --purple:    #7B1FA2;
  --blue:      #1565C0;
  --orange:    #E65100;

  /* Ticker bar uses an inverted scheme */
  --ticker-bg:    #431D2B;
  --ticker-fg:    #F5EFE6;
  --ticker-muted: rgba(245,239,230,.60);

  --disclaimer-h: 26px;
  --ticker-h:  36px;
  --nav-h:     64px;
  --top-h:     126px; /* disclaimer + ticker + nav */

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  20px;

  color-scheme: light;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--top-h);
}

h1, h2 {
  font-family: 'Montserrat', system-ui, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  color: var(--fg);
}

h3, h4, h5 {
  font-family: 'Poppins', system-ui, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--fg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Layout ───────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left, 0px));
}

.section     { padding-block: 80px; }
.section-sm  { padding-block: 56px; }
.section-lg  { padding-block: 100px; }

.section-dark {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sh { margin-bottom: 48px; }
.sh .eyebrow { margin-bottom: 10px; }
.sh h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 12px; }
.sh p  { font-size: 1.0625rem; color: var(--muted); max-width: 560px; line-height: 1.65; }

/* ── Typography helpers ───────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }

.font-syne { font-family: 'Syne', system-ui, sans-serif; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
  line-height: 1;
}

.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--fg);   color: var(--gold); }
.btn-gold     { background: var(--gold); color: var(--fg); }
.btn-green    { background: var(--green);  color: var(--bg); }
.btn-surface  { background: var(--sf2);    color: var(--fg); border: 1px solid var(--border2); }

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Badges / chips ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
}

/* Category colours */
.badge-options   { background: color-mix(in srgb, var(--accent)  12%, transparent); color: var(--accent);  border: 1px solid color-mix(in srgb, var(--accent)  20%, transparent); }
.badge-algo      { background: color-mix(in srgb, var(--purple)  12%, transparent); color: var(--purple);  border: 1px solid color-mix(in srgb, var(--purple)  20%, transparent); }
.badge-technical { background: color-mix(in srgb, var(--blue)    12%, transparent); color: var(--blue);    border: 1px solid color-mix(in srgb, var(--blue)    20%, transparent); }
.badge-risk      { background: color-mix(in srgb, var(--gold)    12%, transparent); color: var(--gold);    border: 1px solid color-mix(in srgb, var(--gold)    20%, transparent); }
.badge-beginners { background: color-mix(in srgb, var(--green)   12%, transparent); color: var(--green);   border: 1px solid color-mix(in srgb, var(--green)   20%, transparent); }
.badge-tools     { background: color-mix(in srgb, var(--orange)  12%, transparent); color: var(--orange);  border: 1px solid color-mix(in srgb, var(--orange)  20%, transparent); }
.badge-general   { background: color-mix(in srgb, var(--muted)   12%, transparent); color: var(--muted);   border: 1px solid color-mix(in srgb, var(--muted)   20%, transparent); }

.badge-free       { background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green);   border: 1px solid color-mix(in srgb, var(--green) 18%, transparent); }
.badge-beginner   { background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green);   border: 1px solid color-mix(in srgb, var(--green) 18%, transparent); }
.badge-inter      { background: color-mix(in srgb, var(--gold)  10%, transparent); color: var(--gold);    border: 1px solid color-mix(in srgb, var(--gold)  18%, transparent); }
.badge-advanced   { background: color-mix(in srgb, var(--red)   10%, transparent); color: var(--red);     border: 1px solid color-mix(in srgb, var(--red)   18%, transparent); }
.badge-new        { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }

/* ── Forms ────────────────────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--sf2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 0.9375rem;
  color: var(--fg);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.input::placeholder { color: var(--muted2); }
.input:focus { border-color: var(--accent); }

textarea.input { resize: vertical; min-height: 100px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.form-group { margin-bottom: 14px; }

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-row .input { flex: 1; min-width: 140px; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23713449' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select.input option { background: var(--surface); color: var(--fg); }

.form-note { font-size: 0.8125rem; color: var(--muted); margin-top: 8px; }

.success-box {
  display: none;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  color: var(--green);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}

.card:hover { border-color: var(--border2); }

.card-sm { padding: 20px; border-radius: var(--r-md); }
.card-lg { padding: 36px; border-radius: var(--r-xl); }

/* ── Market Ticker Bar ────────────────────────────────────────────── */
/* ── Disclaimer bar ───────────────────────────────────────────────── */
.disclaimer-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--disclaimer-h);
  z-index: 201;
  background: #2a0f0f;
  border-bottom: 1px solid rgba(214,183,122,.18);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.disclaimer-track {
  display: flex;
  white-space: nowrap;
  animation: disclaimerScroll 80s linear infinite;
  will-change: transform;
}
.disclaimer-track:hover { animation-play-state: paused; }
.disclaimer-segment {
  padding: 0 60px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,210,160,.85);
  letter-spacing: .015em;
  font-family: 'Inter', system-ui, sans-serif;
  flex-shrink: 0;
}
@keyframes disclaimerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Market Ticker Bar ────────────────────────────────────────────── */
.ticker-bar {
  position: fixed;
  top: var(--disclaimer-h); left: 0; right: 0;
  height: var(--ticker-h);
  z-index: 200;
  background: var(--ticker-bg);
  border-bottom: 1px solid rgba(214,183,122,.25);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
  overflow-x: auto;
  scrollbar-width: none;
}
.ticker-inner::-webkit-scrollbar { display: none; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
  border-right: 1px solid rgba(245,239,230,.2);
  margin-right: 24px;
  flex-shrink: 0;
}
.ticker-item:last-of-type { border-right: none; }

.ticker-name {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ticker-muted);
}

.ticker-price {
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ticker-fg);
  font-family: 'Roboto Mono', monospace;
}

.ticker-change {
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-family: 'Roboto Mono', monospace;
}
.ticker-change.up   { color: #81C784; }
.ticker-change.down { color: #EF9A9A; }
.ticker-change.flat { color: var(--ticker-muted); }

.ticker-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-left: 16px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.open   { background: var(--green); animation: glow 2s ease-in-out infinite; }
.status-dot.closed { background: var(--muted2); }

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent); }
  50%       { box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 0%, transparent); }
}

.status-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ticker-muted);
}

.ticker-skeleton {
  display: flex;
  gap: 24px;
  align-items: center;
}
.ticker-skel-item {
  width: 120px;
  height: 14px;
  background: rgba(245,239,230,.15);
  border-radius: 4px;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

/* ── Navigation ───────────────────────────────────────────────────── */
.main-nav {
  position: fixed;
  top: calc(var(--disclaimer-h) + var(--ticker-h));
  left: 0; right: 0;
  height: var(--nav-h);
  z-index: 199;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left, 0px));
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--fg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--fg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.nav-link:hover   { color: var(--fg); background: var(--sf2); }
.nav-link.active  { color: var(--fg); background: var(--sf2); }

.nav-cta {
  background: var(--fg);
  color: var(--gold) !important;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  transition: opacity .15s;
}
.nav-cta:hover { opacity: .85; background: var(--fg) !important; }

.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: fixed;
    top: var(--top-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 20px;
    z-index: 198;
  }
  .nav-links.open .nav-link {
    width: 100%;
    padding: 13px 8px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 1rem;
  }
  .nav-links.open .nav-cta {
    margin-top: 10px;
    background: none !important;
    color: var(--accent) !important;
    border-bottom: none;
    font-size: 1rem;
  }
  .nav-mobile-btn { display: flex; }
}

/* ── Page hero (non-home pages) ───────────────────────────────────── */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: 48px 40px;
}
.page-hero h1 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; margin-bottom: 10px; }
.page-hero p  { font-size: 1.0625rem; color: var(--muted); max-width: 560px; line-height: 1.6; }

/* ── Discussion cards ─────────────────────────────────────────────── */
.disc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 20px;
  align-items: start;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
}
.disc-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.disc-card.pinned { border-left: 3px solid var(--gold); }

.disc-title {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 7px;
  line-height: 1.35;
}

.disc-preview {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.disc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.disc-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sf3);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.disc-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.disc-vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--sf2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  cursor: pointer;
  color: var(--muted);
  transition: color .15s, border-color .15s;
  font-size: 0.75rem;
  font-weight: 600;
}
.disc-vote-btn:hover { color: var(--accent); border-color: var(--accent); }
.disc-vote-btn.voted { color: var(--accent); border-color: var(--accent); }

.stat-row {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--muted2);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Resources ────────────────────────────────────────────────────── */
.book-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}
.book-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.book-spine {
  height: 8px;
}

.book-body {
  background: var(--surface);
  padding: 22px;
}

.book-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.book-author { font-size: 0.8125rem; color: var(--muted); margin-bottom: 12px; }
.book-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.65; margin-bottom: 12px; }
.book-why {
  font-size: 0.8125rem;
  color: var(--fg);
  background: var(--sf2);
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  line-height: 1.55;
  margin-bottom: 16px;
  font-style: italic;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, transform .2s;
}
.tool-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.tool-name { font-family: 'Syne', system-ui, sans-serif; font-size: 1rem; font-weight: 700; }
.tool-tagline { font-size: 0.8125rem; color: var(--accent); font-weight: 500; }
.tool-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; flex: 1; }

/* ── Events ───────────────────────────────────────────────────────── */
.event-flagship {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.event-flagship-header {
  padding: 32px 36px 28px;
  background: var(--sf2);
  border-bottom: 1px solid var(--border);
}

.event-flagship-body { padding: 32px 36px; }

.event-agenda-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-block: 14px;
  border-bottom: 1px solid var(--border);
}
.event-agenda-item:last-child { border-bottom: none; padding-bottom: 0; }
.event-agenda-num {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 24px;
  margin-top: 2px;
}

.past-event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color .15s;
}
.past-event-card:hover { border-color: var(--border2); }

.past-event-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--sf2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 12px;
  max-width: 260px;
  line-height: 1.65;
}

.footer-col-group { display: flex; gap: 56px; flex-wrap: wrap; }

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 14px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 9px; }

.footer-col a {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  transition: color .15s;
}
.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p, .footer-bottom a {
  font-size: 0.8125rem;
  color: var(--muted2);
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--muted); }

/* ── Utility / helpers ────────────────────────────────────────────── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.flex        { display: flex; }
.flex-wrap   { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section, .section-lg { padding-block: 56px; }
}

/* ── Mobile overrides ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Ticker: show only 2 items on small screens */
  .ticker-item:nth-child(n+3) { display: none; }

  /* Nav */
  .logo-text { font-size: .9rem; }

  /* Hero */
  .hero { min-height: calc(100svh - var(--top-h)); padding-block: 48px 36px; }

  /* Section headers */
  .sh h2 { font-size: 1.5rem; }

  /* Footer */
  .footer-grid { flex-direction: column; gap: 32px; }
  .footer-col-group { gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Disc cards: stack vote below body on tiny screens */
  .disc-card { grid-template-columns: 1fr; }
  .disc-stats { flex-direction: row; align-items: center; gap: 12px; }

  /* Book / tool cards */
  .book-body { padding: 16px; }
  .tool-card { padding: 16px; }

  /* Page hero */
  .page-hero { padding-block: 36px 28px; }
  .page-hero h1 { font-size: 1.75rem; }

  /* Forms */
  .form-row { flex-direction: column; }
  .form-row .input { min-width: unset; }

  /* Buttons */
  .btn-lg { padding: 13px 20px; font-size: .9375rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

.divider { border: none; border-top: 1px solid var(--border); margin-block: 32px; }

/* scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
