/* Crossbill Wallet site. Plain CSS, no external files. */

:root {
  --bg: #ffffff;
  --surface: #f6f5f3;
  --text: #1c1b1a;
  --muted: #55524e;
  --line: #d9d6d1;
  --accent: #9b091c;        /* from the logo's red */
  --accent-text: #ffffff;
  --accent-soft: #fbeeee;
  --done-soft: #ecf4ee;
  --done-line: #3f7a52;
  --focus: #1b5fc1;
  --code-bg: #efedea;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1e1c1b;
    --text: #ecebe8;
    --muted: #b3afa9;
    --line: #3d3a37;
    --accent: #ff8a8a;
    --accent-text: #1a0a0b;
    --accent-soft: #33191b;
    --done-soft: #182a1e;
    --done-line: #7cc293;
    --focus: #8ab4ff;
    --code-bg: #2a2725;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.wrap { max-width: 48rem; margin: 0 auto; padding: 0 1rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--code-bg);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--accent); color: var(--accent-text);
  padding: 0.5rem 1rem; border-radius: 6px; z-index: 10;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none; font-weight: 700;
}
.brand img { border-radius: 8px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); text-decoration: underline; }

/* Sections */
main > section { padding: 2.75rem 0; border-bottom: 1px solid var(--line); }
main > section:last-child { border-bottom: 0; }

.hero { padding-top: 3rem; }
.hero-row { display: flex; gap: 2rem; align-items: center; }
.hero-row > div:first-child { flex: 1; }
.hero-icon { width: 160px; height: 160px; border-radius: 24px; flex: none; }
.lede { font-size: 1.25rem; }
.fine { color: var(--muted); font-size: 0.95rem; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-block; padding: 0.65rem 1.15rem;
  border: 2px solid var(--accent); border-radius: 8px;
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--accent-soft); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); }

/* Diagrams */
.diagram { margin: 1.5rem 0 0; }
.diagram svg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.diagram figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 1rem; }
.diagram figcaption p:last-child { margin-bottom: 0; }

.d-box { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.d-accent { fill: var(--accent-soft); stroke: var(--accent); }
.d-done { fill: var(--done-soft); stroke: var(--done-line); }
.d-dashed { stroke-dasharray: 7 5; }
.d-group { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 4; }
.d-line { fill: none; stroke: var(--muted); stroke-width: 2; }
.d-arrowhead { fill: var(--muted); }
.d-divider { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 4; }
.d-strong { fill: var(--text); font: 700 19px system-ui, -apple-system, "Segoe UI", sans-serif; }
.d-step { fill: var(--text); font: 700 17px system-ui, -apple-system, "Segoe UI", sans-serif; }
.d-small { fill: var(--muted); font: 15px system-ui, -apple-system, "Segoe UI", sans-serif; }
.d-label { fill: var(--muted); font: 600 15px system-ui, -apple-system, "Segoe UI", sans-serif; }
.d-lane { fill: var(--text); font: 700 16px system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0.02em; }

/* What you need */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 2.1rem; margin-bottom: 1rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.2em;
  width: 1.25rem; height: 1.25rem; border: 2px solid var(--accent); border-radius: 4px;
}

.copy-box {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.55rem 0.75rem; margin: 0.5rem 0 0.75rem;
}
.copy-box code { background: none; padding: 0; font-size: 0.95rem; flex: 1; min-width: 0; word-break: break-all; }
.copy {
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.75rem;
}
.copy:hover { border-color: var(--accent); }

/* Install steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 1.25rem 3rem; margin-bottom: 0.5rem;
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { margin-bottom: 0.5em; }
.step-with-icon { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-with-icon > div { flex: 1; min-width: 0; }
.reg-icon { margin: 0; text-align: center; flex: none; }
.reg-icon img { display: block; margin: 0 auto 0.25rem; border-radius: 12px; }
.reg-icon figcaption { font-size: 0.8rem; color: var(--muted); }
.after { background: var(--surface); border-left: 4px solid var(--accent); padding: 0.9rem 1rem; border-radius: 0 8px 8px 0; }

/* Comparison table */
.compare { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); }
.compare thead th { border-bottom: 2px solid var(--text); }
.compare tbody th { width: 9.5rem; }

@media (max-width: 40rem) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border-bottom: 1px solid var(--line); padding: 0.75rem 0; }
  .compare th, .compare td { border: 0; padding: 0.2rem 0; }
  .compare tbody th { width: auto; font-size: 1.05rem; padding-bottom: 0.35rem; }
  .compare td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--muted); font-size: 0.85rem; }
  .compare td + td { margin-top: 0.5rem; }
}

/* Good to know */
.notes dt { font-weight: 700; margin-top: 1.1rem; }
.notes dt:first-child { margin-top: 0; }
.notes dd { margin: 0.2rem 0 0; }
.notes ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }

/* Help */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.links { padding-left: 1.2rem; margin: 0 0 1rem; }
.links li { margin-bottom: 0.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.92rem; }
.site-footer p { margin-bottom: 0.4em; }

@media (max-width: 40rem) {
  h1 { font-size: 1.9rem; }
  .hero-row { flex-direction: column-reverse; align-items: flex-start; gap: 1.25rem; }
  .hero-icon { width: 96px; height: 96px; border-radius: 18px; }
  .cols { grid-template-columns: 1fr; }
  .step-with-icon { flex-direction: column-reverse; gap: 0.5rem; }
  .reg-icon { display: flex; align-items: center; gap: 0.5rem; }
  .reg-icon img { margin: 0; width: 40px; height: 40px; border-radius: 8px; }
}

@media (max-width: 40rem) {
  .copy-box code { flex-basis: 100%; font-size: 0.88rem; }
}
