/* Banrox HQ — design tokens from the Banrox Figma file (ground #080814, panel #090C21, brand #264BFF → #8585E9) */
:root {
  --ground: #080814; --panel: #090C21; --panel2: #0D1129; --inner: #0B0F26; --raised: #10163a;
  --ink: #F2F3FB; --ink80: rgba(242,243,251,.80); --ink60: rgba(242,243,251,.60); --ink40: rgba(242,243,251,.40); --ink25: rgba(242,243,251,.25); --ink12: rgba(242,243,251,.12);
  --line: rgba(255,255,255,.10); --line-soft: rgba(255,255,255,.06); --line-strong: rgba(255,255,255,.18);
  --brand: #264BFF; --brand-light: #8585E9; --brand-glow: #8B93D6; --brand-ink: #9fb0ff; --brand-soft: rgba(38,75,255,.16);
  --positive: #4ADE80; --caution: #FB923C; --negative: #F87171; --info: #60A5FA;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #9085e9;
  --grad: linear-gradient(180deg, #8585E9 0%, #264BFF 100%);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 40px rgba(0,0,0,.45);
  --r-sm: 6px; --r: 8px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --tight: "Inter Tight", Inter, sans-serif; --serif: "Instrument Serif", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.16,1,.3,1);
  --sidebar: 236px; --drawer: 600px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground: #F4F5FA; --panel: #FFFFFF; --panel2: #F7F8FC; --inner: #F0F2F9; --raised: #FFFFFF;
  --ink: #0B0F26; --ink80: rgba(11,15,38,.82); --ink60: rgba(11,15,38,.62); --ink40: rgba(11,15,38,.42); --ink25: rgba(11,15,38,.26); --ink12: rgba(11,15,38,.12);
  --line: rgba(11,15,38,.10); --line-soft: rgba(11,15,38,.06); --line-strong: rgba(11,15,38,.2);
  --brand-ink: #264BFF; --brand-soft: rgba(38,75,255,.10);
  --positive: #16a34a; --caution: #c2410c; --negative: #dc2626; --info: #2563eb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #4a3aa7;
  --shadow: 0 1px 2px rgba(11,15,38,.06), 0 8px 24px rgba(11,15,38,.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--inner); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-soft); }
select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--ink60) 50%), linear-gradient(135deg, var(--ink60) 50%, transparent 50%); background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
::selection { background: rgba(38,75,255,.35); }
h1, h2, h3, h4 { font-family: var(--tight); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.015em; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 16px; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink40); }
.muted { color: var(--ink60); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- App shell ---------- */
#app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
aside.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.logo { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line-soft); }
.logo .bx { width: 34px; height: 34px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-family: var(--tight); font-weight: 700; color: #fff; letter-spacing: .02em; font-size: 13px; box-shadow: 0 6px 18px rgba(38,75,255,.35); }
.logo b { font-family: var(--tight); font-weight: 600; font-size: 16px; display: block; line-height: 1.1; }
.logo span { font-size: 11px; color: var(--ink40); letter-spacing: .06em; text-transform: uppercase; }
nav.main { padding: 10px; overflow: auto; flex: 1; }
nav.main .grp { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink40); padding: 12px 10px 6px; }
nav.main a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--ink80); font-weight: 500; border: 1px solid transparent; }
nav.main a:hover { background: var(--panel2); text-decoration: none; color: var(--ink); }
nav.main a.active { background: var(--brand-soft); border-color: rgba(133,133,233,.35); color: var(--ink); }
nav.main a .ic { width: 18px; text-align: center; opacity: .8; font-size: 13px; }
nav.main a .cnt { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink40); }
nav.main a .dot { width: 8px; height: 8px; border-radius: 50%; }
.side-foot { padding: 12px 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink40); display: flex; align-items: center; gap: 8px; }
.side-foot .live { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 3px rgba(74,222,128,.18); }
.side-foot .live.off { background: var(--ink25); box-shadow: none; }

