/* Eclyzer Router v2 — Landing Page Sections (OpenRouter 3D Hero × Surplus Intelligence) */

/* ==========================================================================
   Section 1: Asymmetric Hero + 4-Layer 3D Orbital Constellation Engine
   ========================================================================== */

.er-hero {
  position: relative;
  z-index: 8;
  isolation: isolate;
  padding: 112px 0 48px;
  min-height: clamp(660px, calc(100dvh - 16px), 840px);
  display: flex;
  align-items: center;
  overflow-x: clip;
  overflow-y: visible;
}

.er-hero-dither {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  overflow: hidden;
}

:root:not(.dark) .er-hero-dither {
  opacity: 0.32;
}

.er-dither-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 300ms ease;
}

.er-hero-dither[data-dither-ready] .er-dither-canvas {
  opacity: 1;
}

.er-hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 14, 14, 0.94) 0%, rgba(14, 14, 14, 0.84) 26%, rgba(14, 14, 14, 0.42) 44%, rgba(14, 14, 14, 0.08) 62%, rgba(14, 14, 14, 0.02) 82%, rgba(14, 14, 14, 0.20) 100%),
    linear-gradient(180deg, rgba(14, 14, 14, 0.54) 0%, transparent 16%, transparent 74%, #0e0e0e 100%);
}

:root:not(.dark) .er-hero-fade {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 26%, rgba(255, 255, 255, 0.40) 44%, rgba(255, 255, 255, 0.06) 62%, transparent 82%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, transparent 16%, transparent 74%, #ffffff 100%);
}

.er-hero-orbital {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: auto;
}

.er-orbit-bg,
.er-orbit-pulse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.er-orbit-bg {
  z-index: 0;
}

.er-orbit-3d-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 390px;
  z-index: 4;
  pointer-events: none;
  display: grid;
  place-items: center;
  transform: translate3d(62%, 140px, 0);
}

.er-orbit-3d {
  width: 100%;
  height: 100%;
  display: block;
}

.er-orbit-fallback {
  width: 156px;
  height: 156px;
  border-radius: 36px;
  background: radial-gradient(circle at 30% 25%, rgba(82, 148, 252, 0.24), transparent 58%), linear-gradient(155deg, #272932 0%, #14151a 60%, #0e0e0e 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), 0 0 0 1px rgba(0, 142, 250, 0.35), 0 24px 54px rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
}

:root:not(.dark) .er-orbit-fallback {
  background: radial-gradient(circle at 30% 25%, rgba(0, 105, 189, 0.16), transparent 60%), linear-gradient(155deg, #ffffff 0%, #eceae6 100%);
  box-shadow: inset 0 1px 1px #ffffff, 0 0 0 1px rgba(0, 105, 189, 0.26), 0 24px 48px rgba(15, 23, 42, 0.14);
}

.er-orbit-fallback svg {
  width: 78px;
  height: 78px;
}

.er-orbit-fallback[hidden] {
  display: none;
}

.er-orbit-pulse {
  z-index: 1;
  pointer-events: none;
}

.er-orbit-labs {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.er-orbit-lab-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--surface-row);
  border: 1px solid var(--divider-strong);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  will-change: transform;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

:root:not(.dark) .er-orbit-lab-badge {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

:root:not(.dark) .er-orbit-lab-badge[data-brand="openai"],
:root:not(.dark) .er-orbit-lab-badge[data-brand="glm"],
:root:not(.dark) .er-orbit-lab-badge[data-brand="kimi"],
:root:not(.dark) .er-orbit-lab-badge[data-brand="mimo"] {
  background: #111318;
  border-color: #24252a;
}

.er-orbit-lab-badge.is-hot {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 8px 20px rgba(0, 142, 250, 0.28);
}

.er-orbit-lab-badge img {
  width: 20px;
  height: 20px;
  display: block;
}

.er-orbit-hud {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  pointer-events: none;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--surface-popover);
  border: 1px solid var(--border);
  box-shadow: var(--ui-dialog-shadow);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  will-change: transform;
}

.er-orbit-hud[hidden] {
  display: none;
}

.er-hero-grid {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
  pointer-events: none;
}

.er-hero-copy {
  max-width: 540px;
  padding: 20px 24px 20px 0;
}

.er-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.625rem, 5.6vw, 4.75rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.055em;
  color: var(--ink);
  text-wrap: balance;
}

.er-hero-sub {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 46ch;
}

.er-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  position: relative;
}

