:root {
  color-scheme: light;
  --bg: #071421;
  --bg-deep: #030914;
  --bg-panel: #0b1c30;
  --panel: #0d2238;
  --panel-soft: #102a46;
  --text: #eef7ff;
  --muted: #b8c6d8;
  --line: rgba(112, 168, 224, 0.24);
  --accent: #109cff;
  --accent-strong: #0074f0;
  --cyan: #00c2ff;
  --teal: #12d6a0;
  --amber: #d9902f;
  --danger: #c24136;
  --shadow: 0 22px 54px rgba(0, 8, 20, 0.34);
  --dark-text: #eef7ff;
  --dark-muted: #b8c6d8;
  --dark-line: rgba(112, 168, 224, 0.24);
  --page-gutter: clamp(18px, 5vw, 96px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 75% 8%, rgba(0, 156, 255, 0.22), transparent 34%), var(--bg);
  color: var(--dark-text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.light-mode {
  --bg: #071421;
  --bg-deep: #030914;
  --bg-panel: #0b1c30;
  --panel: #0d2238;
  --panel-soft: #102a46;
  --text: #eef7ff;
  --muted: #b8c6d8;
  --line: rgba(112, 168, 224, 0.24);
  --dark-text: #eef7ff;
  --dark-muted: #b8c6d8;
  --dark-line: rgba(112, 168, 224, 0.24);
  background: radial-gradient(circle at 75% 8%, rgba(0, 156, 255, 0.22), transparent 34%), var(--bg);
}

body.light-mode .site-header {
  background: transparent;
}

body.light-mode .site-header.nav-scrolled {
  background: #061426;
}

body.light-mode .site-header::before {
  opacity: 0;
}

body.light-mode .site-header::after {
  opacity: 0;
}

body.light-mode .site-header.nav-scrolled::before {
  opacity: 0;
}

body.light-mode .site-header.nav-scrolled::after {
  opacity: 0;
}

body.light-mode .top-stage {
  background:
    radial-gradient(circle at 70% 40%, rgba(0, 156, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(242, 249, 253, 0.98), rgba(226, 240, 248, 0.9));
}

body.light-mode .home-hero {
  background:
    radial-gradient(circle at 70% 40%, rgba(0, 156, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(242, 249, 253, 0.98), rgba(226, 240, 248, 0.9));
}

body.light-mode .capability-grid article,
body.light-mode .guide-section {
  background: linear-gradient(180deg, rgba(16, 38, 64, 0.82), rgba(10, 28, 48, 0.78));
}

body.light-mode .guide-section {
  background: transparent;
}

body.light-mode .subnet {
  background: rgba(238, 248, 255, 0.8);
}

body.light-mode .panel {
  background: linear-gradient(180deg, rgba(16, 42, 70, 0.96), rgba(9, 27, 48, 0.96));
  box-shadow: var(--shadow);
}

body.light-mode .status-chip,
body.light-mode .network-tag {
  background: rgba(255, 255, 255, 0.9);
}

body.light-mode .language-switch {
  border-color: transparent;
  background: transparent;
}

body.light-mode .language-option.active {
  background: transparent;
  box-shadow: none;
}

body.light-mode .capability-marquee::before {
  background: linear-gradient(90deg, #030914 0%, rgba(3, 9, 20, 0.84) 42%, transparent 100%);
}

body.light-mode .capability-marquee::after {
  background: linear-gradient(270deg, #030914 0%, rgba(3, 9, 20, 0.84) 42%, transparent 100%);
}

body.light-mode .metric strong,
body.light-mode td {
  color: #eef7ff;
}

body.light-mode .table-panel {
  background:
    linear-gradient(180deg, rgba(2, 8, 16, 0.96), rgba(2, 10, 18, 0.92)),
    var(--bg-deep);
}

body.light-mode .table-panel th,
body.light-mode .table-panel td {
  color: #f2fbff;
}

body.light-mode .binary-card {
  background: rgba(0, 156, 255, 0.08);
}

body.light-mode code {
  color: #0b4c6d;
}

html {
  scroll-behavior: smooth;
}

main {
  background: #030914;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: auto;
  margin: 0 var(--page-gutter);
  padding: 28px 0;
}

.top-stage {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding-top: 108px;
  overflow: hidden;
  border-bottom: 0;
  --video-position-desktop: center center;
  --video-position-mobile: 58% center;
  background:
    radial-gradient(circle at 70% 40%, rgba(0, 156, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(4, 13, 28, 0.4), rgba(10, 27, 47, 0.62));
}

.top-stage::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 9, 20, 0.9) 0%, rgba(3, 9, 20, 0.58) 38%, rgba(3, 9, 20, 0.34) 100%),
    linear-gradient(180deg, rgba(3, 9, 20, 0.24), rgba(3, 9, 20, 0.58)),
    radial-gradient(circle at 76% 45%, rgba(0, 194, 255, 0.2), transparent 34%);
  content: "";
}

.top-stage::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 4;
  height: clamp(170px, 18vw, 280px);
  pointer-events: none;
  background:
    radial-gradient(120% 95% at 50% 100%, #030914 0%, rgba(3, 9, 20, 0.94) 36%, rgba(3, 9, 20, 0.24) 58%, rgba(3, 9, 20, 0) 78%),
    linear-gradient(180deg, rgba(3, 9, 20, 0) 0%, rgba(3, 9, 20, 0.18) 42%, rgba(3, 9, 20, 0.86) 78%, #030914 100%);
  filter: blur(0.4px);
  content: "";
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  isolation: isolate;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 108px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0 0 8px 8px;
  padding: 0 clamp(32px, 4vw, 72px);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  transition:
    opacity 220ms var(--ease-out),
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 280ms var(--ease-out);
  will-change: transform, opacity;
}

.site-header.nav-scrolled {
  border-color: rgba(255, 255, 255, 0.08);
  background: #061426;
  box-shadow: none;
}

.site-header.nav-hidden {
  opacity: 0;
  transform: translateY(calc(-100% - 28px));
}

.site-header::before,
.site-header::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.site-header::before {
  opacity: 0;
  display: flex;
  align-items: center;
  padding-left: 18px;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(0, 194, 255, 0.16) 28px 29px, transparent 29px 56px),
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(86, 211, 255, 0.12) 18px 19px, transparent 19px 38px),
    linear-gradient(90deg, transparent, rgba(16, 156, 255, 0.16), transparent);
  color: rgba(130, 225, 255, 0.28);
  content: "0101 /24 11000000 255 0011 /26 10101000 64 128 VLAN IPv4 0101 /30 1110 255";
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(0, 194, 255, 0.38);
  white-space: nowrap;
  word-spacing: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  animation: nav-data-drift 18s linear infinite;
}

.site-header::after {
  opacity: 0;
  background:
    linear-gradient(180deg, transparent 0 18%, rgba(85, 211, 255, 0.52) 50%, transparent 78%),
    linear-gradient(180deg, transparent 0 12%, rgba(27, 100, 255, 0.38) 42%, transparent 72%),
    radial-gradient(circle at 18% 50%, rgba(0, 194, 255, 0.22), transparent 16%),
    radial-gradient(circle at 74% 42%, rgba(27, 100, 255, 0.18), transparent 18%);
  background-position: 12% -130px, 82% -190px, 0 0, 0 0;
  background-repeat: no-repeat;
  background-size: 2px 110px, 2px 150px, 100% 100%, 100% 100%;
  filter: blur(0.1px);
  animation: nav-line-rain 9s linear infinite;
}

.site-header.nav-scrolled::before {
  opacity: 0;
  display: none;
}

.site-header.nav-scrolled::after {
  opacity: 0;
  display: none;
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.brand,
.main-nav {
  display: flex;
  align-items: center;
}

.brand {
  position: relative;
  gap: 16px;
  color: var(--dark-text);
  min-width: 0;
  font-size: clamp(1.28rem, 1.7vw, 1.68rem);
  font-weight: 800;
  text-decoration: none;
  transition:
    color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.brand-logo {
  width: clamp(64px, 5.5vw, 84px);
  height: clamp(64px, 5.5vw, 84px);
  object-fit: contain;
  filter: none;
}

.brand-text {
  max-width: 15ch;
  color: #eefbff;
  line-height: 1.05;
  text-shadow: none;
  text-wrap: balance;
}

.brand strong,
.typing-line,
.capabilities h2 span {
  color: var(--cyan);
}

.matrix-brand {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  padding: 8px 10px;
  color: #eefbff;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(92, 218, 255, 0.66),
    0 0 20px rgba(16, 156, 255, 0.42);
  overflow: hidden;
}

.matrix-brand::before,
.matrix-brand::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: #98eaff;
  content: attr(data-text);
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.matrix-brand::before {
  text-shadow: -1px 0 #00c2ff;
  transform: translateX(-1px);
  animation: brand-glitch-a 7.5s steps(1, end) infinite;
}

.matrix-brand::after {
  color: #d6f7ff;
  text-shadow: 1px 0 #1b64ff;
  transform: translateX(1px);
  animation: brand-glitch-b 8.8s steps(1, end) infinite;
}

.matrix-copy {
  position: relative;
  z-index: 2;
  display: inline-block;
  animation: matrix-neon-breathe 5.6s var(--ease-in-out) infinite;
}

.matrix-copy strong {
  color: #37cfff;
}

.matrix-rain,
.matrix-rain::before,
.matrix-rain::after {
  position: absolute;
  inset: -24px -12px;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.matrix-rain {
  opacity: 0.18;
  background:
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(0, 194, 255, 0.18) 11px 12px, transparent 12px 23px),
    linear-gradient(180deg, transparent, rgba(16, 156, 255, 0.15), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: matrix-rain-slide 16s linear infinite;
}

.matrix-rain::before {
  color: rgba(145, 231, 255, 0.72);
  content: "01 101 24 255 /26 10 001 128 64 01 110";
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 0 9px rgba(0, 194, 255, 0.62);
  white-space: normal;
  word-spacing: 9px;
  transform: rotate(-2deg);
  animation: matrix-code-fall 12s linear infinite;
}

.matrix-rain::after {
  background-image:
    linear-gradient(180deg, transparent 0 26%, rgba(119, 226, 255, 0.52) 48%, transparent 76%),
    linear-gradient(180deg, transparent 0 8%, rgba(27, 100, 255, 0.34) 34%, transparent 68%);
  background-position: 12% 0, 78% -30px;
  background-repeat: no-repeat;
  background-size: 2px 80px, 2px 110px;
  filter: blur(0.2px);
  animation: matrix-line-fall 7.5s linear infinite;
}

.brand svg {
  width: 42px;
  height: 42px;
  color: var(--cyan);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.main-nav {
  gap: clamp(30px, 4vw, 62px);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dark-text);
  font-size: clamp(1.08rem, 1.35vw, 1.28rem);
  font-weight: 760;
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

.main-nav a svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--cyan);
}

.main-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -34px;
  left: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(16, 156, 255, 0.72);
  content: "";
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  opacity: 0.68;
  transition:
    background 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    opacity 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.language-option.active {
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.language-option:hover {
  background: transparent;
  opacity: 1;
  transform: translateY(-1px);
}

.flag {
  position: relative;
  display: block;
  width: 30px;
  height: 20px;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 2px 7px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.flag-us {
  background: repeating-linear-gradient(
    to bottom,
    #b22234 0 1.31px,
    #ffffff 1.31px 2.62px
  );
}

.flag-us::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 10.6px;
  background: #3c3b6e;
  content: "";
}

.flag-us::after {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10.5px;
  height: 8.4px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 0.75px, transparent 0.85px);
  background-position: 0 0;
  background-size: 3.5px 2.8px;
  content: "";
}

.flag-mx {
  background: linear-gradient(
    to right,
    #006847 0 33.33%,
    #ffffff 33.33% 66.66%,
    #ce1126 66.66% 100%
  );
}

.flag-mx::before {
  position: absolute;
  top: 7px;
  left: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, #8c6239 0 1.6px, transparent 1.8px),
    radial-gradient(circle at 50% 50%, #1b7f3a 0 3px, transparent 3.2px);
  box-shadow: 0 0 0 0.8px rgba(141, 92, 43, 0.44);
  content: "";
}

.theme-button {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(112, 168, 224, 0.12);
  border-radius: 8px;
  background: rgba(10, 30, 54, 0.72);
  color: var(--dark-text);
  cursor: pointer;
  transition:
    background 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.theme-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(420px, 1fr);
  gap: clamp(42px, 6vw, 92px);
  align-items: center;
  min-height: calc(100svh - 108px);
  padding: clamp(42px, 5.4vw, 76px) var(--page-gutter) clamp(112px, 10vw, 156px);
  overflow: hidden;
  background: transparent;
  transform-origin: center;
  transition:
    filter 420ms var(--ease-out),
    transform 620ms var(--ease-out);
}

.home-hero::before,
.home-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.home-hero::before {
  display: none;
}

.home-hero::after {
  display: none;
}

.hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #030914;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--video-position-desktop);
  opacity: 0;
  filter: saturate(1.06) contrast(1.08) brightness(0.74);
  transform: scale(1.01);
  pointer-events: none;
  user-select: none;
  will-change: opacity;
}

.hero-copy,
.hero-earth,
.network-visual {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 100%;
}

.hero-copy h1 {
  max-width: 660px;
  color: var(--dark-text);
  font-size: clamp(3.7rem, 5.8vw, 5.75rem);
  line-height: 1.08;
  text-wrap: balance;
}

.typing-hero {
  min-height: 3.25em;
}

.hero-fixed-line,
.typing-line {
  display: block;
}

.typing-line {
  min-height: 1.1em;
  white-space: nowrap;
}

.typing-caret {
  display: inline-block;
  width: 0.08em;
  height: 0.84em;
  margin-left: 0.08em;
  background: currentColor;
  border-radius: 999px;
  vertical-align: -0.08em;
  animation: caret-blink 850ms steps(1) infinite;
  box-shadow: 0 0 18px rgba(0, 194, 255, 0.52);
}

.hero-copy p {
  max-width: 600px;
  margin-top: 24px;
  color: var(--dark-muted);
  font-size: 1.24rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-earth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(320px, 38vw, 560px);
  pointer-events: none;
}

.hero-earth img {
  display: block;
  width: min(100%, 620px);
  aspect-ratio: 1;
  object-fit: contain;
  mix-blend-mode: screen;
  filter:
    saturate(1.16)
    contrast(1.05)
    drop-shadow(0 0 34px rgba(0, 194, 255, 0.34));
}

.network-visual {
  position: relative;
  min-height: 440px;
}

.grid-field {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 194, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 194, 255, 0.13) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle, #000 48%, transparent 78%);
  animation: grid-drift 12s linear infinite;
}

.globe {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 72px;
  height: 72px;
  border: 3px solid var(--cyan);
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 0 24px rgba(0, 194, 255, 0.42);
  animation: neon-pulse 3.2s var(--ease-in-out) infinite;
}

.globe::before,
.globe::after {
  position: absolute;
  content: "";
}

.globe::before {
  inset: 10px 24px;
  border-right: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  border-radius: 50%;
}

.globe::after {
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 -18px 0 rgba(0, 194, 255, 0.55), 0 18px 0 rgba(0, 194, 255, 0.55);
}

.router {
  position: absolute;
  top: 120px;
  left: 50%;
  display: flex;
  align-items: end;
  gap: 8px;
  width: 118px;
  height: 66px;
  border: 2px solid var(--cyan);
  border-radius: 10px;
  padding: 0 18px 16px;
  background: linear-gradient(180deg, rgba(0, 156, 255, 0.48), rgba(0, 83, 150, 0.48));
  transform: translateX(-50%);
  box-shadow: 0 0 30px rgba(0, 156, 255, 0.4);
  animation: router-glow 3.6s var(--ease-in-out) infinite;
}

.router::before {
  position: absolute;
  top: -48px;
  left: calc(50% - 2px);
  width: 4px;
  height: 48px;
  border-left: 2px dashed var(--cyan);
  background: linear-gradient(180deg, transparent, rgba(176, 239, 255, 0.82), transparent);
  background-size: 100% 72px;
  content: "";
  filter: drop-shadow(0 0 6px rgba(0, 194, 255, 0.42));
  animation:
    dash-flow-vertical 2.2s linear infinite,
    vertical-pulse 1.8s linear infinite;
}

.router span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #40f49b;
  box-shadow: 0 0 14px rgba(64, 244, 155, 0.58);
}

.network-line {
  position: absolute;
  top: 190px;
  left: 14%;
  width: 72%;
  height: 8px;
  border-top: 2px dashed var(--cyan);
  animation: dash-flow-horizontal 2.4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(0, 194, 255, 0.58));
  overflow: hidden;
}

.network-line::after {
  position: absolute;
  top: -5px;
  left: 0;
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(158, 234, 255, 0.9), transparent);
  content: "";
  filter: blur(1px);
  transform: translateX(-100%);
  animation: signal-sweep 3.2s var(--ease-in-out) infinite;
}

.subnet {
  position: absolute;
  top: 226px;
  width: 136px;
  min-height: 116px;
  border: 1px dashed rgba(0, 194, 255, 0.82);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  background: rgba(2, 17, 34, 0.64);
  box-shadow: inset 0 0 20px rgba(0, 156, 255, 0.08);
  animation: subnet-glow 4s var(--ease-in-out) infinite;
}

.subnet::before {
  position: absolute;
  top: -38px;
  left: calc(50% - 2px);
  width: 4px;
  height: 38px;
  border-left: 2px dashed var(--cyan);
  background: linear-gradient(180deg, transparent, rgba(176, 239, 255, 0.82), transparent);
  background-size: 100% 64px;
  content: "";
  filter: drop-shadow(0 0 6px rgba(0, 194, 255, 0.4));
  animation:
    dash-flow-vertical 2.1s linear infinite,
    vertical-pulse 1.7s linear infinite;
}

.subnet strong {
  color: var(--cyan);
  font-size: 0.78rem;
}

.subnet p {
  margin-top: 9px;
  color: var(--dark-text);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.subnet-1 {
  left: calc(14% - 68px);
}

.subnet-2 {
  left: calc(38% - 68px);
}

.subnet-3 {
  left: calc(62% - 68px);
}

.subnet-4 {
  right: auto;
  left: calc(86% - 68px);
}

.device-row {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 18px;
}

.device-row span {
  position: relative;
  width: 32px;
  height: 22px;
  border: 2px solid var(--cyan);
  border-radius: 2px;
}

.device-row span::after {
  position: absolute;
  bottom: -9px;
  left: 10px;
  width: 12px;
  height: 6px;
  border-bottom: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  content: "";
}

.capabilities,
.guide-section {
  width: auto;
  margin-right: var(--page-gutter);
  margin-left: var(--page-gutter);
}

.capabilities {
  margin-right: 0;
  margin-left: 0;
  padding: 68px 0 18px;
  background:
    linear-gradient(180deg, #030914 0%, rgba(3, 9, 20, 0.94) 64px, #030914 132px),
    #030914;
  box-shadow: none;
}

.capabilities > h2 {
  color: #eef7ff;
  font-size: 1.65rem;
  text-align: center;
}

.capability-marquee {
  position: relative;
  margin-top: 24px;
  padding: 18px 0;
  overflow: hidden;
}

.capability-marquee::before,
.capability-marquee::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: clamp(42px, 8vw, 130px);
  pointer-events: none;
  content: "";
}

.capability-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #030914 0%, rgba(3, 9, 20, 0.84) 42%, transparent 100%);
}

.capability-marquee::after {
  right: 0;
  background: linear-gradient(270deg, #030914 0%, rgba(3, 9, 20, 0.84) 42%, transparent 100%);
}

.capability-grid {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: capability-marquee 44s linear infinite;
}

.capability-set {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  padding-right: 18px;
}

.capability-grid article,
.guide-section {
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 38, 64, 0.82), rgba(10, 28, 48, 0.78));
}

