:root {
  --bg-base: #0b0f14;
  --bg-surface: #111820;
  --bg-surface-hover: #151e29;
  --bg-well: #080b0f;
  --border-subtle: #1f2937;
  --border-strong: #2d3a4b;
  --text-primary: #e6edf3;
  --text-secondary: #9aa7b8;
  --text-muted: #6b7a8d;
  --accent-emerald: #34d399;
  --accent-emerald-dim: rgba(52, 211, 153, 0.11);
  --accent-emerald-border: rgba(52, 211, 153, 0.32);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.10);
  --accent-amber-border: rgba(245, 158, 11, 0.34);
  --accent-danger: #f87171;
  --accent-danger-dim: rgba(248, 113, 113, 0.10);
  --accent-danger-border: rgba(248, 113, 113, 0.38);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", ui-monospace, Consolas, Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container-max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: var(--accent-emerald);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: #6ee7b7;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 14px;
  background: var(--accent-emerald);
  color: #06120e;
  font-weight: 600;
  z-index: 200;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

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

.lang-toggle.lang-mobile {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text-primary);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-emerald-dim);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a.nav-tip {
  color: var(--accent-amber);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-amber-border);
  background: var(--accent-amber-dim);
}

.site-nav a.nav-tip:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-well);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.lang-btn:hover:not([aria-pressed="true"]) {
  color: var(--text-secondary);
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(52, 211, 153, 0.07), transparent 52%),
    linear-gradient(to bottom, transparent 45%, var(--bg-base) 100%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-dim);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-sub {
  margin: 0 0 20px;
  max-width: 740px;
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.philosophy-quote {
  margin: 0 0 26px;
  max-width: 760px;
  padding: 12px 16px;
  border-left: 2px solid var(--accent-emerald);
  background: rgba(17, 24, 32, 0.78);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
}

.pill-link:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.pill-link.primary {
  border-color: var(--accent-emerald-border);
  background: var(--accent-emerald-dim);
  color: var(--accent-emerald);
}

.pill-link.primary:hover {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}

.pill-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.88;
}

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

.proof-cell {
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  min-width: 0;
}

.proof-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
}

.proof-value.emerald {
  color: var(--accent-emerald);
}

.proof-label {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Sections */
.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
  margin-bottom: 6px;
}

.section h2 {
  margin: 0;
  font-size: clamp(21px, 2.6vw, 26px);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-desc {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

/* Estimator */
.estimator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  padding: 22px;
  min-width: 0;
}

.panel-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.preset-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.preset-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-well);
  color: var(--text-secondary);
  padding: 10px 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  min-width: 0;
}

.preset-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.preset-btn[aria-pressed="true"] {
  border-color: var(--accent-emerald-border);
  background: var(--accent-emerald-dim);
  color: var(--text-primary);
}

.preset-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

.preset-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-emerald);
}

.control-group {
  margin-bottom: 18px;
}

.control-group:last-of-type {
  margin-bottom: 14px;
}

.control-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.control-label {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.control-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-well);
  border: 1px solid var(--border-subtle);
  appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 2px solid #081410;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 2px solid #081410;
}

.range-bounds {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.formula-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-word;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  min-width: 0;
}

.kpi-label {
  font-size: 12px;
  line-height: 1.35;
  min-height: 2.7em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
}

.kpi-value.emerald {
  color: var(--accent-emerald);
}

.kpi-value.amber {
  color: var(--accent-amber);
}

.kpi-sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.bar-wrap {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
}

.bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #1b2430;
  overflow: hidden;
  display: flex;
}

.bar-retained {
  background: #4b5d73;
  height: 100%;
  transition: width 0.2s ease;
}

.bar-saved {
  background: var(--accent-emerald);
  height: 100%;
  transition: width 0.2s ease;
}

.disclaimer-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-amber-border);
  background: var(--accent-amber-dim);
  color: #e9d5a8;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.disclaimer-box strong {
  color: var(--accent-amber);
}

/* Code / Terminal Block */
.code-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-well);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.code-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.copy-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.copy-btn.copied {
  border-color: var(--accent-emerald-border);
  background: var(--accent-emerald-dim);
  color: var(--accent-emerald);
}

.code-body {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #d0dce8;
}

.code-body .c-comment {
  color: var(--text-muted);
}

