/* Guide pages (/guides/*). Same look as the home page, plus article typography. */
:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --surface-2: #18181b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #ededef;
  --muted: #8e8e96;
  --faint: #5f5f67;
  --accent: #43c178;
  --accent-ink: #03150c;
  --accent-soft: rgba(67, 193, 120, 0.12);
  --cut: #ff7a7a;
  --cut-soft: rgba(255, 122, 122, 0.1);
  --warn: #f5b94a;
  --radius: 12px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.app { max-width: 760px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .tld { color: var(--muted); font-weight: 500; }
.brand-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.brand-sub { font-size: 12px; font-weight: 450; letter-spacing: 0; color: var(--faint); }
.top-right { display: flex; align-items: center; gap: 10px; }
.theme-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-moon { display: block; }
.top-link { font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 6px 2px; }
.top-link:hover { color: var(--ink); }

.crumbs { margin: 10px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

h1 { margin: 10px 0 0; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
h2 { margin: 34px 0 0; font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 12px 0 0; max-width: 64ch; text-wrap: pretty; }
.lead { margin-top: 12px; color: #c9c9ce; font-size: 16.5px; line-height: 1.6; }
article p:not(.lead), article li { color: #c9c9ce; }
article ul { margin: 12px 0 0; padding-left: 20px; max-width: 64ch; }
article li + li { margin-top: 6px; }
article a { color: var(--accent); text-decoration: none; }
article a:hover { text-decoration: underline; }
code { font: 0.9em var(--mono); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.note { color: var(--muted) !important; font-size: 14px; }

/* link anatomy (same as the home page) */
.anatomy { margin: 22px 0 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); overflow: hidden; }
.anat-url { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 10px; padding: 20px 18px 18px; font: 14.5px/1.5 var(--mono); }
.anat-url .keep { color: var(--ink); padding: 2px 0; overflow-wrap: anywhere; }
.anat-url .trk { display: inline-flex; flex-direction: column; gap: 5px; }
.anat-url .trk code { color: var(--cut); background: var(--cut-soft); border: 1px solid rgba(255, 122, 122, .18); border-radius: 6px; padding: 2px 7px; font-size: 14px; text-decoration: line-through; text-decoration-color: rgba(255, 122, 122, .55); }
.anat-url .trk small { font: 600 10.5px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-left: 8px; white-space: nowrap; }
.anat-clean { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(67, 193, 120, .05); }
.anat-clean svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.anat-clean code { font: 600 14.5px var(--mono); color: var(--accent); background: none; border: 0; padding: 0; }
.anat-clean span { font-size: 13px; color: var(--muted); }

/* paste box: hands the text to the cleaner on the home page (#text=, never sent to the server) */
.try { margin: 24px 0 0; padding: 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.try label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.try-row { display: flex; gap: 8px; margin-top: 10px; }
.try input { flex: 1; min-width: 0; min-height: 46px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 14px; font: 14px var(--mono); outline: none; transition: border-color .15s, box-shadow .15s; }
.try input::placeholder { color: var(--faint); }
.try input:focus { border-color: rgba(67, 193, 120, .55); box-shadow: 0 0 0 3px var(--accent-soft); }
.try button { flex: none; min-height: 46px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 14px; cursor: pointer; }
.try button:hover { background: #52cd86; }
.try button:focus-visible, .try input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.try small { display: block; margin-top: 9px; font-size: 12.5px; color: var(--faint); }

/* article */
h3 { margin: 26px 0 0; font-size: 16px; line-height: 1.35; font-weight: 650; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 0; }
.stat { padding: 14px 14px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stat b { display: block; font-size: 28px; line-height: 1; font-weight: 750; letter-spacing: -0.03em; color: var(--cut); }
.stat span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
blockquote { margin: 16px 0 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--accent); max-width: 60ch; color: var(--ink); font-size: 16.5px; line-height: 1.55; }
sup.ref { font-size: 10.5px; line-height: 0; margin-left: 1px; }
sup.ref a { color: var(--muted) !important; text-decoration: none; }
sup.ref a:hover { color: var(--accent) !important; }
blockquote cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; color: var(--muted); }
.points li + li { margin-top: 10px; }
.kicker { margin-top: 22px; font-size: 17px; font-weight: 650; color: var(--ink) !important; }
.sources-box { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line); }
.sources-box summary { cursor: pointer; width: fit-content; font-size: 13px; font-weight: 600; color: var(--muted); }
.sources-box summary:hover { color: var(--ink); }
.sources { margin: 10px 0 0; padding-left: 22px; max-width: 64ch; font-size: 13px; }
.sources li { color: var(--faint) !important; }
.sources a { color: var(--muted) !important; }
.sources li:target { background: var(--accent-soft); border-radius: 4px; }

/* link x-ray (article opening) */
.c-pay { --c: #f5b94a; } .c-where { --c: #8ab4ff; } .c-click { --c: #ff9b6a; } .c-who { --c: #ff7a7a; }
.hl { color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border-radius: 4px; padding: 1px 2px; }
.xr { margin-top: 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); overflow: hidden; }
.xr-top { padding: 16px 18px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.xr-url { padding: 2px 18px 16px; font: 15px/1.75 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.xr-keys { list-style: none; margin: 0 !important; padding: 14px 18px 16px !important; border-top: 1px solid var(--line); display: grid; gap: 9px; max-width: none !important; }
.xr-keys li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted); margin: 0 !important; }
.xr-keys b { color: var(--ink); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; margin-top: 7px; }
.xr-clean { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--accent-soft); }
.xr-clean code { font: 600 14.5px var(--mono); color: var(--accent); background: none; padding: 0; border: 0; }
.xr-clean span { font-size: 13px; color: var(--muted); }
.punch { margin-top: 22px; font-size: 21px; line-height: 1.35; font-weight: 650; letter-spacing: -0.015em; color: var(--ink) !important; max-width: 30ch; }
.punch span { color: var(--muted); font-weight: 500; }
.strip { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 14px; }
.strip > div { padding: 13px 15px; }
.strip > div + div { border-left: 1px solid var(--line); }
.strip b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.strip span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.strip span strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.strip b small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* tables */
.tbl { margin: 14px 0 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--line); }
thead th { border-top: 0; background: var(--surface); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
td { color: #c9c9ce; }
td:first-child { white-space: nowrap; }
td code { white-space: nowrap; }
.tbl-cap { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.tbl-cap a { color: var(--muted); }

/* related guides */
.more { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.more h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cards { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.cards a { display: block; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color .15s, background .15s; }
.cards a:hover { border-color: var(--line-2); background: var(--surface-2); }
.cards strong { display: block; font-size: 15px; font-weight: 600; }
.cards span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }

/* footer (same as the home page) */
.foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.facts li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.facts svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: 12.5px; color: var(--faint); }
.foot-mark { font-weight: 650; color: var(--muted); letter-spacing: -0.01em; text-decoration: none; }
.foot-mark span { font-weight: 500; color: var(--faint); }

@media (max-width: 560px) {
  h1 { font-size: 27px; }
  .xr-url { font-size: 13.5px; padding: 2px 14px 14px; }
  .xr-top, .xr-keys, .xr-clean { padding-left: 14px !important; padding-right: 14px !important; }
  .punch { font-size: 18.5px; }
  .strip { grid-template-columns: 1fr; }
  .strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .strip > div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; }
  .strip span { margin-top: 0; }
  .stats { grid-template-columns: 1fr; }
  .stat { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; padding: 12px 13px; }
  .stat b { font-size: 22px; }
  .stat span { margin-top: 0; }
  .lead { font-size: 16px; }
  .anat-url { display: grid; grid-template-columns: auto 1fr; gap: 9px 12px; align-items: center; font-size: 13.5px; padding: 16px 14px 14px; }
  .anat-url .keep { grid-column: 1 / -1; padding: 0 0 4px; }
  .anat-url .trk { display: contents; }
  .anat-url .trk code { justify-self: start; }
  .anat-url .trk small { padding-left: 0; }
  .try-row { flex-direction: column; }
  .try button { width: 100%; }
  th, td { padding: 9px 11px; }
  td:first-child, td code { white-space: normal; }
  .foot { margin-top: 30px; padding-top: 20px; }
  .facts { gap: 8px 16px; }
  .facts li { font-size: 12.5px; }
  .foot-bottom { margin-top: 14px; }
}

/* light theme: set by theme.js (device setting by default, header button to switch) */
html[data-theme="light"] { --bg: #f6f6f4; --surface: #ffffff; --surface-2: #efefec; --line: rgba(0, 0, 0, 0.08); --line-2: rgba(0, 0, 0, 0.15); --ink: #18181b; --muted: #5c5c64; --faint: #85858d; --accent: #17874a; --accent-ink: #ffffff; --accent-soft: rgba(23, 135, 74, 0.1); --cut: #cf3f3f; --cut-soft: rgba(207, 63, 63, 0.09); --warn: #a86a12; color-scheme: light; }
html[data-theme="light"] .c-pay { --c: #a86a12; }
html[data-theme="light"] .c-where { --c: #2f63c8; }
html[data-theme="light"] .c-click { --c: #c4561f; }
html[data-theme="light"] .c-who { --c: #cf3f3f; }
html[data-theme="light"] .hl { color: color-mix(in srgb, var(--c) 72%, #000); }
html[data-theme="light"] .lead, html[data-theme="light"] article p:not(.lead), html[data-theme="light"] article li, html[data-theme="light"] td { color: #3f3f46; }
html[data-theme="light"] .try button:hover { background: #12733e; }
html[data-theme="light"] .anat-url .trk code { border-color: rgba(207, 63, 63, .2); }
html[data-theme="light"] .xr-clean { background: var(--accent-soft); }
html[data-theme="light"] .coffee { background: rgba(214, 150, 70, .16) !important; color: #7a4d14 !important; }
html[data-theme="light"] .coffee svg { color: #b8741f !important; }
html[data-theme="light"] .coffee .crypto { color: rgba(122, 77, 20, .7) !important; border-left-color: rgba(184, 116, 31, .35) !important; }
html[data-theme="light"] dialog.dn-sheet { background: #ffffff !important; }
html[data-theme="light"] dialog.dn-sheet::backdrop { background: rgba(0, 0, 0, .35) !important; }
html[data-theme="light"] .dn-grab { background: #d4d4d8 !important; }
html[data-theme="light"] .btn.primary:hover, html[data-theme="light"] .dn-copy:hover { background: #12733e !important; }


/* ---- donate ---- */
.support { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 14px; }
.support-text { order: 2; margin: 0; font-size: 12px; color: var(--faint); line-height: 1.4; }
.coffee {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px;
  border: 0; border-radius: 999px; background: rgba(232, 170, 92, .20);
  color: #f6dcb6; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: color .15s, background .15s;
}
.coffee:hover { color: #fff0dc; background: rgba(232, 170, 92, .30); }
.coffee:focus-visible { outline: 2px solid rgba(232, 170, 92, .7); outline-offset: 2px; }
.coffee svg { width: 15px; height: 15px; color: #f0b46a; flex: none; }
.coffee .crypto { font: 500 10.5px var(--mono); color: rgba(246, 220, 182, .6); border-left: 1px solid rgba(240, 180, 106, .35); padding-left: 7px; }
@media (max-width: 560px) {
  .coffee { min-height: 40px; font-size: 13px; }
}
dialog.dn-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: min(100%, 440px); max-height: 92vh; overflow: auto;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0;
  background: #121214; color: var(--ink);
}
dialog.dn-sheet::backdrop { background: rgba(0, 0, 0, .62); }
dialog.dn-sheet:focus, dialog.dn-sheet:focus-visible { outline: none; }
.dn-grab { width: 38px; height: 4px; border-radius: 4px; background: #3a3a40; margin: 0 auto 12px; }
.dn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dn-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.dn-head h2 svg { width: 22px; height: 22px; color: var(--accent); }
.dn-close { width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.dn-close:hover { background: var(--surface-2); color: var(--ink); }
.dn-sub { margin: 4px 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.dn-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.dn-tab { border: 0; background: none; padding: 9px 0; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 38px; }
.dn-tab[aria-selected="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.dn-pay { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.dn-qr { flex: none; width: 148px; height: 148px; padding: 6px; border-radius: 12px; background: #fff; }
.dn-qr-svg { display: block; width: 100%; height: 100%; }
.dn-info { min-width: 0; }
.dn-net { display: inline-block; font: 600 10.5px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 3px 7px; }
.dn-accepts { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dn-addr { margin-top: 6px; font: 12.5px/1.5 var(--mono); color: var(--ink); word-break: break-all; user-select: all; }
.dn-copy { margin-top: 14px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; cursor: pointer; }
.dn-copy:hover { background: #52cd86; }
.dn-copy svg { width: 17px; height: 17px; }
.dn-copy.copied { background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(67, 193, 120, .5); }
.dn-warn { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.dn-warn b { color: var(--warn); font-weight: 600; }
.dn-foot { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.dn-foot span { display: inline-flex; align-items: center; gap: 6px; }
.dn-foot svg { width: 12px; height: 12px; color: var(--accent); }
@media (min-width: 561px) {
  dialog.dn-sheet { inset: 0; margin: auto; height: max-content; border-bottom: 1px solid var(--line-2); border-radius: 18px; padding: 20px 22px 20px; }
  .dn-grab { display: none; }
}
/* ---- end donate ---- */