.capability-grid article {
  position: relative;
  flex: 0 0 clamp(236px, 18vw, 300px);
  min-height: 178px;
  border-color: transparent;
  padding: 22px 18px;
  background: transparent;
  text-align: center;
  transform-origin: center;
  transition:
    border-color 180ms var(--ease-out),
    background 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.capability-grid h3 {
  margin: 14px 0 8px;
  color: #eef7ff;
  font-size: 1rem;
}

.capability-grid p,
.guide-list {
  color: var(--dark-muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.capabilities .capability-grid p {
  color: #b8c6d8;
}

.capability-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  font-weight: 900;
}

.capability-icon.image-icon {
  width: 78px;
  height: 78px;
  border-radius: 0;
  background: transparent;
}

.capability-icon.image-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.34));
}

.green {
  background: rgba(18, 214, 160, 0.18);
  color: #34f4b5;
}

.purple {
  background: rgba(138, 92, 246, 0.2);
  color: #a78bfa;
}

.blue {
  background: rgba(16, 156, 255, 0.2);
  color: #38bdf8;
}

.amber {
  background: rgba(217, 144, 47, 0.22);
  color: #f8b84e;
}

.rose {
  background: rgba(244, 114, 182, 0.2);
  color: #fb7185;
}

.guide-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(320px, 0.78fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: center;
  min-height: clamp(560px, 74svh, 760px);
  border-color: transparent;
  margin-top: 0;
  padding: clamp(64px, 8vw, 104px) clamp(28px, 6vw, 88px);
  background: transparent;
  overflow: hidden;
}

