/* Front of Goal — soccer-first prediction-market frontend.
   Visual language: editorial white, hairline borders, serif headlines,
   restrained accent. Closer to a printed broadsheet than a dashboard. */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #f9f8f3;             /* near-white, subtle warmth */
  --bg-elev-1: #ffffff;
  --bg-elev-2: #f0ede2;
  --border: #e3deca;
  --border-strong: #c0b9a3;
  --text: #0e0e0e;
  --text-soft: #2a2a2a;
  --muted: #6b6b6b;
  --muted-2: #a09a8c;
  --accent: #1d3a2a;          /* forest green */
  --accent-strong: #15301f;
  --accent-soft: rgba(29, 58, 42, 0.06);
  --link: #1d3a2a;
  --up: #2d5a3e;              /* same forest, used for price moves */
  --down: #9a3a3a;            /* oxblood */
  --gold: #b08a3e;            /* used very sparingly for highlights */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(20, 15, 5, 0.06);
  --maxw: 1140px;
  --radius: 4px;
  --radius-sm: 3px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* a11y skip-link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fafaf7;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 999;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  outline: none;
}

/* visible focus ring for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color 0.12s; }
a:hover { color: var(--accent); }
button { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 18px; line-height: 1.3; }
p { color: var(--text-soft); }
.lede { font-size: 17px; color: var(--text-soft); line-height: 1.6; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(249, 248, 243, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
  max-width: none;
  padding: 0 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: url("/static/logo.png") center / contain no-repeat;
  display: block;
}
.brand-wordmark {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}
@media (max-width: 640px) {
  .brand-wordmark { display: none; }
}
.primary-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.primary-nav a {
  color: var(--text-soft);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a.active {
  color: var(--text);
}
.primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.header-search {
  position: relative;
  flex: 1 1 320px;
  min-width: 200px;
  max-width: 520px;
  margin-left: auto;
}
.header-search input {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: 13px/1.4 var(--font-sans);
  padding: 8px 12px 8px 30px;
  border-radius: 8px;
  outline: 0;
  transition: border-color 0.15s, background 0.15s;
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { border-color: var(--accent); background: var(--bg-elev-1); }
.header-search::before {
  content: "";
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}
.header-search::after {
  content: "";
  position: absolute;
  left: 19px; top: 18px;
  width: 5px; height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
}
.header-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(20, 15, 5, 0.10);
  max-height: 60vh; overflow: auto;
  z-index: 30;
  padding: 4px;
}
.header-search-results.open { display: block; }
.hsr-item {
  display: block;
  padding: 9px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
}
.hsr-item:hover, .hsr-item.focused { background: var(--bg-elev-2); }
.hsr-title { font-weight: 500; font-size: 13.5px; line-height: 1.3; letter-spacing: -0.005em; }
.hsr-title mark { background: rgba(176, 138, 62, 0.18); color: var(--text); padding: 0 1px; border-radius: 2px; }
.hsr-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; font-family: var(--font-mono); }
.hsr-empty { padding: 18px 14px; color: var(--muted); font-size: 13px; text-align: center; }
.hsr-suggestion-h { padding: 10px 14px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Header account dropdown — opens on click of the connected pill,
   shows wallet/balance/funder summary and Disconnect. */
.acct-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: var(--bg-elev-2, var(--card, #16181d));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.45);
  padding: 8px;
  z-index: 50;
  font-size: 13px;
}
.acct-menu .acct-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
}
.acct-menu .acct-row + .acct-row { border-top: 1px solid var(--border); }
.acct-label { color: var(--muted); font-size: 12px; letter-spacing: 0.01em; }
.acct-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.acct-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
.acct-link {
  flex: 1 1 auto;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}
