/* NSCscan — block-explorer layout for the Nodal Ledger.
   No scripts and no inline styles (CSP: style-src 'self'): menus, tabs and
   tooltips are CSS only, the chart is server-rendered SVG. Light and dark
   follow the visitor's system setting. */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --border: #e9ecef;
  --border-strong: #dee2e6;
  --text: #212529;
  --muted: #6c757d;
  /* The logo's green (#04863C): 4.7:1 on white, so it carries link text too. */
  --link: #04863c;
  --link-hover: #03652d;
  --hero-from: #0f3d27;
  --hero-to: #08281a;
  --success: #00805f;
  --success-bg: #e5f5f0;
  --warn: #8a5d00;
  --warn-bg: #fff3d6;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --tip-bg: #212529;
  --tip-text: #ffffff;
  --shadow: 0 0.5rem 1.2rem rgba(189, 197, 209, 0.2);
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1a1b1f;
    --surface-alt: #222328;
    --border: #2c2e33;
    --border-strong: #3a3c42;
    --text: #e6e6e6;
    --muted: #9aa0a6;
    --link: #3fc47a;
    --link-hover: #7fdca5;
    --hero-from: #0d2e1f;
    --hero-to: #071b12;
    --success: #3ccfa8;
    --success-bg: rgba(0, 161, 134, 0.16);
    --warn: #f0c050;
    --warn-bg: rgba(219, 154, 4, 0.16);
    --danger: #ff8a80;
    --danger-bg: rgba(220, 53, 69, 0.18);
    --tip-bg: #e6e6e6;
    --tip-text: #111214;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 0.9375rem/1.5 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0 0 0.75rem; }
code, .mono { font-family: var(--mono); font-size: 0.875em; }
hr { border: 0; border-top: 1px solid var(--border); }

.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .wrap { padding: 0 1.5rem; } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.125em;
}

.muted { color: var(--muted); }
.muted-strong { color: var(--muted); font-weight: 400; }
.small { font-size: 0.8125rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ---- Top bar ---------------------------------------------------------- */

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); font-size: 0.8125rem; color: var(--muted); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.5rem; flex-wrap: wrap; }
.topbar-note { display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar-note .sep { opacity: 0.6; }
.topbar-state { display: inline-flex; align-items: center; gap: 0.75rem; }
@media (max-width: 575px) { .topbar-note { display: none; } .topbar-row { justify-content: flex-end; } }

/* ---- Header and menus --------------------------------------------------- */

.header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: 4rem; }

.brand { display: inline-flex; align-items: center; flex: none; }
/* The owner's logo, transparent PNG at 3x; the width follows its 5.3:1 ratio. */
.brand-logo { display: block; height: 2.25rem; width: auto; }
.footer .brand-logo { height: 1.75rem; }
@media (max-width: 575px) { .header .brand-logo { height: 1.9rem; } }

.nav { display: flex; align-items: stretch; margin-left: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 1.35rem 0.85rem; color: var(--text); font-weight: 500;
}
.nav-link:hover, .nav-link.is-active { color: var(--link); }
.nav-drop { position: relative; display: flex; }
.nav-drop .nav-link .icon { font-size: 0.8rem; opacity: 0.7; }
.nav-menu {
  position: absolute; top: 100%; right: 0; min-width: 15rem;
  display: none; flex-direction: column; padding: 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--link);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: flex; }
.nav-menu a { padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); color: var(--text); font-size: 0.875rem; }
.nav-menu a:hover { background: var(--surface-alt); color: var(--link); }
.nav-menu-rule { border-top: 1px solid var(--border); margin: 0.35rem 0.5rem; }

.nav-mobile { display: none; margin-left: auto; position: relative; }
.nav-mobile summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 1.25rem; color: var(--text);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 14rem;
  display: flex; flex-direction: column; padding: 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.nav-mobile-panel a { padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); color: var(--text); }
.nav-mobile-panel a:hover { background: var(--surface-alt); }

