/* PONS CAPITAL app. Same tokens as theme.css; layout of the reference app on the dark ground. */

body.app {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); font-weight: 400; }
.muted { color: var(--fg-muted); }
.small-print { font-size: 12px; }
.up { color: var(--up); }
.down { color: var(--hot); }
.gold { color: var(--tan); }
[hidden] { display: none !important; }

/* ---- marquee ---- */
.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--dark);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  height: 30px;
  display: flex;
  align-items: center;
}
.marquee-track {
  display: inline-flex;
  gap: 2.5rem;
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee 60s linear infinite;
}
.marquee-track .item b { color: var(--tan); font-weight: 500; }
.marquee-track .item .up { color: var(--up); }
.marquee-track .item .down { color: var(--hot); }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; padding-left: 1rem; } }

/* ---- top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: rgba(7, 16, 17, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-tile {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--tan);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-tile.small { width: 24px; height: 24px; border-radius: 6px; }
.wordmark { font-family: var(--font-serif); font-size: 1.15rem; }
.wordmark .tld { color: var(--hot); }
.topnav { display: flex; gap: 1.4rem; font-weight: 500; color: var(--fg-muted); }
.topnav a { padding: 0.35rem 0; border-bottom: 1px solid transparent; }
.topnav a:hover { color: var(--fg); }
.topnav a.active { color: var(--tan); border-bottom-color: var(--tan); }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.chainpill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted);
  padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 999px;
}
.chainpill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-muted); }
.chainpill.ok .dot { background: var(--up); box-shadow: 0 0 0 3px rgba(111, 191, 147, 0.18); }
.chainpill.bad .dot { background: var(--hot); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: 13px;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-tan { background: var(--tan); color: var(--dark); }
.btn-tan:hover:not(:disabled) { background: var(--on-accent); }
.btn-hot { background: var(--hot); color: #fff7ea; }
.btn-hot:hover:not(:disabled) { background: var(--hot-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--border-dark); color: var(--fg); }
.btn-ghost:hover:not(:disabled) { background: var(--tan-soft); }
.btn-green { background: var(--accent); color: var(--on-accent); }
.btn-green:hover:not(:disabled) { background: var(--accent-hover); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 12px; }
.btn-block { width: 100%; }

/* ---- layout ---- */
.view { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page-title { font-family: var(--font-serif); font-size: 2rem; margin: 0 0 1.25rem; letter-spacing: -0.01em; }
.page-title .sub { font-family: var(--font-sans); font-size: 0.95rem; color: var(--fg-muted); margin-left: 0.75rem; }
.section-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); margin: 2.2rem 0 0.9rem;
  display: flex; align-items: baseline; gap: 0.6rem;
}
.section-label .note { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 12px; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-liq { grid-template-columns: 1fr 2fr; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-liq { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem;
}
.card.dim { background: var(--dark-soft); }
.card.hero-card {
  background: linear-gradient(135deg, #0e2a30 0%, #0c1f24 60%, #0b1a1c 100%);
  border-color: var(--border-dark);
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
}
.hero-card .lead { font-size: 14.5px; line-height: 1.6; color: var(--fg); opacity: 0.9; max-width: 780px; }
.hero-card .lead a { text-decoration: underline; text-underline-offset: 3px; }
.hero-card .kpis { display: flex; gap: 1.5rem; }
.kpi { text-align: center; }
.kpi .v { font-family: var(--font-serif); font-size: 1.7rem; color: var(--tan); line-height: 1; }
.kpi .k { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); margin-top: 0.35rem; letter-spacing: 0.08em; }
.card-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); display: flex; align-items: center; gap: 0.45rem; }
.card-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.big { font-family: var(--font-mono); font-size: 2rem; color: var(--up); margin: 0.6rem 0 0.25rem; letter-spacing: -0.02em; }
.big.gold { color: var(--tan); }
.flow-list { margin: 0.75rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; font-family: var(--font-mono); font-size: 12px; }
.flow-list li { display: grid; grid-template-columns: 4.2rem 1fr auto auto; gap: 0.75rem; align-items: baseline; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.flow-list li:last-child { border-bottom: 0; }
.flow-list .kind { text-transform: uppercase; font-size: 10px; letter-spacing: 0.1em; padding: 0.15rem 0.45rem; border-radius: 999px; text-align: center; }
.flow-list .kind.in { background: rgba(111, 191, 147, 0.14); color: var(--up); }
.flow-list .kind.out { background: rgba(232, 85, 47, 0.14); color: var(--hot); }
.flow-list .kind.transfer { background: var(--tan-soft); color: var(--tan); }
.flow-list .age { color: var(--fg-muted); }

/* ---- controls row ---- */
.controls { display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem; align-items: center; margin-bottom: 0.9rem; }
@media (max-width: 720px) { .controls { grid-template-columns: 1fr; } }
.search { display: flex; align-items: center; gap: 0.5rem; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.55rem 0.9rem; }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--fg); }
.search input::placeholder { color: var(--fg-muted); }
.toggle { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.9rem; }
.toggle.on { color: var(--tan); border-color: var(--tan); }
select.select { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.55rem 0.9rem; color: var(--fg); outline: none; }
.count { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); margin-bottom: 0.75rem; }

