/* nimiq.party layout + components. All sizing in px (no rem) per ADR-0004. */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── #59 — Accessibility ──────────────────────────────────────────────────
   Visually-hidden but available to assistive tech. The CLIP pattern (not
   display:none, which screen readers skip) so the live-region + any sr-only
   label is spoken without occupying a single happy-path pixel. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden; white-space: nowrap;
  clip: rect(0, 0, 0, 0); clip-path: inset(50%);
}

/* Keyboard focus ring — the ONLY new visible affordance, and only on keyboard
   nav (:focus-visible never matches mouse/touch). Nimiq light-blue, drawn with
   outline so it never shifts layout. A view heading gets a programmatic focus
   on each transition (tabindex=-1) but should not paint a ring there. */
:focus-visible {
  outline: 2px solid var(--nq-light-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

/* prefers-reduced-motion: honor the OS setting — kill the panel fade, the
   green-pop, CTA lifts, and every transition/animation for motion-sensitive
   users. The red->green state still reads (color + the spoken live region). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--nq-font);
  background: var(--nq-page-bg);
  color: var(--nq-text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── App shell ───────────────────────────────────────────────────────────
   Light, airy page header (wallet welcome reference): no navy bar — the gold
   hexagon + navy wordmark sit left-aligned on the page background. */
.app-header {
  width: 100%;
  max-width: 460px;
  background: transparent;
  color: var(--nq-text);
  padding: 24px 24px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  /* The shared-shell chrome (language switcher + wallet) wraps below the title
     row on narrow widths rather than forcing horizontal overflow. */
  flex-wrap: wrap;
}
.app-header .mark {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.app-header .title { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; color: var(--nq-text); }
/* Demo badge — a SOLID small pill (white fill, navy text). No transparency. */
.app-header .mode-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 100px;
  background: #fff; color: var(--nq-text);
  box-shadow: 0 1px 4px rgba(31, 35, 72, 0.1);
}
/* When the demo badge is shown it owns the auto margin; when it's hidden the
   shell chrome takes it so the language switcher + wallet still hug the right. */
.app-header .mode-badge[hidden] { display: none; }
.app-header .mode-badge:not([hidden]) ~ .shell-chrome { margin-left: 8px; }

/* Shared app-shell chrome in the header: the flag-hex language switcher and the
   dual-mode wallet (Connect button → profile widget on connect). Right-aligned,
   compact, and never overlapping the title. */
.shell-chrome {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
  min-width: 0;
  max-width: 100%;
}
.shell-chrome .shell-lang { min-width: 0; }
/* Let the flag row wrap its own flags instead of pushing the header wider. */
.shell-chrome .nq-langsw { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
/* The shell's flag tooltip is centered over its flag; the right-most flag sits
   flush to the header edge, so its tooltip would peek ~4px past the viewport.
   Pin the right-most tooltip to the right edge so it never causes overflow. */
.shell-chrome .nq-langsw li:last-child .nq-langsw__tip {
  left: auto; right: 0; transform: translateX(0) translateY(3px);
}
.shell-chrome .nq-langsw li:last-child .nq-langsw__btn:hover .nq-langsw__tip,
.shell-chrome .nq-langsw li:last-child .nq-langsw__btn:focus-visible .nq-langsw__tip {
  transform: translateX(0) translateY(0);
}
.shell-chrome .nq-langsw li:last-child .nq-langsw__tip::after { left: auto; right: 16px; }
.shell-chrome .shell-wallet { min-width: 0; display: flex; align-items: center; }
.shell-connect {
  font-family: inherit; font-size: 13px; font-weight: 700;
  /* ≥36px tap target (8.5+8.5 padding + ~19px line ≈ 36px), pill, and the brand
     light-blue RADIAL gradient (never a flat colored fill — tokens.css rule). */
  padding: 8.5px 16px; border-radius: 100px; border: none; cursor: pointer;
  background-image: var(--nq-light-blue-bg); background-color: var(--nq-light-blue, #0582ca);
  color: #fff;
  box-shadow: 0 1px 4px rgba(31, 35, 72, 0.1);
}
.shell-connect:disabled { opacity: 0.6; cursor: default; }
.shell-connect:focus-visible { outline: 2px solid var(--nq-light-blue, #0582ca); outline-offset: 2px; }
/* The profile widget can hold a long address; keep it from forcing the header
   wider than the app column on small screens. */
.shell-chrome .nq-profile__addr { display: none; }
@media (min-width: 420px) {
  .shell-chrome .nq-profile__addr { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.container {
  width: 100%;
  max-width: 460px;
  padding: 16px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* ── Stepper ─────────────────────────────────────────────────────────── */
.stepper {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--nq-text-faint);
}
/* #38 — the explicit display:flex above would otherwise defeat [hidden] (the same
   trap the link/tip panels hit); restore it for the whose-turn destination. */
.stepper[hidden] { display: none; }
.stepper .step { display: flex; align-items: center; gap: 6px; }
.stepper .step .num {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #e7e8ee; color: var(--nq-text-muted); font-size: 11px;
}
.stepper .step.active { color: var(--nq-text); }
.stepper .step.active .num { background: var(--split-cta); color: #fff; }
.stepper .step.done .num { background: var(--nq-green); color: #fff; }
.stepper .sep { flex: 1; height: 2px; background: #e7e8ee; border-radius: 2px; }

/* ── Panels ──────────────────────────────────────────────────────────── */
.panel { display: none; flex-direction: column; gap: 16px; }
.panel.active { display: flex; animation: fadein 0.25s var(--nq-ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--nq-surface);
  border-radius: var(--nq-card-radius);
  box-shadow: var(--nq-card-shadow);
  padding: 32px;
}
.card h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px; }
.card .sub { font-size: 14px; color: var(--nq-text-muted); margin-bottom: 24px; line-height: 1.45; }
.label { display: block; font-size: 14px; font-weight: 700; color: var(--nq-text-muted); margin-bottom: 8px; }

/* Inputs — inset box-shadow border, never `border:` */
.input {
  display: block; width: 100%; height: 52px; padding: 0 16px;
  border: none; border-radius: 10px; background: #fff;
  box-shadow: inset 0 0 0 2px rgba(31, 35, 72, 0.1);
  font-family: var(--nq-font); font-size: 20px; font-weight: 800; color: var(--nq-text);
  outline: none; transition: box-shadow 0.18s ease;
}
.input::placeholder { color: var(--nq-text-faint); font-weight: 600; }
.input:focus { box-shadow: inset 0 0 0 2px var(--nq-light-blue); }
.input.amount { font-variant-numeric: tabular-nums; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* "Each owes" readout — a clean SOLID very-light-gray surface (no translucent
   blue tint chip): muted label + light-blue bold amount. */
.preview-each {
  margin-top: 24px; padding: 16px; border-radius: 8px;
  background: var(--nq-light-gray);
  display: flex; align-items: baseline; justify-content: space-between;
}
.preview-each[hidden] { display: none; }
.preview-each .k { font-size: 14px; font-weight: 700; color: var(--nq-text-muted); }
.preview-each .v { font-size: 24px; font-weight: 800; color: var(--nq-light-blue); font-variant-numeric: tabular-nums; }

/* ── Mode switch (#13) ─────────────────────────────────────────────────────
   Two pill chips "Evenly | By item" — same neutral-tint / active-light-blue
   treatment as the tip chips. Default Evenly so existing flows are untouched. */
.mode-chips { display: flex; gap: 8px; margin-bottom: 24px; }
.mode-chip {
  height: 40px; padding: 0 18px; border: none; border-radius: 500px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-family: var(--nq-font); font-size: 14px; font-weight: 700;
  transition: background 0.18s, color 0.18s;
}
.mode-chip:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }
.mode-chip.active { background: var(--nq-blue-soft); color: var(--nq-light-blue); }

/* ── By-item mode (#13) ────────────────────────────────────────────────────
   People as editable name pills, line items as flat cards, tap-to-assign chips,
   and a per-person roll-up on the same solid inset surface as the readouts. */
.people-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.person-pill {
  display: flex; align-items: center; gap: 4px;
  background: var(--nq-light-gray); border-radius: 500px; padding: 0 6px 0 14px; height: 40px;
  box-shadow: inset 0 0 0 2px rgba(31, 35, 72, 0.08);
}
.person-pill-name {
  border: none; background: transparent; outline: none; width: 84px;
  font-family: var(--nq-font); font-size: 14px; font-weight: 700; color: var(--nq-text);
}
.person-pill-name::placeholder { color: var(--nq-text-faint); font-weight: 600; }
.person-pill-remove {
  width: 24px; height: 24px; flex-shrink: 0; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-size: 16px; line-height: 1; font-family: var(--nq-font);
  transition: background 0.18s, color 0.18s;
}
.person-pill-remove:hover { background: rgba(31, 35, 72, 0.14); color: var(--nq-text); }
.btn-ghost.add-person { width: auto; min-width: 0; padding: 0 18px; height: 40px; }

/* Each item is a clean group on the white card — no competing gray sub-card —
   separated by a hairline divider, so the name/price fields read as the same
   borderless inset-shadow inputs the Evenly screen uses (brand-faithful). */
.item-card {
  padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--nq-divider);
}
.item-card:first-child { padding-top: 4px; margin-top: 8px; border-top: none; }
.item-top { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.item-top .item-price { text-align: right; }
.assign-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.assign-chip {
  height: 32px; padding: 0 12px; border: none; border-radius: 500px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-family: var(--nq-font); font-size: 13px; font-weight: 700;
  transition: background 0.18s, color 0.18s;
}
.assign-chip:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }
.assign-chip.on { background: var(--nq-blue-soft); color: var(--nq-light-blue); }
.item-remove {
  margin-top: 12px; border: none; background: transparent; cursor: pointer;
  font-family: var(--nq-font); font-size: 13px; font-weight: 600; color: var(--nq-text-faint); padding: 0;
}
.item-remove:hover { color: var(--nq-text-muted); }

.rollup {
  margin-top: 8px; padding: 8px 16px; border-radius: 8px; background: var(--nq-light-gray);
}
.rollup-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--nq-divider);
}
.rollup-row:last-child { border-bottom: none; }
.rollup-name { font-size: 14px; font-weight: 700; color: var(--nq-text-muted); }
.rollup-amt { font-size: 16px; font-weight: 800; color: var(--nq-text); font-variant-numeric: tabular-nums; }

/* ── Tip control (#14) ────────────────────────────────────────────────────
   Compact, optional. Preset chips reuse the neutral navy-tint of .btn-ghost;
   the active chip lifts to the solid light-blue inset surface. The custom %
   field is a short inline .input. No tint washes, no glow. */
.tip-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tip-chip {
  height: 40px; padding: 0 16px; border: none; border-radius: 500px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-family: var(--nq-font); font-size: 14px; font-weight: 700;
  transition: background 0.18s, color 0.18s;
}
.tip-chip:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }
.tip-chip.active { background: var(--nq-blue-soft); color: var(--nq-light-blue); }
.tip-custom {
  height: 40px; width: 96px; padding: 0 12px; font-size: 15px; font-weight: 700;
}
/* Total-with-tip readout — same solid inset as preview-each, sits right under it
   so the two read as one block; tip line is the quieter of the pair. */
.tip-total {
  margin-top: 8px; padding: 16px; border-radius: 8px;
  background: var(--nq-light-gray);
  display: flex; align-items: baseline; justify-content: space-between;
}
.tip-total[hidden] { display: none; }
.tip-total .k { font-size: 14px; font-weight: 700; color: var(--nq-text-muted); }
.tip-total .v { font-size: 18px; font-weight: 800; color: var(--nq-text); font-variant-numeric: tabular-nums; }

/* ── Currency selector (#32) ──────────────────────────────────────────────
   A small NIM / USD / EUR chip group on the total-amount label row, reusing the
   exact tip-chip language. Picking a fiat currency reveals one quiet rate line
   under the input ("$60.00 ≈ 15,000 NIM · 1 USD = 250 NIM"). No washes, no glow. */
.ccy-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
.ccy-row .label { margin-bottom: 0; }
.ccy-chips { display: flex; align-items: center; gap: 6px; }
.ccy-chip {
  height: 32px; padding: 0 12px; border: none; border-radius: 500px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-family: var(--nq-font); font-size: 13px; font-weight: 700;
  transition: background 0.18s, color 0.18s;
}
.ccy-chip:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }
.ccy-chip.active { background: var(--nq-blue-soft); color: var(--nq-light-blue); }
.ccy-rate {
  margin-top: 8px; margin-bottom: 0; font-size: 13px; font-weight: 600;
  color: var(--nq-text-muted); font-variant-numeric: tabular-nums;
}
.ccy-rate[hidden] { display: none; }

/* Fiat-denominated link/board amount: fiat leads, the NIM it settles in sits
   under it, quieter — same stacked rhythm on the share list and the board rows. */
.link-head .link-amount { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.link-head .link-amount .link-fiat { font-size: 16px; font-weight: 800; }
.link-head .link-amount .link-nim-approx {
  font-size: 12px; font-weight: 600; color: var(--nq-text-muted);
}

/* Per-row NIM/% pin unit toggle — a small inset chip matching the row inputs. */
.unit-toggle {
  flex-shrink: 0; height: 36px; min-width: 44px; padding: 0 10px;
  border: none; border-radius: 8px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-family: var(--nq-font); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums; transition: background 0.18s, color 0.18s;
}
.unit-toggle:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }
.unit-toggle.pct { background: var(--nq-blue-soft); color: var(--nq-light-blue); }
.row-reset {
  flex-shrink: 0; height: 36px; padding: 0 10px; border: none; border-radius: 8px;
  cursor: pointer; background: transparent; color: var(--nq-text-faint);
  font-family: var(--nq-font); font-size: 13px; font-weight: 600;
}
.row-reset:hover { color: var(--nq-text-muted); }

/* ── Buttons ──────────────────────────────────────────────────────────────
   nq-button geometry (px-equivalent of the 8px-root rem values): 60px tall,
   16px bold uppercase, 200px min-width, 500px radius, soft NEUTRAL shadow
   (no colored glow — that's on the AI-slop blacklist), hover translateY(-2px). */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-width: 200px; height: 60px; border: none; border-radius: 500px;
  background-image: var(--nq-navy-bg); color: #fff;
  font-family: var(--nq-font); font-size: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 35, 72, 0.16);
  transition: transform 0.25s var(--nq-ease), box-shadow 0.25s var(--nq-ease), opacity 0.15s;
}
.cta.blue { background-image: var(--nq-light-blue-bg); }
.cta.green { background-image: var(--nq-green-bg); }
.cta:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(31, 35, 72, 0.2); }
.cta:not(:disabled):active { transform: translateY(0); }
.cta:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
/* Secondary action — nq-button-s proportions (neutral tint, no glow). */
.btn-ghost {
  width: 100%; height: 44px; border-radius: 500px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); border: none;
  font-family: var(--nq-font); font-size: 14px; font-weight: 600; color: var(--nq-text-muted);
  transition: background 0.18s, color 0.18s;
}
.btn-ghost:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }
/* On-dark secondary (wow screen): the Nimiq .nq-link treatment — plain white
   text, NO underline at rest (underline only on hover, per nq-style), 16px.
   Reads as a quiet text action against the green stage, never a second CTA. */