.content { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
header.top { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--panel); }
header.top h1 { font-size: 18px; }
header.top .sub { color: var(--ink40); font-size: 12px; }
header.top .sp { flex: 1; }
.search { position: relative; }
.search input { width: 260px; padding-left: 32px; background: var(--inner); }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 6px; color: var(--ink40); font-size: 16px; }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--inner); }
.toggle button { border: 0; background: transparent; padding: 6px 11px; font-size: 12px; font-weight: 600; color: var(--ink60); }
.toggle button.on { background: var(--brand-soft); color: var(--ink); }
.avatars { display: flex; }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; border: 2px solid var(--panel); margin-left: -6px; font-family: var(--tight); }
.av.lg { width: 40px; height: 40px; font-size: 14px; margin: 0; }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; margin: 0; border-width: 1px; }
.av.dim { opacity: .35; }
main.view { flex: 1; overflow: auto; padding: 22px 26px 60px; scroll-behavior: smooth; }

/* ---------- Primitives ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); border-radius: var(--r); padding: 7px 12px; font-weight: 500; font-size: 13px; line-height: 1.2; transition: transform .2s var(--ease), background .2s; white-space: nowrap; }
.btn:hover { background: var(--raised); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(38,75,255,.35); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink60); }
.btn.ghost:hover { color: var(--ink); background: var(--panel2); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.danger { color: var(--negative); }
.btn:disabled { opacity: .5; cursor: default; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); position: relative; }
.card.tight { padding: 14px 16px; }
.card h3 { margin-bottom: 8px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); background: var(--inner); color: var(--ink80); white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; }
.code { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink60); }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink40); }
.prog { height: 6px; border-radius: 999px; background: var(--ink12); overflow: hidden; }
.prog > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-light); transition: width .4s var(--ease); }
.prog.thick { height: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--tight); font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.stat span { color: var(--ink60); font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; color: var(--ink80); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink40); margin-bottom: 8px; }
.hero { padding: 26px 28px; border-radius: var(--r-xl); border: 1px solid rgba(133,133,233,.25); background: radial-gradient(900px 400px at 10% -20%, rgba(38,75,255,.32), transparent 60%), radial-gradient(600px 300px at 100% 120%, rgba(133,133,233,.18), transparent 60%), var(--panel); box-shadow: var(--shadow); }
.hero h1 { font-size: 30px; }
.hero .serif { color: var(--brand-glow); font-size: 30px; }
.hero p { color: var(--ink80); max-width: 70ch; margin: 8px 0 0; }
.countdown { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.countdown div { border-left: 2px solid var(--line-strong); padding-left: 14px; }
.countdown b { display: block; font-family: var(--tight); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.countdown span { font-size: 12px; color: var(--ink60); }
.empty { color: var(--ink40); padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-md); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink60); }
.notice { border: 1px solid rgba(251,146,60,.35); background: rgba(251,146,60,.08); border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; }
.notice.info { border-color: rgba(96,165,250,.35); background: rgba(96,165,250,.08); }
.notice.ok { border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
table { width: 100%; border-collapse: collapse; }
th { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink40); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: var(--panel2); }
.tablewrap { overflow-x: auto; }

/* ---------- Task rows and cards ---------- */
.trow { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.trow:hover { border-color: var(--line-strong); background: var(--panel2); }
.trow .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1.5px solid var(--ink25); color: var(--ink40); }
.trow .t { min-width: 0; }
.trow .t b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t .meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.trow .right { display: flex; align-items: center; gap: 10px; }
.trow.done .t b { color: var(--ink40); text-decoration: line-through; }
.trow .mini { width: 80px; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); }
.tcard:active { cursor: grabbing; }
.tcard b { display: block; font-weight: 600; font-size: 13px; line-height: 1.3; margin: 4px 0 6px; }
.tcard .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tcard.dragging { opacity: .4; }
.due { font-family: var(--mono); font-size: 10.5px; color: var(--ink60); }
.due.over { color: var(--negative); }
.due.soon { color: var(--caution); }
.prio { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.prio.critical { background: var(--negative); } .prio.high { background: var(--caution); } .prio.normal { background: var(--info); } .prio.later { background: var(--ink25); }

/* Board */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; align-items: start; min-height: 60vh; }
.col { background: var(--panel2); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.col.over { border-color: var(--brand-light); background: var(--brand-soft); }
.col h4 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 6px 8px; color: var(--ink80); }
.col h4 .n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink40); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select { padding: 6px 28px 6px 10px; font-size: 13px; }
.filters input { padding: 6px 10px; font-size: 13px; }
.filters .btn { padding: 6px 10px; }

