:root {
  --bg: #f7f7f4;
  --panel: #ffffff;
  --text: #1f2a37;
  --muted: #5a6572;
  --line: #e5e7eb;
  --brand: #1d6f3e;
  --brand-soft: #eaf5ee;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
}
.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
}
.brand-wrap {
  flex: 0 0 auto;
  padding: 0;
}
.brand {
  color: var(--brand);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
  padding: 0;
}
.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.main-nav a:hover {
  color: var(--brand);
}
.mobile-menu {
  display: none;
}
.site-main {
  padding: 2rem 0 3rem;
}
.site-main .container {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
}
.site-main h1, .site-main h2, .site-main h3 {
  color: var(--brand);
  line-height: 1.3;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}
.site-main p, .site-main li {
  color: var(--text);
}
.site-main a {
  color: var(--brand);
}
.site-main img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}
.site-footer {
  background: #eef2f6;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 1rem, 1100px);
  }

  .header-row {
    gap: 0.5rem;
    min-height: 3.5rem;
  }

  .brand-wrap {
    padding: 0.55rem 0;
    min-width: 0;
  }

  .brand {
    display: block;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .mobile-menu summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu[open] summary {
    background: var(--brand-soft);
    border-color: #cfe6d7;
    color: var(--brand);
  }

  .menu-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(86vw, 320px);
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    padding: 0.55rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(31, 42, 55, 0.16);
  }

  .mobile-nav {
    display: grid;
    gap: 0.15rem;
  }

  .mobile-nav a {
    display: block;
    padding: 0.6rem 0.7rem;
    border-radius: 7px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.35;
  }

  .mobile-nav a:hover,
  .mobile-nav a:focus-visible {
    background: var(--brand-soft);
    color: var(--brand);
  }

  .site-main {
    padding-top: 1rem;
  }

  .site-main .container {
    padding: 1.2rem;
  }
}
/* Reading support for the expanded information pages. */
body { font-size: 17px; }
.article-content {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > blockquote {
  width: min(100%, 820px);
  margin-inline: auto;
}
.article-content > blockquote {
  padding-inline: 1.25rem;
  border-left: 4px solid var(--brand);
}
.article-content > h2,
.article-content > h3,
.article-content > h4 {
  width: min(100%, 820px);
  margin-inline: auto;
}
.article-content > h1 { margin-top: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.article-content h2 { scroll-margin-top: 6rem; padding-top: .5rem; }
.article-content h3 { scroll-margin-top: 6rem; }
.main-nav { gap: .55rem .75rem; align-items: center; font-size: .94rem; }
.main-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-underline-offset: .3em; }
.lang-switcher { display: flex; flex: 0 0 auto; gap: .55rem; padding: 0; font-size: .78rem; }
.lang-link { text-decoration: none; font-weight: 700; color: var(--text); }
.lang-link.active { color: var(--brand); }
.lang-link.unavailable { color: var(--muted); opacity: .55; cursor: default; }
.topic-menu { position: relative; }
.topic-menu summary { cursor: pointer; font-weight: 600; padding: .2rem 0; }
.topic-menu-panel { position: absolute; right: 0; top: 100%; width: 260px; padding: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px #1f2a3720; }
.topic-menu-panel a { display: block; padding: .4rem .5rem; }
.article-toc { margin: 1.5rem 0 2rem; padding: 1.1rem 1.3rem; background: var(--brand-soft); border-radius: 8px; }
.article-toc ul { margin: .5rem 0 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.article-toc li { break-inside: avoid; margin-bottom: .25rem; }
.table-scroll { overflow-x: auto; margin: 1.3rem 0; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.55; }
th, td { padding: .75rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 8rem; }
th { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.formula { width: min(100%, 820px); margin: 1.2rem auto; padding: 1rem 1.2rem; background: #f2f5f8; border-left: 4px solid var(--brand); font-size: 1.1rem; font-weight: 600; line-height: 1.8; }
.notice { margin: 1rem 0 1.5rem; padding: 1rem 1.2rem; border: 1px solid #cfddc8; border-left: 4px solid var(--brand); background: #f4f8f1; border-radius: 6px; }
.edition-note { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted) !important; }
.site-main img[src$=".svg"] { display: block; width: 100%; max-width: 440px; margin: 1.5rem auto; }
a:focus-visible, summary:focus-visible, .table-scroll:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 20; background: white; padding: .7rem; color: var(--brand); }
.skip-link:focus { top: 1rem; }
.site-footer p { margin: .3rem 0; font-size: .95rem; }
.site-footer a { color: var(--brand); }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .article-content > blockquote {
    width: 100%;
    padding-left: 1rem;
    padding-right: 0;
  }
  .article-content h2, .article-content h3 { scroll-margin-top: 5rem; }
  .article-toc ul { columns: 1; }
  .article-toc { padding: 1rem; }
  th, td { padding: .6rem .7rem; }
  .formula { font-size: 1rem; padding: .8rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Accessible diagrams for P2P credit paths and account balances. */
.article-content .p2p-figure { max-width: 680px; margin: 1.5rem auto; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: #f9fbf9; overflow-x: auto; }
.article-content .p2p-figure img[src$=".svg"] { display: block; width: 100%; max-width: none; height: auto; margin: 0 auto; border-radius: 0; }
.article-content .p2p-figure figcaption { max-width: 76ch; margin: .3rem .6rem .4rem; color: var(--muted); font-size: .87rem; line-height: 1.5; }
@media (max-width: 620px) { .article-content .p2p-figure img[src$=".svg"] { min-width: 530px; } }

/* Full-width sequential credit-line infographic: readable on desktop, scrollable on phones. */
.article-content .p2p-figure.p2p-figure-wide { max-width: 1040px; }
.article-content .p2p-figure.p2p-figure-wide img[src$=".svg"] { min-width: 820px; }

/* Embedded supporting videos. */
.article-content .video-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100%, 820px);
  margin: 1.5rem auto 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid #cfe6d7;
  border-left: 5px solid var(--brand);
  border-radius: 10px;
  background: var(--brand-soft);
}
.article-content .video-callout-icon {
  display: grid;
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 1rem;
  line-height: 1;
}
.article-content .video-callout p { margin: 0; }
.article-content .video-callout a { font-weight: 700; }
.article-content .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem auto 2rem;
  max-width: 1040px;
}
.article-content .anchor-target { display: block; scroll-margin-top: 6rem; }
.article-content .video-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbf9;
}
.article-content .video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}
.article-content .video-card figcaption {
  padding: .75rem 1rem .9rem;
  color: var(--text);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .article-content .anchor-target { scroll-margin-top: 5rem; }
  .article-content .video-grid { grid-template-columns: 1fr; }
}

/* One page tree replaces the separate desktop and mobile menus. */
.site-header .header-row { min-height: 4.2rem; }
.site-header .header-lang-switcher { margin-left: auto; }
.site-menu { flex: 0 0 auto; }
.site-menu > summary {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--brand);
}
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu[open] > summary { background: var(--brand-soft); }
.site-sidebar {
  position: fixed;
  z-index: 15;
  top: 4.2rem;
  bottom: 0;
  left: 0;
  width: min(290px, calc(100vw - 1rem));
  padding: 1.1rem .8rem 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: 6px 0 20px #1f2a3714;
}
.site-sidebar-title { margin: 0 .5rem .8rem; color: var(--muted); font-size: .85rem; }
.site-sidebar ul { list-style: none; margin: 0; padding: 0; }
.site-sidebar ul ul { margin-left: .75rem; padding-left: .5rem; border-left: 1px solid #cfe6d7; }
.site-sidebar a { display: block; padding: .45rem .5rem; border-radius: 5px; color: var(--text); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.site-sidebar a:hover { background: var(--brand-soft); }
.site-sidebar a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
@media (min-width: 1200px) {
  body:has(.site-menu[open]) .site-main,
  body:has(.site-menu[open]) .site-footer { padding-left: 290px; }
}
@media (max-width: 700px) {
  .site-header .header-row { min-height: 3.5rem; gap: .4rem; }
  .site-sidebar { top: 3.5rem; }
  .site-menu > summary { padding: .45rem; font-size: .85rem; gap: .3rem; }
  .site-header .brand { font-size: clamp(.82rem, 3.5vw, 1.05rem); }
  .site-header .lang-switcher { gap: .35rem; font-size: .7rem; }
}

/* Offline-network illustrations are local educational demos. */
.offline-network-devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 1040px; margin: 1.5rem auto; }
.offline-network-device { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.site-main .offline-network-device img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; margin: 0; border-radius: 0; }
.offline-network-device figcaption { padding: 1rem; font-size: .9rem; }
.offline-network-device-category { color: var(--brand); font-weight: 700; font-size: .8rem; }
.site-main .offline-network-device h3 { margin: .4rem 0 .65rem; font-size: 1.05rem; }
.offline-network-device p { margin: 0 0 .8rem; }
.offline-network-devices-relays { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 950px) { .offline-network-devices { grid-template-columns: 1fr; max-width: 620px; } }
.offline-network-diagram {
  max-width: 820px;
  margin: 1.75rem auto;
  padding: clamp(.7rem, 2vw, 1.4rem);
  border: 1px solid #cfe6d7;
  border-radius: 12px;
  background: #f4f8f5;
}
.offline-network-diagram svg { display: block; width: 100%; height: auto; }
.offline-network-diagram figcaption { color: var(--brand); }
.offline-network-diagram p { font-size: .94rem; }
.offline-network-link { fill: none; stroke: #c6cfd5; stroke-width: 2; }
.offline-network-radio { fill: none; stroke: #267fc7; stroke-width: 4; }
.offline-network-finance { fill: none; stroke: #208652; stroke-width: 4; stroke-dasharray: 9 5; }
.offline-network-node circle { fill: white; stroke: #768a80; stroke-width: 2; }
.offline-network-node text { fill: #243e31; font: bold 20px Arial, sans-serif; text-anchor: middle; }
.offline-network-node .offline-network-offline { fill: #63716a; font: 16px Arial, sans-serif; }
.offline-network-node.offline-network-active circle { fill: #d6eafa; stroke: #267fc7; stroke-width: 5; }
.offline-network-arrow { fill: #267fc7; font-size: 28px; text-anchor: middle; }
.offline-network-green { fill: #208652; }
.offline-network-controls { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.offline-network-diagram button { font: inherit; font-size: .9rem; border: 1px solid #aac9b6; background: white; color: var(--brand); border-radius: 7px; padding: .6rem .8rem; cursor: pointer; }
.offline-network-diagram button[aria-pressed="true"] { background: var(--brand); color: white; }
.offline-network-diagram button:disabled { opacity: .55; cursor: default; }
.offline-network-diagram button:focus-visible { outline: 3px solid #267fc7; outline-offset: 3px; }
.offline-network-status { padding: .8rem; border-left: 3px solid #267fc7; background: white; min-height: 4rem; }
.offline-network-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-weight: 700; }
.offline-network-legend span:first-child { color: #267fc7; }
.offline-network-legend span:last-child { color: #208652; }
.offline-network-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; padding: 0; list-style: none; counter-reset: payment-stage; }
.offline-network-stages li { counter-increment: payment-stage; border: 1px solid var(--line); background: white; padding: .8rem; border-radius: 6px; font-size: .9rem; }
.offline-network-stages li::before { content: counter(payment-stage) '. '; font-weight: 700; }
.offline-network-stages li[aria-current="step"] { border: 2px solid #267fc7; }
.offline-network-stages .offline-network-complete { background: var(--brand-soft); border-color: #aac9b6; }
.offline-network-diagram [hidden] { display: none; }
.offline-network-configurations { max-width: 820px; margin: 1.5rem auto; }
.offline-network-configuration h3 { margin-top: 0; font-size: 1.12rem; }
.offline-network-distance { text-anchor: middle; font: bold 21px Arial, sans-serif; fill: #267fc7; }
.offline-network-range { padding: .8rem 1rem; background: white; border-radius: 6px; }
.offline-network-range strong { color: var(--brand); font-size: 1.2rem; }
.offline-network-configuration-note { font-size: .94rem; }
.offline-network-gateway-path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.offline-network-gateway-path li { position: relative; border: 1px solid #b7d4e8; border-radius: 6px; background: white; padding: .75rem .5rem; font-size: .88rem; }
.offline-network-gateway-path li p { font-size: .83rem; margin: .5rem 0 0; }
.offline-network-gateway-path li:not(:last-child)::after { content: '↔'; position: absolute; left: calc(100% + .15rem); top: .65rem; color: #267fc7; }
.offline-network-gateway-layer { padding: .8rem 1rem; border-left: 4px solid #267fc7; background: #eaf3fa; }
.offline-network-financial-layer { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 700px) {
  .offline-network-gateway-path { grid-template-columns: 1fr; gap: 1.5rem; }
  .offline-network-gateway-path li:not(:last-child)::after { content: '↕'; top: 100%; left: calc(50% - .4rem); }
}
@media (max-width: 550px) {
  .offline-network-stages { grid-template-columns: 1fr; }
}

.application-link { font-weight: 700; white-space: nowrap; color: var(--brand); }
@media (max-width: 550px) { .application-link { font-size: .85rem; } }
