:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --text: #1b1f24;
  --muted: #5d6673;
  --faint: #8a93a0;
  --link: #0b63ce;

  --ok: #1a7f37;
  --ok-bg: #e6f4ea;
  --run: #0b63ce;
  --run-bg: #e3eefc;
  --warn: #9a6700;
  --warn-bg: #fff4d6;
  --bad: #c62828;
  --bad-bg: #fdeaea;
  --idle: #6b7280;
  --idle-bg: #eef0f3;

  --bar-ok: #2da44e;
  --bar-warn: #d4a72c;
  --bar-bad: #e5534b;
  --bar-none: #d8dce2;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #151b23;
    --surface-2: #1c232d;
    --border: #2a323d;
    --text: #e6edf3;
    --muted: #9aa5b1;
    --faint: #6e7781;
    --link: #58a6ff;

    --ok: #3fb950;
    --ok-bg: rgba(46, 160, 67, 0.15);
    --run: #58a6ff;
    --run-bg: rgba(56, 139, 253, 0.15);
    --warn: #d29922;
    --warn-bg: rgba(187, 128, 9, 0.15);
    --bad: #f85149;
    --bad-bg: rgba(248, 81, 73, 0.15);
    --idle: #8b949e;
    --idle-bg: rgba(110, 118, 129, 0.15);

    --bar-ok: #2ea043;
    --bar-warn: #bb8009;
    --bar-bad: #da3633;
    --bar-none: #30363d;

    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.mono { font-family: var(--mono); font-size: 12.5px; }
.grow { flex: 1; }

/* ---------- top bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.top-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand img { display: block; }
.brand-sep { color: var(--faint); font-weight: 400; }
.brand-page { color: var(--text); }
.brand-name { color: var(--muted); font-weight: 500; }

.summary { display: flex; gap: 8px; flex-wrap: wrap; }
.freshness { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* ---------- page ---------- */

.page { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }

section + section { margin-top: 32px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

h1, h2 { margin: 0; font-size: 16px; font-weight: 600; }
.section-note { color: var(--muted); font-size: 12.5px; }

.banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
}

