/* ════════════════════════════════════════════════════════════════════════
   global.css — design system for the Quantum Field unified treasury console.

   External global stylesheet (loaded by index.html alongside the inline
   bootstrap shell). Shares the suite's "void / slime" tokens, Space Grotesk /
   Inter / JetBrains Mono type ramp, glassmorphic surfaces, and the shared
   `multisig-theme` key for dark / light.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --void: #030806;
  --ink-1: #060d09;
  --ink-2: #0a130d;
  --ink-3: #0e1911;
  --ink-4: #121f15;
  --ink-elev: #081008;
  --t0: #f0faf4;
  --t1: #c8dfd0;
  --t2: #9dbfaa;
  --t3: #6b9479;
  --t4: #4a7258;
  --t5: #3f6450;
  --slime: #00ff84;
  --slime-bright: #00ffc6;
  --slime-soft: #a8ffd9;
  --slime-deep: #00b35c;
  --slime-mute: rgba(0, 255, 132, 0.12);
  --slime-sub: rgba(0, 255, 132, 0.06);
  --slime-glow: rgba(0, 255, 132, 0.35);
  --rule: rgba(255, 255, 255, 0.06);
  --rule-sub: rgba(255, 255, 255, 0.03);
  --rule-mid: rgba(255, 255, 255, 0.12);
  --rule-strong: rgba(255, 255, 255, 0.22);
  --rule-slime: rgba(0, 255, 132, 0.2);
  --amber: #ffb86b;
  --rose: #ff7a7a;
  --violet: #c9a0ff;
  --azure: #6bc9ff;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
  --r-sm: 0.45rem;
  --r-md: 0.7rem;
  --r-lg: 1.05rem;
  --r-xl: 1.4rem;
  --maxw: 1280px;
  --gutter: clamp(1rem, 3.5vw, 2.75rem);
  --shadow-xl: 0 24px 70px rgba(0, 0, 0, 0.4);
}

:root[data-color-scheme="light"] {
  color-scheme: light;
  --void: #f4f7f3;
  --ink-1: #ffffff;
  --ink-2: #eef3ee;
  --ink-3: #e6ede6;
  --ink-4: #dde7de;
  --ink-elev: #fbfdfb;
  --t0: #0a1611;
  --t1: #1c2c24;
  --t2: #36493f;
  --t3: #50655a;
  --t4: #647a6e;
  --t5: #8a9f93;
  --slime: #007343;
  --slime-bright: #00945a;
  --slime-soft: #1a7048;
  --slime-deep: #005c35;
  --slime-mute: rgba(0, 115, 67, 0.12);
  --slime-sub: rgba(0, 115, 67, 0.05);
  --slime-glow: rgba(0, 115, 67, 0.22);
  --rule: rgba(10, 22, 17, 0.1);
  --rule-sub: rgba(10, 22, 17, 0.045);
  --rule-mid: rgba(10, 22, 17, 0.16);
  --rule-strong: rgba(10, 22, 17, 0.26);
  --rule-slime: rgba(0, 115, 67, 0.26);
  --amber: #b45309;
  --rose: #b91c1c;
  --violet: #6d28d9;
  --azure: #0369a1;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--t1);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 14% 4%, rgba(0, 255, 132, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 96%, rgba(0, 255, 198, 0.045) 0%, transparent 50%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 54px 54px;
}
:root[data-color-scheme="light"] body::after {
  opacity: 0.6;
  background-image:
    linear-gradient(0deg, rgba(10, 22, 17, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 22, 17, 0.025) 1px, transparent 1px);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--t0);
  line-height: 1.12;
}
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--font-mono); }
::selection { background: var(--slime-mute); color: var(--t0); }
:focus-visible { outline: 2px solid var(--slime); outline-offset: 2px; border-radius: 3px; }

button { font-family: inherit; }

#root { position: relative; z-index: 1; }

/* ════════ app shell ════════ */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem var(--gutter);
  background: color-mix(in srgb, var(--void) 84%, transparent);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid var(--rule-sub);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand .bm { width: 30px; height: 30px; flex: none; }
.brand .bm svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--t0); }
.brand-name em { font-style: normal; color: var(--slime); }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t4);
}
.topbar-spacer { flex: 1; }

