/* 16ane account. Brand tokens shared with 16ane.net and the explorer; design in
   account/DESIGN.md. Every text pair is AA in both modes. */
:root {
  color-scheme: light dark;
  --ground: #f7f7fb;
  --raised: #ffffff;
  --rule: #e3e3ef;
  --rule-strong: #c9c9de;
  --ink: #1b194f;
  --muted: #5a5a80;
  --link: #1b194f;
  --teal: #13b9ad;      /* marks and focus only, never text on light */
  --good: #0a6e67;
  --bad: #9c2b1f;
  --wash-good: #e3f6f4;
  --wash-bad: #fbeae7;
  --alarm: #9c2b1f;
  --alarm-ink: #ffffff;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #13123f;
    --raised: #1c1b55;
    --rule: #2e2c6a;
    --rule-strong: #3d3b80;
    --ink: #eeeefa;
    --muted: #a5a8d8;
    --link: #c7c9f5;
    --good: #13b9ad;
    --bad: #ff9d8f;
    --wash-good: rgba(19, 185, 173, .14);
    --wash-bad: rgba(255, 157, 143, .12);
    --alarm: #7d1f15;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
:lang(hi) body, body:lang(hi) { line-height: 1.7; }
a { color: var(--link); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; padding: 10px 16px; background: var(--ink); color: var(--ground); border-radius: 8px; z-index: 5; }
.skip:focus { top: 8px; }
.mono, code, pre { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
[hidden] { display: none !important; }

/* Top bar */
.top { border-bottom: 1px solid var(--rule); background: var(--raised); }
.top-inner { max-width: 44rem; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; margin-right: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; order: 3; width: 100%; }
.nav:empty { display: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; font-weight: 600; font-size: 15px; }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--teal); }
.nav .quiet { margin-left: auto; }
@media (min-width: 40rem) { .nav { order: 0; width: auto; } .brand { margin-right: 0; } .nav .quiet { margin-left: 8px; } }
.lang { display: flex; margin-left: auto; border: 1px solid var(--rule-strong); border-radius: 10px; overflow: hidden; }
.lang button { margin: 0; padding: 0 10px; min-height: 36px; min-width: 44px; border: 0; background: transparent; color: var(--ink); font: 600 14px/1 var(--sans); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.net { max-width: 44rem; margin: 0 auto; padding: 0 16px 10px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.net-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* Page */
.page { max-width: 44rem; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 20px; }
.page:focus { outline: none; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 18px; line-height: 1.3; margin: 0 0 10px; }
:lang(hi) h1, :lang(hi) h2 { letter-spacing: 0; line-height: 1.45; }
p { margin: 0 0 12px; }
.state { font-size: 18px; margin: 32px 0; }

.card { background: var(--raised); border: 1px solid var(--rule); border-radius: 14px; padding: 20px; }
.card > :last-child { margin-bottom: 0; }

/* Forms */
label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
input, select {
  width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 10px;
  background: var(--ground); color: var(--ink); font: inherit;
}
input.mono { font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; margin-top: 16px;
  border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--ground);
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
}
button.secondary, .button.secondary { background: transparent; color: var(--ink); }
button.quiet { min-height: 36px; padding: 0 10px; margin: 0; border-color: var(--rule-strong); background: transparent; color: var(--ink); font-size: 14px; }
button.danger { background: var(--alarm-ink); color: var(--alarm); border-color: var(--alarm-ink); }
button:disabled { opacity: .5; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 0 12px; }
form.inline { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: end; margin-top: 8px; }
form.inline label { grid-column: 1 / -1; }
form.inline button { margin-top: 0; }
.status { min-height: 1.55em; margin: 12px 0 0; font-size: 15px; }
.status:empty { min-height: 0; margin: 0; }
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }
.status a { color: inherit; }

/* Welcome */
.welcome { padding: 24px 0; }
.welcome-mark { display: block; margin-bottom: 20px; }
.welcome h1 { font-size: clamp(28px, 6vw, 38px); max-width: 18ch; }
.lede { font-size: 18px; color: var(--muted); max-width: 36rem; }
.welcome .small { margin-top: 24px; }

/* Home */
.hero .label { margin: 0 0 4px; color: var(--muted); font-size: 14px; font-weight: 600; }
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 18px; }
.address .mono { font-size: 14px; }
.address a { font-size: 14px; }
.balance { font-size: clamp(40px, 11vw, 56px); font-weight: 700; line-height: 1.1; margin: 0 0 8px; letter-spacing: -.02em; }
.balance .unit { font-size: .45em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tokens { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); }
.faucet .status { margin-top: 8px; }
.activity { list-style: none; margin: 0 0 12px; padding: 0; }
.activity li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.activity li:first-child { border-top: 0; }
.activity .kind { font-weight: 600; }
.activity .kind.activityReceived { color: var(--good); }
.activity time { color: var(--muted); font-size: 14px; text-align: right; }
.activity a { grid-column: 1 / -1; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* Banners: the alarm is the one loud thing in the app */
.banner { border-radius: 14px; padding: 18px 20px; }
.banner h2 { margin-bottom: 6px; }
.banner.setup { background: var(--wash-good); border: 1px solid var(--rule); }
.banner-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: baseline; }
.checklist li.done span:last-child { color: var(--muted); text-decoration: line-through; }
.tick { font-size: 12px; font-weight: 700; color: var(--good); border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; }
.banner.alarm { background: var(--alarm); color: var(--alarm-ink); }
.banner.alarm .status { color: var(--alarm-ink); }
.banner.alarm button { margin-top: 4px; }

/* Security */
.keys { list-style: none; margin: 0 0 8px; padding: 0; }
.keys li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.keys li:first-child { border-top: 0; }
.keys li .small { flex: 1; }
.keys li.mine .mono { font-weight: 700; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share code { background: var(--ground); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; font-size: 13px; }

/* For agents: a quiet disclosure, always last */
.agents { border-top: 1px solid var(--rule); padding-top: 12px; }
.agents summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.agents pre { background: #13123f; color: #eeeefa; border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 13px; }

.foot { max-width: 44rem; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--muted); margin-right: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.flash { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--wash-good); color: var(--good); font-weight: 600; }
.flash a { color: inherit; font-weight: 400; margin-left: 4px; }
