/* ─── base.css ────────────────────────────────────────────────────────────────
   v2 foundation: design tokens, fonts, reset, and the site chrome shared by
   every v2 page (header, footer, console frame, mascot). Load before site.css.

   Pruned from the Claude Design export's moltsets-base.css down to the rules
   the v2 pages actually use. The legacy /moltsets-base.css still serves the
   pages that haven't moved to v2 yet - don't edit that one for v2 work.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand:          rgb(244,128,93);
  --brand-stroke:   rgb(249,115,22);
  --brand-tint:     rgb(245,141,109);
  --brand-dim:      rgb(220,115,84);
  --brand-bg:       rgb(57,41,29);
  --brand-line:     rgba(244,128,93,.35);   /* dashed section/list rules */
  --brand-line-strong: rgba(244,128,93,.55);
  /* Ink - dark text on the solid orange band and featured cards */
  --ink:            rgb(22,10,6);
  --ink-body:       rgba(22,10,6,.82);
  --ink-muted:      rgba(22,10,6,.72);   /* lowest strength that passes 4.5:1 on the brand orange for small text */
  --ink-line:       rgba(22,10,6,.35);
  /* Surfaces */
  --bg-base:        rgb(10,11,14);
  --bg-elevated:    rgb(30,30,30);
  --bg-terminal:    rgba(244,128,93,0.10);
  /* Foreground */
  --fg-primary:     rgb(241,245,249);
  --fg-secondary:   rgb(203,213,225);
  --fg-muted:       rgb(148,163,184);
  --fg-subdued:     rgb(153,161,175);
  /* Semantic */
  --success:        rgb(52,211,153);
  --hint:           rgb(253,224,71);
  --danger:         rgb(248,113,113);
  /* Dividers */
  --divider-dim:    rgba(206,206,206,0.25);
  /* Typography */
  --font-mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  /* Layout */
  --wrap:           1280px;
}

/* ── SF Mono ───────────────────────────────────────────────────────────────── */
@font-face { font-family:'SF Mono'; font-weight:300; src:url('/https/moltsets.com/fonts/SF-Mono-Light.woff2') format('woff2'), url('/https/moltsets.com/fonts/SF-Mono-Light.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'SF Mono'; font-weight:400; src:url('/https/moltsets.com/fonts/SF-Mono-Regular.woff2') format('woff2'), url('/https/moltsets.com/fonts/SF-Mono-Regular.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'SF Mono'; font-weight:500; src:url('/https/moltsets.com/fonts/SF-Mono-Medium.woff2') format('woff2'), url('/https/moltsets.com/fonts/SF-Mono-Medium.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'SF Mono'; font-weight:600; src:url('/https/moltsets.com/fonts/SF-Mono-Semibold.woff2') format('woff2'), url('/https/moltsets.com/fonts/SF-Mono-Semibold.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'SF Mono'; font-weight:700; src:url('/https/moltsets.com/fonts/SF-Mono-Bold.woff2') format('woff2'), url('/https/moltsets.com/fonts/SF-Mono-Bold.otf') format('opentype'); font-display:swap; }
@font-face { font-family:'SF Mono'; font-weight:800; src:url('/https/moltsets.com/fonts/SF-Mono-Heavy.woff2') format('woff2'), url('/https/moltsets.com/fonts/SF-Mono-Heavy.otf') format('opentype'); font-display:swap; }

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg-base);
  color: var(--fg-primary);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; min-height: 100vh; }
.page-bg {
  /* Dot grid, drawn in CSS (was bg-texture-dark.png): a 3px square of
     rgb(16,16,16) in the top-left corner of every 15px tile. The conic
     gradient is centred on the square's inner corner, so the quarter from
     270deg to 360deg (up and to the left) is the square. */
  background-image: repeating-conic-gradient(at 3px 3px, transparent 0 270deg, rgb(16,16,16) 0 360deg);
  background-size: 15px 15px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--fg-secondary); }
em { font-style: normal; }