.acct-link:hover { border-color: var(--accent); }
.acct-disconnect {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #f88;
  font-size: 12px;
  cursor: pointer;
}
.acct-disconnect:hover { border-color: #f88; background: rgba(255,136,136,0.08); }

@media (max-width: 720px) {
  .header-search { order: 99; flex: 1 1 100%; max-width: 100%; margin-left: 0; }
}

.connect-btn {
  background: var(--accent);
  color: #fafaf7;
  border: 0;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.005em;
  transition: filter 0.15s, transform 0.06s;
  white-space: nowrap;
  margin-left: auto;
}
.api-status {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: 0 0 auto;
  cursor: help;
}
.api-status-ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.api-status-down { background: var(--down); box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.api-status-checking { background: var(--muted-2); opacity: 0.6; }

body.fog-api-down .trade-button {
  opacity: 0.5;
  cursor: not-allowed;
}
body.fog-api-down .trade-button::after {
  content: " (offline)";
  font-size: 11px;
  color: var(--down);
}

.api-down-banner {
  display: none;
  background: #7f1d1d;
  color: #fecaca;
  text-align: center;
  font-size: 13px;
  padding: 8px 16px;
  line-height: 1.4;
}
body.fog-api-down .api-down-banner { display: block; }

.connect-btn:hover { filter: brightness(1.05); }
.connect-btn:active { transform: translateY(1px); }
.connect-btn[disabled] { opacity: 0.55; cursor: progress; }
.connect-btn.connected {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.connect-btn.connected:hover { background: var(--bg-elev-1); }

.header-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  100% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* ---------- main ---------- */

main.container { padding-top: 40px; padding-bottom: 96px; }

.section { margin-top: 56px; }
.section h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.section h2 .section-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

/* Italic small-caps eyebrow above section headlines (FT broadsheet feel). */
.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.eyebrow::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--border-strong);
  vertical-align: middle;
  margin-left: 10px;
  transform: translateY(-2px);
}

/* Hairline section divider with center mark — printed-page feel. */
.section-rule {
  border: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 56px 0 36px;
}
.section-rule::before,
.section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-rule::after { background: var(--border); }
.section-rule .mark {
  width: 6px;
  height: 6px;
  border: 1px solid var(--border-strong);
  transform: rotate(45deg);
}

/* ---------- hero ---------- */

.hero {
  padding: 32px 0 8px;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.06;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  font-weight: 500;
  max-width: 22ch;
  color: var(--text);
}
.hero p.lede {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 28px;
  max-width: 60ch;
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fafaf7;
}
.btn-primary:hover { filter: brightness(1.05); color: #fafaf7; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--bg-elev-1);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-elev-2); }

/* ---------- stat strip (hero) ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 36px;
  overflow: hidden;
}
.stat-cell {
  background: var(--bg-elev-1);
  padding: 16px 18px;
}
.stat-cell .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.stat-cell .stat-value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: var(--font-mono);
}
.stat-cell .stat-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- competition cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.card {
  display: block;
  padding: 18px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--border-strong); }
.card .card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--bg-elev-2);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
.card .card-volume {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
  margin: 6px 0 2px;
}
.card .card-meta {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- lists ---------- */

.event-list, .match-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.event-list li, .match-list li {
  border-bottom: 1px solid var(--border);
}
.event-list li:last-child, .match-list li:last-child { border-bottom: 0; }
.event-list a, .match-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 18px;
  align-items: center;
  transition: background 0.12s;
}
.event-list a:hover, .match-list a:hover {
  background: var(--bg-elev-2);
  color: var(--text);
}
.event-title, .match-teams {
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.event-meta, .match-meta {
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
}
.event-volume {
  font-family: var(--font-mono);
  color: var(--text-soft);
  font-weight: 500;
}
.match-vs {
  display: inline;
  color: var(--muted-2);
  margin: 0 6px;
  font-weight: 400;
}

/* price movement chips */
.move-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.move-up   { color: var(--up); background: rgba(34, 197, 94, 0.10); }
.move-down { color: var(--down); background: rgba(239, 68, 68, 0.10); }
.move-flat { color: var(--muted); background: var(--bg-elev-2); }
.move-chip::before {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.move-up::before   { border-bottom: 5px solid var(--up); }
.move-down::before { border-top: 5px solid var(--down); }
.move-flat::before { display: none; }

/* charts */
.chart-wrap {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 8px;
  margin: 12px 0 28px;
}
.chart-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.chart-tab {
  background: var(--bg-elev-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  font-weight: 600;
}
.chart-tab.active { color: var(--text); background: var(--accent-soft); border-color: rgba(34,197,94,0.3); }
.chart-tab:hover:not(.active) { color: var(--text); }
.chart {
  width: 100%;
  height: 220px;
  position: relative;
}
.chart-svg { display: block; width: 100%; height: 100%; }
.chart-line { fill: none; stroke-width: 2; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 10.5px; font-family: var(--font-mono); }
.chart-crosshair { stroke: var(--muted-2); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-dot { fill: var(--accent); stroke: var(--bg-elev-1); stroke-width: 2; }
.chart-readout { fill: var(--text); font-size: 12px; font-family: var(--font-mono); font-weight: 600; }
.chart-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 60px 0;
  font-family: var(--font-mono);
}
.chart-loading { opacity: 0.5; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 8px 0 0;
}
.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 3px 10px 3px 6px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  cursor: pointer;
  line-height: 1.4;
  max-width: 280px;
}
.chart-legend-item span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.chart-legend-muted { opacity: 0.35; cursor: default; }
.chart-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-family: var(--font-mono);
}

/* trade modal */
#fog-modal-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.fog-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 15, 5, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  animation: fogFade 160ms ease-out;
}
@keyframes fogFade { from { opacity: 0; } to { opacity: 1; } }
.fog-modal {
  width: min(540px, 92vw);
  max-height: 92vh;
  overflow: auto;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 32px 64px rgba(20, 15, 5, 0.18), 0 0 0 1px var(--border);
  display: flex; flex-direction: column;
}
.fog-modal-h {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 22px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.fog-modal-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 700; margin-bottom: 4px;
}
.fog-modal-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em; line-height: 1.3; max-width: 36ch;
}
.fog-modal-x {
  background: transparent; border: 0; color: var(--muted);
  font-size: 22px; cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
}
.fog-modal-x:hover { color: var(--text); background: var(--bg-elev-2); }
.fog-modal-body { padding: 18px 22px 6px; }
.fog-modal-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 16px;
}
.fog-modal-grid > div { background: var(--bg-elev-1); padding: 12px 14px; }
.fog-modal-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}
.fog-label-hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 10px; }
.fog-modal-value { margin-top: 4px; font-weight: 700; font-size: 15px; }
.fog-modal-value.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.fog-modal-row {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
}
.fog-modal-row input {
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  color: var(--text); font: 18px/1 var(--font-mono);
  padding: 14px 14px; border-radius: 10px;
  width: 100%; font-variant-numeric: tabular-nums;
}
.fog-modal-row input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
/* Source picker — only renders when both proxy pUSD and EOA pUSD
   are positive. Two side-by-side cards, click to select. */
