:root {
  --bg: #0b1b2b;
  --bg-soft: #102a43;
  --panel: #12263a;
  --panel-strong: #17344f;
  --line: rgba(130, 185, 255, 0.18);
  --text: #e8f0ff;
  --muted: rgba(232, 240, 255, 0.68);
  --accent: #76c7ff;
  --accent-strong: #39a9ff;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(118, 199, 255, 0.14), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(57, 169, 255, 0.12), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #071421 100%);
  color: var(--text);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 20px 24px;
}

.tool-header__copy {
  min-width: 0;
}

.system-seal {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(150px, 28vw);
  margin: 0;
  padding: 10px;
  background: rgba(18, 38, 58, 0.58);
  border: 1px solid rgba(130, 185, 255, 0.18);
  border-radius: 14px;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(118, 199, 255, 0.08);
}

.system-seal img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.system-seal figcaption {
  color: rgba(232, 240, 255, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.sub {
  margin: 12px 0 0;
  color: var(--muted);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 36px;
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 150px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(23, 52, 79, 0.76), rgba(18, 38, 58, 0.94)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(118, 199, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(118, 199, 255, 0.46);
  background:
    linear-gradient(180deg, rgba(26, 66, 101, 0.86), rgba(18, 38, 58, 0.98)),
    var(--panel-strong);
  outline: none;
}

.tool-card:hover::after,
.tool-card:focus-visible::after {
  opacity: 1;
}

.tool-card--active {
  border-color: rgba(118, 199, 255, 0.36);
}

.tool-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(118, 199, 255, 0.1);
  font-size: 1.55rem;
}

.tool-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.tool-card__body strong {
  font-size: 1.1rem;
  line-height: 1.2;
}

.tool-card__body span {
  color: var(--muted);
  line-height: 1.5;
}

.tool-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tool-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(130, 185, 255, 0.18);
  border-radius: 999px;
  background: rgba(118, 199, 255, 0.08);
  color: rgba(232, 240, 255, 0.74);
  font-size: 0.72rem;
  line-height: 1.2;
}

.tool-card__status {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: rgba(232, 240, 255, 0.55);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-card--active .tool-card__status {
  color: var(--accent);
}

.system-map {
  grid-column: 1 / -1;
  min-height: 220px;
  padding: 18px 22px 28px;
  background:
    radial-gradient(circle at 73% 48%, rgba(57, 169, 255, 0.12), transparent 26%),
    radial-gradient(circle at 18% 12%, rgba(118, 199, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(23, 52, 79, 0.66), rgba(18, 38, 58, 0.9)),
    var(--panel);
  border: 1px solid rgba(57, 169, 255, 0.42);
  border-radius: 14px;
  box-shadow:
    var(--shadow),
    0 0 30px rgba(57, 169, 255, 0.08) inset;
}

.system-map__head {
  margin-bottom: 16px;
}

.system-map__head h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-map__head h2::before {
  content: "⌘";
  color: var(--accent-strong);
  font-size: 0.95rem;
  line-height: 1;
}

.system-map__head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.system-map__flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  margin: 0;
  padding: 12px 20px 0;
  list-style: none;
}

.system-map__flow::before {
  content: "";
  position: absolute;
  top: 51px;
  left: 9%;
  right: 9%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57, 169, 255, 0.9), transparent);
  box-shadow:
    0 0 14px rgba(57, 169, 255, 0.42),
    0 0 28px rgba(57, 169, 255, 0.18);
}

.system-map__node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.system-map__node::before {
  content: "";
  position: absolute;
  top: 35px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38d5ff;
  box-shadow: 0 0 14px rgba(56, 213, 255, 0.72);
}

.system-map__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  color: #dff1ff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(31, 76, 111, 0.96), rgba(18, 48, 74, 0.96));
  border: 1px solid rgba(57, 169, 255, 0.5);
  border-radius: 50%;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 0 22px rgba(57, 169, 255, 0.16),
    0 0 0 10px rgba(57, 169, 255, 0.04);
  font-size: 1.45rem;
  font-weight: 700;
}

.system-map__node--active .system-map__icon {
  width: 82px;
  height: 82px;
  margin-top: -7px;
  color: #ffffff;
  border-color: rgba(57, 169, 255, 0.82);
  box-shadow:
    0 0 0 1px rgba(57, 169, 255, 0.52),
    0 0 0 22px rgba(57, 169, 255, 0.07),
    0 0 34px rgba(57, 169, 255, 0.62);
  font-size: 2rem;
}

.system-map__node strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.2;
}

.system-map__node span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.system-map__node--active strong {
  color: var(--accent);
}

.tool-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: rgba(232, 240, 255, 0.45);
  text-align: left;
}

.footer-copy {
  color: rgba(232, 240, 255, 0.45);
}

@media (max-width: 860px) {
  .dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tool-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 30px;
  }

  .system-seal {
    width: min(132px, 46vw);
  }

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

  .tool-card {
    min-height: 132px;
  }

  .system-map {
    grid-column: auto;
    padding: 16px;
  }

  .system-map__flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    padding-inline: 0;
  }

  .system-map__flow::before,
  .system-map__node::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .tool-card::after {
    transition: none;
  }

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