.btn-ghost.on-dark {
  background: transparent; color: #fff; font-size: 16px; text-decoration: none;
}
.btn-ghost.on-dark:hover { background: transparent; color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── Share rows (links step) ─────────────────────────────────────────── */
.person-row {
  display: flex; align-items: center; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid #f0f0f3;
}
.person-row:last-child { border-bottom: none; }
.avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background-image: var(--nq-navy-bg); color: #fff; font-size: 15px; font-weight: 800;
}
.avatar img, .avatar svg { width: 100%; height: 100%; display: block; }
.person-name {
  font-size: 16px; font-weight: 700; background: transparent; border: none; outline: none;
  color: var(--nq-text); width: 100%; font-family: var(--nq-font);
}
.person-name:focus { box-shadow: inset 0 -2px 0 var(--nq-light-blue); }
.person-amount {
  margin-left: auto; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: transparent; border: none; outline: none; text-align: right; width: 96px;
  color: var(--nq-text); font-family: var(--nq-font);
}
.person-amount:focus { box-shadow: inset 0 -2px 0 var(--nq-light-blue); }

/* ── Compact send list (QR on tap) ───────────────────────────────────────
   One row per person: solid navy initial-avatar + name + amount + chevron,
   separated by a thin divider (like the approved Board rows). No QR by
   default; tapping a row expands its panel to reveal the real Nimiq QR. */
