/* Company presentation layer. No changes to the Librarian or Review logic. */
:root {
  color-scheme: dark;
  --bg: #0c0f13; --panel: #171c23; --panel-2: #222932;
  --line: #46515e; --text: #f3f0e8; --muted: #b2bac5;
  --studio-accent: #edca78; --studio-ai: #d2c5ff;
  --studio-link: #a4c9fa; --studio-green: #a0dfb6;
  --gold: #d8ad4b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3ed; --panel: #fffdf8; --panel-2: #eeece4;
  --line: #b9b8af; --text: #202226; --muted: #515965;
  --studio-accent: #76500c; --studio-ai: #60429e;
  --studio-link: #22578a; --studio-green: #21653e;
}
@media (prefers-color-scheme: light) {
  body[data-theme="system"] {
    color-scheme: light;
    --bg: #f5f3ed; --panel: #fffdf8; --panel-2: #eeece4;
    --line: #b9b8af; --text: #202226; --muted: #515965;
    --studio-accent: #76500c; --studio-ai: #60429e;
    --studio-link: #22578a; --studio-green: #21653e;
  }
}
body[data-theme] { color: var(--text); background: var(--bg); }
body[data-theme] :is(.companion-card,.companion-inbox,.companion-popover,
  .settings-drawer,.knowledge-peek,.knowledge-peek-content,.dashboard-intelligence,
  .dashboard-metric,.dashboard-panel,.calm-nudge,.migration-prompt,.update-dialog,
  .case-card,.recent-run,.guidance-card,.evidence-card,.validation-row,.popover-section,
  .connection-panel,.live-pill,.product-tabs,.explore-overview,.map-detail,
  .decision-panel,.flow-step,.settings-guide-preview,.detail-panel) {
  background: var(--panel); color: var(--text); border-color: var(--line);
}
body[data-theme] :is(.rendered-note,.rendered-note.ai,.rendered-note.human,.rendered-note.mixed) {
  background: var(--panel); color: var(--text);
}
body[data-theme] :is(.rendered-markdown,.companion-question,.adaptive-header h2,
  .popover-section p,.popover-section li,.validation-row strong,.evidence-card strong,summary) { color: var(--text); }
body[data-theme] :is(.subtle,.eyebrow,.companion-summary,.change-rationale,.flow-step span) { color: var(--muted); }
body[data-theme] .companion-attention { color: var(--studio-accent); }
body[data-theme] :is(.artifact-button,.icon-button,.companion-details,.view-modes button,
  .header-info,.header-theme,.header-feedback,.compact-toggle) {
  color: var(--text); background: var(--panel-2); border-color: var(--line);
}
body[data-theme] :is(input,textarea,select,.decision-consequence) {
  color: var(--text); background: var(--panel-2); border-color: var(--line);
}
body[data-theme] :is(.metadata-chip,.metadata-chip.maturity.seed) {
  color: var(--muted); background: var(--panel-2); border-color: var(--line);
}
body[data-theme] .metadata-chip.origin.ai { color: var(--studio-ai); background: color-mix(in srgb,var(--studio-ai) 9%,var(--panel)); border-color: var(--studio-ai); }
body[data-theme] :is(.metadata-chip.tag,.metadata-chip.origin.human) { color: var(--studio-green); background: color-mix(in srgb,var(--studio-green) 8%,var(--panel)); border-color: var(--studio-green); }
body[data-theme] :is(.metadata-chip.topic,.knowledge-link,.source-link) { color: var(--studio-link); }
body[data-theme] .metadata-chip.topic { background: var(--panel-2); border-color: var(--studio-link); }
body[data-theme] .metadata-chip.origin.mixed { color: var(--studio-accent); background: var(--panel-2); border-color: var(--studio-accent); }
body[data-theme] :is(.rendered-wikilink,.rendered-source-link,.rendered-markdown a) { color: var(--studio-link); }
body[data-theme] .reference-pill { color: var(--text); background: var(--panel-2); border-color: var(--line); }
body[data-theme] .reference-pill::before { color: var(--studio-accent); }
body[data-theme] .rendered-note.ai::after { color: var(--studio-ai); background: color-mix(in srgb,var(--studio-ai) 9%,var(--panel)); }
body[data-theme] .rendered-note.human::after { color: var(--studio-green); background: color-mix(in srgb,var(--studio-green) 8%,var(--panel)); }
body[data-theme] :is(.case-card:hover,.case-card.selected,.companion-inbox-item) { background: var(--panel-2); }
body[data-theme] .companion-title-row { gap: 12px 20px; }
body[data-theme] .companion-title-row .metadata-chips { gap: 7px; }
body[data-theme] .companion-sequence { gap: 10px; }
body[data-theme] .companion-summary { line-height: 1.65; }
body[data-theme] button:disabled { opacity: .6; }
.studio-logout { position: fixed; bottom: 16px; right: 18px; z-index: 30; }
.studio-logout button { border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; color: var(--text); background: var(--panel); font: inherit; cursor: pointer; box-shadow: 0 3px 16px #0001; }
.login-page { margin: 0; min-height: 100svh; display: grid; place-items: center; padding: 28px 20px; }
.login-page * { box-sizing: border-box; }
.login-card { width: min(100%,460px); padding: clamp(26px,5vw,42px); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 18px; background: var(--panel); box-shadow: 0 20px 65px #0001; }
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 30px; }
.login-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; color: var(--studio-accent); font-size: 25px; }
.login-eyebrow { margin: 0 0 5px; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.login-brand strong { font-size: 14px; }
.login-card h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.15; letter-spacing: -.035em; }
.login-description { margin: 0 0 27px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-card label { display: block; margin-top: 19px; color: var(--text); font-size: 13px; font-weight: 650; }
.login-card input { width: 100%; margin-top: 8px; padding: 13px 14px; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.login-card input:focus-visible,.login-submit:focus-visible,.studio-logout button:focus-visible { outline: 3px solid var(--studio-link); outline-offset: 3px; }
.login-submit { width: 100%; min-height: 48px; padding: 13px; margin-top: 25px; border: 1px solid #aa812c; border-radius: 10px; background: var(--gold); color: #171a20; font: inherit; font-weight: 750; cursor: pointer; }
.login-submit:hover { filter: brightness(1.06); }
.login-footnote { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-page .error { padding: 12px; border-radius: 9px; background: #fbe9e6; color: #8f2424; font-size: 13px; }
@media (max-width:620px) { .studio-logout { position: static; text-align: right; margin: 0 16px 20px; } }