.er-agent-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.er-agent-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  width: min(504px, calc(100vw - 32px));
  padding: 16px;
  border-radius: var(--r-menu);
  background: var(--surface-popover);
  border: 1px solid var(--border);
  box-shadow: var(--ui-dialog-shadow);
}

.er-agent-popover[hidden] {
  display: none;
}

.er-agent-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 520;
  color: var(--ink-secondary);
}

.er-agent-code {
  margin: 0;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--surface-field);
  color: var(--ink);
  box-shadow: var(--ui-control-ring);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.er-agent-popover-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.er-hero-stats {
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
}

.er-hero-stat dt {
  font-size: 24px;
  font-weight: 520;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.er-hero-stat dd {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

@media (max-width: 920px) {
  .er-hero {
    padding: 96px 0 28px;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .er-hero-dither {
    opacity: 0.34;
  }
  :root:not(.dark) .er-hero-dither {
    opacity: 0.28;
  }
  .er-hero-fade {
    background: linear-gradient(180deg, rgba(14, 14, 14, 0.88) 0%, rgba(14, 14, 14, 0.68) 44%, rgba(14, 14, 14, 0.12) 74%, #0e0e0e 100%);
  }
  :root:not(.dark) .er-hero-fade {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.72) 44%, rgba(255, 255, 255, 0.10) 74%, #ffffff 100%);
  }
  .er-hero-copy {
    max-width: 100%;
    padding: 0;
    background: none;
  }
  .er-hero-orbital {
    position: relative;
    height: 330px;
    margin-top: 20px;
    order: 2;
  }
  .er-orbit-lab-badge {
    width: 32px;
    height: 32px;
  }
  .er-orbit-lab-badge img {
    width: 17px;
    height: 17px;
  }
  .er-hero-grid {
    order: 1;
    padding-inline: 16px;
  }
}

@media (max-width: 520px) {
  .er-hero {
    padding: 84px 0 20px;
  }
  .er-hero-orbital {
    height: 260px;
    margin-top: 12px;
  }
}

.er-anchor-target {
  display: block;
  position: relative;
  top: -88px;
  visibility: hidden;
  height: 0;
  pointer-events: none;
}

/* ==========================================================================
   Section 2: Surplus Live Price Spotlight Card + Monochrome Provider Marquee
   ========================================================================== */

.er-spotlight-sec {
  padding: 40px 0 56px;
}

.er-spotlight-card {
  position: relative;
  z-index: 6;
  max-width: 780px;
  margin-inline: auto;
  padding: 12px;
  border-radius: var(--r-dialog);
  background: var(--surface-row);
  box-shadow: var(--ui-hero-card-shadow);
}

.er-spotlight-body {
  padding: 22px 24px 20px;
}

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

.er-spotlight-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 260px;
}

.er-spotlight-select-wrap .er-brand-tile {
  width: 42px;
  height: 42px;
}

.er-spotlight-select-wrap .er-brand-tile img {
  width: 24px;
  height: 24px;
}

.er-spotlight-prices {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.er-spot-tier {
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--surface-field);
  box-shadow: var(--ui-control-ring);
}

.er-spot-tier.is-active-tier {
  box-shadow: inset 0 0 0 1.5px var(--primary-ring);
}

.er-spot-tier--offpeak {
  background: linear-gradient(180deg, var(--success-soft) 0%, var(--surface-field) 86%);
  box-shadow: inset 0 0 0 1px var(--success-ring);
}

.er-spot-tier--offpeak.is-active-tier {
  box-shadow: inset 0 0 0 1.5px var(--success);
}

.er-spot-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.er-spot-side-label {
  display: block;
  font-size: 11px;
  font-weight: 520;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.er-spot-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--primary-soft);
  color: var(--primary-text);
  box-shadow: inset 0 0 0 1px var(--primary-ring);
}

.er-spot-active-pill.is-emerald {
  background: var(--success-soft);
  color: var(--success);
  box-shadow: inset 0 0 0 1px var(--success-ring);
}

.er-spot-active-pill[hidden] {
  display: none;
}

.er-spot-val {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.er-spot-val--emerald {
  color: var(--success);
}

.er-spot-unit {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.er-spot-arrow {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: #1756c4;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px var(--primary-soft);
  margin-inline: auto;
}

.er-spot-arrow svg {
  width: 18px;
  height: 18px;
}

.er-spot-summary {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--divider-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.er-spot-summary > span {
  flex: 1 1 320px;
  line-height: 1.45;
}

.er-spot-summary strong {
  color: var(--success);
  font-weight: 560;
}

.er-spot-free-panel {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.er-spot-free-panel[hidden],
.er-spot-tariff-panel[hidden] {
  display: none;
}

.er-spot-mini-stat {
  padding: 14px;
  border-radius: var(--r-menu);
  background: var(--surface-field);
  box-shadow: var(--ui-control-ring);
}

.er-spot-mini-stat span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.er-spot-mini-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 520;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Monochrome Provider Strip */
.er-marquee-wrap {
  margin-top: 44px;
  text-align: center;
}

.er-marquee-caption {
  margin: 0 0 18px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.er-marquee {
  position: relative;
  overflow: hidden;
  max-width: 1152px;
  margin-inline: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.er-marquee-track {
  display: flex;
  width: max-content;
  gap: 44px;
  padding: 6px 0;
  animation: er-marquee-scroll 34s linear infinite;
}

.er-marquee:hover .er-marquee-track {
  animation-play-state: paused;
}

.er-marquee-group {
  display: flex;
  align-items: center;
  gap: 44px;
  flex-shrink: 0;
}

.er-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 520;
  color: var(--ink-muted);
  white-space: nowrap;
}

.er-marquee-item img {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.85;
}

:root:not(.dark) .er-marquee-item img {
  filter: brightness(0);
  opacity: 0.72;
}

@keyframes er-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .er-spotlight-body {
    padding: 16px;
  }
  .er-spotlight-prices {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .er-spot-arrow {
    transform: rotate(90deg);
    margin-inline: auto;
  }
  .er-spot-free-panel {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Shared Landing Section Headings (No Kicker Above Headings)
   ========================================================================== */

.er-sec {
  padding: 88px 0;
}

.er-sec--tight {
  padding: 64px 0;
}

.er-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 32px;
}

.er-sec-head > div {
  flex: 1 1 480px;
}

.er-sec-title {
  margin: 0;
  font-size: clamp(1.875rem, 3.8vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--ink);
  text-wrap: balance;
}

.er-sec-sub {
  margin: 12px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
}

/* ==========================================================================
   Section 3: 2x2 Grid-Paper Bento + Failover Multi-Provider Matrix
   ========================================================================== */

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

.er-bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  background-color: var(--surface-row);
  background-image:
    radial-gradient(circle at 88% 10%, var(--grid-radial-blue), transparent 38%),
    linear-gradient(var(--grid-line-x) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-y) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  box-shadow: var(--ui-card-ring);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 292px;
  min-width: 0;
}

.er-bento-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.er-bento-label {
  font-size: 11px;
  font-weight: 520;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.er-bento-kpi {
  margin: 10px 0 0;
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.er-bento-desc {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* Failover Matrix inside Bento 1 */
.er-failover-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.er-failover-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.er-failover-name--strong {
  color: var(--ink);
  font-weight: 600;
}

.er-failover-blocks {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 4px;
}

.er-fb {
  height: 14px;
  border-radius: 3px;
  background: var(--surface-sunken);
  transition: background-color 0.25s ease, opacity 0.25s ease;
}

.er-fb.is-ok {
  background: var(--success);
}

.er-fb.is-err {
  background: var(--danger);
}

.er-fb.is-standby {
  background: var(--surface-raised);
  opacity: 0.55;
}

.er-failover-divider {
  border: 0;
  border-top: 1px solid var(--divider-subtle);
  margin: 2px 0;
}

.er-failover-caption {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* SVG Sparklines & Bar Histograms in Bento 2-4 */
.er-bento-svg {
  width: 100%;
  height: 92px;
  display: block;
}

.er-svg-node-box {
  fill: var(--surface-field);
  stroke: var(--divider);
}

.er-svg-node-box--emerald {
  fill: var(--surface-field);
  stroke: var(--success);
  stroke-opacity: 0.55;
}

.er-svg-node-text {
  fill: var(--ink-secondary);
}

.er-svg-node-text--main {
  fill: var(--ink);
}

.er-svg-node-text--emerald {
  fill: var(--success);
}

.er-bars-24 {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  height: 82px;
}

.er-bars-24 span {
  display: block;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--confirm) 0%, var(--success) 100%);
  opacity: 0.85;
}

.er-bars-24 span.is-blue {
  background: linear-gradient(180deg, var(--primary-text) 0%, var(--primary) 100%);
}

@media (max-width: 920px) {
  .er-bento-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .er-failover-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* ==========================================================================
   Section 4: Developer Quickstart 2-Column + Git-Diff 5-Tab Code Window
   ========================================================================== */

.er-dev-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 48px;
}

.er-dev-grid > * {
  min-width: 0;
}

.er-agent-cli-box {
  margin-top: 24px;
  max-width: 100%;
  min-width: 0;
}

.er-agent-cli-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px 8px 0 0;
  background: var(--surface-row);
  box-shadow: inset 1px 1px 0 var(--divider-subtle), inset -1px 0 0 var(--divider-subtle);
  font-size: 12px;
  font-weight: 520;
  color: var(--ink-secondary);
}

.er-agent-cli-dots {
  display: inline-flex;
  align-items: center;
}

.er-agent-cli-dots span {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  border: 1px solid var(--divider);
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  background: var(--surface-raised);
  color: var(--ink);
  margin-left: -4px;
}

.er-agent-cli-dots span:first-child {
  margin-left: 0;
  background: #1756c4;
  color: #ffffff;
}

.er-agent-cli-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0 var(--r-card) var(--r-card) var(--r-card);
  background: var(--surface-field);
  box-shadow: var(--ui-card-ring);
}

.er-agent-cli-bar code {
  font-size: 12.5px;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

.er-dev-features {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--divider-subtle);
}

.er-dev-features li {
  padding: 14px 0;
  border-bottom: 1px solid var(--divider-subtle);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.er-dev-features li strong {
  color: var(--ink);
  font-weight: 560;
}

.er-code-shell {
  border-radius: var(--r-card);
  background: var(--surface-code);
  box-shadow: 0 0 0 1px #1f2024, 0 24px 56px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  color: #f4f4f5;
}

.er-code-tabs-wrap {
  position: relative;
}

.er-code-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid #1f2024;
  background: #0d0e13;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #2d303c transparent;
}

@media (max-width: 640px) {
  .er-code-tabs {
    padding-right: 28px;
  }
  .er-code-tabs-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 1px;
    width: 28px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(13, 14, 19, 0) 0%, #0d0e13 85%);
  }
}

.er-code-tabs button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #93919c;
  font-size: 12.5px;
  font-weight: 520;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.er-code-tabs button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
}

.er-code-tabs button[aria-selected="true"] {
  background: #1a1c24;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px #2d303c;
}

.er-code-tabs button:hover:not([aria-selected="true"]) {
  color: #e4e4e7;
}

.er-code-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #1b1c22;
}

.er-code-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.er-code-dots i {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  display: block;
}

.er-dot-red { background: #ff5f56; }
.er-dot-yellow { background: #ffbd2e; }
.er-dot-green { background: #27c93f; }

.er-spotlight-select-col {
  flex: 1 1 auto;
  min-width: 0;
}

.er-spot-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.er-spot-actions .er-inline-link {
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.er-spot-free-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.er-spot-free-copy {
  font-size: 13px;
  color: var(--ink-secondary);
}

.er-mb-sm {
  margin-bottom: 14px;
}

.er-range--aligned {
  margin-top: 9px;
}

.er-compare-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.er-retry-btn {
  margin-top: 10px;
}

.er-receipt-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.er-receipt-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.er-receipt-eyebrow {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.er-receipt-out {
  text-align: right;
}

.er-receipt-unit {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--success);
}

.er-receipt-row--top {
  align-items: flex-start;
}

.er-receipt-row--last {
  align-items: flex-start;
  border-bottom: 0;
}

.er-receipt-row .er-receipt-model-name {
  font-family: var(--font-sans);
  text-align: left;
  display: block;
}

.er-receipt-model-meta {
  font-size: 11.5px;
}

.er-faq-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 20px;
}

.er-bar-fill-blue {
  fill: var(--primary);
}

.er-bar-fill-emerald {
  fill: var(--success);
}

.er-code-filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #93919c;
}

.er-code-copy-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: #191b22;
  box-shadow: inset 0 0 0 1px #2c2e38;
  color: #e4e4e7;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.er-code-copy-btn:hover {
  background: #23252f;
  color: #ffffff;
}

.er-code-pre {
  margin: 0;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
}

.er-code-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding-right: 18px;
}

.er-code-ln {
  text-align: right;
  padding-right: 16px;
  color: #8d909e;
  user-select: none;
}

.er-code-line.is-del {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  text-decoration: line-through;
}

.er-code-line.is-add {
  background: rgba(47, 208, 127, 0.15);
  box-shadow: inset 2px 0 0 #2fd07f;
  color: #a7f3d0;
}

@media (max-width: 980px) {
  .er-dev-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ==========================================================================
   Section 5: Order-Book Depth Backdrop + Full Interactive Catalog
   ========================================================================== */

.er-catalog-sec {
  position: relative;
  overflow-x: clip;
  padding: 96px 0;
}

.er-depth-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
}

.er-catalog-inner {
  position: relative;
  z-index: 1;
}

.er-catalog-bar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(180px, 0.85fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--surface-row);
  box-shadow: var(--ui-card-ring);
}

.er-catalog-bar .er-select:is(:focus, :focus-visible, :focus-within),
.er-catalog-bar .er-select-trigger:is(:focus, :focus-visible),
.er-catalog-bar .er-dropdown.is-open .er-select-trigger {
  outline: none;
  outline-offset: 0;
  box-shadow: var(--ui-control-ring);
}

.er-catalog-bar .er-select-menu:is(:focus, :focus-visible),
.er-catalog-bar .er-select-option:is(:focus, :focus-visible) {
  outline: none;
  outline-offset: 0;
}

.er-catalog-table-card {
  position: relative;
  z-index: 1;
  border-radius: 0 0 var(--r-card) var(--r-card);
  background: var(--surface-row);
  box-shadow: var(--ui-card-ring);
  overflow: hidden;
}

.er-catalog-head {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) minmax(110px, 0.85fr) minmax(110px, 0.85fr) minmax(180px, 1.15fr) 128px;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid var(--divider-subtle);
  border-bottom: 1px solid var(--divider-subtle);
  background: var(--surface-card-deeper);
  font-size: 11px;
  font-weight: 520;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.er-catalog-head-num {
  text-align: right;
}

.er-catalog-head-status {
  text-align: right;
}

.er-model-grid {
  display: flex;
  flex-direction: column;
  margin-bottom: -1px;
}

.er-model-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) minmax(110px, 0.85fr) minmax(110px, 0.85fr) minmax(180px, 1.15fr) 128px;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--divider-subtle);
  transition: background-color 0.12s ease;
}

