:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --surface: rgba(17, 24, 39, 0.9);
  --surface-raised: #1f2937;
  --line: #1f2937;
  --line-soft: #202837;
  --text: #f4f4f5;
  --muted: #a6a7ad;
  --quiet: #777b85;
  --green: #5fbd7a;
  --green-deep: rgba(36, 128, 70, 0.2);
  --amber: #f2bd59;
  --amber-deep: #3a2e18;
  --red: #fb7777;
  --red-deep: #3b2022;
  --unknown: #85868d;
  --primary: #5865f2;
  --primary-hover: #4752c4;
  --mono: 'Inter', sans-serif;
  --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: radial-gradient(ellipse at 50% -34%, rgba(88, 101, 242, 0.13) 0, transparent 48%), 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 #1f2937;
  background: rgba(8, 12, 20, 0.98);
  color: #f8fafc;
  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 a { color: #cbd5e1; text-decoration: none; }
.hf-nav a:hover { color: #fff; }
.hf-nav-brand { display: inline-flex; align-items: center; gap: .75rem; color: #f8fafc !important; font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.hf-nav-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; }
.hf-nav-links { display: flex; align-items: center; justify-content: flex-start; gap: 1.1rem; }
.hf-nav-links > a, .hf-nav-links > .invite-menu > summary { display: flex; align-items: center; padding: .5rem 0; color: #cbd5e1; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.hf-nav-links > a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px var(--primary); }
.invite-menu { position: relative; }
.invite-menu > summary { cursor: pointer; list-style: none; }
.invite-menu > summary::-webkit-details-marker { display: none; }
.invite-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-left: 7px;
  fill: none;
  stroke: #a6a7ad;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.invite-menu[open] > summary .invite-chevron { transform: rotate(180deg); }
.invite-options {
  position: absolute;
  top: calc(100% + 12px);
  left: -10px;
  z-index: 1100;
  display: none;
  width: 208px;
  gap: 3px;
  padding: 6px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #060911;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .55);
}
.invite-menu[open] > .invite-options { display: flex; flex-direction: column; }
.invite-options a { display: flex; min-height: 40px; align-items: center; padding: .55rem .7rem; border-radius: 5px; color: #cbd5e1; font-size: .92rem; font-weight: 500; text-decoration: none; }
.invite-options a:hover { background: #0f172a; color: #fff; }
.hf-mobile-menu { display: none; }
.hf-nav a:focus-visible, .hf-mobile-menu summary: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: #000; 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: rgba(21, 28, 24, .72); }
.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(99, 113, 105, .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 #583536; 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: rgba(21, 28, 24, .72);
}
.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: #248046; background: var(--green-deep); color: #a6f0b8; }
.service-row[data-state="degraded"] .service-state { border-color: #5d4b28; background: var(--amber-deep); color: #f6d48e; }
.service-row[data-state="down"] .service-state { border-color: #63393c; 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: #344239; }
.history-bar[data-state="up"] { background: #248046; }
.history-bar[data-state="degraded"] { background: #d5a344; }
.history-bar[data-state="down"] { background: #e05d61; }
.history-bar[data-state="unknown"] { background: #344039; }
.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: #2b352e; }
.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; }
  .hf-nav-links { display: none; }
  .hf-mobile-menu { display: block; margin-left: auto; }
  .hf-mobile-menu > summary {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
  }
  .hf-mobile-menu > summary::-webkit-details-marker { display: none; }
  .hf-mobile-menu > summary span,
  .hf-mobile-menu > summary span::before,
  .hf-mobile-menu > summary span::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #cbd5e1;
  }
  .hf-mobile-menu > summary span { position: relative; }
  .hf-mobile-menu > summary span::before,
  .hf-mobile-menu > summary span::after { position: absolute; content: ''; }
  .hf-mobile-menu > summary span::before { top: -6px; }
  .hf-mobile-menu > summary span::after { top: 6px; }
  .hf-mobile-menu[open] .hf-mobile-links {
    position: absolute;
    top: calc(100% + 1px);
    right: -14px;
    left: -14px;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .8rem 1rem 1rem;
    border: 1px solid #1e293b;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: #060911;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .6);
  }
  .hf-mobile-links > a, .hf-mobile-links > .invite-menu > summary { display: flex; align-items: center; width: 100%; padding: .7rem .5rem; border-radius: 6px; color: #cbd5e1; font-size: .95rem; font-weight: 500; text-decoration: none; }
  .hf-mobile-links > .invite-menu > summary { justify-content: space-between; }
  .hf-mobile-links a:hover, .hf-mobile-links > .invite-menu > summary:hover { background: #0f172a; }
  .hf-mobile-links .invite-menu[open] .invite-options { position: static; display: flex; width: auto; margin: 0 .35rem .35rem; padding: .25rem; border-radius: 7px; box-shadow: none; }
  .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; }
}
