/* LapseCoin site. Same visual language as the node UI (lapsecoin/core templates_html/css/base.css):
 *  - Geist Sans for text, Geist Mono for code, hashes and paths. Tabular figures on numbers.
 *  - Near-white surfaces on a warm tinted page, 10px radius, a 1px low-contrast border.
 *  - One accent (links, focus, the active nav item). Greys are the ink at an opacity.
 *  - No gradients, glow, glass, emoji or left-edge stripes. Light only, on purpose.
 *  - Use the width: content plus a sticky "On this page" column from 1000px up,
 *    one column below. Tables scroll inside their own box on phones.
 *  - Structure follows bitcoin.org (a hero with the actions, entry points by what
 *    the visitor wants to do, a support block, a footer with link columns), kept
 *    unequal on purpose: one large panel beside smaller link lists, never a row
 *    of identical icon cards.
 */
@font-face { font-family: "Geist"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/Geist-Variable.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/geist-mono.woff2") format("woff2"); }
:root {
  --paper: #f4f1ea;
  --surface: #fffefb;
  --panel: #f7f5ef;
  --ink: #1a1813;
  --ink-rgb: 26 24 19;
  --ink-dim: #6a6558;
  --rule: rgb(var(--ink-rgb) / .09);
  --line-strong: rgb(var(--ink-rgb) / .2);
  --hover: rgb(var(--ink-rgb) / .04);
  --accent: #c2570c;
  --link: #a84a08;
  --gain: #1d7a3e;
  --loss: #b42318;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(var(--ink-rgb) / .05);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1120px;
}
* { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.6 var(--sans); font-feature-settings: "tnum" 1, "cv11" 1;
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
a { color: var(--link); text-decoration-color: rgb(168 74 8 / .35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid rgb(194 87 12 / .55); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgb(194 87 12 / .18); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 50; background: rgb(255 254 251 / .98); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.bar-in { max-width: var(--container); margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.01em; font-size: 16px; }
.brand img { width: 22px; height: 22px; display: block; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-dim); text-decoration: none; padding: 6px 10px; border-radius: 7px; font-size: 14px; transition: background .12s, color .12s; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: rgb(var(--ink-rgb) / .06); font-weight: 550; }
.ext { display: flex; gap: 6px; }
.ext a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .12s; }
.ext a:hover { background: var(--hover); }
.ext svg { width: 15px; height: 15px; fill: currentColor; }

/* grouped navigation: a disclosure that works on hover, click and keyboard */
.menu { position: relative; }
.menu-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-dim); padding: 6px 10px; border-radius: 7px; font-size: 14px; transition: background .12s, color .12s; }
.menu-btn:hover, .menu.open .menu-btn { background: var(--hover); color: var(--ink); }
.menu-btn.on { color: var(--ink); background: rgb(var(--ink-rgb) / .06); font-weight: 550; }
.menu-btn:focus-visible { outline: 2px solid rgb(194 87 12 / .55); outline-offset: 2px; }
.chev { width: 11px; height: 11px; transition: transform .12s; }
.menu.open .chev { transform: rotate(180deg); }
.menu-list { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 8px 28px rgb(var(--ink-rgb) / .12); z-index: 60; }
.menu-list a { display: block; padding: 8px 10px; border-radius: 7px; white-space: nowrap; }
.menu-list::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.menu.open .menu-list { display: block; }
@media (hover: hover) { .menu:hover .menu-list { display: block; } .menu:hover .chev { transform: rotate(180deg); } }

/* page frame */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
main { flex: 1; padding: 32px 0 56px; }
.page-head { margin-bottom: 24px; max-width: 70ch; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; text-wrap: balance; }
.nb { white-space: nowrap; }
.page-head p { color: var(--ink-dim); margin-top: 8px; font-size: 16px; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; align-items: start; }
.toc { position: sticky; top: 76px; font-size: 13px; max-height: calc(100vh - 96px); overflow: auto; }
.toc b { display: block; font-weight: 550; color: var(--ink-dim); margin-bottom: 8px; font-size: 12.5px; }
.toc a { display: block; color: var(--ink-dim); text-decoration: none; padding: 3px 0 3px 10px; border-left: 1px solid var(--rule); }
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a.on { color: var(--ink); border-left-color: var(--accent); font-weight: 550; }
.toc a.sub { padding-left: 22px; font-family: var(--mono); font-size: 12px; }
.toc a:not(.sub) { margin-top: 6px; color: var(--ink); font-weight: 550; }
.toc a:not(.sub):first-of-type { margin-top: 0; }

