:root {
  color-scheme: dark;
  --bg: #101213;
  --surface: #191c1d;
  --surface-raised: #202324;
  --line: #272b2c;
  --line-soft: #303536;
  --text: #f8fafc;
  --muted: #a3a6a6;
  --quiet: #777c7d;
  --green: #22c55e;
  --green-deep: rgba(34, 197, 94, 0.12);
  --amber: #f59e0b;
  --amber-deep: rgba(245, 158, 11, 0.12);
  --red: #ef6464;
  --red-deep: rgba(239, 100, 100, 0.12);
  --unknown: #777c7d;
  --primary: #e98b3d;
  --primary-hover: #d97931;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
}
button { font: inherit; }
.hf-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 18, 19, 0.96);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.hf-nav-inner {
  position: relative;
  display: flex;
  width: min(1320px, 100% - 64px);
  min-height: 68px;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin: 0 auto;
}
.hf-nav-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.hf-brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--primary); font-size: .82rem; font-weight: 900; }
.hf-nav-label { color: var(--muted); font: 600 10px var(--sans); letter-spacing: .08em; }
.hf-nav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.topbar-label { color: var(--muted); font: 600 11px var(--sans); }
.page-shell { width: min(1320px, 100% - 64px); margin: 0 auto; }
.topbar {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: block; flex: 0 0 auto;
  overflow: hidden; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); object-fit: cover;
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 12px; font-weight: 700; }
.brand-copy span, .updated-label, .eyebrow, .history-legend, .footer { font: 10px var(--mono); letter-spacing: 0; }
.brand-copy span { color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.updated-label { color: var(--muted); }
.updated-label time { margin-left: 6px; color: var(--text); }
.icon-button {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--muted); cursor: pointer;
}
.icon-button:hover { border-color: var(--primary); color: var(--text); }
.icon-button:disabled { cursor: wait; opacity: .6; }
.icon-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
main { padding-top: 47px; }
.overview { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 31px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); }
.eyebrow span { margin-left: 7px; color: var(--green); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 32px; line-height: 1.15; font-weight: 600; }
.overview-caption { margin: 0; color: var(--muted); font-size: 14px; }
.overall-status { display: flex; align-items: center; gap: 11px; min-width: 190px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.overall-status strong, .overall-status small { display: block; }
.overall-status strong { margin-bottom: 3px; font-size: 13px; }
.overall-status small { color: var(--muted); font-size: 11px; }
.status-orb { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--unknown); box-shadow: 0 0 0 4px rgba(119, 124, 125, .12); }
.overall-status[data-state="up"] .status-orb { background: var(--green); box-shadow: 0 0 0 4px rgba(74, 222, 128, .12); }
.overall-status[data-state="degraded"] .status-orb { background: var(--amber); box-shadow: 0 0 0 4px rgba(242, 189, 89, .13); }
.overall-status[data-state="down"] .status-orb { background: var(--red); box-shadow: 0 0 0 4px rgba(251, 119, 119, .13); }
.notice { margin: 0 0 18px; padding: 12px 14px; border: 1px solid rgba(239, 100, 100, .35); border-radius: 8px; background: var(--red-deep); color: #ffb2b2; font-size: 13px; }
.notice[hidden] { display: none; }
.summary-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.summary-strip > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 65px; padding: 0 19px; }
.summary-strip > div + div { border-left: 1px solid var(--line-soft); }
.summary-label { color: var(--muted); font-size: 12px; }
.summary-strip strong { font: 500 16px var(--mono); }
.services-section { padding-top: 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; }
.section-heading .eyebrow { margin-bottom: 5px; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }
.history-legend { display: flex; align-items: center; gap: 8px; color: var(--quiet); white-space: nowrap; }
.history-legend i { width: 24px; height: 1px; background: var(--line); }
.service-groups { display: grid; gap: 22px; }
.service-group { border-top: 1px solid var(--line); }
.group-heading { display: flex; justify-content: space-between; align-items: center; padding: 13px 0 4px; }
.group-heading h3 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.group-heading span { color: var(--quiet); font: 10px var(--mono); }
.service-row {
  display: grid; grid-template-columns: minmax(190px, 1.15fr) minmax(250px, 2fr) minmax(180px, 1fr);
  align-items: center; gap: 24px; min-height: 76px; padding: 14px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.service-ident { min-width: 0; display: flex; align-items: center; gap: 11px; }
.service-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--unknown); }
.service-row[data-state="up"] .service-dot { background: var(--green); }
.service-row[data-state="degraded"] .service-dot { background: var(--amber); }
.service-row[data-state="down"] .service-dot { background: var(--red); }
.service-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.service-state { margin-left: auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.service-row[data-state="up"] .service-state { border-color: rgba(34, 197, 94, .4); background: var(--green-deep); color: #86efac; }
.service-row[data-state="degraded"] .service-state { border-color: rgba(245, 158, 11, .4); background: var(--amber-deep); color: #fcd34d; }
.service-row[data-state="down"] .service-state { border-color: rgba(239, 100, 100, .4); background: var(--red-deep); color: #ffb2b2; }
.history-cell { min-width: 0; }
.history-bars { display: grid; grid-template-columns: repeat(90, minmax(2px, 1fr)); align-items: end; gap: 2px; height: 22px; }
.history-bar { display: block; min-width: 2px; height: 100%; border-radius: 2px; background: #272b2c; }
.history-bar[data-state="up"] { background: #22c55e; }
.history-bar[data-state="degraded"] { background: #f59e0b; }
.history-bar[data-state="down"] { background: #ef6464; }
.history-bar[data-state="unknown"] { background: #303536; }
.history-foot { display: flex; justify-content: space-between; margin-top: 6px; color: var(--quiet); font: 9px var(--mono); }
.uptime-value { color: var(--muted); font: 11px var(--mono); text-align: right; white-space: nowrap; }
.metric-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric { min-width: 0; }
.metric-head { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 6px; color: var(--muted); font: 9px var(--mono); }
.metric-head strong { overflow: hidden; color: var(--text); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.metric-track { height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.metric-fill { height: 100%; border-radius: inherit; background: var(--green); }
.metric-fill[data-level="warning"] { background: var(--amber); }
.metric-fill[data-level="danger"] { background: var(--red); }
.service-row.has-metrics .metric-list { grid-column: 1 / -1; padding-left: 19px; }
.empty-state, .loading-row { display: flex; align-items: center; gap: 12px; min-height: 125px; padding: 22px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 13px; }
.empty-state p { margin: 0; font-size: 12px; line-height: 1.6; }
.loading-mark { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.2s ease-in-out infinite; }
.footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 44px; padding: 18px 0 24px; border-top: 1px solid var(--line-soft); color: var(--quiet); }

@keyframes pulse { 50% { opacity: .25; } }

@media (max-width: 850px) {
  .hf-nav-inner { width: min(760px, 100% - 40px); }
  .page-shell { width: min(100% - 40px, 760px); }
  .service-row { grid-template-columns: minmax(145px, 1fr) minmax(190px, 1.4fr); gap: 16px; }
  .service-row.has-metrics .metric-list { padding-left: 19px; }
}
@media (min-width: 768px) {
  .hf-nav-inner { min-height: 84px; gap: 1.5rem; }
}
@media (max-width: 560px) {
  .hf-nav-inner { width: calc(100% - 28px); min-height: 76px; justify-content: space-between; }
  .page-shell { width: calc(100% - 28px); }
  .topbar { min-height: 65px; }
  main { padding-top: 32px; }
  .overview { align-items: start; flex-direction: column; gap: 18px; padding-bottom: 23px; }
  h1 { font-size: 27px; }
  .overall-status { width: 100%; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip > div { min-height: 55px; padding: 0 13px; }
  .summary-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .summary-strip > div:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .services-section { padding-top: 31px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .service-row { grid-template-columns: minmax(0, 1fr) auto; gap: 13px 10px; padding: 14px 0; }
  .service-ident { grid-column: 1 / -1; }
  .history-cell { grid-column: 1 / -1; }
  .history-bars { gap: 1px; }
  .uptime-value { grid-column: 2; grid-row: 3; }
  .service-row.has-metrics .metric-list { padding: 0; }
  .footer { flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