.fog-source-row { gap: 6px; }
.fog-source-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fog-source-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev-2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.fog-source-opt:hover { border-color: var(--accent); }
.fog-source-opt.active { border-color: var(--accent); background: var(--bg-elev-1); }
.fog-source-opt input[type="radio"] { display: none; }
.fog-source-name { font-size: 13px; font-weight: 600; color: var(--text); }
.fog-source-bal { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.fog-modal-summary {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  font-size: 13.5px; line-height: 1.6; color: var(--text-soft);
}
.fog-modal-summary strong { color: var(--text); }
.fog-modal-summary .muted { color: var(--muted); margin-top: 6px; font-size: 12.5px; }
.fog-modal-warning {
  margin-top: 12px; min-height: 0;
  font-size: 13px; color: var(--down);
}
.fog-modal-warning[data-kind="error"] {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px; padding: 10px 12px; margin-top: 12px;
}
.fog-modal-f {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 22px 22px;
}
.fog-modal-success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 8px 0 10px;
}
.fog-modal-success-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(34, 197, 94, 0.15); color: var(--up);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin-bottom: 14px;
  border: 2px solid rgba(34, 197, 94, 0.4);
}
.fog-modal-success h3 { margin: 0 0 14px; font-size: 18px; }
.fog-modal-success dl {
  width: 100%; margin: 0; padding: 12px 14px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13.5px;
}
.fog-modal-success dl > div {
  display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.fog-modal-success dl > div:last-child { border-bottom: 0; }
.fog-modal-success dt { color: var(--muted); }
.fog-modal-success dd { margin: 0; color: var(--text); font-weight: 600; }

@media (max-width: 600px) {
  .fog-modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .fog-modal-grid { grid-template-columns: 1fr; }
}

/* live price flash */
.flash-up   { animation: flashUp 700ms ease-out; }
.flash-down { animation: flashDown 700ms ease-out; }
@keyframes flashUp {
  0%   { background: rgba(34, 197, 94, 0.32); color: var(--up); }
  100% { background: transparent; }
}
@keyframes flashDown {
  0%   { background: rgba(239, 68, 68, 0.32); color: var(--down); }
  100% { background: transparent; }
}
.header-status.live-on::before {
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
}

/* world cup hub */
.wc-hero {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 36px 28px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.wc-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  background: url("/static/logo.png") center / contain no-repeat;
  opacity: 0.04;
  pointer-events: none;
}
.wc-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.005em;
  margin: 6px 0 10px;
  font-weight: 500;
  line-height: 1.06;
}
.wc-hero p { color: var(--text-soft); margin: 0 0 24px; max-width: 56ch; }
.wc-countdown {
  display: inline-grid;
  grid-template-columns: repeat(4, auto);
  gap: 22px;
  font-family: var(--font-serif);
  background: var(--bg);
  padding: 16px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.wc-countdown div { text-align: center; }
.wc-countdown .num {
  font-size: 34px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1;
}
.wc-countdown .lab {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 5px;
}

.wc-contenders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.wc-row {
  background: var(--bg-elev-1);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: background 0.12s;
}
.wc-row:hover { background: var(--bg-elev-2); }
.wc-row .team-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  width: 22px;
}
.wc-row .team-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  letter-spacing: -0.005em;
  flex: 1;
  min-width: 0;
}
.wc-row .team-implied {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wc-implied-bar {
  flex: 0 0 100px;
  height: 4px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
}
.wc-implied-bar .fill { display: block; height: 100%; background: var(--accent); }

/* tier grid */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.tier {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.tier header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.tier h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.tier-sub {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tier-summary {
  color: var(--text-soft);
  font-size: 13px;
  margin: 0 0 10px;
  line-height: 1.5;
}
.tier-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.tier-list li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.tier-list li:last-child { border-bottom: 0; }
.tier-team { color: var(--text); font-weight: 500; }
.tier-pct {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* account page */
.account-empty {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  margin: 24px 0;
}
.account-empty h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.account-empty p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.account-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 22px 0 28px;
  overflow: hidden;
}
.account-stats > div { background: var(--bg-elev-1); padding: 14px 16px; }
.account-stat-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600;
}
.account-stat-value {
  margin-top: 4px; font-size: 16px; font-weight: 700; letter-spacing: -0.005em;
}
.account-stat-value.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.account-stat-value.up { color: var(--up); }
.account-stat-value.down { color: var(--down); }

.account-positions {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.account-pos {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.account-pos:last-child { border-bottom: 0; }
.account-pos:hover { background: var(--bg-elev-2); }
.account-pos-main { min-width: 0; }
.account-pos-title {
  display: block; color: var(--text); font-weight: 600; font-size: 14.5px;
  letter-spacing: -0.005em;
}
.account-pos-title:hover { color: var(--link); }
.account-pos-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; font-family: var(--font-mono); }
.account-pos-value { font-size: 14.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.account-pos-pnl { font-size: 14px; font-weight: 600; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.account-pos-pnl.up { color: var(--up); }
.account-pos-pnl.down { color: var(--down); }
.account-loading, .account-empty-list {
  padding: 28px 18px; color: var(--muted); font-size: 13px; text-align: center;
}
.btn-sm {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.btn-sm:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

@media (max-width: 700px) {
  .account-pos { grid-template-columns: 1fr auto; row-gap: 6px; }
  .account-pos-value { grid-column: 2; text-align: right; }
  .account-pos-pnl { grid-column: 2; text-align: right; }
  .account-pos-main { grid-column: 1; grid-row: 1; }
  .btn-sm { grid-column: 1 / -1; justify-self: stretch; }
}

/* 404 */
.not-found {
  text-align: center;
  padding: 60px 0 80px;
}
.not-found-num {
  font-family: var(--font-mono);
  font-size: clamp(56px, 12vw, 120px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  opacity: 0.85;
}
.not-found h1 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.not-found p {
  color: var(--muted);
  max-width: 50ch;
  margin: 0 auto 24px;
  font-size: 15px;
}
.not-found-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.not-found-suggestions {
  margin: 40px auto 0;
  max-width: 56ch;
  text-align: left;
}
.not-found-h {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.not-found-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.not-found-item a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, background 120ms ease;
}
.not-found-item a:hover {
  border-color: var(--accent);
  background: var(--card-hover, var(--card));
}
.not-found-item-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.not-found-item-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.not-found-support {
  margin-top: 32px !important;
  font-size: 13px !important;
}

/* about page */
.about article { max-width: 64ch; margin: 0 auto; }
.about h1 {
  font-size: clamp(28px, 3.6vw, 36px);
  letter-spacing: -0.015em;
  margin: 8px 0 6px;
  font-weight: 800;
}
.about .lede {
  font-size: 18px;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0 0 28px;
}
.about h2 {
  font-size: 17px;
  letter-spacing: -0.005em;
  margin: 32px 0 8px;
  font-weight: 700;
}
.about p { margin: 0 0 14px; color: var(--text-soft); line-height: 1.65; }
.about strong { color: var(--text); font-weight: 600; }
.about .signoff {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- breadcrumbs ---------- */

.breadcrumbs {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  letter-spacing: 0;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: var(--muted-2); margin: 0 6px; }

/* ---------- event page ---------- */

.event-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.2vw, 52px);
  letter-spacing: -0.012em;
  margin: 4px 0 18px;
  line-height: 1.04;
  font-weight: 500;
  max-width: 24ch;
}
.event-description {
  color: var(--text-soft);
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 64ch;
}
.event-prose {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  margin: 4px 0 18px;
  max-width: 64ch;
}
.faq {
  margin: 56px 0 24px;
  max-width: 64ch;
}
.faq h2 {
  font-size: 22px;
  margin: 0 0 16px;
}
.faq-list {
  margin: 0;
}
.faq-list dt {
  color: var(--text);
  font-weight: 600;
  margin: 14px 0 4px;
}
.faq-list dd {
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 14px;
}
.faq-cta {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 16px;
}
.glossary {
  margin: 0 0 28px;
}
.glossary dt {
  color: var(--text);
  font-weight: 600;
  margin: 14px 0 4px;
}
.glossary dd {
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 12px;
}
.event-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  margin: 0 0 40px;
  padding: 18px 0;
  overflow: visible;
}
.event-stats > div {
  background: transparent;
  padding: 0 22px;
  margin: 0;
  border-right: 1px solid var(--border);
}
.event-stats > div:last-child { border-right: 0; }
.event-stats dt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
  order: 2;
}
.event-stats dd {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  order: 1;
  margin-bottom: 4px;
}
.event-stats > div { display: flex; flex-direction: column; }

/* ---------- odds table ---------- */

.markets {
  margin-top: 8px;
}
.markets h2 {
  font-size: 16px;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}

.odds-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}
.odds-table th, .odds-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.odds-table th {
  background: var(--bg-elev-1);
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.odds-table td.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.odds-table tbody tr { transition: background 0.1s; }
.odds-table tbody tr:hover { background: var(--bg-elev-2); }
.odds-table tbody tr:last-child td { border-bottom: 0; }

.spread-cell { font-size: 13px; line-height: 1.25; }
.spread-bid { color: var(--up); }
.spread-ask { color: var(--down); }
.spread-sep { color: var(--muted-2); margin: 0 4px; }
.spread-meta { color: var(--muted); font-size: 11px; margin-top: 2px; font-family: var(--font-mono); }

.outcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}
.outcome-yes { color: var(--up); border-color: rgba(34, 197, 94, 0.22); background: rgba(34, 197, 94, 0.08); }
.outcome-no  { color: var(--down); border-color: rgba(239, 68, 68, 0.22); background: rgba(239, 68, 68, 0.08); }
.outcome-over { color: var(--up); border-color: rgba(34, 197, 94, 0.22); background: rgba(34, 197, 94, 0.08); }
.outcome-under { color: var(--down); border-color: rgba(239, 68, 68, 0.22); background: rgba(239, 68, 68, 0.08); }

.implied-bar {
  width: 96px;
  height: 6px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}
.implied-bar .fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.trade-button {
  background: var(--accent);
  color: #fafaf7;
  border: 0;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: -0.005em;
  transition: filter 0.15s, transform 0.06s;
}
.trade-button:hover { filter: brightness(1.06); }
.trade-button:active { transform: translateY(1px); }
.trade-button[disabled] { opacity: 0.55; cursor: not-allowed; }
.trade-closed {
  display: inline-block;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.trade-button-sell {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--down);
  margin-left: 6px;
}
.trade-button-sell:hover { background: rgba(239,68,68,0.08); }

#fog-shortcut-help {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 200;
}
#fog-shortcut-help.show { opacity: 1; transform: translateY(0); }
#fog-shortcut-help strong { display: block; margin-bottom: 6px; }
#fog-shortcut-help ul { list-style: none; margin: 0; padding: 0; }
#fog-shortcut-help li { padding: 2px 0; color: var(--text-soft); }
#fog-shortcut-help kbd {
  display: inline-block;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-right: 8px;
  min-width: 18px;
  text-align: center;
}

/* ---------- related and trust ---------- */

.related ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.related li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.related li:last-child { border-bottom: 0; }
.related li span.muted { color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; }

.trust {
  margin-top: 48px;
  padding: 22px 24px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}
.trust h2 {
  margin-top: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}
.trust ul { margin: 12px 0 0; padding-left: 18px; }
.trust li { margin-bottom: 6px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding: 36px 0 56px;
  color: var(--muted);
  font-size: 12.5px;
  background: var(--bg-elev-1);
}
.site-footer h4 { font-family: var(--font-serif) !important; }
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 18px;
}
.site-footer h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 10px;
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a:hover { color: var(--text); }
.footer-fine {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- competition page ---------- */

.competition-header h1 {
  font-size: clamp(28px, 3.6vw, 36px);
  letter-spacing: -0.015em;
  margin: 8px 0 6px;
  font-weight: 800;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .header-status { display: none; }
  .site-header .container { gap: 20px; }
  .primary-nav { gap: 14px; }
}

@media (max-width: 880px) {
  .site-header .container { gap: 14px; }
  .primary-nav { gap: 12px; font-size: 13px; }
  .header-search { flex-basis: 180px; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .site-header .container { height: auto; padding: 12px 18px; flex-wrap: wrap; gap: 14px; }
  .header-status { display: none; }
  .primary-nav {
    gap: 14px;
    font-size: 13px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 100%;
    order: 4;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .header-search { order: 3; }
  .connect-btn { order: 2; }
  main.container { padding-top: 28px; }
  .hero h1 { font-size: 28px; }
  .hero p.lede { font-size: 15.5px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .odds-table { font-size: 13px; }
  .odds-table th, .odds-table td { padding: 10px 12px; }
  .odds-table th:nth-child(3), .odds-table td:nth-child(3),
  .odds-table th:nth-child(5), .odds-table td:nth-child(5),
  .odds-table th:nth-child(6), .odds-table td:nth-child(6) { display: none; }
  .event-list a, .match-list a { padding: 14px 14px; }
  .chart { height: 200px; }
  .fog-modal-row input { font-size: 16px; }  /* prevent iOS zoom on focus */
  .fog-modal-grid { grid-template-columns: 1fr 1fr !important; }
  .trade-button-sell { margin-left: 4px; padding: 7px 10px; font-size: 12.5px; }
}

@media (max-width: 480px) {
  .stat-strip { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .trade-button { width: 100%; margin-bottom: 4px; }
  .trade-button-sell { width: 100%; margin-left: 0; margin-bottom: 0; }
}

/* ---- Order book widget ---- */
.book-section { margin-top: 28px; }
.book-section > h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.book-section .section-meta { color: var(--muted); font-size: 12px; font-weight: 400; }
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.book-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.book-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: inherit;
}
.book-mid-wrap { display: inline-flex; gap: 6px; align-items: baseline; font-size: 12px; }
.book-mid-wrap .muted { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.book-mid, .book-spread { font-weight: 600; }
.book-side {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.book-mid-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.book-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  overflow: hidden;
  z-index: 0;
}
.book-bar {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
}
.book-row-bid .book-bar { background: var(--up); }
.book-row-ask .book-bar { background: var(--down); }
.book-row-bid .book-price { color: var(--up); }
.book-row-ask .book-price { color: var(--down); }
.book-size { color: var(--muted); text-align: right; padding-left: 8px; font-size: 11.5px; }
.book-empty { color: var(--muted); font-size: 11px; padding: 4px 6px; font-family: var(--font-mono); }

/* Live WebSocket indicator: tighter pulse when WS feed is open. */
.header-status.live-on { color: var(--text); }
.header-status.live-ws::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  vertical-align: 0;
  animation: live-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.55);
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

@media (max-width: 880px) {
  .book-grid { grid-template-columns: 1fr; }
}

/* ---- Account: open orders & recent fills ---- */
.account-orders, .account-fills { display: flex; flex-direction: column; gap: 6px; }
.account-order, .account-fill {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.account-order-main, .account-fill-main { min-width: 0; }
.account-order-title, .account-fill-title {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.account-fill-title:hover { text-decoration: underline; }
.account-order-sub, .account-fill-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.account-fill-value { font-weight: 500; }
.account-fill-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.account-fill-time a { color: var(--accent); text-decoration: none; }
.account-fill-time a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .account-order, .account-fill { grid-template-columns: 1fr auto; }
  .account-fill-time { grid-column: 1 / -1; }
}

/* ---- Trade modal: market/limit tabs ---- */
.fog-modal-tabs {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.fog-modal-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: color 0.1s, border-color 0.1s;
  margin-bottom: -1px;
}
.fog-modal-tab:hover { color: var(--text); }
.fog-modal-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.fog-modal-tab-hint {
  margin-left: auto;
  font-size: 11.5px;
  padding: 4px 0 4px 8px;
}
@media (max-width: 480px) {
  .fog-modal-tab-hint { display: none; }
}

/* ---- Kelly Criterion sizing band ---- */
.fog-kelly-band {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 10px;
  margin-bottom: 14px;
}
.fog-kelly-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.fog-kelly-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
}
.fog-kelly-prefix { white-space: nowrap; }
.fog-kelly-inputs input {
  width: 52px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: 15px/1 var(--font-mono);
  padding: 7px 8px;
  border-radius: 7px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fog-kelly-inputs input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fog-kelly-suffix {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.fog-kelly-output {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
  min-height: 20px;
}
.fog-kelly-output strong { color: var(--text); }
.fog-kelly-noedge { color: var(--muted); font-style: italic; }

/* ---- Funding guide (shown when pUSD balance is $0) ---- */
.fog-funding-guide {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}
.fog-funding-guide p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
}
.fog-funding-guide p strong { color: var(--text); }
.fog-funding-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.fog-funding-verify {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.fog-funding-verify:hover { color: var(--text); border-bottom-color: var(--text); }
.fog-funding-retry-note { font-size: 12.5px; color: var(--muted); }
.fog-wrap-amount-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fog-wrap-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}
.fog-wrap-input-wrap input {
  flex: 1;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: 18px/1 var(--font-mono);
  padding: 12px 14px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.fog-wrap-input-wrap input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fog-wrap-gas-note { font-size: 12px; color: var(--muted); margin: 0; }
.fog-wrap-steps {
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.fog-summary-warn {
  color: var(--down);
  font-size: 12.5px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ---- Status page ---- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 18px 0 32px;
}
.status-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

/* ---- Homepage intel showcase ---- */
.intel-showcase-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.intel-showcase-match { font-weight: 600; margin: 0 0 16px; }
.intel-showcase-match a { color: inherit; }
.intel-showcase-cta { margin: 16px 0 0; }

/* ---- Match intelligence panel ---- */
.intel-section { margin: 0 0 32px; }

.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

.intel-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.intel-card-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* Form badges */
.intel-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  margin-bottom: 10px;
}
.intel-form-row:last-of-type { margin-bottom: 0; }

.intel-team-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex: 1 1 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.form-end-marker {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-left: 6px;
}

.form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: 0;
}
.form-badge.form-w { background: var(--up); }
.form-badge.form-d { background: var(--muted-2); }
.form-badge.form-l { background: var(--down); }

/* H2H table */
.intel-h2h-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.intel-h2h-table td {
  padding: 4px 0;
  vertical-align: middle;
}
.intel-h2h-date {
  color: var(--muted);
  width: 76px;
  white-space: nowrap;
}
.intel-h2h-score {
  font-family: var(--font-mono);
  font-weight: 600;
  width: 44px;
  color: var(--text);
}
.intel-h2h-comp {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Officials & venue */
.intel-official-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 6px;
  font-size: 13px;
}
.intel-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  min-width: 56px;
  flex-shrink: 0;
}
.intel-value { color: var(--text-soft); }

/* Weather card */
.intel-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.intel-weather-icon { font-size: 24px; line-height: 1; }
.intel-weather-temp {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.intel-weather-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin-left: 2px;
}
.intel-weather-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* News feed */
.intel-news {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 4px;
}
.intel-news-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.intel-news-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.intel-news-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--link);
  text-decoration: none;
  line-height: 1.4;
}
.intel-news-link:hover { text-decoration: underline; }
.intel-news-meta {
  display: flex;
  gap: 6px;
  font-size: 11px;
}
.intel-news-team {
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Footnotes */
.intel-footnote {
  font-size: 11px;
  color: var(--muted-2);
  margin: 8px 0 0;
}
.intel-source-note {
  font-size: 11px;
  color: var(--muted-2);
  margin: 12px 0 0;
}
.intel-placeholder { font-size: 13px; }

/* Expiry banner */
.intel-expiry-banner {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  margin: 0 0 20px;
}

@media (max-width: 500px) {
  .intel-grid { grid-template-columns: 1fr; }
  .intel-team-label { min-width: 60px; }
}
.status-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.status-card h3 { margin: 0; font-size: 14px; font-weight: 500; }
.status-detail { color: var(--muted); font-size: 12.5px; margin: 0; font-family: var(--font-mono); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--bg-elev-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill-ok { color: #22c55e; border-color: rgba(34,197,94,0.32); background: rgba(34,197,94,0.08); }
.status-pill-slow { color: #f59e0b; border-color: rgba(245,158,11,0.32); background: rgba(245,158,11,0.08); }
.status-pill-down { color: var(--down); border-color: rgba(239,68,68,0.32); background: rgba(239,68,68,0.08); }
.status-pill-checking { color: var(--muted); }

/* ---- Footer risk strip ---- */
.footer-risk {
  display: block;
  padding: 8px 12px;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev-1);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.footer-fine { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ---- Live listings (listings.js) ---- */
.fog-new-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(29, 58, 42, 0.10);
  color: var(--accent);
  border: 1px solid rgba(29, 58, 42, 0.20);
  vertical-align: 2px;
  text-transform: uppercase;
}
.fog-recovery-note {
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--muted);
}
.event-recovery .btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

/* ---- Live score banner (intelligence.js) ---- */
.fog-live-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-left: 3px solid #c0392b;
  border-radius: var(--radius);
  padding: 6px 14px 6px 10px;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1;
}
.fog-live-pip {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0392b;
  flex-shrink: 0;
  animation: fog-live-pulse 1.5s ease-in-out infinite;
}
@keyframes fog-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.fog-live-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c0392b;
  flex-shrink: 0;
}
.fog-live-score-text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.fog-live-clock {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

/* World Cup per-team pages and team grid. */
.wc-team-hero {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.wc-team-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 8px 0 12px;
}
.wc-team-hero .lede {
  color: var(--text-soft);
  max-width: 64ch;
  margin: 0;
}

.wc-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.wc-team-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.wc-team-card {
  display: block;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 80ms ease, transform 80ms ease;
}
.wc-team-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.wc-team-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.wc-team-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  min-width: 24px;
}
.wc-team-name {
  font-size: 16px;
  margin: 0;
  flex: 1;
}
.wc-team-group {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-elev-2);
  padding: 2px 7px;
  border-radius: 4px;
}
.wc-team-card-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.wc-team-implied {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text);
}
.wc-team-implied-label {
  font-size: 12px;
  color: var(--muted);
}
.wc-team-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.wc-team-bigstat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
}
@media (max-width: 640px) {
  .wc-team-bigstat { grid-template-columns: 1fr; }
}
.wc-team-bigstat-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.wc-team-bigstat-value {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 28px;
}
.wc-team-bigstat-value .implied-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-elev-2);
  border-radius: 4px;
  overflow: hidden;
}
.wc-team-bigstat-value .implied-bar .fill {
  display: block;
  height: 100%;
  background: var(--accent);
}

