/* Volta Intelligence portal theme.
   Design language salvaged from the original hand-built HTML — palette, the
   rainbow rule, type, cards. This is the ONLY place the look is maintained;
   the portal is generated, never hand-edited. */

:root {
  --bg: #f7f6f2;
  --paper: #fffefa;
  --ink: #141414;
  --muted: #65625b;
  --faint: #908d85;
  --line: #ddd6c8;
  --line-soft: #eee7db;
  --violet: #6654f1;
  --violet-soft: #efedfe;
  --teal: #1d9e75;
  --green: #16804a;
  --green-soft: #e1f5ee;
  --amber: #a76b00;
  --amber-soft: #faeeda;
  --coral: #d94b35;
  --red: #a32d2d;
  --red-soft: #fcebeb;
  --gray-dot: #888780;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Avenir, "Avenir Next", system-ui, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
.topbar { height: 5px; background: linear-gradient(90deg, #6c5cfe, #05d4e8, #22c55e, #ffbb0e, #ff7c64); }

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #fff9ef; border: 1px solid #eadfca; border-radius: 6px; font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 2px 5px; }

.shell { max-width: 1120px; margin: 0 auto; padding: 22px 26px 70px; }
.appbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.appbar-inner { max-width: 1120px; margin: 0 auto; padding: 11px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 104px; height: auto; display: block; }
.mast-left { display: flex; align-items: center; gap: 12px; }
.nav-toggle { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.nav-toggle:hover { border-color: var(--violet); color: var(--violet); }
html.nav-collapsed nav.side { display: none; }
html.nav-collapsed .layout { grid-template-columns: 1fr; }

.search { position: relative; width: 240px; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 14px; font-size: 13px; color: var(--ink); font-family: inherit; }
.search input:focus { outline: none; border-color: var(--violet); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px; display: none; z-index: 20; max-height: 320px; overflow: auto; }
.search-results a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); font-size: 13px; }
.search-results a:hover { background: var(--bg); text-decoration: none; }
.search-results .sr-sec { color: var(--faint); font-size: 11px; }

.layout { display: grid; grid-template-columns: 196px 1fr; gap: 26px; align-items: start; }
nav.side { font-size: 13px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 76px; }
nav.side a, nav.side .nav-static { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--muted); }
nav.side a:hover { background: #fff; text-decoration: none; color: var(--ink); }
nav.side a.active { background: var(--violet-soft); color: var(--violet); font-weight: 600; }
nav.side .ico { margin-right: 8px; }
nav.side .count { color: var(--faint); font-size: 12px; }
nav.side .sub { padding-left: 28px; }
nav.side .muted { color: var(--faint); }
nav.side .group { padding: 14px 10px 4px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
nav.side .rule { height: 1px; background: var(--line-soft); margin: 8px 6px; }

main { min-width: 0; }
h1 { font-size: 32px; line-height: 1.08; margin: 4px 0 12px; }
h2 { font-size: 21px; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 22px 0 8px; }
.deck { color: var(--muted); font-size: 15px; max-width: 760px; margin-bottom: 24px; }
.eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--violet); margin-bottom: 6px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 26px; }
.metric { background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; padding: 13px 15px; }
.metric .label { font-size: 13px; color: var(--muted); }
.metric .num { font-size: 26px; font-weight: 700; margin-top: 2px; }
.metric .num.warn { color: var(--amber); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 15px 17px; display: block; color: var(--ink); }
.card:hover { border-color: var(--violet); text-decoration: none; box-shadow: 0 0 0 3px rgba(102,84,241,.10); }
.card.span2 { grid-column: span 2; }
.card.placeholder { border-style: dashed; }
.card .title { font-size: 16px; font-weight: 600; }
.card .job { font-size: 13px; color: var(--muted); margin: 7px 0 13px; }
.card .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.card .placeholder-note { font-size: 12px; color: var(--faint); margin-top: 4px; }

.owner-chip { display: inline-flex; align-items: center; gap: 6px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.kind { display: inline-flex; align-items: center; gap: 6px; }
.kind .dot { width: 8px; height: 8px; border-radius: 50%; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 7px; font-weight: 600; }
.badge.verified, .badge.approved { background: var(--green-soft); color: var(--green); }
.badge.unverified { background: var(--amber-soft); color: var(--amber); }
.badge.disputed { background: var(--red-soft); color: var(--red); }
.badge.draft { background: #f1efe8; color: var(--muted); }
.badge.exploring { background: var(--amber-soft); color: var(--amber); }
.badge.committed { background: var(--violet-soft); color: var(--violet); }
.badge.shipped { background: var(--green-soft); color: var(--green); }
.badge.idea { background: #f1efe8; color: var(--muted); }
.badge.dropped { background: #f1efe8; color: var(--faint); }

.article-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; }
.article { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 38px; max-width: 780px; }
.article > .eyebrow { margin-bottom: 12px; }
.article h1 { margin-top: 0; }
.copy-btn { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; color: var(--faint); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.copy-btn:hover { border-color: var(--violet); color: var(--violet); }
.copy-btn svg { display: block; }
.copy-btn .check-i { display: none; }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.copy-btn.copied .copy-i { display: none; }
.copy-btn.copied .check-i { display: inline-flex; }
.article-body { font-size: 17px; line-height: 1.75; }
.article-body p { margin: 0 0 15px; }
.article-body ul, .article-body ol { margin: 0 0 15px; padding-left: 22px; }
.article-body li { margin: 4px 0; }
.article-body blockquote { margin: 0 0 15px; padding: 2px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.article-body table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 0 0 16px; }
.article-body th, .article-body td { border: 1px solid var(--line-soft); padding: 7px 10px; text-align: left; vertical-align: top; }
.article-body th { background: #faf7f0; font-weight: 600; }

.backlinks { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.backlinks .label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.backlinks ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.backlinks a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; color: var(--ink); }
.backlinks a:hover { border-color: var(--violet); color: var(--violet); text-decoration: none; }

.list { display: grid; gap: 10px; }
.list-item { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--ink); }
.list-item:hover { border-color: var(--violet); text-decoration: none; }
.list-item .li-title { font-size: 15px; font-weight: 600; }
.list-item .li-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.list-item .li-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.owner-block { margin-bottom: 26px; }
.owner-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.owner-head .name { font-size: 17px; font-weight: 600; }
.owner-head .count { color: var(--faint); font-size: 13px; }

footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 12px; }

@media (max-width: 860px) {
  .appbar-inner { flex-wrap: wrap; padding: 10px 16px; }
  .search { width: 100%; order: 3; }
  .layout { grid-template-columns: 1fr; }
  nav.side { position: static; top: auto; flex-direction: row; flex-wrap: wrap; }
  .metrics, .cards { grid-template-columns: 1fr; }
  .card.span2 { grid-column: span 1; }
}
