/* P2P Trade Bot website. Colours follow the bot's own control panel. */
:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #eeefea;
  --line: #e1e3dc;
  --ink: #141816;
  --text: #2b312d;
  --muted: #646d67;
  --accent: #1f6f5c;
  --accent-hover: #185a4a;
  --accent-ink: #ffffff;
  --accent-soft: #e3efe9;
  --good: #1f7a4d;
  --warn-bg: #fbefd4;
  --warn: #7a5000;
  --bad-bg: #fbe3e1;
  --bad: #a3231c;
  --info-bg: #e7eef5;
  --info: #23507a;
  --radius: 8px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(20, 24, 22, .04), 0 12px 32px -12px rgba(20, 24, 22, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131614;
    --surface: #1a1e1b;
    --surface-2: #232824;
    --line: #2d332f;
    --ink: #eef1ee;
    --text: #d3d9d4;
    --muted: #97a09a;
    --accent: #4fb296;
    --accent-hover: #63c4a8;
    --accent-ink: #0d110f;
    --accent-soft: #1c2e27;
    --good: #6fcf97;
    --warn-bg: #3a2f14;
    --warn: #f2c14e;
    --bad-bg: #3d1f1d;
    --bad: #f28b82;
    --info-bg: #1d2a38;
    --info: #9cc3ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; font-weight: 650; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.05rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3, .h3 { font-size: 1.15rem; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.break { overflow-wrap: anywhere; }
.lead { font-size: 1.15rem; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prose-block { max-width: 70ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5em 1em; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--accent); }
@media (max-width: 560px) { .nav { gap: 16px; } .bar { padding-top: 10px; padding-bottom: 10px; } }

main { min-height: 60vh; }
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; }
.footer-grid nav a { color: var(--text); text-decoration: none; }
.footer-grid nav a:hover { color: var(--accent); }
.brand-line { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); margin-bottom: .4em; }
.fine { margin-top: 28px; color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .6em 1.15em;
  border: 1px solid var(--accent); border-radius: 6px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--muted); color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 1em; }

/* home */
.hero { padding-top: 72px; }
.hero-text { max-width: 720px; }
.hero-text h1 { max-width: 16ch; }
.hero-shot { margin: 48px 0 0; }
@media (max-width: 600px) { .hero { padding-top: 40px; } .hero-shot { margin-top: 32px; } }

.shot { margin: 0; }
.shot img { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }

.section { padding-top: 96px; }
@media (max-width: 600px) { .section { padding-top: 64px; } }
.section > h2 { margin-bottom: .4em; }
.section-intro { color: var(--muted); max-width: 60ch; margin-bottom: 2em; }

.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { margin-top: 24px; }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature-text p { max-width: 52ch; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
}

.message { margin: 0; }
.message pre {
  margin: 0; padding: 18px 20px; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px;
  box-shadow: var(--shadow); font: .92rem/1.55 var(--mono); color: var(--ink); white-space: pre-wrap;
}
.message figcaption { margin-top: 10px; color: var(--muted); font-size: .85rem; }

