:root {
  --charcoal-950: #0b1016;
  --charcoal-900: #111820;
  --charcoal-850: #171f28;
  --charcoal-800: #1d2732;
  --steel-700: #33404d;
  --steel-600: #4c5b69;
  --steel-500: #71808d;
  --steel-400: #9aa6b2;
  --steel-300: #c5ccd3;
  --steel-200: #dce1e6;
  --steel-100: #eef1f4;
  --forge-600: #d86d16;
  --forge-500: #f28c28;
  --forge-400: #ffac55;
  --forge-soft: #3a2416;
  --green: #36c777;
  --green-soft: rgba(54, 199, 119, .14);
  --yellow: #f4c253;
  --yellow-soft: rgba(244, 194, 83, .14);
  --red: #ef6b6b;
  --red-soft: rgba(239, 107, 107, .14);
  --blue: #6ab2ff;
  --blue-soft: rgba(106, 178, 255, .14);
  --white: #ffffff;
  --text: #f6f7f8;
  --text-muted: #aeb8c2;
  --line: rgba(255, 255, 255, .09);
  --panel: rgba(24, 33, 43, .92);
  --panel-solid: #18212b;
  --shadow: 0 20px 52px rgba(0, 0, 0, .28);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, .18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --nav-height: 78px;
  --content-width: 1120px;
  --ease: 180ms ease;
}

* { box-sizing: border-box; }
/* v0.3.2: Respect the HTML hidden attribute even when a component sets display. */
[hidden] { display: none !important; }

html { min-height: 100%; scroll-behavior: smooth; background: var(--charcoal-950); }
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% -10%, rgba(242, 140, 40, .16), transparent 34rem),
    radial-gradient(circle at 100% 12%, rgba(90, 109, 126, .13), transparent 30rem),
    var(--charcoal-950) url('../assets/forge-texture.svg') repeat;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(242, 140, 40, .52);
  outline-offset: 3px;
}
svg { display: block; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(-140%);
  border-radius: 10px;
  background: var(--forge-500);
  color: var(--charcoal-950);
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.is-hidden { display: none !important; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(11, 16, 22, .86), rgba(11, 16, 22, .98)),
    url('../assets/forge-texture.svg') repeat,
    var(--charcoal-950);
  transition: opacity 420ms ease, visibility 420ms ease;
}
.splash.is-leaving { opacity: 0; visibility: hidden; }
.splash__glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 140, 40, .28), transparent 66%);
  filter: blur(16px);
  animation: forgePulse 2.2s ease-in-out infinite;
}
.splash__logo {
  position: relative;
  width: 154px;
  height: 154px;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.42));
}
.splash__kicker {
  position: relative;
  margin: 18px 0 0;
  color: var(--forge-400);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .22em;
}
.splash__title {
  position: relative;
  margin: 0;
  font-size: clamp(34px, 10vw, 54px);
  line-height: 1;
  letter-spacing: -.04em;
}
.splash__title span { color: var(--forge-500); }
.splash__subtitle {
  position: relative;
  margin: 5px 0 22px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.splash__loader {
  position: relative;
  width: 180px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.09);
}
.splash__loader span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forge-600), var(--forge-400));
  animation: loadingBar 1.1s ease-in-out infinite;
}
.splash__version {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  margin: 0;
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 700;
}

.app-shell { min-height: 100vh; }

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  background: #5b3a0f;
  color: #ffe3aa;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.offline-banner svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 22, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.offline-banner:not([hidden]) + .topbar { top: 38px; }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, var(--content-width));
  min-height: 72px;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand__text { display: grid; min-width: 0; }
.brand__text strong { font-size: 15px; letter-spacing: .08em; }
.brand__text small { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255,255,255,.035);
  color: var(--text-muted);
  padding: 0 11px;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}