/* ---- market cards ---- */
.mcard { display: flex; flex-direction: column; gap: 0.85rem; }
.mcard-head { display: flex; align-items: center; gap: 0.75rem; }
.avatar {
  width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--on-accent);
  background: var(--accent);
}
.avatar.spcx { background: #3a2c2c; color: var(--tan); }
.mcard-head .sym { font-weight: 600; font-size: 1.05rem; }
.mcard-head .nm { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.55rem; border-radius: 999px; background: var(--tan-soft); color: var(--tan); }
.chip.ok { background: rgba(111, 191, 147, 0.14); color: var(--up); }
.chip.warn { background: rgba(232, 85, 47, 0.14); color: var(--hot); }
.chip.dim { background: rgba(228, 189, 135, 0.08); color: var(--fg-muted); }
.price { font-family: var(--font-mono); font-size: 13px; }
.price .src { color: var(--fg-muted); font-size: 11px; }
.rows { display: grid; gap: 0.35rem; font-size: 13px; }
.rows .r { display: flex; justify-content: space-between; gap: 1rem; }
.rows .r span:last-child { font-family: var(--font-mono); }
.mcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: auto; }
.pos-line { font-size: 12.5px; color: var(--fg-muted); border-top: 1px solid var(--border); padding-top: 0.6rem; }
.pos-line b { color: var(--fg); font-weight: 500; }

/* ---- pool cards ---- */
.pcard .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.pcard .nm { font-weight: 600; font-size: 1.05rem; }
.pcard .cur { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.pcard .tvl { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; border-top: 1px solid var(--border); padding-top: 0.7rem; margin-top: 0.7rem; }

/* ---- forms ---- */
.form { display: grid; gap: 0.9rem; }
.field label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 0.4rem; }
.field .in { display: flex; align-items: center; gap: 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.55rem 0.8rem; }
.field .in:focus-within { border-color: var(--tan); }
.field input[type='text'], .field input[type='number'] { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-family: var(--font-mono); font-size: 15px; color: var(--fg); }
.field .unit { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }
.field .max { font-family: var(--font-mono); font-size: 11px; color: var(--tan); }
.field .hint { font-size: 11.5px; color: var(--fg-muted); margin-top: 0.35rem; }
.field input[type='range'] { width: 100%; accent-color: var(--hot); margin-top: 0.5rem; }
.field select { width: 100%; }
.preview { display: grid; gap: 0.35rem; font-size: 13px; background: var(--bg); border-radius: 12px; padding: 0.8rem 0.9rem; border: 1px solid var(--border); }
.preview .r { display: flex; justify-content: space-between; gap: 1rem; }
.preview .r span:last-child { font-family: var(--font-mono); }
.steps { display: grid; gap: 0.4rem; font-size: 12.5px; color: var(--fg-muted); }
.steps .s { display: flex; gap: 0.6rem; align-items: baseline; }
.steps .s i { font-style: normal; font-family: var(--font-mono); font-size: 10px; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1px solid var(--border-dark); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.steps .s.done i { background: var(--up); color: var(--dark); border-color: var(--up); }
.steps .s.now i { border-color: var(--tan); color: var(--tan); }
.steps .s.now { color: var(--fg); }
.warn-box { border: 1px solid rgba(232, 85, 47, 0.45); background: rgba(232, 85, 47, 0.08); border-radius: 12px; padding: 0.8rem 0.9rem; font-size: 12.5px; }
.info-box { border: 1px solid var(--border-dark); background: var(--tan-soft); border-radius: 12px; padding: 0.8rem 0.9rem; font-size: 12.5px; }
.tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; }
.tabs button { padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--fg-muted); border: 1px solid transparent; }
.tabs button.on { background: var(--accent); color: var(--on-accent); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.tbl th { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); text-align: left; padding: 0.7rem 0.9rem; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--border); }
.tbl td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.txt { font-family: var(--font-sans); }
.tbl .num { text-align: right; }
.tbl th.num { text-align: right; }