.link-arrow {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.link-arrow:hover { text-decoration: underline; }

/* "Why this vs Polymarket native" homepage section. */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0 28px;
}
.why-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.why-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--text);
}
.why-card p {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}
.why-card a {
  color: var(--accent);
  text-decoration: none;
}
.why-card a:hover { text-decoration: underline; }

/* World Cup group + players tables. */
.group-table, .player-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.group-table-head, .player-table-head,
.group-table-row, .player-table-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.group-table-head, .player-table-head {
  background: var(--bg-elev-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.group-table-head, .group-table-row {
  grid-template-columns: minmax(140px, 1.6fr) 1fr 1fr 1fr auto;
}
.player-table-head, .player-table-row {
  grid-template-columns: 56px minmax(140px, 1.6fr) 1fr auto;
}
.group-table-row, .player-table-row {
  border-top: 1px solid var(--border);
}
.group-team-name, .player-name {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.group-team-name:hover { color: var(--accent); }
.player-rank { color: var(--muted); }
.player-implied, .group-table-row .mono { color: var(--text); }
@media (max-width: 640px) {
  .group-table-head, .player-table-head { display: none; }
  .group-table-row { grid-template-columns: 1fr 1fr; }
  .player-table-row { grid-template-columns: 1fr 1fr; }
}

.group-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.group-nav a, .group-nav-active {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-soft);
}
.group-nav a:hover { border-color: var(--accent); color: var(--accent); }
.group-nav-active {
  background: var(--bg-elev-2);
  color: var(--text);
  font-weight: 500;
}
.wc-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

/* Wallet-source choice modal. Two-button picker that leads into the
   canonical injected flow OR the official WalletConnect modal. */
#fog-connect-choice {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 15, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9100;
  padding: 16px;
}
.fog-cc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fog-cc-card h3 { margin: 0; font-size: 18px; }
.fog-cc-card p.muted { margin: 0 0 8px; font-size: 13px; }
.fog-cc-close {
  position: absolute;
  top: 10px; right: 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  width: 32px; height: 32px;
  line-height: 1;
}
.fog-cc-close:hover { color: var(--text); }
.fog-cc-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 80ms ease, transform 80ms ease;
}
.fog-cc-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.fog-cc-mark {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--bg-elev-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.fog-cc-mark-wc { color: var(--accent); }
.fog-cc-label { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.fog-cc-label strong { font-size: 14px; font-weight: 500; }
.fog-cc-sub { font-size: 12px; color: var(--muted); }

/* ============================================================
   Account chip + sign-in / funding panels (account.js)
   ============================================================ */

.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.acc-signin {
  background: var(--accent);
  color: #fafaf7;
  border: 0;
  border-radius: 4px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.acc-signin:hover { filter: brightness(1.05); }
.acc-signin:active { transform: translateY(1px); }

.acc-fund {
  background: var(--accent);
  color: #fafaf7;
  border: 0;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.acc-fund:hover { filter: brightness(1.05); }

.acc-balance, .acc-menu-btn {
  background: var(--bg-elev-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.acc-balance:hover, .acc-menu-btn:hover { background: var(--bg-elev-2); }
.acc-balance .acc-name {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.acc-busy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.acc-spin {
  width: 12px;
  height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: acc-spin 0.8s linear infinite;
}
@keyframes acc-spin { to { transform: rotate(360deg); } }

/* Modal root + panel */
.acc-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.acc-modal-root:empty { display: none; }
body.acc-modal-open { overflow: hidden; }
.acc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 15, 0.78);
  backdrop-filter: blur(4px);
}
.acc-panel {
  position: relative;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.acc-panel-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.acc-panel-close:hover { color: var(--text); }

.acc-panel-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}
.acc-panel-head p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.acc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.acc-tab {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  margin-bottom: -1px;
}
.acc-tab:hover { color: var(--text); }
.acc-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.acc-tabpanel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* The [hidden] attribute defaults to display:none in the user-agent
   stylesheet, but our display:flex above wins. Restore the hidden
   semantics explicitly so tab switching works. */
.acc-tabpanel[hidden] { display: none; }

.acc-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: block;
}

.acc-tabpanel input[type="email"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.acc-tabpanel input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.acc-primary {
  background: var(--accent);
  color: #fafaf7;
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}
.acc-primary:hover { filter: brightness(1.05); }

.acc-social {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  color: var(--text);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.acc-social:hover { background: var(--bg-elev-2); }

/* Secondary button (existing-wallet path) — neutral, less attention
   than the primary Magic button. */
.acc-secondary {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  text-align: center;
  display: block;
  box-sizing: border-box;
}
.acc-secondary:hover { background: var(--bg-elev-2); }

/* "or" divider between the two sign-in options. */
.acc-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.acc-or::before, .acc-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.acc-fine {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.5;
}
.acc-fine summary { cursor: pointer; }

.acc-error {
  background: rgba(225, 76, 76, 0.08);
  border: 1px solid rgba(225, 76, 76, 0.3);
  color: var(--down);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 12px;
}

.acc-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  display: inline-block;
}

/* Funding deposit list. Each row stacks vertically: chain label
   on its own line, then a flex row with the (long) address and the
   copy button. The previous grid layout collapsed the address
   column when the chain label was wide ("ETHEREUM / POLYGON /
   BASE / ARBITRUM / OPTIMISM"), causing the 42-char hex address
   to wrap one character per line. */
.acc-deposit-list { display: flex; flex-direction: column; gap: 8px; }
.acc-deposit-group { display: flex; flex-direction: column; gap: 8px; }
.acc-deposit-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-deposit-chain {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.acc-deposit-addr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;       /* lets the inner mono shrink instead of overflowing */
}
.acc-deposit-row .acc-mono {
  font-size: 11px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-copy {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1.4;
}
.acc-copy:hover { background: var(--bg-elev-1); color: var(--text); }
.acc-deposit-row .acc-copy {
  color: var(--text);
  padding: 4px 10px;
  font-size: 12px;
}
.acc-deposit-row .acc-copy:hover { background: var(--bg-elev-1); }
.acc-deposit-asset, .acc-deposit-min {
  font-size: 11px;
  color: var(--muted);
}
.acc-deposit-other summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}
.acc-deposit-other[open] summary { color: var(--text); }

/* Account dropdown menu (anchored under chip) */
.acc-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
  font-size: 13px;
}
.acc-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.acc-row-k { color: var(--muted); }
.acc-row-v {
  font-family: var(--font-mono);
  color: var(--text);
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
}
.acc-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.acc-menu-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  text-align: left;
  padding: 6px 0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.acc-menu-link:hover { color: var(--text); text-decoration: underline; }
.acc-menu-link-subtle { color: var(--muted); font-size: 12px; }
.acc-menu-link-subtle:hover { color: var(--text); }
.acc-menu-signout {
  background: transparent;
  border: 0;
  color: var(--down);
  text-align: left;
  padding: 6px 0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.acc-menu-signout:hover { color: var(--text); }

/* Make sure the header chip can host a positioned menu */
.site-header .container { position: relative; }

/* Trading wallet card — primary address in funding panel */
.acc-wallet-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.acc-wallet-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.acc-chain-note {
  margin: 0 0 8px;
  color: var(--muted);
}
.acc-bridge-note {
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 12px;
  margin: 0 0 10px;
  color: var(--text-2);
}
.acc-bridge-note a { color: var(--accent); text-decoration: underline; }

.acc-usdc-notice {
  background: #fffbea;
  border: 1px solid #e8d77a;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--text-soft);
}
.acc-usdc-notice strong { color: var(--text); }
.acc-usdc-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.acc-usdc-convert-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.acc-usdc-convert-btn:hover { background: var(--accent-strong); }
.acc-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

/* Key explainer panel — two-wallet structure */
.acc-key-explainer {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 12px;
}
.acc-key-explainer-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 90px 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: start;
}
.acc-key-explainer-row:last-child { border-bottom: none; }
.acc-key-explainer-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  grid-row: 1;
  grid-column: 1;
  padding-top: 2px;
}
.acc-key-explainer-addr {
  font-size: 11px;
  word-break: break-all;
  grid-row: 1;
  grid-column: 2;
}
.acc-key-explainer-row .acc-copy {
  grid-row: 1;
  grid-column: 3;
  align-self: start;
}
.acc-key-explainer-note {
  font-size: 12px;
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 3px;
}

/* Deposit / withdrawal shared UI */
.acc-new-user-guide {
  background: rgba(58, 166, 118, 0.08);
  border: 1px solid rgba(58, 166, 118, 0.25);
  border-radius: 4px;
  font-size: 13px;
  padding: 10px 12px;
  margin: 0 0 10px;
  line-height: 1.5;
}
.acc-new-user-guide p { margin: 0 0 6px; }
.acc-new-user-guide p:last-child { margin: 0; }
.acc-new-user-guide a { color: var(--accent); text-decoration: underline; }

.acc-deposit-warning {
  background: rgba(200, 100, 40, 0.12);
  border: 1px solid rgba(200, 100, 40, 0.3);
  border-radius: 4px;
  color: #c86428;
  font-size: 12px;
  padding: 8px 10px;
  margin: 10px 0;
  line-height: 1.4;
}
.acc-deposit-chain-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.acc-deposit-tokens {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0;
}
.acc-deposit-min-badge {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.acc-deposit-min-note {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 4px;
}
.acc-fine-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}
.acc-fine-link:hover { text-decoration: underline; }
.acc-balance-line {
  font-size: 14px;
  margin-bottom: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* Form elements for withdrawal panel */
.acc-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.acc-form-label {
  font-size: 12px;
  color: var(--muted);
}
.acc-input, .acc-select {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}
.acc-input:focus, .acc-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.acc-select { cursor: pointer; }
.acc-withdraw-status {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.acc-withdraw-step {
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 6px;
}
.acc-withdraw-result { margin-top: 10px; }

/* Key backup warning in menu */
.acc-key-warning {
  background: rgba(200, 50, 50, 0.1);
  border: 1px solid rgba(200, 50, 50, 0.3);
  border-radius: 4px;
  color: #c83232;
  font-size: 11px;
  padding: 8px 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.acc-key-warning-link {
  color: #c83232;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* QR code toggle button */
.acc-qr-toggle {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.acc-qr-toggle:hover { background: var(--bg-elev-1); color: var(--text); }
.acc-qr-wrap {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}
.acc-qr-wrap img {
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Withdrawal expiry warning variant */
.acc-withdraw-expiry {
  margin-top: 8px;
}

/* "Use max" inline button in withdrawal amount label */
.acc-max-btn {
  font-size: 11px;
  padding: 2px 7px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
  margin-left: 6px;
  font-family: var(--font-sans);
}
.acc-max-btn:hover { color: var(--text); border-color: var(--accent); }

/* Inline field validation error */
.acc-field-error {
  display: block;
  font-size: 12px;
  color: var(--down);
  min-height: 16px;
  line-height: 1.3;
}

/* Withdrawal confirmation step */
.acc-withdraw-confirm {
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 13px;
}
.acc-withdraw-confirm p { margin: 0 0 6px; }
.acc-withdraw-confirm code { word-break: break-all; display: block; margin: 4px 0 8px; }
.acc-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.acc-confirm-actions .acc-primary,
.acc-confirm-actions .acc-secondary {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
}
.acc-wrap { word-break: break-all; }

/* Toast for surfacing async errors (Magic SDK hangs, wallet
   discovery failures). Auto-dismisses after 8s. */
/* ── wallet.js UI components ─────────────────────────────────────────── */

.acc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.acc-panel-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}
.acc-panel-x {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 8px;
  font-family: inherit;
  flex-shrink: 0;
}
.acc-panel-x:hover { color: var(--text); }
.acc-panel-body { /* flow container */ }

/* Branded sign-in header */
.acc-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.acc-brand-header .acc-panel-x {
  position: absolute;
  top: -4px;
  right: -4px;
}
.acc-brand-logo {
  width: 48px;
  height: 48px;
  background: url("/static/logo.png") center / contain no-repeat;
  flex-shrink: 0;
}
.acc-brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* Buttons */
.acc-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  margin-bottom: 10px;
  line-height: 1.3;
}
.acc-btn:last-child { margin-bottom: 0; }
.acc-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.acc-btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.acc-btn-secondary {
  background: var(--bg-elev-1);
  color: var(--text);
  border-color: var(--border-strong);
}
.acc-btn-secondary:hover { background: var(--bg-elev-2); }
.acc-btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.acc-btn-ghost:hover { color: var(--text); background: var(--bg-elev-2); }
.acc-btn-danger { color: var(--down); }
.acc-btn-danger:hover { background: rgba(154, 58, 58, 0.06); }

.acc-intro {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.acc-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted-2);
  font-size: 12px;
}
.acc-divider::before, .acc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.acc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.acc-actions .acc-btn { margin-bottom: 0; }

.acc-copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  padding: 2px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.1s, border-color 0.1s;
}
.acc-copy-btn:hover { color: var(--text); border-color: var(--border-strong); }

.acc-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.acc-row .acc-label { flex-shrink: 0; }

.acc-status-msg {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.acc-deposit-block {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.acc-deposit-block .acc-label { display: block; margin-bottom: 6px; }

.acc-addr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.acc-addr-row .acc-mono {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: 12px;
}

.acc-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.acc-hint a { color: var(--accent); text-decoration: underline; }

.acc-field { margin-bottom: 14px; }
.acc-field .acc-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── end wallet.js UI ────────────────────────────────────────────────── */

.acc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 460px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  z-index: 9100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.acc-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.acc-toast-error {
  border-color: rgba(154, 58, 58, 0.5);
  background: #fff7f5;
}

/* Mobile */
@media (max-width: 720px) {
  .acc-panel { padding: 20px 16px 16px; }
  .acc-toast { left: 16px; right: 16px; transform: none; max-width: none; }
  .acc-toast.visible { transform: none; }
}
