:root {
  color-scheme: light;
  --paper: #fbfaf8;
  --paper-strong: #ffffff;
  --ink: #182125;
  --muted: #5c686c;
  --line: #dfe5e7;
  --blue: #284b63;
  --blue-soft: #e8f0f4;
  --teal: #72a69b;
  --amber: #d59f4a;
  --coral: #cc6b5a;
  --shadow: 0 24px 80px rgba(24, 33, 37, 0.13);
  --radius: 8px;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(rgba(40, 75, 99, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 75, 99, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 38px 38px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
}

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

code {
  border: 1px solid rgba(40, 75, 99, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.08rem 0.28rem;
  color: var(--blue);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

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

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-links a,
.secondary-action,
.primary-action,
.filter-tab {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.top-links a {
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.top-links a:hover,
.secondary-action:hover,
.filter-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(40, 75, 99, 0.34);
  background: var(--paper-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  padding: 74px 0 34px;
}

.hero-copy,
.signal-panel,
.control-strip,
.link-section,
.loading-card,
.empty-state {
  border: 1px solid rgba(223, 229, 231, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(114, 166, 155, 0.22), transparent 38%),
    linear-gradient(290deg, rgba(213, 159, 74, 0.14), transparent 46%);
  pointer-events: none;
}

.hero-copy > * {
  position: relative;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-text {
  max-width: 700px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.85;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-action {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: #203f54;
}

.secondary-action {
  color: var(--blue);
}

.signal-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 430px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(24, 33, 37, 0.96), rgba(40, 75, 99, 0.9)),
    var(--ink);
  color: white;
  overflow: hidden;
}

.signal-header,
.signal-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.signal-header span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.signal-header strong {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: #c9eee7;
  font-size: 0.85rem;
}

.network-map {
  position: relative;
  min-height: 250px;
}

.node,
.line {
  position: absolute;
  display: block;
}

.node {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 32px rgba(114, 166, 155, 0.9);
  animation: pulse 2.6s ease-in-out infinite;
}

.node-a { top: 25%; left: 16%; }
.node-b { top: 52%; left: 37%; animation-delay: 0.4s; }
.node-c { top: 18%; right: 18%; animation-delay: 0.8s; }
.node-d { bottom: 18%; right: 30%; animation-delay: 1.2s; }
.node-e { bottom: 26%; left: 18%; animation-delay: 1.6s; }

.line {
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(114, 166, 155, 0.06), rgba(114, 166, 155, 0.82), rgba(213, 159, 74, 0.24));
}

.line-1 { top: 33%; left: 19%; width: 49%; transform: rotate(-9deg); }
.line-2 { top: 57%; left: 39%; width: 33%; transform: rotate(25deg); }
.line-3 { bottom: 32%; left: 21%; width: 48%; transform: rotate(-12deg); }
.line-4 { top: 34%; right: 20%; width: 36%; transform: rotate(80deg); }

.signal-grid {
  align-items: stretch;
}

.signal-grid span {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.signal-grid b {
  display: block;
  margin-bottom: 4px;
  color: white;
  font-size: 1.2rem;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(240px, 390px) 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin: 8px 0 18px;
  box-shadow: 0 14px 50px rgba(24, 33, 37, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-strong);
  padding: 0 12px;
}

.search-box span {
  color: var(--blue);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.filter-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  cursor: pointer;
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
}

.filter-tab.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.section-stack {
  display: grid;
  gap: 18px;
}

.link-section {
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 14px 50px rgba(24, 33, 37, 0.08);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.link-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(245, 249, 248, 0.82));
  padding: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(40, 75, 99, 0.4);
  box-shadow: 0 20px 50px rgba(40, 75, 99, 0.14);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}

.card-copy strong,
.card-copy small {
  display: block;
}

.card-copy strong {
  color: var(--ink);
  font-size: 1.03rem;
}

.card-copy small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag-row em {
  border-radius: 999px;
  background: rgba(114, 166, 155, 0.14);
  padding: 3px 7px;
  color: var(--blue);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}

.loading-card,
.empty-state {
  padding: 24px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--blue);
  font-weight: 800;
}

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

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 24px, 720px);
  }

  .topbar,
  .hero-actions,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .signal-panel {
    min-height: 360px;
  }

  .control-strip,
  .section-heading,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .top-links {
    width: 100%;
  }

  .top-links a,
  .primary-action,
  .secondary-action {
    width: 100%;
    justify-content: center;
  }

  .hero-copy,
  .signal-panel {
    padding: 20px;
  }

  h1 {
    font-size: 2.35rem;
  }
}
