/* Command Center — shared design system.

   Loaded by every Command Center page (home, dashboard, stream, media, games,
   repos). Page-specific layout lives next to each page; this file carries the
   tokens, the chrome (header, nav, footer) and the shared components.

   assets/css/styles.css is the previous system and is kept, unchanged, only for
   the GridDown privacy page, which is its own project and styles itself from it.
   Nothing here depends on it. */

/* ---------- type ----------
   Geist and Geist Mono, self-hosted (the pages' CSP only allows same-origin
   fonts). One variable file each covers every weight used. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-variable.woff2) format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-mono-variable.woff2) format('woff2');
}

:root {
  color-scheme: dark;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  /* Older page stylesheets name this for their small labels. */
  --font-legend: var(--font-sans);

  /* ---------- surfaces ----------
     Near-black, neutral, stepping up in small even increments. Every colour a
     chart library reads (see dashboard-widgets.js) must stay a plain hex. */
  --bg:            #08090b;
  --well:          #0b0d10; /* inset lists, inputs */
  --surface:       #111317; /* cards */
  --surface-raised:#171a1f; /* buttons, raised rows */
  --surface-hover: #1e2228;
  --border:        #1f232a;
  --border-strong: #2d333c;
  --grid-line:     #1b1f25;

  --text:       #edeff3;
  --text-muted: #a0a8b3;
  --text-faint: #7a838f;

  /* ---------- colour carries meaning ----------
     accent: the brand and primary actions      gauge: a neutral reading
     fresh:  up / live / calm                   hangup: down / danger / storm
     warn:   stale / caution                    violet, sky: category tints */
  --accent:        #f28c4b;
  --accent-bright: #ffb27a;
  --accent-deep:   #a8582a;
  --gauge:  #5ccbe0;
  --fresh:  #4fd08a;
  --hangup: #f2607a;
  --warn:   #f2b84b;
  --violet: #a78bfa;
  --sky:    #60a5fa;
  --fresh-lean: #a8cf6a;

  --accent-soft:   color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 42%, transparent);
  --focus-ring:    0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent);

  /* hover / selection white, and its tints */
  --light:        #f7f9fc;
  --light-soft:   rgba(255, 255, 255, 0.07);
  --light-border: rgba(255, 255, 255, 0.18);
  --light-glow:   rgba(255, 255, 255, 0.35);

  /* ---------- names the page stylesheets already use ---------- */
  --shadow-ink: #000000;
  --field: var(--well);
  --rack: var(--bg);
  --tile: var(--surface);
  --tile-lit: var(--surface-raised);
  --chip: var(--surface-hover);
  --hairline: var(--border);
  --edge: var(--border-strong);
  --tally: var(--accent);
  --tally-soft: var(--accent-soft);
  --tally-border: var(--accent-border);
  --tally-glow: color-mix(in srgb, var(--accent) 55%, transparent);
  --tally-dim: color-mix(in srgb, var(--accent) 40%, var(--well));
  --gauge-soft: color-mix(in srgb, var(--gauge) 12%, transparent);
  --gauge-border: color-mix(in srgb, var(--gauge) 40%, transparent);
  --gauge-glow: color-mix(in srgb, var(--gauge) 45%, transparent);
  --success: var(--fresh);
  --danger: var(--hangup);
  --reading: var(--gauge);
  --mark-deep: var(--accent-deep);
  --mark-bright: var(--accent-bright);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4), 0 20px 44px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.45), 0 30px 70px -20px rgba(0, 0, 0, 0.85);
  --bezel: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --bezel-deep: var(--bezel);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-pad: 18px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: var(--page-pad);
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient light: two soft glows from above and a faint dot grid that fades out
   down the page. Fixed layers rather than a body background so scrolling never
   repaints them. */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(900px 520px at 10% -10%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%),
    radial-gradient(820px 520px at 92% -14%, color-mix(in srgb, var(--gauge) 7%, transparent), transparent 70%),
    radial-gradient(1100px 600px at 50% 115%, color-mix(in srgb, var(--violet) 4%, transparent), transparent 70%);
}
body::after {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%);
}

/* Full-bleed video and charts are the whole screen in theater mode. */
body.dashboard-theater-mode::before, body.dashboard-theater-mode::after,
body.stream-theater-mode::before, body.stream-theater-mode::after,
body.subs-theater-mode::before, body.subs-theater-mode::after { display: none; }

/* An element hidden by attribute stays hidden even when a rule gives it a
   display value - every button here has one. */
[hidden] { display: none !important; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--light); }

h1, h2, h3 { margin: 0; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 14px; line-height: 1.3; }
p { margin: 0; }

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: #fff; }

:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 2px; }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-raised);
  color: var(--text-faint);
  font: 500 11px/1 var(--font-mono);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Stroked 24-unit icons, drawn in currentColor. */
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- buttons ----------
   `button` itself is styled, not just a class: the games and page scripts build
   plenty of buttons at runtime and all of them should look like they belong. */
