/* mcgyvr: one stylesheet, no build step (brand v3).
   Colours come only from brand/tokens.css (generated, never edited here; the base
   template links it and brand/fonts.css before this file). Dark is the default; the
   <html> data-theme attribute (system | light | dark) picks the scheme, and tokens.css
   reads "system" as "follow the OS".
   Shape: square, with the wordmark's one rounded outer shoulder (top-right) on cards,
   buttons, fields and the avatar tile. One decorative element per page: .stripe-rule. */

/* ---- type scale and layout ----------------------------------------------------------- */
:root {
  --font-display: "Saira", "Chakra Petch", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mono: var(--font-mono);
  --type-display-xl: 56px; --lh-display-xl: 60px;
  --type-display-l: 40px;  --lh-display-l: 44px;
  --type-display-m: 32px;  --lh-display-m: 38px;
  --type-h1: 28px; --lh-h1: 34px;
  --type-h2: 24px; --lh-h2: 30px;
  --type-h3: 20px; --lh-h3: 26px;
  --type-body: 16px; --lh-body: 26px;
  --type-body-s: 14px; --lh-body-s: 22px;
  --type-ui: 15px; --lh-ui: 20px;
  --type-caption: 12px; --lh-caption: 16px;
  --type-mono: 13px; --lh-mono: 20px;
  --track-caps: 0.08em;
  --wrap: 1160px;
  --gutter: 24px;
  --shoulder: 10px;      /* the m's rounded outer shoulder, top-right only */
  --shoulder-s: 6px;
  --section: 96px;
  --radius: 0 var(--shoulder) 0 0;
}
@media (max-width: 640px) {
  :root {
    --type-display-xl: 40px; --lh-display-xl: 44px;
    --type-display-l: 32px;  --lh-display-l: 38px;
    --type-display-m: 28px;  --lh-display-m: 34px;
    --gutter: 16px;
    --section: 64px;
  }
}

