/* Owner workspace and chat layout. The instrument-panel treatment is scoped below. */
body[data-workspace-owner=true][data-workspace-theme=reactor]{--bg:#262624;--panel:#30302e;--panel2:#363633;--line:#3e3e3a;--text:#f5f4ef;--muted:#a6a39b;--accent:#d97757;--purple:#c4b5fd;--orange:#d97757;--radius:12px;--serif:Georgia,'Iowan Old Style',Charter,'Times New Roman',serif;--sans:'Segoe UI Variable Text','Segoe UI',system-ui,sans-serif;background:#262624;font-family:var(--sans)}
body[data-workspace-owner=true][data-workspace-theme=reactor] .sidebar{background:#1f1e1d;border-right-color:#33322f}
body[data-workspace-owner=true][data-workspace-theme=reactor] .main-wrap{background:#262624}
body[data-workspace-owner=true][data-workspace-theme=reactor] .brand{font-weight:600;letter-spacing:-.4px;font-size:20px}
body[data-workspace-owner=true][data-workspace-theme=reactor] .brand-mark{background:#d97757;color:#1f1e1d;box-shadow:none;border-radius:8px}
body[data-workspace-owner=true][data-workspace-theme=reactor] .brand-dot,body[data-workspace-owner=true][data-workspace-theme=reactor] .status-dot{color:#d97757;background-color:transparent}
body[data-workspace-owner=true][data-workspace-theme=reactor] nav button,body[data-workspace-owner=true][data-workspace-theme=reactor] .nav-link{color:#c9c6bd;border-radius:8px;padding:9px 12px;font-size:13.5px}
body[data-workspace-owner=true][data-workspace-theme=reactor] nav button:hover,body[data-workspace-owner=true][data-workspace-theme=reactor] .nav-link:hover{background:#2c2b29;color:#f5f4ef}
body[data-workspace-owner=true][data-workspace-theme=reactor] nav button.active{background:#353431;color:#f5f4ef}
body[data-workspace-owner=true][data-workspace-theme=reactor] nav button>span:first-child{font-size:15px;color:#a6a39b}
body[data-workspace-owner=true][data-workspace-theme=reactor] .nav-label,body[data-workspace-owner=true][data-workspace-theme=reactor] .workspace-label{color:#85827a;letter-spacing:.06em;font-size:11px;text-transform:none}
body[data-workspace-owner=true][data-workspace-theme=reactor] .new-label{background:#d977571f;color:#e8a084;border-color:transparent}
body[data-workspace-owner=true][data-workspace-theme=reactor] .topbar{background:transparent;border-bottom-color:transparent;color:#a6a39b}
body[data-workspace-owner=true][data-workspace-theme=reactor] .keyboard-hint{display:none}
body[data-workspace-owner=true][data-workspace-theme=reactor] .station-clock{color:#a6a39b;font-family:var(--sans);letter-spacing:.02em}
body[data-workspace-owner=true][data-workspace-theme=reactor] .footer{border-top-color:#33322f;color:#77746c}
body[data-workspace-owner=true][data-workspace-theme=reactor] .card{background:#30302e;border-color:#3e3e3a;border-radius:12px;box-shadow:none}
body[data-workspace-owner=true][data-workspace-theme=reactor] .page-heading h1{font-family:var(--serif);font-weight:400;letter-spacing:-.01em}
body[data-workspace-owner=true][data-workspace-theme=reactor] .eyebrow{color:#a6a39b}
body[data-workspace-owner=true][data-workspace-theme=reactor] .pill{color:#e8a084;border-color:#5a3d31}
body[data-workspace-owner=true][data-workspace-theme=reactor] .primary{background:#d97757;border-color:#d97757;color:#1f1e1d;border-radius:8px;box-shadow:none}
body[data-workspace-owner=true][data-workspace-theme=reactor] .primary:hover{background:#c6613f;border-color:#c6613f}
body[data-workspace-owner=true][data-workspace-theme=reactor] .secondary{border-color:#4a4945;color:#f5f4ef;border-radius:8px;background:transparent}
body[data-workspace-owner=true][data-workspace-theme=reactor] .secondary:hover{background:#30302e}
body[data-workspace-owner=true][data-workspace-theme=reactor] input,body[data-workspace-owner=true][data-workspace-theme=reactor] textarea,body[data-workspace-owner=true][data-workspace-theme=reactor] select{background:#1f1e1d;border-color:#4a4945;color:#f5f4ef;border-radius:8px}

/* Home-link crumb (everyone) */
.crumb-home{all:unset;cursor:pointer;padding:5px 10px;border-radius:999px;border:1px solid var(--line);color:var(--text);font-size:12px}
.crumb-home:hover,.crumb-home:focus-visible{border-color:var(--accent);color:var(--accent)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Claude-style home */
.cl-home{max-width:760px;margin:6vh auto 0;font-family:var(--sans)}
.cl-greet{display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:30px;text-align:left}
.cl-spark{font-size:40px;line-height:1;color:#d97757;animation:cl-turn 18s linear infinite}
.cl-greet small{display:block;color:#a6a39b;font-size:13px;margin-bottom:2px}
.cl-greet h1{margin:0;font:400 clamp(30px,3.6vw,44px)/1.15 var(--serif);letter-spacing:-.015em;color:#f5f4ef}
.cl-thread{display:flex;flex-direction:column;gap:14px;max-height:46vh;overflow:auto;padding:4px 2px 18px}
.cl-msg{white-space:pre-wrap;font:15px/1.65 var(--serif);color:#ecebe4;max-width:100%}
.cl-msg.mine{align-self:flex-end;max-width:80%;background:#141413;border-radius:14px;padding:10px 14px;font-family:var(--sans);font-size:14.5px}
.cl-msg.pending{color:#a6a39b;animation:cl-fade 1.2s ease-in-out infinite}
.cl-composer{background:#30302e;border:1px solid #45443f;border-radius:20px;padding:14px 14px 10px 18px;box-shadow:0 4px 24px #0000002e;transition:border-color .15s}
.cl-composer:focus-within{border-color:#6b6a64}
.cl-composer textarea{all:unset;box-sizing:border-box;display:block;width:100%;min-height:52px;max-height:40vh;resize:none;overflow:auto;font:16px/1.5 var(--sans);color:#f5f4ef;white-space:pre-wrap}
.cl-composer textarea::placeholder{color:#8b887f}
.cl-bar{display:flex;align-items:center;gap:10px;margin-top:8px}
.cl-hint{flex:1;font-size:11px;color:#77746c}
.cl-model select{all:unset;cursor:pointer;font-size:12.5px;color:#c9c6bd;padding:6px 10px;border-radius:8px}
.cl-model select:hover,.cl-model select:focus-visible{background:#3a3936}
.cl-model option{background:#30302e;color:#f5f4ef}
.cl-send{all:unset;cursor:pointer;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#d97757;color:#1f1e1d;font-size:17px;font-weight:700}
.cl-send:hover{background:#c6613f}
.cl-send:focus-visible{outline:2px solid #f5f4ef;outline-offset:2px}
.cl-send:disabled{opacity:.4;cursor:default}
.cl-status{min-height:1em;margin:6px 0 0;font-size:11.5px;color:#a6a39b}
.cl-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:18px 0 44px}
.cl-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border:1px solid #45443f;border-radius:10px;background:transparent;color:#c9c6bd;font:13px var(--sans);text-decoration:none;cursor:pointer}
.cl-chip span{color:#a6a39b;font-size:12px}
.cl-chip:hover,.cl-chip:focus-visible{background:#30302e;color:#f5f4ef;border-color:#5a5953}
.cl-section{display:flex;align-items:baseline;justify-content:space-between;gap:16px;border-bottom:1px solid #3e3e3a;padding-bottom:10px;margin-bottom:14px}
.cl-section h2{margin:0;font:500 15px var(--sans);color:#f5f4ef}
.cl-section span{font-size:12px;color:#8b887f;text-align:right}
.cl-projects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:40px}
.cl-project{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:6px;padding:16px;border:1px solid #3e3e3a;border-radius:12px;background:#2b2b29;transition:background .15s,border-color .15s}
.cl-project:hover,.cl-project:focus-visible{background:#30302e;border-color:#5a5953}
.cl-project b{font:500 14.5px var(--sans);color:#f5f4ef}
.cl-project span{font-size:12.5px;line-height:1.5;color:#a6a39b;flex:1}
.cl-project small{font-size:11px;color:#e8a084}
@keyframes cl-turn{to{transform:rotate(360deg)}}
@keyframes cl-fade{50%{opacity:.45}}
@media(max-width:760px){.cl-home{margin-top:2vh}.cl-projects{grid-template-columns:1fr}.cl-hint{display:none}.cl-greet{justify-content:flex-start}}
@media(prefers-reduced-motion:reduce){.cl-spark,.cl-msg.pending{animation:none}}
body[data-workspace-owner=true][data-workspace-theme=reactor] #main{background:transparent;border:0;box-shadow:none;backdrop-filter:none}
body[data-workspace-owner=true][data-workspace-theme=reactor] .cl-composer textarea{background:transparent;border:0;border-radius:0;padding:0;box-shadow:none}
body[data-workspace-owner=true][data-workspace-theme=reactor] .cl-model select{background:transparent;border:0;padding:6px 10px}
body[data-workspace-owner=true][data-workspace-theme=reactor] .cl-model select:hover{background:#3a3936}

/* Coop's camera workbench. The outer selector follows the effective workspace
   when the owner enters or leaves read-only member inspection. */
body[data-workspace-owner=true][data-workspace-theme=reactor] {
  --bg: #0d151d;
  --panel: #14212c;
  --panel2: #1b2c38;
  --line: #344b59;
  --text: #ecf3f6;
  --muted: #aabfc9;
  --accent: #9edccd;
  --orange: #ffbd86;
  --serif: var(--sans);
  background: var(--bg);
  color: var(--text);

  & .sidebar { background: #101922; border-color: var(--line); }
  & .main-wrap {
    background-color: var(--bg);
    background-image: linear-gradient(#9ac7cf09 1px, transparent 1px), linear-gradient(90deg, #9ac7cf09 1px, transparent 1px);
    background-size: 32px 32px;
  }
  & .topbar { color: var(--muted); background: #101a23; border-bottom: 1px solid var(--line); }
  & .brand-mark, & .cl-send { color: #112425; background: var(--accent); border-radius: 4px; }
  & .brand-dot, & .cl-spark { color: var(--accent); }
  & .cl-spark { animation: none; }
  & nav button, & .nav-link { color: #c5d3db; }
  & nav button.active { border-left: 2px solid var(--accent); background: #223640; color: white; }
  & nav button:hover, & .nav-link:hover { background: #1e2e38; }
  & .nav-label, & .workspace-label, & .station-clock, & .eyebrow, & .footer { color: var(--muted); }
  & .footer { background: var(--bg); border-color: var(--line); }
  & .card, & .cl-composer, & .cl-project, & .cl-model option { background: var(--panel); border-color: var(--line); }
  & .card, & .cl-composer, & .cl-project { border-radius: 7px; }
  & .cl-composer:focus-within { border-color: var(--accent); }
  & .cl-composer textarea, & .cl-model select { color: var(--text); }
  & .cl-composer textarea::placeholder, & .cl-project span, & .cl-greet small, & .cl-status,
  & .cl-hint, & .cl-section span, & .cl-chip span { color: var(--muted); }
  & .cl-chip, & .secondary { background: var(--bg); color: var(--text); border-color: #4c606d; }
  & .cl-chip:hover, & .secondary:hover, & .cl-project:hover { background: var(--panel2); border-color: #769891; }
  & .cl-project small, & .pill { color: var(--orange); }
  & .cl-section { border-color: var(--line); }
  & .cl-msg.mine { background: var(--panel2); }
  & .primary { background: var(--accent); color: #112425; border-color: var(--accent); }
  & .primary:hover { background: #b9eadf; border-color: #b9eadf; }
  & input, & select, & textarea { background: #0e1922; border-color: #536976; color: var(--text); }
  & .cl-home { margin-top: clamp(16px, 3vh, 40px); }
  & .cl-chips { margin-bottom: 24px; }
  & .page-heading h1, & .cl-greet h1 { font-weight: 600; letter-spacing: -.035em; }
  & :is(button, a, input, textarea, select, summary, [tabindex]):focus-visible {
    outline: 3px solid #ffe0a1; outline-offset: 3px;
  }

  & .coop-entry {
    display: flex; width: 100%; align-items: center; gap: clamp(14px, 2.5vw, 28px);
    padding: 18px clamp(14px, 2.5vw, 28px); margin: 0 0 24px; text-align: left;
    color: var(--text); background: #162831; border: 1px solid #47646b; border-left: 3px solid var(--accent);
    border-radius: 3px; cursor: pointer; font-family: var(--sans);
  }
  & .coop-entry:hover { background: #1c333c; border-color: var(--accent); }
  & .coop-entry-frame {
    position: relative; display: grid; place-items: center; flex: 0 0 72px; height: 52px;
    border: 1px solid #7593a1; background-color: #111d28;
    background-image: linear-gradient(#6890a038 1px, transparent 1px), linear-gradient(90deg, #6890a038 1px, transparent 1px);
    background-size: 8px 8px; overflow: hidden;
  }
  & .coop-entry-frame::before { content: ''; position: absolute; width: 12px; height: 80px; background: #73a9e4; transform: translateX(5px) rotate(24deg); }
  & .coop-entry-frame i { z-index: 1; height: 23px; width: 26px; border: 1px solid #e6ffed; }
  & .coop-entry-copy { display: grid; gap: 3px; min-width: 0; }
  & .coop-entry-copy small { color: var(--accent); font-size: 11px; letter-spacing: .1em; font-weight: 650; }
  & .coop-entry-copy strong { font-size: clamp(20px, 2.8vw, 29px); line-height: 1.2; font-weight: 600; }
  & .coop-entry-copy > span { color: #c6d6de; font-size: 14px; line-height: 1.5; }
  & .coop-entry-arrow { margin-left: auto; color: var(--accent); font-size: 24px; }
  @media (max-width: 540px) { & .coop-entry-frame { flex-basis: 42px; height: 44px; } }
}