.er-model-row:hover {
  background: var(--surface-hover);
}

.er-model-row[hidden] {
  display: none;
}

.er-model-ident {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.er-model-ident-text {
  min-width: 0;
  flex: 1 1 auto;
}

.er-model-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}

.er-model-title-line h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 560;
  color: var(--ink);
  line-height: 1.3;
}

.er-model-creator {
  font-size: 12px;
  color: var(--ink-muted);
}

.er-model-slug-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.er-model-slug {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.er-copy-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-badge);
  background: var(--surface-raised);
  box-shadow: var(--ui-control-ring);
  color: var(--ink-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.er-copy-btn--md {
  width: 34px;
  height: 34px;
  border-radius: var(--r-control);
}

.er-copy-btn:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.er-copy-btn .er-ico-check,
.er-code-copy-btn .er-ico-check {
  display: none;
}

.er-copy-btn.is-copied .er-ico-copy,
.er-code-copy-btn.is-copied .er-ico-copy {
  display: none;
}

.er-copy-btn.is-copied .er-ico-check,
.er-code-copy-btn.is-copied .er-ico-check {
  display: block;
  color: var(--success);
}

.er-price-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.er-price-main {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 560;
  color: var(--ink);
}

.er-price-alt {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.er-price-alt.is-offpeak-live {
  color: var(--success);
}

.er-limits-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}

.er-limits-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.er-limits-line strong {
  color: var(--ink-secondary);
  font-weight: 520;
}

.er-status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.er-catalog-empty {
  padding: 36px 20px;
  text-align: center;
}

.er-catalog-empty[hidden] {
  display: none;
}

.er-catalog-empty h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 560;
}

