:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --ink: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --green: #58cc02;
  --green-dark: #3a8c00;
  --green-soft: #eefbe7;
  --blue: #1cb0f6;
  --blue-dark: #0d83be;
  --yellow: #ffd900;
  --yellow-dark: #c79400;
  --red: #ff4b4b;
  --red-dark: #cc2222;
  --purple: #8b5cf6;
  --purple-dark: #6d28d9;
  --shadow: 0 4px 0 rgba(15, 23, 42, 0.08), 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(rgba(100, 116, 139, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, #f8fafc 0%, #eef6fb 100%);
  background-size: 22px 22px, auto;
  color: var(--ink);
  font-family: Nunito, ui-rounded, "Arial Rounded MT Bold", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

section[id] {
  scroll-margin-top: 92px;
}

.mining-panel {
  scroll-margin-top: 92px;
}

.chain-scroll,
.address-explorer {
  scroll-margin-top: 92px;
}

code,
pre {
  font-family: "JetBrains Mono", "Fira Code", Consolas, "SF Mono", monospace;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.brand strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.topnav a {
  border: 2px solid transparent;
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  padding: 8px 12px;
}

.topnav a:hover {
  border-color: var(--line);
  color: var(--green-dark);
  background: #fff;
}

.cert-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 14px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 3px 0 #d8e2ec;
}

.spark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.16);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.panel {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 2px solid rgba(88, 204, 2, 0.26);
  border-radius: 999px;
  background: rgba(88, 204, 2, 0.1);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 16ch;
  margin-top: 18px;
  color: #0f172a;
  font-size: clamp(38px, 5.4vw, 58px);
  font-weight: 1000;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 62ch;
  margin-top: 22px;
  color: #475569;
  font-size: 17px;
}

.hero-actions,
.mine-actions,
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 11px 18px;
  font-weight: 1000;
  letter-spacing: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:active {
  transform: translateY(3px);
}

.btn.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--green-dark), 0 10px 18px rgba(88, 204, 2, 0.18);
}

.btn.primary:hover {
  filter: brightness(1.04);
}

.btn.primary:active {
  box-shadow: 0 1px 0 var(--green-dark);
}

.btn.secondary {
  border-color: var(--line);
  background: #fff;
  color: #334155;
  box-shadow: 0 4px 0 #c8d6e0;
}

.btn.secondary:active {
  box-shadow: 0 1px 0 #c8d6e0;
}

.btn.warning {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 0 var(--red-dark), 0 10px 18px rgba(255, 75, 75, 0.14);
}

.btn.warning:active {
  box-shadow: 0 1px 0 var(--red-dark);
}

.btn[disabled] {
  cursor: wait;
  filter: grayscale(0.24);
  opacity: 0.72;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.lesson-badge {
  border: 2px solid #bbf7d0;
  border-radius: 20px;
  background: #f0fdf4;
  box-shadow: 0 4px 0 #bbf7d0;
  padding: 18px;
}

.lesson-badge span,
.difficulty-card > div > span,
.hash-strip span,
.mempool-head p,
.panel-title p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lesson-badge strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 1000;
  line-height: 1.15;
}

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

.metric-grid article {
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.metric-grid strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 1000;
  line-height: 1;
}

.metric-grid .status-ok {
  color: var(--green-dark);
}

.metric-grid .status-bad {
  color: var(--red-dark);
}

.hash-strip {
  min-width: 0;
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}

.hash-strip code {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 24px;
}

.panel {
  padding: 22px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-title h2 {
  color: #0f172a;
  font-size: 28px;
  font-weight: 1000;
  line-height: 1;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 4px 0 var(--green-dark);
}

.step-dot.blue {
  background: var(--blue);
  box-shadow: 0 4px 0 var(--blue-dark);
}

.step-dot.purple {
  background: var(--purple);
  box-shadow: 0 4px 0 var(--purple-dark);
}

.step-dot.orange {
  background: #f97316;
  box-shadow: 0 4px 0 #c2410c;
}

.step-dot.teal {
  background: #14b8a6;
  box-shadow: 0 4px 0 #0f766e;
}

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

.tx-form label {
  min-width: 0;
}

.tx-form label span {
  display: block;
  margin: 0 0 6px 4px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.tx-form input {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  padding: 9px 12px;
  outline: none;
}

.tx-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.14);
}

.form-submit {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
}