.crumbs { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 11px; color: var(--t3); min-width: 0; }
.crumbs button { background: none; border: none; color: var(--t3); cursor: pointer; padding: 0; font: inherit; }
.crumbs button:hover { color: var(--slime); }
.crumbs .sep { color: var(--t5); }
.crumbs .cur { color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.net-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t2);
  border: 1px solid var(--rule-mid);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
.net-pill .d { width: 7px; height: 7px; border-radius: 50%; background: var(--slime); box-shadow: 0 0 7px var(--slime-glow); }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--rule-mid);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--t2);
  cursor: pointer;
  transition: 0.16s var(--ease);
}
.icon-btn:hover { color: var(--slime); border-color: var(--rule-slime); background: var(--slime-sub); }
.icon-btn svg { width: 17px; height: 17px; }
:root[data-color-scheme="dark"] .icon-btn .sun { display: block; }
:root[data-color-scheme="dark"] .icon-btn .moon { display: none; }
:root[data-color-scheme="light"] .icon-btn .sun { display: none; }
:root[data-color-scheme="light"] .icon-btn .moon { display: block; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  cursor: pointer;
  border: 1px solid var(--rule-strong);
  color: var(--t1);
  background: transparent;
  transition: 0.16s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--slime); color: var(--slime); background: var(--slime-sub); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { color: var(--void); background: var(--slime); border-color: var(--slime); }
.btn.primary:hover { background: var(--slime-bright); border-color: var(--slime-bright); color: var(--void); box-shadow: 0 0 0 5px var(--slime-sub); }
.btn.primary:disabled { opacity: 0.45; cursor: default; background: var(--ink-3); color: var(--t4); border-color: var(--rule-mid); box-shadow: none; }
.btn.sm { font-size: 0.72rem; padding: 0.45rem 0.85rem; }
.btn.ghost { border-color: var(--rule-mid); }
.btn.danger:hover { color: var(--rose); border-color: rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.06); }
.btn.wallet { color: var(--void); background: var(--slime); border-color: var(--slime); }
.btn.wallet:hover { background: var(--slime-bright); border-color: var(--slime-bright); color: var(--void); }
.btn.wallet.connected { color: var(--t0); background: transparent; border-color: var(--rule-slime); font-family: var(--font-mono); font-weight: 500; }
.btn .wdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.btn.wallet.connected .wdot { background: var(--slime); opacity: 1; box-shadow: 0 0 7px var(--slime-glow); }

/* main + page transitions */
main.wrap { position: relative; z-index: 1; flex: 1; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter) 4rem; }
.page { animation: rise 0.45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

/* ════════ gate (connect → authenticate) ════════ */
.gate { max-width: 560px; margin: clamp(2rem, 7vw, 5rem) auto; text-align: center; }
.gate-mark { width: 4rem; height: 4rem; margin: 0 auto 1.6rem; }
.gate-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--slime); margin-bottom: 1rem; }
.gate h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.gate h1 .g { background: linear-gradient(100deg, var(--slime), var(--slime-bright) 60%, var(--azure)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gate p.lede { color: var(--t2); font-size: 1.02rem; line-height: 1.6; margin: 0 auto 2.2rem; max-width: 44ch; }
.gate-options { display: grid; gap: 0.85rem; }
.connect-card {
  display: flex; align-items: center; gap: 1rem; text-align: left;
  background: var(--ink-1); border: 1px solid var(--rule); border-radius: var(--r-lg);
  padding: 1.1rem 1.25rem; cursor: pointer; transition: 0.16s var(--ease); width: 100%;
  color: inherit; font: inherit;
}
.connect-card:hover:not(:disabled) { border-color: var(--rule-slime); transform: translateY(-2px); background: var(--ink-2); }
.connect-card:disabled { opacity: 0.6; cursor: default; }
.connect-card .cc-ic { width: 2.6rem; height: 2.6rem; border-radius: 0.7rem; display: grid; place-items: center; background: var(--slime-mute); color: var(--slime); flex: none; }
.connect-card .cc-ic svg { width: 22px; height: 22px; }
.connect-card .cc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.connect-card .cc-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--t0); }
.connect-card .cc-sub { display: block; font-size: 0.82rem; color: var(--t3); }
.connect-card .cc-arrow { color: var(--t4); transition: 0.16s; }
.connect-card:hover:not(:disabled) .cc-arrow { color: var(--slime); transform: translateX(2px); }