dl { margin: 0; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.pairs > div, .rows > div { padding: 16px 0; border-top: 1px solid var(--line); }
dt { font-weight: 600; color: var(--ink); }
dd { margin: 4px 0 0; color: var(--text); }
@media (max-width: 760px) { .pairs { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 48px; } }

.steps { padding-left: 1.3em; margin: 0 0 1em; }
.steps li { padding-left: .3em; margin-bottom: .6em; }
.plain { padding-left: 1.2em; max-width: 70ch; }
.plain li { margin-bottom: .5em; }

.pricing { display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
.price-block { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.price { font-size: 1.1rem; color: var(--muted); margin: .2em 0 1em; }
.price span { font-size: 3rem; font-weight: 650; color: var(--ink); letter-spacing: -.03em; margin-right: .15em; }
.checks { list-style: none; padding: 0; margin: 0 0 1.6em; }
.checks li { padding: 8px 0 8px 28px; border-top: 1px solid var(--line); position: relative; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.price-notes { padding-top: 8px; }
.price-notes h3 { margin-top: .4em; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; gap: 40px; } .price-block { padding: 24px; } }

.faq details { border-top: 1px solid var(--line); max-width: 780px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 1.4em; }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-weight: 400; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; max-width: 68ch; }

.guide-list { list-style: none; padding: 0; margin: 0 0 1.2em; max-width: 780px; }
.guide-list li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.guide-list a { font-weight: 600; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list.big li { padding: 20px 0; }
.guide-list.big a { font-size: 1.15rem; }

/* documents and guides */
.doc-layout { padding-top: 56px; }
.doc-layout.has-toc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; max-height: calc(100vh - 48px); overflow: auto; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.toc-box { display: flex; flex-direction: column; gap: 6px; }
.toc-box a { display: block; margin-top: 6px; }
.toc-title { font-weight: 600; color: var(--ink); margin-bottom: .3em; list-style: none; cursor: default; }
.toc-title::-webkit-details-marker { display: none; }
@media (max-width: 1000px) { .doc-layout.has-toc { display: block; } .toc { position: static; max-height: none; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line); } }

.narrow > h1, .narrow > .prose, .checkout, .account { padding-top: 56px; }
.prose { max-width: 72ch; }
.prose h1 { margin-bottom: .5em; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 600; }
.prose pre { background: var(--surface-2); padding: 14px 16px; border-radius: 6px; overflow-x: auto; font-size: .88rem; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); }
.license { white-space: pre-wrap; font-size: .85rem; line-height: 1.55; }
.crumbs { font-size: .9rem; margin: 0; padding-top: 40px; }
.crumbs + .prose h1, .narrow .crumbs + .prose { padding-top: 12px; }
.byline { font-size: .9rem; margin-top: -.6em; }
.cta { margin: 56px 0 0; padding: 24px 0 8px; border-top: 1px solid var(--line); max-width: 72ch; }
.related { margin-top: 40px; }
.related h2 { font-size: 1.15rem; }

/* forms, alerts, tables */
.form { display: flex; flex-direction: column; gap: 10px; max-width: 460px; margin: 1.5em 0 2em; }
label { font-weight: 600; color: var(--ink); font-size: .95rem; }
label.check { font-weight: 400; color: var(--text); display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 8px; }
label.check input { margin-top: .35em; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
input[type=email], input[type=text], input[type=password], input:not([type]) {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form .button { align-self: flex-start; margin-top: 6px; }
.form .small { margin: -4px 0 4px; }
.inline-form .row { display: flex; gap: 8px; margin: 6px 0; }
.inline-form .row input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .inline-form .row { flex-direction: column; } }

.alert { padding: 12px 14px; border-radius: 6px; font-size: .95rem; }
.alert.error { background: var(--bad-bg); color: var(--bad); }
.alert.info { background: var(--info-bg); color: var(--info); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; }

/* order page */
.checkout h1 { margin-bottom: .4em; }
.amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: .2em 0 .5em; }
.amount .mono { font-size: clamp(2.2rem, 1.6rem + 3vw, 3.2rem); font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.amount .unit { font-size: 1.3rem; color: var(--muted); }
.live { padding: 12px 14px; background: var(--accent-soft); border-radius: 6px; color: var(--ink); }
.live #countdown { display: block; font-size: .88rem; }
.copy { margin-left: 4px; min-height: 32px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font: 500 .8rem/1.4 var(--sans); cursor: pointer; vertical-align: middle; }
.copy:hover { border-color: var(--muted); }
.copy.done { color: var(--good); border-color: var(--good); }
.pay-option { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.pay-option h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag { font-size: .78rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; letter-spacing: 0; }
.address { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); }
.address:first-of-type { border-top: 0; }
.address-text { min-width: 0; }
.address .net { font-weight: 600; color: var(--ink); margin-bottom: .2em; }
.address .mono { margin-bottom: .5em; }
.address .copy { margin-left: 0; }
.qr { flex: none; width: 132px; height: 132px; background: #fff; border-radius: 6px; padding: 6px; }
.qr:empty { display: none; }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }
@media (max-width: 520px) { .address { flex-direction: column; align-items: flex-start; } }

/* account */
.account-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.downloads { list-style: none; padding: 0; margin: 1.2em 0 2.4em; }
.downloads li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.downloads li:last-child { border-bottom: 1px solid var(--line); }
.dl-text { min-width: 0; }
.dl-text p { margin: 0 0 .15em; }
.dl-name { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
@media (max-width: 560px) { .downloads li { flex-direction: column; align-items: flex-start; } }

/* admin */
.admin { padding-top: 40px; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 40px; margin: 16px 0 32px; }
.admin-stats p { margin: 0; color: var(--muted); }
.stat { display: block; font-size: 1.6rem; font-weight: 650; color: var(--ink); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 40px; }
@media (max-width: 800px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-table td { font-size: .88rem; }
.mark-paid { display: flex; gap: 8px; align-items: center; }
.mark-paid input { min-height: 32px; padding: 4px 8px; width: 120px; }
.status { font-weight: 600; }
.s-paid { color: var(--good); }
.s-underpaid { color: var(--bad); }
.s-expired { color: var(--muted); }

.message-page { padding-top: 80px; }

.checkout > form { margin: 1.4em 0 1em; }
.checkout .crumbs { padding-top: 0; }

/* phones */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .hero-text h1 { max-width: none; }
  .lead { font-size: 1.06rem; }
  .actions .button { flex: 1 1 auto; }
  .feature { padding: 28px 0; }
  .shot img { border-radius: 6px; }
  .message pre { font-size: .82rem; padding: 14px 16px; }
  .price span { font-size: 2.5rem; }
  .price-block { padding: 20px; }
  .amount .mono { font-size: 2.1rem; }
  .qr { width: 150px; height: 150px; }
  .admin-stats { gap: 20px; }
  .footer-grid { gap: 20px; }
}
/* the docs table of contents folds away on small screens */
@media (max-width: 1000px) {
  .toc-title { cursor: pointer; list-style: none; }
  .toc-title::after { content: " +"; color: var(--muted); font-weight: 400; }
  .toc-box[open] .toc-title::after { content: " 3"; }
}
