/* Kuntelligence Product V1 — dark basketball workspace (design-v2 language: near-black surfaces, quiet purple). */
:root {
  --bg: #08080a; --sidebar: #0c0c0f; --surface: #101013; --surface-2: #141418; --surface-3: #19191f; --hover: #1d1d24;
  --border: #24242b; --line: #1b1b21; --line-2: #16161b;
  --text: #f5f5f7; --secondary: #a4a4ae; --muted: #6e6e78; --faint: #4c4c55;
  --program-secondary: #9672e3; --program-glow: rgba(112, 71, 199, .22);
  --purple: #7047c7; --purple-light: #9672e3; --purple-soft: rgba(112, 71, 199, .14); --purple-line: rgba(150, 114, 227, .35);
  --green: #54c58a; --amber: #d6a24a; --red: #e06c5f; --blue: #6f9fd8;
  /* provenance colours (used only as small dots/text) */
  --p-official: #6f9fd8; --p-public: #6f9fd8; --p-web: #8a8a96; --p-staff: #9672e3; --p-reviewed: #54c58a; --p-machine: #d6a24a; --p-manual: #c9a4ff; --p-unknown: #6e6e78;
  --radius: 12px; --sidebar-width: 220px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text); background: var(--bg); font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: var(--bg); }
a { color: var(--purple-light); text-decoration: none; }
a:hover { color: #b79cf0; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, td.n, .stat { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
::selection { background: var(--purple-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #22222a; border-radius: 10px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- shell ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 30; display: flex; flex-direction: column; padding: 16px 12px;
  background: radial-gradient(circle at 30% 8%, var(--program-glow-soft, rgba(112,71,199,.09)), transparent 30%), var(--sidebar); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 16px; color: var(--text); }
.brand img { width: 38px; height: 24px; object-fit: contain; }
.brand strong { display: block; font-size: 11.5px; letter-spacing: .14em; }
.brand span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; letter-spacing: .03em; }
.nav { display: grid; gap: 2px; margin-top: 8px; }
.nav a { height: 38px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 8px; color: #8e8e98; font-size: 13px; transition: background .14s, color .14s; }
.nav a:hover { background: #131318; color: #dcdce2; }
.nav a.active { background: var(--purple-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--purple-light); }
.nav-section { color: var(--faint); font-size: 9.5px; font-weight: 800; letter-spacing: .16em; padding: 18px 11px 6px; text-transform: uppercase; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.session { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--secondary); font-size: 12px; cursor: pointer; text-align: left; }
.session .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; }
.session.on { cursor: default; } .session.on .dot { background: var(--green); }
.source-line { font-size: 10.5px; color: var(--muted); padding: 0 4px; line-height: 1.4; }
.preview-stamp { display: grid; gap: 2px; padding: 3px 4px 0; color: var(--muted); font-size: 10px; line-height: 1.25; }
.preview-stamp small { font-size: 9px; opacity: .75; font-variant-numeric: tabular-nums; }
.shell { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(8,8,10,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
main { max-width: 1360px; margin: 0 auto; padding: 26px 28px 80px; }
@media (max-width: 900px) { :root { --sidebar-width: 64px; } .brand div, .nav-section, .source-line, #session-label { display: none; } .nav a { justify-content: center; padding: 0; font-size: 0; } .nav a .ico { width: 18px; height: 18px; } main { padding: 18px 16px 70px; } .topbar { padding: 0 14px; } }

/* icons: minimal line glyphs drawn with CSS masks */
.ico { width: 16px; height: 16px; display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; opacity: .9; }
.ico-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.ico-nate { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3Cpath d='M8 10h8M8 13h5'/%3E%3C/svg%3E"); }
.ico-team { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 20c.6-3.5 3-5.5 6-5.5s5.4 2 6 5.5'/%3E%3Ccircle cx='17' cy='9' r='2.5'/%3E%3Cpath d='M16 14.5c2.5 0 4.4 1.7 5 5'/%3E%3C/svg%3E"); }
.ico-scout { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E"); }
.ico-film { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M10 9.5v5l4.5-2.5z'/%3E%3C/svg%3E"); }
.ico-org { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 6h10M4 12h10M4 18h7'/%3E%3Cpath d='M17 15v6l4-3z'/%3E%3C/svg%3E"); }
.ico-search { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M20 20l-4.2-4.2'/%3E%3C/svg%3E"); }
.ico-play { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12-7.5z'/%3E%3C/svg%3E"); }
.ico-grip { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='6' r='1.6'/%3E%3Ccircle cx='15' cy='6' r='1.6'/%3E%3Ccircle cx='9' cy='12' r='1.6'/%3E%3Ccircle cx='15' cy='12' r='1.6'/%3E%3Ccircle cx='9' cy='18' r='1.6'/%3E%3Ccircle cx='15' cy='18' r='1.6'/%3E%3C/svg%3E"); }

/* ---------- type + layout ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; flex-wrap: wrap; }
.eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 800; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; }
h1 { font-size: 30px; letter-spacing: -.03em; margin: 0; font-weight: 700; }
h2 { font-size: 15px; margin: 0; letter-spacing: -.01em; font-weight: 650; }
h3 { font-size: 13px; margin: 0; }
.sub { color: var(--secondary); font-size: 13.5px; margin: 8px 0 0; max-width: 760px; line-height: 1.55; }
.grid { display: grid; gap: 18px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.card-pad { padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.card-head h2 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--secondary); font-weight: 750; }
.card-body { padding: 10px 18px 16px; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--secondary); font-weight: 750; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); } .secondary { color: var(--secondary); }
.small { font-size: 12px; } .tiny { font-size: 11px; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
@media (max-width: 1050px) { .cols-3, .cols-2 { grid-template-columns: 1fr; } }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: #d9d9df; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-3); border-color: #30303a; color: #fff; }
.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.primary:hover { background: #7d55d6; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--secondary); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.wood { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.danger:hover { border-color: #5a2a26; color: #f2a59c; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; color: var(--secondary); cursor: pointer; display: inline-grid; place-items: center; font-size: 16px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.input, select.input, textarea.input { height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 0 11px; background: var(--surface-2); font-size: 13.5px; min-width: 0; color: var(--text); }
textarea.input { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.input:focus, textarea:focus { outline: none; border-color: var(--purple-line); box-shadow: 0 0 0 3px var(--purple-soft); }
.input::placeholder, textarea::placeholder { color: var(--faint); }
select.input option { background: var(--surface-2); }
label.field { display: grid; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; color: var(--secondary); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 6px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
kbd { font: 600 10px/1 ui-monospace, monospace; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 3px 5px; }

/* ---------- provenance (quiet: a dot + a word, never a loud pill) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--secondary); white-space: nowrap; letter-spacing: .01em; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p-unknown); flex: none; }
.b-public::before { background: var(--p-public); } .b-scout::before { background: var(--p-staff); } .b-reviewed::before { background: var(--p-reviewed); }
.b-machine::before { background: var(--p-machine); } .b-manual::before { background: var(--p-manual); } .b-web::before { background: var(--p-web); }
.b-warn { color: #e2a79f; } .b-warn::before { background: var(--red); }
.b-neutral::before { background: var(--faint); }
.legend { display: grid; gap: 10px; font-size: 12px; color: var(--secondary); }
.legend div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: start; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }

/* ---------- notices / misc ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: var(--surface); border: 1px solid var(--line); color: var(--secondary); }
.notice strong { display: block; margin-bottom: 2px; color: var(--text); font-weight: 650; }
.notice.warn { border-color: #3a2d1c; background: #15120d; } .notice.warn strong { color: #e7c38a; }
.notice.error { border-color: #3d2220; background: #160e0d; } .notice.error strong { color: #f0a59b; }
.notice.info { border-color: #2a2340; background: #120f1a; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.spinner { width: 14px; height: 14px; border: 2px solid #2a2a33; border-top-color: var(--purple-light); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; max-width: 520px; z-index: 60; box-shadow: 0 20px 50px #000a; }
.toast .notice { background: #17171d; border-color: var(--border); color: var(--text); }

/* ---------- top bar: search + ask ---------- */
.search-wrap { position: relative; width: min(520px, 46vw); display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.search-wrap:focus-within { border-color: var(--purple-line); }
.search-input { flex: 1; height: 100%; border: 0; background: transparent; color: var(--text); font-size: 13px; outline: none; min-width: 0; }
.search-input::placeholder { color: var(--faint); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; min-width: 360px; background: #131317; border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 24px 60px #000c; padding: 6px; z-index: 40; display: grid; gap: 1px; max-height: 70vh; overflow: auto; }
.search-results a, .search-results .sr-empty { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 7px; color: var(--text); font-size: 13px; }
.search-results a:hover, .search-results a.sel { background: var(--surface-3); }
.search-results .k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.search-results .m { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.ctx-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 11px; border-radius: 8px; background: var(--surface); color: var(--secondary); font-size: 12px; border: 1px solid var(--line); }
.ctx-chip b { color: var(--text); font-weight: 650; }
.ctx-chip button { border: 0; background: transparent; color: var(--muted); width: 20px; height: 20px; border-radius: 5px; cursor: pointer; }
.ctx-chip button:hover { background: var(--surface-3); color: var(--text); }
.ask-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--purple-line); background: var(--purple-soft); color: #e8defe; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.ask-btn:hover { background: var(--purple-soft); }
@media (max-width: 700px) { .ctx-chip { display: none; } .search-wrap kbd { display: none; } }

/* ---------- ambient Nate drawer ---------- */
.ambient { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 50; background: #0e0e12; border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: -30px 0 80px #000a; }
.amb-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.amb-head strong { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.amb-ctx { font-size: 11.5px; color: var(--secondary); display: inline-flex; gap: 6px; align-items: center; max-width: 250px; overflow: hidden; }
.amb-ctx b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amb-ctx button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.amb-thread { flex: 1; overflow-y: auto; padding: 16px; }
.amb-composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.amb-composer textarea { flex: 1; resize: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; color: var(--text); font-size: 13px; line-height: 1.4; }
.amb-composer textarea:focus { outline: none; border-color: var(--purple-line); }
.amb-hint { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.amb-hint button { display: block; margin-top: 6px; border: 0; background: transparent; color: var(--purple-light); font-size: 12.5px; cursor: pointer; padding: 0; text-align: left; }

/* ---------- home ---------- */
.ask-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 34px 34px 28px; background: radial-gradient(circle at 85% -20%, var(--program-glow), transparent 45%), linear-gradient(180deg, #111116, #0c0c10); border: 1px solid var(--line); }
.ask-hero::after { content: ""; position: absolute; right: -40px; top: -10px; width: 380px; height: 220px; opacity: .08; background: url("/product/logo.svg") center / contain no-repeat; pointer-events: none; }
.ask-hero h1 { font-size: 30px; max-width: 640px; }
.ask-hero p { color: var(--secondary); margin: 8px 0 20px; font-size: 13.5px; max-width: 640px; }
.ask-bar { display: flex; gap: 10px; position: relative; z-index: 1; max-width: 760px; }
.ask-bar .input { flex: 1; height: 46px; font-size: 14.5px; background: #0b0b0e; }
.ask-bar .btn { height: 46px; padding: 0 18px; }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.prompt { border: 1px solid var(--line); background: transparent; color: var(--secondary); border-radius: 8px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.prompt:hover { border-color: var(--purple-line); color: var(--text); }
.prompt.light { }
.status-strip { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 2px 0; font-size: 12px; color: var(--muted); }
.status-strip b { color: var(--secondary); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: block; padding: 14px 16px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .14s, background .14s; min-width: 0; }
.tile:hover { border-color: #2c2c35; background: var(--surface-2); color: var(--text); }
.tile .t { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .m { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); color: inherit; }
.list-item:first-child { border-top: 0; }
.list-item:hover .li-title { color: var(--purple-light); }
.li-title { font-weight: 650; font-size: 13.5px; color: var(--text); }
.li-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- nate page ---------- */
.nate-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1050px) { .nate-shell { grid-template-columns: 1fr; } }
.chat-card { display: flex; flex-direction: column; min-height: calc(100vh - 170px); }
.thread { flex: 1; padding: 22px 24px; overflow-y: auto; max-height: calc(100vh - 260px); }
.msg { margin: 0 0 22px; max-width: 860px; }
.msg.user { margin-left: auto; max-width: 620px; display: flex; justify-content: flex-end; }
.msg.user .bubble { background: var(--surface-3); color: var(--text); border-radius: 12px 12px 4px 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5; }
.msg.nate .who { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .16em; color: var(--muted); margin-bottom: 8px; }
.msg.nate .who i { width: 14px; height: 14px; border-radius: 4px; background: var(--purple); display: inline-block; }
.msg.nate .body { font-size: 14px; line-height: 1.62; color: #e4e4ea; }
.msg.nate .body p { margin: 0 0 8px; }
.msg.nate .meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.msg.nate .limits { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.msg.nate .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.msg.pending .body { color: var(--muted); }
.composer { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 46px; max-height: 160px; }
.ctx-panel .kv, dl.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 10px; font-size: 13px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 12px; } dl.kv dd { margin: 0; font-weight: 550; color: var(--text); }
.clip { margin-top: 10px; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.clip video { width: 100%; display: block; max-height: 360px; background: #000; }
.clip .cap { background: var(--surface); padding: 8px 10px; font-size: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--secondary); }

/* ---------- workspaces (team / player / scout) ---------- */
.ws-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 6px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ws-head h1 { font-size: 34px; }
.ws-head .meta { color: var(--secondary); font-size: 13px; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.team-logo { width: 58px; height: 58px; border-radius: 14px; background: var(--surface-3); color: #d9cdf6; display: grid; place-items: center; font-weight: 800; font-size: 19px; flex: none; border: 1px solid var(--border); }
.team-card { display: flex; gap: 16px; align-items: center; }
.report-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 6px 0 20px; border-bottom: 1px solid var(--line); }
.report-head h1 { font-size: 32px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 22px; overflow-x: auto; position: sticky; top: 60px; z-index: 10; background: rgba(8,8,10,.92); backdrop-filter: blur(8px); }
.tabs a, .tabs button { padding: 12px 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; border: 0; background: transparent; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .on { color: var(--text); border-bottom-color: var(--purple-light); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.kpi { padding: 14px 16px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.form-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.form-strip span { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--secondary); border: 1px solid var(--line); }
.form-strip span.w { color: var(--green); } .form-strip span.l { color: #e48c80; }
.games-list { display: grid; }
.game-row { display: grid; grid-template-columns: 94px 28px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.game-row:first-child { border-top: 0; }
.game-row .d { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.game-row .r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.game-row .r.w { color: var(--green); } .game-row .r.l { color: #e48c80; }
.source-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.notes-list .note { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: #e4e4ea; display: flex; gap: 10px; }
.notes-list .note:first-child { border-top: 0; }
.notes-list .note .by { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.roster { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.roster th { text-align: right; font-size: 10px; letter-spacing: .1em; color: var(--muted); font-weight: 750; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; text-transform: uppercase; }
table.roster th.l, table.roster td.l { text-align: left; }
table.roster td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; vertical-align: top; color: #dcdce2; }
table.roster tr.prow:hover td, table.roster tbody tr:hover td { background: #121217; }
table.roster td.name { font-weight: 650; color: var(--text); }
table.roster td.name a { color: var(--text); } table.roster td.name a:hover { color: var(--purple-light); }
table.roster td.name small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; margin-top: 2px; white-space: normal; }
table.roster tr.recent td { color: var(--muted); font-size: 11.5px; padding-top: 0; border-bottom-color: var(--line); }
.jersey { display: inline-grid; place-items: center; min-width: 28px; height: 24px; border-radius: 6px; background: var(--surface-3); font-weight: 750; font-size: 12px; color: var(--secondary); }
.staff-line { font-size: 12px; color: var(--secondary); white-space: normal; text-align: left; margin-top: 4px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.priority { display: flex; gap: 8px; align-items: center; }
.priority .input { flex: 1; }
.search-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .search-row { grid-template-columns: 1fr; } }

/* ---------- film ---------- */
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.film-card { display: block; color: inherit; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.film-card:hover { border-color: #2f2f39; transform: translateY(-2px); color: inherit; }
.poster { position: relative; aspect-ratio: 16 / 9; background: #050507; overflow: hidden; }
.poster video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .82; pointer-events: none; }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.78)); }
.poster .court { position: absolute; inset: 0; background: url("/product/logo.svg") center / 60% no-repeat; opacity: .14; }
.poster .over { position: absolute; left: 14px; right: 14px; bottom: 11px; z-index: 1; display: flex; align-items: flex-end; gap: 10px; }
.poster .matchup { font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-shadow: 0 1px 8px #000; }
.poster .dur { margin-left: auto; font-size: 11px; color: #ddd; font-variant-numeric: tabular-nums; background: #000a; padding: 2px 6px; border-radius: 4px; }
.film-card .fc-body { padding: 12px 14px 14px; }
.fc-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.film-thumb { display: none; }
.pipeline { display: none; }
.film-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .film-layout { grid-template-columns: 1fr; } }
.player { background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.player video { width: 100%; display: block; max-height: 62vh; background: #000; }
.player .bar { background: var(--surface); border-top: 1px solid var(--line); padding: 9px 12px; font-size: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--secondary); }
.player + .player { margin-top: 0; }
.track { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.track:first-child { border-top: 0; }
.track .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-3); color: var(--muted); -webkit-mask: none; mask: none; opacity: 1; }
.track.done .ico { background: rgba(84,197,138,.14); color: var(--green); }
.track.machine .ico { background: rgba(214,162,74,.14); color: var(--amber); }
.track.attn .ico { background: rgba(224,108,95,.14); color: var(--red); }
.track .t { font-weight: 650; font-size: 13px; }
.track .d { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.ev { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev .when { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 78px; }
.ev .what { flex: 1; font-size: 13px; font-weight: 550; }
.drop { display: block; border: 1px dashed #34343e; border-radius: 12px; padding: 22px; text-align: center; background: var(--surface-2); cursor: pointer; color: var(--secondary); }
.drop.has { border-style: solid; border-color: var(--purple-line); background: var(--purple-soft); color: var(--text); }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--purple-light); width: 0; transition: width .2s; }
.modal-back { position: fixed; inset: 0; background: #000b; z-index: 55; display: grid; place-items: center; padding: 20px; }
.modal { background: #111115; border: 1px solid var(--border); border-radius: 14px; width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 40px 100px #000; }
.modal .card-head { position: sticky; top: 0; background: #111115; z-index: 1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.steps { display: grid; gap: 18px; padding: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Film Edit Builder ---------- */
.builder { margin-top: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); padding: 12px; }
.builder .marks { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.builder .mark { display: inline-flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--secondary); min-width: 84px; }
.builder .mark b { color: var(--text); font-weight: 650; }
.builder .save-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
@media (max-width: 760px) { .builder .save-row { grid-template-columns: 1fr; } }
.scrub { position: relative; height: 34px; margin-top: 10px; border-radius: 7px; background: var(--surface-2); overflow: hidden; cursor: pointer; }
.scrub .poss { position: absolute; top: 6px; bottom: 6px; border-radius: 3px; background: #24242c; }
.scrub .poss.rev { background: rgba(84,197,138,.22); }
.scrub .sel { position: absolute; top: 0; bottom: 0; background: var(--purple-soft); border-left: 2px solid var(--purple-light); border-right: 2px solid var(--purple-light); }
.scrub .head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 6px #fff8; }
.navbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.recent-saves { margin-top: 10px; font-size: 12px; color: var(--muted); display: grid; gap: 4px; }

/* ---------- organizers ---------- */
.org-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.org-toolbar .input { width: 260px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.org-card { position: relative; display: flex; flex-direction: column; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; color: var(--text); transition: border-color .14s, transform .14s; }
.org-card:hover { border-color: #30303a; transform: translateY(-1px); color: var(--text); }
.org-card .strip { height: 4px; background: linear-gradient(90deg, var(--purple), transparent); opacity: .7; }
.org-card .body { padding: 14px 16px 14px; flex: 1; }
.org-card .name { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.org-card .ctx { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.org-card .stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.org-card .stats b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.org-card .foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.org-card.new { border-style: dashed; display: grid; place-items: center; min-height: 150px; color: var(--secondary); cursor: pointer; background: transparent; }
.org-card.new:hover { color: var(--text); border-color: var(--purple-line); }
.ow-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .ow-layout { grid-template-columns: 1fr; } }
.ow-title { font-size: 30px; font-weight: 700; letter-spacing: -.03em; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text); padding: 2px 6px; margin-left: -7px; width: 100%; max-width: 760px; }
.ow-title:hover { border-color: var(--line); } .ow-title:focus { outline: none; border-color: var(--purple-line); background: var(--surface); }
.clips { display: grid; gap: 2px; max-height: calc(100vh - 230px); overflow-y: auto; }
.clip-row { display: grid; grid-template-columns: 18px 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.clip-row:hover { background: var(--surface-2); }
.clip-row.on { background: var(--purple-soft); border-color: var(--purple-line); }
.clip-row.dragging { opacity: .35; }
.clip-row.drop-before { box-shadow: inset 0 2px 0 var(--purple-light); }
.clip-row .grip { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.clip-row .n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.clip-row .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-row .s { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.clip-row .acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.clip-row:hover .acts, .clip-row.on .acts { opacity: 1; }
.check { display: inline-flex; gap: 2px; }
.check button { border: 1px solid var(--border); background: transparent; color: var(--secondary); font-size: 11px; font-weight: 650; height: 24px; padding: 0 8px; cursor: pointer; }
.check button:first-child { border-radius: 6px 0 0 6px; } .check button:last-child { border-radius: 0 6px 6px 0; }
.check button.on { background: var(--surface-3); color: var(--text); border-color: #3a3a46; }
.trim { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.trim-bar { position: relative; height: 44px; margin: 12px 4px 6px; border-radius: 7px; background: var(--surface-2); user-select: none; touch-action: none; }
.trim-bar .ev-zone { position: absolute; top: 0; bottom: 0; background: rgba(214,162,74,.16); border-left: 1px dashed rgba(214,162,74,.5); border-right: 1px dashed rgba(214,162,74,.5); }
.trim-bar .ev-zone.rev { background: rgba(84,197,138,.14); border-color: rgba(84,197,138,.5); }
.trim-bar .range { position: absolute; top: 4px; bottom: 4px; background: var(--purple-soft); border: 1px solid var(--purple-line); border-radius: 5px; }
.trim-bar .handle { position: absolute; top: -3px; bottom: -3px; width: 12px; margin-left: -6px; border-radius: 4px; background: var(--purple-light); cursor: ew-resize; box-shadow: 0 0 0 3px #08080a; }
.trim-bar .ph { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; pointer-events: none; }
.trim .times { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.trim .times input { width: 92px; }
.prov-line { font-size: 11.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.scout-links { display: flex; gap: 8px; flex-wrap: wrap; }
.scout-links a { font-size: 12px; }
.mini-player { border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); margin-bottom: 12px; }
.mini-player video { width: 100%; display: block; max-height: 380px; }
.mini-player .cap { padding: 8px 10px; font-size: 12px; color: var(--secondary); background: var(--surface); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- action card in Nate answers ---------- */
.action-card { margin-top: 10px; border: 1px solid var(--purple-line); background: var(--purple-soft); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }

/* layout refinements after visual pass */
.section-head { justify-content: flex-start; flex-wrap: wrap; }
.section-head > h2 { margin-right: auto; }
.status-strip { align-items: center; }
.card-head > h2 { margin-right: auto; }
.mini-player { max-width: 820px; }
.legend div { grid-template-columns: 1fr; gap: 2px; }
.legend div span { color: var(--muted); padding-left: 12px; }

/* ===== multi-program: program accent, switcher, auth, workspaces, settings ===== */
.nav a.active { box-shadow: inset 2px 0 0 var(--program-secondary); }
:root[data-program="on"] .sidebar { background: radial-gradient(circle at 30% 6%, var(--program-glow), transparent 32%), var(--sidebar); }
.switcher { position: relative; margin: 0 2px 6px; }
.sidebar-foot #switcher .sw-menu { top: auto; bottom: calc(100% + 6px); }
.sw-personal-mark { width: 22px; height: 22px; flex: none; display: inline-grid; place-items: center; border-radius: 7px; background: var(--surface-3); color: var(--text); font-size: 10px; font-weight: 800; }
.sw-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; }
.sw-btn:hover { border-color: var(--purple-line); }
.sw-text { flex: 1; min-width: 0; } .sw-text b { display: block; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-text small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.sw-caret { color: var(--muted); font-size: 10px; }
.pmark { display: inline-grid; place-items: center; flex: none; border-radius: 8px; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .02em; background: var(--purple); object-fit: contain; }
img.pmark { background: transparent; }
.sw-menu { position: absolute; left: 0; top: calc(100% + 6px); width: 280px; z-index: 60; background: #121216; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 60px #000c; padding: 6px; }
.sw-menu > button, .sw-menu > a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; color: var(--text); font-size: 12.5px; border-radius: 8px; cursor: pointer; text-align: left; }
.sw-menu > button:hover, .sw-menu > a:hover { background: var(--surface-3); color: var(--text); }
.sw-menu > button span { flex: 1; min-width: 0; } .sw-menu small { display: block; color: var(--muted); font-size: 10.5px; }
.sw-on { color: var(--program-secondary); font-style: normal; font-size: 9px; }
.sw-label { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 800; padding: 8px 10px 4px; }
.sw-sep { height: 1px; background: var(--line); margin: 6px 4px; } .sw-empty { padding: 8px 10px; color: var(--muted); font-size: 12px; }
/* auth pages: no app chrome */
body.auth-page .sidebar, body.auth-page .topbar, body.auth-page #ambient { display: none; }
body.auth-page .shell { margin-left: 0; }
.auth { min-height: calc(100vh - 80px); display: grid; place-content: center; gap: 14px; }
.auth-card { width: min(400px, 92vw); padding: 30px 28px 26px; border-radius: 16px; background: radial-gradient(circle at 80% -10%, var(--program-glow), transparent 50%), #0f0f13; border: 1px solid var(--line); }
.auth-card h1 { font-size: 24px; margin: 10px 0 18px; } .auth-logo { width: 60px; opacity: .9; }
.auth-form { display: grid; gap: 14px; } .auth-form .btn { height: 40px; }
.auth-err { color: #f0a59b; font-size: 12.5px; margin: 0; min-height: 0; } .auth-err:empty { display: none; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0; }
/* personal vs program */
.space-toggle button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--program-secondary); }
.space-note { font-size: 12px; color: var(--muted); margin: -10px 0 14px; display: flex; gap: 8px; align-items: center; }
.space-note:empty { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; } .dot.personal { background: var(--p-manual); } .dot.program { background: var(--program-secondary); }
.space-pill { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 5px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; vertical-align: 1px; }
.space-pill.program { color: var(--program-secondary); background: var(--program-secondary-muted, rgba(150,114,227,.12)); }
.space-pill.personal { color: #d8c2ff; background: rgba(201,164,255,.1); }
.radios { display: flex; gap: 14px; height: 36px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--secondary); font-weight: 500; }
.radios input { accent-color: var(--purple); }
/* first run + settings */
.first-run { display: grid; gap: 8px; max-width: 820px; }
.fr-step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.fr-step:hover { border-color: var(--purple-line); color: var(--text); }
.fr-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--program-secondary); border: 1px solid var(--purple-line); flex: none; }
.fr-step .t { font-weight: 650; font-size: 14px; } .fr-step .m { color: var(--muted); font-size: 12.5px; margin-top: 2px; } .fr-step > div { flex: 1; }
.fr-cta { color: var(--purple-light); font-size: 12.5px; white-space: nowrap; }
.swatches { display: flex; gap: 6px; } .swatches span { width: 34px; height: 22px; border-radius: 5px; border: 1px solid var(--border); }
input[type=color] { width: 54px; height: 34px; padding: 2px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); }
.ptile { display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; font: inherit; }
/* Development Mail + operator requests */
.devmail { max-width: 960px; margin: 30px auto; padding: 0 20px; }
.devmail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px dashed #3a2d1c; margin-bottom: 16px; }
.devmail-head .eyebrow { color: #e7c38a; }
.dm-list { display: grid; gap: 8px; }
.dm-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.dm-body { flex: 1; min-width: 0; } .dm-subj { font-weight: 650; font-size: 14px; } .dm-meta { color: var(--muted); font-size: 12px; margin-top: 3px; } .dm-meta b { color: var(--secondary); font-weight: 600; }
.dm-kind { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; padding: 4px 8px; border-radius: 5px; background: var(--surface-3); color: var(--secondary); min-width: 98px; text-align: center; }
.dm-kind.VERIFY_EMAIL { color: #7fd6a6; } .dm-kind.INVITATION { color: var(--purple-light); } .dm-kind.RESET_PASSWORD { color: #e7c38a; }
.sw-chip { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border); vertical-align: middle; }
.devmail-link { color: #e7c38a; }

/* Basketball Intelligence Center */
.analytics-hero { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap; padding:28px 30px; border:1px solid var(--line); border-radius:18px; background:radial-gradient(ellipse at 85% 0%, color-mix(in srgb,var(--program-primary) 18%,transparent),transparent 55%),var(--surface); }
.analytics-hero h1 { font-size:clamp(30px,4vw,48px); letter-spacing:-.045em; margin:3px 0 8px; }
.analytics-hero p { color:var(--muted); margin:0; }
.analytics-hero .eyebrow,.analytics-section .eyebrow,.analytics-panel .eyebrow,.analytics-insight .eyebrow { color:var(--program-secondary); font-size:10px; letter-spacing:.14em; text-transform:uppercase; font-weight:800; margin:0 0 7px; }
.analytics-section { margin-top:22px; }
.analytics-section-head { display:flex; justify-content:space-between; gap:15px; align-items:flex-end; margin-bottom:13px; }
.analytics-section-head h2,.analytics-panel h2,.analytics-insight h2 { font-size:19px; letter-spacing:-.025em; margin:0; }
.analytics-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:16px; }
.analytics-kpi { min-height:92px; display:flex; flex-direction:column; justify-content:space-between; padding:15px 17px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.analytics-kpi span { color:var(--muted); font-size:12px; }
.analytics-kpi strong { font-size:27px; line-height:1; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.analytics-kpi.lead { background:linear-gradient(140deg,color-mix(in srgb,var(--program-primary) 15%,var(--surface)),var(--surface)); }
.analytics-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:15px; margin-top:15px; }
.analytics-panel { min-width:0; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.analytics-line { width:100%; height:145px; overflow:visible; margin-top:14px; }
.analytics-line line { stroke:var(--line-strong,var(--line)); stroke-width:1; }
.analytics-line polyline { fill:none; stroke:var(--program-secondary); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.analytics-line circle { fill:var(--program-primary); stroke:var(--program-secondary); stroke-width:2; }
.analytics-chart-empty { display:grid; place-items:center; height:140px; color:var(--muted); font-size:13px; }
.analytics-trend-row { display:flex; align-items:center; gap:11px; flex-wrap:wrap; font-size:12px; color:var(--muted); }
.analytics-trend-row strong { font-size:18px; color:var(--text); font-variant-numeric:tabular-nums; }
.factor-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:16px; }
.factor-head,.factor-row { display:grid; grid-template-columns:minmax(100px,1fr) 76px 76px; gap:6px; align-items:center; }
.factor-head { padding:4px 11px 7px; color:var(--muted); font-size:10px; text-align:right; }.factor-head span { text-align:left; }
.factor-row { gap:4px 6px; padding:11px; border-radius:9px; background:var(--surface-2); }
.factor-row strong { font-size:12px; }.factor-row span { font-size:13px; font-weight:750; }.factor-row small { grid-column:1/-1; color:var(--muted); font-size:10px; }
.analytics-insight { margin-top:15px; padding:20px 23px; display:flex; justify-content:space-between; gap:15px; align-items:center; border-radius:14px; background:color-mix(in srgb,var(--program-primary) 13%,var(--surface)); border:1px solid color-mix(in srgb,var(--program-secondary) 28%,var(--line)); }
.analytics-insight p:last-child { margin:7px 0 0; color:var(--muted); font-size:13px; }
.analytics-table-wrap { overflow:auto; margin-top:14px; }
.analytics-table { width:100%; border-collapse:collapse; white-space:nowrap; font-variant-numeric:tabular-nums; }
.analytics-table th { color:var(--muted); font-size:10px; text-align:right; font-weight:650; padding:9px 8px; border-bottom:1px solid var(--line); }
.analytics-table th:first-child,.analytics-table td:first-child { text-align:left; }
.analytics-table td { text-align:right; font-size:12px; padding:10px 8px; border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent); }
.analytics-table td:first-child a { color:var(--text); font-weight:650; }
.analytics-compare { margin-top:15px; padding-top:14px; border-top:1px solid var(--line); }
.analytics-compare .input { max-width:190px; min-width:0; }
.analytics-games { display:grid; gap:2px; margin-top:11px; }
.analytics-game { display:grid; grid-template-columns:78px 22px minmax(60px,1fr) 58px minmax(90px,auto); align-items:center; gap:7px; padding:9px 3px; border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent); font-size:11px; }
.analytics-game time,.analytics-game a { color:var(--muted); }.analytics-game strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.analytics-game b { text-align:right; font-variant-numeric:tabular-nums; }.analytics-game .win { color:#78c99a; }.analytics-game .loss { color:#df8888; }
.analytics-links { display:flex; gap:9px; flex-wrap:wrap; }.analytics-links a,.analytics-links span { padding:8px 11px; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; font-size:12px; }
.analytics-unavailable { display:flex; flex-wrap:wrap; gap:15px; color:var(--muted); font-size:11px; margin-top:14px; }
.analytics-empty-note { margin-top:16px; max-width:760px; color:var(--muted); font-size:13px; }
.analytics-compare-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }.analytics-compare-grid>div { display:grid; gap:6px; padding:17px; background:var(--surface-2); border-radius:10px; }.analytics-compare-grid strong { font-size:23px; }.analytics-compare-grid span,.analytics-compare-grid p { color:var(--muted); font-size:12px; }
.analytics-filter-row { display:flex; flex-wrap:wrap; align-items:end; gap:9px; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.analytics-filter-row label { display:grid; gap:5px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.analytics-filter-row .input { min-width:125px; min-height:36px; padding:7px 9px; font-size:12px; }
.analytics-explore-chart .analytics-point { cursor:pointer; transition:r .15s,fill .15s; }
.analytics-explore-chart a:hover .analytics-point,.analytics-explore-chart .analytics-point:focus { r:6; fill:var(--program-secondary); outline:none; }
.analytics-outliers { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px; margin:12px 0; }
.analytics-outlier { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; padding:12px; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:10px; text-decoration:none; }
.analytics-outlier span { min-width:0; display:grid; gap:4px; }.analytics-outlier strong { overflow:hidden; text-overflow:ellipsis; }.analytics-outlier small { color:var(--muted); font-size:10px; }.analytics-outlier b { font-variant-numeric:tabular-nums; white-space:nowrap; }
.analytics-metric-lab { margin-top:16px; padding:15px 18px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.analytics-metric-lab summary { cursor:pointer; font-weight:700; }.analytics-metric-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:9px; margin-top:14px; }
.analytics-metric-grid article { display:grid; gap:6px; padding:12px; background:var(--surface-2); border-radius:9px; }.analytics-metric-grid b { color:var(--program-secondary); font-size:9px; letter-spacing:.12em; }.analytics-metric-grid strong { font-size:12px; }.analytics-metric-grid span { color:var(--muted); font-size:11px; line-height:1.4; }
@media(max-width:900px) { .analytics-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.analytics-grid { grid-template-columns:1fr; } }
@media(max-width:560px) { .analytics-hero { padding:21px; }.analytics-kpis { gap:7px; }.analytics-kpi { min-height:78px; padding:11px; }.analytics-kpi strong { font-size:22px; }.analytics-game { grid-template-columns:62px 18px minmax(45px,1fr) 48px; }.analytics-game a,.analytics-game>span:last-child { grid-column:3/-1; }.factor-list { grid-template-columns:1fr; } }

/* ---------- Clip Workspace: a clip pulled forward over the dimmed page (the page stays in place underneath) ---------- */
body.cw-open { overflow: hidden; }
.cw-root { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; }
.cw-backdrop { position: absolute; inset: 0; background: rgba(4, 4, 6, .72); backdrop-filter: blur(2px); animation: cw-fade .14s ease-out; }
.cw { position: relative; width: min(1320px, 100%); max-height: calc(100vh - 44px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); overflow: hidden; animation: cw-rise .16s ease-out; outline: none; }
@keyframes cw-fade { from { opacity: 0; } } @keyframes cw-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.cw-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.cw-titles { flex: 1; min-width: 0; } .cw-titles .eyebrow { margin: 0 0 3px; } .cw-titles h2 { margin: 0; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-nav { display: flex; align-items: center; gap: 6px; } .cw-nav .icon-btn { font-size: 20px; } .cw-x { margin-left: 6px; font-size: 15px !important; }
.cw-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; flex: 1; }
.cw-stage { padding: 14px 16px 14px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cw-video { background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; max-height: calc(100vh - 290px); display: grid; place-items: center; }
.cw-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cw-transport { display: flex; align-items: center; gap: 8px; } .cw-time { font-variant-numeric: tabular-nums; color: var(--secondary); } .cw-loop { display: inline-flex; gap: 6px; align-items: center; }
.cw-scrub { user-select: none; }
.cw-track { position: relative; height: 34px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; touch-action: none; }
.cw-ev { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(111, 159, 216, .22) 0 6px, rgba(111, 159, 216, .1) 6px 12px); border-left: 1px solid rgba(111, 159, 216, .6); border-right: 1px solid rgba(111, 159, 216, .6); pointer-events: none; }
.cw-win { position: absolute; top: 3px; bottom: 3px; background: var(--purple-soft); border: 1px solid var(--purple-line); border-radius: 5px; pointer-events: none; }
.cw-h { position: absolute; top: -3px; bottom: -3px; width: 10px; margin-left: -5px; border-radius: 4px; background: var(--purple-light); cursor: ew-resize; box-shadow: 0 0 0 2px var(--surface); }
.cw-h:focus-visible { outline: 2px solid #fff; }
.cw-ph { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.cw-ticks { display: flex; justify-content: space-between; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cw-alts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .cw-alts:empty { display: none; }
.cw-alt { height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--secondary); font-size: 11.5px; cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-alt:hover { color: var(--text); } .cw-alt.on { border-color: var(--purple-line); color: var(--text); background: var(--purple-soft); }
.cw-rail { border-left: 1px solid var(--line); overflow-y: auto; padding: 6px 0; background: var(--bg); }
.cw-sec { padding: 12px 16px; border-bottom: 1px solid var(--line-2); } .cw-sec:last-child { border-bottom: 0; }
.cw-sh { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--secondary); font-weight: 750; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.cw-sh .tiny { letter-spacing: 0; text-transform: none; font-weight: 500; }
.cw-k { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; } .cw-play { font-size: 14px; font-weight: 600; margin: 3px 0 2px; } .cw-meta { color: var(--secondary); }
.cw-auth { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; }
.cw-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; } .cw-row .input { height: 30px; flex: 1; font-size: 12.5px; }
.cw-tc { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 42px; text-align: center; }
.cw-why { margin: 8px 0 0; line-height: 1.4; }
.cw-notes { display: grid; gap: 6px; margin-bottom: 8px; } .cw-n { display: grid; gap: 1px; color: var(--text); } .cw-n .muted { font-size: 10.5px; }
#cw-note-text { width: 100%; min-height: 54px; font-size: 12.5px; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 6px; } .cw-chips:empty { display: none; }
.cw-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; }
.cw-chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; width: 20px; height: 20px; border-radius: 4px; } .cw-chip-x:hover { background: var(--surface-3); color: var(--text); }
.cw-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cw-open-chip { height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--secondary); font-size: 11.5px; cursor: pointer; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-open-chip:hover { color: var(--text); border-color: var(--purple-line); }
@media (max-width: 900px) { .cw-body { grid-template-columns: 1fr; } .cw-rail { border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; } .cw-root { padding: 8px; } }

.player-controls{display:flex;flex-wrap:wrap;gap:16px;align-items:end;margin:20px 0}.player-controls label{display:grid;gap:6px}.player-controls select{max-width:320px;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:inherit}.player-avatar{display:inline-flex;position:relative;width:44px;height:44px;border-radius:50%;background:#e6e8ed;color:#343b46;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}.player-avatar img{position:absolute;width:100%;height:100%;object-fit:cover}.player-name{display:flex;gap:10px;align-items:center}.ws-head>.player-avatar{width:88px;height:88px;font-size:24px}

/* Launch readiness: readable navigation, focus and bounded mobile layouts. */
:root { --muted:#9898a3; --faint:#92929d; }
:focus-visible { outline:2px solid var(--purple-light); outline-offset:3px; }
.skip-link { position:fixed;left:12px;top:-80px;z-index:200;background:var(--surface);padding:12px; }
.skip-link:focus { top:8px; }
.nav-toggle { display:none; }
.sidebar { overflow-y:auto; }
.topbar .search-wrap { min-width:0; }
.home-start { margin-top:24px;max-width:900px; }
.home-start p { line-height:1.65; }
.page-recovery { max-width:640px;padding:36px 0; }
.public-team-controls { display:flex;flex-wrap:wrap;gap:16px;margin:18px 0;align-items:end; }
.public-team-controls label { display:grid;gap:6px; }
.public-team .ws-head { flex-wrap:wrap; }
.public-team .ws-head>div { min-width:0; }
.public-team .table-wrap { max-width:100%;overflow-x:auto; }
@media(max-width:900px) {
 :root { --sidebar-width:0px; }
 .nav-toggle { display:inline-flex;flex:none; }
 .sidebar { display:none;width:min(300px,90vw);top:60px;z-index:45;padding:16px;box-shadow:16px 0 40px #0009; }
 body.nav-open .sidebar { display:flex; }
 .sidebar .brand div,.sidebar .nav-section,#session-label { display:block; }
 .sidebar .nav a { font-size:14px;justify-content:flex-start;padding:0 11px;min-height:40px; }
 .sidebar .brand { display:none; }
 .sidebar-foot { padding-top:20px; }
 .topbar { gap:10px;padding:0 12px; }
 .topbar .ask-btn { white-space:nowrap;flex:none; }
 main { min-width:0; }
 .nate-shell .thread { min-height:240px; }
 .composer { position:sticky;bottom:0;background:var(--surface); }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; } }
/* Nate answer sections and bullets (K.answerHtml) */
.msg .body .nate-h { font-size: 10.5px; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; color: var(--secondary); margin: 14px 0 6px; }
.msg .body .nate-h:first-child { margin-top: 0; }
.msg .body .nate-list { margin: 0 0 10px; padding-left: 20px; }
.msg .body .nate-list li { margin: 0 0 4px; }
