@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans/dm-sans-v17-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans/dm-sans-v17-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/dm-sans/dm-sans-v17-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/dm-sans/dm-sans-v17-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/space-mono/space-mono-v17-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-mono/space-mono-v17-latin-700.woff2") format("woff2");
}

:root {
  /* Core Brand */
  --primary: #00E5CC;
  --primary-hover: #00FFDF;
  --primary-muted: rgba(0, 229, 204, 0.15);
  --warning-amber: #f59e0b;
  
  /* Backgrounds */
  --bg-base: #0A0A0B;
  --bg-surface: #141416;
  --bg-elevated: #1C1C1F;
  
  /* Borders */
  --border-subtle: #1F1F22;
  --border-default: #2A2A2E;
  --border-emphasis: #3A3A3F;
  
  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #8B8B8B;
  --text-tertiary: #5A5A5A;
  
  /* Semantic */
  --yes-green: #22C55E;
  --no-red: #EF4444;
  --void-gray: #6B7280;
  --yes-green-muted: rgba(34, 197, 94, 0.15);
  --no-red-muted: rgba(239, 68, 68, 0.15);
  --void-gray-muted: rgba(107, 114, 128, 0.15);
  
  /* UI Utils */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --text-muted: var(--text-secondary);
}

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout */
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 740px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--primary);
  border-color: rgba(0, 229, 204, 0.25);
  background: rgba(0, 229, 204, 0.12);
}

.container-wide {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  margin-top: 24px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hero-title {
  margin-top: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 2.4rem;
  line-height: 1.15;
}

.hero-subtitle {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 70ch;
}

.cta-row {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.link-card {
  display: block;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.15s ease;
}

.link-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(0, 229, 204, 0.12);
}

.link-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-primary);
}

.link-card-desc {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.kv-list {
  display: grid;
  gap: 10px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-key {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.kv-val {
  color: var(--text-primary);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .container-wide { padding: 0 16px; }
  .hero-title { font-size: 2rem; }
  .nav-link { padding: 7px 10px; font-size: 0.75rem; }
  .card-grid { grid-template-columns: 1fr; }
}

/* Typography */
.logo {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 32px;
  height: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: var(--bg-base); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { background: var(--text-tertiary); cursor: not-allowed; }

.btn-connect {
  background: var(--bg-elevated);
  color: var(--primary);
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  border: 1px solid var(--primary-muted);
}
.btn-connect:hover { border-color: var(--primary); background: var(--primary-muted); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--no-red);
  border: 1px solid transparent;
}
.btn-danger:hover { border-color: var(--no-red); }

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-amber);
  border: 1px solid transparent;
}
.btn-warning:hover { border-color: var(--warning-amber); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 24px; font-size: 1.1rem; width: 100%; }
.btn-icon { background: transparent; border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; padding: 8px 12px; font-size: 1.1rem; transition: all 0.15s ease; }
.btn-icon:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-muted); }
.wallet-control { position: relative; }
.wallet-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: none;
  min-width: 200px;
  overflow: hidden;
  z-index: 1000;
}
.wallet-menu.show { display: block; }
.wallet-menu-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.wallet-menu-item:hover { background: var(--bg-elevated); }
.wallet-menu-item.danger { color: var(--no-red); }
.my-positions-badge-inline {
  background: var(--primary);
  color: var(--bg-base);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Wallet Balances (below connect button) */
.wallet-balances {
  display: none;
  text-align: left;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 0 0 0;
  gap: 10px;
}
.wallet-balances .bal-eth,
.wallet-balances .bal-usdc {
  display: inline-block;
  margin-left: 10px;
}
.wallet-balances .bal-eth:first-child { margin-left: 0; }
.wallet-balances .balance-loading {
  color: var(--text-muted);
}

/* Oracle accuracy badge (header) */
.oracle-accuracy-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
}
.oracle-accuracy-link::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 229, 204, 0.75);
  box-shadow: 0 0 10px rgba(0, 229, 204, 0.6);
}
.oracle-accuracy-link:hover {
  color: var(--primary);
}

/* Main Card */
.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 8px;
  margin-top: 40px;
}

