/* megawatt.fun shared design system. Loaded LAST on every page so its tokens win.
   Base-derived warm surfaces and green accents; one type system, header and footer. */
:root {
  color-scheme: light;
  /* canonical tokens */
  --surface: #f0eeeb;
  --surface-raised: #fff;
  --brand: #b2dd79;
  --brand-foreground: #1e4d2b;
  --charcoal: #292826;
  --night: var(--surface);
  --panel-solid: var(--surface-raised);
  --line: #d8d7d5;
  --ink: var(--charcoal);
  --muted: #54524f;
  --lamp: var(--brand-foreground);
  --lamp-dim: #77a45a;
  --rung: #048ee5;
  --good: #77a45a;
  --bad: #bf5249;
  --display: "PP Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "PP Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: Consolas, "SF Mono", "Cascadia Code", ui-monospace, monospace;

  /* legacy names in style.css (tools, live, kardashev, titans, trust pages) */
  --bg: var(--night);
  --panel: var(--panel-solid);
  --dim: var(--muted);
  --faint: #7f7d7a;
  --charge: var(--good);
  --discharge: var(--lamp);
  --idle: #d8d7d5;

  /* legacy names in climb.css / scorecard.css (roadmap) */
  --raised: #e5e3df;
  --accent: var(--lamp);
  --gold: #aa8422;
  --deep: #102a17;
}


body { background: var(--night); color: var(--ink); font-family: var(--body); }
a { color: var(--lamp); }
a:hover { color: var(--ink); }
.mono, code { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

/* one header everywhere */
.site-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; margin: 0; background: linear-gradient(var(--night) 60%, rgba(7,13,22,0));
  font: 13px var(--mono);
}
.site-top .brand { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .02em; font-size: 14px; }
.site-top .brand span { color: var(--lamp); }
.site-top nav { display: flex; gap: 16px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; min-width: 0; }
.site-top nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-top nav a:hover { color: var(--ink); }
.site-top nav a[aria-current="page"] { color: var(--lamp); border-bottom: 1px solid var(--lamp); }
@media (max-width: 560px) { .site-top nav { gap: 12px; font-size: 12px; } }

/* one footer everywhere */
.site-bottom {
  position: relative; z-index: 1; margin-top: 56px; padding: 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); text-align: center; background: var(--night);
}
.site-bottom a { margin: 0 6px; color: var(--muted); }
.site-bottom a:hover { color: var(--lamp); }

.page-note { max-width: 860px; margin: 44px auto 0; padding: 0 20px; font-size: 13px; color: var(--muted); text-align: center; }
.page-note + .site-bottom { margin-top: 12px; }

/* pull page-specific headline styles onto the shared type system */
.intro h1, .section-heading h2, .milestone-main h3, .hero h1 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.hero h1 span, h1 .fun { color: var(--lamp); }

/* Shared interaction and spacing tokens. Page layouts keep their own geometry. */
:root { --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --radius-control: 6px; --radius-panel: 12px; }
button,input,select,textarea { font-family: var(--body); }
button,a,input,select,summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 4px; }
.site-top { background: var(--night); border-bottom: 1px solid var(--line); padding: 14px 24px; font-family: var(--body); }
.site-top nav { overflow: visible; gap: 24px; align-items: center; mask-image: none; -webkit-mask-image: none; padding: 0; font-size: 14px; }
.site-top .brand { font-family: var(--body); font-size: 15px; letter-spacing: -.03em; }
.site-top nav > a,.nav-more > summary { min-height: 32px; display: flex; align-items: center; }
.nav-more { position: relative; }
.nav-more > summary { cursor: pointer; list-style: none; color: var(--muted); gap: 6px; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: '⌄'; }
.nav-more[open] > summary,.nav-more.is-current > summary { color: var(--lamp); }
.nav-more-menu { position: absolute; right: 0; top: 42px; width: 210px; border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-2); background: var(--panel-solid); box-shadow: 0 14px 32px rgba(0,0,0,.25); }
.site-top .nav-more-menu a { display: block; padding: 10px 12px; border-radius: var(--radius-control); border-bottom: 0; }
.site-top .nav-more-menu a:hover { background: var(--raised); }
.site-bottom { font-size: 13px; padding: 24px; }
.site-bottom .footer-links { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.site-bottom .footer-links a { margin: 0; }
.site-bottom p { margin: 14px auto 0; color: var(--muted); max-width: 70ch; }
@media(max-width:560px) { .site-top { padding: 12px 16px; gap: 12px; }.site-top nav { gap: 12px; font-size: 12px; padding-right: 0; mask-image: none; -webkit-mask-image: none; }.site-top .brand { font-size: 14px; } }
.tools-intro { margin: 32px 0; }
.tools-intro h1 { font-size: clamp(32px,5vw,48px); letter-spacing: -.04em; font-weight: 600; }
.tools-intro p { color: var(--muted); font-size: 17px; }
.tool-directory { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.tool-directory > a { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius-panel); color: var(--ink); text-decoration: none; }
.tool-directory > a:hover { border-color: var(--lamp); }
.tool-directory h2 { font-size: 22px; font-weight: 500; margin: 0; }
.tool-directory p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.6; }
.tool-directory span { margin-top: auto; color: var(--lamp); font-size: 14px; }
.tool-notes { margin-top: 32px; }
.tool-notes > summary { cursor: pointer; color: var(--muted); font-size: 14px; }
@media(max-width:700px) { .tool-directory { grid-template-columns: 1fr; }.tool-directory > a { padding: 20px; } }
.eyebrow,.kicker,.tool-tag,.section-index { font-family: var(--body); text-transform: none; letter-spacing: normal; color: var(--muted); }
.site-top nav > a,.nav-more > summary,.site-top .nav-more-menu a { min-height: 44px; }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }

