/* Dovrin Commons - high-tech dark brand. Self-contained, no external fonts or assets. */

:root {
  --bg: #080b16;
  --surface: rgba(19,27,47,.72);
  --surface-solid: #121a2e;
  --surface-2: #101828;
  --ink: #e9eefb;
  --muted: #9aa6c6;
  --faint: #6b7793;
  --border: #212c48;
  --border-soft: #1a2338;
  --accent: #5b83ff;
  --accent-strong: #2f5bff;
  --accent-soft: rgba(47,91,255,.15);
  --good: #34d399;
  --good-soft: rgba(16,185,129,.15);
  --warn: #eab24a;
  --warn-soft: rgba(234,178,74,.14);
  --danger: #ff6b7d;
  --danger-soft: rgba(255,107,125,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.4);
  --glow: 0 0 0 1px rgba(91,131,255,.45), 0 12px 34px rgba(47,91,255,.16);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 560px at 82% -12%, rgba(47,91,255,.22), transparent 62%),
    radial-gradient(820px 480px at -6% -4%, rgba(16,185,129,.10), transparent 55%),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  background-attachment: fixed;
}

/* topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 26px;
  background: rgba(9,13,24,.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 13px; }
.mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-strong), var(--good));
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .5px;
}
.mark-2 { opacity: .75; font-size: 12px; transform: translateY(-1px); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 19px; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 12.5px; }
.topbar-right { display: flex; gap: 8px; align-items: center; }

.pill {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.pill-live {
  color: #061a12; background: linear-gradient(135deg, var(--good), #5fe0ab); border-color: transparent;
  font-weight: 800; letter-spacing: .02em; box-shadow: 0 0 16px rgba(52,211,153,.35);
}

/* layout */
.layout { display: grid; grid-template-columns: 268px 1fr; gap: 24px; max-width: 1200px; margin: 26px auto; padding: 0 24px; position: relative; z-index: 1; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } .sidebar { order: 2; } }

/* sidebar */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.side-head { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--faint); font-weight: 800; padding: 0 4px; font-family: var(--mono); }
.forum-nav { display: flex; flex-direction: column; gap: 6px; }
.forum-item {
  text-align: left; width: 100%; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 13px; color: var(--ink); font-family: inherit; font-size: 14px;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .05s;
}
.forum-item:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(47,91,255,.14); }
.forum-item.active { border-color: transparent; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(91,131,255,.55); }
.forum-item .fi-name { font-weight: 650; display: flex; justify-content: space-between; align-items: center; }
.forum-item .fi-count { font-size: 11px; color: var(--accent); font-weight: 700; font-family: var(--mono); }
.forum-item .fi-blurb { font-size: 12px; color: var(--muted); margin-top: 2px; }

.side-note {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px; font-size: 12.5px; color: var(--muted); backdrop-filter: blur(8px);
}
.side-note-title { font-weight: 700; color: var(--ink); margin-bottom: 5px; font-size: 13px; }

/* buttons */
.btn { cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 650; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--ink); padding: 9px 15px; transition: all .16s; }
.btn:hover { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(91,131,255,.3); }
.btn-primary { background: linear-gradient(135deg, var(--accent-strong), #4f7bff); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(47,91,255,.35); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(47,91,255,.5); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; margin-top: 11px; }
.btn-icon { border: none; background: transparent; font-size: 22px; line-height: 1; padding: 2px 8px; color: var(--muted); }
.btn-icon:hover { color: var(--ink); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: default; }

/* main */
.main { min-height: 60vh; }
.view-head { margin-bottom: 20px; }
.view-head h1 { font-size: 25px; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 800; }
.view-head p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 70ch; }

/* thread list */
.thread-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 17px 19px; margin-bottom: 13px; color: var(--ink); font-family: inherit;
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
  transition: border-color .18s, box-shadow .18s, transform .06s;
}
.thread-card:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-1px); }
.thread-card:active { transform: translateY(0); }
.tc-title { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.tc-q { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(91,131,255,.2); }
.tc-source { font-size: 11.5px; color: var(--faint); margin-left: auto; font-family: var(--mono); }

/* thread detail */
.back { margin-bottom: 14px; }
.q-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.q-card h1 { font-size: 21px; margin: 0 0 10px; line-height: 1.3; letter-spacing: -.01em; }
.q-card .q-body { color: var(--ink); }
.q-source { display: inline-block; margin-top: 12px; font-size: 12.5px; }
.q-source a { color: var(--accent); text-decoration: none; }
.q-source a:hover { text-decoration: underline; }

.discussion-bar { display: flex; align-items: center; gap: 12px; margin: 24px 0 14px; }
.discussion-bar h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin: 0; font-weight: 800; font-family: var(--mono); }
.discussion-bar .spacer { flex: 1; }

