:root {
  color-scheme: light dark;
  --page: #f1f3f0;
  --paper: #fbfcfa;
  --surface: #ffffff;
  --ink: #171b18;
  --muted: #66716a;
  --faint: #6b756e;
  --line: #dce2de;
  --line-strong: #c7d0ca;
  --line-soft: #e7ece8;
  --line-hover: #a9b7ae;
  --accent: #14765a;
  --accent-deep: #0e5d47;
  --accent-soft: #e5f2ec;
  --ok: #15966c;
  --ok-soft: #e5f5ed;
  --ok-glow: rgba(21, 150, 108, .14);
  --warn: #bf7b1b;
  --warn-soft: #fcf0dc;
  --warn-deep: #71480d;
  --bad: #c3434f;
  --bad-soft: #f9e8eb;
  --bad-deep: #96343e;
  --stale: #748079;
  --stale-soft: #edf0ee;
  --stale-deep: #58635c;
  --btn-ink: #313a35;
  --btn-hover-bg: #f8faf8;
  --dialog-close-ink: #313a35;
  --cell-empty: #e2e6e3;
  --skeleton: #e5e9e6;
  --shimmer: rgba(220, 226, 222, .65);
  --brand-chip: #111512;
  --header-bg: rgba(241, 243, 240, .96);
  --header-glass: rgba(241, 243, 240, .85);
  --band-veil: rgba(251, 252, 250, .68);
  --backdrop: rgba(26, 34, 30, .56);
  --glow: rgba(20, 118, 90, .05);
  --noise-opacity: .3;
  --shadow: 0 18px 48px rgba(29, 48, 39, .09);
  --shadow-card: 0 8px 24px rgba(32, 49, 40, .035);
  --shadow-pop: 0 32px 96px rgba(22, 35, 29, .24);
  --radius: 8px;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --fs-micro: 10px;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 22px;
  --fs-2xl: 34px;
  --fs-hero: 46px;
  --fw-reg: 400;
  --fw-semi: 600;
  --fw-bold: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101412;
    --paper: #161b18;
    --surface: #1a201c;
    --ink: #e4eae6;
    --muted: #9aa69f;
    --faint: #808a84;
    --line: #2a322d;
    --line-strong: #3a443e;
    --line-soft: #232a26;
    --line-hover: #4a554e;
    --accent: #2fa07e;
    --accent-deep: #4cb894;
    --accent-soft: rgba(47, 160, 126, .14);
    --ok: #2eaa7d;
    --ok-soft: rgba(46, 170, 125, .14);
    --ok-glow: rgba(46, 170, 125, .22);
    --warn: #d69a3c;
    --warn-soft: rgba(214, 154, 60, .14);
    --warn-deep: #e0aa55;
    --bad: #e06c76;
    --bad-soft: rgba(224, 108, 118, .14);
    --bad-deep: #ea8a92;
    --stale: #8b968f;
    --stale-soft: rgba(139, 150, 143, .14);
    --stale-deep: #a7b1aa;
    --btn-ink: #cfd8d2;
    --btn-hover-bg: #222925;
    --dialog-close-ink: #b9c2bc;
    --cell-empty: #232a26;
    --skeleton: #212823;
    --shimmer: rgba(255, 255, 255, .05);
    --header-bg: rgba(16, 20, 18, .92);
    --header-glass: rgba(16, 20, 18, .8);
    --band-veil: rgba(22, 27, 24, .6);
    --backdrop: rgba(0, 0, 0, .62);
    --glow: rgba(47, 160, 126, .06);
    --noise-opacity: .12;
    --shadow: 0 18px 48px rgba(0, 0, 0, .45);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-pop: 0 32px 96px rgba(0, 0, 0, .6);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(1100px 420px at 50% -160px, var(--glow), transparent 70%) no-repeat, var(--page);
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.brand-copy span,
.history-direction {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.signal-label,
.signal-model {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
}

.summary-label,
.ratio-label,
.card-metric-label,
.detail-stat > span,
.availability-table th,
.timeline-head {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .05em;
}

.route-index,
.dialog-code,
.refresh-copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .02em;
}

.shell {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
}

@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header {
    background: var(--header-glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-visual {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--brand-chip);
}

.brand-visual img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.brand-copy span {
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
}

.live-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-glow);
}

.console-link,
.refresh-button,
.dialog-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--btn-ink);
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.console-link:hover,
.refresh-button:hover,
.dialog-action:hover {
  border-color: var(--line-hover);
  background: var(--btn-hover-bg);
}

