/* Raha website — palette and idiom ported from src/ui/pages/welcome.html.
   Dark by default; honors prefers-color-scheme: light. No webfonts, no
   third-party anything (scripts/check-site.mjs enforces the link policy). */

:root {
  --bg: #0e1116; --side: #12161d; --raise: #1a2029; --border: #232b37;
  --text: #dce3ec; --dim: #8b98a9; --accent: #4fd1b3; --accent-text: #4fd1b3;
  --pin: #e8b04b;
  color-scheme: dark light;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fb; --side: #ffffff; --raise: #eef1f5; --border: #d7dee8;
    /* --accent-text: 6.1:1 on --bg (WCAG AA needs 4.5) — keep it if you retune */
    --text: #1b2430; --dim: #5c6a7c; --accent: #4fd1b3; --accent-text: #0a6b57;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  max-width: 880px; margin: 0 auto; padding: 12px 24px;
}
.nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 650; color: var(--text); font-size: 17px; }
.nav .brand img { width: 26px; height: 26px; }
.nav .links { margin-left: auto; display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.nav .links a { color: var(--dim); }
.nav .links a:hover { color: var(--accent-text); text-decoration: none; }

/* Donate pill, top right. A quiet outline pill, not a filled CTA — the one
   loud button on the page stays Download. `.nav .btn.donate` (0,3,0) has to
   out-specify `.nav .links a` (0,2,1) or it loses its accent colour. */
.nav .btn.donate {
  padding: 5px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--accent-text); background: var(--side); border: 1px solid var(--border);
}
.nav .btn.donate:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.nav .links { align-items: center; }
a.brand:hover { text-decoration: none; }
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav .links { width: 100%; margin-left: 0; justify-content: flex-end; gap: 14px; }
}

/* the one line off the front page, and the way back from details.html */
.more { margin-top: 20px; color: var(--dim); font-size: 14.5px; }
.more a { font-weight: 600; }
.page-intro { padding: 48px 0 8px; }
.page-intro h1 { font-size: 34px; font-weight: 650; }
.page-intro .tagline { color: var(--dim); font-size: 17px; margin-top: 10px; max-width: 640px; }
.back { padding: 32px 0 8px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 0 24px; }
.hero h1 { font-size: 44px; font-weight: 650; letter-spacing: 0.5px; }
.hero .tagline { font-size: 20px; margin: 12px auto 6px; max-width: 640px; }
.hero .etym { color: var(--dim); font-size: 15px; max-width: 620px; margin: 0 auto; }
.hero .etym em { color: var(--accent-text); font-style: normal; }
.cta { margin: 26px 0 10px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--side); color: var(--text);
  font-weight: 550;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b241d; }
.hero .shot { margin-top: 34px; }

.shot img, figure img {
  border: 1px solid var(--border); border-radius: 12px; display: block; margin: 0 auto;
}
figure figcaption { color: var(--dim); font-size: 13.5px; text-align: center; margin-top: 10px; }

/* ---------- sections ---------- */
section { padding: 44px 0; }
section + section { border-top: 1px solid var(--border); }
h2 { font-size: 26px; font-weight: 650; margin-bottom: 18px; }
h2 a { color: inherit; }
p + p { margin-top: 12px; }
.dim { color: var(--dim); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--side); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px;
}
.card h3 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.card p { color: var(--dim); font-size: 14.5px; }
.card p b, .card p strong { color: var(--text); font-weight: 550; }

ol.rules { margin: 14px 0 14px 22px; }
ol.rules li { margin: 8px 0; }
ol.rules li::marker { color: var(--accent-text); font-weight: 650; }

dl.priv { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 10px 18px; }
dl.priv dt { color: var(--dim); font-size: 14px; padding-top: 2px; }
dl.priv dd { font-size: 15px; }
@media (max-width: 560px) {
  dl.priv { grid-template-columns: 1fr; }
  dl.priv dt { margin-top: 10px; font-weight: 600; }
}

.note {
  margin-top: 20px; padding: 14px 18px; border-left: 3px solid var(--pin);
  background: var(--side); border-radius: 0 10px 10px 0;
  color: var(--dim); font-size: 14.5px;
}

/* ---------- download ---------- */
.version { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.dl .card.yours { border-color: var(--accent); }
.dl .yours-label { color: var(--accent-text); font-size: 12.5px; font-weight: 600; display: none; }
.dl .card.yours .yours-label { display: block; margin-bottom: 4px; }
.dl h3 { margin-bottom: 6px; }
.dl .assets { list-style: none; padding: 0; margin: 0 0 10px; }
.dl .assets li { margin: 4px 0; }
.dl .assets a.picked { font-weight: 700; color: var(--accent-text); }
.pick { margin: 0 0 14px; color: var(--accent-text); font-weight: 600; }
.pick a { word-break: break-all; }
pre {
  background: var(--raise); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6;
  margin-top: 16px;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

/* ---------- keyboard ---------- */
kbd {
  display: inline-block; background: var(--raise); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 8px;
  font-size: 13px; font-family: inherit; color: var(--text); white-space: nowrap;
}
.keys { color: var(--dim); font-size: 14px; line-height: 2.2; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 36px 0 56px; text-align: center; }
.promise {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--side); font-size: 13px;
}
footer .fine { color: var(--dim); font-size: 13px; margin-top: 16px; max-width: 640px; margin-left: auto; margin-right: auto; }