button, .home-button, .dropbtn, .btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  color: var(--text);
  font: 500 13px/1 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--bezel), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
              color 0.15s var(--ease), box-shadow 0.15s var(--ease), translate 0.1s var(--ease);
}
button:hover, .home-button:hover, .dropbtn:hover, .btn:hover {
  background: var(--surface-hover);
  border-color: #3a414b;
  color: var(--light);
}
button:active, .home-button:active, .dropbtn:active, .btn:active { translate: 0 1px; }
button:disabled, .home-button:disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; translate: none; }
button .icon, .home-button .icon, .btn .icon { width: 16px; height: 16px; }

.btn-primary, .home-button.btn-primary {
  border-color: color-mix(in srgb, var(--accent) 70%, black);
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #1b0e05;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover, .home-button.btn-primary:hover {
  border-color: var(--accent-bright);
  background: linear-gradient(180deg, #ffc394, var(--accent-bright));
  color: #1b0e05;
}

.btn-ghost, .home-button.btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
}
.btn-ghost:hover, .home-button.btn-ghost:hover {
  border-color: transparent;
  background: var(--light-soft);
  color: var(--text);
}

.icon-btn {
  width: 36px;
  padding: 0;
}

/* ---------- segmented control ---------- */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--well);
}
.seg > button {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-size: 12.5px;
}
.seg > button:hover { background: var(--light-soft); color: var(--text); }
.seg > button:active { translate: none; }
.seg > button.active,
.seg > button.is-active,
.seg > button[aria-pressed='true'] {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 3px rgba(0, 0, 0, 0.45);
}
/* stretched to its container, buttons sharing the width */
.seg.seg-block { display: flex; width: 100%; }
.seg.seg-block > button { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- fields ---------- */
input[type="text"], input[type="search"], input[type="url"], select, textarea {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--well);
  color: var(--text);
  font: 400 13.5px var(--font-sans);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}
input[type="text"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder { color: var(--text-faint); }
input[type="text"]:hover, input[type="search"]:hover, input[type="url"]:hover, select:hover { border-color: #3a414b; }
input[type="text"]:focus, input[type="search"]:focus, input[type="url"]:focus, select:focus, textarea:focus {
  border-color: var(--accent-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), var(--focus-ring);
}
select { padding-right: 30px; cursor: pointer; }
input[type="range"] { accent-color: var(--accent); }

/* ---------- page shell ---------- */
.page {
  width: min(100%, 1480px);
  min-height: calc(100vh - 2 * var(--page-pad));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* The dashboard locks to the viewport at 82% of it, and the stream page runs
   nearly edge to edge at 99% — both widths are deliberate. */
body.dashboard-page { height: 100vh; overflow: hidden; }
body.dashboard-page .page { width: 82%; max-width: 82%; height: calc(100vh - 2 * var(--page-pad)); min-height: 0; }
body.dashboard-page .main { overflow: hidden; }
body.stream-page .page { width: 99%; max-width: 99%; }

/* ---------- header ---------- */
.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  margin-bottom: 20px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--bezel), var(--shadow-sm);
  flex: 0 0 auto;
}
/* Pinned while scrolling where there is a long page to scroll. Not on the stream
   page: a bar sliding over a Twitch player counts as covering it, and Twitch
   pauses a player it thinks is covered. */
body.home-page .site-header,
body.media-page .site-header,
body.repos-page .site-header {
  position: sticky;
  top: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-right: 14px;
  border-right: 1px solid var(--border);
  color: var(--text);
}
.brand:hover { color: var(--light); }
.brand-mark { width: 22px; height: 22px; flex: 0 0 22px; display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.brand-mark .mark-stop-deep { stop-color: var(--accent-deep); }
.brand-mark .mark-stop-bright { stop-color: var(--accent-bright); }
.brand-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
  min-width: 0;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.nav-link .icon { width: 17px; height: 17px; opacity: 0.85; transition: color 0.15s var(--ease); }
.nav-link:hover { color: var(--text); background: var(--light-soft); }
.nav-link[aria-current='page'] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-link[aria-current='page'] .icon { color: var(--accent); opacity: 1; }

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 32px;
  padding: 18px 4px 4px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12.5px;
  flex: 0 0 auto;
}
.footer-plate {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
}
.footer-plate:hover { color: var(--text); }
.footer-plate .brand-mark { width: 16px; height: 16px; flex-basis: 16px; }
.footer-plate-text { display: inline-flex; align-items: baseline; gap: 8px; }
.footer-plate-name { font-weight: 600; color: var(--text); }
.footer-plate-stamp { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-left: auto;
}
.footer-nav a { color: var(--text-faint); transition: color 0.15s var(--ease); }
.footer-nav a:hover { color: var(--text); }

/* ---------- cards ---------- */
.card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 120px),
    var(--surface);
  box-shadow: var(--bezel), var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { border-color: var(--border-strong); }

.card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: 30px;
  margin: -2px 0 14px;
}
.card-icon {
  --tint: var(--accent);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid color-mix(in srgb, var(--tint) 24%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--tint) 12%, transparent);
  color: var(--tint);
}
.card-icon .icon { width: 16px; height: 16px; }
/* Basis 0 so a long subtitle truncates instead of pushing the stamp onto a
   line of its own; the floor keeps the title readable when the row does wrap. */