/* Visually hidden but still read by screen readers and crawlers */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ── Buttons (small - header) ──────────────────────────────────────────────── */
.btn-text {
  background: transparent; border: none; cursor: pointer;
  font: 400 12px/1 var(--font-mono); color: var(--fg-primary);
  padding: 5px clamp(4px, 1vw, 14px); display: inline-flex; align-items: center; gap: 6px;
  transition: color 60ms steps(1); white-space: nowrap; text-decoration: none;
}
.btn-text:hover,
.btn-text.accent { color: var(--brand); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: var(--bg-base);
  border: none; cursor: pointer; text-decoration: none;
  font: 400 12px/1 var(--font-mono); padding: 5px 14px;
  transition: background 60ms steps(1); white-space: nowrap;
}
.btn-primary:hover  { background: var(--brand-tint); color: var(--bg-base); }
.btn-primary:active { background: var(--brand-dim); }

/* Masked icon that takes the text colour. Pick the glyph with a modifier. */
.btn-icon {
  display: block; flex-shrink: 0; width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: var(--icon) center/contain no-repeat;
  mask: var(--icon) center/contain no-repeat;
}
.btn-icon--chevron { --icon: url('/https/moltsets.com/assets/icons/chevron-right.svg'); }
.btn-icon--external { --icon: url('/https/moltsets.com/assets/icons/external-link.svg'); }   /* opens in a new tab */

/* ── Header ────────────────────────────────────────────────────────────────── */
.mh {
  height: 48px; flex-shrink: 0;
  background: var(--bg-elevated);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 32px; position: relative;
}
.mh-logo   { display: flex; align-items: center; justify-self: start; }
.logo-type { font: 700 18px/1 var(--font-mono); color: var(--brand); display: flex; align-items: center; }
.logo-mark { display: flex; align-items: center; margin-left: 3px; }
.mh-nav    { display: flex; align-items: center; gap: clamp(10px, 1.8vw, 32px); }
.mh-right  { display: flex; gap: 12px; align-items: center; justify-self: end; }

/* Resources dropdown - opens on hover (CSS) or click (.open, site.js) */
.mh-sub { position: relative; display: inline-flex; align-items: center; }
.mh-sub-caret {
  display: block; width: 16px; height: 16px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url('/https/moltsets.com/assets/icons/chevron-down.svg') center/contain no-repeat;
  mask: url('/https/moltsets.com/assets/icons/chevron-down.svg') center/contain no-repeat;
  transition: transform 60ms steps(1);
}
.mh-sub.open > .mh-sub-trigger,
.mh-sub:hover > .mh-sub-trigger { color: var(--brand); }
.mh-sub.open .mh-sub-caret,
.mh-sub:hover .mh-sub-caret { transform: rotate(180deg); }
.mh-sub-panel {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 180px; padding: 6px 0; z-index: 250;
  background: var(--bg-elevated); border: 1px solid var(--brand);
  display: none; flex-direction: column;
}
.mh-sub.open > .mh-sub-panel,
.mh-sub:hover > .mh-sub-panel { display: flex; }
.mh-sub-panel a {
  font: 400 12px/1 var(--font-mono); color: var(--fg-primary);
  padding: 8px 16px; white-space: nowrap;
  transition: color 60ms steps(1), background 60ms steps(1);
}
.mh-sub-panel a:hover { color: var(--brand); background: rgba(244,128,93,0.08); }
.mh-sub-panel a[aria-current="page"] { color: var(--brand); }

/* Burger + mobile panel. Links reveal with a CSS stagger, no JS text animation. */
.mh-burger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; gap: 4px; flex-direction: column; justify-content: center;
}
.mh-burger span {
  display: block; width: 18px; height: 2px; background: var(--fg-primary);
  transform-origin: center; transition: transform 130ms steps(3), opacity 70ms steps(1);
}
.mh-burger:hover span { background: var(--brand); }
.mh-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mh-burger.open span:nth-child(2) { opacity: 0; }
.mh-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mh-mpanel { display: none; }
.mh-mlogin { display: none; }   /* mobile-menu "log in": phones only (below), beside the button otherwise */