/* Measured from Base's public marketing site on 2026-10-04.
   Token provenance: docs/base-design-reference.json. No Base logo/font assets. */
:root { --radius-control: 8px; --radius-panel: 16px; }
body { font-size: 16px; line-height: 1.5; letter-spacing: .2px; }
h1,h2,h3 { color: var(--brand-foreground); font-family: var(--body); font-weight: 600; letter-spacing: normal; }
h1 { font-size: clamp(36px,5vw,48px); line-height: 1.1; }
h2 { line-height: 1.2; }
.site-top { background: var(--charcoal); border-bottom: 0; color: #fff; padding: 12px 32px; }
.site-top .brand,.site-top .brand span { color: #fff; }
.site-top nav > a,.nav-more > summary { color: #fff; font-weight: 500; }
.site-top nav > a:hover,.nav-more[open] > summary,.nav-more.is-current > summary { color: var(--brand); }
.site-top nav > a[aria-current=page] { color: var(--brand); border-bottom-color: var(--brand); }
.nav-more-menu { background: #fff; box-shadow: 0 8px 24px rgba(41,40,38,.12); }
.site-top .nav-more-menu a { color: var(--charcoal); }
.site-top .nav-more-menu a[aria-current=page] { color: var(--brand-foreground); background: #d6f0b4; }
.site-top .nav-more-menu a:hover { background: var(--surface); }
.site-bottom { background: var(--surface); }
.card,.tile,.panel,.metric-card,.milestone-detail,.physical-meter,.scoreboard,.contribution-detail,.stat { background: var(--surface-raised); border-color: var(--line); box-shadow: none; border-radius: var(--radius-panel); }
.btn,.button { background: var(--brand); color: var(--brand-foreground); border: 1px solid transparent; border-radius: var(--radius-control); font-weight: 600; }
.btn:hover,.button:hover { background: #d6f0b4; color: var(--brand-foreground); }
input,select,textarea { color-scheme: light; color: var(--ink); background-color: #fff; border-color: var(--line); border-radius: var(--radius-control); }
input[type=range] { accent-color: var(--brand-foreground); }
.hero h1,.intro h1,.section-heading h2 { color: var(--brand-foreground); font-weight: 600; letter-spacing: normal; }
.eyebrow,.kicker,.tool-tag,.section-index { color: var(--muted); }
.tool-directory > a { background: #fff; border-radius: 16px; border-color: transparent; padding: 32px; }
.tool-directory > a:hover { border-color: var(--brand-foreground); }
.tool-directory h2 { font-size: 24px; font-weight: 600; }
.tool-directory span { font-weight: 600; }
.plot text,.chart text,.climb-map text { fill: var(--muted); }
.rung.here,.rung.lit { box-shadow: none; }
.readout,.formula,.stat { color: var(--ink); }
@media(max-width:560px) { .site-top { padding: 10px 16px; }.site-top nav { gap: 12px; }.tool-directory > a { padding: 24px; } }

/* Bring legacy illustrations and controls onto the same light surfaces. */
.field select { background: #fff; border-radius: var(--radius-control); }
.alert { background: #fbe9e6; color: #a12e26; }
.seg-btn[aria-pressed="true"] { background: var(--brand); color: var(--brand-foreground); border-color: transparent; }
.vc-chart,.vc-head { background: #fff; }
.vc-plot .lab { stroke: #fff; }
.vc-plot .dot { stroke: #fff; }
.vc-plot .ax { stroke: var(--line); }
.vc-plot .badge { fill: var(--brand); }
.day-chart .dl.short { fill: #a12e26; }
.day-chart .dl.bat,.day-chart .dl.charge { fill: var(--brand-foreground); }
.n-grid,.n-house { fill: #fff; stroke: var(--muted); }
.n-grid.short { fill: #d6f0b4; }
.n-grid.down { fill: #fbe9e6; }
.n-bat { stroke: var(--muted); }
.n-win { fill: var(--line); }
.n-win.on { fill: var(--brand); }

.intro h1 { font-size: clamp(36px,5vw,48px); line-height: 1.1; }