@media (max-width: 991px) {
  .nav { display: none; }
  .nav-mobile { display: block; }
  .header-row { flex-wrap: wrap; padding: 0.6rem 0; gap: 0.75rem; }
  .search-compact { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---- Search ----------------------------------------------------------- */

.search {
  display: flex; align-items: stretch; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 0.55rem; overflow: hidden;
}
.search:focus-within { border-color: var(--link); }
.search select {
  border: 0; border-right: 1px solid var(--border); background: var(--surface-alt); color: var(--text);
  font: inherit; font-size: 0.8125rem; padding: 0 0.6rem; cursor: pointer;
}
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; padding: 0.55rem 0.75rem; outline: none;
}
.search input::placeholder { color: var(--muted); }
.search button {
  border: 0; background: var(--link); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 0.9rem; font-size: 1.05rem;
}
.search button:hover { background: var(--link-hover); }
.search-compact { flex: 1; max-width: 34rem; }
.search-compact input { padding: 0.45rem 0.65rem; font-size: 0.875rem; }
.search-hero { margin: 1rem 0 0.75rem; border-color: transparent; border-radius: 0.6rem; box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18); }
.search-hero input { padding: 0.8rem 0.9rem; font-size: 0.9375rem; }
.search-hero select { padding: 0 0.85rem; }
.search-hero button { padding: 0 1.15rem; font-size: 1.2rem; }
@media (max-width: 575px) { .search select { max-width: 6.5rem; } }

/* ---- Hero and the statistics card -------------------------------------- */