.code-body .c-cmd {
  color: var(--accent-emerald);
}

/* Track Record */
.flagship-card {
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.045) 0%, var(--bg-surface) 38%);
  padding: 24px;
  margin-bottom: 22px;
}

.flagship-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.flagship-title {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--text-primary);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-well);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge.emerald {
  border-color: var(--accent-emerald-border);
  background: var(--accent-emerald-dim);
  color: var(--accent-emerald);
}

.badge.amber {
  border-color: var(--accent-amber-border);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

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

.metric-chip {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  min-width: 0;
}

.metric-chip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent-emerald);
  margin-bottom: 3px;
}

.metric-chip span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-well);
  color: var(--accent-emerald);
}

.action-pill:hover {
  border-color: var(--accent-emerald-border);
  background: var(--accent-emerald-dim);
  color: #6ee7b7;
}

.subsection-title {
  margin: 28px 0 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 18px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card h3 {
  margin: 0;
  font-size: 15.5px;
  color: var(--text-primary);
}

.repo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.repo-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.repo-tag:hover {
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

/* IETF Errata */
.errata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.errata-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 16px;
  color: var(--text-primary);
  min-width: 0;
}

.errata-card:hover {
  border-color: var(--accent-emerald-border);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.errata-rfc {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.errata-eid {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-emerald);
}

.errata-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.research-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Demos */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.demo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 18px;
  color: var(--text-primary);
  min-width: 0;
}

.demo-card:hover {
  border-color: var(--accent-emerald-border);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.demo-channel {
  border-style: dashed;
  border-color: var(--border-strong);
  background: rgba(17, 24, 32, 0.55);
}

.demo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.demo-ep {
  color: var(--accent-amber);
  font-weight: 600;
}

.demo-card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.38;
  color: var(--text-primary);
}

.demo-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.demo-cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-emerald);
}

/* Lite Kit */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kit-card-wide {
  grid-column: 1 / -1;
}

.kit-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 18px;
  min-width: 0;
}

.kit-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-emerald);
  margin-bottom: 6px;
}

.kit-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  color: var(--text-primary);
}

.kit-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  padding: 44px 0 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.footer-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 20px;
  min-width: 0;
}

.footer-card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  color: var(--text-primary);
}

.footer-card p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Tip Page Specific */
.tip-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.tip-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.02em;
}

.voice-card {
  margin: 18px 0 0;
  max-width: 780px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--text-primary);
}

.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-danger-border);
  background: var(--accent-danger-dim);
  margin-bottom: 24px;
}

.warning-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--accent-danger-border);
  color: var(--accent-danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}

.warning-banner strong {
  display: block;
  color: #fecaca;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.warning-banner p {
  margin: 0;
  color: #fca5a5;
  font-size: 13.5px;
  line-height: 1.55;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.bep20-card {
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.05) 0%, var(--bg-surface) 45%);
  padding: 24px;
  margin-bottom: 28px;
}

.bep20-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.bep20-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bep20-title {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.bep20-body {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.qr-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: #ffffff;
  width: 204px;
  max-width: 100%;
}

.qr-svg {
  display: block;
  width: 184px;
  height: 184px;
  max-width: 100%;
  height: auto;
}

.qr-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #0b0f14;
  letter-spacing: 0.02em;
}

.bep20-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.bep20-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.bep20-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.network-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  padding: 20px;
  min-width: 0;
}

.network-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.network-name {
  margin: 0;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
}

.address-well {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-emerald);
  word-break: break-all;
  line-height: 1.5;
}

.network-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

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

.copy-btn.full {
  width: 100%;
  justify-content: center;
  padding: 9px 14px;
  font-size: 13px;
}

.alt-support {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 20px;
}

.alt-support h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.alt-support p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Sieve Playground */
.sieve-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.sieve-textarea {
  width: 100%;
  min-height: 290px;
  max-height: 460px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  color: #d0dce8;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  overflow: auto;
}

.sieve-textarea:hover {
  border-color: var(--border-strong);
}