.er-catalog-empty p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

@media (max-width: 960px) {
  .er-catalog-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .er-catalog-head {
    display: none;
  }
  .er-model-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
  }
  .er-model-ident {
    grid-column: 1 / -1;
  }
  .er-price-cell {
    text-align: left;
  }
  .er-limits-cell {
    grid-column: 1 / -1;
  }
  .er-status-cell {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .er-catalog-bar {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Section 6: Thermal Printer Receipt Calculator & 2-Model Comparison
   ========================================================================== */

.er-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 52px;
}

.er-calc-grid > * {
  min-width: 0;
}

.er-calc-controls {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.er-preset-btn {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--surface-row);
  box-shadow: var(--ui-control-ring);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 520;
  cursor: pointer;
}

.er-preset-btn[aria-pressed="true"] {
  background: var(--primary-soft);
  color: var(--primary-text);
  box-shadow: inset 0 0 0 1px var(--primary-ring);
}

.er-calc-panel[hidden] {
  display: none;
}

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

/* Hardware Printer Slot + Serrated Receipt Card */
.er-printer-frame {
  border-radius: var(--r-dialog);
  background: var(--surface-card-deeper);
  box-shadow: var(--ui-card-ring), 0 24px 54px rgba(0, 0, 0, 0.36);
  padding: 16px 16px 20px;
}

.er-printer-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 14px;
  border-bottom: 4px solid #060709;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.er-receipt-paper {
  position: relative;
  margin-top: -2px;
  padding: 22px 22px 28px;
  background: var(--surface-receipt);
  box-shadow: var(--ui-control-ring);
  border-radius: 4px 4px 0 0;
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 10px),
    97% 100%, 94% calc(100% - 10px), 91% 100%, 88% calc(100% - 10px),
    85% 100%, 82% calc(100% - 10px), 79% 100%, 76% calc(100% - 10px),
    73% 100%, 70% calc(100% - 10px), 67% 100%, 64% calc(100% - 10px),
    61% 100%, 58% calc(100% - 10px), 55% 100%, 52% calc(100% - 10px),
    49% 100%, 46% calc(100% - 10px), 43% 100%, 40% calc(100% - 10px),
    37% 100%, 34% calc(100% - 10px), 31% 100%, 28% calc(100% - 10px),
    25% 100%, 22% calc(100% - 10px), 19% 100%, 16% calc(100% - 10px),
    13% 100%, 10% calc(100% - 10px), 7% 100%, 4% calc(100% - 10px), 0 calc(100% - 10px)
  );
}