/* content */
.prose > section { padding: 22px 0; border-top: 1px solid var(--rule); }
.prose > section:first-child { border-top: 0; padding-top: 0; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -.015em; margin-bottom: 10px; }
h3 { font-size: 15px; font-weight: 650; margin: 18px 0 6px; }
.prose p, .prose li { max-width: 74ch; }
p + p, p + ul, p + ol, p + pre, p + .tbl, pre + p, ul + p, ol + p, .tbl + p, ul + pre, .tbl + pre { margin-top: 10px; }
ul, ol { padding-left: 1.2em; margin-top: 8px; }
li + li { margin-top: 4px; }
li::marker { color: var(--ink-dim); }
code { font: 12.5px/1.4 var(--mono); background: rgb(var(--ink-rgb) / .06); padding: 1px 5px; border-radius: 5px; overflow-wrap: break-word; }
pre { margin: 10px 0 0; padding: 12px 14px; background: #1f1c16; color: #f1ede2; border-radius: var(--radius-sm); overflow-x: auto; font: 12.5px/1.55 var(--mono); tab-size: 4; }
pre code { background: none; padding: 0; color: inherit; font: inherit; overflow-wrap: normal; }
.tbl { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 550; color: var(--ink-dim); font-size: 12.5px; background: var(--panel); }
th, td { padding: 8px 12px; vertical-align: top; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
td:first-child { white-space: nowrap; }
td:first-child code { background: none; padding: 0; font-weight: 500; }
td code { font-size: 12px; }
td:first-child { font-family: var(--mono); font-size: 12.5px; }
.tbl.wide td:first-child, .tbl.text td:first-child { font-family: var(--sans); font-size: 13.5px; white-space: normal; }

/* api endpoints */
.endpoint { padding: 16px 0; border-top: 1px solid var(--rule); scroll-margin-top: 72px; }
.endpoint:first-of-type { border-top: 0; padding-top: 4px; }
.endpoint-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.endpoint-method { font: 600 11px/1 var(--mono); letter-spacing: .04em; padding: 4px 6px; border-radius: 5px; background: rgb(29 122 62 / .12); color: var(--gain); }
.endpoint-method.post { background: rgb(194 87 12 / .13); color: var(--link); }
.endpoint-path { font: 600 14px var(--mono); overflow-wrap: anywhere; }
.endpoint-desc { max-width: 74ch; }

/* home */
.hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 48px; align-items: center; padding: 16px 0 28px; }
.hero h1 { font-size: 52px; line-height: 1.04; letter-spacing: -.035em; font-weight: 650; }
.hero .lead { color: var(--ink-dim); font-size: 19px; line-height: 1.5; max-width: 52ch; margin-top: 16px; text-wrap: pretty; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .actions { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font: inherit; font-weight: 550; font-size: 14px; background: var(--surface); cursor: pointer; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.primary { background: var(--link); border-color: var(--link); color: #fffefb; }
.btn.primary:hover { background: #8f3f06; border-color: #8f3f06; }
.glance { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 20px; }
.glance dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule); }
.glance dl > div:first-child { border-top: 0; }
.glance dt { color: var(--ink-dim); font-size: 13px; }
.glance dd b { display: block; font-size: 22px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.glance dd span { display: block; color: var(--ink-dim); font-size: 12.5px; margin-top: 2px; }

.start { padding: 8px 0 40px; scroll-margin-top: 72px; }
.start-head { margin-bottom: 18px; }
.start-head p { color: var(--ink-dim); margin-top: 4px; }
.start-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 24px; scroll-margin-top: 72px; }
.panel h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; }
.panel .tbl { background: var(--paper); }
.paths > div + div { margin-top: 22px; }
.paths h3 { margin: 0 0 2px; }

.band { padding: 40px 0; border-top: 1px solid var(--rule); scroll-margin-top: 72px; }
.cols { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; }
dl.kv { margin-top: 4px; }
dl.kv > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
dl.kv > div:first-child { border-top: 0; }
dl.kv dt { color: var(--ink-dim); font-weight: 500; }
dl.kv dd { min-width: 0; }
dl.kv code { overflow-wrap: anywhere; }
.links { list-style: none; padding: 0; margin-top: 4px; }
.links li { margin: 0; border-top: 1px solid var(--rule); }
.links li:first-child { border-top: 0; }
.links a { display: block; padding: 9px 0; text-decoration: none; color: var(--ink); }
.links a b { color: var(--link); font-weight: 550; }
.links a:hover b { text-decoration: underline; }
.links small { display: block; color: var(--ink-dim); font-size: 13px; line-height: 1.45; margin-top: 1px; }
.note { margin-top: 12px; color: var(--ink-dim); font-size: 13.5px; }

/* "Help LapseCoin get found": small boxes in the shape of the PeerPush badge */
.listed { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 24px; margin: 0 0 40px; scroll-margin-top: 72px; }
.listed .sub { color: var(--ink-dim); margin-top: 4px; }
.sites { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.site-box { flex: 0 0 230px; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); text-decoration: none; transition: border-color .12s, background .12s; }
.site-box:hover { border-color: var(--accent); background: var(--panel); }
.site-box .mark { flex: none; width: 36px; height: 36px; border-radius: 8px; }
.site-text { flex: 1; min-width: 0; }
.site-text small { display: block; color: var(--ink-dim); font-size: 12px; line-height: 1.3; }
.site-text b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.site-box .go { flex: none; align-self: flex-start; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: var(--ink-dim); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .12s; }
.site-box:hover .go { stroke: var(--accent); }
.badge-link { flex: 0 0 230px; display: block; line-height: 0; border-radius: 10px; }
.badge-img { width: 230px; max-width: 100%; height: auto; }

.support { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; align-items: center; padding: 28px 0 48px; border-top: 1px solid var(--rule); scroll-margin-top: 72px; }
.support p { color: var(--ink-dim); margin-top: 6px; max-width: 52ch; }
.addr-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.addr-row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--rule); }
.addr-row:first-child { border-top: 0; }
.addr-main { flex: 1; min-width: 0; }
.addr-label { display: block; color: var(--ink-dim); font-size: 12.5px; font-weight: 550; margin-bottom: 3px; }
.addr { display: block; background: none; padding: 0; font: 13px/1.6 var(--mono); overflow-wrap: normal; word-break: normal; user-select: all; }
.addr.token { overflow-wrap: anywhere; }
.btn.copy { flex: none; min-width: 74px; }
.btn.copy.done { color: var(--gain); border-color: rgb(29 122 62 / .5); }