.sieve-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.sieve-reset-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-well);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 9px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.sieve-reset-btn:hover {
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.sieve-digest {
  margin: 0;
  padding: 14px;
  max-height: 280px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.sieve-line {
  display: block;
}

.sieve-line-err {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.09);
  border-left: 2px solid var(--accent-danger);
  padding-left: 8px;
  margin-left: -10px;
}

.sieve-line-skip {
  color: var(--accent-emerald);
  opacity: 0.9;
  font-style: italic;
}

.sieve-line-ctx {
  color: #d0dce8;
}

.sieve-notice {
  margin-bottom: 14px;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-amber-border);
  background: var(--accent-amber-dim);
  color: #e9d5a8;
  font-size: 12.5px;
  line-height: 1.5;
}

.sieve-notice[hidden] {
  display: none;
}

.sieve-cli-card {
  margin-top: 14px;
}

/* Featured Essay Section */
.essay-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.essay-feature-card {
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.05) 0%, var(--bg-surface) 48%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.essay-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.essay-feature-title {
  margin: 0;
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.essay-feature-title a {
  color: var(--text-primary);
}

.essay-feature-title a:hover {
  color: var(--accent-emerald);
}

.essay-feature-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.65;
}

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

.essay-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Recent Verified Merges Strip */
.recent-pr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.recent-pr-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-emerald-border);
  background: rgba(52, 211, 153, 0.04);
  color: var(--text-primary);
  min-width: 0;
}

.recent-pr-card:hover {
  background: var(--accent-emerald-dim);
  color: var(--text-primary);
}

.recent-pr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-emerald);
}

.recent-pr-id {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

.recent-pr-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Essay Article & Archive Pages */
.article-hero {
  padding: 44px 0 32px;
  border-bottom: 1px solid var(--border-subtle);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-emerald);
}

.article-hero h1 {
  margin: 0 0 14px;
  max-width: 860px;
  font-size: clamp(26px, 3.8vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.article-subtitle {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.article-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.article-prose {
  font-size: 15.5px;
  line-height: 1.78;
  color: #d6e0ea;
}

.article-prose p {
  margin: 0 0 18px;
}

.article-prose h2 {
  margin: 36px 0 14px;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.article-prose h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.article-prose li {
  margin-bottom: 10px;
}

.article-prose strong {
  color: var(--text-primary);
}

.article-prose code {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: #a7f3d0;
  font-size: 0.88em;
}

.article-prose .code-card {
  margin: 18px 0 22px;
}

.article-prose .code-body code {
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
  min-width: 560px;
}

.bench-table th,
.bench-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.bench-table th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-well);
}

.bench-table tbody tr:last-child td {
  border-bottom: none;
}

.bench-table .delta-good {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-emerald);
  white-space: nowrap;
}

.bench-table .delta-warn {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-amber);
  white-space: nowrap;
}

.callout-box {
  margin: 20px 0 24px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-amber-border);
  background: var(--accent-amber-dim);
  color: #e9d5a8;
  font-size: 14px;
  line-height: 1.65;
}

.callout-box strong {
  color: var(--accent-amber);
}

.callout-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.callout-box li {
  margin-bottom: 8px;
}

.callout-box li:last-child {
  margin-bottom: 0;
}

.zh-tldr-box {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-emerald-border);
  background: var(--accent-emerald-dim);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.65;
}

.article-footer-box {
  margin-top: 34px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.article-footer-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--text-primary);
}

.article-footer-box p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.rss-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-amber-border);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.rss-badge:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-emerald-border);
  background: #0d1d17;
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .proof-strip,
  .metric-chips,
  .recent-pr-grid,
  .essay-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .estimator-grid,
  .sieve-grid,
  .eco-grid,
  .kit-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-top {
    width: 100%;
  }

  .lang-toggle.lang-mobile {
    display: inline-flex;
  }

  .lang-toggle.lang-desktop {
    display: none;
  }

  .nav-wrap {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav a {
    font-size: 12.5px;
  }

  .status-pill {
    border-radius: var(--radius-sm);
  }

  .kpi-label {
    min-height: 0;
  }

  .hero,
  .article-hero {
    padding: 36px 0 28px;
  }

  .section {
    padding: 36px 0;
  }

  .proof-strip,
  .metric-chips,
  .recent-pr-grid,
  .essay-highlights,
  .preset-group,
  .kpi-grid,
  .demos-grid,
  .errata-grid,
  .network-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel,
  .flagship-card,
  .essay-feature-card,
  .bep20-card,
  .network-card {
    padding: 16px;
  }

  .bep20-body {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 16px;
  }

  .sieve-textarea {
    min-height: 220px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }
}