.preset-row {
  margin-top: 14px;
}

.preset-row button,
.tiny-action {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  padding: 7px 11px;
}

.preset-row button:hover,
.tiny-action:hover {
  border-color: #bbf7d0;
  color: var(--green-dark);
}

.tiny-action.danger {
  border-color: #fecaca;
  color: var(--red-dark);
}

.tiny-action.danger:hover {
  border-color: #f87171;
  background: #fef2f2;
  color: var(--red-dark);
}

.mempool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.mempool-head strong {
  display: block;
  font-size: 18px;
  font-weight: 1000;
}

.mempool-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 196px;
}

.tx-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 12px;
}

.tx-token {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #dff7d0;
  color: var(--green-dark);
  font-weight: 1000;
}

.tx-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 14px;
  font-weight: 1000;
}

.tx-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fee-pill {
  border: 2px solid #fde68a;
  border-radius: 999px;
  background: #fff7d8;
  color: #a16207;
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 8px;
  white-space: nowrap;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 156px;
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
  padding: 20px;
}

.difficulty-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 16px;
  align-items: center;
  border: 2px solid #bfdbfe;
  border-radius: 20px;
  background: #eff6ff;
  box-shadow: 0 4px 0 #bfdbfe;
  padding: 16px;
}

.difficulty-card strong {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1.15;
  white-space: nowrap;
}

.difficulty-card strong span {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.process-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.process-step {
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}

.process-step span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 1000;
}

.process-step strong {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 1000;
}

.process-step small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.process-step.done,
.process-step.active {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.process-step.done span,
.process-step.active span {
  background: var(--green);
  color: #fff;
}

.process-step.active {
  box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.1);
}

.mining-console {
  overflow: hidden;
  margin-top: 18px;
  border: 2px solid #172033;
  border-radius: 20px;
  background: #172033;
  box-shadow: 0 4px 0 #0b1020;
}

.console-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #202b42;
}

.console-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-head span:nth-child(1) {
  background: #ff5f57;
}

.console-head span:nth-child(2) {
  background: #ffbd2e;
}

.console-head span:nth-child(3) {
  background: #28c840;
}

.console-head strong {
  margin-left: 6px;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}

.mining-console pre {
  overflow: auto;
  min-height: 176px;
  max-height: 220px;
  margin: 0;
  color: #86efac;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  padding: 16px;
}

.mine-actions {
  margin-top: 18px;
}

.visual-panel {
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)) padding-box,
    linear-gradient(135deg, rgba(88, 204, 2, 0.48), rgba(28, 176, 246, 0.42), rgba(15, 23, 42, 0.14)) border-box;
}

.visual-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(28, 176, 246, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(88, 204, 2, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 47%, rgba(28, 176, 246, 0.08) 47% 48%, transparent 48% 100%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
  opacity: 0.78;
}

.visual-panel > * {
  position: relative;
  z-index: 1;
}

.visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  border: 2px solid #bae6fd;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(239, 246, 255, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(28, 176, 246, 0.07) 18px 19px);
  box-shadow: 0 4px 0 #bae6fd, 0 18px 36px rgba(28, 176, 246, 0.08);
  padding: 14px 16px;
}

.visual-toolbar span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.visual-toolbar strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 1000;
}

.visual-toolbar .btn {
  white-space: nowrap;
}

.visual-flow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 26px minmax(120px, 1fr) 26px minmax(120px, 1fr) 26px minmax(120px, 1fr) 26px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.visual-step {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fff, #f8fafc) padding-box,
    linear-gradient(135deg, #e2e8f0, #edf2f7) border-box;
  padding: 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.visual-step::after,
.concept-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 34%, rgba(28,176,246,0.12) 44%, rgba(88,204,2,0.10) 50%, transparent 62% 100%);
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.visual-step.active {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #f7fff2);
  box-shadow: 0 4px 0 #bbf7d0, 0 14px 26px rgba(88, 204, 2, 0.10);
  transform: translateY(-2px);
}

.visual-step.done {
  border-color: #dbeafe;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  box-shadow: 0 3px 0 #dbeafe;
}

.visual-step span,
.concept-card span,
.mini-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.concept-card span {
  padding-right: 34px;
}

.visual-step strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
}

