/* ---------------------------------------------------------------
   NightTrader — beginner's guide
   Loaded *after* site.css, which supplies the theme tokens, header,
   nav, footer and buttons. This file only adds the plain-English
   page's own layout: roomier measure, warmer surfaces, no monospace
   in the body copy.
   Every colour here comes from a site.css custom property, so light
   and dark parity is inherited rather than re-specified.
----------------------------------------------------------------*/

/* Narrower, roomier measure than the technical page's gutter layout. */
.bg-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.bg-page {
  font-size: 17.5px;
  line-height: 1.72;
}
.bg-page section {
  padding: 66px 0;
  border-bottom: 1px solid var(--rule);
}
.bg-page section:last-of-type {
  border-bottom: 0;
}

.bg-page h1,
.bg-page h2,
.bg-page h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.bg-page h1 {
  font-size: clamp(34px, 6.2vw, 56px);
  line-height: 1.09;
}
.bg-page h2 {
  font-size: clamp(26px, 4vw, 35px);
  line-height: 1.21;
  margin-bottom: 16px;
}
.bg-page h3 {
  font-size: 20px;
  line-height: 1.32;
  margin-bottom: 8px;
}
.bg-page p {
  margin: 0 0 20px;
}
.bg-page p:last-child {
  margin-bottom: 0;
}

.bg-big {
  font-size: 20.5px;
  color: var(--ink2);
}
.bg-small {
  font-size: 15px;
  color: var(--grey);
}
.bg-eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-ink);
  margin-bottom: 20px;
}

/* ---------- hero ---------- */
.bg-hero {
  padding: 60px 0 54px;
}
.bg-hero .bg-big {
  max-width: 60ch;
}
.bg-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ---------- the two-key safe ---------- */
.safe {
  border: 1px solid var(--rule);
  background: var(--surface);
  margin-top: 42px;
}
.safe-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--grey);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.safe-body {
  padding: 32px 20px;
  text-align: center;
}
.safe-lid {
  display: inline-block;
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 26px 30px 22px;
  background: var(--highlight);
  min-width: min(100%, 330px);
}
.safe-holes {
  display: flex;
  gap: 26px;
  justify-content: center;
}
.safe-hole-wrap {
  text-align: center;
}
.safe-hole {
  background: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1;
}
.safe-hole[aria-pressed='true'] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-orange);
}
.safe-hole-l {
  font-size: 12.5px;
  color: var(--grey);
  margin-top: 10px;
  display: block;
}

.safe-timer {
  margin-top: 22px;
  font-size: 14.5px;
  color: var(--grey);
}
.safe-tbtn {
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  background: none;
  color: var(--ink);
  cursor: pointer;
  margin-inline-start: 8px;
  min-height: 38px;
}
.safe-tbtn[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.safe-status {
  padding: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.4;
  text-align: start;
}
.safe-verdict {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}
.safe-verdict.is-open {
  color: var(--orange-ink);
}
.safe-why {
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--grey);
  line-height: 1.62;
  display: block;
}

/* ---------- cards, steps, warnings ---------- */
.bg-card {
  background: var(--highlight);
  border: 1px solid var(--rule);
  padding: 22px 24px;
  margin: 24px 0;
}
.bg-card p:last-child {
  margin-bottom: 0;
}
.bg-pull {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
}

ol.bg-steps {
  list-style: none;
  counter-reset: s;
  margin: 26px 0 0;
  padding: 0;
}
ol.bg-steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 24px 56px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
ol.bg-steps li:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
ol.bg-steps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--on-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
}
ol.bg-steps p {
  margin: 0;
  font-size: 16.5px;
}

.bg-warn {
  border-inline-start: 4px solid var(--orange);
  padding: 2px 0 2px 20px;
  margin: 22px 0;
}
[dir='rtl'] .bg-warn {
  padding: 2px 20px 2px 0;
}
.bg-warn h3 {
  margin-bottom: 6px;
}
.bg-warn p {
  font-size: 16.5px;
  margin-bottom: 0;
  color: var(--ink2);
}

/* ---------- comparison ---------- */
.bg-vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.bg-vs > div {
  border: 1px solid var(--rule);
  padding: 22px;
}
.bg-vs .is-ours {
  background: var(--highlight);
}
.bg-vs h3 {
  margin-bottom: 12px;
}
.bg-vs ul {
  margin: 0;
  padding-inline-start: 20px;
}
.bg-vs li {
  margin-bottom: 10px;
  font-size: 16px;
}