.auth-step { background: var(--ink-1); border: 1px solid var(--rule); border-radius: var(--r-xl); padding: clamp(1.5rem, 4vw, 2.5rem); animation: pop 0.4s var(--ease) both; }
.auth-id { display: flex; align-items: center; gap: 0.8rem; justify-content: center; margin-bottom: 1.5rem; }
.auth-id .av { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--slime-sub); border: 1px solid var(--rule-slime); display: grid; place-items: center; color: var(--slime); font-family: var(--font-display); font-weight: 600; }
.auth-addr { font-family: var(--font-mono); font-size: 0.85rem; color: var(--t1); }
.auth-via { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t4); }
.siwt-msg { text-align: left; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6; color: var(--t3); background: var(--ink-elev); border: 1px solid var(--rule-sub); border-radius: var(--r-md); padding: 1rem; white-space: pre-wrap; margin-bottom: 1.4rem; max-height: 200px; overflow: auto; }

/* ════════ KPI strip ════════ */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.75rem; }
@media (max-width: 64rem) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1rem 1.1rem; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 60% auto 0; height: 2px; background: linear-gradient(90deg, var(--slime), transparent); opacity: 0.5; }
.kpi-k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t4); }
.kpi-v { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--t0); margin-top: 0.45rem; line-height: 1; word-break: break-word; }
.kpi-v.mono { font-family: var(--font-mono); font-size: 0.9rem; color: var(--slime-soft); }
:root[data-color-scheme="light"] .kpi-v.mono { color: var(--slime); }

/* ════════ panels ════════ */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.25rem; }
.section-head .sub { font-size: 0.85rem; color: var(--t3); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.treasury-card {
  text-align: left; background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.3rem;
  cursor: pointer; transition: 0.16s var(--ease); position: relative; overflow: hidden;
  color: inherit; font: inherit; width: 100%;
}
.treasury-card:hover { border-color: var(--rule-slime); transform: translateY(-2px); }
.tc-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1rem; }
.tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid var(--rule-mid); color: var(--t3); }
.tag.slime { color: var(--slime); border-color: var(--rule-slime); background: var(--slime-sub); }
.tag.azure { color: var(--azure); border-color: rgba(107, 201, 255, 0.3); }
.tag.violet { color: var(--violet); border-color: rgba(201, 160, 255, 0.3); }
.tag.amber { color: var(--amber); border-color: rgba(255, 184, 107, 0.32); }
.tag.rose { color: var(--rose); border-color: rgba(255, 122, 122, 0.32); }
.tc-name { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--t0); margin-bottom: 0.3rem; }
.tc-addr { font-family: var(--font-mono); font-size: 11px; color: var(--t4); margin-bottom: 1.1rem; }
.tc-bal { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--t0); }
.tc-bal span { font-size: 0.9rem; color: var(--t3); margin-left: 0.3rem; }
.tc-foot { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--rule-sub); font-family: var(--font-mono); font-size: 11px; color: var(--t4); }
.tc-foot b { color: var(--t2); font-weight: 500; }

.new-card { display: grid; place-content: center; gap: 0.6rem; text-align: center; border: 1px dashed var(--rule-mid); background: transparent; min-height: 200px; cursor: pointer; transition: 0.16s var(--ease); border-radius: var(--r-lg); color: var(--t3); }
.new-card:hover { border-color: var(--slime); color: var(--slime); background: var(--slime-sub); }
.new-card .plus { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; margin: 0 auto; }

/* ════════ single treasury view ════════ */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { font-family: var(--font-display); font-size: 0.85rem; font-weight: 500; color: var(--t3); background: transparent; border: none; border-bottom: 2px solid transparent; padding: 0.7rem 1rem; cursor: pointer; transition: 0.16s; }
.tab:hover { color: var(--t1); }
.tab.active { color: var(--slime); border-bottom-color: var(--slime); }
.tab .cnt { font-family: var(--font-mono); font-size: 10px; color: var(--t4); margin-left: 0.35rem; }

.panel { background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(1.1rem, 2.5vw, 1.5rem); }
.panel + .panel { margin-top: 1rem; }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .grid2 { grid-template-columns: 1fr; } }

.empty { font-style: italic; color: var(--t4); padding: 1.5rem 0; text-align: center; }

