:root {
  color-scheme: dark;
  --bg: #0e0f13;
  --text: #e6e8ec;
  --muted: #8a909c;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #e2b57a;
  --glow: rgba(196, 141, 76, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(60rem 32rem at 50% -8rem, var(--glow), transparent 70%), var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  padding: 4rem 1.5rem 2rem;
}

.intro {
  text-align: center;
}

.intro h1 {
  margin: 0;
}

.intro img {
  display: block;
  width: min(20rem, 72vw);
  height: auto;
  margin: 0 auto;
}

.intro p {
  margin: 1.75rem 0 0;
  font-size: 1.125rem;
  color: var(--muted);
}

.links {
  display: grid;
  grid-template-columns: repeat(4, 9.5rem);
  gap: 1.25rem;
}

.links a {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.links svg {
  width: 2.75rem;
  height: 2.75rem;
  stroke-width: 1.5;
  color: var(--muted);
  transition: color 0.2s ease;
}

.links a:hover,
.links a:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 14px 32px -14px color-mix(in srgb, var(--accent) 45%, transparent);
}

.links a:hover svg,
.links a:focus-visible svg {
  color: var(--accent);
}

.links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.links .status {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

.status[hidden] {
  display: none;
}

.status .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.6;
}

.status[data-state="up"] .dot {
  --dot: #3ecf6e;
}

.status[data-state="down"] .dot {
  --dot: #f05a5a;
}

.status[data-state="up"] .dot,
.status[data-state="down"] .dot {
  background: var(--dot);
  opacity: 1;
  box-shadow: 0 0 0.4rem 0.05rem var(--dot);
  animation: glow 2.4s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 0.2rem 0 color-mix(in srgb, var(--dot) 60%, transparent);
  }

  to {
    box-shadow: 0 0 0.55rem 0.1rem var(--dot);
  }
}

.intro a {
  display: block;
  border-radius: 0.5rem;
}

.intro a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.card {
  width: min(28rem, 100%);
  padding: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.login {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.625rem 1rem;
  margin-top: 1.75rem;
  padding: 1rem 1.125rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
}

.login + .login {
  margin-top: 0.75rem;
}

.login .role {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.login .label {
  font-size: 0.875rem;
  color: var(--muted);
}

.login code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.copy {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy svg {
  width: 1rem;
  height: 1rem;
}

.copy .done,
.copy.copied .idle {
  display: none;
}

.copy.copied .done {
  display: block;
  color: #3ecf6e;
}

.copy:hover,
.copy:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.notes {
  margin: 1.5rem 0 0;
  padding-left: 1.125rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.notes li + li {
  margin-top: 0.35rem;
}

.notes a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notes a:hover {
  color: var(--text);
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: #1b130a;
  text-decoration: none;
  background: var(--accent);
  border-radius: 0.875rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button svg {
  width: 1.15rem;
  height: 1.15rem;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -14px var(--accent);
}

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

footer {
  padding: 1.5rem;
  font-size: 0.8125rem;
  text-align: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 44rem) {
  .links {
    grid-template-columns: repeat(2, 9rem);
  }

  .card {
    padding: 1.5rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .links a,
  .links svg {
    transition: none;
  }

  .links a:hover,
  .links a:focus-visible {
    transform: none;
  }

  .status .dot {
    animation: none;
  }

  .button,
  .copy {
    transition: none;
  }

  .button:hover,
  .button:focus-visible {
    transform: none;
  }
}