.card-heading { flex: 1 1 0; min-width: 7.5em; display: flex; flex-direction: column; gap: 1px; }
.card-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub {
  margin: 0;
  color: var(--text-faint);
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- freshness stamp ----------
   Each panel that reads the network stamps the time its reading was taken. The
   dot is the panel's status: green while the reading is current, amber once it
   is a cached reading that could not be refreshed. An empty stamp means nothing
   has landed yet, and hides dot and all. */
.panel-asof {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.panel-asof::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fresh);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fresh) 16%, transparent), 0 0 8px color-mix(in srgb, var(--fresh) 60%, transparent);
  animation: live-breathe 2.8s ease-in-out infinite;
}
.panel-asof:empty { display: none; }
.panel-asof.is-stale { color: var(--warn); }
.panel-asof.is-stale::before {
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 16%, transparent);
  animation: none;
}
.panel-asof.is-stale::after { content: 'stale'; }
/* a schedule rather than a live reading: dated, but no status light */
.panel-asof.is-plain::before { display: none; }

@keyframes live-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* small square icon button that sits in a card header */
.panel-refresh {
  width: 28px;
  height: 28px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--text-faint);
}
.panel-refresh .icon { width: 14px; height: 14px; }
.panel-refresh:hover { color: var(--text); }
.panel-refresh.is-loading { color: var(--gauge); cursor: progress; }
.panel-refresh.is-loading .icon { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* label / value rows in an inset well */
.panel-well {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--well);
  overflow: hidden;
}
.panel-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
}
.panel-line + .panel-line { border-top: 1px solid var(--border); }
.panel-label { color: var(--text-faint); font-size: 12px; }
.panel-value {
  justify-self: end;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---------- menus and popovers ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: max-content;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}
.dropdown:focus-within .dropdown-content,
.dropdown.is-open .dropdown-content { display: block; }
.dropdown.force-closed .dropdown-content { display: none !important; }
.dropdown-content a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
}
.dropdown-content a:hover { background: var(--light-soft); color: var(--light); }

/* ---------- theater modes: the floating exit ----------
   Shown only while the pointer is over the full-screen content. */
.dashboard-theater-exit, .dashboard-theater-exit.home-button,
.stream-theater-exit, .stream-theater-exit.home-button,
.subs-theater-exit, .subs-theater-exit.home-button {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 36;
  display: none;
  translate: -50% 0;
  border-color: var(--light-border);
  border-radius: var(--r-pill);
  background: rgba(10, 11, 14, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
}
body.dashboard-theater-mode .dashboard-theater-exit,
body.stream-theater-mode .stream-theater-exit,
body.subs-theater-mode .subs-theater-exit {
  display: inline-flex;
  opacity: 0;
  pointer-events: none;
  translate: -50% -10px;
  transition: opacity 0.18s var(--ease), translate 0.18s var(--ease);
}
body.dashboard-theater-mode .tradingview-grid:hover .dashboard-theater-exit,
body.dashboard-theater-mode .tradingview-grid:focus-within .dashboard-theater-exit,
body.stream-theater-mode .stream-container:hover .stream-theater-exit,
body.stream-theater-mode .stream-container:focus-within .stream-theater-exit,
body.subs-theater-mode .subs-player:hover .subs-theater-exit,
body.subs-theater-mode .subs-player:focus-within .subs-theater-exit {
  opacity: 1;
  pointer-events: auto;
  translate: -50% 0;
}

/* ---------- load-in ----------
   A short fade-up as the page arrives. The offset rides on `translate`, not
   `transform`: a filled animation outranks normal declarations, and holding a
   `transform` would override any transform an element sets later. */
@keyframes rise-in {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: none; }
}
.site-header { animation: rise-in 0.45s var(--ease) both; }
.site-footer { animation: rise-in 0.45s var(--ease) 0.2s both; }

/* ---------- responsive chrome ---------- */
@media (max-width: 900px) {
  :root { --page-pad: 12px; }
  .brand-name { display: none; }
  .brand { padding-right: 10px; }
  .nav-link { padding: 0 10px; }
  body.dashboard-page .page { width: 100%; max-width: 100%; }
}

/* Phone: the nav becomes a full-width tab bar under the brand row, one equal
   cell per destination with the label under its icon. */
@media (max-width: 700px) {
  .site-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin-bottom: 14px;
  }
  .brand { border-right: 0; padding-right: 0; }
  .brand-name { display: inline; }
  .site-nav {
    order: 3;
    flex: 1 1 100%;
    margin-right: 0;
    gap: 4px;
  }
  .nav-link {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    height: 50px;
    padding: 0 2px;
    font-size: 11px;
  }
  .nav-link .icon { width: 18px; height: 18px; }
  /* two rows of header is too much of a small screen to keep pinned */
  body.home-page .site-header,
  body.media-page .site-header,
  body.repos-page .site-header { position: relative; top: auto; }
  .site-footer { gap: 8px 16px; }
  .footer-nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .panel-refresh.is-loading .icon { animation: none !important; }
}