.loading { color: var(--muted); }

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 20px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.run { color: var(--run); background: var(--run-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.idle { color: var(--idle); background: var(--idle-bg); }
.pill.run .dot, .pill.warn.moving .dot { animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
  .pill .dot, .step.running .step-icon { animation: none !important; }
}

/* ---------- apps ---------- */

.apps { display: grid; gap: 14px; }

.app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.app-name { font-weight: 600; font-size: 14.5px; }
.app-repo { color: var(--muted); font-size: 12.5px; }
.app-error { margin-left: auto; color: var(--bad); font-size: 12.5px; }

.envs { display: grid; grid-template-columns: 1fr 1fr; }
.env { padding: 14px 16px 16px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.env + .env { border-left: 1px solid var(--border); }

.env-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.env-name {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 78px;
}
.env-live { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.env-live .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.env-live.up .dot { background: var(--ok); }
.env-live.degraded .dot { background: var(--warn); }
.env-live.down .dot { background: var(--bad); }
.env-live.none .dot { background: var(--bar-none); }
.env-live.down, .env-live.degraded { font-weight: 600; }
.env-live.down { color: var(--bad); }
.env-live.degraded { color: var(--warn); }

.serving { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.serving-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.version {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.commit-title {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.meta { color: var(--muted); font-size: 12.5px; }
.meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.meta a:hover { color: var(--link); }

.note {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.note.run { background: var(--run-bg); }
.note.bad { background: var(--bad-bg); }
.note.warn { background: var(--warn-bg); }
.note-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.note-head strong { font-weight: 600; }
.note.run .note-head strong { color: var(--run); }
.note.bad .note-head strong { color: var(--bad); }
.note.warn .note-head strong { color: var(--warn); }
.note .grow { flex: 1; }
.note .commit-title { font-size: 12.5px; }

/* job steps: Build → Scan → Deploy */
.steps { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.step { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.step + .step::before { content: ""; width: 10px; height: 1px; background: var(--faint); margin-right: 1px; }
.step-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--bar-none);
  flex: none;
}
.step.done .step-icon { background: var(--ok); }
.step.failed .step-icon { background: var(--bad); }
.step.skipped .step-icon { background: var(--faint); }
.step.running { color: var(--text); font-weight: 600; }
.step.running .step-icon {
  background: transparent;
  border: 2px solid var(--run);
  border-right-color: transparent;
  animation: spin 0.9s linear infinite;
}
.step.waiting .step-icon { background: transparent; border: 1.5px dashed var(--faint); }
.step-time { font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 400; }

@keyframes spin { to { transform: rotate(360deg); } }

/* live-check history strip */
.strip-wrap { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.strip { display: flex; gap: 2px; height: 18px; align-items: stretch; }
.strip span { flex: 1; border-radius: 2px; background: var(--bar-none); min-width: 2px; }
.strip span.up { background: var(--bar-ok); }
.strip span.degraded { background: var(--bar-warn); }
.strip span.down { background: var(--bar-bad); }
.strip-legend { display: flex; justify-content: space-between; gap: 8px; color: var(--faint); font-size: 11px; }
.strip-legend span:nth-child(2) { text-align: center; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.checks .bad { color: var(--bad); font-weight: 600; }

/* ---------- builds ---------- */

.builds { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.build {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.build-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.build-name { font-weight: 600; }

/* ---------- activity ---------- */

.activity {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.activity li {
  display: grid;
  grid-template-columns: 112px 150px 128px minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: center;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.activity li:first-child { border-top: none; }
.activity .when { color: var(--muted); font-size: 12.5px; }
.activity .where { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.activity .where small { color: var(--muted); font-size: 11.5px; }
.activity .what { display: flex; gap: 8px; align-items: center; min-width: 0; }
.activity .by { color: var(--muted); font-size: 12.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity .empty { display: block; color: var(--muted); }

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.tag.prod { color: var(--text); }
.tag.rollback { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

.env-legend { display: none; }

/* ---------- footer ---------- */

.foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 28px;
  color: var(--faint);
  font-size: 12px;
}

/* ---------- narrow screens ---------- */

@media (max-width: 820px) {
  .envs { grid-template-columns: 1fr; }
  .env + .env { border-left: none; border-top: 1px solid var(--border); }
  .activity li {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "where status"
      "what what"
      "when by";
    row-gap: 4px;
  }
  .activity .where { grid-area: where; }
  .activity .status { grid-area: status; justify-self: end; }
  .activity .what { grid-area: what; }
  .activity .when { grid-area: when; }
  .activity .by { grid-area: by; }
  .freshness { margin-left: 0; width: 100%; }
}

/* ---------- navigation & who ---------- */

[hidden] { display: none !important; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--surface-2); color: var(--text); }

.who { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 13px; }
.freshness + .who { margin-left: 0; }
.who-name { color: var(--text); font-weight: 500; }
.unlock { color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 1px 8px; font-size: 12px; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--run); border-color: var(--run); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--run) 88%, #000); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { min-height: 26px; padding: 2px 9px; font-size: 12.5px; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { border: none; background: none; color: var(--link); cursor: pointer; padding: 0; font: inherit; }
.link-btn.small { font-size: 12px; }

:focus-visible { outline: 2px solid var(--run); outline-offset: 2px; }

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 9px;
  min-width: 0;
}
input:disabled, textarea:disabled { opacity: 0.6; }
label { display: block; margin: 12px 0 4px; font-weight: 500; font-size: 13px; }
.form-error { color: var(--bad); margin: 10px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.faint { color: var(--faint); }
.bad-text { color: var(--bad); }
.ok-text { color: var(--ok); }
.wrap { word-break: break-all; white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.spaced { margin-top: 32px; }
.spaced-small { margin-top: 10px; }
.empty { color: var(--muted); padding: 14px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad { padding: 16px 18px; }
.card h2 { margin-bottom: 8px; }

/* ---------- sign in ---------- */

.auth-card {
  max-width: 380px;
  margin: 8vh auto 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card input { width: 100%; }
.auth-card .btn.primary { margin-top: 18px; }
.auth-card .btn:not(.primary) { margin-top: 12px; align-self: flex-start; }

/* ---------- env list ---------- */

.env-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.env-app { overflow: hidden; }
.card-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.env-cells { display: grid; grid-template-columns: 1fr 1fr; }
.env-cell { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; color: var(--text); min-width: 0; }
.env-cell + .env-cell { border-left: 1px solid var(--border); }
.env-cell:hover { background: var(--surface-2); text-decoration: none; }
.env-cell-head { display: flex; align-items: center; gap: 6px; }
.lock { font-size: 12px; }

/* ---------- env detail ---------- */

.back { display: inline-block; margin-bottom: 10px; color: var(--muted); }
.env-title { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.env-title h1 { font-size: 20px; }
.env-title p { margin: 4px 0 0; max-width: 760px; }
.status-panel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.status-panel .note { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.status-panel .row-actions { width: 100%; }

.pending {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-color: color-mix(in srgb, var(--warn) 45%, var(--border));
  background: color-mix(in srgb, var(--warn-bg) 55%, var(--surface));
  flex-wrap: wrap;
}
.pending-actions { display: flex; gap: 8px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.key-chip { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.key-chip.add { color: var(--ok); }
.key-chip.del { color: var(--bad); }
.key-chip.chg { color: var(--warn); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tab {
  border: none;
  background: none;
  font: inherit;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--run); font-weight: 600; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .search { flex: 1; min-width: 200px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
td { padding: 6px 12px; border-top: 1px solid var(--border); vertical-align: top; }
tbody tr:first-child td { border-top: none; }
th.narrow, td.narrow { width: 1%; white-space: nowrap; text-align: center; }

table.vars td:first-child { width: 34%; }
.var-key, .var-value, .var-note { width: 100%; }
.var-key { font-weight: 600; }
.var-key:disabled { opacity: 1; border-color: transparent; background: transparent; padding-left: 0; }
textarea.var-value { resize: vertical; min-height: 34px; }
.var-note { margin-top: 4px; font-size: 12px; padding: 3px 8px; color: var(--muted); }
.hidden-value { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.dots { color: var(--faint); letter-spacing: 1px; }
tr.dirty td { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
tr.removed td { opacity: 0.55; }
tr.removed .var-key { text-decoration: line-through; }
td input[type=checkbox] { width: 16px; height: 16px; margin-top: 8px; }

.save-bar {
  position: sticky;
  bottom: 12px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--run) 45%, var(--border));
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.14);
  flex-wrap: wrap;
}

.history, .audit { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.history li, .audit li { padding: 10px 14px; border-top: 1px solid var(--border); }
.history li:first-child, .audit li:first-child { border-top: none; }
.history-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.history-note { margin-top: 4px; }
.log { margin: 8px 0 0; padding: 10px; background: var(--surface-2); border-radius: 8px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; }
details summary { cursor: pointer; color: var(--muted); margin-top: 6px; }

table.diff td { font-size: 13px; }
table.diff tr.add td:first-child { color: var(--ok); }
table.diff tr.del td:first-child { color: var(--bad); }
table.diff tr.chg td:first-child { color: var(--warn); }

table.people td { vertical-align: middle; }

.account-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; }
.account-grid input { width: 100%; }
.account-grid .btn { margin-top: 14px; }

/* ---------- modal & toast ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 14, 20, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  overflow-y: auto;
}
.modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; }
.modal-body { padding: 8px 18px 4px; }
.modal-body input:not([type=checkbox]), .modal-body select, .modal-body textarea { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 16px; }
.change-list { margin: 6px 0; padding-left: 18px; max-height: 220px; overflow: auto; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: 6px; text-align: center; margin-top: 8px; }
.secret-box { padding: 10px 12px; margin: 8px 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.qr-wrap { display: flex; justify-content: center; margin: 10px 0; }
.qr { width: 200px; height: 200px; border-radius: 8px; }
.steps-list { padding-left: 18px; margin: 6px 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 820px) {
  .env-cells { grid-template-columns: 1fr; }
  .env-cell + .env-cell { border-left: none; border-top: 1px solid var(--border); }
  table.vars td:first-child { width: auto; }
  table.vars thead { display: none; }
  table.vars tr { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
  table.vars td { border: none; padding: 0; }
  table.vars td:nth-child(1) { grid-column: 1 / -1; }
  table.vars td:nth-child(2) { grid-column: 1; }
  .who { width: 100%; margin-left: 0; }
}
