:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card: #111827;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --accent-strong: rgba(34, 197, 94, 0.2);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --danger: #f97373;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #111827, #020617 50%, #000 100%);
  color: var(--text);
}

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

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

pre {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.85),
    rgba(15, 23, 42, 0.65),
    transparent
  );
  border-bottom: 1px solid rgba(30, 64, 175, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #f9fafb;
}

.logo-mark {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #bef264, #22c55e 60%, #16a34a);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3), 0 0 20px rgba(34, 197, 94, 0.7);
  font-size: 1.1rem;
}

.logo-text {
  letter-spacing: 0.03em;
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a {
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav a:hover {
  color: #e5e7eb;
  background-color: rgba(31, 41, 55, 0.9);
}

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(to right, #22c55e, #4ade80);
  color: #022c22;
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.45);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.6);
}

.btn.ghost {
  background-color: rgba(15, 23, 42, 0.95);
  border-color: rgba(55, 65, 81, 0.9);
  color: var(--muted);
}

.btn.ghost:hover {
  border-color: rgba(148, 163, 184, 0.85);
  color: #e5e7eb;
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-highlights li::before {
  content: "• ";
  color: var(--accent);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.meter-card {
  width: 100%;
  max-width: 340px;
  background: radial-gradient(circle at top, #020617, #020617 55%, #020617);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.1rem 0.95rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.meter-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 0 0,
    rgba(34, 197, 94, 0.25),
    transparent 60%
  );
  opacity: 0.8;
  pointer-events: none;
}

.meter-header,
.meter-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meter-header {
  margin-bottom: 0.75rem;
}

.meter-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.meter-tag {
  font-size: 0.75rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(75, 85, 99, 0.9);
  color: var(--muted);
}

.meter-body {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #020617, #020617);
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 0.7rem;
  align-items: center;
}

.meter-figure {
  margin: 0;
  padding: 0;
}

.meter-image {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
}

.meter-readout {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  color: #e5e7eb;
}

.meter-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.22rem;
}

.meter-row .label {
  color: var(--muted);
}

.meter-row .value {
  color: #e5e7eb;
}

.meter-footer {
  margin-top: 0.6rem;
  gap: 0.4rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background-color: rgba(15, 23, 42, 0.95);
}

.badge.secondary {
  border-color: rgba(59, 130, 246, 0.9);
  background: linear-gradient(
    to right,
    rgba(37, 99, 235, 0.16),
    rgba(129, 140, 248, 0.1)
  );
}

.section {
  padding: 2.5rem 0;
}

.section.alt {
  background: radial-gradient(circle at top, #020617, #020617 50%, #020617);
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
}

.section h2 {
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
}

.section-lead {
  margin: 0 0 1.6rem;
  color: var(--muted);
  max-width: 46rem;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 1.3rem;
}

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

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

.card {
  background-color: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 0.9rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.ascii-diagram {
  margin-top: 1rem;
  background-color: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
  color: var(--muted);
  overflow-x: auto;
  font-size: 0.82rem;
}

.protocol-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.protocol-flow h3 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
}

.protocol-flow pre {
  background-color: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
  color: var(--muted);
  font-size: 0.8rem;
  overflow-x: auto;
}

.downloads-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lp-chart {
  margin-top: 1rem;
  background-color: #020617;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  padding: 0.9rem 1rem 0.8rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.lp-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.lp-chart-total {
  font-size: 0.8rem;
  color: #a5b4fc;
}

.lp-chart-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lp-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.lp-row-faded {
  opacity: 0.7;
}

.lp-time {
  color: var(--muted);
}

.lp-bar-wrapper {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(55, 65, 81, 0.9);
  border-radius: 999px;
  overflow: hidden;
  height: 14px;
}

.lp-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, #22c55e, #a3e635);
  box-shadow: 0 0 10px rgba(190, 242, 100, 0.9);
}

.lp-value {
  text-align: right;
  color: #e5e7eb;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.download-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background-color: rgba(15, 23, 42, 0.95);
  color: var(--muted);
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.1s ease;
}

.btn-link.primary-link {
  border-color: rgba(37, 99, 235, 0.9);
  background: linear-gradient(
    to right,
    rgba(37, 99, 235, 0.16),
    rgba(129, 140, 248, 0.1)
  );
  color: #e5e7eb;
}

.btn-link:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.85);
  color: #e5e7eb;
}

.download-note {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.architecture-visual {
  margin-top: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  padding: 0.8rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

.architecture-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 6px);
}

.sequence-diagram-wrap {
  margin-top: 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background: rgba(15, 23, 42, 0.6);
  padding: 0.6rem;
  overflow: hidden;
}

.sequence-diagram-img {
  display: block;
  width: 60%;
  max-width: 420px;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding: 1.1rem 0 1.4rem;
  background-color: rgba(2, 6, 23, 0.98);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-meta {
  opacity: 0.8;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }

  .meter-card {
    max-width: 320px;
  }

  .protocol-flow {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 720px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

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

  .section {
    padding: 2rem 0;
  }
}

