:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #071225;
  color: #edf4ff;
  font-synthesis: none;
  --background: #071225;
  --panel: #0e1f3e;
  --panel-raised: #10264a;
  --border: #294b76;
  --text: #edf4ff;
  --muted: #9eb1cb;
  --accent: #2768d7;
  --focus: #68a5ff;
  --success: #22a55a;
  --warning: #f0bc32;
  --error: #d43e53;
  --disabled: #63738a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% -10%, rgba(39, 104, 215, 0.18), transparent 30rem),
    var(--background);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 18, 37, 0.94);
}

.header-layout,
.footer-layout,
.section-heading,
.report-heading,
.profile-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-layout {
  min-height: 82px;
}

.brand,
.environment,
.eyebrow,
.metric-detail,
.secondary,
.section-heading p,
.site-footer p,
.report-heading p,
.profile-card p {
  margin: 0;
}

.brand {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand span {
  color: #76aaff;
}

.environment,
.secondary,
.metric-detail,
.section-heading > p,
.site-footer {
  color: var(--muted);
}

.environment {
  margin-top: 2px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #4d8df5;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  background: #3478e8;
}

.button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page-stack,
.section-stack {
  display: grid;
  gap: 22px;
}

.page-stack {
  padding-block: 28px 52px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 38, 74, 0.94), rgba(14, 31, 62, 0.98));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12);
}

.hero {
  display: flex;
  min-height: 220px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 30px;
  border-color: #3868a5;
}

.eyebrow {
  color: #8eb9ff;
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-top: 5px;
  font-size: 1.5rem;
}

h3 {
  margin-top: 3px;
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

h5 {
  margin-bottom: 8px;
  color: #bcd5ff;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-time {
  margin: 16px 0 3px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 650;
}

.relative {
  margin: 0;
  color: var(--muted);
}

.hero-meta {
  display: grid;
  justify-items: end;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

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

.metric {
  min-height: 138px;
  padding: 20px;
}

.metric-value {
  margin: 11px 0 8px;
  font-size: 1.3rem;
  font-weight: 720;
}

.metric-detail {
  font-size: 0.86rem;
}

.alerts {
  display: grid;
  gap: 10px;
}

.alert {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid;
  border-radius: 12px;
}

.alert h2 {
  font-size: 1rem;
}

.alert p {
  margin: 4px 0 0;
}

.alert-symbol {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.alert--warning {
  border-color: rgba(240, 188, 50, 0.68);
  background: rgba(240, 188, 50, 0.1);
}

.alert--warning .alert-symbol {
  background: var(--warning);
  color: #2b2203;
}

.alert--error {
  border-color: rgba(212, 62, 83, 0.72);
  background: rgba(212, 62, 83, 0.11);
}

.alert--error .alert-symbol {
  background: var(--error);
  color: white;
}

.section,
.report {
  padding: 24px;
}

.section-heading,
.report-heading {
  margin-bottom: 20px;
}

.standalone-heading {
  margin: 8px 0 -2px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid rgba(41, 75, 118, 0.75);
  text-align: left;
  vertical-align: top;
}

th {
  color: #9eb8da;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td span,
td time {
  display: block;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 720;
  white-space: nowrap;
}

.badge--success {
  border-color: rgba(34, 165, 90, 0.65);
  background: rgba(34, 165, 90, 0.12);
  color: #7ceca8;
}

.badge--warning {
  border-color: rgba(240, 188, 50, 0.65);
  background: rgba(240, 188, 50, 0.11);
  color: #ffd86d;
}

.badge--error {
  border-color: rgba(212, 62, 83, 0.72);
  background: rgba(212, 62, 83, 0.12);
  color: #ff98a6;
}

.badge--info {
  border-color: rgba(104, 165, 255, 0.6);
  background: rgba(39, 104, 215, 0.18);
  color: #a8caff;
}

.badge--muted {
  border-color: var(--disabled);
  background: rgba(99, 115, 138, 0.12);
  color: #b3bfce;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.report-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.report-counts span {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(7, 18, 37, 0.55);
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-card {
  padding: 18px;
  border: 1px solid rgba(41, 75, 118, 0.78);
  border-radius: 12px;
  background: rgba(7, 18, 37, 0.34);
}

.profile-stats,
.deployment-grid {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

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

.profile-stats div,
.deployment-grid div {
  padding: 11px 12px;
  border-radius: 9px;
  background: rgba(16, 38, 74, 0.64);
}

dt {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

details {
  border-top: 1px solid rgba(41, 75, 118, 0.6);
}

summary {
  min-height: 44px;
  padding: 12px 2px 0;
  color: #a9c9ff;
  cursor: pointer;
  font-weight: 650;
}

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

.details-grid > div {
  min-width: 0;
}

.compact-list,
.profile-warnings {
  margin: 0;
  padding-left: 20px;
}

.template-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.profile-warnings {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.text--warning {
  color: #f9d579;
}

.text--error {
  color: #ff98a6;
}

.text--muted {
  color: var(--muted);
}

.empty-state {
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
}

.empty-state--error {
  border-color: var(--error);
  color: #ffb1bc;
}

.deployment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

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

.footer-layout {
  min-height: 86px;
  font-size: 0.82rem;
}

@media (max-width: 959px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .header-layout,
  .hero,
  .section-heading,
  .report-heading,
  .profile-main,
  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-layout {
    padding-block: 16px;
  }

  .header-actions,
  .button {
    width: 100%;
  }

  .header-actions {
    justify-content: space-between;
  }

  .hero {
    min-height: 0;
    padding: 22px;
  }

  .hero-meta {
    justify-items: start;
    text-align: left;
  }

  .summary-grid,
  .profile-stats,
  .details-grid,
  .deployment-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .report {
    padding: 18px;
  }

  .report-counts {
    justify-content: flex-start;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(7, 18, 37, 0.3);
  }

  td {
    display: grid;
    grid-template-columns: minmax(110px, 40%) 1fr;
    gap: 10px;
    padding: 11px 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .footer-layout {
    padding-block: 20px;
    gap: 8px;
  }
}

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