/* ------------------------------------------------------------------
   TYPOGRAPHY — no webfonts are shipped.

   The 1995-1999 web was built from the fonts already on the machine, so
   Pulse is too: MS Sans Serif / Tahoma for body copy, Arial Black for
   headings, Courier New for numbers and metadata. That means zero font
   requests, zero licensing, and a page that renders identically offline.
   ------------------------------------------------------------------ */

/* ------------------------------------------------------------------
   DESIGN TOKENS

   One token vocabulary, two schemes:

     :root              → the canonical Windows 95 "silver" scheme
     [data-theme=dark]  → a period-correct dark scheme: black desktop
                          with a 256-colour neon palette, the way a 1997
                          personal page looked at 2am.

   Every colour is a flat, opaque, maximum-saturation period value —
   the web-safe cube plus the Windows system palette. Nothing is
   translucent and nothing is blended; --*-glow tokens are solid tints
   used as fills behind their matching accent.
   ------------------------------------------------------------------ */
:root {
  color-scheme: light;

  /* --- desktop & chrome --- */
  --bg: #c0c0c0;
  --bg2: #c0c0c0;
  --bg3: #dfdfdf;
  --chrome: #c0c0c0;
  --surface: #ffffff;
  --surface-hover: #dfdfdf;
  --glass: #ffffff;
  --glass-strong: #dfdfdf;
  --glass-input: #ffffff;
  --row-alt: #e8e8e8;
  --tile: #b8b8b8;

  /* --- lines --- */
  --stroke: #808080;
  --stroke-strong: #000000;
  --stroke-glow: #000080;

  /* --- text --- */
  --text: #000000;
  --text-bright: #000000;
  --muted: #000000;
  --faint: #404040;
  --on-accent: #ffffff;

  /* --- accents (readable as text on white and on silver) --- */
  --cyan: #0000ff;
  --cyan-glow: #ccccff;
  --violet: #800080;
  --violet-glow: #ffccff;
  --green: #005500;
  --green-glow: #ccffcc;
  --amber: #7a3b00;
  --amber-glow: #ffffcc;
  --red: #990000;
  --red-glow: #ffcccc;
  --blue: #005555;
  --blue-glow: #ccffff;

  /* --- pure web-safe values, for decoration only --- */
  --yellow: #ffff00;
  --navy: #000080;
  --pixel-white: #ffffff;
  --pixel-black: #000000;
  --pixel-red: #ff0000;
  --pixel-green: #00ff00;
  --pixel-blue: #0000ff;
  --pixel-magenta: #ff00ff;
  --pixel-cyan: #00ffff;

  /* --- hyperlink progression: blue → purple → red --- */
  --link: #0000ff;
  --link-visited: #800080;
  --link-hover: #ff0000;

  /* --- the 3D bevel: top/left light, bottom/right shadow --- */
  --bevel-hi: #ffffff;
  --bevel-lo: #808080;
  --bevel-inner-hi: #dfdfdf;
  --bevel-inner-lo: #404040;

  /* --- inset (sunken) field --- */
  --field-bg: #ffffff;

  /* --- window chrome --- */
  --titlebar-from: #000080;
  --titlebar-to: #1084d0;
  --titlebar-text: #ffffff;
  --panel: #ffffcc;
  --panel-text: #000000;

  /* --- type --- */
  --font: "MS Sans Serif", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-head: "Arial Black", "Arial Bold", Impact, Haettenschweiler, sans-serif;
  --mono: "Courier New", Courier, monospace;

  /* --- depth: hard-edged, never blurred --- */
  --shadow-main: 3px 3px 0 var(--bevel-inner-lo);
  --shadow-card: 1px 1px 0 var(--bevel-lo);
  --radius: 0px;
  --radius-sm: 0px;
  --radius-lg: 0px;
  --radius-pill: 0px;
}

[data-theme="dark"] {
  color-scheme: dark;

  /* --- desktop & chrome --- */
  --bg: #000000;
  --bg2: #000000;
  --bg3: #1a1a1a;
  --chrome: #1a1a1a;
  --surface: #101010;
  --surface-hover: #2b2b2b;
  --glass: #1a1a1a;
  --glass-strong: #2b2b2b;
  --glass-input: #000000;
  --row-alt: #1a1a1a;
  --tile: #141414;

  /* --- lines --- */
  --stroke: #404040;
  --stroke-strong: #808080;
  --stroke-glow: #00ffff;

  /* --- text --- */
  --text: #ffffff;
  --text-bright: #ffffff;
  --muted: #c0c0c0;
  --faint: #8a8a8a;
  --on-accent: #000000;

  /* --- accents: the bright half of the 256-colour cube --- */
  --cyan: #00ffff;
  --cyan-glow: #003333;
  --violet: #ff00ff;
  --violet-glow: #330033;
  --green: #00ff00;
  --green-glow: #003300;
  --amber: #ffff00;
  --amber-glow: #333300;
  --red: #ff6666;
  --red-glow: #330000;
  --blue: #00aaff;
  --blue-glow: #002233;

  --link: #00ffff;
  --link-visited: #ff00ff;
  --link-hover: #ffff00;

  /* bevels invert on a black desktop */
  --bevel-hi: #808080;
  --bevel-lo: #000000;
  --bevel-inner-hi: #404040;
  --bevel-inner-lo: #000000;
  --field-bg: #000000;

  --titlebar-from: #000080;
  --titlebar-to: #1084d0;
  --titlebar-text: #ffffff;
  --panel: #1a1a00;
  --panel-text: #ffff00;

  --shadow-main: 3px 3px 0 #000000;
  --shadow-card: 1px 1px 0 #000000;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

/* No border-radius existed in 1995 — enforce it once, globally, rather
   than repeating it on every component. */
*, *::before, *::after { border-radius: 0; }

/* State changes are instant. Animation is reserved for the deliberately
   decorative layer (marquee, rainbow, blink, counters). */
*, *::before, *::after {
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

/* The body must be allowed to grow with its content: pinning it to the
   viewport height turns it into a nested scroll container and the document
   stops scrolling, which breaks window.scrollTo() and scroll restoration. */
html { height: 100%; }
body { min-height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
-webkit-font-smoothing: auto;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: var(--bg);
  font-size: 15px;
}

/* The desktop: a tiled 4px diagonal cross-hatch. Never flat. */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, var(--tile) 25%, transparent 25%),
    linear-gradient(-45deg, var(--tile) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--tile) 75%),
    linear-gradient(-45deg, transparent 75%, var(--tile) 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
}