@media (max-width:1040px) {
  .mh { display: flex; justify-content: space-between; }
  .mh-nav { display: none; }
  .mh-burger { display: flex; order: 3; }
  .mh-right > .btn-primary { display: none; order: 1; }
  .mh-mpanel { display: flex; flex-direction: column; background: var(--bg-elevated); }
  .mh-mpanel-nav { display: flex; flex-direction: column; overflow: hidden; }
  .mh-mlink {
    display: flex; align-items: center; gap: 10px; width: 100%;
    max-height: 0; opacity: 0; overflow: hidden; padding: 0 24px;
    color: var(--fg-primary); font: 400 16px/1 var(--font-mono);
    transition: max-height 0ms, padding 0ms, opacity 0ms;
  }
  .mh-mpanel.open .mh-mlink { max-height: 60px; opacity: 1; padding: 14px 24px; }
  .mh-mpanel.open .mh-mlink:nth-child(2)  { transition-delay: 60ms; }
  .mh-mpanel.open .mh-mlink:nth-child(3)  { transition-delay: 120ms; }
  .mh-mpanel.open .mh-mlink:nth-child(4)  { transition-delay: 180ms; }
  .mh-mpanel.open .mh-mlink:nth-child(5)  { transition-delay: 240ms; }
  .mh-mpanel.open .mh-mlink:nth-child(6)  { transition-delay: 300ms; }
  .mh-mpanel.open .mh-mlink:nth-child(7)  { transition-delay: 360ms; }
  .mh-mpanel.open .mh-mlink:nth-child(8)  { transition-delay: 420ms; }
  .mh-mpanel.open .mh-mlink:nth-child(n+9) { transition-delay: 480ms; }
  .mh-mlink:hover,
  .mh-mlink[aria-current="page"] { color: var(--brand); }
  .mh-msection { background: none; border: 0; text-align: left; cursor: pointer; }
  .mh-mcaret {
    display: block; width: 14px; height: 14px; flex-shrink: 0; background: currentColor;
    -webkit-mask: url('/https/moltsets.com/assets/icons/chevron-down.svg') center/contain no-repeat;
    mask: url('/https/moltsets.com/assets/icons/chevron-down.svg') center/contain no-repeat;
    transition: transform 130ms steps(3);
  }
  .mh-msection[aria-expanded="true"] .mh-mcaret { transform: rotate(180deg); }
  .mh-msub { color: var(--fg-secondary); }
  .mh-mpanel.open .mh-msub { padding-left: 44px; }
  /* Sections start collapsed; site.js adds .show to a section's links */
  .mh-mpanel.open .mh-msub:not(.show) { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
  .mh-mpanel.open .mh-msub.show { transition-delay: 0ms; }
  .mh-mpanel-cta { margin: 14px 24px 18px; justify-content: center; }
}
@media (min-width:601px) and (max-width:1040px) {
  .mh-right > .btn-primary { display: inline-flex; }
  .mh-mpanel-cta { display: none; }
  .mh-mlogin { display: none; }   /* log in sits beside the button at this width */
}
@media (max-width:600px) {
  .mh { padding: 0 16px; }
  .mh-mpanel.open .mh-mlink { padding-left: 16px; padding-right: 16px; }
  .mh-mpanel.open .mh-msub { padding-left: 36px; }
  .mh-mpanel-cta { margin: 8px 16px 12px; }
  .mh-right > .mh-login { display: none; }   /* the button moves into the menu here, so log in does too */
  .mh-mlogin { display: flex; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.mf {
  margin-top: auto;
  background: var(--bg-elevated); border-top: 1px dashed var(--brand-bg);
  font-size: 13px; color: var(--fg-secondary);
}
.mf-in { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.mf-in > * { padding: 36px 0; }
.mf-in > * + * { border-top: 1px dashed var(--brand-bg); }
.mf-brand { display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; }
.mf-id { display: flex; flex-direction: column; gap: 16px; }
.mf-line { margin: 0; max-width: 44ch; font-size: 14px; line-height: 1.6; color: var(--fg-primary); }
.mf-foot { padding: 24px 0; display: flex; align-items: center; justify-content: space-between; }
.mf-social { display: flex; gap: 16px; margin-left: auto; }
.mf-social a { display: flex; color: var(--fg-secondary); }
.mf-social a:hover { color: var(--brand); }
.mf-social svg { width: 20px; height: 20px; }
.mf-top {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px dashed var(--brand-line-strong); color: var(--fg-primary) !important;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.mf-top:hover { border-color: var(--brand); color: var(--brand) !important; }
.mf-arc { display: inline-flex; align-items: center; }
.mf-arc [data-ms-egg] > * { margin-left: 8px; }   /* on the icon, so no gap when it isn't there (arcade pages, touch) */
.mf-arc a { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.mf-arc a:hover, .mf-arc a[aria-current="page"] { color: var(--brand); }
.mf-top-caret { width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: translateY(2px) rotate(45deg); }
.mf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.mf-h { margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.mf-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mf a { color: var(--fg-secondary); }
.mf-col a:hover { color: var(--brand); }
.mf-col a[aria-current="page"] { color: var(--fg-primary); text-decoration: underline; text-underline-offset: 4px; }
.mf-band {
  position: relative; padding: 8px 32px; text-align: center;
  background: var(--brand); color: var(--ink-body); font-size: 11px;
}
@media (max-width:1040px) {
  .mf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
}
@media (max-width:600px) {
  .mf-in { padding: 0 16px; }
  .mf-in > * { padding: 28px 0; }
  .mf-foot { padding: 20px 0; }
  .mf-brand { flex-direction: column; align-items: flex-start; }
  .mf-social { margin-left: 0; }
  .mf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mf-band { padding: 8px 16px; }
}

/* ── Console frame (.app-box) ──────────────────────────────────────────────── */
.app-box {
  position: relative; display: flex; flex-direction: column;
  max-width: 100%; margin: 0 auto;
  border: 1px dashed var(--brand); background: var(--bg-base);
}
/* Corner marks - also used on cards */
.cm { position: absolute; width: 8px; height: 8px; border: 2px solid var(--brand); pointer-events: none; }
.cm.tl { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; }
.cm.tr { top: -1px; right: -1px; border-left: 0;  border-bottom: 0; }
.cm.bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.cm.br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

.ab-top {
  height: 28px; flex-shrink: 0; padding: 0 16px;
  border-bottom: 1px solid var(--brand);
  display: flex; align-items: center; gap: 16px;
}
.ab-title {
  flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--fg-subdued); font: 400 14px/1 var(--font-mono);
}
.traffic { display: flex; gap: 6px; flex-shrink: 0; }
.dot {
  display: block; width: 12px; height: 12px; border-radius: 9999px;
  -webkit-mask: url('/https/moltsets.com/assets/icons/circle-filled.svg') center/contain no-repeat;
  mask: url('/https/moltsets.com/assets/icons/circle-filled.svg') center/contain no-repeat;
}
.dot.r { background: var(--danger); }
.dot.y { background: var(--hint); }
.dot.g { background: var(--success); }
/* "live" tag at the right of a title bar, with a blinking square
   (homepage hero, /our-data/updates/) */
.ab-live { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; font: 700 11px/1 var(--font-mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--success); }
.ab-live-sq { width: 6px; height: 6px; background: var(--success); animation: live-blink 1.2s steps(1) infinite; }
@keyframes live-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ab-live-sq { animation: none; } }

/* ── Mascot (image-only animation, played by site.js) ──────────────────────── */
.mascot-stage { position: relative; width: 137px; height: 175px; flex-shrink: 0; }
.mascot-stage img { width: 137px; height: 175px; image-rendering: pixelated; display: block; }
.mascot-stage .mf-frame { position: absolute; inset: 0; opacity: 0; }
.mascot-stage .mf-frame.active { opacity: 1; }