/* ---- health bars ---- */
.hbar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin-top: 0.4rem; }
.hbar i { display: block; height: 100%; background: var(--up); }
.hbar i.warn { background: var(--tan); }
.hbar i.bad { background: var(--hot); }

/* ---- footer ---- */
.appfoot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--fg-muted); }
.appfoot-left { display: flex; align-items: center; gap: 0.6rem; }
.appfoot-links { display: flex; gap: 1.1rem; font-family: var(--font-mono); font-size: 12px; }
.appfoot-links a:hover { color: var(--tan); }

/* ---- toasts ---- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: 0.5rem; z-index: 100; max-width: 380px; }
.toast { background: var(--card); border: 1px solid var(--border-dark); border-left: 3px solid var(--tan); border-radius: 12px; padding: 0.75rem 0.9rem; font-size: 12.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.toast.err { border-left-color: var(--hot); }
.toast.ok { border-left-color: var(--up); }
.toast a { color: var(--tan); text-decoration: underline; }

/* ---- responsive top bar ---- */
@media (max-width: 860px) {
  .topbar { grid-template-columns: auto 1fr; gap: 0.75rem; padding: 0.6rem 1rem; }
  .topnav { grid-column: 1 / -1; order: 3; overflow-x: auto; gap: 1rem; font-size: 13px; padding-bottom: 0.2rem; }
  .topbar-right { justify-self: end; }
  .chainpill { display: none; }
  .hero-card { grid-template-columns: 1fr; }
  .view { padding: 1.25rem 1rem 3rem; }
  .appfoot { flex-direction: column; align-items: flex-start; }
}

/* ---- logos and the Greek layer ---- */
.avatar { background: #f3e7cc; overflow: hidden; }
.avatar img { width: 72%; height: 72%; object-fit: contain; display: block; }
.avatar.spcx { background: #f3e7cc; }
.avatar.lg { width: 48px; height: 48px; border-radius: 13px; vertical-align: middle; margin-right: 0.5rem; }
.avatar.sm { width: 24px; height: 24px; border-radius: 6px; vertical-align: middle; margin-right: 0.4rem; }
.greek-rule { height: 24px; max-width: 22rem; background: url(/img/greek/meander.svg) repeat-x left top; background-size: 24px 24px; opacity: 0.35; margin: -0.5rem 0 1.25rem; }
.card.hero-card { grid-template-columns: 1fr 250px; }
.hero-card .hero-art { position: relative; width: 250px; height: 250px; }
.hero-card .hero-art .portico { position: absolute; left: 50%; top: 50%; width: 100%; transform: translate(-50%, -50%); opacity: 0.5; }
.hero-card .hero-art .statue { position: absolute; left: 50%; top: 50%; height: 92%; transform: translate(-50%, -50%); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)); }
.hero-card .kpis { margin-top: 1rem; justify-content: flex-start; }
.facade-band { height: 190px; background: url(/img/greek/parthenon.svg) center bottom / contain no-repeat; opacity: 0.13; margin-top: 2rem; pointer-events: none; }
@media (max-width: 860px) { .card.hero-card { grid-template-columns: 1fr; } .hero-card .hero-art { width: 100%; height: 210px; } .facade-band { height: 110px; } }