/* ---- base ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mg-bg);
  color: var(--mg-text);
  font-family: var(--font-body); font-size: var(--type-body); line-height: var(--lh-body);
  overflow-wrap: break-word;
}
img { max-width: 100%; }
a { color: var(--mg-link); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-stretch: 100%; color: var(--mg-text); text-wrap: balance; }
h1 { font-size: var(--type-h1); line-height: var(--lh-h1); font-weight: 700; margin: 8px 0 12px; }
h2 { font-size: var(--type-h2); line-height: var(--lh-h2); font-weight: 600; margin: 32px 0 12px; }
h3 { font-size: var(--type-h3); line-height: var(--lh-h3); font-weight: 600; margin: 0; }
code, .mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0;
  font-variant-numeric: tabular-nums;
}
code { font-size: 0.875em; }
.mono { font-size: 0.9em; }
.muted { color: var(--mg-text-2); }
.ok { color: var(--mg-success); }
.lede { font-size: 18px; line-height: 28px; color: var(--mg-text-2); max-width: 60ch; }
.hint { margin: 0 0 8px; color: var(--mg-text-2); font-size: var(--type-body-s); line-height: var(--lh-body-s); }
.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-stretch: 100%;
  font-size: var(--type-caption); line-height: var(--lh-caption);
  text-transform: uppercase; letter-spacing: var(--track-caps);
  color: var(--mg-active); margin: 0 0 12px;
}
.display {
  font-family: var(--font-display); font-weight: 700; font-stretch: 110%;
  font-size: var(--type-display-xl); line-height: var(--lh-display-xl); letter-spacing: -0.01em;
  margin: 0;
}
.display--m { font-size: var(--type-display-m); line-height: var(--lh-display-m); letter-spacing: -0.005em; font-stretch: 100%; }
.caption { font-size: var(--type-caption); line-height: var(--lh-caption); letter-spacing: 0.01em; color: var(--mg-text-2); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* focus: 2px ring, 2px offset; acid on dark, cobalt on light (tokens.css --mg-focus) */
:focus-visible { outline: 2px solid var(--mg-focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* logo swap: on-dark files in dark, on-light files in light (data-theme or the OS) */
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-light { display: block; }
}

/* icons: <svg class="icon"><use href="/static/brand/sprite.svg#i-name"/></svg> */
.icon {
  width: 1em; height: 1em; display: inline-block; flex-shrink: 0; vertical-align: -0.125em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter;
}
.icon--24 { width: 24px; height: 24px; }

/* ---- layout ---------------------------------------------------------------------------- */
header.site, main, footer.site { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
main { display: block; padding-top: 24px; padding-bottom: 48px; }

header.site {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 32px; row-gap: 8px;
  min-height: 64px; padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--mg-border);
}
/* the header shows the wordmark alone, never the mark beside it (reads "Mmcgyvr") */
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-word { width: 128px; height: 32px; }
nav.primary, .account { display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; row-gap: 4px; }
.account { margin-left: auto; }
header.site nav a, .account > a:not(.button), .linkish {
  font-family: var(--font-body); font-size: var(--type-ui); line-height: var(--lh-ui); font-weight: 500;
  color: var(--mg-text-2); text-decoration: none; padding: 6px 0;
  border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer;
}
header.site nav a:hover, .account > a:not(.button):hover, .linkish:hover { color: var(--mg-text); }
header.site a[aria-current="page"] { color: var(--mg-active); border-bottom-color: var(--mg-active); font-weight: 600; }
.whoami { display: inline-flex; align-items: center; gap: 8px; }

footer.site {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  margin-top: 48px; padding-top: 24px; padding-bottom: 32px;
  border-top: 1px solid var(--mg-border);
  color: var(--mg-text-2); font-size: var(--type-body-s); line-height: var(--lh-body-s);
}
footer.site a { color: var(--mg-text-2); }
footer.site a:hover { color: var(--mg-text); }
footer.site .linkish { font-size: var(--type-body-s); text-decoration: underline; text-underline-offset: 0.18em; border-bottom: 0; padding: 0; }
footer.site .tagline { margin-left: auto; font-family: var(--font-display); font-weight: 600; color: var(--mg-text); }

@media (max-width: 640px) {
  .brand-word { width: 96px; height: 24px; }
  header.site { column-gap: 16px; }
  nav.primary, .account { column-gap: 14px; }
  .account { margin-left: 0; width: 100%; }
  .whoami span { display: none; }
  footer.site .tagline { margin-left: 0; width: 100%; }
}

/* ---- controls ------------------------------------------------------------------------ */
form.inline { display: inline; margin: 0; }
form.stack { display: grid; gap: 4px; margin: 16px 0; }
form.stack button { justify-self: start; margin-top: 16px; }
label { font-weight: 500; font-size: var(--type-ui); line-height: var(--lh-ui); }
form.stack label { margin-top: 8px; }
input, select, textarea {
  font: inherit; color: var(--mg-text); background: var(--mg-muted);
  border: 1px solid var(--mg-border-strong); border-radius: 0 var(--shoulder-s) 0 0;
  padding: 10px 12px; width: 100%; min-width: 0; min-height: 44px;
}
input[type="password"] { font-family: var(--font-mono); font-size: 14px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--mg-active); }
input::placeholder, textarea::placeholder { color: var(--mg-text-2); }
textarea { min-height: 7rem; resize: vertical; }

