:root {
  --bg: #070b0d;
  --bg-deep: #030608;
  --panel: #0b1115;
  --panel-2: #0e161b;
  --line: #24323a;
  --line-soft: rgba(119, 145, 158, 0.16);
  --text: #dce6e9;
  --muted: #70838d;
  --green: #68d9a4;
  --cyan: #67c9e8;
  --amber: #d6ad62;
  --red: #e06c75;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --tech: Bahnschrift, "DIN Condensed", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(103, 201, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 201, 232, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% -20%, rgba(46, 104, 122, 0.18), transparent 44rem),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto;
  font-family: var(--tech);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

.intro-overlay {
  display: none;
}

html.intro-sequence,
html.intro-sequence body {
  overflow: hidden;
}

html.intro-sequence .intro-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f1f6f7;
  background: var(--bg-deep);
  animation: intro-overlay-exit 4.45s ease forwards;
}

.intro-overlay__image,
.intro-overlay__shade {
  position: absolute;
  inset: 0;
}

.intro-overlay__image {
  background:
    url("./assets/ocean-sharks-intro-v1.png") 64% center / cover no-repeat,
    #071015;
  opacity: 0;
  filter: saturate(0.58) contrast(1.12);
  transform: scale(1.08);
  animation: intro-ocean-image 4.35s ease both;
}

.intro-overlay__shade {
  background:
    radial-gradient(circle at 50% 48%, transparent 0, rgba(2, 6, 8, 0.16) 22rem, rgba(2, 5, 7, 0.78) 70%),
    linear-gradient(90deg, rgba(2, 5, 7, 0.7), rgba(2, 5, 7, 0.14) 62%, rgba(2, 5, 7, 0.54));
}

.intro-overlay__brand {
  position: absolute;
  top: 28px;
  left: 30px;
  color: rgba(220, 230, 233, 0.46);
  font: 600 0.62rem/1 var(--mono);
  letter-spacing: 0.18em;
}

.intro-overlay__line {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.13em;
  width: min(980px, calc(100vw - 40px));
  margin: 0;
  color: #f1f6f7;
  text-align: center;
  font-family: var(--tech);
  font-size: clamp(1.05rem, 3.15vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.075em;
  text-shadow: 0 0 36px rgba(140, 211, 229, 0.18);
  opacity: 0;
  filter: blur(22px);
  transform: translateY(14px) scale(0.985);
  animation: intro-ocean-text 4.2s cubic-bezier(0.18, 0.82, 0.2, 1) forwards;
}

.intro-overlay__line span {
  white-space: nowrap;
}

.intro-overlay__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(103, 201, 232, 0.14);
}

.intro-overlay__progress::after {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(103, 201, 232, 0.6);
  content: "";
  animation: intro-progress 4.05s linear forwards;
}

html.intro-sequence .console-shell {
  opacity: 0;
  filter: blur(18px);
  transform: translateY(10px) scale(0.992);
  animation: console-reveal 1.15s cubic-bezier(0.18, 0.82, 0.2, 1) 3.48s forwards;
}

@keyframes intro-overlay-exit {
  0%,
  77% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@keyframes intro-ocean-image {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  18%,
  74% {
    opacity: 0.84;
    transform: scale(1.035);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes intro-ocean-text {
  0% {
    opacity: 0;
    filter: blur(24px);
    transform: translateY(16px) scale(0.974);
  }
  24%,
  71% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(16px);
    transform: translateY(-10px) scale(1.015);
  }
}

@keyframes intro-progress {
  to {
    width: 100%;
  }
}

@keyframes console-reveal {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

.console-shell {
  width: min(1480px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 0 22px;
}

.console-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 15, 0.93);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.24);
}

.console-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.console-brand strong {
  color: #eef5f6;
  font-size: 1.18rem;
  letter-spacing: 0.03em;
}

.console-brand span,
.console-brand small,
.console-header__state,
.console-header__tools,
.command-bar span,
.panel-header span,
.status-chip,
.panel-footer,
.route-ledger dt,
.clock-meta,
.console-footer {
  font-family: var(--mono);
}

.console-brand span {
  color: var(--cyan);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}

.console-brand small {
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
}

.console-header__state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.console-header__state small {
  color: var(--muted);
}

.console-header__tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.console-header__tools button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.console-header__tools button:hover {
  color: var(--text);
  border-color: var(--cyan);
}

.state-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 12px rgba(112, 131, 141, 0.36);
}

