:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-2: #111316;
  --surface: rgba(22, 24, 28, 0.86);
  --surface-strong: rgba(28, 30, 35, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(244, 242, 236, 0.12);
  --line-strong: rgba(244, 242, 236, 0.22);
  --text: #f6f3ec;
  --muted: #a8a098;
  --muted-strong: #d4cec4;
  --gold: #d6bd7b;
  --gold-strong: #f0d99a;
  --green: #7fb7a2;
  --steel: #7f9cad;
  --orange: #dbb583;
  --danger: #f29b91;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family: Inter, "SF Pro Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 189, 123, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 20%, rgba(127, 183, 162, 0.1), transparent 24rem),
    linear-gradient(180deg, rgba(127, 156, 173, 0.06), transparent 24rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  height: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at center, black 38%, transparent 86%);
  mask-image: radial-gradient(circle at center, black 38%, transparent 86%);
  pointer-events: none;
  opacity: 0.32;
}

button,
input,
select,
textarea {
  font: inherit;
}

code {
  font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, monospace;
  font-size: 0.92em;
  color: var(--gold-strong);
}

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

.page-shell {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  padding: 28px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand img {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.34));
}

.top-links,
.site-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.top-links a,
.site-footer a {
  transition: color 160ms ease;
}

.top-links a:hover,
.site-footer a:hover,
.ghost-link:hover,
.ghost-link:focus-visible,
.inline-link:hover,
.inline-link:focus-visible {
  color: var(--text);
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(380px, 1.18fr);
  align-items: stretch;
  gap: clamp(24px, 4vw, 56px);
  padding: 36px 0 22px;
}

.intro-panel {
  position: relative;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mark-wrap {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  animation: fadeUp 700ms ease both;
}

.mark-wrap img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 100%;
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
  animation: fadeUp 780ms ease both;
}

.subtitle {
  max-width: 560px;
  margin-top: 24px;
  color: var(--muted-strong);
  font-size: clamp(1.04rem, 2vw, 1.24rem);
  line-height: 1.58;
  animation: fadeUp 840ms ease both;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  animation: fadeUp 900ms ease both;
}

.ghost-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-strong);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.ghost-link:hover,
.ghost-link:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.signal-visual {
  display: block;
  position: absolute;
  right: 12px;
  bottom: 20px;
  width: min(260px, 54vw);
  height: 120px;
  border: 1px solid rgba(214, 189, 123, 0.2);
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    90deg,
    rgba(214, 189, 123, 0.08) 0 1px,
    transparent 1px 42px
  );
  opacity: 0.34;
  pointer-events: none;
}

.signal-visual::before,
.signal-visual::after,
.signal-visual span {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.signal-visual::before {
  left: 20px;
  right: 20px;
  top: 30px;
  height: 8px;
  background: rgba(127, 183, 162, 0.22);
}

.signal-visual::after {
  left: 20px;
  right: 70px;
  bottom: 30px;
  height: 8px;
  background: rgba(127, 156, 173, 0.2);
  animation: none;
}

.signal-visual span:nth-child(1) {
  left: 20px;
  right: 110px;
  top: 56px;
  height: 8px;
  background: rgba(214, 189, 123, 0.22);
}

.signal-visual span:nth-child(2) {
  right: 20px;
  top: 24px;
  width: 18px;
  height: 18px;
  background: var(--green);
}

.signal-visual span:nth-child(3) {
  right: 48px;
  top: 52px;
  width: 18px;
  height: 18px;
  background: var(--gold);
}

.signal-visual span:nth-child(4) {
  right: 86px;
  bottom: 24px;
  width: 18px;
  height: 18px;
  background: var(--steel);
  animation: none;
}

.summary-card,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.summary-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(24px, 4vw, 34px);
  animation: fadeUp 720ms ease both;
}

body[data-status="degraded"] .summary-card {
  border-color: rgba(219, 181, 131, 0.42);
}

body[data-status="outage"] .summary-card {
  border-color: rgba(242, 155, 145, 0.48);
}

.summary-topline,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.summary-card h2,
.panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.summary-detail,
.panel-note,
.stack-detail,
.empty-detail,
.history-detail,
.metric-detail,
.service-description,
.service-note {
  color: var(--muted-strong);
  line-height: 1.6;
}

.summary-meta,
.service-meta,
.stack-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.endpoint-label {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-strong);
  background: rgba(214, 189, 123, 0.08);
  font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
}