.visual-step small {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.visual-arrow {
  color: #94a3b8;
  font-size: 22px;
  font-weight: 1000;
  text-align: center;
  transition: color 0.18s ease, transform 0.18s ease;
}

.visual-arrow.done {
  color: var(--green);
  transform: scale(1.12);
}

.visual-packet {
  position: absolute;
  left: 8%;
  top: -9px;
  z-index: 5;
  width: 34px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: linear-gradient(90deg, #58cc02, #1cb0f6);
  box-shadow: 0 0 0 3px rgba(28, 176, 246, 0.12), 0 10px 22px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateX(-50%);
  transition: left 0.42s cubic-bezier(0.22, 0.76, 0.28, 1), top 0.42s cubic-bezier(0.22, 0.76, 0.28, 1), opacity 0.18s ease;
}

.visual-packet::before {
  content: "";
  position: absolute;
  inset: 3px 6px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.55);
}

.visual-packet::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(28, 176, 246, 0.42), rgba(88, 204, 2, 0.55));
  transform: translateY(-50%);
}

.visual-flow[data-stage] .visual-packet {
  opacity: 1;
}

.visual-flow[data-stage="tx"] .visual-packet { left: 8%; }
.visual-flow[data-stage="mempool"] .visual-packet { left: 29%; }
.visual-flow[data-stage="block"] .visual-packet { left: 50%; }
.visual-flow[data-stage="consensus"] .visual-packet { left: 71%; }
.visual-flow[data-stage="finality"] .visual-packet { left: 92%; }

.concept-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  counter-reset: concept;
}

.concept-card {
  counter-increment: concept;
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff) padding-box,
    linear-gradient(135deg, rgba(226,232,240,0.8), rgba(226,232,240,0.1)) border-box;
  box-shadow: 0 2px 0 #dbeafe;
  min-height: 118px;
  padding: 13px 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.concept-card::before {
  content: counter(concept, decimal-leading-zero);
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 1000;
  opacity: 1;
}

.concept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 #dbeafe, 0 14px 26px rgba(15, 23, 42, 0.07);
}