.connection-pill:hover { border-color: rgba(242, 140, 40, .35); background: rgba(242, 140, 40, .08); color: var(--text); }
.connection-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--steel-500);
  box-shadow: 0 0 0 4px rgba(113, 128, 141, .12);
}
.connection-pill__dot.is-online { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.connection-pill__dot.is-error { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.connection-pill__dot.is-offline { background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.connection-pill__dot.is-checking { animation: dotPulse 1.2s ease-in-out infinite; }
.connection-pill span:last-child { font-size: 12px; font-weight: 800; }
.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(242, 140, 40, .28);
  border-radius: 99px;
  background: rgba(242, 140, 40, .1);
  color: var(--forge-400);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
}

.view-root {
  width: min(100%, var(--content-width));
  min-height: calc(100vh - 72px - var(--nav-height));
  margin: 0 auto;
  padding: 24px 16px calc(var(--nav-height) + 44px + env(safe-area-inset-bottom));
}
.view { animation: viewIn 220ms ease both; }

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.page-heading__eyebrow {
  margin: 0 0 8px;
  color: var(--forge-400);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.page-heading h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.page-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 248px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(125deg, rgba(29,39,50,.98), rgba(17,24,32,.92)),
    url('../assets/forge-texture.svg') repeat;
  box-shadow: var(--shadow);
  padding: 28px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,140,40,.3), transparent 67%);
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(var(--forge-400), var(--forge-600));
}
.hero__content { position: relative; z-index: 1; max-width: 710px; }
.hero__kicker { margin: 0 0 10px; color: var(--forge-400); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(34px, 9vw, 58px); line-height: 1; letter-spacing: -.045em; }
.hero h1 span { color: var(--forge-500); }
.hero__copy { max-width: 620px; margin: 16px 0 22px; color: var(--text-muted); font-size: 16px; line-height: 1.65; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 9px; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.card--padded { padding: 20px; }
.card--accent { border-top: 4px solid var(--forge-500); }
.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.card__title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(242, 140, 40, .11);
  color: var(--forge-400);
}
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card h2, .card h3 { margin: 0; line-height: 1.2; }
.card h2 { font-size: 20px; }
.card h3 { font-size: 17px; }
.card__subtitle { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.card__body { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.metric-card { min-height: 138px; padding: 18px; }
.metric-card__top { display: flex; justify-content: space-between; gap: 12px; }
.metric-card__icon { color: var(--forge-400); }
.metric-card__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.metric-card__value { margin: 18px 0 4px; font-size: 26px; font-weight: 900; line-height: 1; }
.metric-card__label { margin: 0; color: var(--text-muted); font-size: 13px; font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--success { border-color: rgba(54,199,119,.24); background: var(--green-soft); color: var(--green); }
.badge--warning { border-color: rgba(244,194,83,.24); background: var(--yellow-soft); color: var(--yellow); }
.badge--danger { border-color: rgba(239,107,107,.24); background: var(--red-soft); color: var(--red); }
.badge--info { border-color: rgba(106,178,255,.24); background: var(--blue-soft); color: var(--blue); }
.badge--forge { border-color: rgba(242,140,40,.24); background: rgba(242,140,40,.12); color: var(--forge-400); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button--primary { background: linear-gradient(135deg, var(--forge-500), var(--forge-600)); color: #17100a; box-shadow: 0 10px 26px rgba(242,140,40,.2); }
.button--secondary { border-color: var(--line); background: rgba(255,255,255,.05); color: var(--text); }
.button--ghost { border-color: transparent; background: transparent; color: var(--forge-400); }
.button--small { min-height: 38px; border-radius: 10px; padding: 0 12px; font-size: 13px; }
.button[disabled], .button.is-disabled { opacity: .46; cursor: not-allowed; transform: none; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 28px 0 13px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.section-heading p { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; }

.status-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}
.status-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-panel__main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.status-orb {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(113,128,141,.12);
  color: var(--steel-400);
}
.status-orb svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.status-orb--success { background: var(--green-soft); color: var(--green); }
.status-orb--danger { background: var(--red-soft); color: var(--red); }
.status-orb--warning { background: var(--yellow-soft); color: var(--yellow); }
.status-panel h2 { margin: 0; font-size: 18px; }
.status-panel p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.status-panel__details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.detail-chip { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); padding: 11px 12px; }
.detail-chip small { display: block; margin-bottom: 4px; color: var(--steel-500); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.detail-chip strong { display: block; overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.empty-state {
  display: grid;
  justify-items: center;
  min-height: 330px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  padding: 44px 24px;
  text-align: center;
}
.empty-state__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border: 1px solid rgba(242,140,40,.22);
  border-radius: 22px;
  background: rgba(242,140,40,.1);
  color: var(--forge-400);
}
.empty-state__icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h2 { margin: 0; font-size: 24px; }
.empty-state p { max-width: 580px; margin: 12px 0 22px; color: var(--text-muted); font-size: 15px; line-height: 1.65; }

.milestone-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.milestone-item { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 0 0 11px; color: var(--text-muted); font-size: 14px; }
.milestone-item:last-child { border-bottom: 0; padding-bottom: 0; }
.milestone-item svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: var(--forge-400); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row:first-child { padding-top: 0; }
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row h3 { margin: 0; font-size: 15px; }
.setting-row p { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.switch { position: relative; flex: 0 0 auto; width: 52px; height: 30px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 99px; background: var(--steel-700); cursor: pointer; transition: background var(--ease), border-color var(--ease); }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform var(--ease); }
.switch input:checked + span { border-color: rgba(242,140,40,.4); background: var(--forge-500); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid rgba(242,140,40,.45); outline-offset: 3px; }

.diagnostics-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.diagnostic-row { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); gap: 14px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.diagnostic-row:last-child { border-bottom: 0; }
.diagnostic-row dt { color: var(--text-muted); font-size: 12px; font-weight: 800; }
.diagnostic-row dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 13px; font-weight: 800; text-align: right; }
.diagnostic-row dd.is-good { color: var(--green); }
.diagnostic-row dd.is-bad { color: var(--red); }
.diagnostic-row dd.is-warn { color: var(--yellow); }
.code-block { overflow: auto; max-height: 180px; border: 1px solid var(--line); border-radius: 12px; background: var(--charcoal-950); padding: 12px; color: var(--steel-300); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 0 10px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.bottom-nav__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  width: min(100%, 760px);
  min-height: var(--nav-height);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 21px;
  background: rgba(17,24,32,.94);
  box-shadow: 0 20px 60px rgba(0,0,0,.46);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
}
.nav-item {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  color: var(--steel-500);
  text-decoration: none;
  transition: color var(--ease), background var(--ease);
}
.nav-item::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: transparent; transform: translateX(-50%); transition: background var(--ease), width var(--ease); }
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { color: var(--steel-300); background: rgba(255,255,255,.025); }
.nav-item.is-active { color: var(--forge-400); background: linear-gradient(180deg, rgba(242,140,40,.09), transparent); }
.nav-item.is-active::before { width: 44px; background: var(--forge-500); }

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(11,16,22,.76);
  backdrop-filter: blur(8px);
}
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--forge-500); border-radius: 50%; animation: spin .8s linear infinite; }
.global-loader span { color: var(--text-muted); font-size: 13px; font-weight: 800; }

