:root {
  color-scheme: dark;
  --bg: #08101f;
  --bg-soft: #0d1628;
  --panel: rgba(17, 28, 49, 0.82);
  --panel-strong: #121f35;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef4ff;
  --muted: #8fa0ba;
  --accent: #8dd7ff;
  --accent-2: #b5a7ff;
  --good: #77e1a6;
  --warn: #ffd77e;
  --danger: #ff9b9b;
  --shadow: 0 18px 60px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(82, 116, 255, .16), transparent 34%),
    radial-gradient(circle at 30% 22%, rgba(45, 188, 225, .08), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(5, 10, 20, .76);
  backdrop-filter: blur(18px);
  padding: 26px 18px 22px;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; color: #08101f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px rgba(97, 179, 255, .24);
}
.brand strong { display: block; letter-spacing: .04em; }
.brand span { color: var(--muted); font-size: 12px; }

.nav-list { display: grid; gap: 7px; }
.nav-item {
  width: 100%; border: 0; background: transparent; border-radius: 12px;
  padding: 12px 13px; display: flex; gap: 11px; align-items: center;
  color: var(--muted); cursor: pointer; text-align: left;
}
.nav-item span { width: 20px; text-align: center; }
.nav-item:hover, .nav-item:focus-visible { background: rgba(255,255,255,.05); color: var(--text); outline: none; }
.nav-item.is-active { background: linear-gradient(90deg, rgba(110, 179, 255, .16), rgba(181,167,255,.08)); color: var(--text); }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid var(--line); color: var(--muted); }
.sidebar-foot p { font-size: 11px; font-weight: 800; letter-spacing: .16em; margin: 0 0 10px; color: var(--text); }
.sidebar-foot small { display: block; margin-top: 12px; font-size: 11px; }
.mini-flow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; }
.mini-flow span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 999px; }
.mini-flow i { font-style: normal; opacity: .5; }