.button, button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  font-family: var(--font-display); font-weight: 700; font-stretch: 100%;
  font-size: 14px; line-height: 16px; text-transform: uppercase; letter-spacing: var(--track-caps);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  color: var(--mg-text); background: var(--mg-muted);
  border: 1px solid var(--mg-border-strong); border-radius: 0 var(--shoulder-s) 0 0;
}
.button:hover { border-color: var(--mg-text); }
/* dark: acid fill, #0A0E1A label; light: navy fill, acid label (tokens --mg-cta-*) */
.button.primary { background: var(--mg-cta-bg); color: var(--mg-cta-fg); border-color: var(--mg-cta-bg); }
.button.primary:hover { background: var(--mg-cta-hover-bg); border-color: var(--mg-cta-hover-bg); }
.button.small { min-height: 32px; padding: 6px 12px; font-size: 12px; line-height: 16px; }
.button.danger { color: var(--mg-danger); }
.button .icon { width: 16px; height: 16px; }
.button:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.errors { border-left: 4px solid var(--mg-danger); background: var(--mg-danger-bg); color: var(--mg-danger); padding: 4px 16px; margin: 16px 0; }
.warning, .notice { padding: 14px 16px; margin: 16px 0; font-size: var(--type-body-s); line-height: var(--lh-body-s); border-left: 4px solid; }
.warning { background: var(--mg-warning-bg); color: var(--mg-text); border-left-color: var(--mg-warning); }
.warning strong { color: var(--mg-warning); }
.warning a { color: var(--mg-text); font-weight: 600; }
.notice { background: var(--mg-info-bg); color: var(--mg-text); border-left-color: var(--mg-info); }

.secret { display: grid; gap: 6px; margin: 16px 0; }
.secret-row { display: flex; gap: 8px; }
.secret input { flex: 1; font-family: var(--font-mono); font-size: 14px; }

.card, .panel {
  background: var(--mg-surface); border: 1px solid var(--mg-border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin-bottom: 8px; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three, .grid.two { grid-template-columns: minmax(0, 1fr); } }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
dt { color: var(--mg-text-2); }
dd { margin: 0; }

/* the one stripe element: 7 bands thin->thick, ramp navy->acid. Decorative only. */
.stripe-rule {
  height: 28px; width: min(100%, 520px); margin: 24px 0;
  background: var(--mg-ramp);
  -webkit-mask-image: var(--mg-stripes); mask-image: var(--mg-stripes);
}
.stripe-rule.short { height: 18px; width: min(100%, 240px); margin: 12px 0 20px; }

/* ---- avatar: the mark tile, navy with the acid initial -------------------------------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 0 var(--shoulder-s) 0 0;
  background: var(--mg-brand-surface); color: var(--mg-acid);
  font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1;
}
.avatar.sm { width: 24px; height: 24px; font-size: 13px; border-radius: 0 4px 0 0; }
.avatar.lg { width: 72px; height: 72px; font-size: 32px; border-radius: 0 var(--shoulder) 0 0; }

/* ---- stats (_stats.html) ------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 16px 0 8px; }
.stat {
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--radius);
  padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 4px;
}
.stat .value {
  font-family: var(--font-display); font-weight: 700; font-stretch: 110%;
  font-size: var(--type-display-l); line-height: var(--lh-display-l); color: var(--mg-text);
  font-variant-numeric: tabular-nums;
}
.stat .label {
  font-family: var(--font-display); font-weight: 600; font-size: var(--type-caption); line-height: var(--lh-caption);
  text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mg-text-2);
  display: flex; align-items: center; gap: 6px;
}
.stat .label .icon { width: 16px; height: 16px; }
.stat.accent .value { color: var(--mg-active); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stat .value { font-size: 28px; line-height: 34px; } .stat { padding: 16px; } }

/* ---- landing ------------------------------------------------------------------------- */
.hero { padding: 48px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero .tagline {
  font-family: var(--font-display); font-weight: 600; font-stretch: 100%;
  font-size: var(--type-h2); line-height: var(--lh-h2); color: var(--mg-text); margin: 0 0 16px;
}
.hero .lede { margin: 0 0 32px; }
.hero .button-row + p { margin: 20px 0 0; }
.hero-art { display: grid; gap: 16px; justify-items: start; }
.hero-art img { width: 100%; height: auto; }
.hero-art .caption { margin: 0; padding-left: 4%; }
@media (max-width: 900px) {
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-art { order: -1; max-width: 420px; }
}

/* the measured fact: a brand band (navy; acid + on-brand only) */
.proof { background: var(--mg-brand-surface); color: var(--mg-on-brand); margin-top: 72px; border-radius: var(--radius); padding: 32px; }
.proof .eyebrow { color: var(--mg-acid); }
.proof-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 8px 0 24px; }
.proof-tiles dd { margin: 0; }
.proof-tile .value {
  display: block; font-family: var(--font-display); font-weight: 700; font-stretch: 110%;
  font-size: var(--type-display-l); line-height: var(--lh-display-l); color: var(--mg-acid);
  font-variant-numeric: tabular-nums;
}
.proof-tile .label { display: block; color: var(--mg-on-brand); font-size: var(--type-body-s); line-height: var(--lh-body-s); margin-top: 6px; }
.proof .note { color: var(--mg-on-brand); font-size: var(--type-body-s); line-height: var(--lh-body-s); max-width: 72ch; margin: 0; }
@media (max-width: 900px) { .proof-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .proof { padding: 24px; } }

.section { padding: var(--section) 0 0; }
.section-head { margin-bottom: 32px; max-width: 720px; }
.section-head h2 { margin: 0; }
.section-head p { color: var(--mg-text-2); margin: 12px 0 0; }
.section-head .eyebrow { color: var(--mg-active); margin: 0 0 12px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { display: flex; flex-direction: column; }
.steps p { margin: 0 0 16px; }
.steps p:last-child { margin-bottom: 0; }
.step-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; line-height: 20px;
  color: var(--mg-active); display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.step-num .icon { width: 24px; height: 24px; }
.steps code { color: var(--mg-text); overflow-wrap: anywhere; }
.steps .icons { display: flex; gap: 12px; color: var(--mg-active); }

.stats-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: 16px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--mg-success); font-size: var(--type-body-s); }
.live .icon { width: 12px; height: 12px; }

