:root {
  --bg: #16161e; --panel: #1a1b26; --panel2: #1f2335; --line: #2a2e42;
  --text: #c0caf5; --muted: #565f89; --sub: #a9b1d6;
  --blue: #7aa2f7; --green: #9ece6a; --purple: #bb9af7; --yellow: #e0af68;
  --cyan: #7dcfff; --red: #f7768e;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}
a { color: var(--blue); text-decoration: none; }

/* topbar */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 28px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; letter-spacing: -.3px; }
.brand span { color: var(--muted); }
.brand.big { font-size: 28px; }
.topbar nav { display: flex; gap: 6px; margin-right: auto; }
.topbar nav a {
  color: var(--sub); padding: 6px 12px; border-radius: 8px; font-size: 14px;
}
.topbar nav a:hover { background: var(--panel2); }
.topbar nav a.on { background: var(--panel2); color: var(--text); }
.topbar .meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.topbar .meta .dot { opacity: .5; }
.logout { margin-left: 8px; color: var(--muted) !important; border: 1px solid var(--line); padding: 4px 10px; border-radius: 7px; }

/* layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px; }
.page-h { font-size: 22px; font-weight: 700; margin: 4px 0 22px; }
.muted { color: var(--muted); font-weight: 400; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.agents-full { grid-template-columns: 1fr 1fr; }
section { margin-bottom: 18px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px;
}
.card h2 { font-size: 15px; margin: 0 0 16px; font-weight: 600; }

/* stat tiles */
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.stat-num { font-size: 30px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.5px; }
.stat-sub { color: var(--sub); font-size: 12.5px; }
.bar { height: 6px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); }

/* agents */
.agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agent-mini { display: block; background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; padding: 14px; color: var(--text); }
.agent-mini:hover { border-color: var(--blue); }
.agent-name { font-weight: 700; }
.agent-name.big { font-size: 20px; }
.agent-role { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.agent-when { color: var(--sub); font-size: 12px; margin-top: 8px; }
.agent-spent { color: var(--green); font-size: 13px; margin-top: 4px; }
.agent-card .agent-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.agent-figs { display: flex; gap: 18px; text-align: right; }
.agent-figs .fig { display: block; font-size: 20px; font-weight: 700; }
.agent-figs .figl { display: block; color: var(--muted); font-size: 11px; }

/* feeds */
.feed { list-style: none; margin: 14px 0 0; padding: 0; }
.feed li { padding: 10px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: none; }
.feed-meta { color: var(--muted); font-size: 12px; }
.feed-title { font-weight: 600; margin: 2px 0; font-size: 14px; }
.feed-body { color: var(--sub); font-size: 12.5px; }
.tag { display: inline-block; background: var(--panel2); border: 1px solid var(--line); color: var(--cyan); border-radius: 6px; padding: 0 7px; font-size: 11px; }

/* milestone */
.ms-date { color: var(--muted); font-size: 12.5px; }
.ms-title { font-weight: 700; font-size: 16px; margin: 4px 0 8px; }
.milestone ul { margin: 0; padding-left: 18px; color: var(--sub); font-size: 13px; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: none; }

/* timeline */
.timeline { position: relative; }
.tl-month h2 { font-size: 14px; color: var(--yellow); margin: 22px 0 10px; }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-list li { position: relative; padding: 0 0 16px 24px; border-left: 2px solid var(--line); }
.tl-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--bg); }
.tl-meta { color: var(--muted); font-size: 12.5px; }
.tl-title { font-weight: 600; margin: 2px 0 4px; }
.tl-body ul { margin: 4px 0; padding-left: 18px; color: var(--sub); font-size: 13px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 36px; width: 320px; text-align: center; }
.login-card .sub { color: var(--muted); margin: 4px 0 22px; }
.login-card input { width: 100%; padding: 11px 14px; margin-bottom: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 15px; }
.login-card button { width: 100%; padding: 11px; background: var(--blue); color: #0b0e14; border: none; border-radius: 9px; font-weight: 700; font-size: 15px; cursor: pointer; }
.login-card .err { color: var(--red); font-size: 13px; margin: 10px 0 0; }

/* landing page */
.lp-nav-btn {
  color: var(--sub); border: 1px solid var(--line); padding: 6px 14px;
  border-radius: 8px; font-size: 14px;
}
.lp-nav-btn:hover { border-color: var(--blue); color: var(--blue); }
.lp-wrap { max-width: 860px; }
.lp-hero { padding: 60px 0 40px; text-align: center; }
.lp-headline { font-size: 42px; font-weight: 700; letter-spacing: -.5px; margin: 0 0 16px; }
.lp-sub { font-size: 18px; color: var(--sub); max-width: 560px; margin: 0 auto; line-height: 1.6; }
.lp-card { margin-bottom: 20px; }
.lp-card-bare { margin-bottom: 20px; }
.lp-section-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 18px; }
.lp-prose p { color: var(--sub); line-height: 1.75; margin: 0 0 14px; font-size: 15px; }
.lp-prose p:last-child { margin-bottom: 0; }

/* bio cards */
.bio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bio-card { display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.bio-avatar {
  position: relative; flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--ac, var(--blue)); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bio-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bio-avatar span { color: var(--bg); font-weight: 700; font-size: 22px; line-height: 1; }
.bio-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.bio-role { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.bio-text { color: var(--sub); font-size: 13.5px; line-height: 1.65; margin: 0; font-style: italic; }

/* architecture diagram */
.arch-wrap { margin-top: 8px; }

/* tech stack */
.lp-stack-intro { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack-item { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stack-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.stack-desc { color: var(--sub); font-size: 13px; line-height: 1.6; }

/* CTA */
.lp-cta { text-align: center; padding: 48px 0 32px; }
.cta-btn {
  display: inline-block; background: var(--blue); color: #0b0e14;
  font-weight: 700; font-size: 16px; padding: 13px 32px;
  border-radius: 10px; text-decoration: none;
}
.cta-btn:hover { opacity: .9; }
.lp-cta-note { color: var(--muted); font-size: 13px; margin-top: 14px; }
.lp-cta-note a { color: var(--muted); }
.lp-cta-note a:hover { color: var(--sub); }

@media (max-width: 820px) {
  .grid.stats { grid-template-columns: 1fr 1fr; }
  .grid.two, .grid.agents-full { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 12px; }
  .lp-headline { font-size: 30px; }
  .bio-grid, .stack-grid { grid-template-columns: 1fr; }
  .lp-hero { padding: 36px 0 24px; }
}