::-webkit-scrollbar {width: 16px; height: 8px;
  height: 16px;
}
::-webkit-scrollbar-thumb {
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
::-webkit-scrollbar-track { background: var(--row-alt); }
::-webkit-scrollbar-corner { background: var(--chrome); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}
a {
  color: var(--link);
  text-decoration: underline;   /* never removed, in any state */
}
a:visited { color: var(--link-visited); }
a:hover, a:active { color: var(--link-hover); }
a:focus-visible { outline: 2px dotted var(--text); outline-offset: 2px; }
input, select, textarea {
  font-family: inherit;
color: var(--text);
background: var(--field-bg);
border: 2px solid;
padding: 6px 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  box-shadow: inset 1px 1px 0 var(--bevel-inner-lo);
}
input:focus, select:focus, textarea:focus {
  outline: 2px dotted var(--text);
  outline-offset: -5px;
}

.app {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
}

/* ============ TOPBAR ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
padding: 8px 16px;
background: linear-gradient(90deg, var(--titlebar-from), var(--titlebar-to));
border-bottom: 2px solid var(--bevel-lo);
box-shadow: inset 1px 1px 0 var(--bevel-inner-hi);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.brand .logo {
width: 28px;
height: 28px;
  transition: transform 0.25s ease;
}

.brand .name {
  font-weight: 800;
letter-spacing: 0.02em;
font-size: 18px;
color: var(--titlebar-text);
  display: flex;
  align-items: center;
  font-family: var(--font-head);
  text-transform: uppercase;
}
.brand .name span {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-left: 8px;
  text-transform: uppercase;
  background: var(--chrome);
  padding: 2px 7px;
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  color: var(--text);
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 440px;
  margin: 0 16px;
}
@media (max-width: 768px) {
  .topbar-center { display: none; }
}

.search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
padding: 6px 10px;
background: var(--field-bg);
border: 2px solid;
color: var(--text);
  font-size: 13px;
  transition: all 0.2s ease;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  box-shadow: inset 1px 1px 0 var(--bevel-inner-lo);
}
.search-trigger:hover {
  background: var(--panel);
}
.search-trigger svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.search-trigger .kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
background: var(--chrome);
border: 1px solid var(--stroke);
  padding: 2px 6px;
color: var(--text);
}

.topstatus {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.live-ind {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.live-ind .dot {
  width: 7px;
  height: 7px;
  background: var(--green);

  animation: pulse-dot 2s infinite ease-in-out;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.4; }
}

.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--muted);
  transition: all 0.2s;
}
.topbar-btn:hover {
  background: var(--glass-strong);
  color: var(--text-bright);
  border-color: var(--stroke-strong);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  transition: all 0.2s;
}
.user-badge:hover {
  border-color: var(--stroke-strong);
  background: var(--glass-strong);
}
.user-badge img {
  width: 26px;
  height: 26px;
}
.user-badge .user-login {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 20px 14px 24px;
  position: sticky;
  top: 61px;
  height: calc(100vh - 61px);
border-right: 2px groove var(--bevel-lo);
background: var(--chrome);
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
@media (min-width: 900px) {
  .sidebar { display: flex; }
}

.nav-label {
  font-size: 10px;
  letter-spacing: 0.18em;
color: var(--text);
  padding: 14px 12px 6px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-head);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
color: var(--text);
font-weight: 700;
font-size: 13px;
  transition: all 0.18s ease;
  position: relative;
  border: 2px solid transparent;
}
.nav-item:hover {
  background: var(--chrome);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  color: var(--text);
}
.nav-item.active {
  background: var(--navy);
  color: var(--pixel-white);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.nav-item .ic {
  width: 20px;
  height: 20px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-item .ic svg {
  width: 18px;
  height: 18px;
  display: block;
}
.nav-item.active .ic { color: var(--pixel-white); opacity: 1; }

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -2px;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  opacity: 0.9;
  flex-shrink: 0;
}
.stat-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.badge svg {
  width: 22px;
  height: 22px;
  display: block;
}

.feed-item .fdot svg {
  width: 13px;
  height: 13px;
  display: block;
}

.inspector-stat .val {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inspector-stat .val svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--glass-strong);
border: 1px solid var(--stroke);
  color: var(--faint);
}
.nav-item.active .nav-badge {
  color: var(--cyan);
  border-color: var(--cyan);
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 12px 0;
border-top: 2px groove var(--bevel-lo);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-foot .foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============ MOBILE NAV ============ */
.mobilenav {
  position: fixed;
  bottom: 12px;
  left: 14px;
  right: 14px;
  z-index: 60;
  display: flex;
background: var(--chrome);
border: 2px solid;
  padding: 6px 8px;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow-main);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
@media (min-width: 900px) {
  .mobilenav { display: none; }
}

.mnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s;
}
.mnav-item svg { width: 20px; height: 20px; }
.mnav-item:hover, .mnav-item.active {
  color: var(--pixel-white);
  background: var(--navy);
}