.hero {
  color: #fff;
  background-color: var(--hero-from);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, var(--hero-from), var(--hero-to));
  background-size: 18px 18px, auto;
  padding: 2.25rem 0 5.25rem;
}
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: center; }
@media (min-width: 992px) { .hero-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; } }
.hero h1 { font-size: 1.3rem; font-weight: 500; }
.hero-hint { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.72); margin: 0; }
.hero-hint code { color: #fff; background: rgba(255, 255, 255, 0.12); padding: 0.05rem 0.35rem; border-radius: 0.25rem; }
.hero-aside {
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06); padding: 1rem 1.15rem; font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
}
.hero-aside p { margin-bottom: 0.6rem; }
.hero-aside-title { display: flex; align-items: center; gap: 0.45rem; color: #fff; font-weight: 500; }
.hero-aside a { color: #9be7bd; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; }
.hero-aside a:hover { color: #fff; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 0.9375rem; font-weight: 600; }
.card-head p { margin: 0; }
.card-head-split { justify-content: space-between; flex-wrap: wrap; }
.card-body { padding: 1rem 1.25rem; }
.card-foot {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.75rem; border-top: 1px solid var(--border); background: var(--surface-alt);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.card-foot:hover { color: var(--link); }
.card-foot-bar { display: flex; justify-content: flex-end; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); }

.stats-card {
  margin-top: -3.4rem; position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
}
.stats-col { border-right: 1px solid var(--border); }
.stat { display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem 1.25rem; }
.stat + .stat { border-top: 1px solid var(--border); }
.stat-icon { font-size: 1.6rem; color: var(--muted); line-height: 1; padding-top: 0.15rem; }
.stat-label {
  display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--muted);
}
.stat-value { display: block; font-size: 1rem; font-weight: 500; margin-top: 0.1rem; overflow-wrap: anywhere; }
.stat-sub { font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.stats-chart { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.chart { width: 100%; height: auto; max-height: 7.5rem; display: block; }
.chart-base { stroke: var(--border-strong); stroke-width: 1; }
.chart-bar { fill: var(--link); opacity: 0.8; }
.chart-bar:hover { opacity: 1; }
.chart-axis { fill: var(--muted); font-size: 9px; font-family: inherit; }
.chart-axis-end { text-anchor: end; }
@media (max-width: 991px) {
  .stats-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-col:nth-child(2) { border-right: 0; }
  .stats-col:nth-child(3) { border-top: 1px solid var(--border); }
  .stats-chart { border-top: 1px solid var(--border); }
}
@media (max-width: 575px) {
  .stats-card { grid-template-columns: minmax(0, 1fr); }
  .stats-col { border-right: 0; border-top: 1px solid var(--border); }
  .stats-col:first-child { border-top: 0; }
}

/* ---- Latest blocks / transactions feeds -------------------------------- */

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; }
@media (min-width: 992px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.feed { list-style: none; margin: 0; padding: 0; }
.feed-row {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.6fr) auto;
  gap: 0.85rem; align-items: center; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border);
}
.feed-row:last-child { border-bottom: 0; }
.feed-icon {
  width: 3rem; height: 3rem; border-radius: 0.6rem; background: var(--surface-alt);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.35rem;
}
.feed-main, .feed-mid { display: flex; flex-direction: column; min-width: 0; }
.feed-main a, .feed-mid a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-mid > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-end { justify-self: end; }
@media (max-width: 575px) {
  .feed-row { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .feed-icon { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
  .feed-mid { grid-column: 2 / 4; grid-row: 2; }
}

/* ---- Pills, badges, tags --------------------------------------------- */

.pill, .amount-pill, .method, .tag, .tab-count {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-alt); color: var(--text);
  font-size: 0.75rem; line-height: 1.4; padding: 0.15rem 0.5rem; white-space: nowrap;
}
.pill-success { color: var(--success); background: var(--success-bg); border-color: transparent; }
.pill-danger { color: var(--danger); background: var(--danger-bg); border-color: transparent; font-weight: 500; }
.pill-link { color: var(--link); }
.pill-link:hover { border-color: var(--link); }
.amount-pill { font-weight: 500; }
.method { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; display: inline-block; text-align: center; }
.method-lg { max-width: none; font-size: 0.8125rem; padding: 0.2rem 0.6rem; }
.tag { color: var(--muted); font-family: inherit; }

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border-radius: var(--radius-sm); padding: 0.2rem 0.55rem;
  font-size: 0.75rem; font-weight: 500; line-height: 1.4; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.badge-confirmed, .badge-completed { color: var(--success); background: var(--success-bg); }
.badge-pending { color: var(--warn); background: var(--warn-bg); }
.badge-reversed { color: var(--danger); background: var(--danger-bg); }

.dir {
  display: inline-block; min-width: 2.6rem; text-align: center; border-radius: var(--radius-sm);
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em; padding: 0.15rem 0.4rem;
}
.dir-in { color: var(--success); background: var(--success-bg); }
.dir-out { color: var(--warn); background: var(--warn-bg); }

.flow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--success-bg); color: var(--success); font-size: 0.85rem;
}

/* ---- Page titles, tabs, pagination ------------------------------------ */

.page-head { padding: 1.25rem 0 0.9rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: 1.25rem; font-weight: 500; }
.address-head { display: flex; align-items: center; gap: 0.85rem; }
.address-avatar {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--link), var(--hero-from)); color: #fff; font-size: 1.25rem;
}
.address-line { margin: 0.2rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; border-radius: 0.5rem; font-size: 0.8125rem; font-weight: 500;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
}
.tab:hover { color: var(--link); }
.tab.is-active { background: var(--link); border-color: var(--link); color: #fff; }
.tab.is-active .tab-count { background: rgba(255, 255, 255, 0.2); border-color: transparent; color: #fff; }
.tab-count { padding: 0 0.4rem; font-size: 0.6875rem; }

.pager { display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.pager-btn, .pager-pos {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem;
  min-height: 1.85rem; padding: 0.2rem 0.65rem; border-radius: var(--radius-sm);
  font-size: 0.75rem; border: 1px solid var(--border-strong); background: var(--surface); color: var(--link);
}
a.pager-btn:hover { background: var(--surface-alt); }
.pager-btn.is-off { color: var(--muted); opacity: 0.55; }
.pager-pos { color: var(--text); background: var(--surface-alt); }

.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1.25rem; }
.summary-card { padding: 1rem 1.25rem; }
.summary-value { display: block; font-size: 1.2rem; font-weight: 500; margin-top: 0.2rem; }
@media (max-width: 991px) { .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Tables ----------------------------------------------------------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table-scroll .table { min-width: 56rem; }
.table th {
  text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--text);
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.875rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-alt); }
.table th.num, .table td.num { text-align: right; }
.table .sub { display: block; font-size: 0.75rem; color: var(--muted); }
.table a.mono { white-space: nowrap; }
.arrow-cell { width: 1%; padding-left: 0; padding-right: 0; text-align: center; }
.table-plain { min-width: 0; }
.table-plain td, .table-plain th { padding: 0.6rem 0.75rem; }
.empty { padding: 1.5rem 1.25rem; text-align: center; color: var(--muted); }

/* ---- Detail rows (block, transaction) ---------------------------------- */

.dl { padding: 0.75rem 1.25rem; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; padding: 0.6rem 0; }
@media (min-width: 768px) { .dl-row { grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr); gap: 1rem; } }
.dl-label { color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.dl-value { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; overflow-wrap: anywhere; }
.dl-list { flex-direction: column; align-items: flex-start; }
.dl-rule { margin: 0.6rem 0; }

.tip { position: relative; display: inline-flex; color: var(--muted); cursor: help; font-size: 0.9rem; }
.tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 0.45rem); left: -0.4rem; z-index: 30;
  width: max-content; max-width: 17rem; padding: 0.45rem 0.6rem;
  background: var(--tip-bg); color: var(--tip-text); border-radius: var(--radius-sm);
  font-size: 0.75rem; line-height: 1.4; font-weight: 400; white-space: normal;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.12s;
}
.tip:hover::after, .tip:focus::after { opacity: 1; visibility: visible; }