.guide-section h2 {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--dark-text);
  font-size: clamp(3.2rem, 5.6vw, 6rem);
  line-height: 1.02;
  text-wrap: balance;
}

.guide-list {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  max-width: 720px;
  margin: clamp(28px, 4vw, 46px) 0 0;
  padding-left: 1.25em;
  font-size: clamp(1.05rem, 1.45vw, 1.34rem);
}

.guide-list strong {
  color: var(--dark-text);
}

.calculator-steps {
  max-width: 720px;
  margin-top: clamp(28px, 4vw, 44px);
}

.calculator-steps h3 {
  margin: 0;
  color: var(--dark-text);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.guide-steps-list {
  margin-top: 18px;
}

.guide-concepts {
  max-width: 720px;
  margin-top: clamp(28px, 4vw, 46px);
}

.guide-concepts-title {
  margin: 0;
  color: var(--dark-text);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.guide-concepts-list {
  margin-top: 18px;
  padding-left: 0;
  list-style: none;
}

.guide-copy {
  position: relative;
  z-index: 2;
}

.guide-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(360px, 48vw, 640px);
}

.guide-visual::before {
  position: absolute;
  width: min(92%, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 194, 255, 0.16), transparent 62%),
    radial-gradient(circle, rgba(27, 100, 255, 0.12), transparent 70%);
  filter: blur(10px);
  content: "";
}