.console-link:active,
.refresh-button:active,
.dialog-action:active {
  transform: translateY(1px);
}

.status-banner {
  border-bottom: 1px solid var(--line);
  background: var(--stale-soft);
  transition: background-color .3s ease;
}

.banner-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.banner-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--stale);
}

.banner-text {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--stale-deep);
}

.banner-meta {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.status-banner[data-tone="ok"] {
  background: var(--ok-soft);
}

.status-banner[data-tone="ok"] .banner-text {
  color: var(--accent-deep);
}

.status-banner[data-tone="ok"] .banner-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-glow);
}

.status-banner[data-tone="warn"] {
  background: var(--warn-soft);
}

.status-banner[data-tone="warn"] .banner-text {
  color: var(--warn-deep);
}

.status-banner[data-tone="warn"] .banner-dot {
  background: var(--warn);
}

.status-banner[data-tone="bad"] {
  background: var(--bad-soft);
}

.status-banner[data-tone="bad"] .banner-text {
  color: var(--bad-deep);
}

.status-banner[data-tone="bad"] .banner-dot {
  background: var(--bad);
}

.status-banner[data-feed="interrupted"] .banner-dot {
  background: transparent;
  border: 2px solid var(--stale);
}

.status-intro {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  align-items: center;
  gap: 80px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.intro-main {
  min-width: 0;
}

.section-kicker {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: var(--fs-hero);
  line-height: 1.08;
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.overall-message {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-reg);
  line-height: 1.72;
}

.signal-visual {
  min-height: 210px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px 0 16px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.signal-label,
.signal-model {
  color: var(--muted);
}

.signal-model {
  justify-self: end;
}

.signal-lines {
  display: grid;
  grid-template-columns: repeat(8, minmax(5px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 16px 0;
}

.signal-lines i {
  height: var(--h, 18%);
  min-height: 6px;
  border-radius: 2px;
  background: var(--cell-empty);
  transition: height .45s ease, background-color .45s ease;
}

.signal-lines i[data-tone="ok"] {
  background: var(--ok);
}

.signal-lines i[data-tone="warn"] {
  background: var(--warn);
}

.signal-lines i[data-tone="bad"] {
  background: var(--bad);
}

.signal-lines i[data-tone="stale"] {
  background: var(--stale);
}

.summary-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--band-veil);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-item {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
}

.summary-item + .summary-item {
  border-left: 1px solid var(--line);
}

.summary-value {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xl);
  line-height: 1;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.summary-value[data-tone="ok"] {
  color: var(--accent-deep);
}

.summary-value[data-tone="warn"] {
  color: var(--warn-deep);
}

.summary-value[data-tone="bad"] {
  color: var(--bad-deep);
}

#availableCount {
  view-transition-name: sum-available;
}

#averageFirstToken {
  view-transition-name: sum-first;
}

#averageLatency {
  view-transition-name: sum-latency;
}

#averageAvailability {
  view-transition-name: sum-avail;
}

.summary-note {
  margin-top: 8px;
  color: var(--faint);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
  line-height: 1.4;
}

.unit {
  font-size: .55em;
  font-weight: var(--fw-semi);
  color: var(--muted);
  margin-left: 1px;
  letter-spacing: .02em;
}

.monitor-shell {
  padding-top: 30px;
  padding-bottom: 68px;
}

.control-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
}

.period-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  align-self: stretch;
}

.period-button {
  position: relative;
  min-width: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
}

.period-button:hover {
  color: var(--ink);
}

.period-button[aria-selected="true"] {
  color: var(--accent-deep);
}

.tab-ink {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  pointer-events: none;
  transition: transform .22s ease, width .22s ease;
}

.refresh-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

.refresh-copy {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.refresh-copy[data-state="error"] {
  color: var(--bad);
  white-space: normal;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: .5;
}

.tier-section {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 36px;
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--line-strong);
}

.tier-section:last-child {
  border-bottom: 0;
}

.tier-rail {
  position: relative;
  min-width: 0;
  padding-top: 5px;
}

.tier-rail::after {
  content: "";
  display: block;
  width: 1px;
  height: 54px;
  margin: 16px 0 0 20px;
  background: var(--line-strong);
}

.tier-code {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-hero);
  line-height: 1;
  font-weight: var(--fw-bold);
  letter-spacing: .01em;
}

@supports (-webkit-text-stroke: 1px currentColor) {
  .tier-code {
    color: transparent;
    -webkit-text-stroke: 1.25px var(--muted);
  }
}