/* ---------- fees ---------- */
.bg-fees {
  border: 1px solid var(--rule);
  margin: 24px 0;
}
.bg-fees > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.bg-fees > div:last-child {
  border-bottom: 0;
}
.bg-fee-amt {
  font-family: var(--serif);
  font-size: 21px;
  white-space: nowrap;
  color: var(--ink);
}
.bg-fee-lbl {
  font-size: 15.5px;
}
.bg-fee-eg {
  font-size: 13.5px;
  color: var(--grey);
  width: 100%;
}

/* ---------- night band ---------- */
.bg-night {
  background: var(--night);
  border-bottom: 0 !important;
}
.bg-night h2,
.bg-night h3 {
  color: #fff;
}
.bg-night p {
  color: #b4bcc9;
}
.bg-night .bg-eyebrow {
  color: var(--orange);
}
.bg-night a {
  color: #fff;
}
.bg-night a:hover {
  background: var(--orange);
  color: var(--night);
}
.bg-night .bg-card {
  background: #111a2b;
  border-color: #1f2a40;
}
.bg-night .bg-card p {
  color: #c9cfda;
}

/* ---------- glossary ---------- */
dl.bg-gloss {
  margin: 24px 0 0;
}
dl.bg-gloss dt {
  font-family: var(--serif);
  font-size: 19px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink);
}
dl.bg-gloss dd {
  margin: 6px 0 0;
  font-size: 16.5px;
  color: var(--ink2);
}

/* ---------- cross-link banner to the technical page ---------- */
.bg-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 14px;
  color: var(--grey);
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 700px) {
  .bg-page {
    font-size: 16.5px;
  }
  .bg-vs {
    grid-template-columns: 1fr;
  }
  .safe-holes {
    gap: 18px;
  }
  .safe-hole {
    width: 64px;
    height: 64px;
  }
  .bg-page section {
    padding: 52px 0;
  }
}

/* ---------------------------------------------------------------
   Explainer figures
   Six small diagrams that carry the concepts the prose struggles
   with. All are pure CSS + text — no images, no third-party
   requests — and every colour is a site.css token, so light/dark
   parity and RTL come for free. Logical properties throughout so
   the Arabic layout mirrors without special-casing.
----------------------------------------------------------------*/

.bgv {
  border: 1px solid var(--rule);
  background: var(--surface);
  margin: 30px 0 0;
  padding: 0;
}
.bgv-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--grey);
}
.bgv-body {
  padding: 24px 18px;
}
.bgv figcaption {
  padding: 13px 18px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--grey);
}
.bgv-night {
  background: #111a2b;
  border-color: #1f2a40;
}
.bgv-night .bgv-head,
.bgv-night figcaption {
  border-color: #1f2a40;
  color: #9aa4b5;
}

/* Shared: a row of tappable stage buttons under a diagram. */
.bgv-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.bgv-step {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.3;
  padding: 9px 10px;
  min-height: 40px;
  border: 1px solid var(--rule);
  background: none;
  color: var(--grey);
  cursor: pointer;
  text-align: center;
  overflow-wrap: anywhere;
}
.bgv-step:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.bgv-step[aria-pressed='true'] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-orange);
  font-weight: 600;
}
.bgv-note {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink2);
  min-height: 3em;
}

/* ---------- 1. recovery timer gauge ---------- */
.gauge-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 7px;
}
.gauge-track {
  position: relative;
  height: 34px;
  border: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  width: var(--level, 100%);
  background: var(--orange);
  transition: width 0.45s ease;
}
.gauge-fill.is-empty {
  background: var(--orange-ink);
}
/* The locktime threshold: the point the fill drains toward. */
.gauge-zero {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--ink);
}
.gauge-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--grey);
}
.gauge-state {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

/* ---------- 2. what you actually approve ---------- */
.abar-track {
  display: flex;
  height: 54px;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.abar-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: center;
  padding: 0 6px;
  min-width: 0;
  overflow-wrap: anywhere;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}
.abar-signed {
  width: 20%;
  background: var(--orange);
  color: var(--on-orange);
  font-weight: 600;
}
.abar-rest {
  width: 80%;
  background: var(--paper);
  color: var(--grey);
}
/* Custodial contrast: the whole balance becomes reachable. */
.abar-track.is-custodial .abar-signed,
.abar-track.is-custodial .abar-rest {
  background: var(--orange-ink);
  color: var(--paper);
}
.abar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--grey);
  gap: 12px;
}