.concept-card.active {
  border-color: #bbf7d0;
  background:
    linear-gradient(180deg, #f7fff2, #ffffff),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(88, 204, 2, 0.05) 18px 19px);
  box-shadow: 0 3px 0 #bbf7d0, 0 12px 24px rgba(88, 204, 2, 0.10);
}

.concept-card.active::before {
  background: #dcfce7;
  color: var(--green-dark);
}

.concept-card strong {
  display: block;
  margin-top: 8px;
  padding-right: 34px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 1000;
}

.concept-card p {
  margin-top: 7px;
  margin-bottom: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.mini-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mini-title strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 1000;
  text-align: right;
}

.mini-title > div {
  min-width: 0;
}

.mini-title > div strong {
  display: block;
  margin-top: 2px;
  text-align: left;
}

.module-jump {
  flex: 0 0 auto;
  border: 2px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #174a7c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1000;
  padding: 7px 10px;
  white-space: nowrap;
}

.module-jump:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.tx-lifecycle,
.pow-visual,
.stake-visual,
.block-anatomy,
.finality-timeline,
.bubble-tool,
.address-explorer {
  margin-top: 16px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
    linear-gradient(90deg, rgba(28, 176, 246, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(88, 204, 2, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  padding: 14px;
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.journey-item {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px;
}

.journey-item.done,
.journey-item.active {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.journey-item.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 36%, rgba(28,176,246,0.13) 48%, rgba(88,204,2,0.12) 54%, transparent 66% 100%);
  animation: surfaceSweep 1.45s cubic-bezier(0.22, 0.76, 0.28, 1) 2;
  transform: translateX(-110%);
}

.journey-item span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 1000;
}

.journey-item.active span,
.journey-item.done span {
  background: var(--green);
  color: #fff;
}

.journey-item strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
}

.journey-item small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.hash-target {
  display: grid;
  grid-template-columns: minmax(144px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.target-rule,
.pow-match,
.hash-readout,
.nonce-dial {
  min-width: 0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px;
}

.target-rule > span,
.pow-window span,
.hash-readout span,
.nonce-dial span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.target-rule code,
.target-rule strong,
.pow-window strong,
.hash-readout code,
.nonce-dial strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-rule small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.pow-rule strong {
  color: var(--green-dark);
  font-size: 15px;
}

.pow-match {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(180deg, #ffffff, #f8fbff),
    linear-gradient(90deg, rgba(28, 176, 246, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}

.pow-match[data-valid="true"] {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f7fff2, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(88, 204, 2, 0.12);
}

.pow-window {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pow-window strong {
  color: #0f172a;
  font-size: 12px;
  text-align: right;
}

.pow-match[data-valid="true"] .pow-window strong {
  color: var(--green-dark);
}

.pow-slots {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
}

.hash-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 2px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 3px 0 #dbeafe;
}

.hash-slot i {
  position: absolute;
  left: 7px;
  top: 5px;
  color: #94a3b8;
  font-size: 9px;
  font-style: normal;
  font-weight: 1000;
}

.hash-slot strong {
  font-family: "JetBrains Mono", "Fira Code", Consolas, "SF Mono", monospace;
  font-size: 22px;
  font-weight: 1000;
}

.hash-slot.required {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.hash-slot.hit {
  border-color: #86efac;
  background: #f0fdf4;
  color: var(--green-dark);
  box-shadow: 0 3px 0 #86efac, 0 0 18px rgba(88, 204, 2, 0.16);
}

.hash-slot.miss {
  border-color: #fecaca;
  background: #fff7f7;
  color: var(--red-dark);
  box-shadow: 0 3px 0 #fecaca;
}

.visual-mining .hash-slot.required,
.visual-demo .hash-slot.required,
.visual-hash .hash-slot.required {
  animation: slotCheck 0.92s cubic-bezier(0.22, 0.76, 0.28, 1) both;
  animation-delay: calc(var(--slot-delay, 0) * 80ms);
}

.hash-readout {
  grid-column: 1 / -1;
}

.nonce-dial {
  grid-column: 1 / -1;
}

.network-map {
  position: relative;
  min-height: 230px;
  margin-bottom: 14px;
  border: 2px solid #dbeafe;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.98)),
    linear-gradient(90deg, rgba(28, 176, 246, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(88, 204, 2, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72);
  overflow: hidden;
}

.network-map::before,
.network-map::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.network-map::before {
  left: 28px;
  top: 28px;
  width: 104px;
  height: 28px;
  border-left: 3px solid rgba(28, 176, 246, 0.28);
  border-top: 3px solid rgba(28, 176, 246, 0.28);
  border-radius: 14px 0 0 0;
  opacity: 1;
}

.network-map::after {
  right: 28px;
  bottom: 28px;
  width: 104px;
  height: 28px;
  border-right: 3px solid rgba(88, 204, 2, 0.22);
  border-bottom: 3px solid rgba(88, 204, 2, 0.22);
  border-radius: 0 0 14px 0;
  opacity: 1;
}

.network-links {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.network-link {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  transition: stroke 0.18s ease, stroke-width 0.18s ease, opacity 0.18s ease;
}

.network-link.offline {
  stroke: #fecaca;
  opacity: 0.42;
}

.network-link.forked {
  stroke: #fbbf24;
  stroke-dasharray: 6 8;
}

.network-link.selected {
  stroke: #1cb0f6;
  stroke-width: 7;
}

.network-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 118px;
  height: 76px;
  border: 2px solid #93c5fd;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #eff6ff),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(28, 176, 246, 0.08) 12px 13px);
  color: #0f5d8f;
  text-align: center;
  font-weight: 1000;
  box-shadow: 0 4px 0 #bfdbfe, 0 18px 34px rgba(28, 176, 246, 0.14);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.network-core span {
  color: #475569;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.04em;
}

.network-core strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 1000;
}

.network-node {
  position: absolute;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 8px;
  width: 116px;
  min-height: 58px;
  border: 2px solid #bae6fd;
  border-radius: 18px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 1000;
  padding: 9px 10px 9px 26px;
  box-shadow: 0 4px 0 #dbeafe;
  z-index: 3;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.network-node::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.13);
}

.network-node span,
.network-node strong,
.network-node small {
  display: block;
  min-width: 0;
  grid-column: 1 / -1;
}

.network-node span {
  color: #475569;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.network-node strong {
  margin-top: 2px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
}

.network-node small {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.network-node.offline {
  border-color: #fecaca;
  background: #fff7f7;
  color: var(--red-dark);
}

.network-node.offline::before {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.12);
}

.network-node.forked {
  border-color: #fde68a;
  background: #fffbea;
  color: #a16207;
}

.network-node.forked::before {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 217, 0, 0.18);
}

.network-node.selected {
  border-color: #7dd3fc;
  box-shadow: 0 4px 0 #bae6fd, 0 0 0 4px rgba(28, 176, 246, 0.14);
}

.network-node.alpha { left: 7%; top: 18%; }
.network-node.beta { right: 7%; top: 18%; }
.network-node.gamma { left: 7%; bottom: 18%; }
.network-node.delta { right: 7%; bottom: 18%; }

.network-edge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  height: 4px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, #cbd5e1 0 10px, rgba(203, 213, 225, 0.35) 10px 16px);
  transform-origin: left center;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.edge-a { transform: rotate(206deg); }
.edge-b { transform: rotate(334deg); }
.edge-c { transform: rotate(146deg); }
.edge-d { transform: rotate(28deg); }

.visual-broadcast .network-map .network-edge,
.visual-demo .network-map .network-edge {
  background: linear-gradient(90deg, #cbd5e1 0%, #58cc02 38%, #1cb0f6 50%, #cbd5e1 64%);
  background-size: 220% 100%;
  box-shadow: 0 0 18px rgba(88, 204, 2, 0.34);
  animation: edgeFlow 1.55s linear 2;
}

.visual-broadcast .network-map .network-link,
.visual-demo .network-map .network-link {
  stroke: #58cc02;
  animation: edgeFlow 1.4s linear 2;
}

.visual-broadcast .network-map::before,
.visual-demo .network-map::before {
  animation: cornerPulse 1.65s cubic-bezier(0.22, 0.76, 0.28, 1) 2;
  opacity: 1;
}

.visual-broadcast .network-map::after,
.visual-demo .network-map::after {
  animation: cornerPulse 1.65s cubic-bezier(0.22, 0.76, 0.28, 1) 2;
  opacity: 1;
}

.visual-broadcast .network-node.online,
.visual-demo .network-node.online {
  box-shadow: 0 0 0 5px rgba(88, 204, 2, 0.12), 0 10px 22px rgba(88, 204, 2, 0.14);
}

.visual-pos .network-node.selected,
.visual-demo .network-node.selected {
  animation: validatorPick 1.12s ease-in-out 3;
}

.visual-fork .network-node.forked,
.visual-demo .network-node.forked {
  animation: forkGlow 1.05s ease-in-out 2;
}

.stake-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stake-bar {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.stake-bar span,
.stake-bar strong {
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
}

.stake-bar-track {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #e2e8f0, #f8fafc),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(15, 23, 42, 0.06) 10px 11px);
  overflow: hidden;
}

.stake-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #60d4ff);
  transform-origin: left center;
  transition: width 0.42s cubic-bezier(0.22, 0.76, 0.28, 1);
}

.stake-bar.selected .stake-bar-fill {
  background: linear-gradient(90deg, var(--green), #9ff35c);
  box-shadow: 0 0 14px rgba(88, 204, 2, 0.32);
}

.visual-pos .stake-bar-fill,
.visual-demo .stake-bar-fill {
  animation: stakeSweep 1.15s ease-in-out 2;
}

.chain-visuals {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 14px;
  margin-top: 14px;
}

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

.anatomy-part {
  min-height: 86px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}

.anatomy-part.head {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.anatomy-part.body {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.anatomy-part.seal {
  border-color: #e9d5ff;
  background: #faf5ff;
}

.anatomy-part span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.anatomy-part strong {
  display: block;
  margin-top: 7px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.35;
}

.timeline-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.timeline-block {
  min-height: 86px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px;
}

.timeline-block.final {
  border-color: #bbf7d0;
  background: #f0fdf4;
  box-shadow: 0 3px 0 #bbf7d0;
}

.timeline-block.tip {
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: 0 3px 0 #bfdbfe;
}

.visual-finality .timeline-block.final,
.visual-demo .timeline-block.final {
  animation: finalityGlow 1.2s ease-in-out 2;
}

.visual-repair .block-card.valid,
.visual-demo .block-card.valid {
  animation: finalityGlow 1.2s ease-in-out 2;
}

.visual-tamper .block-card.invalid {
  animation: forkGlow 0.82s ease-in-out 2;
}

.timeline-block span {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 1000;
}

.timeline-block small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.bubble-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 116px;
  overflow-x: auto;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    linear-gradient(90deg, rgba(28, 176, 246, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
  padding: 14px;
}

.bubble-node {
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  min-width: var(--size);
  border: 2px solid #bfdbfe;
  border-radius: 50%;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #0f172a;
  box-shadow: 0 4px 0 #bfdbfe, 0 14px 24px rgba(28, 176, 246, 0.10);
  cursor: default;
  padding: 8px;
}

.bubble-node span,
.bubble-node strong,
.bubble-node small {
  display: block;
  line-height: 1;
}

.bubble-node span {
  font-size: 12px;
  font-weight: 1000;
}

.bubble-node strong {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 1000;
}

.bubble-node small {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.bubble-node.final {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4, #bbf7d0);
  box-shadow: 0 4px 0 #86efac, 0 14px 24px rgba(88, 204, 2, 0.10);
}

.bubble-node.tip {
  outline: 4px solid rgba(28, 176, 246, 0.14);
}

.bubble-node.invalid {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7f7, #fee2e2);
  color: var(--red-dark);
  box-shadow: 0 4px 0 #fecaca;
}

.visual-finality .bubble-node.final,
.visual-demo .bubble-node.final {
  animation: finalityGlow 1.2s ease-in-out 2;
}

.bubble-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.bubble-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bubble-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #bfdbfe;
}

.bubble-legend i.final { background: var(--green); }
.bubble-legend i.tip { background: var(--blue); }
.bubble-legend i.invalid { background: var(--red); }

.address-explorer {
  display: grid;
  gap: 12px;
}

.address-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.address-query-row input {
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  outline: none;
  padding: 0 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.address-query-row input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(28, 176, 246, 0.14);
}

.address-result {
  display: grid;
  gap: 10px;
}

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

.address-stat {
  min-width: 0;
  border: 2px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 3px 0 #dbeafe;
  padding: 12px;
}

.address-stat span,
.address-identity span,
.address-events-title,
.address-table-head {
  color: #4f6d90;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.address-stat strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1.15;
}

.address-detail {
  display: grid;
  gap: 12px;
}

.address-identity {
  border: 2px solid #bbf7d0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  box-shadow: 0 3px 0 #bbf7d0;
  padding: 13px 14px;
}

.address-identity strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 20px;
  font-weight: 1000;
}

.address-identity small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.address-table {
  overflow: hidden;
  border: 2px solid #dbeafe;
  border-radius: 18px;
  background: #fff;
}

.address-table-head,
.address-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px minmax(120px, 0.8fr);
  gap: 12px;
  align-items: center;
}

.address-table-head {
  background: #eff6ff;
  padding: 10px 14px;
}

.address-row {
  width: 100%;
  border: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  padding: 12px 14px;
  text-align: left;
}

.address-row:hover {
  background: #f8fbff;
}

.address-row span strong,
.address-row b {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 1000;
}

.address-row span small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.address-row i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.address-row i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.address-events {
  display: grid;
  gap: 8px;
  border: 2px solid #dbeafe;
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}

.address-event {
  display: grid;
  grid-template-columns: 58px 110px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px;
}

.address-event span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #dcfce7;
  color: #187a00;
  font-size: 12px;
  font-weight: 1000;
}

.address-event.out span {
  background: #fee2e2;
  color: #b91c1c;
}

.address-event strong,
.address-event small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.address-event strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 1000;
}

.address-event small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.address-empty {
  border: 2px dashed #bfdbfe;
  border-radius: 18px;
  background: #f8fbff;
  padding: 14px;
}

.address-empty.compact {
  border-style: solid;
}

.address-empty strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 1000;
}

.address-empty p {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.address-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.address-chip {
  border: 2px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1000;
  padding: 8px 10px;
}

.address-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.consensus-panel {
  margin-top: 24px;
}

.consensus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

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

.section-head p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-head h3 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.1;
}

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

.node-card {
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 0 #d8e2ec;
  padding: 14px;
}

.node-card.online {
  border-color: #bbf7d0;
  background: #fbfffb;
  box-shadow: 0 4px 0 #bbf7d0;
}

.node-card.offline {
  border-color: #fecaca;
  background: #fff7f7;
  box-shadow: 0 4px 0 #fecaca;
}

.node-card.forked {
  border-color: #fde68a;
  background: #fffbea;
  box-shadow: 0 4px 0 #fde68a;
}

.node-card.selected {
  outline: 4px solid rgba(28, 176, 246, 0.16);
}

.node-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.node-head span {
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dff7d0;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 1000;
  padding: 0 8px;
}

.node-card.offline .node-head span {
  background: #fee2e2;
  color: var(--red-dark);
}

.node-card.forked .node-head span {
  background: #fef3c7;
  color: #a16207;
}

.node-head strong {
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.15;
}

.node-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.node-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 7px;
}

.node-tip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.node-tip div {
  min-width: 0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 7px;
}

.node-tip small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.node-tip strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-card code {
  display: block;
  overflow: hidden;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-toggle {
  width: 100%;
  margin-top: 10px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  padding: 8px 10px;
  box-shadow: 0 3px 0 #d8e2ec;
}

.node-card.online .node-toggle:hover {
  border-color: #fecaca;
  color: var(--red-dark);
}

.node-card.offline .node-toggle:hover {
  border-color: #bbf7d0;
  color: var(--green-dark);
}

.consensus-lab {
  min-width: 0;
}

.consensus-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.consensus-cards article {
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 14px;
}

.consensus-cards span,
.fork-lane span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.consensus-cards strong,
.fork-lane strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1.15;
}

.consensus-cards small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.consensus-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.consensus-actions .btn {
  min-height: 44px;
  padding-inline: 10px;
}

.fork-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.fork-lane {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.fork-lane::before {
  content: "";
  position: absolute;
  inset: auto 14px 12px 14px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.24;
}

.fork-lane.main {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: var(--green-dark);
}

.fork-lane.alt {
  background: #fffbea;
  border-color: #fde68a;
  color: #a16207;
}

.visual-fork .fork-lane.alt,
.visual-demo .fork-lane.alt {
  animation: forkGlow 1s ease-in-out 2;
}

.visual-finality .fork-lane.main,
.visual-demo .fork-lane.main {
  animation: finalityGlow 1.2s ease-in-out 2;
}

.consensus-note {
  margin-top: 14px;
}

.chain-panel {
  margin-top: 24px;
}

.chain-title-row {
  margin-bottom: 14px;
}

.chain-status {
  margin-left: auto;
  border: 2px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 1000;
  padding: 7px 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.chain-status.bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--red-dark);
}

.learning-note {
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 16px;
}

.chain-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 20px 4px 8px;
}

.block-card {
  position: relative;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 0 #d8e2ec;
  padding: 16px;
}

.block-card.valid {
  border-color: #bbf7d0;
  box-shadow: 0 4px 0 #bbf7d0;
}

.block-card.invalid {
  border-color: #fecaca;
  background: #fff7f7;
  box-shadow: 0 4px 0 #fecaca;
}

.block-card::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -19px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  font-weight: 1000;
  transform: translateY(-50%);
}

.block-card:last-child::after {
  display: none;
}

.block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.block-head h3 {
  font-size: 18px;
  font-weight: 1000;
}

.block-head span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 1000;
  padding: 5px 8px;
  white-space: nowrap;
}

.block-head span.badge-bad {
  background: #fee2e2;
  color: var(--red-dark);
}

.block-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.block-meta div {
  min-width: 0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 9px;
}

.block-meta span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.block-meta code,
.block-meta strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #172033;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-tx {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.block-tx p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.block-tx ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.block-tx li {
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
}

.block-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.block-actions .tiny-action {
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  max-width: min(420px, calc(100% - 32px));
  border-radius: 18px;
  background: #172033;
  color: #fff;
  font-weight: 900;
  padding: 12px 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.visual-tx .visual-step::after,
.visual-demo .visual-step::after,
.visual-broadcast .visual-step::after,
.visual-finality .visual-step::after {
  animation: surfaceSweep 1.65s cubic-bezier(0.22, 0.76, 0.28, 1) 2;
  opacity: 1;
}

.visual-mining .pow-visual,
.visual-hash .pow-visual,
.visual-demo .pow-visual {
  border-color: #bfdbfe;
  box-shadow: 0 4px 0 #bfdbfe, 0 14px 28px rgba(28, 176, 246, 0.12);
}

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

@keyframes slotCheck {
  0% { transform: translateY(0); filter: brightness(1); }
  38% { transform: translateY(-4px); filter: brightness(1.12); }
  100% { transform: translateY(0); filter: brightness(1); }
}

@keyframes networkSweepX {
  0% { opacity: 0; transform: translateX(-100%); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes networkSweepY {
  0% { opacity: 0; transform: translateY(-100%); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(100%); }
}

@keyframes edgeFlow {
  from { stroke-dashoffset: 44; }
  to { stroke-dashoffset: 0; }
}

@keyframes cornerPulse {
  0%, 100% { opacity: 0.36; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.18); }
}

@keyframes validatorPick {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28, 176, 246, 0.0); filter: brightness(1); }
  50% { box-shadow: 0 0 0 6px rgba(28, 176, 246, 0.18); filter: brightness(1.08); }
}

@keyframes stakeSweep {
  0%, 100% { filter: brightness(1); transform: scaleX(0.98); }
  50% { filter: brightness(1.14); transform: scaleX(1); }
}

@keyframes forkGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(253, 230, 138, 0); }
  50% { box-shadow: 0 0 0 5px rgba(253, 230, 138, 0.30); }
}

