/* Kaspa vs Bitcoin: shared styles for homepage #vs-bitcoin and /learn/bitcoin/
   Matches Kaspa Explained sunlit daylight pastel + velvet-indigo dark book palette.
   Natural case typography; stationary hitboxes; WCAG AA contrast in light & dark. */

.v3-btc {
  max-width: var(--frame, 72rem);
  margin: 0 auto;
  padding: 18px 0 28px;
  container-type: inline-size;
}

.v3-btc-card {
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 24px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--ke-shadow-md, 0 10px 28px -10px rgba(37, 99, 235, 0.13));
}

.v3-btc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.v3-btc-head-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.v3-btc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--mineral-saffron-wash, #FFF7E6);
  color: var(--mineral-saffron, #B45309);
  border: 1px solid rgba(180, 83, 9, 0.22);
  margin: 0 0 10px;
}

.v3-btc-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0D9488 0%, #D97706 100%);
  flex-shrink: 0;
}

.v3-btc-h {
  margin: 0 0 8px;
  font-family: var(--display, "Manrope", system-ui, sans-serif);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--v3-ink, #172033);
}

.v3-btc-lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.56;
  color: var(--v3-muted, #52607A);
  max-width: 66ch;
}

.v3-btc-head-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #1D4ED8 0%, #0F766E 100%);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 18px -8px rgba(29, 78, 216, 0.45);
  transition: filter 160ms ease, box-shadow 160ms ease;
  flex-shrink: 0;
}

.v3-btc-head-cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 24px -8px rgba(15, 118, 110, 0.5);
  color: #FFFFFF !important;
}

