/* prosej demo lab — "quiet systems" theme (matches site palette) */
:root {
  --bg: #1c1814; --panel: #221c15; --panel2: #2a221a; --line: #31271d; --line2: #453729;
  --txt: #f2eadd; --dim: #a89f91; --muted: #7d7264;
  --acc: #e67e22; --acc2: #8da399; --warn: #e6a23c; --err: #d96a5a; --ok: #6fae8a;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--txt); font: 15px/1.6 var(--sans); overflow-x: hidden; }
::selection { background: rgba(230,126,34,.28); }
a { color: var(--acc); }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .err { color: var(--err); } .acc { color: var(--acc); } .sage { color: var(--acc2); }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(28,24,20,.85); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 16px; }
.tb-logo { font-family: var(--mono); font-size: 13px; color: var(--txt); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.tb-logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px rgba(230,126,34,.6); }
.tb-badge { font-family: var(--mono); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--acc2); border: 1px solid var(--line2); border-radius: 20px; padding: 2px 10px; }
.tb-spacer { flex: 1; }
.tb-link { color: var(--dim); text-decoration: none; font-family: var(--mono); font-size: 12.5px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; transition: all .2s; }
.tb-link:hover { color: var(--acc); border-color: var(--line2); }
.tb-link.active { color: var(--acc); border-color: var(--line2); background: rgba(230,126,34,.06); }
#authBadge { font-family: var(--mono); font-size: 11px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line2); color: var(--dim); cursor: pointer; background: transparent; transition: all .2s; }
#authBadge:hover { border-color: var(--acc); color: var(--acc); }
#authBadge.authed { color: var(--ok); border-color: rgba(111,174,138,.5); }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 80px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; overflow: hidden; }
.card::after { content: ''; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, var(--acc), transparent); opacity: .35; }
.card h3 { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--acc2); margin-bottom: 12px; font-family: var(--mono); }
.card h3 .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; box-shadow: 0 0 8px rgba(111,174,138,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.span2 { grid-column: span 2; }

/* ---------- buttons ---------- */
.btn { font-family: var(--mono); font-size: 12.5px; color: var(--txt); background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 8px 14px; cursor: pointer; transition: all .18s; }
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn.primary { background: rgba(230,126,34,.14); border-color: rgba(230,126,34,.55); color: var(--acc); }
.btn.primary:hover { background: rgba(230,126,34,.22); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 4px 10px; font-size: 11px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- terminal feed ---------- */
.term { background: #14100c; border: 1px solid var(--line); border-radius: 10px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; padding: 12px 14px; height: 300px; overflow-y: auto; }
.term .ln { white-space: pre-wrap; word-break: break-word; opacity: .95; }
.term .ln .t { color: var(--muted); margin-right: 8px; }
.term .ln.src { color: var(--acc2); }
.term .ln.sev-high { color: var(--err); } .term .ln.sev-medium { color: var(--warn); } .term .ln.sev-low, .term .ln.sev-info { color: var(--dim); }
.term .ln.sim { opacity: .55; font-style: italic; }
.term::-webkit-scrollbar { width: 8px; } .term::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 4px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kpi .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--txt); }
.kpi .val.acc { color: var(--acc); } .kpi .val.ok { color: var(--ok); }

/* ---------- toggles ---------- */
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; cursor: pointer; background: var(--line2); border-radius: 24px; transition: .2s; }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: rgba(230,126,34,.55); }
.switch input:checked + .slider::before { transform: translateX(20px); background: var(--acc); }
.rule { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: none; }
.rule .rn { font-family: var(--mono); font-size: 12.5px; }
.rule .rd { font-size: 11px; color: var(--muted); }

/* ---------- network canvas ---------- */
#netCanvas { width: 100%; height: 300px; background: #14100c; border: 1px solid var(--line); border-radius: 10px; display: block; }
.netstats { display: flex; gap: 16px; margin-top: 10px; font-family: var(--mono); font-size: 12px; }

/* ---------- steppers / timelines ---------- */
.steps { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.step { flex: 1; min-width: 84px; text-align: center; font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px; transition: all .2s; }
.step .ic { display: block; font-size: 17px; margin-bottom: 4px; }
.step.done { color: var(--ok); border-color: rgba(111,174,138,.5); background: rgba(111,174,138,.07); }
.step.now { color: var(--acc); border-color: rgba(230,126,34,.55); background: rgba(230,126,34,.08); animation: pulse 1.4s infinite; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 8px 0; }
.bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--acc), var(--err)); transition: width .3s; }
.minilog { font-family: var(--mono); font-size: 11px; color: var(--dim); min-height: 64px; white-space: pre-wrap; word-break: break-word; }

/* ---------- fleet ---------- */
.node-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.node-card .nm { font-family: var(--mono); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.node-card .row { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }
.node-card .row b { color: var(--txt); font-weight: 600; }
.dot2 { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot2.live { background: var(--ok); box-shadow: 0 0 8px rgba(111,174,138,.7); }
.dot2.dead { background: var(--err); box-shadow: 0 0 8px rgba(217,106,90,.7); }

/* ---------- passkey vault ---------- */
.vault { display: flex; flex-direction: column; gap: 12px; }
.vault-status { font-family: var(--mono); font-size: 12px; min-height: 20px; color: var(--dim); }
.vault-status.ok { color: var(--ok); } .vault-status.err { color: var(--err); }

/* ---------- showcase ---------- */
.sh-hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 20px; }
.sh-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: var(--acc); margin-bottom: 18px; }
.sh-title { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.04; font-weight: 500; max-width: 900px; }
.sh-title em { font-style: italic; color: var(--acc); }
.sh-sub { color: var(--dim); max-width: 560px; margin: 22px auto 0; font-size: 1.05rem; }
.sh-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.sh-sec { min-height: 86vh; display: flex; flex-direction: column; justify-content: center; padding: 60px 20px; border-top: 1px solid var(--line); }
.sh-sec .container { max-width: 900px; margin: 0 auto; width: 100%; }
.sh-sec h2 { font-family: var(--serif); font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 500; margin-bottom: 8px; }
.sh-sec .lede { color: var(--dim); max-width: 640px; margin-bottom: 26px; font-size: 1.02rem; }
.sh-foot { text-align: center; padding: 60px 20px; border-top: 1px solid var(--line); }
.sh-foot .big { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: 18px; }
.sh-num { font-family: var(--mono); color: var(--muted); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; margin-bottom: 14px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } .span2 { grid-column: span 1; } }