/* ============ STAGE ============ */
.stage {
  flex: 1;
  padding: 24px 20px 120px;
  min-width: 0;
}
@media (min-width: 900px) {
  .stage { padding: 30px 40px 60px; }
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 50vh;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.25em;
  font-size: 12px;
}
.pulse-ring {
  width: 40px;
  height: 40px;
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  background: var(--navy);
  animation: retro-throb 1s steps(2, end) infinite;
}
@keyframes retro-throb {
  0% { background: var(--navy); }
  50% { background: var(--cyan); }
  100% { background: var(--navy); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ REPO PILL ============ */
.repo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  box-shadow: var(--shadow-card);
}
.repo-pill:hover {
  border-color: var(--stroke-strong);
  background: var(--glass-strong);
  transform: translateY(-1px);
}
.repo-pill .caret { width: 14px; height: 14px; color: var(--muted); }
.repo-pill .all {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ============ ACTION BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
font-size: 12px;
font-weight: 700;
background: var(--chrome);
border: 2px solid;
color: var(--text);
  transition: all 0.2s;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  box-shadow: inset 1px 1px 0 var(--bevel-inner-hi), inset -1px -1px 0 var(--bevel-inner-lo);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn:hover { background: var(--surface-hover); }
.btn-primary {
  background: var(--navy);
  color: var(--pixel-white);
  border-color: #5555ff #000040 #000040 #5555ff;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}

/* ============ BENTO GRID ============ */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  /* Panels size to their content, the way a Win95 dialog does — a short
     metric no longer stretches into a tall empty box. */
  align-items: start;
}
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(4, 1fr); } }

.card {
background: var(--chrome);
border: 2px solid;
padding: 4px 4px 12px;
  position: relative;
  overflow: hidden;
box-shadow: inset 1px 1px 0 var(--bevel-inner-hi);
  transition: border-color 0.22s, background 0.22s, transform 0.22s, box-shadow 0.22s;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.card:hover { border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, var(--titlebar-from), var(--titlebar-to));
  color: var(--titlebar-text);
  padding: 4px 6px;
  margin: -4px -4px 12px;
}
.card-head > *:not(.card-title):not(.btn) { color: var(--titlebar-text) !important; }
.card-title {
font-size: 12px;
letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
color: var(--titlebar-text);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
}
.card-title .tag {
  width: 9px;
  height: 9px;
  border: 1px solid var(--titlebar-text);
}
.metric {
font-family: var(--mono);
font-size: 40px;
font-weight: 700;
letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 12px;
color: var(--text-bright);
}
.metric small {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}
.metric-sub {
  font-size: 12px;
  color: var(--faint);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.delta {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  font-weight: 700;
}
.delta.up { color: var(--green); background: var(--green-glow); }
.delta.down { color: var(--red); background: var(--red-glow); }

@media (min-width: 640px) { .col2 { grid-column: span 2; } }
@media (min-width: 1024px) {
  .col3 { grid-column: span 3; }

}

/* ============ SECTION HEADER ============ */
.section { margin-bottom: 28px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border-bottom: 4px groove var(--bevel-lo);
  padding-bottom: 12px;
}
.section-head h1 {
font-size: 34px;
  font-weight: 800;
letter-spacing: 0.01em;
  color: var(--text-bright);
  font-family: var(--font-head);
  text-transform: uppercase;
}
.section-head h1 small {
  display: block;
  font-size: 13px;
font-weight: 700;
color: var(--muted);
  letter-spacing: 0;
  margin-top: 4px;
}
.section-head .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============ SEARCH & CONTROLS BAR ============ */
.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 480px;
}
.search-box input {
  width: 100%;
  padding-left: 36px;
  height: 40px;
}
.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 6px 12px;
  font-size: 12px;
font-weight: 700;
background: var(--chrome);
border: 2px solid;
color: var(--text);
  transition: all 0.18s;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.filter-pill:hover, .filter-pill.active {
  background: var(--navy);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  color: var(--pixel-white);
}

/* ============ MINI LIST ============ */
.mini-list {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  gap: 6px;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
background: var(--row-alt);
border: 1px solid var(--stroke);
  transition: all 0.18s;
  cursor: pointer;
}
.mini-row:hover { background: var(--navy); color: var(--pixel-white); }
.mini-row:hover .meta .t, .mini-row:hover .meta .s { color: var(--pixel-white); }
.mini-row .av {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.mini-row .meta { flex: 1; min-width: 0; }
.mini-row .meta .t {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-row .meta .s {
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.mini-row .r {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ============ COMMIT PULSE & BARS ============ */
.bars-wrap {
  margin-top: 16px;
}
.bars-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  margin-bottom: 8px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--stroke);
}
.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.bar {
  width: 100%;
  background: var(--cyan);
  min-height: 4px;
  transition: height 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.2s;
}
.bar-col:hover .bar {
}
.bar-col .bar-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--bg2);
  border: 1px solid var(--stroke-strong);
  padding: 4px 8px;
  font-size: 10.5px;
  font-family: var(--mono);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
  box-shadow: var(--shadow-card);
}
.bar-col:hover .bar-tooltip {
  opacity: 1;
}

/* ============ ACTIVITY HEATMAP ============ */
.heatmap-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 4px;
}
.heat-cell {
  width: 12px;
  height: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  transition: transform 0.15s, border-color 0.15s;
  cursor: pointer;
}
.heat-cell:hover {
  transform: scale(1.3);
  z-index: 2;
  border-color: var(--cyan);
}
/* Four discrete steps, not a fade — 1997 had no alpha compositing. */
.heat-cell[data-level="1"] { background: #003366; }
.heat-cell[data-level="2"] { background: #006699; }
.heat-cell[data-level="3"] { background: #0099cc; }
.heat-cell[data-level="4"] { background: #00ccff; }

/* ============ LANGUAGE STACK BAR ============ */
.lang-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  margin-top: 14px;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
}
.lang-seg {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
  position: relative;
}
.lang-seg:hover {
}
.lang-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.lang-item .ldot {
  width: 8px;
  height: 8px;
}
.lang-item b {
  color: var(--text);
  font-family: var(--mono);
}


/* ============ STATUS PILLS ============ */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
letter-spacing: 0.06em;
padding: 3px 8px;
  font-family: var(--mono);
  background: var(--row-alt);
  border: 2px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.status .sdot { width: 7px; height: 7px; border-radius: 50%; }
.status.ok { color: var(--green); background: var(--green-glow); }
.status.ok .sdot { background: var(--green);  }
.status.warn { color: var(--amber); background: var(--amber-glow); }
.status.warn .sdot { background: var(--amber);  }
.status.bad { color: var(--red); background: var(--red-glow); }
.status.bad .sdot { background: var(--red);  }
.status.run { color: var(--blue); background: var(--blue-glow); }
.status.run .sdot { background: var(--blue);  animation: pulse-dot 1.2s infinite; }

/* ============ REPO CARDS ============ */
.repos-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.repo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  cursor: pointer;
  /* keep the standard panel padding so .card-head's title bar spans the
     full card width without overhanging */
  padding: 4px 4px 12px;
}
.repo-card .name {
  font-weight: 800;
  font-size: 16.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-bright);
}
.repo-card .name .dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}
.repo-card .desc {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.repo-card .stats {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.repo-card .stats b { color: var(--text-bright); }
.repo-card .foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
}
/* Language and topic tags. The language's own colour is used as a small
   square swatch rather than as text colour, so the label stays readable in
   both schemes (a pale yellow like #f1e05a is invisible on silver). */
.lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  background: var(--row-alt);
  color: var(--text);
  border: 1px solid var(--stroke);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lang-tag::before {
  content: "";
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  background: var(--lang, var(--faint));
  border: 1px solid var(--stroke-strong);
}
.priv-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  background: var(--row-alt);
  color: var(--text);
  border: 1px solid var(--stroke);
  letter-spacing: 0.06em;
}