.status-badge,
.mini-badge,
.stack-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge-operational,
.mini-badge-operational,
.stack-badge-operational {
  color: #d8efe6;
  background: rgba(127, 183, 162, 0.12);
  border-color: rgba(127, 183, 162, 0.28);
}

.status-badge-degraded,
.mini-badge-degraded,
.stack-badge-degraded {
  color: #f7e1ba;
  background: rgba(219, 181, 131, 0.12);
  border-color: rgba(219, 181, 131, 0.28);
}

.status-badge-outage,
.mini-badge-outage,
.stack-badge-outage {
  color: #ffd2cb;
  background: rgba(242, 155, 145, 0.12);
  border-color: rgba(242, 155, 145, 0.28);
}

.status-badge-maintenance,
.mini-badge-maintenance,
.stack-badge-maintenance {
  color: #dce7ef;
  background: rgba(127, 156, 173, 0.12);
  border-color: rgba(127, 156, 173, 0.28);
}

.status-badge-pending,
.mini-badge-pending,
.stack-badge {
  color: var(--gold-strong);
  background: rgba(214, 189, 123, 0.12);
  border-color: rgba(214, 189, 123, 0.24);
}

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

.metric-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 136px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  animation: fadeUp 820ms ease both;
}

.metric-card[data-placeholder="true"]::after,
.service-card-placeholder .placeholder-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 2.6s ease-in-out infinite;
  pointer-events: none;
}

.metric-label,
.service-category,
.empty-eyebrow {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  font-size: clamp(1.28rem, 2.4vw, 1.62rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  padding: 12px 0 42px;
}

.panel {
  grid-column: span 6;
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 28px);
  animation: fadeUp 900ms ease both;
}

.panel-wide {
  grid-column: 1 / -1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.service-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  animation: fadeUp 840ms ease both;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--gold);
}

.service-card[data-kind="operational"]::before {
  background: var(--green);
}

.service-card[data-kind="degraded"]::before {
  background: var(--orange);
}

.service-card[data-kind="outage"]::before {
  background: var(--danger);
}

.service-card[data-kind="maintenance"]::before {
  background: var(--steel);
}

.service-card[data-kind="pending"]::before {
  background: var(--gold);
}

.service-header,
.stack-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.service-header {
  flex-direction: column;
  gap: 10px;
}

.service-name,
.stack-title {
  font-size: 1.12rem;
  line-height: 1.24;
  letter-spacing: 0;
}

.service-history {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.service-history-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(214, 189, 123, 0.05);
  font-size: 0.92rem;
}

.stack-list {
  display: grid;
  gap: 14px;
}

.stack-item,
.empty-state {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018));
  animation: fadeUp 840ms ease both;
}

.empty-state {
  min-height: 220px;
  place-content: center;
}

.empty-title {
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.history-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.history-bar {
  min-width: 0;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(214, 189, 123, 0.18);
}

.history-bar[data-kind="operational"] {
  background: rgba(127, 183, 162, 0.48);
  border-color: rgba(127, 183, 162, 0.48);
}

.history-bar[data-kind="degraded"] {
  background: rgba(219, 181, 131, 0.48);
  border-color: rgba(219, 181, 131, 0.48);
}

.history-bar[data-kind="outage"] {
  background: rgba(242, 155, 145, 0.48);
  border-color: rgba(242, 155, 145, 0.48);
}

.history-bar[data-kind="maintenance"] {
  background: rgba(127, 156, 173, 0.48);
  border-color: rgba(127, 156, 173, 0.48);
}

.inline-link {
  color: var(--gold-strong);
  font-weight: 700;
}

.placeholder-line {
  position: relative;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.placeholder-line-short {
  width: 34%;
}

.placeholder-line-wide {
  width: 78%;
  height: 17px;
}

.placeholder-line-soft {
  width: 54%;
}

.site-footer {
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.28;
  }

  50% {
    transform: scale(1.02);
    opacity: 0.52;
  }
}

@keyframes sweep {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0.72;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 1080px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: auto;
    padding: 32px 0 12px;
  }

  .signal-visual {
    right: -38px;
    bottom: -22px;
    width: 250px;
  }

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

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 760px);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .panel-wide {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  .summary-topline,
  .panel-head,
  .summary-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .metrics-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-header,
  .stack-item-top {
    flex-direction: column;
  }

  .signal-visual {
    right: -56px;
    bottom: -78px;
    width: 230px;
    opacity: 0.3;
  }
}