/* proposal */
.prop { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; background: var(--ink-elev); display: grid; gap: 0.8rem; }
.prop + .prop { margin-top: 0.9rem; }
.prop.open { border-color: var(--rule-slime); }
.prop.executed { opacity: 0.72; }
.prop.rejected { opacity: 0.6; }
.prop-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.prop-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--t0); flex: 1; min-width: 12rem; }
.status { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.22rem 0.5rem; border-radius: 999px; border: 1px solid var(--rule-mid); color: var(--t3); }
.status.open { color: var(--slime); border-color: var(--rule-slime); background: var(--slime-sub); }
.status.executed { color: var(--slime-bright); border-color: var(--rule-slime); }
.status.rejected { color: var(--rose); border-color: rgba(255, 122, 122, 0.32); }
.prop-memo { font-size: 0.88rem; color: var(--t2); line-height: 1.55; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-family: var(--font-mono); font-size: 10.5px; color: var(--t4); }
.prop-meta .amt { color: var(--slime); }
.link-poll { color: var(--violet); }

.tally { display: flex; align-items: center; gap: 0.9rem; }
.tally-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--rule-sub); overflow: hidden; display: flex; }
.tally-for { height: 100%; background: var(--slime); transition: width 0.4s var(--ease); }
.tally-against { height: 100%; background: var(--rose); opacity: 0.7; transition: width 0.4s var(--ease); }
.tally-lbl { font-family: var(--font-mono); font-size: 10.5px; color: var(--t2); white-space: nowrap; }
.vote-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.risk { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 999px; border: 1px solid var(--rule-mid); }
.risk.low { color: var(--slime); border-color: var(--rule-slime); }
.risk.med { color: var(--amber); border-color: rgba(255, 184, 107, 0.32); }
.risk.high { color: var(--rose); border-color: rgba(255, 122, 122, 0.32); }

/* signer roster */
.roster-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--rule-sub); }
.roster-row:first-child { border-top: none; }
.av { width: 2.1rem; height: 2.1rem; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule-slime); background: var(--slime-sub); color: var(--slime); font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; }
.roster-meta { flex: 1; min-width: 0; }
.roster-role { font-weight: 600; font-size: 0.86rem; color: var(--t0); }
.roster-addr { font-family: var(--font-mono); font-size: 10.5px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm { display: flex; gap: 0.3rem; }
.perm span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; padding: 0.15rem 0.4rem; border-radius: var(--r-sm); border: 1px solid var(--rule-mid); color: var(--t4); }
.perm span.on { color: var(--slime); border-color: var(--rule-slime); background: var(--slime-sub); }

/* transactions */
.tx-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; padding: 0.7rem 0; border-top: 1px solid var(--rule-sub); }
.tx-row:first-child { border-top: none; }
.tx-ic { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rule-mid); }
.tx-ic.in { color: var(--slime); border-color: var(--rule-slime); }
.tx-ic.out { color: var(--amber); border-color: rgba(255, 184, 107, 0.3); }
.tx-ic svg { width: 14px; height: 14px; }
.tx-meta { min-width: 0; }
.tx-cp { font-family: var(--font-mono); font-size: 12px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-at { font-family: var(--font-mono); font-size: 10px; color: var(--t4); }
.tx-amt { font-family: var(--font-mono); font-size: 0.9rem; white-space: nowrap; }
.tx-amt.in { color: var(--slime); }
.tx-amt.out { color: var(--t1); }

/* forms */
.field { display: grid; gap: 0.4rem; margin-bottom: 0.95rem; }
.field label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t4); }
.field input, .field select, .field textarea {
  font-family: var(--font-text); font-size: 0.92rem; color: var(--t0);
  background: var(--ink-elev); border: 1px solid var(--rule-mid); border-radius: var(--r-md);
  padding: 0.65rem 0.8rem; width: 100%; transition: 0.14s;
}
.field textarea { resize: vertical; min-height: 4.5rem; font-family: var(--font-text); }
.field select { appearance: none; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--slime); background: var(--slime-sub); }
.field .hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--slime); min-height: 1em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 34rem) { .row2 { grid-template-columns: 1fr; } }