/* ============ ACTIVITY FEED ============ */
.feed { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.feed-item {
  display: flex;
  gap: 14px;
  padding: 12px 6px;
  position: relative;
}
.feed-item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -6px;
  width: 2px;
  background: var(--stroke);
}
.feed-item:last-child::before { display: none; }
.feed-item .fdot {
  width: 24px;
  height: 24px;
  background: var(--glass-strong);
  border: 1px solid var(--stroke-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
}
.feed-item .ft { font-size: 13.5px; color: var(--text); }
.feed-item .ft b { color: var(--text-bright); }
.feed-item .fs { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* ============ OVERLAY & MODALS ============ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 700px) {
  .overlay { align-items: center; }
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
background: var(--chrome);
border: 2px solid;
  padding: 24px;
  overflow-y: auto;
  transform: translateY(24px);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
box-shadow: var(--shadow-main);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
@media (min-width: 700px) {
  .sheet {
    transform: translateY(0) scale(0.96);
  }
}
.overlay.open .sheet {
  transform: translateY(0) scale(1);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, var(--titlebar-from), var(--titlebar-to));
  color: var(--titlebar-text);
  padding: 4px 8px;
  margin: -24px -24px 16px;
}
.sheet-title {
  font-weight: 800;
font-size: 15px;
color: var(--titlebar-text);
  font-family: var(--font-head);
  text-transform: uppercase;
}
.sheet-sub {
  font-size: 12.5px;
color: var(--bevel-inner-hi);
  margin-top: 3px;
}
.sheet-close {
width: 24px;
height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
background: var(--chrome);
border: 2px solid;
color: var(--text);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.sheet-close:hover {
  background: var(--glass-strong);
  color: var(--text-bright);
}

.sheet-search {
  margin-bottom: 16px;
}
.sheet-search input {
  width: 100%;
  padding: 10px 14px;
}

.sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
border: 1px solid var(--stroke);
  background: var(--row-alt);
}
.sheet-row:hover { background: var(--navy); color: var(--pixel-white); }
.sheet-row:hover .rmeta .rt, .sheet-row:hover .rmeta .rs { color: var(--pixel-white); }
.sheet-row .rmeta { flex: 1; min-width: 0; }
.sheet-row .rmeta .rt { font-weight: 700; font-size: 14px; color: var(--text-bright); }
.sheet-row .rmeta .rs { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.sheet-row .rstat {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.sheet-row.active {
  background: var(--glass-strong);
  border-color: var(--cyan);
}

/* ============ COMMAND PALETTE ============ */
.palette {
  width: 100%;
  max-width: 580px;
background: var(--chrome);
border: 2px solid;
  overflow: hidden;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  box-shadow: var(--shadow-main);
}
.palette-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--stroke);
  gap: 12px;
}
.palette-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  padding: 0;
  font-size: 16px;
  color: var(--text-bright);
}
.palette-input-wrap input:focus { box-shadow: none; }
.palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 13.5px;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.palette-item:hover, .palette-item.selected {
  background: var(--navy);
  color: var(--pixel-white);
}
.palette-item .item-sub {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.inspector-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-bright);
}