/* Timeline */
.gantt { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.gantt .grow { display: grid; grid-template-columns: 300px repeat(var(--cols), minmax(88px, 1fr)); border-bottom: 1px solid var(--line-soft); min-width: 900px; }
.gantt .grow.head { position: sticky; top: 0; background: var(--panel); z-index: 2; border-bottom: 1px solid var(--line); }
.gantt .grow.head > div { padding: 10px 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink40); border-left: 1px solid var(--line-soft); text-align: center; }
.gantt .grow.head > div:first-child { border-left: 0; text-align: left; }
.gantt .grow.head > div.cur { color: var(--brand-ink); }
.gantt .grow.group > div:first-child { font-weight: 600; padding: 10px 12px; background: var(--panel2); grid-column: 1 / -1; }
.gantt .lab { padding: 8px 12px; display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.gantt .lab b { font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt .cell { border-left: 1px solid var(--line-soft); position: relative; min-height: 38px; }
.gantt .cell.cur { background: rgba(38,75,255,.06); }
.gantt .bar { position: absolute; top: 9px; height: 20px; border-radius: 5px; left: 4px; right: 4px; display: flex; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.gantt .bar.done { opacity: .45; }
.gantt .bar.blocked { outline: 2px solid var(--negative); outline-offset: -2px; }
.gantt .bar i { display: block; position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.22); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dh { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink40); text-align: center; padding: 4px 0; }
.cal .day { min-height: 96px; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 6px; background: var(--panel); }
.cal .day.out { opacity: .35; }
.cal .day.today { border-color: var(--brand-light); box-shadow: 0 0 0 2px var(--brand-soft); }
.cal .day .dn { font-family: var(--mono); font-size: 11px; color: var(--ink60); margin-bottom: 4px; display: flex; justify-content: space-between; }
.cal .ev { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; background: var(--panel2); border-left: 3px solid var(--brand-light); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.key { border-left-color: var(--caution); font-weight: 600; }

/* Drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(4,6,20,.55); backdrop-filter: blur(2px); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--drawer), 96vw); max-width: 100vw; overflow: hidden; background: var(--panel); border-left: 1px solid var(--line); z-index: 21; transform: translateX(102%); transition: transform .32s var(--ease); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.45); }
.drawer.open { transform: translateX(0); }
.drawer .dh { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.drawer .dh h2 { font-size: 19px; margin: 6px 0 10px; line-height: 1.25; overflow-wrap: anywhere; }
.drawer .dh .row { flex-wrap: wrap; }
.drawer .props { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.drawer .props label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--ink40); font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.drawer .props select, .drawer .props input { padding: 6px 8px; font-size: 13px; }
.drawer .dnav { display: flex; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.drawer .dnav a { padding: 5px 10px; border-radius: 999px; font-size: 12px; color: var(--ink60); white-space: nowrap; }
.drawer .dnav a:hover { background: var(--panel2); text-decoration: none; color: var(--ink); }
.drawer .db { flex: 1; overflow: auto; padding: 16px 20px 60px; }
.sec { margin-bottom: 22px; }
.sec .eyebrow { display: flex; align-items: center; gap: 8px; }
.sec .eyebrow .num { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: inline-grid; place-items: center; font-family: var(--tight); font-weight: 700; font-size: 11px; letter-spacing: 0; }
.sec p { margin: 0 0 8px; }
.sec ul { margin: 0; padding-left: 18px; }
.sec li { margin: 0 0 6px; }
.lead { font-size: 15px; line-height: 1.55; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: var(--r); border: 1px solid transparent; }
.steps li:hover { background: var(--panel2); }
.steps input[type=checkbox] { width: 17px; height: 17px; margin-top: 2px; accent-color: #264BFF; flex: none; }
.steps li.on span { color: var(--ink40); text-decoration: line-through; }
.prompt { border: 1px solid var(--line); background: var(--inner); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; }
.prompt span { flex: 1; font-size: 13px; color: var(--ink80); }
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ref { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--inner); cursor: pointer; }
.ref img { width: 100%; height: 130px; object-fit: cover; object-position: top; display: block; background: #000; }
.ref .cap { padding: 8px 10px; font-size: 12px; color: var(--ink80); }
.ref.link .cap { display: flex; gap: 8px; align-items: center; }
.log { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; align-items: flex-start; }
.log .when { font-family: var(--mono); font-size: 10.5px; color: var(--ink40); white-space: nowrap; margin-top: 3px; }
.dep { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--inner); font-size: 12px; cursor: pointer; margin: 0 6px 6px 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(2,3,12,.88); z-index: 40; display: none; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox .cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }

/* Login */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(900px 500px at 20% 0%, rgba(38,75,255,.28), transparent 60%), var(--ground); z-index: 50; }
.login .box { width: min(440px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; box-shadow: var(--shadow); }
.login .people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.login .people button { border: 1px solid var(--line); background: var(--inner); border-radius: var(--r-md); padding: 10px; display: flex; align-items: center; gap: 10px; text-align: left; }
.login .people button.on { border-color: var(--brand-light); background: var(--brand-soft); }
.login .err { color: var(--negative); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* Claude panel */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 340px); min-height: 360px; }
.chat .msgs { overflow: auto; padding: 14px 4px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82ch; padding: 10px 14px; border-radius: 14px; line-height: 1.55; font-size: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--brand-soft); border: 1px solid rgba(133,133,233,.3); }
.msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.msg.ai .md p { margin: 0 0 8px; }
.msg.ai .md ul, .msg.ai .md ol { margin: 0 0 8px; padding-left: 20px; }
.msg.ai .md code { font-family: var(--mono); font-size: 12px; background: var(--inner); padding: 1px 4px; border-radius: 3px; }
.msg.ai .md pre { background: var(--inner); padding: 10px; border-radius: 8px; overflow: auto; }
.chat .composer { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.chat .composer textarea { flex: 1; min-height: 46px; max-height: 160px; }
.ctx { display: inline-flex; gap: 6px; align-items: center; background: var(--panel2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

/* Charts */
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink60); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .b { display: grid; grid-template-columns: 110px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.bars .track { height: 12px; background: var(--ink12); border-radius: 999px; overflow: hidden; position: relative; }
.bars .track > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.bars .track > i.cap { background: transparent; border-right: 2px solid var(--ink60); border-radius: 0; }

/* Playbook */
.pb-onepage p { font-size: 15px; line-height: 1.6; color: var(--ink80); margin: 0 0 12px; }
.ms { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.ms .n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--tight); font-weight: 700; font-size: 16px; color: #fff; }
.ms b { display: block; font-size: 14px; margin-bottom: 4px; }
.ms p { margin: 0 0 6px; color: var(--ink80); font-size: 13px; }
.ms .lk { display: flex; gap: 6px; flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; color: var(--ink); }
.diagram svg { width: 100%; height: auto; }
.rule { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.rule .k { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--tight); font-weight: 700; font-size: 11px; }
.gl dt { font-weight: 600; margin-top: 8px; }
.gl dd { margin: 0; color: var(--ink80); font-size: 13px; }

/* Toast */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 20px); background: var(--raised); border: 1px solid var(--line-strong); padding: 9px 14px; border-radius: 999px; font-size: 13px; opacity: 0; transition: all .25s var(--ease); z-index: 60; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } .board { grid-template-columns: repeat(5, 240px); } .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) {
  #app { grid-template-columns: 1fr; }
  aside.side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .3s var(--ease); }
  aside.side.open { transform: translateX(0); }
  .menu-btn { display: inline-flex !important; }
  header.top { padding: 10px 12px; gap: 8px; }
  .search { display: none; }
  .toggle button { padding: 6px 8px; }
  header.top h1 { font-size: 15px; }
  .content { max-width: 100vw; overflow: hidden; }
  main.view { padding: 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .drawer .props { grid-template-columns: repeat(2, 1fr); }
  .drawer .db { padding: 14px; }
  .refs { grid-template-columns: 1fr; }
  .hero h1, .hero .serif { font-size: 24px; }
}
.menu-btn { display: none; }
@media print { aside.side, header.top, .drawer, .drawer-bg { display: none !important; } #app { display: block; } main.view { overflow: visible; } }