.main { min-width: 0; padding: 30px 36px 26px; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 3vw, 44px); letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.025em; }
h3 { margin-bottom: 0; font-size: 18px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-box {
  min-width: 310px; height: 44px; border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255,255,255,.035); display: flex; align-items: center; gap: 8px; padding: 0 12px;
}
.search-box span { color: var(--muted); font-size: 21px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: #667790; }
.sync-pill { height: 44px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 13px; padding: 0 12px; color: var(--muted); font-size: 12px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 5px rgba(119,225,166,.08); }

.view { display: none; }
.view.is-visible { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: .4; transform: translateY(4px);} to {opacity: 1; transform: none;} }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, .6fr); gap: 16px; }
.hero-card, .signal-card, .panel, .project-card, .asset-card, .stat-card, .table-wrap {
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.hero-card { border-radius: 24px; padding: 28px; display: grid; grid-template-columns: 1.3fr .85fr; gap: 24px; overflow: hidden; position: relative; }
.hero-card::after { content:""; position:absolute; inset:auto -60px -100px auto; width:260px; height:260px; border-radius:50%; background:radial-gradient(circle, rgba(141,215,255,.16), transparent 68%); pointer-events:none; }
.hero-copy h2 { font-size: clamp(28px, 3.1vw, 46px); max-width: 620px; line-height: 1.05; margin-bottom: 14px; }
.hero-copy p:not(.eyebrow) { color: var(--muted); line-height: 1.7; max-width: 680px; margin-bottom: 0; }
.centerpin-box { align-self: end; position: relative; z-index: 1; padding: 18px; border-radius: 17px; background: linear-gradient(145deg, rgba(141,215,255,.11), rgba(181,167,255,.07)); border: 1px solid rgba(141,215,255,.16); }
.centerpin-box > span { display:block; font-size:10px; letter-spacing:.18em; font-weight:800; color:var(--accent); margin-bottom:9px; }
.centerpin-box strong { display:block; line-height:1.5; }
.ghost-link, .text-button { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 0; }
.ghost-link { margin-top: 14px; font-size: 12px; }
.signal-card { border-radius: 24px; padding: 24px; display: grid; place-items: center; align-content: center; text-align: center; }
.signal-card .eyebrow { justify-self: stretch; text-align: left; }
.signal-ring { width: 126px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; margin: 8px auto 16px; background: radial-gradient(circle, #0c1628 58%, transparent 60%), conic-gradient(var(--accent) 0 72%, rgba(255,255,255,.08) 72%); }
.signal-ring strong { font-size: 34px; line-height: 1; }
.signal-ring span { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.signal-card p:last-child { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.stat-card { border-radius: 16px; padding: 17px 18px; }
.stat-card span { display:block; color:var(--muted); font-size:12px; margin-bottom:8px; }
.stat-card strong { font-size: 27px; }
.stat-card small { color: var(--muted); margin-left: 6px; }

.section-head { margin: 34px 0 14px; display:flex; align-items:end; justify-content:space-between; gap:16px; }
.section-head-top { margin-top: 6px; }
.project-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.project-grid-full { grid-template-columns:repeat(3,minmax(0,1fr)); }
.project-card { border-radius: 18px; padding: 18px; position: relative; overflow: hidden; min-height: 190px; display:flex; flex-direction:column; }
.project-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--card-accent, var(--accent)); }
.project-top { display:flex; justify-content:space-between; gap:10px; }
.project-kicker { color:var(--muted); font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
.project-card h3 { margin: 10px 0 8px; font-size: 19px; }
.project-card p { color:var(--muted); font-size:13px; line-height:1.55; }
.project-next { margin-top:auto; padding-top:14px; border-top:1px solid var(--line); }
.project-next span { display:block; color:var(--muted); font-size:10px; margin-bottom:5px; }
.project-next strong { font-size:12px; line-height:1.45; }
.project-link { position:absolute; inset:0; z-index:1; text-indent:-9999px; }

.badge { display:inline-flex; align-items:center; justify-content:center; min-height:23px; padding:0 8px; border-radius:999px; border:1px solid var(--line); font-size:10px; font-weight:800; letter-spacing:.04em; }
.badge-active, .badge-canonical { color:var(--good); background:rgba(119,225,166,.08); border-color:rgba(119,225,166,.18); }
.badge-build, .badge-design { color:var(--accent); background:rgba(141,215,255,.08); border-color:rgba(141,215,255,.18); }
.badge-review, .badge-research { color:var(--warn); background:rgba(255,215,126,.08); border-color:rgba(255,215,126,.2); }
.badge-reference { color:var(--muted); }
.badge-s { color:#d8d1ff; background:rgba(181,167,255,.12); border-color:rgba(181,167,255,.22); }
.badge-a { color:var(--accent); }
.badge-b { color:var(--warn); }
.badge-c { color:var(--muted); }

.two-col { display:grid; grid-template-columns: .85fr 1.15fr; gap:12px; margin-top:34px; }
.panel { border-radius:18px; padding:20px; }
.panel-head { display:flex; align-items:start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.action-list { display:grid; gap:10px; }
.action-item { display:grid; grid-template-columns:32px 1fr; gap:10px; align-items:start; padding:12px 0; border-top:1px solid var(--line); }
.action-item:first-child { border-top:0; }
.action-num { width:28px; height:28px; border-radius:9px; display:grid; place-items:center; background:rgba(141,215,255,.08); color:var(--accent); font-size:11px; font-weight:800; }
.action-item strong { display:block; font-size:13px; margin-bottom:4px; }
.action-item span { color:var(--muted); font-size:12px; line-height:1.5; }
.flow-map { display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr auto 1fr; gap:9px; align-items:center; }
.flow-map > div { min-width:0; padding:12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); }
.flow-map b { color:var(--accent); display:block; font-size:10px; }
.flow-map span { display:block; margin:5px 0 2px; font-size:12px; font-weight:700; }
.flow-map small { display:block; color:var(--muted); font-size:9px; overflow:hidden; text-overflow:ellipsis; }
.flow-map i { font-style:normal; color:#56677f; }

.asset-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.asset-card { border-radius:17px; padding:17px; min-width:0; }
.asset-card-top { display:flex; justify-content:space-between; gap:10px; align-items:start; }
.asset-type { color:var(--muted); font-size:10px; text-transform:uppercase; }
.asset-card h3 { font-size:15px; line-height:1.45; margin:12px 0 8px; }
.asset-card p { color:var(--muted); font-size:12px; margin:0; }
.asset-card a { display:inline-block; margin-top:13px; color:var(--accent); font-size:12px; text-decoration:none; }

.filter-row { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.filter-chip { border:1px solid var(--line); background:rgba(255,255,255,.025); color:var(--muted); border-radius:999px; padding:7px 10px; font-size:11px; cursor:pointer; }
.filter-chip:hover, .filter-chip:focus-visible { color:var(--text); outline:none; }
.filter-chip.is-active { color:var(--text); border-color:rgba(141,215,255,.3); background:rgba(141,215,255,.1); }

.table-wrap { border-radius:18px; overflow:hidden; }
table { width:100%; border-collapse:collapse; }
th,td { padding:14px 15px; text-align:left; border-bottom:1px solid var(--line); vertical-align:middle; }
th { color:var(--muted); font-size:10px; letter-spacing:.09em; text-transform:uppercase; background:rgba(255,255,255,.025); }
td { font-size:12px; }
td:first-child { width:42%; font-size:13px; font-weight:650; line-height:1.45; }
.row-link { text-decoration:none; color:var(--accent); white-space:nowrap; }
.empty-state { padding:40px; text-align:center; color:var(--muted); }

.timeline { position:relative; display:grid; gap:10px; }
.timeline::before { content:""; position:absolute; left:16px; top:8px; bottom:8px; width:1px; background:var(--line); }
.timeline-item { position:relative; display:grid; grid-template-columns:34px 100px 1fr auto; gap:12px; align-items:center; padding:14px 15px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.timeline-dot { width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 5px rgba(141,215,255,.08); justify-self:center; z-index:1; }
.timeline-date { color:var(--muted); font-size:11px; }
.timeline-title { font-size:13px; font-weight:650; }
.timeline-meta { color:var(--muted); font-size:11px; }
.timeline-item a { color:var(--accent); text-decoration:none; font-size:12px; }

.footer { margin-top:40px; padding-top:18px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:15px; color:var(--muted); font-size:11px; }

@media (max-width: 1180px) {
  .project-grid, .project-grid-full { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hero-card { grid-template-columns:1fr; }
  .flow-map { grid-template-columns:1fr; }
  .flow-map i { transform:rotate(90deg); justify-self:center; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:static; height:auto; padding:14px 16px; border-right:0; border-bottom:1px solid var(--line); }
  .brand { padding-bottom:12px; }
  .nav-list { grid-template-columns:repeat(4,1fr); }
  .nav-item { justify-content:center; padding:10px 8px; font-size:12px; }
  .sidebar-foot { display:none; }
  .main { padding:22px 18px; }
  .topbar { align-items:flex-start; flex-direction:column; }
  .top-actions { width:100%; flex-wrap:wrap; }
  .search-box { min-width:0; flex:1 1 280px; }
  .hero-grid { grid-template-columns:1fr; }
  .signal-card { grid-template-columns:auto 1fr; justify-items:start; text-align:left; column-gap:18px; }
  .signal-card .eyebrow { grid-column:1 / -1; }
  .signal-ring { width:100px; margin:0; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .two-col { grid-template-columns:1fr; }
  .asset-cards { grid-template-columns:1fr; }
  .table-wrap { overflow-x:auto; }
  table { min-width:850px; }
}
@media (max-width: 560px) {
  .nav-item { font-size:0; }
  .nav-item span { font-size:18px; }
  .project-grid, .project-grid-full { grid-template-columns:1fr; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .hero-card, .signal-card { padding:20px; }
  .timeline-item { grid-template-columns:30px 1fr auto; }
  .timeline-date { grid-column:2; }
  .timeline-title { grid-column:2 / -1; }
  .timeline-meta { grid-column:2; }
  .footer { flex-direction:column; }
}
