html,
body {
  height: 100%;
  overflow: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  --page-background:
    linear-gradient(180deg, #fffefc 0%, #f6f2ec 100%);
  --state-background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 242, 234, 0.96));
  --card-background: rgba(255, 255, 255, 0.98);
  --card-border: rgba(15, 23, 42, 0.08);
  --card-shadow: 0 20px 56px rgba(50, 43, 35, 0.08);
  --text-strong: #1f2937;
  --text-muted: #5b6472;
  --text-soft: #7b8391;
  --accent: #20344f;
  --link: #20344f;
  margin: 0;
  background: var(--page-background);
  color: var(--text-strong);
  font-family: "DM Sans", Roboto, Arial, sans-serif;
}

iframe {
  position: fixed;
  inset: 0;
  z-index: 0;
  border: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  background: white;
}

iframe[hidden] {
  display: none;
}

.state {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--state-background);
}

.state[hidden] {
  display: none;
}

.card {
  width: min(640px, 100%);
  border-radius: 20px;
  background: var(--card-background);
  padding: 28px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 28px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--link), transparent);
}

.card__brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.card__brand-link {
  display: inline-flex;
  align-items: center;
}

.card__brand-logo {
  display: block;
  max-width: 160px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.card__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card__main {
  min-width: 0;
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.status-copy {
  min-width: 0;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  color: var(--text-strong);
}

p {
  margin: 16px 0 0;
  line-height: 1.6;
  color: var(--text-muted);
}

.card__footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
  color: var(--text-soft);
  font-size: 14px;
  text-align: center;
}

.card__footer-copy {
  margin-right: 6px;
}

.card__footer-link {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.card__footer-link:hover {
  text-decoration: underline;
}

.state--memory_killed .status-copy h1,
.state--failed .status-copy h1 {
  color: var(--accent);
}

@media (max-width: 640px) {
  .state {
    padding: 16px;
  }

  .card__brand {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: 28px;
  }
}