.guide-visual img {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: 620px;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 34px rgba(0, 194, 255, 0.16));
}

.calculator-shell {
  scroll-margin-top: 90px;
}

.calculator-shell .panel h2 {
  color: #f4fbff;
  font-size: 1.42rem;
  line-height: 1.15;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 10px;
}

.calculator-main-title {
  margin: 0 0 28px;
  color: #eef7ff;
  font-size: clamp(2.35rem, 4vw, 4rem);
  line-height: 1.05;
  text-align: center;
}

.calculator-alert {
  width: min(100%, 440px);
  margin: -12px auto 30px;
  justify-content: flex-start;
}

.status-chip.calculator-alert[hidden] {
  display: none;
}

.status-chip.calculator-alert:not([hidden]) {
  display: flex;
}

.calculator-shell .network-tag {
  display: none;
}

.calculator-shell .panel {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: #edf7ff;
  font-family: "Century Gothic", CenturyGothic, AppleGothic, Inter, ui-sans-serif, sans-serif;
}

.calculator-shell .form-panel,
.calculator-shell .results-panel,
.calculator-shell .table-panel {
  padding: 32px;
}

.calculator-shell .form-panel {
  gap: 24px 28px;
  width: min(100%, 1120px);
}

.calculator-shell .form-panel .panel-heading {
  justify-content: flex-end;
  margin-bottom: -4px;
}