.toast-region {
  position: fixed;
  right: 14px;
  bottom: calc(var(--nav-height) + 22px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 240;
  display: grid;
  justify-items: center;
  gap: 9px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(29,39,50,.97);
  box-shadow: var(--shadow);
  padding: 13px 15px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  animation: toastIn 220ms ease both;
  pointer-events: auto;
}
.toast::before { content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.toast--success::before { background: var(--green); }
.toast--warning::before { background: var(--yellow); }
.toast--danger::before { background: var(--red); }
.toast.is-leaving { animation: toastOut 180ms ease both; }

.noscript { max-width: 520px; margin: 50px auto; border-radius: 14px; background: #fff; color: #111; padding: 24px; text-align: center; }

@keyframes forgePulse { 0%,100% { transform: scale(.96); opacity: .7; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes loadingBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
@keyframes dotPulse { 0%,100% { opacity: .45; transform: scale(.82); } 50% { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }

@media (min-width: 640px) {
  .view-root { padding-right: 22px; padding-left: 22px; }
  .grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .status-panel__details { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .diagnostics-grid { grid-template-columns: 1fr; }
}

@media (min-width: 920px) {
  .topbar__inner { padding-right: 24px; padding-left: 24px; }
  .view-root { padding-top: 32px; padding-right: 24px; padding-left: 24px; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hero { padding: 36px; }
  .card--padded { padding: 24px; }
}

@media (max-width: 460px) {
  .connection-pill span:last-child { display: none; }
  .connection-pill { width: 36px; justify-content: center; padding: 0; }
  .role-badge { min-height: 32px; padding: 0 9px; }
  .hero { min-height: 232px; padding: 24px 21px; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .status-panel__row { align-items: flex-start; flex-direction: column; }
  .status-panel__row .button { width: 100%; }
  .page-heading { display: block; }
  .nav-item span { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body[data-motion="reduced"] *,
body[data-motion="reduced"] *::before,
body[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}


/* v0.3.2 startup recovery */
.startup-error { max-width: 760px; margin: 28px auto; border-top: 4px solid var(--red); }
.startup-error h1 { margin: 0 0 12px; font-size: clamp(26px, 6vw, 38px); }
.startup-error p { color: var(--text-muted); line-height: 1.65; }
.startup-error pre { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.24); padding: 14px; color: var(--red); }