.card-header {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-group {
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 4px;
  transition: border-color 0.2s;
}
.input-group:focus-within { border-color: var(--border-emphasis); }

.label-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.label { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }

.input-field {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  outline: none;
}
.input-field::placeholder { color: var(--text-tertiary); }

textarea.input-field {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.125rem;
  resize: none;
  min-height: 80px;
}

.oracle-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--primary);
  background: var(--primary-muted);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Custom Terms / Asymmetric Commitments */
.btn-toggle-section {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s ease;
}
.btn-toggle-section:hover { color: var(--text-secondary); }
.btn-toggle-section.active { color: var(--primary); }
.btn-toggle-section .toggle-icon {
  display: inline-block;
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}
.btn-toggle-section.active .toggle-icon { transform: rotate(90deg); }

.terms-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.terms-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.terms-info-icon { flex-shrink: 0; }

.terms-input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.terms-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.terms-input {
  font-size: 1rem !important;
  padding: 8px 0;
}

.terms-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--primary-muted);
  border-radius: var(--radius-sm);
}
.terms-display-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.terms-ratio {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

/* Targeted/Private Commitment Section */
.target-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
  animation: slideDown 0.2s ease;
}
.target-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.target-info-icon { flex-shrink: 0; }
.target-input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.target-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.target-input {
  font-size: 0.9rem !important;
  font-family: 'Space Mono', monospace;
  padding: 8px 0;
}
.target-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(138, 43, 226, 0.1);
  border-radius: var(--radius-sm);
}
.target-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(138, 43, 226, 0.2);
  color: #9f7aea;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.target-preview {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Targeted commitment badges on cards */
.targeted-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.targeted-badge.private {
  background: rgba(138, 43, 226, 0.2);
  color: #9f7aea;
}
.targeted-badge.for-you {
  background: rgba(0, 229, 204, 0.2);
  color: var(--primary);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 204, 0.4); }
  50% { box-shadow: 0 0 8px 2px rgba(0, 229, 204, 0.4); }
}

/* Targeted commitment context boxes */
.context-box.private-restricted {
  background: rgba(138, 43, 226, 0.1);
  border-left: 3px solid #9f7aea;
}
.targeted-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: #9f7aea;
}
.for-you-banner {
  background: linear-gradient(135deg, rgba(0, 229, 204, 0.15) 0%, rgba(0, 229, 204, 0.05) 100%);
  border: 1px solid rgba(0, 229, 204, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}

/* Commitment ratio badge */
.terms-badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  padding: 3px 6px;
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: 4px;
  margin-left: 8px;
}

/* Asymmetric stakes display in commitment cards */
.commitment-stakes-asymmetric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.commitment-stakes-asymmetric .stake-yes {
  color: var(--yes-green);
  font-weight: 600;
}
.commitment-stakes-asymmetric .stake-no {
  color: var(--no-red);
  font-weight: 600;
}
.commitment-stakes-asymmetric .stake-separator {
  color: var(--text-tertiary);
}

/* Terms Card for Asymmetric Commitments */
.terms-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}
.terms-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.terms-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.terms-card-ratio {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-muted);
  padding: 4px 10px;
  border-radius: 4px;
}
.terms-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.terms-card-side {
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.terms-card-side.terms-yes {
  background: rgba(0, 200, 83, 0.08);
  border: 1px solid rgba(0, 200, 83, 0.2);
}
.terms-card-side.terms-no {
  background: rgba(255, 82, 82, 0.08);
  border: 1px solid rgba(255, 82, 82, 0.2);
}
.terms-side-label {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.terms-yes .terms-side-label { color: var(--yes-green); }
.terms-no .terms-side-label { color: var(--no-red); }

.terms-side-stake {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.terms-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.terms-fees {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  opacity: 0.6;
}

.action-area { margin-top: 8px; }
.btn-action { width: 100%; padding: 16px; font-size: 1.125rem; }

/* Tabs */
.tabs { display: flex; gap: 16px; margin-bottom: 16px; padding: 0 4px; }
.tab {
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--text-primary); border-bottom-color: var(--primary); }
.tab.tab-mobile-only { display: none; }

/* Commitment List */
.commitment-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.2s, border-color 0.2s;
}
.commitment-item:hover { border-color: var(--border-emphasis); transform: translateY(-1px); }

.commitment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.commitment-header-left { display: flex; align-items: center; gap: 8px; }
.commitment-header-right { display: flex; align-items: center; gap: 8px; }
.commitment-id { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--text-tertiary); }