.way h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.way h3 .icon { width: 24px; height: 24px; color: var(--mg-active); }
.way .default { font-family: var(--font-body); font-size: var(--type-caption); font-weight: 500; color: var(--mg-text-2); }
.way p { margin: 8px 0 0; }
.way .tradeoff { color: var(--mg-text-2); font-size: var(--type-body-s); line-height: var(--lh-body-s); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.rule-card p { margin: 0 0 16px; }
.rule-card .big {
  font-family: var(--font-display); font-weight: 700; font-stretch: 110%;
  font-size: var(--type-display-m); line-height: var(--lh-display-m); margin: 0 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.rule-card .big .icon { width: 32px; height: 32px; color: var(--mg-active); }
.code {
  background: var(--mg-muted); border: 1px solid var(--mg-border); border-radius: var(--radius);
  overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--mg-border);
}
.code-head .eyebrow { margin: 0; color: var(--mg-text-2); }
.code pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: var(--font-mono); font-size: var(--type-mono); line-height: var(--lh-mono);
  font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0;
  color: var(--mg-text);
}
.code pre code { font-size: inherit; }
.code .c { color: var(--mg-text-2); }      /* comment */
.code .k { color: var(--mg-active); font-weight: 700; }  /* the command */
.code .s { color: var(--mg-success); }     /* string */
.code .f { color: var(--mg-text-2); }      /* flag */
.code + .hint { margin-top: 12px; }