.er-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--divider-strong);
}

.er-receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--divider);
  font-size: 13px;
}

.er-receipt-row span {
  color: var(--ink-muted);
}

.er-receipt-row strong {
  font-family: var(--font-mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.er-receipt-total {
  padding: 18px 0 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.er-receipt-big {
  font-family: var(--font-mono);
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.er-receipt-stamp {
  display: inline-block;
  padding: 4px 10px;
  border: 1.5px solid var(--success);
  border-radius: 4px;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.er-receipt-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

.er-receipt-cta {
  margin-top: 16px;
}

@media (max-width: 960px) {
  .er-calc-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 520px) {
  .er-preset-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .er-compare-selects {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Section 7: 3-Step Horizontal Flow & FAQ Accordion
   ========================================================================== */

.er-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.er-step-item {
  padding-top: 18px;
  border-top: 1px solid var(--divider-strong);
}

.er-step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 560;
  color: var(--primary-text);
  margin-bottom: 10px;
}

.er-step-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 560;
  color: var(--ink);
}

.er-step-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.er-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.er-faq-item {
  border-radius: var(--r-card);
  background: var(--surface-row);
  box-shadow: var(--ui-card-ring);
}

.er-faq-item summary {
  list-style: none;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 520;
  color: var(--ink);
  cursor: pointer;
  min-height: 54px;
}

.er-faq-item summary::-webkit-details-marker {
  display: none;
}

.er-faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.16s var(--ease-out-expo);
}

.er-faq-item[open] .er-faq-chevron {
  transform: rotate(180deg);
}

.er-faq-body {
  padding: 0 20px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 72ch;
}

@media (max-width: 768px) {
  .er-steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 820px) {
  .er-sec {
    padding: 64px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .er-marquee-track,
  .er-dither-canvas {
    animation: none;
    transition: none;
  }
}