.commitment-statement { font-size: 1rem; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.commitment-meta { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--text-secondary); }
.commitment-settlement-estimate { margin-top: 4px; font-size: 0.7rem; color: var(--text-tertiary); }
.commitment-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.status-badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}
.status-badge.lg { font-size: 0.85rem; padding: 6px 12px; }
.status-badge.open { background: var(--primary-muted); color: var(--primary); }
.status-badge.locked { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.status-badge.resolving,
.status-badge.resolution-requested { background: rgba(245, 158, 11, 0.15); color: var(--warning-amber); }
.status-badge.resolved,
.status-badge.settled { background: rgba(34, 197, 94, 0.15); color: var(--yes-green); }
.status-badge.cancelled { background: rgba(107, 114, 128, 0.15); color: var(--text-secondary); }
.status-badge.void { background: rgba(107, 114, 128, 0.15); color: var(--void-gray); }

/* Detailed Commitment View */
.commitment-detail {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.commitment-detail-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.commitment-detail-id { font-family: 'Space Mono', monospace; color: var(--text-tertiary); margin-left: 12px; }
.commitment-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.commitment-detail-statement { font-size: 1.25rem; font-weight: 500; line-height: 1.4; margin-bottom: 24px; padding: 16px; background: var(--bg-elevated); border-radius: var(--radius-md); border-left: 4px solid var(--primary); }

.viewer-role { font-family: 'Space Mono', monospace; font-size: 0.75rem; padding: 6px 12px; border-radius: 100px; border: 1px solid; }
.role-spectator { border-color: var(--border-default); color: var(--text-secondary); }
.role-party-a { border-color: var(--yes-green); color: var(--yes-green); background: rgba(34, 197, 94, 0.1); }
.role-party-b { border-color: var(--no-red); color: var(--no-red); background: rgba(239, 68, 68, 0.1); }
.role-potential { border-color: var(--primary); color: var(--primary); background: var(--primary-muted); }
.role-connect { border-color: var(--warning-amber); color: var(--warning-amber); background: rgba(245, 158, 11, 0.1); transition: all 0.15s ease; }
.role-connect:hover { background: rgba(245, 158, 11, 0.2); transform: scale(1.02); }
.data-source-badge { margin-left: 8px; font-size: 0.7rem; padding: 4px 8px; border-radius: 999px; border: 1px dashed var(--border-default); color: var(--text-tertiary); background: var(--bg-elevated); }

.commitment-detail-parties { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; margin-bottom: 24px; background: var(--bg-elevated); padding: 24px 16px 16px 16px; border-radius: var(--radius-md); }
.party-card,
.party-box { flex: 1; text-align: center; position: relative; }
.party-label { font-size: 0.75rem; color: var(--text-tertiary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.party-address { font-family: 'Space Mono', monospace; font-size: 0.9rem; color: var(--text-primary); }
.party-address a { color: inherit; text-decoration: none; }
.party-address a:hover { color: var(--primary); text-decoration: underline; }
.party-card.empty .party-address { color: var(--text-tertiary); font-style: italic; }
.party-card.you .party-address { color: var(--primary); font-weight: 700; }
.party-you-badge { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 0.6rem; background: var(--primary); color: var(--bg-base); padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.party-vs { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--text-tertiary); padding: 0 16px; opacity: 0.5; }

.commitment-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.stat-item { background: var(--bg-elevated); padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.stat-label { font-size: 0.75rem; color: var(--text-tertiary); margin-bottom: 4px; }
.stat-value { font-family: 'Space Mono', monospace; font-size: 1rem; color: var(--text-primary); }

.context-box { padding: 16px; border-radius: var(--radius-md); margin-bottom: 24px; border: 1px solid; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.context-icon { font-size: 2rem; margin-bottom: 4px; }
.context-title { font-weight: 700; font-size: 1.1rem; }
.context-text { font-size: 0.9rem; opacity: 0.9; line-height: 1.5; }

.context-box.waiting { background: rgba(0, 229, 204, 0.05); border-color: var(--primary); color: var(--primary); }
.context-box.invite { background: rgba(0, 229, 204, 0.1); border-color: var(--primary); color: var(--text-primary); }
.context-box.locked { background: rgba(59, 130, 246, 0.1); border-color: #3B82F6; color: #3B82F6; }
.context-box.ready { background: rgba(34, 197, 94, 0.1); border-color: var(--yes-green); color: var(--yes-green); }
.context-box.resolving { background: rgba(139, 92, 246, 0.1); border-color: #8B5CF6; color: #8B5CF6; }
.context-box.warning { background: rgba(245, 158, 11, 0.1); border-color: var(--warning-amber); color: var(--warning-amber); }
.context-box.favorable { background: rgba(34, 197, 94, 0.1); border-color: var(--yes-green); color: var(--yes-green); }
.context-box.unfavorable { background: rgba(239, 68, 68, 0.1); border-color: var(--no-red); color: var(--no-red); }
.context-box.void { background: rgba(107, 114, 128, 0.1); border-color: var(--void-gray); color: var(--void-gray); }
.context-box.closed { background: var(--bg-elevated); border-color: var(--border-default); color: var(--text-secondary); }
.context-box.personal-result { margin-top: 12px; }
.context-box.favorable .context-title { color: var(--yes-green); }
.context-box.unfavorable .context-title { color: var(--no-red); }
.context-box.void .context-title { color: var(--void-gray); }

.settlement-card { margin-top: 12px; border: 1px solid var(--border-default); background: var(--bg-elevated); border-radius: var(--radius-md); padding: 16px; }
.settlement-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.settlement-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.settlement-info { font-size: 0.7rem; border: 1px solid var(--border-default); background: transparent; color: var(--text-secondary); padding: 4px 8px; border-radius: 999px; cursor: pointer; }
.settlement-info:hover { border-color: var(--border-emphasis); color: var(--text-primary); }
.settlement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.settlement-box { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 12px; background: var(--bg-surface); position: relative; text-align: center; }
.settlement-label { font-size: 0.8rem; color: var(--text-primary); font-weight: 600; margin-bottom: 2px; }
.settlement-sublabel { font-size: 0.7rem; color: var(--text-tertiary); margin-bottom: 8px; }
.settlement-value { font-family: 'Space Mono', monospace; font-size: 1.1rem; color: var(--text-primary); font-weight: 700; }
.settlement-profit { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--yes-green); margin-top: 4px; }
.settlement-tag { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 100px; display: inline-block; margin-top: 8px; }
.settlement-note { font-size: 0.75rem; color: var(--text-tertiary); text-align: center; }

/* Result badge in header */
.settlement-result-badge { font-family: 'Space Mono', monospace; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.settlement-result-badge.yes { background: var(--yes-green-muted); color: var(--yes-green); border: 1px solid var(--yes-green); }
.settlement-result-badge.no { background: var(--no-red-muted); color: var(--no-red); border: 1px solid var(--no-red); }
.settlement-result-badge.void { background: var(--void-gray-muted); color: var(--void-gray); border: 1px solid var(--void-gray); }

/* Favored/unfavored box styling */
.settlement-box.favored { border-color: var(--yes-green); background: var(--yes-green-muted); }
.settlement-box.favored .settlement-value { color: var(--yes-green); }
.settlement-box.favored .settlement-tag { background: var(--yes-green); color: var(--bg-base); }
.settlement-box.unfavored { border-color: var(--no-red); background: var(--no-red-muted); }
.settlement-box.unfavored .settlement-value { color: var(--no-red); }
.settlement-box.unfavored .settlement-tag { background: var(--no-red); color: white; }

/* Refund/VOID styling */
.settlement-box.refund { border-color: var(--void-gray); background: var(--void-gray-muted); }
.settlement-box.refund .settlement-value { color: var(--text-primary); }
.settlement-box.refund .settlement-tag { background: var(--void-gray); color: white; }

/* Personal Summary - Quick view for participant's P&L */
.personal-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  text-align: center;
}

.personal-summary-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.personal-summary-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.personal-summary-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.personal-summary-amount {
  font-family: 'Space Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.personal-summary-detail {
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0.8;
}

/* Favorable variant */
.personal-summary.favorable {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid var(--yes-green);
}
.personal-summary.favorable .personal-summary-title { color: var(--yes-green); }
.personal-summary.favorable .personal-summary-amount { color: var(--yes-green); }
.personal-summary.favorable .personal-summary-detail { color: var(--yes-green); }

/* Unfavorable variant */
.personal-summary.unfavorable {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
  border: 1px solid var(--no-red);
}
.personal-summary.unfavorable .personal-summary-title { color: var(--no-red); }
.personal-summary.unfavorable .personal-summary-amount { color: var(--no-red); }
.personal-summary.unfavorable .personal-summary-detail { color: var(--no-red); }

/* Void/Draw variant */
.personal-summary.void {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(107, 114, 128, 0.05) 100%);
  border: 1px solid var(--void-gray);
}
.personal-summary.void .personal-summary-title { color: var(--void-gray); }
.personal-summary.void .personal-summary-amount { color: var(--text-primary); }
.personal-summary.void .personal-summary-detail { color: var(--void-gray); }

.commitment-detail-actions { display: flex; flex-direction: column; gap: 12px; }

.footer-info { text-align: center; margin-top: 24px; color: var(--text-tertiary); font-size: 0.875rem; padding-bottom: 40px; }
.footer-subtext { font-size: 0.75rem; margin-top: 4px; opacity: 0.5; }
.footer-subtext .footer-link { color: var(--text-tertiary); text-decoration: none; transition: color 0.2s; }
.footer-subtext .footer-link:hover { color: var(--primary); }

/* Contracts corner link (desktop only) */
.contracts-corner-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  z-index: 100;
}
.contracts-corner-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}
.contracts-corner-icon { font-size: 16px; }
@media (max-width: 768px) {
  .contracts-corner-link { display: none; }
}

/* Loading/Error States */
.loader { text-align: center; color: var(--text-secondary); padding: 40px; }
.error-msg { color: var(--no-red); font-size: 0.875rem; margin-top: 8px; text-align: center; display: none; }

/* Info box */
.info-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.info-box.warning {
  border-color: var(--warning-amber);
  background: rgba(245, 158, 11, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.pagination button {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination span { padding: 8px; color: var(--text-tertiary); font-size: 0.75rem; }

/* Utility */
.text-small-muted { font-size: 0.75rem; color: var(--text-tertiary); }
.text-small-warn { font-size: 0.75rem; color: var(--warning-amber); }
.text-small-outcome-yes { font-size: 0.75rem; color: var(--yes-green); font-weight: 600; }
.text-small-outcome-no { font-size: 0.75rem; color: var(--no-red); font-weight: 600; }
.text-small-outcome-void { font-size: 0.75rem; color: var(--void-gray); font-weight: 600; }
.text-tiny-primary { font-size: 0.65rem; color: var(--primary); }
.align-center { align-self: center; }
.mono { font-family: 'Space Mono', monospace; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.empty-state { text-align: center; color: var(--text-tertiary); padding: 20px; }
.error-msg.show { display: block; }

/* Visibility helpers - all views hidden by default until JS determines destination */
#view-create { display: none; }
#view-browse { display: none; margin-top: 24px; }
#view-my-positions { display: none; }
#browse-loader { display: none; }
#fee-display { display: none; margin-bottom: 8px; }

/* View transition states */
.view-loading #view-create,
.view-loading #view-browse,
.view-loading #view-my-positions { display: none !important; }

input[type="date"],
input[type="time"] {
  font-family: 'DM Sans', sans-serif;
}

/* Date/time picker contrast fixes for dark mode */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.7;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Force light color scheme for the picker popup (better contrast) */
input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

a {
  color: inherit;
}

/* Modal (custom alert/confirm/prompt) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-overlay.show {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-emphasis);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(420px, 92vw);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 80px rgba(0, 229, 204, 0.1);
  text-align: center;
  animation: modalSlideUp 0.25s ease-out;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Spinning logo with gradient glow */
.modal-logo-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
}
.modal-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}
.modal-logo-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--primary) 0deg,
    #00FFDF 60deg,
    #3B82F6 120deg,
    #22C55E 180deg,
    #00FFDF 240deg,
    var(--primary) 300deg,
    var(--primary) 360deg
  );
  animation: glowSpin 4s linear infinite;
  opacity: 0.6;
  filter: blur(12px);
  z-index: 1;
}
@keyframes glowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.modal-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.modal-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
  white-space: pre-line;
}
.modal-input {
  width: 100%;
  margin: 10px 0 16px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  display: none;
  text-align: left;
  transition: border-color 0.2s;
}
.modal-input:focus {
  outline: none;
  border-color: var(--primary);
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.modal-actions .btn {
  min-width: 100px;
}

/* Transaction Status Modal */
.tx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.tx-modal-overlay.show { display: flex; opacity: 1; }

.tx-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  padding: 48px 32px 40px;
  width: min(380px, calc(100vw - 32px));
  max-width: 380px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.tx-modal-overlay.show .tx-modal-card { transform: scale(1); }

.tx-modal-logo {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto 8px;
  opacity: 0.85;
}

.tx-modal-brand {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary);
  text-align: center;
  margin-bottom: 20px;
}

.tx-modal-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tx-spinner {
  position: absolute;
  inset: 0;
  border: 3px solid var(--border-default);
  border-top-color: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}
.tx-spinner.active {
  opacity: 1;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tx-success-icon, .tx-error-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  color: var(--yes-green);
  transform: scale(0.5);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tx-success-icon svg, .tx-error-icon svg {
  width: 100%;
  height: 100%;
}
.tx-error-icon { color: var(--no-red); }

.tx-success-icon.active, .tx-error-icon.active {
  transform: scale(1);
  opacity: 1;
}

.tx-modal-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.tx-modal-message {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
}
.tx-modal-subtext {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: -16px;
  margin-bottom: 24px;
  min-height: 1rem;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.tx-modal-subtext:empty { display: none; }
.tx-modal-subtext .tx-hash-link {
  font-family: 'Space Mono', monospace;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 8px;
  background: var(--primary-muted);
  border-radius: 4px;
  transition: all 0.15s ease;
}
.tx-modal-subtext .tx-hash-link:hover {
  background: var(--primary);
  color: var(--bg-base);
}
.tx-inline-link {
  margin-top: 12px;
  text-align: center;
}
.tx-inline-link .tx-hash-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.tx-inline-link .tx-hash-link:hover {
  color: var(--primary);
}
.tx-modal-btn { width: 100%; margin-top: 8px; }

/* Mobile Adjustments */
@media (max-width: 600px) {
  .nav-container { padding: 16px; }
  .logo { font-size: 1.25rem; }
  .logo-img { width: 24px; height: 24px; }
  .btn-connect { padding: 8px 12px; font-size: 0.75rem; }
  .app-card { padding: 16px 12px; }
  .commitment-item { padding: 12px; }
  .commitment-detail-stats { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HINT BUBBLE - Contextual tips that float and dismiss on tap
   ═══════════════════════════════════════════════════════════════════════════ */

.hint-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  transform: translateY(20px) scale(0.9);
  max-width: min(340px, calc(100vw - 48px));
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 229, 204, 0.1),
    0 0 60px rgba(0, 229, 204, 0.15);
  z-index: 8000;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.4s;
  pointer-events: none;
}

.hint-bubble.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: hintFloat 3s ease-in-out infinite;
}

.hint-bubble.hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
}

@keyframes hintFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1); }
}