/* ════════ wizard ════════ */
.wizard { max-width: 760px; margin: 0 auto; }
.steps { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.step-pip { display: flex; align-items: center; gap: 0.45rem; font-family: var(--font-mono); font-size: 10.5px; color: var(--t4); }
.step-pip .num { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1px solid var(--rule-mid); display: grid; place-items: center; transition: 0.18s; }
.step-pip.active { color: var(--slime); }
.step-pip.active .num { border-color: var(--slime); background: var(--slime-sub); color: var(--slime); }
.step-pip.done .num { border-color: var(--rule-slime); background: var(--slime); color: var(--void); }
.step-pip .bar { width: 1.4rem; height: 1px; background: var(--rule-mid); }
@media (max-width: 48rem) { .step-pip .lbl { display: none; } }

.wizard-panel { background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); border: 1px solid var(--rule); border-radius: var(--r-xl); padding: clamp(1.3rem, 3.5vw, 2.2rem); }
.wizard-panel h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.wizard-panel .step-sub { font-size: 0.88rem; color: var(--t3); margin-bottom: 1.5rem; }
.wizard-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }

.choice-grid { display: grid; gap: 0.75rem; }
.choice {
  text-align: left; display: flex; gap: 0.9rem; align-items: flex-start;
  border: 1px solid var(--rule-mid); border-radius: var(--r-lg); background: var(--ink-elev);
  padding: 1rem 1.1rem; cursor: pointer; transition: 0.14s var(--ease); color: inherit; font: inherit; width: 100%;
}
.choice:hover:not(:disabled) { border-color: var(--rule-slime); }
.choice.on { border-color: var(--slime); background: var(--slime-sub); }
.choice:disabled { opacity: 0.45; cursor: not-allowed; }
.choice-radio { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--rule-strong); flex: none; margin-top: 0.15rem; position: relative; transition: 0.14s; }
.choice.on .choice-radio { border-color: var(--slime); }
.choice.on .choice-radio::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--slime); }
.choice-body { flex: 1; min-width: 0; }
.choice-title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--t0); display: flex; align-items: center; gap: 0.5rem; }
.choice-blurb { font-size: 0.83rem; color: var(--t3); margin-top: 0.2rem; line-height: 1.5; }

.signer-edit { display: grid; grid-template-columns: 1fr 1fr auto auto auto; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; }
@media (max-width: 52rem) { .signer-edit { grid-template-columns: 1fr 1fr; } }
.signer-edit input, .signer-edit select { padding: 0.5rem 0.65rem; font-size: 0.85rem; background: var(--ink-elev); border: 1px solid var(--rule-mid); border-radius: var(--r-md); color: var(--t0); }
.mini-toggle { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono); font-size: 10px; color: var(--t4); cursor: pointer; user-select: none; }
.mini-toggle input { width: auto; }
.row-del { width: 2rem; height: 2rem; border-radius: var(--r-md); border: 1px solid var(--rule-mid); background: transparent; color: var(--t4); cursor: pointer; display: grid; place-items: center; }
.row-del:hover { color: var(--rose); border-color: rgba(255, 122, 122, 0.4); }

.review-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.2rem; }
.review-grid dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t4); }
.review-grid dd { margin: 0; font-family: var(--font-mono); font-size: 0.85rem; color: var(--t1); text-align: right; word-break: break-word; }

.note { font-size: 0.82rem; line-height: 1.55; color: var(--t3); border-left: 2px solid var(--rule-slime); padding-left: 0.85rem; margin-top: 1.2rem; }
.note.warn { border-color: rgba(255, 184, 107, 0.5); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 1.6rem; transform: translate(-50%, 1.5rem); z-index: 300; max-width: 90vw; font-family: var(--font-display); font-size: 0.84rem; font-weight: 500; color: var(--t0); background: var(--ink-elev); border: 1px solid var(--rule-slime); border-radius: 999px; padding: 0.7rem 1.25rem; box-shadow: var(--shadow-xl); opacity: 0; transition: 0.24s var(--ease); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { border-color: var(--rose); }
.toast.ok { border-color: var(--slime); }

/* footer */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--rule); padding: 1.5rem var(--gutter); display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--t4); text-align: center; }
.foot b { color: var(--t2); font-weight: 500; }

/* mobile topbar: drop the net-pill + brand sublabel so the breadcrumb (the
   back affordance) and wallet/theme never overlap. Breadcrumb stays. */
@media (max-width: 40rem) {
  .net-pill { display: none; }
  .brand-sub { display: none; }
}
@media (max-width: 33rem) {
  .topbar { gap: 0.55rem; padding-inline: 1rem; }
  .brand-name { font-size: 0.92rem; }
  .crumbs { font-size: 10px; }
  .btn.wallet.connected.sm { padding: 0.4rem 0.6rem; font-size: 0.68rem; max-width: 38vw; overflow: hidden; }
}

/* spinner */
.spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; } }