.inspector-stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.inspector-stat .val {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-top: 4px;
}
.clone-box {
background: var(--field-bg);
border: 2px solid;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 16px;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.clone-box code {
  color: var(--cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(20px);
background: var(--panel);
border: 2px solid;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
color: var(--panel-text);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 120;
box-shadow: var(--shadow-main);
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (min-width: 900px) {
  .toast { bottom: 32px; }
}

/* =========================================================
   MOBILE COCKPIT PATCH — thumb-first polish (safe-area + small screens)
   Keeps existing 700/900/1024 breakpoints intact.
   ========================================================= */

/* Prevent horizontal overflow on narrow viewports */
html { scroll-padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
html { overflow-x: hidden; }
html, body { max-width: 100vw; }
.app, .stage, .bento, .repos-grid, .section, .control-bar { min-width: 0; max-width: 100%; }
.card, .repo-card, .sheet, .palette { min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.topbar {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
}
.stage {
  padding-left: calc(20px + env(safe-area-inset-left, 0px));
  padding-right: calc(20px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}
.mobilenav {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: calc(14px + env(safe-area-inset-left, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
}
.sheet, .palette {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 700px) {
  .sheet { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}

/* Repos grid: force single column below 640px (avoid 300px min overflow on 320-375) */
@media (max-width: 639px) {
  .repos-grid { grid-template-columns: 1fr; }
}

/* Metric type scale: 38 → 30 → 26 → 24 for small phones */
@media (max-width: 640px) {
  .stage { padding-top: 16px !important; padding-left: calc(14px + env(safe-area-inset-left, 0px)) !important; padding-right: calc(14px + env(safe-area-inset-right, 0px)) !important; padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important; }
  .bento { grid-template-columns: 1fr !important; gap: 12px; }
  .metric { font-size: 30px; }
  .card { padding: 16px; }
  .section-head h1 { font-size: 22px; }
}
@media (max-width: 430px) {
  .metric { font-size: 26px; }
  .metric small { font-size: 13px; }
  .section-head h1 { font-size: 20px; }
  .card-title { font-size: 10.5px; }
}
@media (max-width: 375px) {
  .metric { font-size: 24px; }
  .topbar { gap: 10px; padding-left: calc(12px + env(safe-area-inset-left, 0px)); padding-right: calc(12px + env(safe-area-inset-right, 0px)); }
  .stage { padding-left: calc(14px + env(safe-area-inset-left, 0px)); padding-right: calc(14px + env(safe-area-inset-right, 0px)); }
  .brand .name { font-size: 17px; }
  .brand .logo { width: 28px; height: 28px; }
}

/* Topbar crowding: hide user login text on narrow phones, keep avatar */
@media (max-width: 480px) {
  .user-badge .user-login { display: none; }
  .user-badge { padding: 3px; gap: 0; }
  .topstatus { gap: 8px; }
  .live-ind { padding: 4px 8px; font-size: 10px; }
  .brand .name span { display: none; }
}
@media (max-width: 380px) {
  .topbar-btn { width: 32px; height: 32px; }
  .topstatus .live-ind span:last-child { display: none; }
}

/* Filter pills: horizontal scroll instead of wrap on mobile */
@media (max-width: 640px) {
  /* One column: search, filter rail, sort. A <select> cannot shrink below
     its content width, so leaving this a wrapping flex row let the sort
     control widen the whole page. */
  .control-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .control-bar > * { min-width: 0; max-width: 100%; }
  .search-box { min-width: 0; max-width: none; }
  .control-bar select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: -4px;
    gap: 6px;
    max-width: 100%;
  }
  .filter-pills::-webkit-scrollbar { display: none; }
  .filter-pill { flex-shrink: 0; white-space: nowrap; }
}

/* Section header: stack nicely on phones */
@media (max-width: 640px) {
  .section-head { gap: 12px; }
  .section-head .actions { width: 100%; justify-content: flex-start; }
  .repo-pill { font-size: 12px; padding: 6px 12px; }
}

/* Cards that use col-span helpers: ensure they don't overflow 1-col grid */
@media (max-width: 639px) {
  .col2, .col3, .col4 { grid-column: span 1; }
}

/* Touch targets: ensure 44px min on mobile */
@media (max-width: 640px) {
  .mnav-item { padding: 8px 10px; min-width: 44px; min-height: 44px; justify-content: center; }
  .btn { min-height: 36px; }
}

/* ===== LIVE WORKFLOW POLLING ===== */
.wf-live { animation: wf-pulse 2s ease-in-out infinite; border-color: var(--cyan) !important; }
@keyframes wf-pulse {
  0%, 100% {  }
  50% {  }
}
.wf-live .status.run .sdot { animation: pulse-dot 1s infinite; }

/* ===== PROFILE README VIEW ===== */
.profile-card {
  overflow: hidden;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--stroke);
  background: var(--panel);
  flex-wrap: wrap;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border: 2px solid var(--stroke);
  object-fit: cover;
}
.profile-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text-bright);
}
.profile-login {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ===== MARKDOWN BODY ===== */
.md-body {
  padding: 22px 24px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.md-body > :first-child { margin-top: 0; }
.md-body > :last-child { margin-bottom: 0; }
.md-h { margin: 1.4em 0 0.6em; font-weight: 800; color: var(--text-bright); line-height: 1.25; }
.md-h1 { font-size: 1.6em; padding-bottom: 0.3em; border-bottom: 1px solid var(--stroke); }
.md-h2 { font-size: 1.35em; }
.md-h3 { font-size: 1.15em; }
.md-h4, .md-h5, .md-h6 { font-size: 1em; }

.md-p { margin: 0 0 0.9em; }
.md-p code, .md-code { font-family: var(--mono); font-size: 0.92em; }
.md-p code {
  background: var(--glass-input);
  border: 1px solid var(--stroke);
  padding: 1px 6px;
}
.md-pre {
  background: #0b0f16;
  border: 1px solid var(--stroke);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 1em;
}
.md-pre .md-code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-bright);
  white-space: pre;
}
.md-img { max-width: 100%; border-radius: 10px; display: block; margin: 0.4em 0; }
.md-quote {
  margin: 0 0 1em;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--cyan);
  color: var(--muted);
}
.md-hr { border: none; border-top: 1px solid var(--stroke); margin: 1.6em 0; }
.md-body ul, .md-body ol { margin: 0 0 0.9em; padding-left: 1.4em; }
.md-body li { margin: 0.25em 0; }
.md-body a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.md-body table { border-collapse: collapse; margin: 0 0 1em; width: 100%; }
.md-body th, .md-body td { border: 1px solid var(--stroke); padding: 7px 12px; font-size: 13.5px; text-align: left; }
.md-body th { background: var(--glass-input); color: var(--text-bright); font-weight: 700; }

/* ===== PUBLIC SHOWCASE (hero, highlights, project groups, about) ===== */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; }
.hero-main { display: flex; gap: 20px; align-items: flex-start; }
.hero-avatar {
  width: 88px; height: 88px; border-radius: 24px; flex-shrink: 0;
border: 2px solid; box-shadow: var(--shadow-card);
  background: var(--glass);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.hero-name {
  font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.1;
letter-spacing: 0.01em; color: var(--text-bright);
  font-family: var(--font-head);
  text-transform: uppercase;
}
.hero-handle { font-family: var(--mono); font-size: 13px; color: var(--cyan); text-decoration: none; }
.hero-handle:hover { text-decoration: underline; }
.hero-bio { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 10px 0 14px; max-width: 58ch; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
border: 2px solid; background: var(--glass);
color: var(--text); font-size: 12px; font-weight: 600;
  background: var(--chrome);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  font-weight: 700;
}
.chip svg { width: 13px; height: 13px; color: var(--cyan); }
.hero-side { display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
.hero-live { border: 1px solid var(--stroke); border-radius: var(--radius); padding: 16px; background: var(--glass); }
.hero-live-sub { font-size: 13px; color: var(--muted); margin: 10px 0 12px; }
.hero-live-sub b { color: var(--text-bright); }
.hero-momentum { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.hero-momentum b { color: var(--cyan); font-size: 16px; margin-right: 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hl-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.hl-card { cursor: pointer; transition: transform 0.18s ease, border-color 0.18s ease; display: flex; flex-direction: column; gap: 10px;
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.hl-card:hover { background: var(--surface-hover); }
.hl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hl-rank { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.12em; }
.hl-title { font-size: 19px; font-weight: 800; color: var(--text-bright); letter-spacing: -0.01em; }
.hl-pitch { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }
.hl-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.hl-foot { display: flex; align-items: center; gap: 14px; font-size: 12px; font-family: var(--mono); color: var(--muted); margin-top: auto; }
.hl-foot .stat-icon { width: 12px; height: 12px; margin-right: 4px; }
.hl-open { margin-left: auto; color: var(--cyan); font-weight: 700; }

.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.group-head h2 { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-bright); margin: 0; }
.group-head span { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

.project-pitch { font-size: 15px; line-height: 1.7; color: var(--text); margin: 14px 0; }
.about-bio { color: var(--text); font-size: 14.5px; line-height: 1.7; margin: 14px 0 0; }
.about-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.about-facts div {
  display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--stroke);
  padding-top: 10px; font-size: 12.5px; color: var(--muted);
}
.about-facts b { color: var(--text-bright); font-family: var(--mono); }
.readme-loading { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; letter-spacing: 0.12em; padding: 18px 0; }
.readme-loading .pulse-ring { width: 18px; height: 18px; }

@media (max-width: 1100px) {
  .hl-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hl-grid, .hl-grid.compact { grid-template-columns: 1fr; }
}

/* ===== MULTI-ACCOUNT ===== */
.account-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px;
border: 2px solid; background: var(--glass);
color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  background: var(--chrome);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.account-pill img { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--stroke); }
.account-pill svg { width: 15px; height: 15px; color: var(--cyan); }
.account-pill:hover { color: var(--text-bright); border-color: var(--stroke-strong); }
.account-pill.active {
color: var(--pixel-white);
  border-color: var(--stroke-strong);
background: var(--navy);
}

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.account-card {
  display: flex; gap: 14px; padding: 14px; border-radius: var(--radius);
border: 2px solid; background: var(--glass);
  cursor: pointer; transition: transform 0.16s ease, border-color 0.16s ease;
  background: var(--row-alt);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.account-card:hover { transform: translateY(-2px); border-color: var(--stroke-glow); }
.account-card.active { border-color: var(--stroke-strong); }
.account-card img { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--stroke); flex-shrink: 0;
  border: 2px solid var(--stroke);
}
.account-meta { min-width: 0; }
.account-name { font-weight: 800; color: var(--text-bright); }
.account-login { display: block; font-family: var(--mono); font-size: 12px; color: var(--cyan); text-decoration: none; margin-bottom: 6px; }
.account-bio { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.account-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--faint); font-family: var(--mono); }
.account-stats b { color: var(--text-bright); }

.hero-handles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-handle-sep { color: var(--faint); }

.owner-tag {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  border: 1px solid var(--stroke); border-radius: 999px; padding: 2px 8px;
  background: var(--glass); white-space: nowrap;
}
.hl-foot .owner-tag { margin-right: 2px; }

/* README HTML subset (badges, banners, centred blocks) */
.md-html { margin: 0 0 0.9em; }
.md-html img, .md-body img { max-width: 100%; height: auto; }
.md-html > img, .md-body > img { display: block; }
.md-html[align="center"], .md-html center, .md-body [align="center"] { text-align: center; }
.md-html p { margin: 0 0 0.6em; }
.md-html a { color: var(--cyan); text-decoration: none; }
.md-html table { border-collapse: collapse; }
.md-html details { border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 14px; margin: 0 0 0.9em; }
.md-html summary { cursor: pointer; font-weight: 700; color: var(--text-bright); }
.md-code .md-html, .md-pre .md-html { display: none; }

/* ============================================================
   VIEW ENTRANCE
   A single, restrained fade-and-rise as a view renders.
   ============================================================ */
.stage .card { animation: none; }
.stage .card:nth-child(2) { animation-delay: 0.03s; }
.stage .card:nth-child(3) { animation-delay: 0.06s; }
.stage .card:nth-child(4) { animation-delay: 0.09s; }
.stage .card:nth-child(5) { animation-delay: 0.12s; }
.stage .card:nth-child(6) { animation-delay: 0.15s; }
@keyframes pulse-rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage .card { animation: none; }
}

/* ============================================================
   RESPONSIVE / MOBILE PASS
   Phones first: 720 / 640 / 520 / 420 / 380 breakpoints.
   Goal: no horizontal overflow at 320px, 44px touch targets,
   compact HUD, full-width sheets, comfortable reading measure.
   ============================================================ */

/* Touch ergonomics everywhere (harmless on desktop) */
button, a, .nav-item, .mnav-item, .sheet-row, .palette-item, .account-card,
.account-pill, .filter-pill, .badge, .hl-card, .repo-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }

/* Inline icons never have an intrinsic size — cap them globally so a
   missing rule can't blow an SVG up to fill its container. */
.btn svg, .chip svg, .status svg, .nav-badge svg, .sheet-close svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Tables and READMEs never force horizontal scroll */
.md-body table { display: block; overflow-x: auto; max-width: 100%; }
.md-body pre { overflow-x: auto; }
.clone-box code { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- ≤ 900px: layout collapses ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .hl-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- ≤ 720px: phones ---------- */
@media (max-width: 720px) {
  /* Hero: stack, smaller avatar, full-width actions */
  .hero { padding: 18px; }
  .hero-main { flex-direction: column; gap: 14px; }
  .hero-avatar { width: 68px; height: 68px; border-radius: 20px; transform: none; }
  .hero-name { font-size: 26px; }
  .hero-bio { font-size: 14px; margin: 8px 0 12px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-live { padding: 14px; }
  .hero-momentum { gap: 14px; }

  /* Highlights: single column, tighter type */
  .hl-grid, .hl-grid.compact { grid-template-columns: 1fr; }
  .hl-title { font-size: 17px; }
  .hl-foot { flex-wrap: wrap; gap: 10px; }

  /* Account + filter chips scroll horizontally instead of wrapping */
  .account-pills, .filter-pills {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: 4px; margin-bottom: -4px; max-width: 100%;
  }
  .account-pills::-webkit-scrollbar, .filter-pills::-webkit-scrollbar { display: none; }
  .account-pill, .filter-pill { flex-shrink: 0; white-space: nowrap; }

  /* Section headers stack */
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head .actions { width: 100%; flex-wrap: wrap; }
  .section-head h1 { font-size: 23px; }

  /* Sheets: full-height bottom sheets */
  .sheet {
    max-width: none;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: 92vh;
    max-height: 92dvh; /* survives the mobile URL bar appearing */
  }
  .sheet-head { position: sticky; top: -20px; z-index: 2; background: var(--bg2); padding-top: 4px; margin-top: -4px; }
  .palette { max-width: none; border-radius: 16px; }

  .badge { padding: 12px; }

  /* Project page */
  .clone-box { flex-direction: column; align-items: stretch; gap: 8px; }
  .clone-box .btn { width: 100%; }
  .project-pitch { font-size: 14.5px; }
  .about-facts { grid-template-columns: 1fr; }

  /* Fewer "rise" layers keeps scrolling smooth on phones */
  .stage .card:nth-child(n + 5) { animation-delay: 0.04s; }
}

/* ---------- ≤ 640px: app-like density ---------- */
@media (max-width: 640px) {
  /* Two-up metric cards read better than one long column */
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .col2, .col3, .col4 { grid-column: span 2 !important; }
  .card { padding: 14px; }
  .card-title { font-size: 11px; }
  .metric { font-size: 26px; }
  .metric small { font-size: 12px; }
  .overview-featured { grid-column: span 2 !important; }
}

/* ---------- ≤ 520px: trim the topbar ---------- */
@media (max-width: 520px) {
  .live-ind, #rateChip { display: none !important; }
  .topbar { gap: 10px; padding-left: calc(12px + env(safe-area-inset-left, 0px)); padding-right: calc(12px + env(safe-area-inset-right, 0px)); }
  .brand .name { font-size: 18px; }
  .brand .name span { display: none; }
  .search-trigger { padding: 9px 10px; }
  .search-trigger span:not(.kbd) { display: none; }
  .search-trigger .kbd { display: none; }
  .topstatus { gap: 6px; }
}

/* ---------- ≤ 420px: small phones ---------- */
@media (max-width: 420px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .metric { font-size: 22px; }
  .topbar-btn { width: 34px; height: 34px; }
  .hl-pitch { font-size: 13px; }
}

/* ---------- ≤ 360px: very small phones ---------- */
@media (max-width: 360px) {
  .bento { grid-template-columns: 1fr !important; }
  .col2, .col3, .col4 { grid-column: span 1 !important; }
  .hero-name { font-size: 22px; }
  .metric { font-size: 26px; }
  .card { padding: 13px; }
}

/* ---------- Landscape phones: reclaim vertical space ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { grid-template-columns: 1.4fr 1fr; }
}

/* ============================================================
   REAL DATA WIDGETS (contributions, bytes, trends, sparklines)
   ============================================================ */
.contrib-stats { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 14px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.contrib-stats b { color: var(--text-bright); font-size: 15px; margin-right: 4px; }
.contrib-wrap { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.contrib-months { display: grid; font-family: var(--mono); font-size: 9.5px; color: var(--faint); margin-bottom: 4px; min-width: max-content; }
.contrib-months span { grid-row: 1; }
.contrib-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px);
  grid-auto-columns: 11px; gap: 3px; min-width: max-content;
}
.contrib-cell { width: 11px; height: 11px; border-radius: 3px; background: var(--glass-input); }
.contrib-cell[data-level="1"] { background: #004400; }
.contrib-cell[data-level="2"] { background: #008000; }
.contrib-cell[data-level="3"] { background: #00aa00; }
.contrib-cell[data-level="4"] { background: #00ff00; }
.contrib-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--faint); }
.contrib-legend { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; }
.contrib-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--glass-input); }
.contrib-legend i[data-level="1"] { background: #004400; }
.contrib-legend i[data-level="2"] { background: #008000; }
.contrib-legend i[data-level="3"] { background: #00aa00; }
.contrib-legend i[data-level="4"] { background: var(--green); }

.lang-legend em { color: var(--faint); font-style: normal; font-size: 10.5px; margin-left: 4px; }

.spark { padding: 4px 2px 0; }
.spark svg { width: 100%; height: 44px; display: block; }
.spark-meta { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 6px; }

.trend-deltas { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 6px; }
.trend-deltas b { color: var(--cyan); }
.trend-spark { width: 100%; height: 30px; margin-top: 8px; opacity: 0.85; }

@media (max-width: 640px) {
  .contrib-grid { grid-template-rows: repeat(7, 9px); grid-auto-columns: 9px; gap: 2px; }
  .contrib-cell { width: 9px; height: 9px; }
  .contrib-months { grid-template-columns: repeat(53, 10px) !important; }
  .contrib-stats { gap: 12px; font-size: 11px; }
  .contrib-stats b { font-size: 13.5px; }
}

/* ------------------------------------------------------------------
   ACCESSIBILITY — skip link, visible focus, reduced-motion safety net
   ------------------------------------------------------------------ */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 400; /* above every overlay */
  padding: 10px 18px;
background: var(--panel);
color: var(--panel-text);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: transform 0.18s ease;
  border: 2px solid var(--stroke-strong);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px dotted var(--text);
  outline-offset: 2px;
}

/* Keyboard focus is always visible, mouse clicks stay quiet. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* The stage is a programmatic focus target (skip link), not a control. */
#stage:focus,
#stage:focus-visible { outline: none; }

/* Sheets are dialog surfaces: mark the active one for assistive tech. */
.overlay[role="dialog"] .sheet:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
  html { scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------
   "RIGHT NOW" STRIP + PER-ACCOUNT PAGES
   ------------------------------------------------------------------ */
.now-strip {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 18px;
border: 2px solid;
background: var(--chrome);
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.now-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  white-space: nowrap;
}
.now-title svg { width: 14px; height: 14px; }
.now-chips { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.now-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  overflow: hidden;
border: 2px solid;
background: var(--chrome);
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  max-width: 100%;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.now-chip .stat-icon { width: 15px; height: 15px; flex-shrink: 0; }
.now-value { font-weight: 800; color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.now-label { color: var(--faint); font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }

.account-hero { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.account-hero > img {
  width: 88px;
  height: 88px;
  border: 1px solid var(--stroke);
  flex-shrink: 0;
}
.account-hero .account-meta { min-width: 0; flex: 1; }
.account-hero .account-name { font-size: 22px; }
.account-hero .account-stats { margin-top: 10px; gap: 16px; font-size: 12px; }
.account-page-btn { margin-top: 10px; width: 100%; justify-content: center; }

@media (max-width: 720px) {
  .now-strip { padding: 12px 14px; gap: 12px; }
  .now-chips { gap: 8px; }
  .now-chip { flex: 1 1 100%; justify-content: flex-start; }
  .account-page-btn { width: 100%; }
}

/* ============================================================
   SIGNATURE LAYER
   The mandatory 90s furniture: marquee, rainbow, blink, hit
   counter, construction stripes, groove rules and the decorative
   colour squares. Additive only — nothing here overrides a
   component, it is all new surface.
   ============================================================ */

/* ---- title bar utility (window chrome) ---- */
.retro-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, var(--titlebar-from), var(--titlebar-to));
  color: var(--titlebar-text);
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 6px;
}

/* ---- pressed/raised bevel utilities ---- */
.bevel-out {
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  box-shadow: inset 1px 1px 0 var(--bevel-inner-hi), inset -1px -1px 0 var(--bevel-inner-lo);
}
.bevel-in {
  border: 2px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  box-shadow: inset 1px 1px 0 var(--bevel-inner-lo);
}

/* ---- 1. marquee ---- */
.retro-marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--pixel-black);
  border-top: 2px solid var(--bevel-hi);
  border-bottom: 2px solid var(--bevel-hi);
  padding: 5px 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}
.retro-marquee > span {
  display: inline-block;
  padding-left: 100%;
  animation: retro-marquee 32s linear infinite;
}
.retro-marquee b { color: var(--pixel-yellow, #ffff00); }
.retro-marquee i { font-style: normal; color: #00ff00; }
.retro-marquee u { text-decoration: none; color: #00ffff; }
.retro-marquee s { text-decoration: none; color: #ff00ff; }
.retro-marquee em { font-style: normal; color: #ff0000; }
@keyframes retro-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---- 2. rainbow text ---- */
.retro-rainbow {
  animation: retro-rainbow 4s linear infinite;
}
@keyframes retro-rainbow {
  0% { color: #ff0000; }
  17% { color: #ff8000; }
  33% { color: #ffff00; }
  50% { color: #00ff00; }
  67% { color: #0080ff; }
  83% { color: #8000ff; }
  100% { color: #ff0000; }
}

/* ---- 3. blink + pulse badges ---- */
.retro-blink { animation: retro-blink 1s step-end infinite; }
@keyframes retro-blink {
  50% { visibility: hidden; }
}
.retro-pulse {
  display: inline-block;
  background: var(--pixel-red);
  color: #ffffff;
  border: 2px solid;
  border-color: #ff8888 #800000 #800000 #ff8888;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  animation: retro-pulse-glow 1.5s ease-in-out infinite;
}
@keyframes retro-pulse-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 #ff0000; }
  50% { transform: scale(1.05); box-shadow: 0 0 0 4px #ffff00; }
}

/* ---- 4. hit counter ---- */
.retro-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000000;
  color: #00ff00;
  border: 2px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  box-shadow: inset 1px 1px 0 #000000;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  white-space: nowrap;
}
.retro-counter .rc-digits {
  color: #00ff00;
  background: #000000;
  border: 1px solid #006600;
  padding: 0 6px;
}
.retro-counter .rc-label { color: #ffff00; letter-spacing: 0.06em; }

/* ---- 5. construction stripes ---- */
.retro-construction {
  background: repeating-linear-gradient(
    45deg,
    #ffff00,
    #ffff00 10px,
    #000000 10px,
    #000000 20px
  );
  border-top: 2px solid var(--bevel-hi);
  border-bottom: 2px solid var(--bevel-lo);
  padding: 3px 0;
}
.retro-construction .strip-inner {
  background: var(--bg);
  margin: 0 10px;
  padding: 12px 16px;
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.retro-construction-title {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.02em;
}

/* ---- 6. groove horizontal rule ---- */
.retro-hr {
  border: none;
  height: 4px;
  margin: 20px 0;
  background: linear-gradient(
    to bottom,
    var(--bevel-lo) 0%, var(--bevel-lo) 50%,
    var(--bevel-hi) 50%, var(--bevel-hi) 100%
  );
}

/* ---- 7. decorative colour squares (pure 90s excess) ---- */
.retro-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px;
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.retro-swatch {
  width: 22px;
  height: 22px;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

/* ---- 8. under construction banner ---- */
.retro-uc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--panel);
  color: var(--panel-text);
  border: 2px solid var(--stroke-strong);
  font-family: var(--font-head);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.retro-uc .uc-sign {
  font-size: 20px;
  line-height: 1;
}

/* ---- 9. visited-link styling inside rendered READMEs ---- */
.md-body a { color: var(--link); text-decoration: underline; }
.md-body a:visited { color: var(--link-visited); }
.md-body a:hover { color: var(--link-hover); }

/* ---- reduced motion: keep the colour, stop the movement ---- */
@media (prefers-reduced-motion: reduce) {
  .retro-marquee > span { animation: none; padding-left: 0; }
  .retro-rainbow { animation: none; color: #ff0000; }
  .retro-blink { animation: none; }
  .retro-pulse { animation: none; }
  .pulse-ring { animation: none; }
}
