/* XRPL Explained – v50 – all styles live here */

:root {
  --page-scale: 1;
  --blue: #155EE0;
  --teal: #0B9A84;
  --purple: #7C2FE0;
  --bg: #F5F8FF;
  --ink: #0F172A;
  --muted: #5B6475;
  --line: #DCE1EC;
  --track: #DDE1EB;
  --card: #FFFFFF;
  --c: var(--blue);           /* active chapter colour */
  --c-soft: #E6EEFD;
  --c-dark: #0B47B3;
  --c-glow: rgba(21, 94, 224, .45);
  --radius: 18px;
}

body[data-chapter="2"] { --c: var(--teal);   --c-soft: #E1F5F1; --c-dark: #077364; --c-glow: rgba(11, 154, 132, .45); }
body[data-chapter="3"] { --c: var(--purple); --c-soft: #F0E7FD; --c-dark: #5A1BB0; --c-glow: rgba(124, 47, 224, .45); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

[hidden] { display: none !important; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 40px 36px;
  zoom: var(--page-scale);   /* whole page grows with the screen (set in app.js) */
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--c);
  transition: border-color .3s;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: .01em;
  text-decoration: none;
}

.brand strong { font-weight: 800; }

.brand-bar {
  width: 4px;
  height: 26px;
  border-radius: 2px;
  background: #18C1D6;
  margin-right: 12px;
}

.position {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.position-chip {
  background: var(--c);
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  transition: background .3s;
}

.position-slash { color: var(--c); font-size: 20px; }

/* ---------- Chapter navigation ---------- */

.chapter-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0 24px;
  margin: 26px 0 8px;
}

.chapter-sep {
  width: 2px;
  height: 52px;
  background: #C9CDD6;
}

.tab {
  --tc: var(--blue);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: #5F6368;
  text-decoration: none;
}

.tab[data-ch="2"] { --tc: var(--teal); }
.tab[data-ch="3"] { --tc: var(--purple); }

.tab-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.tab-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 4px solid var(--tc);
  flex: none;
  transition: background .2s;
}

.tab-bar {
  height: 10px;
  border-radius: 6px;
  background: var(--track);
  overflow: hidden;
}

.tab-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: var(--tc);
  border-radius: 6px;
  transition: width .35s ease;
}

.tab:hover .tab-label { color: var(--tc); }

.tab.is-active { color: var(--tc); }
.tab.is-active .tab-dot { background: var(--tc); }
.tab.is-active .tab-bar::after { width: 100%; }

.tab:focus-visible,
.page-pill:focus-visible,
.btn:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--c);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ---------- Page navigation inside a chapter ---------- */

.page-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 22px;
}

.page-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  transition: border-color .2s, background .2s;
}

.page-pill:hover { border-color: var(--c); }

.page-num {
  flex: none;
  background: var(--c-soft);
  color: var(--c);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 9px;
  border-radius: 8px;
}

.page-pill.is-active {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}

.page-pill.is-active .page-num {
  background: #fff;
  color: var(--c);
}

.page-check {
  margin-left: auto;
  font-weight: 800;
  color: var(--c);
  opacity: 0;
}