.step { display: inline-flex; gap: 0.25rem; margin-left: 0.25rem; }
.step-btn {
  width: 1.75rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--link);
}
a.step-btn:hover { background: var(--surface-alt); }
.step-btn.is-off { color: var(--muted); opacity: 0.5; }

.hash { font-family: var(--mono); font-size: 0.875rem; word-break: break-all; }
.hash.small { font-size: 0.8125rem; }
.copy { user-select: all; -webkit-user-select: all; cursor: text; }
.amount { font-weight: 600; }
.asset { color: var(--muted); font-weight: 400; }

.more summary { cursor: pointer; color: var(--link); font-weight: 500; padding: 0.4rem 0; list-style-position: inside; }
.more[open] summary { margin-bottom: 0.25rem; }

/* ---- Address page ----------------------------------------------------- */

.grid-tight { margin-bottom: 0.25rem; }
.balances, .facts { margin: 0; display: grid; gap: 0.85rem; }
.balance dt, .fact dt { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.balance dd, .fact dd { margin: 0.1rem 0 0; }
.balance-value { font-size: 1.05rem; font-weight: 500; }
.note { margin: 0; color: var(--muted); }

/* ---- Notices, errors, about ------------------------------------------- */

.halted { background: var(--danger-bg); color: var(--danger); border-bottom: 1px solid var(--border); padding: 0.65rem 0; font-size: 0.875rem; }
.halted .wrap { display: flex; align-items: center; gap: 0.5rem; }

.error-card { text-align: center; padding: 3rem 1.5rem; margin-top: 2rem; }
.error-icon {
  width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt); color: var(--muted); font-size: 1.75rem;
}
.error-code { font-size: 2.25rem; font-weight: 700; color: var(--muted); margin: 0; }
.error-card h1 { font-size: 1.3rem; font-weight: 500; margin-bottom: 0.9rem; }
.searched { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.1rem 0.4rem; word-break: break-all; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem;
  background: var(--link); color: #fff; padding: 0.55rem 1.1rem; border-radius: 0.5rem; font-weight: 500;
}
.btn:hover { background: var(--link-hover); color: #fff; }

.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; align-items: start; }
@media (min-width: 992px) { .about { grid-template-columns: 15rem minmax(0, 1fr); } }
.about-toc { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
@media (min-width: 992px) { .about-toc { position: sticky; top: 1rem; } }
.about-toc a { font-size: 0.875rem; }
.prose { padding: 1.25rem 1.5rem; scroll-margin-top: 1rem; }
.prose h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.75rem; }
.prose p, .prose li { line-height: 1.65; }
.prose ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.glossary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem 1.25rem; margin: 0 0 0.75rem; }
@media (min-width: 768px) { .glossary { grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.5fr); } }
.glossary dt { font-weight: 500; }
.glossary dd { margin: 0 0 0.5rem; color: var(--muted); }

#transactions, #entries { scroll-margin-top: 1rem; }

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

.footer { margin-top: 2.5rem; background: var(--surface); border-top: 1px solid var(--border); padding: 2rem 0 1.25rem; font-size: 0.875rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .footer-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } }
.footer-brand p { color: var(--muted); margin-top: 0.75rem; max-width: 34rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--link); }
.footer-note { color: var(--muted); font-size: 0.8125rem; border-top: 1px solid var(--border); padding-top: 1rem; margin: 1.5rem 0 0.75rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; color: var(--muted); font-size: 0.8125rem; }
.back-top { display: inline-flex; align-items: center; gap: 0.3rem; }

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