.tier-title {
  margin: 12px 0 0;
  font-size: var(--fs-md);
  line-height: 1.3;
  font-weight: var(--fw-bold);
}

.tier-summary {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
  line-height: 1.6;
}

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

.channel-card {
  width: 100%;
  min-width: 0;
  min-height: 364px;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.channel-card:hover {
  border-color: var(--line-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.channel-card:active {
  transform: translateY(0);
}

.card-signal {
  height: 4px;
  flex: 0 0 auto;
  background: var(--stale);
  transform-origin: top;
  transition: transform .18s ease;
}

.channel-card:hover .card-signal,
.channel-card:focus-visible .card-signal {
  transform: scaleY(1.5);
}

.channel-card[data-tone="ok"] .card-signal {
  background: var(--ok);
}

.channel-card[data-tone="warn"] .card-signal {
  background: var(--warn);
}

.channel-card[data-tone="bad"] .card-signal {
  background: var(--bad);
}

.card-inner {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
}

.card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
}

.card-heading {
  min-width: 0;
}

.route-index {
  display: block;
  margin-bottom: 8px;
  color: var(--faint);
  font-weight: var(--fw-semi);
}

.channel-card:hover .route-index {
  color: var(--accent);
}

.channel-name {
  display: block;
  font-size: var(--fs-xl);
  line-height: 1.2;
  font-weight: var(--fw-bold);
  overflow-wrap: anywhere;
}

.channel-description {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
  line-height: 1.65;
}

.ratio-block {
  min-width: 98px;
  padding: 2px 0 2px 20px;
  border-left: 1px solid var(--line-soft);
  text-align: right;
}

.ratio-label {
  display: block;
}

.ratio-value {
  display: block;
  margin-top: 8px;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  line-height: 1;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--stale-deep);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--stale);
}

.status-badge[data-tone="ok"] {
  color: var(--accent-deep);
}

.status-badge[data-tone="ok"]::before {
  background: var(--ok);
}

.status-badge[data-tone="warn"] {
  color: var(--warn-deep);
}

.status-badge[data-tone="warn"]::before {
  background: transparent;
  border: 2px solid var(--warn);
  box-sizing: border-box;
}

.status-badge[data-tone="bad"] {
  color: var(--bad-deep);
}

.status-badge[data-tone="bad"]::before {
  background: var(--bad);
}

.last-check {
  color: var(--faint);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
  font-variant-numeric: tabular-nums;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.card-metric {
  min-width: 0;
  padding-right: 14px;
}

.card-metric + .card-metric {
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}

.card-metric-label {
  display: block;
  white-space: nowrap;
}

.card-metric-value {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  line-height: 1;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.timeline-wrap {
  margin-top: auto;
  padding-top: 24px;
}

.timeline-head,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline {
  height: 28px;
  display: grid;
  grid-template-columns: repeat(60, minmax(2px, 1fr));
  align-items: stretch;
  gap: 2px;
  margin-top: 8px;
}

.timeline-cell {
  min-width: 2px;
  border-radius: 1px;
  background: var(--cell-empty);
}

.timeline-cell.operational {
  background: var(--ok);
}

.timeline-cell.degraded {
  background: var(--warn);
}

.timeline-cell.verifying {
  background: repeating-linear-gradient(135deg, var(--warn) 0 2px, var(--warn-soft) 2px 4px);
}

.timeline-cell.failed,
.timeline-cell.error {
  background: var(--bad);
}

.card-foot {
  margin-top: 8px;
  color: var(--faint);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
}

.card-foot > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-start {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history-start::after {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--line-strong);
}

.history-direction {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.history-direction::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--line-strong);
}

.card-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.card-cta {
  color: var(--accent-deep);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.card-cta::after {
  content: "→";
  display: inline-block;
  margin-left: 4px;
  transition: transform .18s ease;
}

.channel-card:hover .card-cta,
.channel-card:focus-visible .card-cta {
  opacity: 1;
  transform: none;
}

.channel-card:hover .card-cta::after {
  transform: translateX(2px);
}

@media (hover: none) {
  .card-cta {
    opacity: .62;
    transform: none;
  }
}

.empty-state,
.error-state {
  padding: 64px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}

.empty-state p,
.error-state p {
  max-width: 520px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.skeleton-groups {
  display: grid;
  gap: 28px;
}

.skeleton-tier {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 36px;
  min-height: 280px;
}

.skeleton-tier > span,
.skeleton-tier i {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.skeleton-tier > span {
  height: 110px;
  border: 0;
  background: var(--skeleton);
}

.skeleton-tier > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.skeleton-tier i::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--shimmer), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
}

dialog {
  width: min(780px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-code {
  color: var(--accent);
  font-weight: var(--fw-semi);
}

.dialog-title {
  margin: 8px 0 0;
  font-size: var(--fs-xl);
  line-height: 1.2;
  font-weight: var(--fw-bold);
}

.dialog-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
  line-height: 1.55;
}

.dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--dialog-close-ink);
  cursor: pointer;
  font-size: var(--fs-lg);
  line-height: 1;
}

.dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

.detail-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-stat {
  min-width: 0;
  padding: 16px 12px;
}

.detail-stat + .detail-stat {
  border-left: 1px solid var(--line-soft);
}

.detail-stat > span {
  display: block;
}

.detail-stat strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-variant-numeric: tabular-nums;
}

