/* ============================================================
   common.css
   Shared design tokens + nav/footer styles for every page on
   this site. Page-specific styles (roulette wheel, ladder, etc.)
   stay in each page's own <style> block.

   MAINTENANCE NOTE: if you add a new tool page later, you do NOT
   need to touch this file. Just add the page to NAV_PAGES in
   assets/js/nav.js and this stylesheet already covers its nav
   link/footer look.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=DM+Sans:wght@400;500;700&display=swap');

:root{
  --ink:#1b1523;
  --ink-rgb:27,21,35;
  --paper:#f6f1e9;
  --surface:#fff;
  --accent-strong:#1b1523;
  --gold:#e8b84b;
  --coral:#ef6f5b;
  --teal:#3fa79b;
  --violet:#8567d6;
  --line: rgba(var(--ink-rgb), 0.14);
}

/* Dark theme: overriding these custom properties is the ONLY thing that
   changes. Every page's own styles already reference var(--ink), var(--paper),
   var(--surface) and rgba(var(--ink-rgb), x) instead of hardcoded colors, so
   they all flip automatically. --accent-strong and --gold stay fixed on
   purpose, since bold badges (nav active tab, main action buttons) should
   stay a solid dark chip with gold text in both themes for consistency. */
html[data-theme="dark"]{
  --ink:#f1ece3;
  --ink-rgb:241,236,227;
  --paper:#161119;
  --surface:#241d2c;
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  min-height:100vh;
  background:var(--paper);
  font-family:'DM Sans', sans-serif;
  color:var(--ink);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:32px 16px 0;
  transition: background 0.25s ease, color 0.25s ease;
}

a{ color:inherit; }

/* ---------- dark mode toggle ---------- */

.theme-toggle{
  width:32px; height:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--surface);
  border:1px solid var(--line);
  cursor:pointer;
  font-size:14px;
  flex-shrink:0;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover{ border-color:var(--violet); }

/* ---------- shared top navigation ---------- */

.site-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:26px;
  width:100%;
  max-width:920px;
}
.nav-home{
  width:32px; height:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--surface);
  border:1px solid var(--line);
  text-decoration:none;
  font-size:14px;
  flex-shrink:0;
}
.nav-home:hover{ border-color:var(--violet); }
.nav-link{
  padding:7px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--ink);
  text-decoration:none;
  font-family:'DM Sans', sans-serif;
  font-size:13px;
  font-weight:500;
  transition: all 0.2s ease;
}
.nav-link:hover{ border-color:var(--violet); color:var(--violet); }
.nav-link.active{
  background:var(--accent-strong);
  color:var(--gold);
  border-color:var(--accent-strong);
}

/* ---------- shared footer ---------- */

.site-footer{
  width:100%;
  max-width:920px;
  margin-top:auto;
  padding:22px 4px 28px;
  border-top:1px solid var(--line);
}
.footer-inner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:12.5px;
  color:rgba(var(--ink-rgb), 0.45);
}
.footer-links{
  display:flex;
  gap:16px;
}
.footer-links a{
  text-decoration:none;
  color:rgba(var(--ink-rgb), 0.55);
}
.footer-links a:hover{ color:var(--violet); }

/* ---------- shared info card (feature explanation sections) ---------- */

.info-card{
  width:100%;
  max-width:920px;
  margin-top:36px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  padding:28px 30px;
  line-height:1.75;
  font-size:14.5px;
  transition: background 0.25s ease;
}
.info-card h2{
  font-family:'Space Grotesk', sans-serif;
  font-size:18px;
  margin:26px 0 12px;
}
.info-card h2:first-child{ margin-top:0; }
.info-card p{ margin:0 0 12px; color:rgba(var(--ink-rgb),0.82); }
.info-card ol, .info-card ul{ margin:0 0 12px; padding-left:20px; color:rgba(var(--ink-rgb),0.82); }
.info-card li{ margin-bottom:7px; }
.info-callout{
  margin:14px 0 18px;
  padding:14px 18px;
  border-radius:12px;
  background: rgba(133,103,214,0.1);
  border:1px solid rgba(133,103,214,0.3);
  color:rgba(var(--ink-rgb),0.9);
  font-size:14px;
}
.info-callout strong{ color:var(--violet); }