footer { border-top: 1px solid var(--rule); background: var(--surface); color: var(--ink-dim); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 36px 0 28px; }
.foot-brand .brand { font-size: 16px; }
.foot-brand p { margin-top: 8px; max-width: 28ch; }
.foot-col { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.foot-col b { color: var(--ink); font-weight: 600; font-size: 13px; margin-bottom: 3px; }
footer a { color: var(--ink-dim); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
footer .brand { color: var(--ink); }
.legal { border-top: 1px solid var(--rule); padding: 16px 0 22px; font-size: 13px; }

/* downloads: the newest release large, the rest as a quiet table. The VirusTotal
 * state is a dot plus its words, never colour alone. */
.dl-latest { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: start; }
.dl-main small { color: var(--ink-dim); font-size: 13px; }
.dl-main h2 { font-size: 44px; line-height: 1.05; letter-spacing: -.03em; font-weight: 650; margin: 4px 0 18px; font-variant-numeric: tabular-nums; }
.dl-main .actions { margin-bottom: 14px; }
.dl-notes { font-size: 14px; }
.dl-facts { margin: 0; }
.dl-facts > div { padding: 10px 0; border-top: 1px solid var(--rule); }
.dl-facts > div:first-child { border-top: 0; padding-top: 0; }
.dl-facts dt { color: var(--ink-dim); font-size: 12.5px; margin-bottom: 3px; }
.dl-facts dd { margin: 0; }
.dl-facts code { font-size: 12.5px; overflow-wrap: anywhere; }
.dl-sub { display: block; color: var(--ink-dim); font-size: 12.5px; margin-top: 3px; }
.dl-h { font-size: 17px; letter-spacing: -.01em; margin: 32px 0 0; }
.dl-table { min-width: 720px; }
.dl-table td { white-space: nowrap; }
.dl-date { color: var(--ink-dim); white-space: nowrap; }
.vt { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; }
.vt i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-dim); flex: none; }
.vt.ok { color: var(--gain); }
.vt.ok i { background: var(--gain); }
.vt.warn { color: var(--loss); }
.vt.warn i { background: var(--loss); }
.vt.none { color: var(--ink-dim); font-weight: 400; }
#dl-latest + #dl-older + .note, #dl-note { margin-top: 20px; max-width: 74ch; }
@media (max-width: 1000px) { .dl-latest { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 760px) { .dl-main h2 { font-size: 36px; } .dl-main .actions .btn { flex: 1 1 100%; } }

@media (max-width: 1000px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 12px; }
  .start-grid, .cols, .support { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap, .bar-in { padding: 0 16px; }
  .bar-in { gap: 8px; height: auto; min-height: 52px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; order: 3; }
  .nav a { white-space: nowrap; padding: 6px 7px; font-size: 13.5px; }
  /* the group flattens into inline links, so the scrolling nav never clips a popup */
  .menu { display: contents; }
  .menu-btn { display: none; }
  .menu-list { display: contents; position: static; }
  .menu-list a { color: var(--ink-dim); padding: 6px 7px; font-size: 13.5px; }
  .menu-list a[aria-current="page"] { color: var(--ink); background: rgb(var(--ink-rgb) / .06); font-weight: 550; }
  .ext { order: 2; margin-left: auto; }
  .ext a { height: 30px; padding: 0 9px; }
  main { padding: 20px 0 40px; }
  h1 { font-size: 26px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 17px; }
  .hero .actions .btn { flex: 1 1 100%; }
  .glance { padding: 4px 16px; }
  .panel { padding: 18px 16px 20px; }
  .addr-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .listed { padding: 18px 16px 20px; margin-bottom: 28px; }
  .site-box, .badge-link { flex: 1 1 100%; }
  .badge-img { width: 230px; }
  .addr { font-size: 12px; }
  .btn.copy { width: 100%; height: 40px; }
  dl.kv > div { grid-template-columns: 1fr; gap: 0; }
  .foot { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 28px; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