@keyframes finalityGlow {
  0%, 100% { box-shadow: 0 4px 0 rgba(187, 247, 208, 0.9); }
  50% { box-shadow: 0 4px 0 rgba(187, 247, 208, 0.9), 0 0 0 6px rgba(88, 204, 2, 0.12); }
}

@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) {
  .topnav {
    display: none;
  }

  .hero,
  .module-layout,
  .consensus-layout,
  .chain-visuals {
    grid-template-columns: 1fr;
  }

  .visual-flow {
    grid-template-columns: 1fr;
  }

  .visual-packet {
    left: 50%;
    top: 20px;
    width: 14px;
    height: 34px;
    transform: translateX(-50%);
  }

  .visual-packet::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 100%;
    width: 2px;
    height: 54px;
    background: linear-gradient(180deg, transparent, rgba(28, 176, 246, 0.42), rgba(88, 204, 2, 0.55));
    transform: translateX(-50%);
  }

  .visual-flow[data-stage="tx"] .visual-packet { top: 20px; left: 50%; }
  .visual-flow[data-stage="mempool"] .visual-packet { top: 23%; left: 50%; }
  .visual-flow[data-stage="block"] .visual-packet { top: 45%; left: 50%; }
  .visual-flow[data-stage="consensus"] .visual-packet { top: 67%; left: 50%; }
  .visual-flow[data-stage="finality"] .visual-packet { top: 89%; left: 50%; }

  .visual-arrow {
    transform: rotate(90deg);
  }

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

  .address-summary-grid,
  .address-table-head,
  .address-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-table-head span:last-child,
  .address-row i {
    grid-column: 1 / -1;
  }

  h1 {
    max-width: 13ch;
  }
}