.state-dot--clear {
  background: var(--green);
  box-shadow: 0 0 12px rgba(104, 217, 164, 0.52);
}

.state-dot--watch {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(214, 173, 98, 0.44);
}

.state-dot--risk {
  background: var(--red);
  box-shadow: 0 0 12px rgba(224, 108, 117, 0.46);
}

.command-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.command-bar article {
  position: relative;
  min-height: 82px;
  padding: 15px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 21, 0.9);
}

.command-bar span {
  display: block;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.11em;
}

.command-bar strong {
  display: block;
  margin-top: 16px;
  color: #eff6f7;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
}

.command-bar .state-dot {
  position: absolute;
  top: 16px;
  right: 16px;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(103, 201, 232, 0.025), transparent 34%),
    rgba(11, 17, 21, 0.94);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.panel--readiness {
  grid-column: span 8;
}

.panel--route {
  grid-column: span 4;
}

.panel--gates {
  grid-column: span 8;
}

.panel--clock {
  grid-column: span 4;
}

.panel--chain {
  grid-column: 1 / -1;
}

.panel--currencies {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 22, 27, 0.75);
}

.panel-header > div {
  display: grid;
  gap: 6px;
}

.panel-header span {
  color: var(--muted);
  font-size: 0.53rem;
  letter-spacing: 0.12em;
}

.panel-header strong {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.status-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #091014;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
}

.status-chip--clear {
  color: var(--green);
  border-color: rgba(104, 217, 164, 0.32);
}

.status-chip--watch {
  color: var(--amber);
  border-color: rgba(214, 173, 98, 0.32);
}

.status-chip--risk {
  color: var(--red);
  border-color: rgba(224, 108, 117, 0.32);
}

.readiness-console {
  display: grid;
  grid-template-columns: 0.85fr 2.15fr;
  min-height: 245px;
}