/* Glow pulse on the border */
.hint-bubble::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--primary), #3B82F6, var(--primary));
  background-size: 200% 200%;
  z-index: -1;
  opacity: 0.6;
  animation: hintGlow 4s ease-in-out infinite;
}

@keyframes hintGlow {
  0%, 100% { background-position: 0% 50%; opacity: 0.4; }
  50% { background-position: 100% 50%; opacity: 0.7; }
}

.hint-bubble-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hint-bubble-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.hint-bubble-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}
.hint-bubble-text strong {
  color: var(--primary);
  font-weight: 600;
}

.hint-bubble-dismiss {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* Variants */
.hint-bubble.hint-success {
  border-color: var(--yes-green);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(34, 197, 94, 0.15);
}
.hint-bubble.hint-success::before {
  background: linear-gradient(135deg, var(--yes-green), #10B981, var(--yes-green));
}

.hint-bubble.hint-warning {
  border-color: var(--warning-amber);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(245, 158, 11, 0.15);
}
.hint-bubble.hint-warning::before {
  background: linear-gradient(135deg, var(--warning-amber), #F97316, var(--warning-amber));
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .hint-bubble {
    bottom: 80px;
    right: 12px;
    left: auto;
    max-width: calc(100vw - 24px);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   INFO BUTTON & HOW IT WORKS MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}
.info-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
  transform: scale(1.1);
}

/* Info Modal Specifics */
.info-modal-overlay {
  overflow-y: auto;
  padding: 24px 16px;
}

.info-modal-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  max-height: none;
  padding: 32px 28px;
  text-align: left;
  animation: modalSlideUp 0.3s ease-out;
}

.info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-elevated);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.info-modal-close:hover {
  background: var(--primary-muted);
  color: var(--primary);
}

.info-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.info-modal-icon {
  font-size: 2rem;
}

.info-modal-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.info-modal-section {
  margin-bottom: 24px;
}

.info-modal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.info-modal-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.info-modal-sublabel {
  margin-bottom: 12px !important;
  font-size: 0.85rem !important;
}

/* The prompt display box */
.info-modal-prompt {
  background: var(--bg-base);
  border: 1px solid var(--border-emphasis);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prompt-system,
.prompt-user,
.prompt-response {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.prompt-response {
  border-bottom: none;
}

.prompt-label {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.prompt-system .prompt-label { color: var(--primary); background: var(--primary-muted); }
.prompt-user .prompt-label { color: #3B82F6; background: rgba(59, 130, 246, 0.15); }
.prompt-response .prompt-label { color: var(--warning-amber); background: rgba(245, 158, 11, 0.15); }

.prompt-system p,
.prompt-user p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.prompt-code {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  font-family: 'Space Mono', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  font-style: normal;
}

.prompt-placeholder {
  color: var(--text-tertiary) !important;
  font-family: 'Space Mono', monospace !important;
}

.prompt-outcomes {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.outcome-chip {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid;
}
.outcome-chip.yes { border-color: var(--yes-green); color: var(--yes-green); background: rgba(34, 197, 94, 0.1); }
.outcome-chip.no { border-color: var(--no-red); color: var(--no-red); background: rgba(239, 68, 68, 0.1); }
.outcome-chip.void { border-color: var(--void-gray); color: var(--void-gray); background: rgba(107, 114, 128, 0.1); }

/* Outcomes list */
.info-modal-outcomes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.outcome-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.outcome-row .outcome-chip {
  min-width: 60px;
  text-align: center;
}

/* Footer */
.info-modal-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.info-modal-footer p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.info-modal-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.info-modal-link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMITMENT DETAIL - WHAT YOU'RE COMMITTING TO INFO BOX
   ═══════════════════════════════════════════════════════════════════════════ */

.commitment-info-box {
  background: linear-gradient(135deg, rgba(0, 229, 204, 0.08), rgba(59, 130, 246, 0.08));
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.commitment-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.commitment-info-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.commitment-info-title .icon {
  font-size: 1rem;
}

.commitment-info-learn {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}
.commitment-info-learn:hover {
  color: var(--primary);
}

.commitment-info-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.commitment-info-content strong {
  color: var(--text-primary);
}

.commitment-info-roles {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.commitment-role {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.commitment-role .chip {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.commitment-role .chip.yes { background: rgba(34, 197, 94, 0.15); color: var(--yes-green); }
.commitment-role .chip.no { background: rgba(239, 68, 68, 0.15); color: var(--no-red); }

/* ═══════════════════════════════════════════════════════════════════════════
   NAV - MY POSITIONS BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-my-positions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-my-positions:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}

.my-positions-icon {
  font-size: 1rem;
  line-height: 1;
  display: none;
}

.my-positions-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: var(--bg-base);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BROWSE FILTERS - PILL BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.browse-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.browse-filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-pill:hover {
  border-color: var(--border-emphasis);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-base);
}

.filter-pill.active .filter-icon {
  /* Emoji stays same color */
}

.filter-pill.small {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.filter-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BROWSE EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.browse-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
}

.browse-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.browse-empty-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.browse-empty-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MY POSITIONS - PERSONAL DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

#view-my-positions {
  margin-top: 24px;
}

.my-positions-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-back {
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.my-positions-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Stats Cards */
.my-positions-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}

.stat-card.favorable {
  border-color: var(--yes-green);
  background: rgba(34, 197, 94, 0.05);
}

.stat-card.unfavorable {
  border-color: var(--no-red);
  background: rgba(239, 68, 68, 0.05);
}

.stat-card-value {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card.favorable .stat-card-value {
  color: var(--yes-green);
}

.stat-card.unfavorable .stat-card-value {
  color: var(--no-red);
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.my-positions-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMITMENT CARD ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.commitment-item .pot-highlight {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--primary);
}

.commitment-item.high-stakes {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 229, 204, 0.1);
  position: relative;
}

.commitment-item.high-stakes::before {
  content: '🏆';
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 1.2rem;
  background: var(--bg-surface);
  padding: 0 4px;
}

.courtesy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 8px;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .my-positions-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-right {
    gap: 8px;
  }

  .btn-my-positions {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .my-positions-label {
    display: none;
  }

  .my-positions-icon {
    display: inline;
  }

  .btn-my-positions .my-positions-badge {
    position: static;
  }

  /* Mobile tab adjustments */
  .tab.tab-mobile-only { display: inline-block; }
  .tabs { flex-wrap: wrap; gap: 12px; }

  .filter-pill {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .filter-pill .filter-icon {
    font-size: 0.9rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOS ACKNOWLEDGMENT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.tos-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.tos-modal-overlay.show {
  display: flex;
  animation: modalFadeIn 0.3s ease-out;
}

.tos-modal-card {
  position: relative;
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 0 80px rgba(0, 229, 204, 0.2),
    0 25px 50px rgba(0, 0, 0, 0.5);
  animation: tosSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tos-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--no-red);
  background: var(--no-red-muted);
  border-radius: 50%;
  color: var(--no-red);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tos-modal-close:hover {
  background: var(--no-red);
  color: #fff;
  transform: scale(1.05);
}

.tos-modal-card.signing .tos-modal-close {
  opacity: 0.35;
  pointer-events: none;
}

@keyframes tosSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tos-modal-header {
  padding: 28px 28px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.tos-modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

.tos-modal-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 4px 0;
}

.tos-modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.tos-modal-body {
  padding: 24px 28px;
}

.tos-acknowledgments {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.tos-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease;
}

.tos-item:hover {
  border-color: var(--border-emphasis);
}

.tos-item-bullet {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--primary-muted);
  border: 1px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--primary);
}

.tos-item-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.tos-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding: 12px 16px;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.tos-modal-footer {
  padding: 0 28px 28px;
}

.btn-tos-sign {
  width: 100%;
  padding: 18px 24px;
  background: var(--primary);
  color: var(--bg-base);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-tos-sign:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 229, 204, 0.3);
}

.btn-tos-sign:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-tos-sign .sign-icon {
  font-size: 1.2rem;
}

.tos-terms-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tos-terms-link a {
  color: var(--primary);
  text-decoration: none;
}

.tos-terms-link a:hover {
  text-decoration: underline;
}

/* Signing state */
.tos-modal-card.signing .btn-tos-sign {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.tos-modal-card.signing .btn-tos-sign::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-tertiary);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .tos-modal-card {
    border-radius: var(--radius-md);
    margin: 0;
  }

  .tos-modal-header {
    padding: 24px 20px 16px;
  }

  .tos-modal-body {
    padding: 20px;
  }

  .tos-modal-footer {
    padding: 0 20px 24px;
  }

  .tos-modal-title {
    font-size: 1.2rem;
  }

  .tos-item {
    padding: 12px 14px;
  }

  .tos-item-text {
    font-size: 0.85rem;
  }
}