@media (max-width: 700px) {
  .topbar {
    gap: 10px;
    padding-inline: 14px;
  }

  .brand small,
  .cert-pill {
    display: none;
  }

  main {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    border-radius: 20px;
    padding: 18px;
  }

  .visual-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .visual-toolbar .btn {
    width: 100%;
  }

  .visual-toolbar strong {
    text-align: left;
  }

  .address-query-row,
  .address-summary-grid,
  .address-table-head,
  .address-row,
  .address-event,
  .block-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(32px, 10.4vw, 42px);
  }

  .hero-copy p {
    font-size: 15px;
  }

  .metric-grid,
  .tx-form,
  .difficulty-card,
  .process-track,
  .journey-track,
  .hash-target,
  .node-grid,
  .consensus-actions,
  .fork-board,
  .anatomy-grid,
  .timeline-track,
  .concept-grid {
    grid-template-columns: 1fr;
  }

  .network-map {
    min-height: 300px;
  }

  .network-node.alpha { left: 50%; top: 22px; transform: translateX(-50%); }
  .network-node.beta { right: 20px; top: 50%; transform: translateY(-50%); }
  .network-node.gamma { left: 50%; bottom: 22px; transform: translateX(-50%); }
  .network-node.delta { left: 20px; bottom: auto; top: 50%; transform: translateY(-50%); }

  .network-edge {
    width: 32%;
  }

  .pow-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .panel-title h2 {
    font-size: 24px;
  }

  .tx-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .fee-pill {
    grid-column: 2;
    width: fit-content;
  }

  .chain-title-row {
    align-items: flex-start;
  }

  .chain-status {
    margin-left: 0;
  }

  .mine-actions .btn,
  .hero-actions .btn {
    width: 100%;
  }
}