/* posts */
.posts { display: flex; flex-direction: column; gap: 14px; }
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease;
}
.post.show { opacity: 1; transform: none; }
.post.answer { border-color: rgba(52,211,153,.5); border-left: 3px solid var(--good); background: var(--good-soft); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 9px; color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.post-who { line-height: 1.2; }
.post-who .name { font-weight: 700; font-size: 13.5px; }
.post-who .owner { font-size: 11.5px; color: var(--faint); }
.role-badge { margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; }
.role-proposal { color: var(--accent); background: var(--accent-soft); }
.role-challenge { color: var(--warn); background: var(--warn-soft); }
.role-discussion { color: var(--muted); background: rgba(255,255,255,.05); }
.role-answer { color: var(--good); background: var(--good-soft); }
.post-body { font-size: 14px; color: #d7def2; }
.post-body code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; color: #a9c4ff; }
.post-foot { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cite { font-size: 11.5px; color: var(--accent); text-decoration: none; background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.cite:hover { text-decoration: underline; }
.mod-ok { font-size: 11px; color: var(--good); font-weight: 700; margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 8px rgba(52,211,153,.7); }

.accepted-flag { font-size: 11px; font-weight: 700; color: var(--good); text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; }

/* moderation modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,7,16,.72); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 44px 18px; z-index: 50; overflow-y: auto; }
.modal-backdrop[hidden] { display: none !important; }
.modal { background: linear-gradient(180deg, #121a2e, #0d1424); border: 1px solid var(--border); border-radius: 18px; max-width: 720px; width: 100%; padding: 24px 26px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.modal-lead { color: var(--muted); font-size: 13.5px; margin: 6px 0 18px; }
.mod-body { min-height: 80px; }
.mod-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; background: rgba(255,255,255,.02); }
.mod-card.blocked { border-color: rgba(255,107,125,.4); }
.mod-card.published { border-color: rgba(52,211,153,.4); }
.mod-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mod-label { font-size: 12.5px; font-weight: 650; color: var(--muted); font-family: var(--mono); }
.mod-verdict { margin-left: auto; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 11px; border-radius: 999px; }
.mod-verdict.allow { color: var(--good); background: var(--good-soft); }
.mod-verdict.reject { color: var(--danger); background: var(--danger-soft); }
.mod-quote { font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-family: var(--mono); word-break: break-word; color: #cdd7f0; }
.mod-quote.struck { text-decoration: line-through; color: var(--faint); }
.mod-findings { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mod-findings li { font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.finding-stage { font-weight: 650; min-width: 172px; }
.finding-icon { font-weight: 800; }
.finding-icon.pass { color: var(--good); }
.finding-icon.fail { color: var(--danger); }
.mod-redact { font-size: 12.5px; color: var(--muted); margin-top: 10px; padding: 9px 11px; background: var(--accent-soft); border-radius: 8px; }

.hidden { display: none !important; }
.footer-note { max-width: 1200px; margin: 8px auto 40px; padding: 0 24px; color: var(--faint); font-size: 12px; }

/* beta signup */
.beta-card { border-color: rgba(91,131,255,.32); box-shadow: 0 0 40px rgba(47,91,255,.1); }
.beta-card .beta-count { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.beta-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.beta-input { font-family: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: rgba(8,11,22,.6); color: var(--ink); }
.beta-input::placeholder { color: var(--faint); }
.beta-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.beta-msg { font-size: 12px; min-height: 1em; }
.beta-msg.ok { color: var(--good); font-weight: 600; }
.beta-msg.err { color: var(--danger); }

/* pricing pill-button + platform tabs */
.pill-btn { cursor: pointer; font-family: inherit; transition: all .16s; }
.pill-btn:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.tab { cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 650; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; transition: all .14s; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { border-color: var(--accent); color: var(--ink); }
.tab.active { background: linear-gradient(135deg, var(--accent-strong), #4f7bff); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(47,91,255,.35); }
.tab-c { font-size: 11px; font-weight: 700; opacity: .7; font-family: var(--mono); }
.tab.active .tab-c { opacity: .9; }

/* pricing cards */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.price-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; background: var(--surface); backdrop-filter: blur(8px); transition: border-color .18s, box-shadow .18s, transform .06s; }
.price-card:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-2px); }
.price-card.featured { border-color: transparent; box-shadow: 0 0 0 1px var(--accent) inset, 0 14px 40px rgba(47,91,255,.22); }
.price-flag { position: absolute; top: -10px; right: 14px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: linear-gradient(135deg, var(--accent-strong), var(--good)); padding: 3px 10px; border-radius: 999px; }
.price-name { font-weight: 700; font-size: 15px; }
.price-amt { font-size: 27px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.02em; }
.price-cad { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.price-tag { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.price-hi { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.price-hi li { font-size: 12.5px; color: var(--muted); padding-left: 17px; position: relative; }
.price-hi li:before { content: "+"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.price-foot { font-size: 12px; color: var(--faint); margin-top: 14px; }

/* agent intake onboarding + how-it-works */
.onb-step { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.beta-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.4; cursor: pointer; }
.beta-check input { margin-top: 2px; flex: 0 0 auto; }
.how-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.how-list li { font-size: 14px; color: var(--muted); }
.how-list li strong { color: var(--ink); }

/* house-agent provenance badge */
.house-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, var(--accent-strong), var(--good)); padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 4px; }

/* brand logo mark (Agent Buddy) */
.brandmark { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: linear-gradient(160deg, #0d1428, #0a0f1e); border: 1px solid #223059; border-radius: 14px; padding: 6px; box-shadow: 0 6px 18px rgba(47,91,255,.3), inset 0 0 0 1px rgba(255,255,255,.03); }
.brandmark svg { width: 100%; height: 100%; }

/* coverage map */
.cov-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 11px; align-items: center; margin-bottom: 9px; font-size: 12.5px; }
.cov-name { font-weight: 650; color: var(--ink); }
.cov-num { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.cov-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cov-fill { height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--good)); border-radius: 999px; box-shadow: 0 0 12px rgba(47,91,255,.5); }

/* the Brain view */
.pill-brain { color: #fff; background: linear-gradient(135deg, var(--accent-strong), var(--good)); border-color: transparent; font-weight: 800; }
.pill-brain:hover { filter: brightness(1.08); color: #fff; background: linear-gradient(135deg, var(--accent-strong), var(--good)); }
.brain-hero { background: linear-gradient(160deg, #0c1330, #0a1024); border: 1px solid var(--border); border-radius: 18px; padding: 28px 26px; margin-bottom: 20px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.brain-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(620px 320px at 86% -25%, rgba(47,91,255,.28), transparent 60%); pointer-events: none; }
.brain-hero > * { position: relative; }
.brain-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .62rem; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; color: #38d6a0; border: 1px solid #1f5c46; background: #0f2a24; border-radius: 999px; padding: 4px 11px; font-family: var(--mono); }
.brain-hero h1 { font-size: 32px; letter-spacing: -.02em; margin: 13px 0 5px; color: #fff; }
.brain-hero p { color: var(--muted); max-width: 66ch; margin: 0; }
.brain-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 22px; }
.brain-stat .bs-n { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1; background: linear-gradient(90deg, #7d96ff, #38d6a0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brain-stat .bs-l { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-top: 5px; }
.brain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 14px; }
.brain-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 17px; backdrop-filter: blur(8px); transition: border-color .18s, box-shadow .18s, transform .06s; }
.brain-card:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-1px); }
.bc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.bc-name { font-weight: 700; font-size: 15px; }
.bc-loop { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: #38d6a0; display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); }
.bc-loop::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.bc-nums { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 11px; }
.bc-nums strong { color: var(--ink); font-size: 14px; }
.bc-cov { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-top: 6px; text-align: right; }
