/* ===== Solvent dApp — Casper branded ===== */
:root {
  --bg: #0a0a0c;
  --bg-2: #101013;
  --card: #141417;
  --card-2: #17171b;
  --line: #232329;
  --line-soft: #1c1c21;
  --text: #f2f2f4;
  --muted: #9a9aa6;
  --faint: #61616d;
  --red: #ff2742;
  --red-soft: #ff5566;
  --green: #2ee6a6;
  --amber: #ffb74d;
  --r: 16px;
  --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
/* Hide CSPR.click's own injected top bar, we use our own account UI. The sign-in
   modal renders in a separate portal and keeps working. */
#csprclick-ui { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(255,39,66,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.4px; }
a { color: inherit; text-decoration: none; }
.mono { font-family: "JetBrains Mono", monospace; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.accent { color: var(--red); }
code { font-family: "JetBrains Mono", monospace; font-size: 0.85em; background: var(--card-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: #d6d6dd; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); display: inline-block; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 11px; font-weight: 600; font-size: 0.92rem; border: 1px solid var(--line); background: var(--card-2); color: var(--text); cursor: pointer; transition: transform .12s, border-color .2s, background .2s, opacity .2s; font-family: inherit; }
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: #34343c; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: linear-gradient(135deg, var(--red), #d11530); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px rgba(255,39,66,.6); }
.btn-accent:hover:not(:disabled) { box-shadow: 0 10px 28px -8px rgba(255,39,66,.7); }
.btn-block { width: 100%; padding: 13px; margin-top: 14px; }
.link-btn { background: none; border: none; color: var(--faint); cursor: pointer; font-size: 0.8rem; font-family: inherit; }
.link-btn:hover { color: var(--muted); }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; background: rgba(10,10,12,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.08rem; }
.brand-mark { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--red), #ff6b3d); box-shadow: 0 0 14px rgba(255,39,66,.5); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.net-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; }
.account-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 7px 12px; }
.account-chip .mono { font-size: 0.82rem; color: var(--green); }

/* intro */
.intro { padding: 60px 26px 30px; }
.intro-inner { max-width: var(--max); margin: 0 auto; }
.intro h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.1; font-weight: 700; }
.intro p { color: var(--muted); max-width: 620px; margin-top: 16px; font-size: 1.02rem; }
.intro-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.intro-steps span { font-size: 0.82rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; }

/* app grid */
.app { max-width: var(--max); margin: 0 auto; padding: 12px 26px 40px; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.col { display: flex; flex-direction: column; gap: 18px; }
.card { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { font-size: 1.12rem; font-weight: 600; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }

/* vault */
.vault-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 16px; }
.vstat { display: flex; flex-direction: column; gap: 5px; }
.vstat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--faint); }
.vstat-val { font-size: 1.25rem; font-weight: 700; font-family: "Space Grotesk"; font-variant-numeric: tabular-nums; }
.alloc-bar-rail { height: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; display: flex; }
.alloc-bar-fill { height: 100%; background: linear-gradient(90deg, #3a6bd6, #5b8cff); transition: width .7s cubic-bezier(.4,0,.2,1); }
.alloc-bar-rail { position: relative; background: linear-gradient(90deg, #1f9e6e, #2ee6a6); }
.alloc-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.sw.cons { background: #5b8cff; } .sw.grow { background: #2ee6a6; }

/* position */
.pos-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.pos-row:last-child { border-bottom: none; }
.pos-row .mono { color: var(--text); }

/* action card */
.tabs { display: flex; gap: 6px; background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin-bottom: 18px; }
.tab { flex: 1; padding: 9px; border: none; background: none; color: var(--muted); font-weight: 600; font-size: 0.9rem; border-radius: 8px; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }
.tab.active { background: var(--card); color: var(--text); }
.field-label { font-size: 0.78rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.6px; }
.amount-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.amount-input { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; color: var(--text); font-size: 1.15rem; font-family: "JetBrains Mono"; }
.amount-input:focus { outline: none; border-color: var(--red); }
.chip-btn { background: var(--card-2); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 9px 12px; font-size: 0.82rem; cursor: pointer; font-family: inherit; }
.chip-btn:hover { border-color: #34343c; color: var(--text); }
.field-note { font-size: 0.8rem; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.tx-result { margin-top: 16px; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); font-size: 0.86rem; }
.tx-result.ok { border-color: rgba(46,230,166,.35); }
.tx-result.err { border-color: rgba(255,39,66,.4); }
.tx-result a { color: var(--green); }

/* agent feed */
.agent-card { height: 100%; }
.feed { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; max-height: 560px; overflow-y: auto; }
.cycle-card { background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 15px 16px; display: flex; flex-direction: column; gap: 9px; }
.cycle-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cycle-ts { font-size: 0.76rem; color: var(--faint); }
.cycle-ref { font-size: 0.72rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2px 9px; color: var(--red-soft); font-family: "JetBrains Mono"; }
.cycle-reason { font-size: 0.9rem; color: #d6d6dd; }
.cycle-alloc { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; flex-wrap: wrap; }
.cycle-alloc .lbl { color: var(--faint); text-transform: uppercase; font-size: 0.68rem; letter-spacing: .6px; }
.pill { padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: 0.78rem; }
.pill.b { background: var(--card); color: var(--muted); } .pill.a { background: rgba(46,230,166,.12); color: var(--green); }
.arr { color: var(--red); font-weight: 700; }
.cycle-tx { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.cycle-tx a { color: var(--red-soft); font-family: "JetBrains Mono"; }
.cycle-tx .lbl { color: var(--faint); }

/* proof */
.proof-section { border-top: 1px solid var(--line-soft); padding: 48px 26px; }
.proof-inner { max-width: var(--max); margin: 0 auto; }
.proof-inner h2 { font-size: 1.5rem; }
.proof-inner > p { margin-top: 6px; }
.proof-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 22px; }
.proof-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 7px; transition: border-color .2s, transform .12s; }
.proof-card:hover { border-color: var(--red); transform: translateY(-2px); }
.proof-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); }
.proof-card .mono { font-size: 0.84rem; color: var(--text); }

/* footer */
footer { border-top: 1px solid var(--line-soft); padding: 28px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: var(--max); margin: 0 auto; }

/* responsive */
@media (max-width: 880px) {
  .app-grid { grid-template-columns: 1fr; }
  .proof-cards { grid-template-columns: 1fr 1fr; }
  .intro { padding: 40px 20px 20px; }
  .topbar { padding: 12px 16px; }
  .net-pill { display: none; }
}
