:root {
  color-scheme: dark;
  --bg: #07080a;
  --ink: #f4f0e7;
  --soft: #d6d2c8;
  --muted: #979b9e;
  --faint: #5f676d;
  --line: rgba(244, 240, 231, 0.12);
  --line-strong: rgba(244, 240, 231, 0.23);
  --panel: rgba(15, 17, 20, 0.72);
  --panel-strong: rgba(22, 25, 29, 0.92);
  --acid: #ff7a1a;
  --acid-soft: #ffb36d;
  --cyan: #f3d4b4;
  --shadow: rgba(0, 0, 0, 0.38);
  --display: "Space Grotesk", "Pretendard Variable", Pretendard, "Segoe UI", sans-serif;
  --sans: "Pretendard Variable", Pretendard, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(244, 240, 231, 0.032) 1px, transparent 1px),
    linear-gradient(rgba(244, 240, 231, 0.032) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 122, 26, 0.16), transparent 520px),
    linear-gradient(215deg, rgba(243, 212, 180, 0.07), transparent 560px),
    #07080a;
  background-size: 88px 88px, 88px 88px, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(244, 240, 231, 0.075);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 122, 26, 0.07) 49%,
    transparent 56%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: fieldSweep 9s ease-in-out infinite;
}

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

.shell {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 34px;
  width: min(1220px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0;
}

.system-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 18px 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard {
  align-self: center;
  display: grid;
  gap: 18px;
}

.hero-panel,
.index-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(244, 240, 231, 0.045), transparent 42%),
    var(--panel);
  box-shadow: 0 28px 90px var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.hero-panel::before,
.index-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  pointer-events: none;
  border: 1px solid rgba(244, 240, 231, 0.055);
}

.hero-panel::after,
.index-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(244, 240, 231, 0.055), transparent),
    linear-gradient(180deg, rgba(255, 122, 26, 0.09), transparent 22%);
  opacity: 0.35;
  transform: translateX(-100%);
  animation: panelScan 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hero-meta {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: end;
  padding: 42px 44px 46px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: 146px;
  font-weight: 700;
  line-height: 0.82;
  animation: titleSettle 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  text-shadow: 0 12px 46px rgba(255, 122, 26, 0.16);
}

.summary {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 32px;
  font-weight: 640;
  line-height: 1.36;
  word-break: keep-all;
  animation: fadeLift 760ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.signal-card {
  position: relative;
  min-height: 188px;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 122, 26, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 26, 0.13) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 122, 26, 0.28), transparent 58%),
    rgba(7, 8, 10, 0.58);
  background-size: 18px 18px;
  overflow: hidden;
  animation: fadeLift 820ms 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.signal-card::before {
  content: "09";
  position: absolute;
  right: -10px;
  bottom: -24px;
  color: rgba(255, 122, 26, 0.24);
  font-family: var(--display);
  font-size: 138px;
  font-weight: 700;
  line-height: 0.8;
}

.signal-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18%;
  width: 1px;
  background: rgba(255, 122, 26, 0.28);
  box-shadow: 68px 0 rgba(255, 122, 26, 0.12), 134px 0 rgba(255, 122, 26, 0.08);
  animation: signalDrift 4.8s ease-in-out infinite alternate;
}

.signal-label,
.status-strip span,
.panel-title span,
.route-id,
.route-domain,
.footer {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.signal-label {
  display: block;
  margin-bottom: 16px;
  color: var(--faint);
}

.signal-card strong {
  display: block;
  margin-bottom: 34px;
  color: var(--acid-soft);
  font-family: var(--display);
  font-size: 32px;
  line-height: 1;
}

.signal-lines {
  display: grid;
  gap: 8px;
}

.signal-lines span {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--acid), transparent);
  transform-origin: left;
  animation: signalPulse 2.6s ease-in-out infinite;
}

.signal-lines span:nth-child(2) {
  width: 74%;
  animation-delay: 140ms;
}

.signal-lines span:nth-child(3) {
  width: 46%;
  animation-delay: 280ms;
}

.signal-lines span:nth-child(4) {
  width: 62%;
  animation-delay: 420ms;
}