.link-list { margin-top: 8px; }
.link-row { border-bottom: 1px solid var(--nq-divider); }
.link-row:last-child { border-bottom: none; }
.link-head {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 0;
  background: transparent; border: none; cursor: pointer; text-align: left;
  font-family: var(--nq-font); color: var(--nq-text);
}
.link-head .link-name { font-size: 16px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
/* #15 — quiet "waiting Nh" cue on still-unpaid rows; gentle, never alarming. */
.link-head .link-waited { font-size: 12px; font-weight: 600; color: var(--nq-text-faint); }
.link-row.paid .link-head .link-name { opacity: 0.55; }

/* #15 — the per-row Remind: a SECONDARY text action under the link panel, sized
   well below the primary "Send link" CTA so it never competes for the tap. */
.link-remind {
  align-self: center; background: transparent; border: none; cursor: pointer;
  font-family: var(--nq-font); font-size: 13px; font-weight: 600;
  color: var(--nq-text-muted); padding: 4px 8px; margin-top: -8px;
  transition: color 0.18s;
}
.link-remind:hover { color: var(--nq-light-blue); }
.link-remind.reminded { color: var(--nq-green); }

/* #15 — "Remind everyone unpaid": secondary, lives between the list and the
   primary board CTA. Reuses .btn-ghost so it stays clearly below the one CTA. */
#nudge-all-wrap { margin: 4px 0 0; }
#nudge-all-wrap .btn-ghost { width: 100%; }
.link-head .link-amount {
  margin-left: auto; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.link-head .chevron {
  flex-shrink: 0; font-size: 22px; line-height: 1; color: var(--nq-text-faint);
  transition: transform 0.2s var(--nq-ease);
}
.link-row.open .link-head .chevron { transform: rotate(90deg); color: var(--nq-text-muted); }
.link-panel { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 0 28px; }
/* the JS toggles `hidden` to keep one row open at a time; display:flex above would
   otherwise defeat [hidden], leaving every panel open (same trap #14 hit on .tip-total). */
.link-panel[hidden] { display: none; }
.link-panel .qr {
  display: flex; align-items: center; justify-content: center; padding: 8px 0;
}
.link-panel .qr canvas { display: block; }
.link-actions { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.link-actions .share { flex: 1; height: 44px; }
.link-actions .copy { flex: 0 0 auto; }

/* nq-button-s — small secondary gray button (height 27px proportions, scaled
   for our px world; neutral 7% navy tint, no glow). */
.nq-button-s {
  height: 44px; padding: 0 20px; border: none; border-radius: 500px; cursor: pointer;
  background: rgba(31, 35, 72, 0.07); color: var(--nq-text-muted);
  font-family: var(--nq-font); font-size: 14px; font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
.nq-button-s:hover { background: rgba(31, 35, 72, 0.12); color: var(--nq-text); }

/* ── Settle-board ────────────────────────────────────────────────────── */
.board-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.board-summary .count { font-size: 14px; font-weight: 800; color: var(--nq-text-muted); font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: #ececf1; border-radius: 100px; overflow: hidden; margin-bottom: 24px; }
.progress > span { display: block; height: 100%; background-image: var(--nq-green-bg); border-radius: 100px; width: 0; transition: width 0.5s var(--nq-ease); }

/* Flat SOLID list (transaction-list reference): rows are transparent on the
   white card, separated by a thin divider. NO full-row tint, NO per-row card
   outline — state lives entirely in the colored dot + the settled chip. */
.board-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--nq-divider);
}
.board-row:last-of-type { border-bottom: none; }
/* Static state dot — no pulse/glow (AI-slop blacklist). The dot color carries
   the state; a single green-pop on flip is the one calculated beat. */
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--split-pending); }
.board-row.confirming .dot { background: var(--nq-light-blue); }
.board-row.paid .dot { background: var(--split-settled); animation: pop 0.45s var(--nq-ease); }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* min-width:0 lets the name column absorb the row's shrink (its text wraps) so the
   amount column + claim button keep their width at 390px (#53). */
.board-row .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board-row .who .name { font-size: 16px; font-weight: 700; }
.board-row .who .state { font-size: 12px; color: var(--nq-text-muted); }
/* #15 — quiet duration cue on still-red rows; empty (and so invisible) on paid. */
.board-row .who .waited { font-size: 11px; font-weight: 600; color: var(--nq-text-faint); }
.board-row .who .waited:empty { display: none; }
.board-row.confirming .who .state { color: var(--nq-light-blue); font-weight: 700; font-variant-numeric: tabular-nums; }
/* Settled state: a SMALL SOLID green chip on the "settled in X.Xs" label (like
   the tx-list +green amount chip) — solid fill, not a tint wash. */
.board-row.paid .who .state {
  color: var(--nq-green-chip-text); font-weight: 700;
  background: var(--nq-green-chip); border-radius: 100px;
  padding: 2px 8px; width: max-content;
}
/* Settled-receipt disclosure: quiet "Receipt" toggle that reveals the on-chain
   tx hash (Fira Mono). Kept collapsed so the board stays a clean receipt. */
.board-row .tx-details { margin-top: 4px; }
.board-row .tx-details summary {
  font-size: 11px; font-weight: 600; color: var(--nq-text-muted);
  cursor: pointer; list-style: none; width: max-content;
}
.board-row .tx-details summary::-webkit-details-marker { display: none; }
.board-row .tx-details summary:hover { color: var(--nq-light-blue); }
.board-row .tx-hash {
  display: block; margin-top: 4px; font-family: var(--nq-font-mono); font-size: 11px;
  color: var(--nq-text-muted); word-break: break-all; line-height: 1.4;
}
.board-row .amt { margin-left: auto; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Fiat-denominated row: fiat over the NIM it settles in, NIM quieter (#32). */
.board-row .amt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; text-align: right; flex-shrink: 0; }
/* nowrap so "≈ 3,750 NIM" never orphans "NIM" onto a second line at 390px (#53). */
.board-row .amt .amt-nim-approx { font-size: 12px; font-weight: 600; color: var(--nq-text-muted); white-space: nowrap; }
.board-row.paid .amt { color: var(--nq-green); }
.board-row.paid .amt .amt-nim-approx { color: var(--nq-green); opacity: 0.7; }
/* Per-row Pay — the universal settle action (in-wallet direct send / demo
   simulate). nq-button-s height in light-blue; soft neutral lift only. */
.board-row .pay {
  flex-shrink: 0; height: 40px; min-width: 0; padding: 0 16px; border: none; border-radius: 500px; cursor: pointer;
  background-image: var(--nq-light-blue-bg); color: #fff;
  font-family: var(--nq-font); font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  transition: transform 0.18s var(--nq-ease), opacity 0.18s;
}
.board-row .pay:not(:disabled):hover { transform: translateY(-1px); }
.board-row .pay:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Self-serve claim (#33) ──────────────────────────────────────────────
   AVAILABLE rows invite a tap ("This is me"); the claim button mirrors the
   per-row Pay geometry (nq-button-s, light-blue, neutral lift). A row claimed
   by someone else reads muted + inert. */
.board-row .claim {
  flex-shrink: 0; height: 40px; min-width: 0; padding: 0 16px;
  border: none; border-radius: 500px; cursor: pointer;
  background-image: var(--nq-light-blue-bg); color: #fff;
  font-family: var(--nq-font); font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  transition: transform 0.18s var(--nq-ease), opacity 0.18s;
}
.board-row .claim:not(:disabled):hover { transform: translateY(-1px); }
.board-row .claim:disabled { opacity: 0.45; cursor: not-allowed; }
/* Claimed by another payer: a quiet "in use" state — muted dot, no affordance. */
.board-row.claimed .dot { background: var(--nq-gold); }
.board-row.claimed .who .state { color: var(--nq-text-muted); font-weight: 700; }

/* The expanded pay panel — the exact links.js QR + copy + Pay accordion, on a
   SOLID very-light surface inset under the claimed row (no glass, no tint). */
.board-pay-panel {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 24px; margin: 4px 0 16px; border-radius: 10px;
  background: var(--nq-light-gray);
}
.board-pay-panel .qr { display: flex; align-items: center; justify-content: center; padding: 4px 0; }
.board-pay-panel .qr canvas { display: block; }
.board-pay-panel .pay-actions { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.board-pay-panel .pay-actions .pay-now { flex: 1; height: 48px; min-width: 0; }
.board-pay-panel .pay-actions .copy { flex: 0 0 auto; }
/* "Not me" — a quiet text release, never a competing CTA (nq-link treatment). */
.board-pay-panel .not-me {
  background: transparent; border: none; cursor: pointer;
  font-family: var(--nq-font); font-size: 14px; font-weight: 600; color: var(--nq-text-muted);
  text-decoration: none;
}
.board-pay-panel .not-me:hover { color: var(--nq-text); text-decoration: underline; text-underline-offset: 3px; }

/* Share live board — quiet secondary action under the rows (not a CTA). Solid
   very-light-blue surface, no translucent tint. */
.share-board {
  margin-top: 24px; width: 100%; height: 44px; border: none; border-radius: 500px; cursor: pointer;
  background: var(--nq-blue-soft); color: var(--nq-light-blue);
  font-family: var(--nq-font); font-size: 14px; font-weight: 600;
  transition: filter 0.18s;
}
.share-board:hover { filter: brightness(0.97); }

/* Value-prop line (entry + share steps) */
.value-line { font-size: 13px; color: var(--nq-text-muted); line-height: 1.45; margin: 0 0 24px; }
.value-line strong { color: var(--nq-green); }

/* ?stage=1 hides demo scaffolding for the on-stage presentation */
body.stage #mode-badge { display: none !important; }

/* ── Wow / Done ────────────────────────────────────────────────────────────
   Canonical Nimiq success (status-screen reference): the WHOLE screen is the
   green radial gradient, a LARGE SOLID WHITE checkmark with no medallion
   behind it, and all text white. */
.wow {
  position: fixed; inset: 0; z-index: 50; display: none;
  background-image: var(--nq-green-bg); color: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px;
}
.wow.show { display: flex; animation: fadein 0.35s var(--nq-ease); }
/* Large SOLID WHITE checkmark, NO circle/medallion (verbatim nq path, filled #fff). */
.wow .check { display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.wow .check svg { width: 88px; height: 88px; }
.wow .check svg path { fill: #fff; stroke: #fff; stroke-width: 0.8; }
.wow .headline { font-size: 32px; font-weight: 800; text-align: center; letter-spacing: -0.5px; color: #fff; }
/* The single status line under the title (secondary weight, white). */
.wow .status { font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.85); text-align: center; font-variant-numeric: tabular-nums; }
/* The one quiet action: a white-text "New split" link, not a filled pill. */
.wow #wow-done { width: auto; min-width: 0; margin-top: 24px; }

/* ── Toast ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px);
  background-image: var(--nq-navy-bg); color: #fff; padding: 12px 20px; border-radius: 100px;
  font-size: 14px; font-weight: 700; opacity: 0; transition: all 0.25s var(--nq-ease);
  pointer-events: none; white-space: nowrap; z-index: 100; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── #16 — Recent splits ─────────────────────────────────────────────────
   The organizer's own past splits, for one-tap Repeat. SECONDARY to the
   primary Create flow: it lives BELOW the CTA, no card chrome, quiet muted
   type, thin dividers like the send list. Progressive — hidden when empty. */
.recent { margin-top: 28px; padding: 0 4px; }
.recent-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px;
}
.recent-title {
  font-size: 13px; font-weight: 700; color: var(--nq-text-muted);
  text-transform: none; letter-spacing: 0;
}
.recent-clear {
  background: transparent; border: none; cursor: pointer;
  font-family: var(--nq-font); font-size: 13px; font-weight: 600;
  color: var(--nq-text-faint); padding: 4px; transition: color 0.18s;
}
.recent-clear:hover { color: var(--nq-text-muted); }
.recent-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--nq-divider);
}
.recent-row:last-child { border-bottom: none; }
.recent-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.recent-desc {
  font-size: 15px; font-weight: 700; color: var(--nq-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.recent-meta { font-size: 12px; font-weight: 600; color: var(--nq-text-faint); }
.recent-repeat {
  flex-shrink: 0; height: 34px; padding: 0 16px; border: none; border-radius: 500px;
  cursor: pointer; font-family: var(--nq-font); font-size: 13px; font-weight: 700;
  background: var(--nq-blue-soft); color: var(--nq-light-blue);
  transition: background 0.18s;
}
.recent-repeat:hover { background: rgba(31, 90, 168, 0.16); }

.hidden { display: none !important; }

/* ── #38 — whose-turn mode ───────────────────────────────────────────────────
   A SECONDARY surface for recurring crews. The entry point is a quiet text
   button below the Create flow; the view itself reuses the card + inset-input
   system, thin dividers, and a single solid drift bar per member. */

/* Entry point on the Split-a-bill screen — quiet, never a second CTA. */
.turn-entry {
  width: 100%; margin-top: 20px; padding: 14px; border: none; border-radius: 12px;
  background: var(--nq-blue-soft); cursor: pointer; font-family: var(--nq-font);
  font-size: 14px; font-weight: 700; color: var(--nq-light-blue);
  transition: background 0.18s;
}
.turn-entry:hover { background: rgba(31, 90, 168, 0.12); }
.turn-entry-sub { font-weight: 600; color: var(--nq-text-muted); }

/* #63 — demo-only "Try a sample split" seed. Quiet + secondary, mirrors the
   whose-turn entry so it never competes with the primary Create CTA. Only
   rendered in mock mode (hidden entirely in real in-wallet mode). */
.demo-entry {
  width: 100%; margin-top: 12px; padding: 14px; border: none; border-radius: 12px;
  background: var(--nq-blue-soft); cursor: pointer; font-family: var(--nq-font);
  font-size: 14px; font-weight: 700; color: var(--nq-light-blue);
  transition: background 0.18s;
}
.demo-entry:hover { background: rgba(31, 90, 168, 0.12); }
.demo-entry:disabled { opacity: 0.6; cursor: default; }
.demo-entry-sub { font-weight: 600; color: var(--nq-text-muted); }

/* View header: title + a quiet "Groups" switch. */
.turn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.turn-switch {
  flex-shrink: 0; background: transparent; border: none; cursor: pointer;
  font-family: var(--nq-font); font-size: 13px; font-weight: 700;
  color: var(--nq-text-muted); padding: 4px; transition: color 0.18s;
}
.turn-switch:hover { color: var(--nq-light-blue); }

/* The prominent "Next up" line. */
.turn-next { font-size: 16px; font-weight: 600; color: var(--nq-text-muted); margin: 4px 0 20px; }
.turn-next strong { font-size: 22px; font-weight: 800; color: var(--nq-text); letter-spacing: -0.3px; }

/* Member rows: name · drift bar · signed NIM figure, on thin dividers. */
.turn-members { display: flex; flex-direction: column; }
.turn-member {
  display: grid; grid-template-columns: minmax(72px, 1fr) 1.4fr auto;
  align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--nq-divider);
}
.turn-member:last-child { border-bottom: none; }
.turn-mname {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 15px; font-weight: 700; color: var(--nq-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.turn-member.next .turn-mname { color: var(--nq-text); }
.turn-tag {
  flex-shrink: 0; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--nq-light-blue);
  background: var(--nq-blue-soft); padding: 2px 6px; border-radius: 500px;
}
.turn-bar-wrap {
  height: 8px; border-radius: 500px; background: rgba(31, 35, 72, 0.07);
  overflow: hidden; display: flex; align-items: center;
}
.turn-bar { height: 100%; border-radius: 500px; min-width: 2px; }
.turn-bar.ahead { background-image: var(--nq-green-bg); }
.turn-bar.behind { background-image: var(--nq-light-blue-bg); }
.turn-bar.even { background: rgba(31, 35, 72, 0.15); }
.turn-drift {
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
.turn-drift.ahead { color: var(--nq-green); }
.turn-drift.behind { color: var(--nq-light-blue); }
.turn-drift.even { color: var(--nq-text-faint); }

/* Log-an-outing row: payer select + amount + a compact Add (all inset, no border). */
.turn-log { margin-top: 24px; }
.turn-log-row { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 8px; align-items: stretch; }
.turn-payer { font-size: 15px; font-weight: 600; height: 52px; }
.turn-add {
  flex-shrink: 0; padding: 0 18px; border: none; border-radius: 12px; cursor: pointer;
  font-family: var(--nq-font); font-size: 14px; font-weight: 700; color: #fff;
  background-image: var(--nq-navy-bg); transition: transform 0.18s, box-shadow 0.18s;
}
.turn-add:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31, 35, 72, 0.18); }

/* True-up: a quiet block that appears only once drift crosses the threshold. */
.turn-settle { display: flex; flex-direction: column; gap: 12px; }
.turn-settle-line { font-size: 13px; color: var(--nq-text-muted); line-height: 1.45; margin: 0; padding: 0 4px; }

/* Remove-group: the quietest action, sized well below the back link. */
.turn-remove { color: var(--nq-text-faint); }
.turn-remove:hover { color: var(--nq-red); background: rgba(217, 68, 50, 0.08); }

/* Group picker chips (when no group is open yet). */
.turn-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.turn-pick {
  padding: 8px 16px; border: none; border-radius: 500px; cursor: pointer;
  font-family: var(--nq-font); font-size: 14px; font-weight: 700;
  background: var(--nq-blue-soft); color: var(--nq-light-blue); transition: background 0.18s;
}
.turn-pick:hover { background: rgba(31, 90, 168, 0.16); }

/* ── #57 — Not-found / boot-error state card ──────────────────────────────
   A calm terminal surface: the same solid light .card on the gray page, text
   centered, generous top spacing, ONE primary action. No glass, no eyebrow. */
.state-card { text-align: center; margin-top: 32px; }
.state-card h2 { margin-bottom: 12px; }
.state-card .sub { margin-bottom: 24px; }
.state-card .cta { margin-top: 4px; }

/* ── #66 — Shared-link hydration loading state ─────────────────────────────
   The branded beat shown the instant a /s/:id link opens, before the split
   fetches, so the viral entry point never flashes a blank panel. ONE calm
   centered element: a quiet on-brand ring spinner above the loading line. The
   header hexagon already carries the brand, so this is a light-blue ring (no
   second hexagon). Solid surfaces only — no glass. */
.state-card .state-spinner {
  display: block;
  width: 32px; height: 32px;
  margin: 8px auto 18px;
  border-radius: 50%;
  border: 3px solid var(--nq-blue-soft);
  border-top-color: var(--nq-light-blue);
  animation: state-spin 0.9s linear infinite;
}
.state-card .state-spinner + .sub { margin-bottom: 8px; }
@keyframes state-spin { to { transform: rotate(360deg); } }
/* prefers-reduced-motion: the global guard above already neutralises the spin
   (animation-duration ~0); this keeps a calm static ring so the beat still
   reads as "working" without any motion. */
@media (prefers-reduced-motion: reduce) {
  .state-card .state-spinner { animation: none; }
}
