/* ASA public demo — static snapshot styles.
   Mirrors web/src/app/globals.css design tokens. No external assets. */

:root {
  --background: #000000;
  --foreground: #ededed;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --gold: #f59e0b;
  --danger: #ff4757;
  --warning: #ffa502;
  --success: #2ed573;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-secondary: #8a8a9a;
  --text-muted: #5a5a6a;
  --font-sans:
    ui-sans-serif, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --font-mono:
    ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas,
    'Liberation Mono', monospace;
}

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

html {
  color-scheme: dark;
  background: var(--background);
}

body {
  background:
    radial-gradient(
      ellipse 70% 45% at 50% -10%,
      rgba(139, 92, 246, 0.12),
      transparent
    ),
    var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
}

::selection {
  background: rgba(139, 92, 246, 0.4);
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--foreground);
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-glyph {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6 60%, #06b6d4);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.brand-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-sub {
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: auto;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--foreground);
  background: var(--surface-hover);
  text-decoration: none;
}

.site-nav a.active {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
}

.wallet-btn {
  flex: none;
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.12);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  cursor: not-allowed;
  font-family: var(--font-sans);
  white-space: nowrap;
}

/* ===== Demo badge (persistent) ===== */
.demo-badge {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 50;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #fbbf24;
  background: rgba(20, 12, 0, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  pointer-events: none;
}

/* ===== Layout ===== */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 6.5rem;
}

.crumbs {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.crumbs strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.page-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.page-title.oracle-title {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-lede {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 46rem;
  margin-bottom: 1.6rem;
}

.snapshot-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.07);
  color: #fcd34d;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.8rem;
  margin-bottom: 1.4rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.dot.gold {
  background: var(--gold);
}

.dot.green {
  background: var(--success);
}

.dot.cyan {
  background: var(--cyan);
}

.dot.red {
  background: var(--danger);
}

.dot.amber {
  background: var(--warning);
}

/* ===== Cards & grids ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
}

.card h2,
.card-label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.stat-value .unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-sub {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.text-purple {
  color: var(--purple);
}

.text-cyan {
  color: var(--cyan);
}

.text-gold {
  color: var(--gold);
}

.text-green {
  color: var(--success);
}

.text-red {
  color: var(--danger);
}

.text-amber {
  color: var(--warning);
}

.muted {
  color: var(--text-muted);
}

.secondary {
  color: var(--text-secondary);
}

/* meter bars */
.meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 0.7rem;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.meter .fill-gold {
  background: linear-gradient(90deg, var(--gold), var(--warning));
}

.meter .fill-purple {
  background: linear-gradient(90deg, #6d28d9, var(--purple));
}

.meter .fill-cyan {
  background: linear-gradient(90deg, #0891b2, var(--cyan));
}

.meter .fill-green {
  background: var(--success);
}

/* split vote bar */
.votebar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.75rem 0 0.45rem;
}

.votebar .for {
  background: var(--success);
}

.votebar .against {
  background: var(--danger);
}

/* pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  border: 1px solid transparent;
}

.pill.active {
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.1);
}

.pill.finalized,
.pill.succeeded {
  color: #86efac;
  border-color: rgba(46, 213, 115, 0.45);
  background: rgba(46, 213, 115, 0.08);
}

.pill.executed {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.pill.expired {
  color: var(--text-secondary);
  border-color: var(--surface-border);
  background: var(--surface);
}

.pill.defeated {
  color: #fca5a5;
  border-color: rgba(255, 71, 87, 0.45);
  background: rgba(255, 71, 87, 0.08);
}

.pill.tag {
  color: var(--text-secondary);
  border-color: var(--surface-border);
  background: var(--surface);
  text-transform: uppercase;
}

/* activity / event feed */
.feed {
  list-style: none;
}

.feed li {
  display: flex;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
}

.feed li:last-child {
  border-bottom: none;
}

.feed .dot {
  margin-top: 0.42rem;
}

.feed .when {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 0.15rem;
}

.feed .what strong {
  color: var(--foreground);
  font-weight: 600;
}

.feed .what span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.8rem;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

td.wrap {
  white-space: normal;
  min-width: 16rem;
}

th {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* pre / log excerpts */
pre {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* chat */
.chat-box {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.msg {
  max-width: 44rem;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
}

.msg .who {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
}

.msg.entity {
  align-self: flex-start;
  background: rgba(139, 92, 246, 0.09);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.msg.user {
  align-self: flex-end;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.chat-input {
  display: flex;
  gap: 0.6rem;
}

.chat-input input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 0.65rem 0.9rem;
  outline: none;
}

.chat-input input:focus {
  border-color: rgba(139, 92, 246, 0.5);
}

.chat-input button {
  flex: none;
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
}

.chat-input button:hover {
  filter: brightness(1.1);
}

/* threat segments */
.threat-track {
  display: flex;
  gap: 4px;
  margin-top: 0.8rem;
}

.threat-track span {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.threat-track span.on {
  background: var(--cyan);
}

/* log page */
.log-entry {
  border-left: 2px solid rgba(139, 92, 246, 0.45);
  padding-left: 1.1rem;
  margin: 1.6rem 0;
}

.log-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--purple);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.log-entry h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.log-entry p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.7rem;
  max-width: 50rem;
}

.log-entry blockquote {
  border-left: 2px solid rgba(245, 158, 11, 0.5);
  padding: 0.2rem 0 0.2rem 0.9rem;
  margin: 0.8rem 0;
  color: #fcd34d;
  font-size: 0.86rem;
  font-style: italic;
}

/* honesty footer */
.honesty {
  margin-top: 2.5rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.honesty strong {
  color: #fcd34d;
}

.honesty ul {
  margin: 0.5rem 0 0 1.1rem;
}

.honesty li {
  margin-top: 0.25rem;
}

.program-list {
  list-style: none;
  margin-top: 0.6rem !important;
  margin-left: 0 !important;
}

.program-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.76rem;
}

.program-list li:last-child {
  border-bottom: none;
}

.program-list .pname {
  min-width: 12.5rem;
  color: var(--foreground);
}

.program-list code {
  color: var(--text-muted);
  font-size: 0.7rem;
  word-break: break-all;
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ===== Narrow screens ===== */
@media (max-width: 640px) {
  .brand-sub {
    display: none;
  }

  .wallet-btn {
    display: none;
  }

  .page {
    padding: 1.25rem 0.9rem 6.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}