.page-pill.is-visited .page-check { opacity: 1; }
.page-pill.is-active .page-check { color: #fff; }

/* ---------- Guide view ---------- */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.guide { min-width: 0; }

.guide-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.guide-badge {
  flex: none;
  margin-top: 10px;
  background: var(--c);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  padding: 4px 12px;
  border-radius: 10px;
}

.guide-title {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
}

.guide-sub {
  margin: 6px 0 0;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  color: var(--c);
}

.panel {
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.panel img,
.panel-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* real text on the panels */
.pt {
  font-family: "Manrope", system-ui, sans-serif;
  font-kerning: normal;
}
.pt-w500 { font-weight: 500; }
.pt-w600 { font-weight: 600; }
.pt-w700 { font-weight: 700; }
.pt-w800 { font-weight: 800; }
.pt-dark  { fill: #0B0F1A; }
.pt-soft  { fill: #0F172A; }
.pt-light { fill: #FFFFFF; }
.pt-shadow { filter: drop-shadow(0 4px 6px rgba(6, 30, 90, .28)); }

.panel-caption {
  margin: 16px 0 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--c);
}

.facts {
  margin-top: 22px;
  background: var(--c-soft);
  border-radius: var(--radius);
  padding: 14px 10px 10px;
}

.facts-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px 12px;
  font-size: 26px;
  font-weight: 800;
  color: var(--c);
}

.icon {
  width: 36px;
  height: 36px;
  flex: none;
  color: var(--c);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-radius: 14px;
  padding: 18px 6px;
}

.fact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 16px;
  font-size: 17px;
  line-height: 1.35;
}

.fact + .fact { border-left: 2px solid var(--line); }

.fact .icon { width: 56px; height: 56px; }

.fact p { margin: 0; }

.hl { color: var(--c); font-weight: 800; }

.takeaway {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 22px;
  padding: 20px 28px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--c), var(--c) 55%, #2FA8F5);
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}

body[data-chapter="2"] .takeaway { background: linear-gradient(100deg, var(--teal), var(--teal) 55%, #19D3B4); }
body[data-chapter="3"] .takeaway { background: linear-gradient(100deg, #6A1FD0, var(--purple) 55%, #B26BF5); }

.takeaway-icon { width: 64px; height: 64px; color: #fff; }

.takeaway-divider {
  width: 2px;
  align-self: stretch;
  background: rgba(255, 255, 255, .7);
}

.takeaway-label {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
}

.takeaway-text {
  margin: 2px 0 0;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  line-height: 1.2;
}

.learn {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  border-top: 6px solid var(--c);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.side {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 20px;
}

.learn-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--c);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.learn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.learn-item a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px;
  border-radius: 10px;
}

.learn-item a:hover { background: var(--c-soft); }

.learn-box {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  border: 2px solid var(--c);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.learn-item.is-done .learn-box { background: var(--c); }
.learn-item.is-current a { background: var(--c-soft); font-weight: 700; }

.learn-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

.pager-count {
  font-weight: 800;
  color: var(--c);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--c);
  transition: background .2s, color .2s;
}

.btn-primary { background: var(--c); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost { background: transparent; color: var(--c); }
.btn-ghost:hover { background: var(--c-soft); }

.btn.is-hidden { visibility: hidden; }

/* ---------- Home view ---------- */

.view-home { padding-top: 26px; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 14px;
}

.hero-title {
  margin: 10px 0 14px;
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.025em;
}

.hero-accent { color: var(--blue); }

.hero-sub {
  margin: 0 0 26px;
  font-size: 19px;
  color: var(--muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-lg { padding: 15px 24px; font-size: 17px; }

.hero-stats {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 28px 0 0;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.hero-stats strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.hero-visual {
  margin: 0;
  background: #fff;
  border-radius: 26px;
  padding: 12px;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, .06),
    0 18px 36px -8px rgba(21, 94, 224, .28),
    0 44px 80px -16px rgba(15, 23, 42, .30);
}

.hero-visual img { border-radius: 18px; width: 100%; }

/* Chapters with thumbnails */

.chapters {
  display: grid;
  gap: 34px;
  margin-top: 56px;
  scroll-margin-top: 20px;
}

.chapter-row {
  --cc: var(--blue);
  --cc-soft: #E6EEFD;
}

.chapter-row[data-ch="2"] { --cc: var(--teal);   --cc-soft: #E1F5F1; }
.chapter-row[data-ch="3"] { --cc: var(--purple); --cc-soft: #F0E7FD; }

.chapter-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--cc);
}

.chapter-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid var(--cc);
  flex: none;
}

.chapter-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--cc);
  text-transform: uppercase;
}

.chapter-name {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}

.chapter-progress {
  margin: 0 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.thumb {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
  border: 2px solid transparent;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.thumb:hover {
  transform: translateY(-4px);
  border-color: var(--cc);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
}

.thumb:focus-visible { outline: 3px solid var(--cc); outline-offset: 3px; }

.thumb-img {
  display: block;
  background: #fff;
  padding: 8px;
}

.thumb-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  border-radius: 12px;
}

.thumb-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 16px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}

.thumb .page-num { background: var(--cc); color: #fff; }

.thumb-check {
  margin-left: auto;
  color: var(--cc);
  font-weight: 800;
}

.home-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.site-footer { margin-top: 40px; }

.hashtag {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--c);
  transition: color .3s;
}

.footer-rule {
  height: 2px;
  background: var(--c);
  transition: background .3s;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

.source { margin: 0; font-size: 15px; }
.source a {
  color: var(--c);
  font-weight: 600;
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.source a:hover,
.source a:focus-visible { text-decoration: none; }

.release {
  margin: 6px 0 0;
  font-size: 12px;
  color: #9AA1AE;
}

.disclaimer {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.made-by {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.made-divider {
  width: 2px;
  height: 40px;
  background: #C9CDD6;
}

.maker { display: grid; }

.maker { justify-items: center; gap: 4px; }

.maker-logo {
  width: 150px;
  height: auto;
}

.maker-handle {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}

.maker-handle:hover { color: var(--c); }

.maker-link { display: block; line-height: 0; }
.maker-link:hover .maker-logo { opacity: .85; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .page { padding: 20px 18px 28px; }
  .guide-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { transform: none; }
  .thumbs { grid-template-columns: 1fr 1fr; }
  .tab-label { font-size: 16px; gap: 10px; }
  .tab-dot { width: 20px; height: 20px; border-width: 3px; }
}

@media (max-width: 640px) {
  .brand { font-size: 20px; }
  .position { font-size: 12px; gap: 6px; }
  .chapter-nav { gap: 0 10px; }
  .chapter-sep { height: 36px; }
  .tab-label { font-size: 12px; gap: 6px; }
  .tab-dot { width: 14px; height: 14px; border-width: 3px; }
  .tab-bar { height: 7px; }
  .page-nav { grid-template-columns: 1fr; gap: 8px; }
  .thumbs { grid-template-columns: 1fr; }
  .chapter-progress { display: none; }
  .page-pill { font-size: 15px; padding: 10px 12px; }
  .pager .btn { padding: 10px 14px; font-size: 15px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .hashtag { font-size: 20px; }
  .facts-grid { grid-template-columns: 1fr; padding: 6px; }
  .fact { padding: 12px; }
  .fact + .fact { border-left: 0; border-top: 2px solid var(--line); }
  .fact .icon { width: 44px; height: 44px; }
  .takeaway { padding: 16px; gap: 14px; }
  .takeaway-icon { width: 44px; height: 44px; }
  .guide-badge { font-size: 16px; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Utilities ---------- */

.title-small {
  font-size: .55em;
  font-weight: 400;
  letter-spacing: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Share ---------- */

.share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 18px 22px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.share {
  flex-direction: column;
  align-items: flex-start;
}

.view-home .share {
  max-width: 600px;
  margin-top: 30px;
}

.share-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--c-soft);
  color: var(--c);
}

.share-badge .sicon { width: 22px; height: 22px; }

.share-sub {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.share-text {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.share-num { color: var(--c); }

.share-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid var(--c);
  background: #fff;
  color: var(--c);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.sbtn:hover { background: var(--c-soft); }

.sbtn-x {
  background: #0F172A;
  border-color: #0F172A;
  color: #fff;
}

.sbtn-x:hover { background: #26324A; }

.sbtn.is-done {
  background: var(--c);
  color: #fff;
}

.sbtn:focus-visible {
  outline: 3px solid var(--c);
  outline-offset: 3px;
}

.sicon {
  width: 18px;
  height: 18px;
  flex: none;
}

.sbtn-native { display: none; }

/* phones/tablets with a native share sheet: one Share button */
.share.is-native .sbtn { display: none; }
.share.is-native .sbtn-native { display: inline-flex; }

/* ---------- Small stats line under the header (start page only) ---------- */

.site-stats {
  margin: 10px 0 0;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.site-stats span { color: var(--ink); font-weight: 800; }

body:not([data-chapter="0"]) .site-stats { display: none; }

/* ---------- Download graphics (v21) ---------- */

.home-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);  /* same columns as .hero */
  gap: 36px;
  align-items: stretch;
  margin-top: 30px;
}

.home-row .share {
  margin-top: 0;
  max-width: 600px;
}

.dl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  text-align: left;
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sbtn-solid {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}

.sbtn-solid:hover { background: var(--c); filter: brightness(1.08); }

.dl-guide { padding: 18px; }

.dl-thumb {
  width: 96px;
  height: auto;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .08);
}

.dl-btns {
  display: grid;
  gap: 10px;
  width: 100%;
}

.dl-btns .sbtn { justify-content: center; }

@media (max-width: 900px) {
  .home-row { grid-template-columns: 1fr; gap: 20px; }
  .home-row .share { max-width: none; }
}

/* ---------- Button states (v26): hover = colour change, active = pressed, focus = ring ---------- */

.btn,
.sbtn,
.page-pill {
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

/* Solid buttons: slight resting depth, clearly darker on hover */
.btn-primary,
.sbtn-solid {
  box-shadow: 0 2px 4px rgba(15, 23, 42, .10);
}

.btn-primary:hover,
.sbtn-solid:hover {
  background: var(--c-dark);
  border-color: var(--c-dark);
  color: #fff;
  filter: none;
}

/* Outline buttons: fill with the chapter colour on hover */
.btn-ghost:hover,
.sbtn:not(.sbtn-x):not(.sbtn-solid):not(.is-done):hover {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}

/* Dark X button */
.sbtn-x:hover {
  background: #000;
  border-color: #000;
}

/* Guide pills inside a chapter */
.page-pill:not(.is-active):hover {
  border-color: var(--c);
  background: var(--c-soft);
}

/* Pressed (only while the mouse button is held) */
.btn:active,
.sbtn:active,
.page-pill:active {
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .25);
}

.btn-ghost:active,
.sbtn:not(.sbtn-x):not(.sbtn-solid):active {
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .18);
}

/* Keyboard focus keeps its own ring (outline rule above) */

/* Chapter cards on the start page: no lift, just border + shadow */
.thumb:hover { transform: none; }

.dl-num {
  color: var(--c);
  white-space: nowrap;
}

/* =====================================================================
   v27 – languages, quiz & completion card, glossary
   ===================================================================== */

.facts-title,
.takeaway-label,
.made-by { text-transform: uppercase; }

.offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Top bar: extras + language ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

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

.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}

.topnav a .sicon { width: 16px; height: 16px; color: var(--c); }
.topnav a:hover { border-color: var(--c); background: var(--c-soft); }
.topnav a.is-active { background: var(--c); border-color: var(--c); color: #fff; }
.topnav a.is-active .sicon { color: #fff; }

.lang {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--line);
}

.lang-btn {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.lang-btn:hover { color: var(--c); background: var(--c-soft); }
.lang-btn.is-active { background: var(--c); color: #fff; }
.lang-btn:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }

.dl-note { display: block; font-size: 13px; color: var(--muted); font-style: italic; }
body.lang-en .dl-note { display: none; }

/* ---------- Chapter head on the start page: progress + quiz link ---------- */

.chapter-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.chapter-meta .chapter-progress { margin: 0; }

.chapter-quiz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--cc);
  color: var(--cc);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.chapter-quiz .sicon { width: 16px; height: 16px; }
.chapter-quiz:hover,
.chapter-quiz.is-done { background: var(--cc); color: #fff; }

/* ---------- Quiz call-to-action on the start page ---------- */

.quiz-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 34px;
  align-items: center;
  margin-top: 34px;
  padding: 30px 34px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 15%, rgba(47, 123, 255, .55), transparent 55%),
    radial-gradient(circle at 92% 80%, rgba(160, 102, 255, .5), transparent 55%),
    linear-gradient(135deg, #0A1B47, #12103A 60%, #1B0B3E);
  box-shadow: 0 24px 50px -18px rgba(21, 40, 120, .55);
  overflow: hidden;
}

.quiz-cta-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #FFD66B;
}

.quiz-cta-title {
  margin: 14px 0 8px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
}

.quiz-cta-sub {
  margin: 0 0 20px;
  font-size: 17px;
  color: rgba(255, 255, 255, .78);
  max-width: 560px;
}

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

.cta-step {
  --sc: #2F7BFF;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 2px solid rgba(255, 255, 255, .14);
  color: #fff;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.cta-step[data-ch="2"] { --sc: #19C2A6; }
.cta-step[data-ch="3"] { --sc: #A066FF; }
.cta-step:hover { border-color: var(--sc); background: rgba(255, 255, 255, .14); }

.cta-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--sc);
  font-size: 13px;
  font-weight: 800;
}

.cta-step.is-done .cta-dot { background: var(--sc); font-size: 17px; }

.cta-step-text { display: grid; line-height: 1.2; min-width: 0; }
.cta-step-text b { font-size: 15px; }
.cta-step-text small { font-size: 12px; color: rgba(255, 255, 255, .7); font-weight: 600; }

.quiz-cta .btn-primary { background: #fff; border-color: #fff; color: #0A1B47; }
.quiz-cta .btn-primary:hover { background: #FFD66B; border-color: #FFD66B; color: #0A1B47; }

.quiz-cta-card {
  display: block;
  transform: rotate(4deg);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
  overflow: hidden;
}

.quiz-cta-card img { width: 100%; }

/* ---------- Guide: chapter quiz pill + terms ---------- */

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

.page-pill-quiz {
  border-style: dashed;
  border-color: var(--c);
  color: var(--c);
  white-space: nowrap;
}

.page-pill-quiz .sicon { width: 18px; height: 18px; }
.page-pill-quiz .page-check { margin-left: 4px; }

.terms {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.terms-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.terms-title .sicon { color: var(--c); }

.terms-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.term-chip {
  position: relative;
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--c-soft);
  color: var(--c-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: border-color .15s, background .15s;
}

.term-chip:hover,
.term-chip:focus-visible { border-color: var(--c); background: #fff; outline: none; }

/* definition tooltip */
.term-chip::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: 290px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0F172A;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 5;
  pointer-events: none;
}

.term-chip:hover::after,
.term-chip:focus-visible::after { opacity: 1; visibility: visible; transform: none; }

/* ---------- Quiz view ---------- */

.view-quiz,
.view-card,
.view-glossary { padding-top: 26px; }

.quiz-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.quiz-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.quiz-intro {
  margin: 6px 0 0;
  font-size: 17px;
  color: var(--muted);
}

.quiz-dots {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.qdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--track);
}

.qdot.is-done { background: var(--c); }
.qdot.is-current { box-shadow: 0 0 0 3px var(--c-soft), 0 0 0 5px var(--c); }

.quiz-box {
  max-width: 820px;
  padding: 28px 30px;
  background: var(--card);
  border-radius: 22px;
  border-top: 6px solid var(--c);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

.qcount {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c);
}

.qtext {
  margin: 8px 0 20px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

.qopts { display: grid; gap: 10px; }

.qopt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.qopt:hover:not([disabled]) { border-color: var(--c); background: var(--c-soft); }
.qopt:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.qopt[disabled] { cursor: default; }

.qopt-key {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--c-soft);
  color: var(--c);
  font-weight: 800;
}

.qopt.is-correct { border-color: #12A150; background: #E8F7EE; }
.qopt.is-correct .qopt-key { background: #12A150; color: #fff; }
.qopt.is-wrong { border-color: #D93838; background: #FDECEC; }
.qopt.is-wrong .qopt-key { background: #D93838; color: #fff; }
.qopt.is-muted { opacity: .55; }

.qfeedback {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--c-soft);
}

.qfeedback p { margin: 0 0 8px; font-size: 16px; }
.qfeedback-title { font-weight: 800; font-size: 18px !important; }
.qfeedback.is-ok .qfeedback-title { color: #12A150; }
.qfeedback.is-no .qfeedback-title { color: #D93838; }
.qfeedback-links { font-size: 14px !important; }
.qfeedback-links a { color: var(--c); font-weight: 700; }
.qfeedback .btn { margin-top: 6px; }

.quiz-result {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.score-ring {
  display: grid;
  grid-auto-flow: column;
  align-items: baseline;
  justify-content: center;
  align-content: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 10px solid var(--c);
  color: var(--c);
  flex: none;
}

.score-ring b { font-size: 48px; font-weight: 800; line-height: 1; }
.score-ring span { font-size: 22px; font-weight: 800; color: var(--muted); }
.score-ring.is-perfect { border-color: #F2B705; box-shadow: 0 0 0 6px #FFF4CC; }

.quiz-result-title { margin: 0; font-size: 28px; font-weight: 800; }
.quiz-result-sub { margin: 4px 0 0; color: var(--muted); font-size: 17px; }

.quiz-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ---------- Card view ---------- */

.card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 40px;
  align-items: start;
}

.cta-steps-col {
  grid-template-columns: 1fr;
  margin: 20px 0 0;
  max-width: 420px;
}

.view-card .cta-step {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.view-card .cta-step-text small { color: var(--muted); }
.view-card .cta-step:hover { border-color: var(--sc); background: var(--card); }
.view-card .cta-step.is-done .cta-dot { color: #fff; }

.card-maker { margin-top: 22px; max-width: 480px; }

.field-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.user-field {
  display: flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s;
}

.user-field:focus-within { border-color: var(--c); }

.user-at {
  padding: 0 4px 0 16px;
  font-size: 20px;
  font-weight: 800;
  color: var(--c);
}

.user-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 14px 14px 14px 2px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
}

.card-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.file-btn { cursor: pointer; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.photo-msg { margin: 10px 0 0; min-height: 1px; font-size: 14px; font-weight: 700; color: var(--c); }
.photo-msg.is-bad { color: #D93838; }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.card-actions .sicon { width: 20px; height: 20px; }

.btn-x { background: #0F172A; border-color: #0F172A; color: #fff; }
.btn-x:hover { background: #000; border-color: #000; color: #fff; }

.share-hint {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #E8F7EE;
  color: #0E7A3D;
  font-size: 14px;
  font-weight: 700;
}

.card-retake { margin: 14px 0 0; font-size: 14px; }
.card-retake a { color: var(--c); font-weight: 700; }

.card-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .55);
}

/* ---------- Glossary view ---------- */

.gloss-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.gloss-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
}

.gloss-search:focus-within { border-color: var(--c); }

.gloss-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}

.gloss-count { font-size: 13px; font-weight: 700; white-space: nowrap; }

.gloss-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gterm {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: var(--card);
  border-radius: 18px;
  border: 2px solid transparent;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  scroll-margin-top: 30px;
}

.gterm.is-focus { border-color: var(--blue); box-shadow: 0 0 0 5px var(--c-soft), 0 10px 28px rgba(15, 23, 42, .06); }

.gterm-title { margin: 0 0 6px; font-size: 19px; font-weight: 800; color: var(--blue); }
.gterm-def { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }

.gterm-links {
  margin: auto 0 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
}

.gterm-links a { color: var(--muted); text-decoration: none; }
.gterm-links a:hover { color: var(--blue); text-decoration: underline; }
.gterm-guide { color: var(--blue) !important; }

.gloss-empty { color: var(--muted); font-weight: 600; }

/* ---------- v27 responsive ---------- */

@media (max-width: 900px) {
  .quiz-cta { grid-template-columns: 1fr; padding: 24px; }
  .quiz-cta-card { max-width: 240px; transform: rotate(3deg); margin: 0 auto; }
  .card-layout { grid-template-columns: 1fr; }
  .card-preview { max-width: 440px; }
  .gloss-list { grid-template-columns: 1fr 1fr; }
  .page-nav { grid-template-columns: 1fr 1fr 1fr; }
  .page-pill-quiz { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 640px) {
  .topbar { margin-bottom: 10px; }
  .lang-label { display: none; }
  .topnav a { font-size: 13px; padding: 5px 10px; }
  .lang-btn { padding: 5px 8px; font-size: 12px; }
  .cta-steps { grid-template-columns: 1fr; }
  .chapter-meta { gap: 8px; }
  .page-nav { grid-template-columns: 1fr; }
  .quiz-box { padding: 20px 18px; }
  .quiz-head { flex-wrap: wrap; }
  .quiz-dots { margin-left: 0; width: 100%; }
  .gloss-list { grid-template-columns: 1fr; }
  .gloss-search { min-width: 0; width: 100%; }
  .term-chip::after { width: 230px; }
}

body:not([data-view="home"]) .site-stats { display: none; }

/* v31 – smaller photo buttons on the card page */
.sbtn-sm {
  padding: 6px 12px;
  gap: 6px;
  border-radius: 10px;
  font-size: 13px;
}

.sbtn-sm .sicon { width: 15px; height: 15px; }

/* v32 – numbered steps on the card page */
.card-steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.card-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-n {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.step-body { flex: 1; min-width: 0; }

.step-title {
  display: block;
  margin: 5px 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.card-step .card-btns { margin-top: 0; align-items: center; }
.step-or { font-size: 13px; font-weight: 700; color: var(--muted); }

.step-how {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.step-how li + li { margin-top: 4px; }

.card-step .card-actions { margin-top: 0; }

.only-touch { display: none; }
body.is-touch .only-touch { display: block; }
body.is-touch .only-desk { display: none; }

.reset-all { margin-top: 26px; }
.reset-all.is-confirm { border-color: #D93838; color: #D93838; }

/* v33 – card page: the 3 quiz results in one row, smaller intro text */
.cta-steps-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: none;
  margin-top: 16px;
}

.view-card .cta-step { padding: 7px 10px; gap: 8px; border-radius: 12px; }
.view-card .cta-dot { width: 26px; height: 26px; border-width: 2px; font-size: 11px; }
.view-card .cta-step.is-done .cta-dot { font-size: 13px; }
.view-card .cta-step-text b { font-size: 13px; }
.view-card .cta-step-text small { font-size: 11px; }

.card-maker > .quiz-intro { font-size: 14px; }

@media (max-width: 640px) {
  .cta-steps-col { gap: 6px; }
  .view-card .cta-step { flex-direction: column; text-align: center; padding: 8px 4px; }
}

/* v35 – video tour on the start page + language flags */
.hero-side { min-width: 0; }

.video-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 18px;
  overflow: hidden;
  font: inherit;
}

.video-btn img { display: block; width: 100%; height: auto; border-radius: 18px; transition: transform .25s; }
.video-btn:hover img { transform: scale(1.02); }
.video-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.play {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .35), 0 14px 30px rgba(15, 23, 42, .35);
  transition: transform .2s, background .2s;
}

.play svg { width: 36px; height: 36px; margin-left: 5px; fill: var(--blue); transition: fill .2s; }
.video-btn:hover .play { transform: scale(1.08); background: var(--blue); }
.video-btn:hover .play svg { fill: #fff; }

.tour-label {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .88);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.hero-langs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-langs-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-langs-list { display: flex; gap: 6px; flex-wrap: wrap; }

.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.flag-btn svg { width: 20px; height: 13px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.flag-btn:hover { border-color: var(--blue); }
.flag-btn.is-active { border-color: var(--blue); background: var(--blue-soft, #E8EFFC); }
.flag-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 14, 32, .86);
}

.video-modal[hidden] { display: none; }

.video-box { position: relative; width: min(1100px, 100%); }

.video-box video {
  display: block;
  width: 100%;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.video-close {
  position: absolute;
  right: -6px;
  top: -52px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.video-close:hover { background: var(--blue); color: #fff; }
.video-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .play svg { width: 28px; height: 28px; }
  .tour-label { font-size: 13px; bottom: 10px; }
  .video-close { top: -48px; right: 0; }
}

/* v36 – copyright line in the footer */
.copyright {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9AA1AE;
}

/* v37 – compact header: brand + 2 buttons + small language switch; position and progress under the line */
.site-header { gap: 14px 20px; flex-wrap: wrap; }

.head-main {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-sub {
  padding-left: 14px;
  border-left: 2px solid #CBD5E1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.site-header .topnav { gap: 8px; }
.site-header .topnav a { padding: 5px 11px; font-size: 13px; border-width: 1.5px; gap: 6px; }
.site-header .topnav a .sicon { width: 14px; height: 14px; }

.site-header .lang { gap: 6px; margin-left: auto; }
.globe { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.site-header .lang-switch { padding: 2px; border-width: 1.5px; gap: 0; }
.site-header .lang-btn { padding: 3px 8px; font-size: 11px; }

.subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.subbar .position { font-size: 13px; gap: 8px; }
.subbar .position-chip { padding: 4px 10px; border-radius: 7px; }
.subbar .position-slash { font-size: 16px; }
.subbar .site-stats { margin: 0; font-size: 13px; }

@media (max-width: 640px) {
  .head-main { display: contents; }
  .site-header { gap: 10px 8px; }
  .site-header .brand { order: 1; font-size: 19px; }
  .site-header .lang { order: 2; }
  .site-header .topnav { order: 3; width: 100%; }
  .brand-sub { display: none; }
  .globe { display: none; }
  .site-header .lang-btn { padding: 3px 6px; font-size: 10px; }
  .subbar .position { font-size: 11px; gap: 6px; }
  .subbar .site-stats { font-size: 11px; }
}

/* v38 – locked card: blurred sample card with a lock overlay */
.card-preview { position: relative; }
.card-preview.is-locked canvas { filter: blur(3px) saturate(.85); }

.card-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  border-radius: 26px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(10, 18, 48, .35), rgba(10, 18, 48, .78));
}
.card-lock[hidden] { display: none; }

.lock-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 2px solid rgba(255, 255, 255, .45);
}
.lock-icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }

.lock-title { margin: 4px 0 0; font-size: 26px; font-weight: 800; }
.lock-text { margin: 0; max-width: 320px; font-size: 16px; line-height: 1.45; color: rgba(255, 255, 255, .88); }
.lock-btn { margin-top: 8px; }

@media (max-width: 640px) {
  .card-lock { padding: 20px; gap: 10px; }
  .lock-icon { width: 60px; height: 60px; }
  .lock-icon svg { width: 28px; height: 28px; }
  .lock-title { font-size: 21px; }
  .lock-text { font-size: 14px; }
}

/* v39 – card page: links under the 3 quiz results, small Download, Share on X with feedback */
.card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  margin: 10px 0 0;
  font-size: 14px;
}
.card-links:not(:has(> :not([hidden]))) { display: none; }

.card-retake { margin: 0; color: var(--c); font-weight: 700; }
.card-retake[hidden] { display: none; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--c); }
.link-btn[hidden] { display: none; }
.reset-all { margin: 0; }
.reset-all.is-confirm { color: #D93838; border: 0; }

.card-actions { align-items: center; }
.card-actions .sbtn-sm .sicon { width: 15px; height: 15px; }

#cardShareX { transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; }
#cardShareX:hover {
  background: var(--c);
  border-color: var(--c);
  box-shadow: 0 10px 24px -10px var(--c);
  transform: translateY(-1px);
}
#cardShareX:active { transform: scale(.97); }
#cardShareX.is-shared,
#cardShareX.is-shared:hover {
  background: #0E9F6E;
  border-color: #0E9F6E;
  box-shadow: 0 10px 24px -10px #0E9F6E;
}

/* v40 – card page links: blue, normal weight, underline goes away on hover; Share on X only changes colour */
.card-links .card-retake,
.card-links .link-btn {
  color: var(--c);
  font-weight: 400;
  text-decoration: underline;
}
.card-links .card-retake:hover,
.card-links .link-btn:hover { color: var(--c); text-decoration: none; }
.card-links .link-btn.is-confirm { color: #D93838; }

#cardShareX { transition: background .2s, border-color .2s; }
#cardShareX:hover,
#cardShareX:active,
#cardShareX.is-shared,
#cardShareX.is-shared:hover { transform: none; box-shadow: none; }
#cardShareX:hover { background: var(--c); border-color: var(--c); }
#cardShareX.is-shared,
#cardShareX.is-shared:hover { background: #0E9F6E; border-color: #0E9F6E; }

/* v42 – yellow star icon on the "Get your card" button */
.site-header .topnav a .star-icon,
.site-header .topnav a.is-active .star-icon {
  fill: #F5B301;
  stroke: #E09A00;
  stroke-width: 1;
  stroke-linejoin: round;
  color: #F5B301;
}

/* v43 – translation note above the footer (hidden in English) */
.tr-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 40px 0 0;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
body.lang-en .tr-note { display: none; }

.tr-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.tr-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.tr-switch { color: var(--c); font-weight: 400; text-decoration: underline; }
.tr-switch:hover { color: var(--c); text-decoration: none; }

@media (max-width: 640px) {
  .tr-note { padding: 12px 14px; gap: 10px; }
  .tr-text { font-size: 13px; }
}

/* v43 – start-page quiz block: smaller chapter chips, gold "Create my card" button that turns blue on hover */
.quiz-cta .cta-steps { gap: 8px; margin-bottom: 24px; max-width: 560px; }
.quiz-cta .cta-step { padding: 6px 10px; gap: 8px; border-width: 1.5px; border-radius: 11px; }
.quiz-cta .cta-dot { width: 24px; height: 24px; border-width: 2px; font-size: 10px; }
.quiz-cta .cta-step.is-done .cta-dot { font-size: 12px; }
.quiz-cta .cta-step-text b { font-size: 13px; }
.quiz-cta .cta-step-text small { font-size: 11px; }

.quiz-cta .btn-primary {
  background: #FFC93C;
  border-color: #FFC93C;
  color: #0A1B47;
  transition: background .2s, border-color .2s, color .2s;
}
.quiz-cta .btn-primary:hover,
.quiz-cta .btn-primary:active {
  background: #2F7BFF;
  border-color: #2F7BFF;
  color: #fff;
  transform: none;
  box-shadow: none;
  filter: none;
}

/* v48 – XRPL live (strip under the header + "Happening right now" box in guide 5/9) */
.xrpl-live-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #12A150;
  box-shadow: 0 0 0 0 rgba(18, 161, 80, .5);
  animation: xrplPulse 1.6s infinite;
}
@keyframes xrplPulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 161, 80, .5); }
  70% { box-shadow: 0 0 0 7px rgba(18, 161, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 161, 80, 0); }
}
[data-xrpl-box][data-state="connecting"] .xrpl-live-dot { background: #F59E0B; animation: none; }
[data-xrpl-box][data-state="offline"] .xrpl-live-dot { background: #9AA1AE; animation: none; }

.xrpl-live-num { font-variant-numeric: tabular-nums; font-weight: 800; }

.xrpl-live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  margin: 12px 0 0;
  padding: 8px 16px;
  border: 1.5px solid #CFE9E2;
  border-radius: 12px;
  background: #F1FAF7;
  color: var(--ink, #0F172A);
  font-size: 13px;
  text-decoration: none;
  transition: border-color .2s;
}
.xrpl-live-strip[hidden] { display: none; }
.xrpl-live-strip:hover { border-color: #0B9A84; }
.xrpl-live-strip__label { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #0B7A5C; }
.xrpl-live-strip b { font-weight: 800; }
.xrpl-live-strip__verify { margin-left: auto; font-weight: 700; color: #0B7A5C; }
.xrpl-live-strip:hover .xrpl-live-strip__verify { text-decoration: underline; }

.xrpl-live-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
  padding: 22px 26px;
  border: 2px solid #0B9A84;
  border-radius: 18px;
  background: #fff;
}
.xrpl-live-box[hidden] { display: none; }
.xrpl-live-box__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0B7A5C;
}
.xrpl-live-box__text { margin: 0; font-size: 18px; line-height: 1.5; }
.xrpl-live-box__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.xrpl-live-box__stat { padding: 14px 16px; border-radius: 12px; background: #F1FAF7; }
.xrpl-live-box__stat-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.xrpl-live-box__stat-value { margin-top: 4px; font-size: 22px; font-weight: 800; }
.xrpl-live-box__note { margin: 0; font-size: 13px; color: var(--muted); }
.xrpl-live-box__note a { color: #0B7A5C; font-weight: 700; text-decoration: underline; }
.xrpl-live-box__note a:hover { text-decoration: none; }

@media (max-width: 640px) {
  .xrpl-live-strip { gap: 4px 14px; padding: 8px 12px; font-size: 12px; }
  .xrpl-live-strip__fee,
  .xrpl-live-strip__verify { display: none; }
  .xrpl-live-box { padding: 18px; }
  .xrpl-live-box__text { font-size: 16px; }
  .xrpl-live-box__stats { grid-template-columns: 1fr; }
}

/* v49 – XRPL live dot: green and blinking on/off while data is live */
.xrpl-live-dot { background: #12A150; box-shadow: 0 0 6px rgba(18, 161, 80, .7); animation: xrplBlink 1.2s ease-in-out infinite; }
@keyframes xrplBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .15; }
}
[data-xrpl-box][data-state="connecting"] .xrpl-live-dot { background: #F59E0B; box-shadow: none; animation: xrplBlink 1.2s ease-in-out infinite; }
[data-xrpl-box][data-state="offline"] .xrpl-live-dot { background: #9AA1AE; box-shadow: none; animation: none; opacity: 1; }

/* v50 – strip is no longer one big link: only "XRPL Explorer" is a link; dot is grey until the script starts */
[data-xrpl-box]:not([data-state]) .xrpl-live-dot { background: #9AA1AE; box-shadow: none; animation: none; }
.xrpl-live-strip:hover { border-color: #CFE9E2; }
.xrpl-live-strip__verify { color: #0B7A5C; font-weight: 700; text-decoration: underline; }
.xrpl-live-strip__verify:hover,
.xrpl-live-strip:hover .xrpl-live-strip__verify:hover { text-decoration: none; }
.xrpl-live-strip:hover .xrpl-live-strip__verify { text-decoration: underline; }