.v3-btc-head-cta:focus-visible {
  outline: 2.5px solid var(--v3-mint, #2563EB);
  outline-offset: 2px;
}

/* ==========================================================================
   SIMULATOR PANEL ("What if Bitcoin ran at Kaspa speed?")
   ========================================================================== */
.v3-btc-sim {
  background: var(--v3-well, #F3F6FC);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 20px;
  padding: clamp(16px, 2.4vw, 24px);
  margin-bottom: 24px;
}

.v3-btc-sim-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.v3-btc-sim-h {
  margin: 0;
  font-family: var(--display, "Manrope", system-ui, sans-serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 780;
  letter-spacing: -0.02em;
  color: var(--v3-ink, #172033);
}

.v3-btc-sim-rate-pill {
  font-family: var(--mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 13.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border-strong, rgba(30, 58, 138, 0.21));
  color: var(--v3-ink, #172033);
}

.v3-btc-sim-sub {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.52;
  color: var(--v3-muted, #52607A);
}

.v3-btc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.v3-btc-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--v3-border-strong, rgba(30, 58, 138, 0.21));
  background: var(--v3-surface, #FFFFFF);
  color: var(--v3-ink, #172033);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.v3-btc-pill:hover {
  border-color: var(--v3-mint, #2563EB);
}

.v3-btc-pill[aria-pressed="true"] {
  background: var(--mineral-cobalt, #1D4ED8);
  border-color: var(--mineral-cobalt, #1D4ED8);
  color: #FFFFFF;
}

.v3-btc-pill.is-btc[aria-pressed="true"] {
  background: #B45309;
  border-color: #B45309;
  color: #FFFFFF;
}

.v3-btc-pill.is-kas[aria-pressed="true"] {
  background: #0F766E;
  border-color: #0F766E;
  color: #FFFFFF;
}

.v3-btc-pill:focus-visible {
  outline: 2.5px solid var(--v3-mint, #2563EB);
  outline-offset: 2px;
}

.v3-btc-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.v3-btc-slider-wrap {
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 0;
}

.v3-btc-slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--v3-muted, #52607A);
  margin-bottom: 8px;
}

.v3-btc-slider-labels strong {
  color: var(--v3-ink, #172033);
  font-family: var(--mono, ui-monospace, monospace);
  white-space: nowrap;
  flex-shrink: 0;
}

input[type="range"].v3-btc-range {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  cursor: pointer;
}

input[type="range"].v3-btc-range::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #D97706 0%, #2563EB 55%, #0D9488 100%) !important;
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.14)) !important;
}

input[type="range"].v3-btc-range::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 22px !important;
  height: 22px !important;
  margin-top: -8px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  border: 2.5px solid #0F766E !important;
  box-shadow: 0 2px 6px rgba(23, 32, 51, 0.24) !important;
}

input[type="range"].v3-btc-range::-moz-range-track {
  width: 100% !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #D97706 0%, #2563EB 55%, #0D9488 100%) !important;
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.14)) !important;
}

input[type="range"].v3-btc-range::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  border: 2.5px solid #0F766E !important;
  box-shadow: 0 2px 6px rgba(23, 32, 51, 0.24) !important;
}

input[type="range"].v3-btc-range:focus-visible {
  outline: 2.5px solid var(--v3-mint, #2563EB) !important;
  outline-offset: 2px !important;
  border-radius: 8px !important;
}

.v3-btc-slider-ticks {
  position: relative;
  height: 18px;
  font-size: 11.5px;
  color: var(--v3-faint, #62708B);
  margin-top: 4px;
}

.v3-btc-slider-ticks span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}

.v3-btc-slider-ticks span:nth-child(1) { left: 0%; transform: none; }
.v3-btc-slider-ticks span:nth-child(2) { left: 37.2%; transform: translateX(-50%); }
.v3-btc-slider-ticks span:nth-child(3) { left: 58.1%; transform: translateX(-50%); }
.v3-btc-slider-ticks span:nth-child(4) { left: 79.1%; transform: translateX(-50%); }
.v3-btc-slider-ticks span:nth-child(5) { right: 0%; left: auto; transform: none; }

.v3-btc-delay-wrap {
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 0;
}

.v3-btc-delay-lbl {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--v3-muted, #52607A);
  margin-bottom: 8px;
}

.v3-btc-delay-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v3-btc-delay-btn {
  appearance: none;
  flex: 1 1 auto;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--v3-border-strong, rgba(30, 58, 138, 0.21));
  background: var(--v3-well, #F3F6FC);
  color: var(--v3-ink, #172033);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.v3-btc-delay-btn[aria-pressed="true"] {
  background: var(--v3-ink, #172033);
  border-color: var(--v3-ink, #172033);
  color: #FFFFFF;
}

/* Visual Comparison Bars */
.v3-btc-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.v3-btc-bar-box {
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 0;
}

.v3-btc-bar-box.is-kas {
  border-color: rgba(13, 148, 136, 0.30);
}

.v3-btc-bar-box.is-btc {
  border-color: rgba(180, 83, 9, 0.28);
}

.v3-btc-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.v3-btc-bar-name {
  font-size: 14.5px;
  font-weight: 760;
  color: var(--v3-ink, #172033);
}

.v3-btc-bar-tag {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.v3-btc-bar-tag.is-ok {
  background: var(--mineral-glacier-wash, #E6FAF6);
  color: var(--mineral-glacier, #0A7C72);
}

.v3-btc-bar-tag.is-warn {
  background: var(--mineral-saffron-wash, #FFF7E6);
  color: var(--mineral-saffron, #B45309);
}

.v3-btc-bar-tag.is-bad {
  background: var(--mineral-rose-wash, #FFF0F4);
  color: var(--mineral-rose, #BE123C);
}

.v3-btc-meter {
  height: 28px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  background: var(--v3-well, #F3F6FC);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  margin-bottom: 8px;
}

.v3-btc-meter-kept {
  height: 100%;
  background: linear-gradient(90deg, #D97706 0%, #F59E0B 100%);
  transition: width 220ms ease;
}

.v3-btc-bar-box.is-kas .v3-btc-meter-kept {
  background: linear-gradient(90deg, #0D9488 0%, #2563EB 100%);
}

.v3-btc-meter-lost {
  height: 100%;
  flex: 1 1 auto;
  background: repeating-linear-gradient(
    -45deg,
    rgba(190, 18, 60, 0.14),
    rgba(190, 18, 60, 0.14) 6px,
    rgba(190, 18, 60, 0.25) 6px,
    rgba(190, 18, 60, 0.25) 12px
  );
}

.v3-btc-bar-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--v3-muted, #52607A);
}

.v3-btc-bar-note strong {
  color: var(--v3-ink, #172033);
}

/* 4 Live Stat Tiles */
.v3-btc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.v3-btc-stat {
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 0;
}

.v3-btc-stat-k {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--v3-muted, #52607A);
  margin-bottom: 4px;
}

.v3-btc-stat-v {
  display: block;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 800;
  color: var(--v3-ink, #172033);
  line-height: 1.2;
}

.v3-btc-stat-s {
  display: block;
  font-size: 12px;
  color: var(--v3-faint, #62708B);
  margin-top: 3px;
}

.v3-btc-verdict {
  margin: 0;
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--v3-surface, #FFFFFF);
  border-left: 4px solid var(--mineral-glacier, #0A7C72);
  font-size: 14px;
  line-height: 1.5;
  color: var(--v3-ink, #172033);
}

.v3-btc-verdict[data-tone="warn"] {
  border-left-color: #D97706;
}

.v3-btc-verdict[data-tone="danger"] {
  border-left-color: #BE123C;
}

.v3-btc-formula {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--v3-faint, #62708B);
}

/* ==========================================================================
   FILTERABLE HEAD-TO-HEAD MATRIX
   ========================================================================== */
.v3-btc-matrix-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.v3-btc-subh {
  margin: 0;
  font-family: var(--display, "Manrope", system-ui, sans-serif);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 780;
  letter-spacing: -0.02em;
  color: var(--v3-ink, #172033);
}

.v3-btc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.v3-btc-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  background: var(--v3-surface, #FFFFFF);
  margin-bottom: 24px;
}

.v3-btc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.48;
  text-align: left;
}

.v3-btc-table thead th {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 760;
  color: var(--v3-muted, #52607A);
  background: var(--v3-well, #F3F6FC);
  border-bottom: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  white-space: nowrap;
}

.v3-btc-table thead th.col-kas {
  color: var(--mineral-glacier, #0A7C72);
}

.v3-btc-table thead th.col-btc {
  color: var(--mineral-saffron, #B45309);
}

.v3-btc-table tbody th,
.v3-btc-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--v3-border, rgba(30, 58, 138, 0.09));
  vertical-align: top;
  color: var(--v3-ink, #172033);
}

.v3-btc-table tbody tr:last-child th,
.v3-btc-table tbody tr:last-child td {
  border-bottom: 0;
}

.v3-btc-table tbody tr[hidden] {
  display: none;
}

.v3-btc-dim {
  font-weight: 750;
  min-width: 165px;
}

.v3-btc-badge {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.v3-btc-badge.edge {
  background: var(--mineral-glacier-wash, #E6FAF6);
  color: var(--mineral-glacier, #0A7C72);
}

.v3-btc-badge.btc {
  background: var(--mineral-saffron-wash, #FFF7E6);
  color: var(--mineral-saffron, #B45309);
}

.v3-btc-badge.dna {
  background: var(--mineral-cobalt-wash, #EBF3FF);
  color: var(--mineral-cobalt, #1D4ED8);
}

.v3-btc-badge.rd {
  background: var(--mineral-wisteria-wash, #F3EEFF);
  color: var(--mineral-wisteria, #6D28D9);
}

.v3-btc-cell-sub {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--v3-muted, #52607A);
}

/* ==========================================================================
   TWO PHILOSOPHIES PANEL
   ========================================================================== */
.v3-btc-phil {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.v3-btc-phil-card {
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  background: var(--v3-well, #F3F6FC);
  min-width: 0;
}

.v3-btc-phil-card.is-btc {
  border-top: 3px solid #D97706;
}

.v3-btc-phil-card.is-kas {
  border-top: 3px solid #0D9488;
}

.v3-btc-phil-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 760;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.v3-btc-phil-card.is-btc .v3-btc-phil-tag {
  background: var(--mineral-saffron-wash, #FFF7E6);
  color: var(--mineral-saffron, #B45309);
}

.v3-btc-phil-card.is-kas .v3-btc-phil-tag {
  background: var(--mineral-glacier-wash, #E6FAF6);
  color: var(--mineral-glacier, #0A7C72);
}

.v3-btc-phil-card h4 {
  margin: 0 0 8px;
  font-family: var(--display, "Manrope", system-ui, sans-serif);
  font-size: 18px;
  font-weight: 780;
  letter-spacing: -0.02em;
  color: var(--v3-ink, #172033);
}

.v3-btc-phil-card p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.54;
  color: var(--v3-muted, #52607A);
}

.v3-btc-phil-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--v3-ink, #172033);
}

.v3-btc-phil-list li + li {
  margin-top: 5px;
}

/* ==========================================================================
   DIRECT JUMP LAB STRIP & SCENARIO SWITCHER (for /learn/bitcoin/)
   ========================================================================== */
.v3-btc-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
}

.v3-btc-jumps-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--v3-muted, #52607A);
  margin-right: 4px;
}

.v3-btc-jump {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--v3-border-strong, rgba(30, 58, 138, 0.21));
  background: var(--v3-surface, #FFFFFF);
  color: var(--v3-ink, #172033) !important;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.v3-btc-jump:hover {
  border-color: var(--v3-mint, #2563EB);
  background: var(--v3-well, #F3F6FC);
}

.v3-btc-jump.is-primary {
  background: var(--mineral-glacier-wash, #E6FAF6);
  border-color: rgba(10, 124, 114, 0.36);
  color: var(--mineral-glacier, #0A7C72) !important;
}

.v3-btc-jobs {
  background: var(--v3-well, #F3F6FC);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 20px;
  padding: clamp(16px, 2.4vw, 24px);
}

.v3-btc-job-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.v3-btc-job-panel {
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  border-radius: 16px;
  padding: 18px 20px;
}

.v3-btc-job-winner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 10px;
}

.v3-btc-job-winner.btc {
  background: var(--mineral-saffron-wash, #FFF7E6);
  color: var(--mineral-saffron, #B45309);
}

.v3-btc-job-winner.kas {
  background: var(--mineral-glacier-wash, #E6FAF6);
  color: var(--mineral-glacier, #0A7C72);
}

.v3-btc-job-winner.both {
  background: var(--mineral-cobalt-wash, #EBF3FF);
  color: var(--mineral-cobalt, #1D4ED8);
}

.v3-btc-job-panel h4 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 780;
  color: var(--v3-ink, #172033);
}

.v3-btc-job-panel p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.56;
  color: var(--v3-ink, #172033);
}

.v3-btc-job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.v3-btc-job-box {
  background: var(--v3-well, #F3F6FC);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--v3-muted, #52607A);
}

.v3-btc-job-box strong {
  display: block;
  color: var(--v3-ink, #172033);
  margin-bottom: 4px;
}

/* ==========================================================================
   VELVET-INDIGO DARK THEME OVERRIDES
   ========================================================================== */
html[data-theme="dark"] .v3-btc-kicker {
  background: rgba(255, 202, 92, 0.14);
  color: #FFCA5C;
  border-color: rgba(255, 202, 92, 0.30);
}

html[data-theme="dark"] input[type="range"].v3-btc-range::-webkit-slider-thumb {
  background: #181E33 !important;
  border-color: #34E5C1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] input[type="range"].v3-btc-range::-moz-range-thumb {
  background: #181E33 !important;
  border-color: #34E5C1 !important;
}

html[data-theme="dark"] .v3-btc-pill[aria-pressed="true"] {
  background: #1D4ED8;
  border-color: #60A5FA;
  color: #FFFFFF;
}

html[data-theme="dark"] .v3-btc-pill.is-btc[aria-pressed="true"] {
  background: #F59E0B;
  border-color: #FCD34D;
  color: #0B1020;
}

html[data-theme="dark"] .v3-btc-pill.is-kas[aria-pressed="true"] {
  background: #0F766E;
  border-color: #34E5C1;
  color: #FFFFFF;
}

html[data-theme="dark"] .v3-btc-bar-tag.is-ok,
html[data-theme="dark"] .v3-btc-badge.edge,
html[data-theme="dark"] .v3-btc-phil-card.is-kas .v3-btc-phil-tag,
html[data-theme="dark"] .v3-btc-job-winner.kas {
  background: rgba(52, 229, 193, 0.16);
  color: #34E5C1;
}

html[data-theme="dark"] .v3-btc-bar-tag.is-warn,
html[data-theme="dark"] .v3-btc-badge.btc,
html[data-theme="dark"] .v3-btc-phil-card.is-btc .v3-btc-phil-tag,
html[data-theme="dark"] .v3-btc-job-winner.btc {
  background: rgba(255, 202, 92, 0.16);
  color: #FFCA5C;
}

html[data-theme="dark"] .v3-btc-bar-tag.is-bad {
  background: rgba(255, 122, 162, 0.16);
  color: #FF8FB1;
}

html[data-theme="dark"] .v3-btc-badge.dna,
html[data-theme="dark"] .v3-btc-job-winner.both {
  background: rgba(107, 166, 255, 0.18);
  color: #8EC0FF;
}

html[data-theme="dark"] .v3-btc-badge.rd {
  background: rgba(180, 155, 255, 0.18);
  color: #C4B5FD;
}

html[data-theme="dark"] .v3-btc-delay-btn[aria-pressed="true"] {
  background: #7DB2FF;
  border-color: #7DB2FF;
  color: #0B1020;
}

html[data-theme="dark"] .v3-btc-bar-box.is-kas {
  border-color: rgba(52, 229, 193, 0.34);
}

html[data-theme="dark"] .v3-btc-bar-box.is-btc {
  border-color: rgba(255, 202, 92, 0.32);
}

html[data-theme="dark"] .v3-btc-meter-lost {
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 122, 162, 0.18),
    rgba(255, 122, 162, 0.18) 6px,
    rgba(255, 122, 162, 0.32) 6px,
    rgba(255, 122, 162, 0.32) 12px
  );
}

html[data-theme="dark"] .v3-btc-table thead th.col-kas {
  color: #34E5C1;
}

html[data-theme="dark"] .v3-btc-table thead th.col-btc {
  color: #FFCA5C;
}

html[data-theme="dark"] .v3-btc-jump.is-primary {
  background: rgba(52, 229, 193, 0.14);
  border-color: rgba(52, 229, 193, 0.36);
  color: #34E5C1 !important;
}

html[data-theme="dark"] .v3-btc-verdict {
  border-left-color: #34E5C1;
}

html[data-theme="dark"] .v3-btc-verdict[data-tone="warn"] {
  border-left-color: #FFCA5C;
}

html[data-theme="dark"] .v3-btc-verdict[data-tone="danger"] {
  border-left-color: #FF7AA2;
}

/* ==========================================================================
   CONTAINER & MOBILE RESPONSIVE BREAKPOINTS (ZERO HORIZONTAL OVERFLOW)
   ========================================================================== */
@container (max-width: 780px) {
  .v3-btc-controls,
  .v3-btc-bars,
  .v3-btc-phil,
  .v3-btc-job-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .v3-btc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .v3-btc-controls,
  .v3-btc-bars,
  .v3-btc-phil,
  .v3-btc-job-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .v3-btc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .v3-btc-head-cta {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .v3-btc-table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }
  .v3-btc-table,
  .v3-btc-table tbody {
    display: block;
    width: 100%;
  }
  .v3-btc-table thead {
    display: none;
  }
  .v3-btc-table tbody tr {
    display: block;
    background: var(--v3-surface, #FFFFFF);
    border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.13));
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .v3-btc-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .v3-btc-table tbody th,
  .v3-btc-table tbody td {
    display: block;
    width: 100%;
    padding: 6px 0;
    border-bottom: 0;
    min-width: 0;
  }
  .v3-btc-table tbody th.v3-btc-dim {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--v3-border, rgba(30, 58, 138, 0.10));
    font-size: 14.5px;
  }
  .v3-btc-table tbody th.v3-btc-dim br {
    display: none;
  }
  .v3-btc-table tbody th.v3-btc-dim .v3-btc-badge {
    margin-top: 0;
  }
  .v3-btc-table tbody td:nth-of-type(1)::before,
  .v3-btc-table tbody td:nth-of-type(2)::before {
    display: block;
    font-size: 12px;
    font-weight: 760;
    margin-bottom: 2px;
  }
  .v3-btc-table tbody td:nth-of-type(1)::before {
    content: "Kaspa";
    color: var(--mineral-glacier, #0A7C72);
  }
  .v3-btc-table tbody td:nth-of-type(2) {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed var(--v3-border, rgba(30, 58, 138, 0.12));
  }
  .v3-btc-table tbody td:nth-of-type(2)::before {
    content: "Bitcoin";
    color: var(--mineral-saffron, #B45309);
  }
  .v3-btc-table[data-peer="Ethereum"] tbody td:nth-of-type(2)::before {
    content: "Ethereum";
    color: #1D4ED8;
  }
  .v3-btc-table[data-peer="Solana"] tbody td:nth-of-type(2)::before {
    content: "Solana";
    color: #6D28D9;
  }
  .v3-btc-table[data-peer="XRP Ledger"] tbody td:nth-of-type(2)::before {
    content: "XRP Ledger";
    color: #0369A1;
  }
  .v3-btc-table[data-peer="BNB Chain"] tbody td:nth-of-type(2)::before {
    content: "BNB Chain";
    color: #A16207;
  }
  html[data-theme="dark"] .v3-btc-table tbody td:nth-of-type(1)::before {
    color: #34E5C1;
  }
  html[data-theme="dark"] .v3-btc-table tbody td:nth-of-type(2)::before {
    color: #FFCA5C;
  }
  html[data-theme="dark"] .v3-btc-table[data-peer="Ethereum"] tbody td:nth-of-type(2)::before {
    color: #93C5FD;
  }
  html[data-theme="dark"] .v3-btc-table[data-peer="Solana"] tbody td:nth-of-type(2)::before {
    color: #C4B5FD;
  }
  html[data-theme="dark"] .v3-btc-table[data-peer="XRP Ledger"] tbody td:nth-of-type(2)::before {
    color: #7DD3FC;
  }
  html[data-theme="dark"] .v3-btc-table[data-peer="BNB Chain"] tbody td:nth-of-type(2)::before {
    color: #FCD34D;
  }
}

/* ==========================================================================
   5-CHAIN HOMEPAGE SWITCHER & BESPOKE INTERACTIVE LABS (ETH, SOL, XRP, BNB)
   ========================================================================== */
.v3-cmp-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: var(--v3-well, #F3F6FC);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
  margin-bottom: 20px;
}

.v3-cmp-tab {
  appearance: none;
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 48px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--v3-ink, #172033);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.v3-cmp-tab:hover {
  background: var(--v3-surface, #FFFFFF);
  border-color: var(--v3-border-strong, rgba(30, 58, 138, 0.21));
}

.v3-cmp-tab strong {
  font-size: 14.5px;
  font-weight: 760;
  line-height: 1.2;
}

.v3-cmp-tab span {
  font-size: 12px;
  font-weight: 600;
  color: var(--v3-muted, #52607A);
  line-height: 1.25;
}

.v3-cmp-tab[aria-selected="true"] {
  background: var(--v3-surface, #FFFFFF);
  border-color: var(--v3-mint, #2563EB);
  box-shadow: var(--ke-shadow-sm, 0 2px 6px rgba(30, 58, 138, 0.08));
}

.v3-cmp-tab[data-chain-tab="btc"][aria-selected="true"] {
  border-color: #B45309;
}

.v3-cmp-tab[data-chain-tab="eth"][aria-selected="true"] {
  border-color: #1D4ED8;
}

.v3-cmp-tab[data-chain-tab="sol"][aria-selected="true"] {
  border-color: #6D28D9;
}

.v3-cmp-tab[data-chain-tab="xrp"][aria-selected="true"] {
  border-color: #0369A1;
}

.v3-cmp-tab[data-chain-tab="bnb"][aria-selected="true"] {
  border-color: #A16207;
}

.v3-cmp-tab:focus-visible {
  outline: 2.5px solid var(--v3-mint, #2563EB);
  outline-offset: 2px;
}

.v3-cmp-panel[hidden] {
  display: none !important;
}

/* Chain-specific table header, badge, pill, and philosophy accents */
.v3-btc-table thead th.col-eth { color: #1D4ED8; }
.v3-btc-table thead th.col-sol { color: #6D28D9; }
.v3-btc-table thead th.col-xrp { color: #0369A1; }
.v3-btc-table thead th.col-bnb { color: #A16207; }

.v3-btc-badge.eth { background: #EBF3FF; color: #1D4ED8; }
.v3-btc-badge.sol { background: #F3EEFF; color: #6D28D9; }
.v3-btc-badge.xrp { background: #E0F2FE; color: #0369A1; }
.v3-btc-badge.bnb { background: #FEF3C7; color: #92400E; }

.v3-btc-pill.is-eth[aria-pressed="true"] { background: #1D4ED8; border-color: #1D4ED8; color: #FFFFFF; }
.v3-btc-pill.is-sol[aria-pressed="true"] { background: #6D28D9; border-color: #6D28D9; color: #FFFFFF; }
.v3-btc-pill.is-xrp[aria-pressed="true"] { background: #0369A1; border-color: #0369A1; color: #FFFFFF; }
.v3-btc-pill.is-bnb[aria-pressed="true"] { background: #A16207; border-color: #A16207; color: #FFFFFF; }

.v3-btc-phil-card.is-eth { border-top: 3px solid #2563EB; }
.v3-btc-phil-card.is-sol { border-top: 3px solid #7C3AED; }
.v3-btc-phil-card.is-xrp { border-top: 3px solid #0284C7; }
.v3-btc-phil-card.is-bnb { border-top: 3px solid #CA8A04; }

.v3-btc-phil-card.is-eth .v3-btc-phil-tag { background: #EBF3FF; color: #1D4ED8; }
.v3-btc-phil-card.is-sol .v3-btc-phil-tag { background: #F3EEFF; color: #6D28D9; }
.v3-btc-phil-card.is-xrp .v3-btc-phil-tag { background: #E0F2FE; color: #0369A1; }
.v3-btc-phil-card.is-bnb .v3-btc-phil-tag { background: #FEF3C7; color: #92400E; }

.v3-btc-job-winner.eth { background: #EBF3FF; color: #1D4ED8; }
.v3-btc-job-winner.sol { background: #F3EEFF; color: #6D28D9; }
.v3-btc-job-winner.xrp { background: #E0F2FE; color: #0369A1; }
.v3-btc-job-winner.bnb { background: #FEF3C7; color: #92400E; }

/* Bar accents for peer chains in interactive labs */
.v3-btc-bar-box.is-eth { border-color: rgba(37, 99, 235, 0.30); }
.v3-btc-bar-box.is-sol { border-color: rgba(124, 58, 237, 0.30); }
.v3-btc-bar-box.is-xrp { border-color: rgba(2, 132, 199, 0.30); }
.v3-btc-bar-box.is-bnb { border-color: rgba(202, 138, 4, 0.30); }

.v3-btc-bar-box.is-eth .v3-btc-meter-kept { background: linear-gradient(90deg, #1D4ED8 0%, #3B82F6 100%); }
.v3-btc-bar-box.is-sol .v3-btc-meter-kept { background: linear-gradient(90deg, #6D28D9 0%, #8B5CF6 100%); }
.v3-btc-bar-box.is-xrp .v3-btc-meter-kept { background: linear-gradient(90deg, #0369A1 0%, #0EA5E9 100%); }
.v3-btc-bar-box.is-bnb .v3-btc-meter-kept { background: linear-gradient(90deg, #B45309 0%, #EAB308 100%); }

/* Cross-chain sibling pill bar at top of /learn/<chain>/ guides */
.v3-chain-cross {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 14px 0 22px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--v3-well, #F3F6FC);
  border: 1px solid var(--v3-border, rgba(30, 58, 138, 0.11));
}

.v3-chain-cross-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--v3-muted, #52607A);
  margin-right: 4px;
}

.v3-chain-cross a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  background: var(--v3-surface, #FFFFFF);
  border: 1px solid var(--v3-border-strong, rgba(30, 58, 138, 0.21));
  color: var(--v3-ink, #172033) !important;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.v3-chain-cross a:hover {
  border-color: var(--v3-mint, #2563EB);
}

.v3-chain-cross a[aria-current="page"] {
  background: #0F766E;
  border-color: #0F766E;
  color: #FFFFFF !important;
}

/* Dark theme overrides for all 4 new chain accents (all WCAG AA >= 4.5:1) */
html[data-theme="dark"] .v3-cmp-tab[aria-selected="true"] {
  background: #1F2744;
  color: #F1F5FF;
}
html[data-theme="dark"] .v3-cmp-tab[data-chain-tab="btc"][aria-selected="true"] { border-color: #FFCA5C; }
html[data-theme="dark"] .v3-cmp-tab[data-chain-tab="eth"][aria-selected="true"] { border-color: #7DB2FF; }
html[data-theme="dark"] .v3-cmp-tab[data-chain-tab="sol"][aria-selected="true"] { border-color: #C4B5FD; }
html[data-theme="dark"] .v3-cmp-tab[data-chain-tab="xrp"][aria-selected="true"] { border-color: #7DD3FC; }
html[data-theme="dark"] .v3-cmp-tab[data-chain-tab="bnb"][aria-selected="true"] { border-color: #FCD34D; }

html[data-theme="dark"] .v3-btc-table thead th.col-eth { color: #93C5FD; }
html[data-theme="dark"] .v3-btc-table thead th.col-sol { color: #C4B5FD; }
html[data-theme="dark"] .v3-btc-table thead th.col-xrp { color: #7DD3FC; }
html[data-theme="dark"] .v3-btc-table thead th.col-bnb { color: #FCD34D; }

html[data-theme="dark"] .v3-btc-badge.eth,
html[data-theme="dark"] .v3-btc-phil-card.is-eth .v3-btc-phil-tag,
html[data-theme="dark"] .v3-btc-job-winner.eth { background: rgba(125, 178, 255, 0.18); color: #93C5FD; }

html[data-theme="dark"] .v3-btc-badge.sol,
html[data-theme="dark"] .v3-btc-phil-card.is-sol .v3-btc-phil-tag,
html[data-theme="dark"] .v3-btc-job-winner.sol { background: rgba(180, 155, 255, 0.18); color: #C4B5FD; }

html[data-theme="dark"] .v3-btc-badge.xrp,
html[data-theme="dark"] .v3-btc-phil-card.is-xrp .v3-btc-phil-tag,
html[data-theme="dark"] .v3-btc-job-winner.xrp { background: rgba(56, 189, 248, 0.18); color: #7DD3FC; }

html[data-theme="dark"] .v3-btc-badge.bnb,
html[data-theme="dark"] .v3-btc-phil-card.is-bnb .v3-btc-phil-tag,
html[data-theme="dark"] .v3-btc-job-winner.bnb { background: rgba(252, 211, 77, 0.16); color: #FCD34D; }

html[data-theme="dark"] .v3-btc-pill.is-eth[aria-pressed="true"] { background: #1D4ED8; border-color: #60A5FA; color: #FFFFFF; }
html[data-theme="dark"] .v3-btc-pill.is-sol[aria-pressed="true"] { background: #6D28D9; border-color: #A78BFA; color: #FFFFFF; }
html[data-theme="dark"] .v3-btc-pill.is-xrp[aria-pressed="true"] { background: #0369A1; border-color: #38BDF8; color: #FFFFFF; }
html[data-theme="dark"] .v3-btc-pill.is-bnb[aria-pressed="true"] { background: #F59E0B; border-color: #FCD34D; color: #0B1020; }

html[data-theme="dark"] .v3-chain-cross a[aria-current="page"] {
  background: #0F766E;
  border-color: #34E5C1;
  color: #FFFFFF !important;
}

/* Override articles.css main.deep p measure cap inside full-bleed interactive cards */
main.deep .v3-btc-sim p,
main.deep .v3-btc-jobs p,
main.deep .v3-btc-phil p {
  max-width: none;
}

main.deep .v3-btc-verdict,
main.deep .v3-btc-job-panel p {
  color: var(--v3-ink, #172033);
}

@media (max-width: 680px) {
  .v3-cmp-tab {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (max-width: 480px) {
  .v3-btc-card {
    padding: 16px;
  }
  .v3-btc-sim {
    padding: 14px;
  }
  .v3-btc-slider-ticks {
    font-size: 10.5px;
  }
}

@media (max-width: 420px) {
  .v3-btc-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}