/* ---------- 3. pooled wallet vs your own key ---------- */
.pool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pool-side {
  border: 1px solid var(--rule);
  padding: 16px 14px;
  min-width: 0;
}
.pool-side.is-ours {
  background: var(--highlight);
}
.pool-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 12px;
}
.pool-people {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.pool-person {
  flex: 1 1 0;
  min-width: 24px;
  border: 1px solid var(--rule);
  padding: 6px 2px 4px;
  text-align: center;
  font-size: 13px;
  line-height: 1.15;
  color: var(--grey);
}
.pool-person.is-you {
  border-color: var(--orange);
  background: var(--paper);
  color: var(--ink);
}
.pool-person small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.pool-arrow {
  text-align: center;
  color: var(--grey);
  font-size: 15px;
  line-height: 1;
  margin: 2px 0 8px;
}
.pool-vault {
  border: 2px solid var(--ink);
  padding: 13px 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--paper);
}
.pool-vault.is-pot {
  border-style: solid;
}
.pool-vault .pool-coins {
  display: block;
  font-size: 17px;
  margin-bottom: 3px;
  letter-spacing: 0.1em;
}
.pool-slip {
  margin-top: 10px;
  border: 1px dashed var(--rule);
  padding: 7px 8px;
  font-size: 12px;
  color: var(--grey);
  text-align: center;
}
.pool-keyrow {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}
.pool-key {
  border: 2px solid var(--ink);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
.pool-key.is-yours {
  background: var(--orange);
  border-color: var(--orange);
}

/* ---------- 4. the air gap ---------- */
.gap-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.gap-dev {
  border: 2px solid var(--ink);
  padding: 14px 10px;
  text-align: center;
  min-width: 0;
}
.gap-dev.is-offline {
  background: var(--highlight);
}
.gap-dev b {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: var(--ink);
}
.gap-dev span {
  font-size: 12.5px;
  color: var(--grey);
}
.gap-void {
  border-inline-start: 2px dashed var(--orange);
  height: 100%;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-inline-start: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-ink);
  text-align: center;
}
.gap-qr {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-auto-rows: 5px;
  gap: 1px;
  margin-bottom: 6px;
}
.gap-qr i {
  background: var(--ink);
}
.gap-qr i:nth-child(2),
.gap-qr i:nth-child(4),
.gap-qr i:nth-child(9) {
  background: transparent;
}

/* ---------- 5. what the ID check sends ---------- */
.proof-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.proof-box {
  border: 1px solid var(--rule);
  padding: 14px 12px;
  text-align: center;
  min-width: 0;
}
.proof-box.is-device {
  border-color: var(--orange);
  background: rgba(247, 147, 26, 0.07);
}
.proof-h {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 8px;
}
.proof-doc {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}
.proof-stays {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--orange-ink);
}
.proof-wire {
  text-align: center;
  color: var(--grey);
  font-size: 11px;
  font-family: var(--mono);
}
.proof-token {
  display: inline-block;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: var(--on-orange);
  padding: 3px 8px;
  font-size: 11.5px;
  margin-bottom: 4px;
  white-space: nowrap;
}
.bgv-night .proof-box {
  border-color: #2b3752;
}
.bgv-night .proof-box.is-device {
  border-color: var(--orange);
  background: rgba(247, 147, 26, 0.1);
}
/* This figure keeps a dark ground in BOTH themes, so accent text inside it
   must not use --orange-ink, which is deliberately dark in the light theme. */
.bgv-night .proof-stays {
  color: var(--orange);
}
.bgv-night .proof-h,
.bgv-night .proof-wire {
  color: #8a94a8;
}
.bgv-night .proof-doc {
  color: #e6e9ef;
}

/* ---------- 6. what a fee actually costs ---------- */
.fscale-track {
  position: relative;
  height: 30px;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.fscale-cut {
  height: 100%;
  background: var(--orange);
  width: 0.125%;
  min-width: 3px;
}
.fscale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--grey);
  gap: 10px;
}
.fscale-labels b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
}

@media (max-width: 620px) {
  .pool,
  .gap-row,
  .proof-row {
    grid-template-columns: 1fr;
  }
  .gap-void {
    border-inline-start: 0;
    border-block-start: 2px dashed var(--orange);
    min-height: 0;
    padding-inline-start: 0;
    padding-block-start: 10px;
    flex-direction: row;
    gap: 8px;
  }
  .gap-qr {
    margin-bottom: 0;
  }
  .bgv-step {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gauge-fill,
  .abar-seg {
    transition: none;
  }
}
