:root {
  --void: #0a0a0a;
  --canvas: #0d0f0b;
  --surface: #13160f;
  --surface-raised: #1b1f17;
  --surface-inset: #090b09;
  --ink: #efeee8;
  --body: #c3c5ba;
  --muted: #8d9284;
  --quiet: #60675a;
  --line: rgba(225, 235, 211, 0.14);
  --line-soft: rgba(225, 235, 211, 0.08);
  --lime: #caf300;
  --lime-soft: #a7c800;
  --lime-wash: rgba(202, 243, 0, 0.1);
  --display: "Oswald", Impact, sans-serif;
  --body-font: "Hanken Grotesk", Arial, sans-serif;
  --mono: "Space Mono", "Courier New", monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--void);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 680px 540px at 84% 7%, rgba(202, 243, 0, 0.045), transparent 68%),
    radial-gradient(ellipse 550px 480px at 4% 96%, rgba(202, 243, 0, 0.025), transparent 68%),
    linear-gradient(135deg, #0a0a0a 0%, #0d100c 56%, #090a09 100%);
  color: var(--ink);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 90%);
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

a,
button {
  font: inherit;
}

a {
  color: inherit;
}

button {
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.maintenance-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 32px 0 24px;
  display: flex;
  flex-direction: column;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  min-height: 48px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name,
.brand-subtitle,
.eyebrow,
.system-code,
.signal-kicker,
.signal-footer,
.notice-index,
.footer {
  font-family: var(--mono);
  text-transform: uppercase;
}

.brand-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-subtitle {
  color: var(--lime);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.system-code {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.system-code b {
  color: var(--lime);
  font-weight: 700;
}

.maintenance-card {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(270px, 0.38fr) minmax(0, 0.62fr);
  min-height: 580px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(19, 22, 15, 0.88);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.32), 0 20px 60px rgba(0, 0, 0, 0.25);
}

.signal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  overflow: hidden;
  padding: clamp(28px, 4vw, 54px) clamp(24px, 4vw, 48px) 30px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(202, 243, 0, 0.075), transparent 38%),
    var(--canvas);
}

.signal-panel::before {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 18px;
  width: 2px;
  content: "";
  background: linear-gradient(to bottom, var(--lime), rgba(202, 243, 0, 0.04));
}

.signal-panel::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 46px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.signal-topline,
.signal-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.signal-topline {
  justify-content: space-between;
  padding-left: 12px;
}

.eyebrow {
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.signal-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 6px var(--lime-wash), 0 0 20px rgba(202, 243, 0, 0.35);
  animation: pulse 2.2s ease-in-out infinite;
}

.signal-core {
  position: relative;
  display: grid;
  width: clamp(150px, 15vw, 188px);
  aspect-ratio: 1;
  margin: auto;
  place-items: center;
}

.signal-orbit {
  position: absolute;
  border: 1px solid rgba(202, 243, 0, 0.3);
  border-radius: 50%;
}

.signal-orbit--outer {
  inset: 0;
  border-style: dashed;
  animation: rotate 18s linear infinite;
}

.signal-orbit--inner {
  inset: 17%;
  border-color: rgba(202, 243, 0, 0.72);
  box-shadow: inset 0 0 34px rgba(202, 243, 0, 0.08), 0 0 30px rgba(202, 243, 0, 0.08);
}

.signal-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  color: var(--lime);
}

.signal-message {
  position: relative;
  z-index: 1;
  padding-left: 12px;
}

.signal-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.signal-message strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.signal-message p {
  max-width: 24ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.signal-footer {
  gap: 10px;
  padding-left: 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.signal-footer > span:first-child {
  color: var(--lime);
}

.signal-rule {
  width: 34px;
  height: 1px;
  background: var(--line-strong);
}

.content-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 6vw, 78px);
}

.content-eyebrow span {
  color: var(--muted);
}

h1 {
  max-width: 8ch;
  margin: 24px 0 24px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(4.2rem, 8vw, 7.3rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.88;
  text-wrap: balance;
}

h1 span {
  color: var(--lime);
}

.lede {
  max-width: 49ch;
  margin: 0;
  color: var(--body);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(30px, 4vw, 46px);
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  min-height: 124px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-soft);
  background: var(--surface-inset);
}

.notice-index {
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.notice h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.notice p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button--primary {
  cursor: pointer;
  background: var(--lime);
  color: #11130c;
}

.button--primary:hover {
  background: #d7ff22;
  transform: translateY(-1px);
}

.button--primary:active {
  transform: scale(0.97);
}

.button--primary:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button--secondary {
  border: 1px solid var(--line);
  color: var(--body);
}

.button--secondary:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.retry-status {
  margin: 14px 0 0;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer {
  gap: 20px;
  padding: 24px 2px 0;
  color: var(--quiet);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.footer b {
  color: var(--lime-soft);
  font-weight: 700;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 860px) {
  .maintenance-shell {
    width: min(680px, calc(100% - 32px));
    padding-top: 22px;
  }

  .maintenance-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .signal-panel {
    min-height: 310px;
    padding: 26px 30px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-panel::before {
    top: 18px;
    right: 18px;
    bottom: auto;
    left: 18px;
    width: auto;
    height: 2px;
    background: linear-gradient(to right, var(--lime), rgba(202, 243, 0, 0.04));
  }

  .signal-topline,
  .signal-message,
  .signal-footer {
    padding-left: 0;
  }

  .signal-core {
    width: 130px;
    margin: 24px auto 20px;
  }

  .signal-message {
    text-align: center;
  }

  .signal-message p {
    max-width: 38ch;
    margin-right: auto;
    margin-left: auto;
  }

  .signal-footer {
    justify-content: center;
  }

  .content-panel {
    padding: 38px 30px 34px;
  }

  h1 {
    font-size: clamp(4rem, 15vw, 6.2rem);
  }
}

@media (max-width: 520px) {
  .maintenance-shell {
    width: calc(100% - 24px);
    padding: 14px 0 18px;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .brand-name {
    font-size: 12px;
  }

  .brand-subtitle,
  .system-code {
    font-size: 8px;
  }

  .maintenance-card {
    border-radius: 15px;
  }

  .signal-panel {
    min-height: 294px;
    padding: 25px 22px 22px;
  }

  .signal-panel::before {
    right: 14px;
    left: 14px;
  }

  .signal-message strong {
    font-size: 2.7rem;
  }

  .content-panel {
    padding: 32px 22px 27px;
  }

  .eyebrow {
    font-size: 9px;
  }

  h1 {
    margin-top: 18px;
    margin-bottom: 20px;
    font-size: clamp(3.7rem, 18vw, 5.2rem);
  }

  .lede {
    font-size: 0.98rem;
  }

  .notice-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .notice {
    min-height: 0;
    padding: 16px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 28px;
  }

  .button {
    width: 100%;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding-top: 16px;
    font-size: 8px;
    line-height: 1.5;
  }
}

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