.calculator-shell .form-panel .primary-button {
  width: min(100%, 420px);
  min-height: 58px;
  font-size: 1.05rem;
}

.calculator-shell .results-panel {
  font-size: 1.08rem;
}

.calculator-shell .summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.calculator-shell .summary-section {
  display: grid;
  gap: 16px;
}

.calculator-shell .summary-section h3 {
  color: #79d9ff;
  font-size: 1.12rem;
  line-height: 1.2;
}

.calculator-shell .summary-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}

.calculator-shell .panel-heading {
  margin-bottom: 24px;
}

.calculator-shell .field > span,
.calculator-shell .table-panel .panel-heading p,
.calculator-shell .metric span {
  color: #ffffff;
}

.calculator-shell .field {
  gap: 12px;
  margin-bottom: 20px;
}

.calculator-shell .field > span {
  font-size: 1rem;
}

.calculator-shell .field-hint {
  color: rgba(220, 240, 255, 0.74);
  font-size: 0.86rem;
  line-height: 1.35;
}

.calculator-shell .mode-help {
  display: grid;
  gap: 6px;
  margin-top: 0;
  color: rgba(220, 240, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.35;
}

.calculator-shell .mode-help p {
  margin: 0;
}

.calculator-shell .mode-help strong {
  color: #ffffff;
}

.calculator-shell input,
.calculator-shell textarea,
.calculator-shell .segmented,
.calculator-shell .secondary-button,
.calculator-shell .icon-button {
  border-color: rgba(120, 217, 255, 0.24);
  background: rgba(5, 24, 45, 0.72);
  color: #f2fbff;
  font-family: "Century Gothic", CenturyGothic, AppleGothic, Inter, ui-sans-serif, sans-serif;
  font-size: 1.08rem;
}

.calculator-shell input {
  height: 58px;
  padding: 0 16px;
}

.calculator-shell textarea {
  min-height: 132px;
  padding: 16px;
}

.calculator-shell input::placeholder,
.calculator-shell textarea::placeholder {
  color: #9eb8cf;
}

.calculator-shell input:focus,
.calculator-shell textarea:focus {
  border-color: #0b8fff;
  background: rgba(7, 34, 62, 0.96);
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.16);
}

.calculator-shell .segment {
  color: #ffffff;
  height: 48px;
  font-size: 1rem;
}

.calculator-shell .segment.active {
  color: #fff;
}

.calculator-shell .metric {
  min-height: 132px;
  border-color: transparent;
  background: transparent;
  padding: 18px;
}

.calculator-shell .metric span {
  font-size: 0.9rem;
}

.calculator-shell .metric strong {
  color: #ffffff;
  font-size: clamp(1.24rem, 2vw, 1.7rem);
}

.calculator-shell .calculation-details {
  grid-column: 2 / 3;
  width: 100%;
}