/* ---- status and mode tags: a word, always; colour only repeats it ---------------------- */
.status, .mode {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px;
  font-size: var(--type-caption); line-height: 16px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.online { color: var(--mg-success); background: var(--mg-success-bg); }
.status.offline { color: var(--mg-text); background: var(--mg-muted); border: 1px solid var(--mg-border-strong); }
.status.offline::before { background: var(--mg-text-disabled); }
.mode { color: var(--mg-info); background: var(--mg-info-bg); }

/* ---- rigs ------------------------------------------------------------------------------ */
.rigs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.rig {
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.rig.online { border-color: color-mix(in srgb, var(--mg-success) 40%, var(--mg-border)); }
.rig-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rig-name { font-family: var(--font-mono); font-size: 16px; line-height: 22px; font-weight: 700; overflow-wrap: anywhere; }
.rig-owner { font-size: var(--type-body-s); text-decoration: none; }
.rig-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.rig-specs { margin: 0; color: var(--mg-text-2); font-size: var(--type-body-s); line-height: var(--lh-body-s); }
.empty-rig { margin: 0; color: var(--mg-text-2); font-size: var(--type-body-s); font-style: italic; }
.gpus { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gpu { background: var(--mg-muted); border-radius: 0 var(--shoulder-s) 0 0; padding: 10px 12px; }
.gpu-head { display: flex; justify-content: space-between; gap: 8px; font-size: var(--type-body-s); line-height: var(--lh-body-s); }
.gpu-name { font-weight: 600; overflow-wrap: anywhere; }
.gpu-vram { font-family: var(--font-mono); }
.gpu-free { color: var(--mg-text-2); font-size: var(--type-caption); line-height: var(--lh-caption); font-family: var(--font-mono); }
.rig-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--mg-border); }
.rig-sharing { color: var(--mg-text-2); font-size: var(--type-body-s); margin: 8px 0 0; }

/* VRAM meter: square, palette colours */
meter {
  display: block; width: 100%; height: 8px; margin: 6px 0 4px;
  appearance: none; border: 1px solid var(--mg-border-strong); border-radius: 0; background: var(--mg-bg);
}
meter::-webkit-meter-bar { background: var(--mg-bg); border: 0; border-radius: 0; height: 6px; }
meter::-webkit-meter-optimum-value { background: var(--mg-active); border-radius: 0; }
meter::-moz-meter-bar { background: var(--mg-active); border-radius: 0; }

/* ---- people ---------------------------------------------------------------------------- */
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.person {
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit;
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--radius); padding: 12px;
}
.person:hover { border-color: var(--mg-active); }
.person .who { min-width: 0; }
.person .name { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .meta { color: var(--mg-text-2); font-size: var(--type-body-s); }
.person .online-count { color: var(--mg-success); }

.profile-head { display: flex; gap: 16px; align-items: center; margin: 16px 0 8px; }
.profile-head h1 { margin: 0; }
.profile-head .handle { color: var(--mg-text-2); }
.bio { white-space: pre-line; max-width: 42rem; overflow-wrap: anywhere; }

/* ---- filters, lists of things you own --------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 16px 0; }
.filters label { display: grid; gap: 4px; font-size: var(--type-body-s); }
.filters select { width: auto; }
.count { color: var(--mg-text-2); font-size: var(--type-body-s); }

.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.item {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: 0 var(--shoulder-s) 0 0; padding: 10px 14px;
}
.item.revoked { opacity: 0.6; }
.item .meta { color: var(--mg-text-2); font-size: var(--type-body-s); }
.tag {
  display: inline-block; padding: 1px 8px; font-size: var(--type-caption); line-height: 18px; font-weight: 500;
  color: var(--mg-text-2); background: var(--mg-muted); border: 1px solid var(--mg-border-strong);
}

.two-col { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }

/* ---- the pool as one machine ----------------------------------------------------------- */
.pool-hero {
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--radius);
  padding: 24px; margin: 16px 0;
}
.pool-total {
  font-family: var(--font-display); font-weight: 700; font-stretch: 110%;
  font-size: var(--type-display-l); line-height: var(--lh-display-l); color: var(--mg-active);
  font-variant-numeric: tabular-nums;
}
.pool-sub { color: var(--mg-text-2); font-size: var(--type-body-s); line-height: var(--lh-body-s); margin-top: 4px; }
.slots { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.slot { background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: 0 var(--shoulder-s) 0 0; padding: 12px 14px; }
.slot .vram { font: 700 22px/1.1 var(--font-mono); }
.slot .from { color: var(--mg-text-2); font-size: var(--type-body-s); overflow-wrap: anywhere; }
.plan-form { display: grid; grid-template-columns: max-content minmax(0, 22rem); gap: 6px 12px; align-items: center; margin: 12px 0; }
.plan-summary { margin: 12px 0; }
.plan { width: 100%; border-collapse: collapse; font-size: var(--type-body-s); line-height: var(--lh-body-s); }
.plan th, .plan td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--mg-border); vertical-align: top; }
.plan th {
  font-family: var(--font-display); font-weight: 600; font-size: var(--type-caption); line-height: var(--lh-caption);
  text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mg-text-2);
  border-bottom-color: var(--mg-border-strong);
}
.plan meter { display: block; width: 100%; max-width: 10rem; }
.sessions, .members { list-style: none; padding: 0; margin: 8px 0; }
.session { border: 1px solid var(--mg-border); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.session-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.members li { padding: 2px 0; font-size: var(--type-body-s); }
pre.log {
  white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--type-mono); line-height: var(--lh-mono);
  background: var(--mg-muted); padding: 8px 12px; max-height: 20rem; overflow: auto;
}
@media (max-width: 640px) { .plan-form { grid-template-columns: 1fr; } }