.status-strip {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.status-strip div {
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 17, 20, 0.52);
  animation: fadeLift 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-strip div:nth-child(2) {
  animation-delay: 80ms;
}

.status-strip div:nth-child(3) {
  animation-delay: 160ms;
}

.status-strip div:nth-child(4) {
  animation-delay: 240ms;
}

.status-strip span {
  display: block;
  margin-bottom: 9px;
  color: var(--faint);
}

.status-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.panel-title {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: end;
  min-height: 86px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title span {
  margin-bottom: 18px;
  color: var(--acid);
}

h2 {
  margin-bottom: 14px;
  font-family: var(--display);
  font-size: 46px;
  font-weight: 650;
  line-height: 1;
}

h2 em {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto 1fr auto auto;
  min-height: 226px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: rgba(7, 8, 10, 0.32);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  animation: routeReveal 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow: hidden;
}

.route:nth-child(3n) {
  border-right: 0;
}

.route:nth-child(2) {
  animation-delay: 60ms;
}

.route:nth-child(3) {
  animation-delay: 120ms;
}

.route:nth-child(4) {
  animation-delay: 180ms;
}

.route:nth-child(5) {
  animation-delay: 240ms;
}

.route:nth-child(6) {
  animation-delay: 300ms;
}

.route:nth-child(7) {
  animation-delay: 360ms;
}

.route:nth-child(8) {
  animation-delay: 420ms;
}

.route:nth-child(9) {
  animation-delay: 480ms;
}

.route::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--acid), transparent 62%);
  opacity: 0;
  transform: translateX(-35%);
  transition: opacity 160ms ease, transform 220ms ease;
}

.route::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 24px;
  height: 24px;
  border-right: 1px solid rgba(244, 240, 231, 0.18);
  border-bottom: 1px solid rgba(244, 240, 231, 0.18);
  opacity: 0.55;
}

.route:hover,
.route:focus-visible {
  z-index: 1;
  color: var(--ink);
  background: rgba(244, 240, 231, 0.055);
  transform: translateY(-3px);
  outline: 0;
}

.route:hover::before,
.route:focus-visible::before {
  opacity: 1;
  transform: translateX(0);
}

.route-primary {
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.18), transparent 56%),
    rgba(15, 17, 20, 0.64);
}

.route-primary::before {
  opacity: 1;
  transform: translateX(0);
}

.route-id {
  grid-column: 1;
  color: var(--acid);
}

.route-state {
  grid-column: 2;
  justify-self: end;
  padding: 4px 7px;
  border: 1px solid rgba(244, 240, 231, 0.12);
  color: var(--faint);
  background: rgba(7, 8, 10, 0.36);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.route-primary .route-state {
  border-color: rgba(255, 122, 26, 0.42);
  color: var(--acid-soft);
}

.route-name {
  grid-column: 1 / -1;
  margin-top: 38px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 650;
}

.route-desc {
  grid-column: 1 / -1;
  margin-top: 12px;
  line-height: 1.58;
  word-break: keep-all;
}

.route-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.route-tags span {
  padding: 5px 7px;
  border: 1px solid rgba(244, 240, 231, 0.115);
  color: var(--faint);
  background: rgba(244, 240, 231, 0.025);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.route:hover .route-tags span,
.route:focus-visible .route-tags span {
  border-color: rgba(255, 122, 26, 0.36);
  color: var(--soft);
  background: rgba(255, 122, 26, 0.045);
}

.route-domain {
  grid-column: 1 / -1;
  margin-top: 28px;
  overflow: hidden;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
  color: var(--faint);
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--ink);
  outline: 0;
}

@keyframes fieldSweep {
  0%,
  62% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes panelScan {
  0%,
  58% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes titleSettle {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

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

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes routeReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

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

@keyframes signalPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleX(0.62);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes signalDrift {
  from {
    transform: translateX(-8px);
    opacity: 0.45;
  }

  to {
    transform: translateX(18px);
    opacity: 0.85;
  }
}

@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;
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1220px);
    padding-top: 24px;
  }

  .system-rail {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 12px 0;
    border-right: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

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

  .signal-card {
    min-height: 148px;
  }

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

  .route:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .route:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  body::before {
    inset: 10px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-grid {
    padding: 30px 22px 28px;
  }

  h1 {
    font-size: 68px;
  }

  .summary {
    font-size: 22px;
  }

  .status-strip,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .status-strip div,
  .route,
  .route:nth-child(2n),
  .route:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .panel-title {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px;
  }

  .panel-title span,
  h2 {
    margin-bottom: 0;
  }

  h2 {
    font-size: 36px;
  }

  .footer {
    flex-direction: column;
  }
}