.calculator-shell .calculation-details summary {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
  list-style: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #3f8df4 0%, #2f60f6 100%);
  box-shadow: 0 16px 34px rgba(43, 101, 246, 0.22);
  color: #ffffff;
  font-weight: 800;
  padding: 10px 16px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.calculator-shell .calculation-details summary::-webkit-details-marker {
  display: none;
}

.calculator-shell .calculation-details summary:hover {
  box-shadow: 0 18px 40px rgba(43, 101, 246, 0.32);
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.calculator-shell .calculation-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px 0 0;
}

.calculator-shell .calculation-step {
  display: grid;
  gap: 4px;
  color: rgba(230, 246, 255, 0.86);
}

.calculator-shell .calculation-step span {
  color: rgba(220, 240, 255, 0.82);
  font-family: "Century Gothic", CenturyGothic, AppleGothic, Inter, ui-sans-serif, sans-serif;
  font-size: clamp(1.05rem, 1.45vw, 1.34rem);
  font-weight: 700;
  text-transform: none;
}

.calculator-shell .calculation-step strong {
  color: #ffffff;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.25;
}

.calculator-shell .section-label {
  color: #79d9ff;
}

.calculator-shell .binary-card {
  margin-top: 18px;
  border-color: transparent;
  background: transparent;
  padding: 20px;
}

.calculator-shell code {
  color: #d9f8ff;
  font-size: 1.08rem;
}

.calculator-shell .table-panel {
  background: transparent;
}

.calculator-shell th,
.calculator-shell td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.calculator-shell th {
  color: #f4fbff;
}

.calculator-shell td {
  color: #edf7ff;
  font-family: "Century Gothic", CenturyGothic, AppleGothic, Inter, ui-sans-serif, sans-serif;
}

.calculator-shell tbody tr {
  background: transparent;
}

.calculator-shell tbody tr:hover td {
  background: rgba(0, 156, 255, 0.06);
}

.calculator-shell td::before {
  color: #b7d2e8;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 5px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.section-label {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-chip,
.network-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(16, 42, 70, 0.92);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.status-dot {
  position: relative;
  width: 0;
  height: 0;
  border-right: 13px solid transparent;
  border-bottom: 23px solid #f3c85d;
  border-left: 13px solid transparent;
  background: transparent;
}

.status-dot::after {
  position: absolute;
  width: 3px;
  height: 10px;
  margin: 7px 0 0 -1.5px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 12px 0 -1px #ffffff;
  content: "";
}

.status-message {
  flex: 1;
}

.status-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #805b25;
  cursor: pointer;
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.status-close:hover {
  color: #4f3514;
  transform: scale(1.04);
}

.status-chip.calculator-alert {
  gap: 13px;
  min-height: 58px;
  border: 1px solid #f7bf28;
  border-radius: 10px;
  background: #fff7d6;
  box-shadow: 0 8px 22px rgba(247, 191, 40, 0.22);
  color: #795827;
  font-family: "Century Gothic", CenturyGothic, AppleGothic, Inter, ui-sans-serif, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  padding: 0 14px 0 18px;
}

.status-chip.error .status-dot {
  border-bottom-color: #f3c85d;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 42, 70, 0.96), rgba(9, 27, 48, 0.96));
  box-shadow: var(--shadow);
}

.form-panel,
.results-panel,
.table-panel {
  padding: 18px;
}

.form-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px 22px;
  justify-self: center;
  width: min(100%, 1040px);
  padding: 26px;
}

.form-panel .panel-heading,
.form-panel .primary-button {
  grid-column: 1 / -1;
}

.form-panel .panel-heading {
  margin-bottom: 0;
}

.form-panel #vlsmField {
  grid-column: 1 / -1;
}

.form-panel .primary-button {
  justify-self: center;
  width: min(100%, 340px);
  margin-top: 4px;
}

.results-panel {
  width: 100%;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background 160ms var(--ease-out);
}

input::placeholder,
textarea::placeholder {
  color: #a9bbca;
}

input {
  height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 102px;
  padding: 12px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: #132f4f;
  box-shadow: 0 0 0 4px rgba(0, 194, 255, 0.16);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 10px;
  align-items: center;
}

input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}

.cidr-input {
  text-align: center;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 4px;
}

.segment {
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  transition:
    background 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 140ms var(--ease-out);
}

.segment.active {
  background: linear-gradient(135deg, #0b8fff, #1b64ff);
  color: #fff;
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
  transition:
    border-color 180ms var(--ease-out),
    background 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    color 180ms var(--ease-out),
    transform 140ms var(--ease-out);
}

.primary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0b8fff, #1b64ff);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 116, 240, 0.2);
}

.secondary-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-soft);
  color: var(--text);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: #79d9ff;
}

button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.metric {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
  transition:
    border-color 180ms var(--ease-out),
    background 180ms var(--ease-out);
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric strong {
  color: #f4fbff;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.15;
  word-break: break-word;
}

.binary-card {
  margin-top: 14px;
  border: 1px solid rgba(0, 194, 255, 0.28);
  border-radius: 8px;
  background: rgba(0, 156, 255, 0.1);
  padding: 16px;
}

code {
  display: block;
  margin-top: 8px;
  overflow-x: auto;
  color: #c9f3ff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.95rem;
}

.table-panel {
  margin-top: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 8, 16, 0.96), rgba(2, 10, 18, 0.92)),
    var(--bg-deep);
}

.table-panel .panel-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-panel .secondary-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
}

.table-panel .secondary-button.copied {
  border-color: rgba(96, 255, 190, 0.78);
  background: rgba(35, 215, 150, 0.16);
  box-shadow:
    0 0 0 1px rgba(96, 255, 190, 0.18),
    0 0 24px rgba(35, 215, 150, 0.28);
  color: #9cffdc;
}

.table-panel .secondary-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.copy-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(96, 255, 190, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 40, 36, 0.96), rgba(7, 22, 38, 0.96)),
    var(--bg-deep);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(35, 215, 150, 0.18);
  color: #eafff7;
  font-family: "Century Gothic", CenturyGothic, AppleGothic, Inter, ui-sans-serif, sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  padding: 13px 16px;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 180ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.copy-toast.error {
  border-color: rgba(255, 94, 122, 0.44);
  background:
    linear-gradient(135deg, rgba(58, 15, 28, 0.96), rgba(18, 12, 24, 0.96)),
    var(--bg-deep);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(255, 94, 122, 0.2);
  color: #ffe9ee;
}

@media (max-width: 640px) {
  .copy-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
    text-align: center;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 17px 16px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #f5fbff;
  font-size: 0.96rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: none;
}

td {
  color: #f2fbff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 1rem;
  font-weight: 520;
}

tbody tr:hover td {
  background: rgba(0, 194, 255, 0.045);
}

.cursor-letter {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  color: rgba(118, 224, 255, 0.78);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 194, 255, 0.5), 0 0 22px rgba(27, 100, 255, 0.22);
  transform: translate(-50%, -50%) scale(var(--scale-from, 1));
  animation: cursor-letter-pop 820ms var(--ease-out) forwards;
  will-change: transform, opacity, filter;
}

body.light-mode .cursor-letter {
  color: rgba(0, 116, 180, 0.54);
  text-shadow: 0 0 10px rgba(0, 156, 255, 0.22);
}