.empty { color: var(--mg-text-2); padding: 24px; border: 1px dashed var(--mg-border-strong); text-align: center; }
.pager { display: flex; gap: 16px; justify-content: center; margin: 16px 0; }

/* ---- sharing mode picker ---------------------------------------------------------------- */
fieldset.modes { border: 1px solid var(--mg-border); border-radius: 0 var(--shoulder-s) 0 0; padding: 8px 14px; margin: 8px 0; display: grid; gap: 6px; }
fieldset.modes legend { font-weight: 600; font-size: var(--type-ui); padding: 0 4px; }
.mode-choice { display: flex; gap: 10px; align-items: baseline; font-weight: 400; }
.mode-choice input { width: auto; }
#join { margin: 16px 0 24px; border-color: var(--mg-active); }
#join h2 { margin-top: 0; }
.mode-help { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.mode-help dt, .mode-help dd { margin: 0; }
.crew-members { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* ---- the feed and shared setups ---------------------------------------------------------- */
.feed-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.feed-head h1 { font-size: var(--type-display-m); line-height: var(--lh-display-m); }
.feed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 16px 0; border-bottom: 1px solid var(--mg-border); }
.tabs a {
  color: var(--mg-text-2); text-decoration: none; font-size: var(--type-ui); line-height: var(--lh-ui); font-weight: 500;
  padding: 10px 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--mg-text); }
.tabs a[aria-current="page"] { color: var(--mg-active); border-bottom-color: var(--mg-active); font-weight: 600; }
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feed-item {
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--radius);
  padding: 14px 16px; overflow-wrap: anywhere;
}
.feed-item .meta { color: var(--mg-text-2); font-size: var(--type-body-s); margin-left: 6px; }
.feed-item form.like { margin-left: 6px; }
.requests { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 6px; }
.requests li {
  background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: 0 var(--shoulder-s) 0 0;
  padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; overflow-wrap: anywhere;
}
.requests .meta { color: var(--mg-text-2); font-size: var(--type-body-s); }
.button.like {
  min-height: 28px; padding: 2px 10px; text-transform: none; letter-spacing: 0;
  font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--mg-text-2);
}
.button.like .count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.button.like.liked { border-color: var(--mg-active); color: var(--mg-active); }
.setup { margin-top: 8px; }
.setup-text { white-space: pre-line; margin: 6px 0; max-width: 42rem; }
.setup-block { background: var(--mg-muted); border-radius: 0 var(--shoulder-s) 0 0; padding: 6px 12px; font-size: var(--type-body-s); }
.setup-block p { margin: 4px 0; }
.balance { font-size: 22px; margin: 4px 0 8px; }
.crew-models input[type="number"] { width: 5.5rem; padding: 4px 8px; min-height: 32px; }
.crew-models input[type="checkbox"] { width: auto; }
.crew-models td:last-child { white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* ---- narrow pages (sign in, join) --------------------------------------------------------- */
.narrow { max-width: 480px; margin: 0 auto; padding-top: 40px; }
.narrow .card { padding: 32px; }
.narrow h1 { font-size: var(--type-display-m); line-height: var(--lh-display-m); margin: 0; }
.narrow .card + p { margin-top: 20px; }
@media (max-width: 640px) { .narrow { padding-top: 16px; } .narrow .card { padding: 24px 20px; } }

/* ---- motion ------------------------------------------------------------------------------- */
.button, .tabs a, header.site nav a, .account > a, .linkish { transition: background-color .15s, border-color .15s, color .15s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
