:root {
  --bg: #ffffff; --fg: #0a2327; --muted: #4a6266; --line: #d5e5e3; --card: #f4faf9;
  --accent: #04606a; --accent-fg: #ffffff; --sky: #027f88; --soft: #e2f4f0; --ok: #1f7a4d; --no: #b4322a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #08181a; --fg: #e4f1ef; --muted: #9dbab7; --line: #1d3a3c; --card: #0e2426; --accent: #2fc4a8; --accent-fg: #04201c; --sky: #5fd6b0; --soft: #12302f; --ok: #7fd09a; --no: #ff9b8f; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.75 -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Roboto, sans-serif; }
a { color: inherit; }
main p a, dl.dev a, footer a { color: var(--sky); text-decoration-color: color-mix(in srgb, var(--sky) 50%, transparent); }
main p a:hover, dl.dev a:hover, footer a:hover { color: var(--accent); }
main { max-width: 860px; margin: 0 auto; padding: 0 20px 48px; }
section { padding: 40px 0; border-top: 1px solid var(--line); }
section:first-child { border-top: 0; }
h1 { font-size: clamp(30px, 5.5vw, 48px); line-height: 1.2; margin: 8px 0 18px; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 3.5vw, 30px); margin: 0 0 16px; line-height: 1.3; color: var(--accent); }
@media (prefers-color-scheme: dark) { h2 { color: var(--fg); } }
h3 { font-size: 17px; margin: 0 0 8px; }
h4 { font-size: 15px; margin: 0 0 6px; color: var(--muted); }
p { margin: 0 0 12px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 860px; margin: 0 auto; padding: 14px 20px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 56px; width: auto; display: block; }
nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, nav a.alt { color: var(--fg); }
nav a.alt { border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; }
nav a:hover { color: var(--sky); }
nav { align-items: center; }
nav a.gh { display: inline-flex; align-items: center; color: var(--fg); padding: 2px; border-radius: 6px; }
nav a.gh:hover { color: var(--sky); }
nav a.gh svg { display: block; }
/* Beside the logo on wide screens, whatever the font: the menu wraps in its own column rather than dropping below. */
@media (min-width: 761px) {
  .top { flex-wrap: nowrap; }
  .top nav { justify-content: flex-end; row-gap: 4px; }
}
.kicker { color: var(--sky); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; margin: 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; background: var(--card); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.15); }
.btn:not(.primary):hover { border-color: var(--sky); color: var(--sky); }
.small, .caption { font-size: 14px; color: var(--muted); }
.cards, .two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 16px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 8px; }
.card h3 { color: var(--accent); }
@media (prefers-color-scheme: dark) { .card h3 { color: var(--fg); } }
.card ul, .two ul { padding-left: 20px; margin: 0 0 10px; }
.card.no h3 { color: var(--no); } .card.yes h3 { color: var(--ok); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 20px 0 0; }
.steps li { position: relative; padding-left: 52px; margin-bottom: 18px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-weight: 700; display: grid; place-items: center; }
.flow { width: 100%; height: auto; margin: 12px 0 8px; font-size: 15px; }
.flow .box rect { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.flow .box text { fill: var(--fg); font-weight: 600; }
.flow .wallet rect { fill: var(--soft); stroke: var(--sky); }
.flow .op rect { stroke-dasharray: 4 4; }
.flow .arrow path { fill: none; stroke: var(--fg); stroke-width: 1.5; color: var(--fg); }
.flow .arrow text { fill: var(--muted); font-size: 13px; }
.flow .ledger path { stroke: var(--muted); color: var(--muted); stroke-dasharray: 5 4; }
.flow .note { fill: var(--sky); font-size: 14px; font-weight: 600; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; color: var(--muted); font-weight: 600; }
thead th:last-child { color: var(--sky); }
tbody th { font-weight: 600; min-width: 7em; }
dl.dev dt { font-weight: 600; margin-top: 12px; }
dl.dev dd { margin: 2px 0 0; color: var(--muted); }
code { font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.contact { background: var(--soft); border-radius: 14px; padding: 32px 24px; border-top: 0; margin-top: 24px; }
.contact .field input, .contact .field textarea { background: var(--bg); }
footer { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .flow { font-size: 18px; } .flow .arrow text { font-size: 16px; } .flow .note { font-size: 17px; } }
form#contact-form { margin: 18px 0 8px; max-width: 560px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.submit { cursor: pointer; }
.submit:disabled { opacity: 0.6; cursor: wait; }
.form-status { min-height: 1.5em; margin-top: 10px; font-size: 15px; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--no); }

/* Hero: deep teal with the mark glowing on the right, the words on the left. Lighter than black so it sits with the light page. */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #ffffff;
  background: radial-gradient(ellipse 60% 90% at 78% 50%, #0b4a4e 0%, rgba(11, 74, 78, 0) 70%), linear-gradient(120deg, #0c3a40 0%, #07262b 50%, #041518 100%); }
.hero-bg { position: absolute; top: 0; bottom: 0; right: 0; width: 56%; height: 100%; object-fit: contain; object-position: right center; z-index: -1;
  filter: drop-shadow(0 0 28px rgba(40, 200, 160, 0.4)) drop-shadow(0 0 80px rgba(40, 200, 160, 0.25)); }
.hero-inner { max-width: 860px; margin: 0 auto; padding: 72px 20px 72px; }
.hero h1 { color: #ffffff; font-size: clamp(30px, 5vw, 46px); max-width: 560px; text-wrap: balance; }
.hero .kicker { color: #86e3c4; }
.hero .lead { color: rgba(255, 255, 255, 0.86); max-width: 520px; }
.hero .small { color: rgba(255, 255, 255, 0.7); }
.hero .btn { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.6); }
.hero .btn:hover { border-color: #ffffff; color: #ffffff; }
.hero .btn.primary { background: #4fd0a2; color: #04201c; border-color: #4fd0a2; }
@media (max-width: 760px) {
  .hero-bg { position: relative; display: block; width: 100%; height: auto; margin: 0 auto -56px; max-width: 480px; }
  .hero-inner { padding: 0 20px 48px; }
}

/* Policy pages */
main.policy { max-width: 760px; padding-top: 24px; }
main.policy h1 { font-size: 28px; margin: 0 0 6px; }
main.policy .stamp { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
main.policy h2 { font-size: 18px; margin: 34px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); }
main.policy h2:first-of-type { border-top: 0; padding-top: 0; }
main.policy p, main.policy li { color: var(--muted); }
main.policy strong { color: var(--fg); }
main.policy ul, main.policy ol { padding-left: 1.4em; margin: 0 0 14px; }
main.policy table { margin: 0 0 16px; }
main.policy th { width: 9em; color: var(--muted); white-space: nowrap; }
main.policy .back { margin-top: 40px; font-size: 14px; }
pre { margin: 16px 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; line-height: 1.6; }
pre code { background: none; padding: 0; font-size: 13.5px; }
table.keys th { white-space: nowrap; font-weight: 400; }
table.keys tr:first-child th, table.keys tr:first-child td { border-top: 0; }

/* Narrow screens: the section links fold behind a menu button (menu.js); the language and GitHub links stay in the header. */
.top .links { display: contents; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .js .top { position: relative; flex-wrap: nowrap; }
  .js .top nav { flex-wrap: nowrap; }
  .js .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 -8px 0 -4px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--fg); cursor: pointer; }
  .js .menu-btn:focus-visible { outline: 2px solid var(--accent); }
  .js .menu-btn svg { display: block; }
  .js .menu-btn .x, .js .top.open .menu-btn .bars { display: none; }
  .js .top.open .menu-btn .x { display: block; }
  .js .top .links { display: none; }
  .js .top.open .links { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; z-index: 10; padding: 0 20px 6px; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22); }
  .js .top .links a { padding: 13px 0; font-size: 16px; color: var(--fg); border-top: 1px solid var(--line); }
  .js .top .links a:first-child { border-top: 0; }
}