@keyframes neon-pulse {
  0%,
  100% {
    border-color: rgba(0, 194, 255, 0.78);
    box-shadow: 0 0 18px rgba(0, 194, 255, 0.34), inset 0 0 0 rgba(0, 194, 255, 0);
  }

  50% {
    border-color: rgba(116, 224, 255, 1);
    box-shadow: 0 0 34px rgba(0, 194, 255, 0.72), inset 0 0 18px rgba(0, 194, 255, 0.14);
  }
}

@keyframes router-glow {
  0%,
  100% {
    border-color: rgba(0, 194, 255, 0.76);
    box-shadow: 0 0 22px rgba(0, 156, 255, 0.32), inset 0 0 12px rgba(0, 194, 255, 0.1);
  }

  50% {
    border-color: rgba(151, 233, 255, 1);
    box-shadow: 0 0 42px rgba(0, 194, 255, 0.68), inset 0 0 22px rgba(0, 194, 255, 0.22);
  }
}

@keyframes subnet-glow {
  0%,
  100% {
    border-color: rgba(0, 194, 255, 0.52);
    box-shadow: inset 0 0 16px rgba(0, 156, 255, 0.08), 0 0 0 rgba(0, 194, 255, 0);
  }

  50% {
    border-color: rgba(98, 219, 255, 0.96);
    box-shadow: inset 0 0 22px rgba(0, 156, 255, 0.16), 0 0 18px rgba(0, 194, 255, 0.26);
  }
}

@keyframes dash-flow-horizontal {
  0% {
    border-color: rgba(0, 194, 255, 0.42);
    filter: drop-shadow(0 0 4px rgba(0, 194, 255, 0.28));
  }

  50% {
    border-color: rgba(122, 225, 255, 1);
    filter: drop-shadow(0 0 12px rgba(0, 194, 255, 0.72));
  }

  100% {
    border-color: rgba(0, 194, 255, 0.42);
    filter: drop-shadow(0 0 4px rgba(0, 194, 255, 0.28));
  }
}

@keyframes dash-flow-vertical {
  0%,
  100% {
    border-color: rgba(0, 194, 255, 0.45);
    filter: drop-shadow(0 0 3px rgba(0, 194, 255, 0.28));
  }

  50% {
    border-color: rgba(134, 229, 255, 1);
    filter: drop-shadow(0 0 10px rgba(0, 194, 255, 0.68));
  }
}

@keyframes grid-drift {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 36px 36px, 36px 36px;
  }
}

@keyframes signal-sweep {
  0%,
  18% {
    opacity: 0;
    transform: translateX(-100%);
  }

  28% {
    opacity: 0.9;
  }

  72% {
    opacity: 0.9;
  }

  86%,
  100% {
    opacity: 0;
    transform: translateX(clamp(260px, 46vw, 620px));
  }
}

@keyframes vertical-pulse {
  from {
    background-position: 0 -72px;
  }

  to {
    background-position: 0 72px;
  }
}

@keyframes capability-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

@keyframes cursor-letter-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(var(--scale-from, 1) * 0.62));
    filter: blur(1px);
  }

  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--scale-from, 1));
    filter: blur(0);
  }

  72% {
    opacity: 0.78;
    transform: translate(-50%, -50%) scale(calc((var(--scale-from, 1) + var(--scale-to, 0.4)) / 2));
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--scale-to, 0.4));
    filter: blur(1px);
  }
}

@keyframes matrix-neon-breathe {
  0%,
  100% {
    text-shadow:
      0 0 7px rgba(86, 211, 255, 0.56),
      0 0 18px rgba(16, 156, 255, 0.32);
  }

  50% {
    text-shadow:
      0 0 11px rgba(161, 238, 255, 0.86),
      0 0 28px rgba(0, 194, 255, 0.42);
  }
}

@keyframes nav-data-drift {
  from {
    background-position: 0 -40px, 0 0, 0 0;
  }

  to {
    background-position: 56px 54px, 0 38px, 180px 0;
  }
}

@keyframes nav-line-rain {
  from {
    background-position: 12% -130px, 82% -190px, 0 0, 0 0;
  }

  to {
    background-position: 12% 120px, 82% 140px, 0 0, 0 0;
  }
}

@keyframes matrix-rain-slide {
  from {
    background-position: 0 -80px, 0 0;
  }

  to {
    background-position: 0 80px, 0 0;
  }
}

@keyframes matrix-code-fall {
  from {
    transform: translateY(-24px) rotate(-2deg);
  }

  to {
    transform: translateY(32px) rotate(-2deg);
  }
}

@keyframes matrix-line-fall {
  from {
    background-position: 12% -120px, 78% -160px;
  }

  to {
    background-position: 12% 90px, 78% 110px;
  }
}

@keyframes brand-glitch-a {
  0%,
  88%,
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }

  89% {
    clip-path: inset(0 0 58% 0);
    opacity: 0.55;
  }

  90% {
    clip-path: inset(62% 0 12% 0);
    opacity: 0.35;
  }

  91% {
    opacity: 0;
  }
}

@keyframes brand-glitch-b {
  0%,
  72%,
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }

  73% {
    clip-path: inset(18% 0 68% 0);
    opacity: 0.46;
  }

  74% {
    clip-path: inset(70% 0 0 0);
    opacity: 0.32;
  }

  75% {
    opacity: 0;
  }
}

.reveal-on-scroll {
  opacity: 1;
  transform: none;
  transition: none;
  filter: none;
  will-change: auto;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.reveal-on-scroll.reveal-pop {
  transform: none;
}

.reveal-on-scroll.reveal-pop.is-visible {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.theme-button:active,
.segment:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    transform: translateY(-1px);
  }

  .primary-button:hover {
    box-shadow: 0 18px 42px rgba(0, 116, 240, 0.34);
    transform: translateY(-1px);
  }

  .secondary-button:hover,
  .icon-button:hover {
    border-color: rgba(0, 194, 255, 0.42);
    background: rgba(0, 194, 255, 0.08);
  }

}

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

  .typing-caret {
    animation: none !important;
  }

  .matrix-brand::before,
  .matrix-brand::after,
  .matrix-copy,
  .matrix-rain,
  .matrix-rain::before,
  .matrix-rain::after,
  .site-header::before,
  .site-header::after {
    animation: none !important;
  }

  .matrix-rain {
    opacity: 0.12;
  }

  .capability-grid {
    animation: none !important;
    transform: none !important;
  }

  .copy-toast,
  .copy-toast.show {
    transform: none;
  }
}