.detail-heading {
  margin: 24px 0 12px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.availability-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-xs);
}

.availability-table th,
.availability-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.availability-table th:first-child,
.availability-table td:first-child {
  text-align: left;
}

.detail-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  color: var(--warn-deep);
  font-size: var(--fs-xs);
  font-weight: var(--fw-reg);
  line-height: 1.55;
}

.dialog-foot {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 auto;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: var(--fs-xs);
}

.channel-card:focus-visible,
.period-button:focus-visible,
.refresh-button:focus-visible,
.console-link:focus-visible,
.dialog-close:focus-visible,
.dialog-action:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .status-intro {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr);
    gap: 42px;
  }

  .tier-section,
  .skeleton-tier {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 24px;
  }

  .channel-grid,
  .skeleton-tier > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --fs-hero: 38px;
    --fs-2xl: 28px;
  }

  .shell {
    width: min(100% - 28px, 1280px);
  }

  .live-indicator {
    display: none;
  }

  .status-intro {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 36px;
    padding-bottom: 35px;
  }

  .signal-visual {
    min-height: 150px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-item {
    min-height: 108px;
    padding: 18px 16px;
  }

  .summary-item:nth-child(3) {
    border-left: 0;
  }

  .summary-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .tier-section,
  .skeleton-tier {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tier-rail {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 13px;
  }

  .tier-rail::after {
    display: none;
  }

  .tier-code {
    grid-row: 1 / 3;
    font-size: var(--fs-2xl);
  }

  .tier-title {
    margin: 0;
  }

  .tier-summary {
    margin-top: 3px;
  }

  .skeleton-tier > span {
    width: 160px;
    height: 50px;
  }
}

@media (max-width: 540px) {
  :root {
    --fs-hero: 33px;
    --fs-2xl: 26px;
    --fs-xl: 19px;
    --fs-lg: 17px;
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-copy span {
    display: none;
  }

  .console-link {
    min-height: 34px;
    padding: 0 11px;
  }

  .banner-inner {
    flex-wrap: wrap;
  }

  .banner-meta {
    margin-left: 24px;
    flex-basis: 100%;
  }

  .section-kicker {
    margin-bottom: 16px;
  }

  .monitor-shell {
    padding-top: 18px;
    padding-bottom: 48px;
  }

  .control-row {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
    padding: 0 0 14px;
  }

  .period-tabs {
    min-height: 42px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .period-button {
    min-width: 0;
  }

  .refresh-wrap {
    justify-content: space-between;
  }

  .tier-section {
    padding: 25px 0 30px;
  }

  .channel-card {
    min-height: 360px;
  }

  .card-inner {
    min-height: 356px;
    padding: 20px 16px;
  }

  .card-head {
    gap: 12px;
  }

  .ratio-block {
    min-width: 78px;
    padding-left: 12px;
  }

  .card-metric {
    padding-right: 8px;
  }

  .card-metric + .card-metric {
    padding-left: 9px;
  }

  .card-metric-label {
    white-space: normal;
    line-height: 1.35;
  }

  .timeline {
    gap: 1px;
  }

  .history-start::after,
  .history-direction::before {
    width: 16px;
  }

  .footer-inner {
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }

  dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
  }

  .dialog-head,
  .dialog-body,
  .dialog-foot {
    padding-right: 16px;
    padding-left: 16px;
  }

  .detail-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-stat:nth-child(3) {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .detail-stat:nth-child(4) {
    border-top: 1px solid var(--line-soft);
  }

  .availability-table th,
  .availability-table td {
    padding-right: 4px;
    padding-left: 4px;
  }
}

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

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