.readiness-console__score {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.readiness-console__score > span,
.readiness-console__score small,
.readiness-console__matrix small {
  color: var(--muted);
  font: 600 0.55rem/1 var(--mono);
  letter-spacing: 0.11em;
}

.readiness-console__score > strong {
  color: #eef5f6;
  font: 600 clamp(4rem, 8vw, 7.4rem)/0.8 var(--tech);
  letter-spacing: -0.06em;
}

.meter {
  height: 5px;
  overflow: hidden;
  background: #19242a;
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 15px rgba(103, 201, 232, 0.32);
  transition: width 500ms ease;
}

.readiness-console__matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.readiness-console__matrix > span {
  display: flex;
  min-height: 122px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.readiness-console__matrix > span:nth-child(3n) {
  border-right: 0;
}

.readiness-console__matrix > span:nth-child(n + 4) {
  border-bottom: 0;
}

.readiness-console__matrix strong {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
}

.panel-footer span:last-child {
  color: var(--amber);
}

.route-ledger {
  margin: 0;
}

.route-ledger div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 51px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.route-ledger div:last-child {
  border-bottom: 0;
}

.route-ledger dt {
  color: var(--muted);
  font-size: 0.54rem;
  letter-spacing: 0.09em;
}

.route-ledger dd {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: right;
}

.route-ledger div:last-child dd {
  color: var(--amber);
}

.gate-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.gate {
  position: relative;
  min-height: 112px;
  padding: 17px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gate:nth-child(5n) {
  border-right: 0;
}

.gate:nth-child(n + 6) {
  border-bottom: 0;
}

.gate::before {
  position: absolute;
  top: 17px;
  right: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(104, 217, 164, 0.5);
  content: "";
}

.gate--waiting::before {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(214, 173, 98, 0.46);
}

.gate > span,
.gate > small {
  display: block;
  color: var(--muted);
  font: 500 0.52rem/1.35 var(--mono);
  letter-spacing: 0.06em;
}

.gate > strong {
  display: block;
  margin: 27px 0 8px;
  font-size: 0.76rem;
  line-height: 1.15;
  letter-spacing: 0.03em;
}

.guard-clock {
  display: flex;
  min-height: 218px;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.guard-clock > strong {
  color: #edf5f6;
  font: 500 clamp(3.2rem, 7vw, 6rem)/0.9 var(--mono);
  letter-spacing: -0.08em;
}

.guard-clock > span {
  margin: 15px 0 27px;
  color: var(--muted);
  font: 500 0.55rem/1 var(--mono);
  letter-spacing: 0.12em;
}

.meter--thin {
  height: 3px;
}

.clock-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 65px;
  border-top: 1px solid var(--line);
}

.clock-meta span {
  display: grid;
  place-content: center;
  gap: 7px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.49rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.clock-meta span:last-child {
  border-right: 0;
}

.clock-meta strong {
  color: var(--text);
}

.dependency-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.dependency-node {
  position: relative;
  min-height: 126px;
  padding: 17px 16px;
  border-right: 1px solid var(--line);
}

.dependency-node:last-child {
  border-right: 0;
}

.dependency-node::after {
  position: absolute;
  z-index: 1;
  top: 61px;
  right: -5px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  content: "";
}

.dependency-node:last-child::after {
  display: none;
}

.dependency-node > span,
.dependency-node > small {
  display: block;
  color: var(--muted);
  font: 500 0.51rem/1.35 var(--mono);
  letter-spacing: 0.06em;
}

.dependency-node > strong {
  display: block;
  margin: 24px 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.dependency-node--clear > strong {
  color: var(--green);
}

.dependency-node--watch > strong {
  color: var(--amber);
}

.dependency-node--risk > strong {
  color: var(--red);
}

.currency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.currency-node {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  min-height: 76px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.currency-node:nth-child(4n) {
  border-right: 0;
}

.currency-node:nth-child(n + 5) {
  border-bottom: 0;
}

.currency-node strong {
  color: var(--cyan);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.currency-node span {
  color: var(--text);
  font-size: 0.76rem;
  letter-spacing: 0.025em;
}

.currency-node small {
  color: var(--muted);
  font: 500 0.5rem/1 var(--mono);
  letter-spacing: 0.07em;
}

.currency-node::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      var(--green) 0,
      var(--green) var(--currency-attention),
      transparent var(--currency-attention)
    );
  opacity: 0.58;
  content: "";
}

.console-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(7, 12, 15, 0.88);
  font-size: 0.49rem;
  letter-spacing: 0.06em;
}

.console-footer span:last-child {
  justify-self: end;
  color: var(--amber);
}

@media (max-width: 1050px) {
  .console-header {
    grid-template-columns: 1fr auto;
  }

  .console-header__state {
    display: none;
  }

  .panel--readiness,
  .panel--route,
  .panel--gates,
  .panel--clock {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .console-shell {
    width: min(100% - 16px, 1480px);
    padding-top: 8px;
  }

  .console-header {
    min-height: 54px;
    padding: 0 11px;
  }

  .console-brand small,
  .console-header__tools > span:first-child {
    display: none;
  }

  .console-header__tools {
    gap: 8px;
  }

  .command-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .command-bar article:last-child {
    grid-column: 1 / -1;
  }

  .readiness-console {
    grid-template-columns: 1fr;
  }

  .readiness-console__score {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .readiness-console__matrix {
    grid-template-columns: repeat(2, 1fr);
  }

  .readiness-console__matrix > span,
  .readiness-console__matrix > span:nth-child(3n),
  .readiness-console__matrix > span:nth-child(n + 4) {
    min-height: 102px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .readiness-console__matrix > span:nth-child(even) {
    border-right: 0;
  }

  .readiness-console__matrix > span:nth-child(n + 5) {
    border-bottom: 0;
  }

  .panel-footer {
    display: grid;
    gap: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .gate-matrix {
    grid-template-columns: repeat(2, 1fr);
  }

  .gate,
  .gate:nth-child(5n),
  .gate:nth-child(n + 6) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .gate:nth-child(even) {
    border-right: 0;
  }

  .gate:nth-child(n + 9) {
    border-bottom: 0;
  }

  .dependency-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .dependency-node {
    border-bottom: 1px solid var(--line);
  }

  .dependency-node:nth-child(even) {
    border-right: 0;
  }

  .dependency-node:nth-child(n + 5) {
    border-bottom: 0;
  }

  .dependency-node::after {
    display: none;
  }

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

  .currency-node,
  .currency-node:nth-child(4n),
  .currency-node:nth-child(n + 5) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .currency-node:last-child {
    border-bottom: 0;
  }

  .console-footer {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .console-footer span:last-child {
    justify-self: start;
  }

  .intro-overlay__line {
    gap: 0.24em;
    font-size: clamp(0.9rem, 4.5vw, 1.25rem);
    letter-spacing: 0.055em;
  }

  .intro-overlay__brand {
    top: 20px;
    left: 20px;
  }
}

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