tr:last-child td {
  border-bottom: 0;
}

.hidden {
  display: none;
}

@media (max-width: 880px) {
  .top-stage {
    min-height: 100svh;
    padding-top: 112px;
  }

  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    min-height: 0;
    margin: 0;
    border-radius: 0 0 8px 8px;
    padding: 12px 18px 14px;
  }

  .brand {
    gap: 12px;
    font-size: clamp(1.08rem, 4.8vw, 1.38rem);
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-text {
    max-width: 12ch;
  }

  .matrix-brand {
    padding: 6px 8px;
  }

  .brand svg {
    width: 34px;
    height: 34px;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .main-nav a {
    gap: 8px;
    font-size: 1rem;
  }

  .main-nav a svg {
    width: 21px;
    height: 21px;
  }

  .main-nav a.active::after {
    bottom: -8px;
  }

  .header-actions {
    justify-self: end;
    gap: 10px;
  }

  .language-switch {
    height: 42px;
    gap: 8px;
  }

  .language-option {
    width: 42px;
    height: 42px;
  }

  .theme-button {
    width: 44px;
    height: 44px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: calc(100svh - 112px);
    padding: 34px var(--page-gutter) 56px;
    --video-position-desktop: var(--video-position-mobile);
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .network-visual {
    min-height: 330px;
  }

  .hero-earth {
    display: none;
  }

  .capability-grid {
    animation-duration: 36s;
  }

  .capability-grid article {
    flex-basis: clamp(236px, 42vw, 320px);
  }

  .guide-section {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 34px;
    padding: 56px var(--page-gutter);
  }

  .guide-section h2 {
    font-size: clamp(2.7rem, 10vw, 4.6rem);
  }

  .guide-visual {
    min-height: 360px;
  }

  .guide-visual img {
    width: min(86vw, 460px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .calculator-shell .summary-section-grid {
    grid-template-columns: 1fr;
  }

  .calculator-shell .calculation-details {
    grid-column: 1;
  }

  .form-panel {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 20px;
  }

  .form-panel .primary-button {
    width: 100%;
  }

  .app-shell {
    width: auto;
    margin-right: var(--page-gutter);
    margin-left: var(--page-gutter);
    padding: 18px 0;
  }
}

@media (max-width: 680px) {
  :root {
    --page-gutter: 16px;
  }

  .top-stage {
    padding-top: 118px;
  }

  .home-hero {
    min-height: calc(100svh - 118px);
    padding-top: 28px;
  }

  .hero-copy h1 {
    font-size: clamp(2.42rem, 12.5vw, 3.05rem);
  }

  .hero-copy p {
    max-width: 31ch;
    font-size: 1.04rem;
  }

  .network-visual {
    min-height: 640px;
  }

  .hero-earth {
    display: none;
  }

  .hero-video {
    display: none;
  }

  .hero-video-layer {
    background:
      radial-gradient(circle at 18% 28%, rgba(0, 194, 255, 0.16), transparent 28%),
      radial-gradient(circle at 82% 16%, rgba(27, 100, 255, 0.16), transparent 24%),
      linear-gradient(rgba(0, 194, 255, 0.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 194, 255, 0.08) 1px, transparent 1px),
      linear-gradient(160deg, #061b34 0%, #03101f 48%, #020813 100%);
    background-size: auto, auto, 86px 86px, 86px 86px, auto;
  }

  .globe {
    top: 0;
  }

  .router {
    top: 112px;
  }

  .network-line {
    top: 192px;
    left: 50%;
    width: 8px;
    height: 410px;
    border-top: 0;
    border-left: 2px dashed var(--cyan);
  }

  .network-line::after {
    top: 0;
    left: -5px;
    width: 8px;
    height: 72px;
    background: linear-gradient(180deg, transparent, rgba(158, 234, 255, 0.9), transparent);
    transform: translateY(-100%);
    animation: signal-sweep-vertical 3.2s var(--ease-in-out) infinite;
  }

  .subnet {
    top: auto;
    right: auto;
    left: 50%;
    width: min(240px, 82vw);
    transform: translateX(-50%);
  }

  .subnet::before {
    display: none;
  }

  .subnet-1 {
    top: 230px;
  }

  .subnet-2 {
    top: 350px;
  }

  .subnet-3 {
    top: 470px;
  }

  .subnet-4 {
    top: 590px;
  }

  .capability-grid {
    animation-duration: 32s;
  }

  .capability-grid article {
    flex-basis: min(78vw, 310px);
  }

  .guide-section {
    padding: 44px 18px;
  }

  .guide-section h2 {
    font-size: 2.65rem;
  }

  .guide-list {
    font-size: 1rem;
  }

  .guide-visual {
    min-height: 300px;
  }

  .guide-visual img {
    width: min(92vw, 360px);
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
    background: var(--panel-soft);
    overflow: hidden;
  }

  td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    text-align: right;
  }

  td::before {
    color: var(--muted);
    content: attr(data-label);
    flex: 0 0 auto;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
  }

}

@keyframes signal-sweep-vertical {
  0%,
  18% {
    opacity: 0;
    transform: translateY(-100%);
  }

  28%,
  72% {
    opacity: 0.9;
  }

  86%,
  100% {
    opacity: 0;
    transform: translateY(410px);
  }
}
