/* Teamwork interface stylesheet.
   Structure, in cascade order:
     1. Tokens (:root) — colour, type scale, radius. Add new values here, not inline.
     2. Base rules, in source order. Order is load-bearing; do not reorder.
     3. @media blocks, one per condition, ordered so later blocks legitimately win:
          prefers-reduced-motion
          min-width, ascending
          max-width, widest first
          height compaction (min-width:651px + max-height), narrowest intent last
   Each (condition, selector) pair appears exactly once. If you need to change a rule,
   edit it in place rather than appending an override at the end of the file. */
:root{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-synthesis:none;
  --font-editorial:'Iowan Old Style','Palatino Linotype','Book Antiqua',Georgia,serif;
  --accent:#285b49;--accent-hover:#1b4436;--accent-soft:#dce9df;--accent-tint:#edf2eb;
  --blue:var(--accent);--blue-deep:var(--accent-hover);--blue-soft:var(--accent-soft);--blue-tint:var(--accent-tint);
  --focus:#397e65;--ink:#262b26;--ink-2:#505950;--ink-3:#626960;--muted:#6d7269;--muted-2:#73776e;
  --bg:#faf9f6;--surface:#fffefa;--surface-2:#f4f4ee;--sidebar:#f0f0e9;--line:#e6e7de;--line-2:#d8ddd2;
  --danger:#aa3b39;--warm:#a9633c;--warm-soft:#f5eadc;
  --text-xs:12px;--text-sm:14px;--text-md:15px;--text-lg:18px;--text-xl:21px;--text-2xl:27px;--text-3xl:36px;--text-4xl:44px;
  --radius-sm:6px;--radius:8px;--radius-lg:12px;--radius-xl:16px;
  color:var(--ink);background:var(--bg);line-height:1.5;
  min-height:100vh;min-height:100dvh;
}
*{box-sizing:border-box}
/* Paint the viewport on actual full-height containers, including before app data loads. */
body{margin:0;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:var(--bg);-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit}
button,a,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.brand{font-size:25px;letter-spacing:-1px;font-weight:650;position:relative;padding-left:39px;line-height:1.2}
.logo{color:var(--blue);position:absolute;left:0;top:-2px;font-size:36px;line-height:1}
.brand-sub{display:block;font-size:9px;letter-spacing:1.8px;font-weight:600;color:var(--muted);margin-top:6px}
.project{display:flex;gap:10px;align-items:center;font-size:var(--text-xs);font-weight:600;margin:43px 0 29px}
.project small{display:block;font-size:var(--text-xs);color:var(--muted);font-weight:400;margin-top:4px}
.project-icon{background:var(--blue-tint);color:var(--blue);padding:10px 12px;border-radius:9px}
nav{display:grid;gap:7px}
nav button{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;color:var(--ink-2);text-align:left;padding:11px 12px;border-radius:7px;font-size:13px;transition:background .16s,color .16s}
nav button.active{background:#e0e7da;color:var(--blue-deep);font-weight:600}
nav .nav-icon{font-size:var(--text-lg);width:20px;text-align:center}
nav .count{margin-left:auto;font-size:var(--text-xs);background:var(--surface);padding:2px 6px;border-radius:5px}
.connection{display:flex;align-items:center;gap:7px;color:#456458;font-size:var(--text-xs)}
.connection i{width:7px;height:7px;border-radius:50%;background:var(--muted)}
.connection i.connected{background:#4e9a7b}
.sidebar-bottom label{display:block;margin-bottom:7px}
.sidebar-bottom select{width:100%;padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:6px;color:var(--ink)}
.sidebar-bottom small{display:block;margin-top:8px;font-size:var(--text-xs)}
.shell{margin-left:236px;flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}
.breadcrumb{color:var(--muted)}
.slash{padding:0 15px;color:var(--muted)}
.local-tag{color:var(--muted);font-size:var(--text-xs)}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;border:1px solid var(--line-2);border-radius:var(--radius);padding:9px 14px;font-size:13px;font-weight:550;background:var(--surface);color:var(--ink-2);line-height:1.4;transition:background .16s,border-color .16s,box-shadow .16s,transform .12s}
.button.primary{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 1px 2px #172b2010}
.button.subtle{background:transparent}
.button:hover{background:var(--surface-2);border-color:#adb8a8}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:30px}
h1{font-family:var(--font-editorial);font-size:var(--text-3xl);font-weight:400;line-height:1.15;letter-spacing:-1.1px;margin:0 0 10px}
p{margin:0;line-height:1.6}
.page-heading p{color:var(--muted);font-size:13px;max-width:68ch}
.avatar-stack{display:flex;padding-right:7px}
.avatar{width:33px;height:33px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--person,var(--blue));color:white;font-weight:600;font-size:11px;flex-shrink:0}
.avatar-stack .avatar{border:3px solid var(--bg);margin-right:-7px}
.notice strong{font-weight:600;color:var(--ink-2)}
.grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:25px}
.trajectory{background:var(--blue-tint);border:1px solid var(--blue-soft);border-radius:var(--radius-lg);padding:28px;margin-bottom:25px;position:relative;overflow:hidden}
.trajectory:after{content:none}
.section-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px;gap:10px;min-width:0}
h2{font-size:var(--text-md);font-weight:600;margin:0;letter-spacing:-.2px}
.section-top .meta{color:var(--muted);font-size:var(--text-xs)}
.trajectory h2{color:var(--blue-deep);font-size:var(--text-xs)}
.trajectory h3{font-family:var(--font-editorial);font-size:30px;font-weight:400;letter-spacing:-.6px;max-width:620px;margin:8px 0 12px;color:var(--blue-deep)}
.trajectory p{font-size:var(--text-xs);color:var(--ink-3);max-width:530px}
.text-button{border:0;background:none;color:var(--blue);font-size:12px;font-weight:550;min-height:32px;padding:6px 0;white-space:nowrap}
.trajectory .section-top{margin:0}
.plan-preview{display:flex;gap:7px;margin-top:24px}
.plan-preview span{height:4px;background:var(--blue-soft);flex:1;border-radius:5px}
.plan-preview span.done{background:var(--blue)}
.plan-caption{display:flex;justify-content:space-between;font-size:var(--text-xs);margin-top:9px;color:var(--ink-3)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:24px;margin-bottom:22px;box-shadow:0 2px 4px #20291f03}
.queue-panel{padding:0;overflow:hidden}
.queue-panel>.section-top{padding:20px 21px 0}
.tabs{display:flex;padding:0 21px;border-bottom:1px solid var(--line);gap:22px}
.tabs button{border:0;background:none;font-size:var(--text-xs);padding:0 0 13px;color:var(--muted)}
.tabs button.active{color:var(--blue);border-bottom:2px solid var(--blue)}
.task{display:flex;gap:12px;align-items:center;padding:18px 21px;border-bottom:1px solid var(--line);cursor:pointer}
.task:last-child{border:0}
.task:hover{background:var(--surface-2)}
.task-symbol{width:19px;height:19px;border:1.5px solid var(--line-2);border-radius:50%;color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:var(--text-xs)}
.task-copy{min-width:0;flex:1}
.task-title{font-size:var(--text-xs);font-weight:600;margin-bottom:6px}
.task-meta{font-size:var(--text-xs);color:var(--muted);display:flex;gap:10px}
.pill{display:inline-flex;align-items:center;font-size:11px;padding:4px 8px;border-radius:5px;white-space:nowrap;background:var(--surface-2);color:var(--ink-3);font-weight:500}
.pill.progress{color:var(--blue);background:var(--blue-tint)}
.pill.review{color:#79571f;background:#faf2df}
.pill.done{color:#2f704f;background:#eaf3ec}
.task .avatar{width:25px;height:25px;font-size:var(--text-xs);margin-left:8px}
.knowledge-row{padding:13px 0;border-top:1px solid var(--line);cursor:pointer}
.knowledge-row h3{font-size:var(--text-xs);font-weight:600;margin:0 0 7px}
.knowledge-row p{font-size:var(--text-xs);color:var(--muted);margin:9px 0}
.knowledge-row .byline{font-size:var(--text-xs);color:var(--muted)}
.person .person-body{flex:1}
.person strong{font-size:var(--text-xs);font-weight:600}
.person p{font-size:var(--text-xs);color:var(--muted);margin-top:3px}
.person .offline{width:6px;height:6px;border-radius:50%;background:var(--line-2)}
.panel-caption{font-size:var(--text-xs);color:var(--muted-2);line-height:1.6;margin-top:19px;padding-top:14px;border-top:1px solid var(--line)}
.empty-icon{font-size:var(--text-2xl);color:var(--blue);margin:5px 0 12px}
.empty-state{text-align:center;padding:36px 16px}
.empty-state h3{font-family:var(--font-editorial);font-weight:400;font-size:22px;margin:0 0 10px}
.empty-state p{font-size:var(--text-xs);color:var(--muted);max-width:300px;margin:auto}
.empty-state .button{margin-top:17px}
.request{padding:12px 0;border-bottom:1px solid var(--line);font-size:var(--text-xs)}
.request small{display:block;color:var(--muted);margin-top:6px}
.activity-row{font-size:var(--text-xs);padding:12px 0;border-top:1px solid var(--line);line-height:1.6}
.activity-row small{display:block;color:var(--muted)}
footer{padding:0 40px 24px;color:var(--muted);font-size:11px;display:flex;justify-content:space-between;gap:16px;flex-shrink:0}
.plan-item{display:flex;align-items:center;gap:12px;padding:18px 0;border-top:1px solid var(--line);font-size:var(--text-sm)}
.plan-item input{accent-color:var(--blue);width:17px;height:17px}
.plan-item.completed span{text-decoration:line-through;color:var(--muted)}
.large-empty{padding:70px 30px}
.code{font-family:monospace;font-size:var(--text-xs);color:var(--ink-3);background:var(--surface-2);padding:16px;border-radius:6px;line-height:1.8}
.muted{color:var(--muted);font-size:var(--text-xs)}
dialog{color:var(--ink);background:var(--surface);border:0;border-radius:14px;padding:27px;width:min(540px,calc(100vw - 30px));box-shadow:0 25px 100px #1e342c33}
dialog::backdrop{background:#1e342c55;backdrop-filter:blur(3px)}
.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.modal-head h2{font-size:var(--text-xl)}
.icon-button{border:0;background:transparent;font-size:var(--text-2xl);color:var(--muted)}
.field{display:block;font-size:13px;font-weight:500;margin:18px 0;color:var(--ink-2)}
.field input,.field textarea,.field select{display:block;width:100%;min-width:0;border:1px solid var(--line-2);border-radius:var(--radius);padding:12px;margin-top:8px;color:var(--ink);background:var(--surface);font-weight:400;line-height:1.5}
.field textarea{min-height:110px;resize:vertical}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}
#toast.visible{opacity:1}
.detail-body{font-size:var(--text-sm);line-height:1.8;white-space:pre-wrap}
.detail-label{font-size:var(--text-xs);color:var(--muted);margin:10px 0 15px}
.sidebar{position:fixed;inset:0 auto 0 0;width:236px;background:var(--sidebar);border-right:1px solid var(--line);padding:30px 18px;display:flex;flex-direction:column;overflow-y:auto;z-index:35}
.sidebar-bottom{margin-top:auto;font-size:var(--text-xs);color:var(--muted);padding-top:25px}
.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.profile-card{margin:0}
.profile-name{display:flex;gap:10px;align-items:center}
.profile-card>p{font-size:var(--text-sm)}
.profile-summary{margin:16px 0;line-height:1.8}
.profile-source{font-size:var(--text-xs);line-height:1.8;padding:14px;background:var(--surface-2);border-radius:6px;margin:20px 0;color:var(--ink-3)}
dialog h3{font-size:var(--text-md);margin-top:26px}
dialog h4{font-size:var(--text-xs);color:var(--ink-3);margin:20px 0 7px}
.group-title{font-size:var(--text-xs);color:var(--ink-3);margin:25px 0 10px}
.note-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.person{display:flex;gap:10px;align-items:center;margin-top:19px;cursor:pointer}
.person small{display:block;font-size:var(--text-xs);color:var(--muted-2);margin-top:5px}
.queue-privacy{padding:0 21px 16px;color:var(--muted);font-size:var(--text-xs)}
.profile-card .pill{white-space:normal;text-align:right}
.profile-card .button{margin-top:4px}
#login-screen{position:fixed;inset:0;height:100vh;height:100dvh;background:var(--bg);z-index:100;display:grid;grid-template-columns:minmax(360px,1fr) minmax(420px,1fr);overflow-y:auto}
#login-screen[hidden]{display:none}
.login-card{width:min(390px,100%);background:transparent;padding:0;border-radius:0;box-shadow:none}
.login-brand{color:var(--blue);font-size:var(--text-lg);font-weight:600;margin-bottom:35px}
.login-card h1{font-family:var(--font-editorial);font-size:42px;line-height:1.15;letter-spacing:-1.2px;margin:16px 0}
.login-card>p{font-size:14px;color:var(--ink-3);line-height:1.7}
.login-card .button{width:100%;justify-content:space-between;padding:14px 16px;min-height:48px;font-size:13px;margin-top:6px}
.login-card .login-caption{font-size:12px;line-height:1.8;margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}
.login-card #login-error{font-size:var(--text-xs);color:var(--danger);margin-bottom:12px}
.sidebar-bottom select:disabled{opacity:1;color:var(--ink)}
.project-picker{display:block;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--muted);margin:0 0 16px}
.project-picker[hidden]{display:none}
.project-picker select{display:block;width:100%;padding:11px;margin-top:6px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);color:var(--ink);font-size:13px;font-weight:550}
.admin-actions{display:flex;gap:10px}
.directory-row{display:flex;justify-content:space-between;align-items:center;padding:18px 0;border-top:1px solid var(--line);gap:20px}
.directory-row strong{font-size:var(--text-sm)}
.directory-row p{font-size:var(--text-xs);color:var(--muted);margin-top:5px}
.membership-label{font-size:var(--text-xs);color:var(--muted)}
.membership-label select{display:block;padding:8px 10px;border:1px solid var(--line-2);border-radius:6px;margin-top:5px;color:var(--ink-2);background:var(--surface);min-width:150px}
.request-actions{display:flex;gap:8px;margin-top:8px}
.intro-banner{display:flex;justify-content:space-between;gap:22px;align-items:center;background:var(--surface);border-left:3px solid var(--blue);padding:18px 22px;margin-bottom:24px;border-radius:7px}
.intro-banner h2{font-size:var(--text-sm);margin-bottom:5px}
.intro-banner p{font-size:var(--text-xs);color:var(--muted)}
.intro-banner>div:last-child{flex-shrink:0;display:flex;align-items:center;gap:8px}
#admin-project{max-width:220px;padding:8px;border:1px solid var(--line-2);border-radius:6px;background:var(--surface);color:var(--ink-2);font-size:var(--text-xs)}
.directory-row .text-button{padding-left:0;margin-top:3px}
.topic-row{display:grid;grid-template-columns:minmax(0,1fr) 90px 100px;gap:6px;margin:8px 0}
.topic-row input,.topic-row select{min-width:0;border:1px solid var(--line-2);padding:9px;border-radius:6px;background:var(--surface);font-size:var(--text-xs);color:var(--ink-2)}
.request .muted{margin-top:8px;font-size:var(--text-xs)}
/* Personal inbox and participant-owned interview */
.inbox-bell{display:inline-flex;align-items:center;gap:8px}
.inbox-bell[hidden]{display:none}
#inbox-count{background:var(--blue);color:white;min-width:19px;border-radius:20px;padding:2px 5px;font-size:var(--text-xs)}
.inbox-item{display:block;width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);text-align:left;padding:19px;margin:12px 0;color:var(--ink)}
.inbox-item.unread{border-left:3px solid var(--blue);background:var(--surface-2)}
.inbox-item strong{font-size:var(--text-md);display:block;margin-bottom:7px}
.inbox-item p{font-size:var(--text-xs);line-height:1.6;color:var(--ink-3)}
.inbox-item small{display:block;margin-top:12px;color:var(--blue)}
.interview-dialog{width:min(880px,calc(100vw - 28px));max-width:880px;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:15px;color:var(--ink);background:var(--surface-2)}
.interview-dialog::backdrop{background:#1e342c88;backdrop-filter:blur(3px)}
.interview-shell{display:flex;flex-direction:column;max-height:calc(100dvh - 36px)}
.interview-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 28px;border-bottom:1px solid var(--line);background:var(--surface)}
.interview-head h2{font-size:var(--text-xl);letter-spacing:-.5px}
.interview-head p{font-size:var(--text-xs);color:var(--ink-3);margin-top:5px}
.interview-scroll{padding:24px 28px;overflow:auto;min-height:140px}
.interview-context{font-size:var(--text-xs);color:var(--ink-2);line-height:1.7;margin-bottom:24px;max-width:65ch}
.interview-message{margin:0 0 23px;max-width:66ch;white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--text-md);line-height:1.75}
.interview-message .speaker{display:block;font-size:var(--text-xs);font-weight:600;letter-spacing:.15px;color:var(--ink-3);margin-bottom:6px}
.interview-message.user{margin-left:35px;background:var(--blue-tint);border-radius:10px;padding:15px 18px}
.interview-message.assistant{padding:0 10px 0 0}
.interview-compose{padding:18px 28px 22px;background:var(--surface);border-top:1px solid var(--line)}
.interview-compose label{display:block;font-size:var(--text-xs);font-weight:600;margin-bottom:9px}
.interview-compose textarea{display:block;width:100%;resize:vertical;min-height:94px;max-height:230px;border:1px solid var(--line-2);border-radius:8px;padding:12px;font-size:var(--text-md);line-height:1.6;color:var(--ink);background:var(--surface)}
.interview-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-top:12px;flex-wrap:wrap}
.interview-actions>div{display:flex;gap:8px;align-items:center}
.interview-help{color:var(--ink-3);font-size:var(--text-xs);margin-top:10px;line-height:1.6}
.interview-error{color:var(--danger);font-size:var(--text-xs);line-height:1.6}
.interview-status{font-size:var(--text-xs);color:#456458;min-height:18px}
.interview-review{background:var(--surface);padding:22px;border:1px solid var(--line);border-radius:12px}
.interview-review h3{margin:0 0 10px;font-size:var(--text-lg);letter-spacing:-.3px}
.interview-review .field{margin-top:18px}
.interview-review textarea{font-size:var(--text-sm);line-height:1.6;min-height:84px}
.interview-review .review-caption{font-size:var(--text-xs);line-height:1.7;color:var(--ink-3)}
.interview-finished{padding:25px 0}
.interview-finished h3{font-size:var(--text-2xl);margin:0 0 12px}
.interview-finished p{font-size:var(--text-md);line-height:1.8;max-width:58ch}
.interview-voice[aria-pressed=true]{border-color:var(--danger);color:var(--danger)}
.interview-dialog button:disabled{opacity:.55;cursor:wait}
.interview-history{font-size:var(--text-xs);color:var(--ink-2);margin-bottom:22px}
.interview-history summary{cursor:pointer;padding:10px 0}
.interview-history[open] summary{margin-bottom:15px}
.interview-history .interview-message{color:var(--ink)}
.round-progress{display:flex;align-items:center;gap:12px;padding:12px 0 20px;color:var(--ink-3);font-size:var(--text-xs);flex-wrap:wrap}
.round-progress strong{color:var(--blue);font-weight:600}
.round-dots{display:flex;gap:5px;margin-left:auto}
.round-dots i{height:5px;width:28px;background:var(--line-2);border-radius:5px}
.round-dots i.done{background:var(--blue)}
.round-summary{background:var(--blue-tint);border:1px solid var(--blue-soft);border-radius:10px;padding:20px;margin:20px 0}
.round-summary h3{font-size:var(--text-md);margin:0 0 10px}
.round-summary p{font-size:var(--text-sm);line-height:1.8;white-space:pre-wrap}
.connection-member{display:flex;gap:15px;align-items:center;flex-wrap:wrap;padding:18px 0;border-bottom:1px solid var(--line);font-size:var(--text-xs)}
.connection-member strong{min-width:85px}
.connection-member span{font-size:var(--text-xs);color:var(--ink-2)}
a.button{display:inline-flex;align-items:center;justify-content:center;line-height:1.4}
.panel>a.button{margin:12px 0 8px}
.panel>a.text-button{display:inline-block}
.specification-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:22px}
.specification-card{display:block;padding:24px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);text-decoration:none;color:var(--ink)}
.specification-card:hover{border-color:var(--blue);background:var(--blue-tint)}
.specification-card small{color:var(--muted);font-size:var(--text-xs)}
.specification-card h3{font-family:var(--font-editorial);font-size:24px;font-weight:400;line-height:1.25;margin:14px 0 10px}
.specification-card p{font-size:var(--text-md);line-height:1.7;color:var(--muted);margin:10px 0 18px}
.specification-card strong{font-size:var(--text-sm);color:var(--blue)}
.knowledge-detail-heading{margin-bottom:25px}
.knowledge-detail-heading h1{font-size:var(--text-3xl);line-height:1.25;margin:20px 0 14px}
.knowledge-workspace{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(290px,1fr);gap:24px;align-items:start}
.knowledge-full-body{white-space:pre-wrap;font-size:var(--text-md);line-height:1.85;margin:24px 0 32px;overflow-wrap:anywhere}
.knowledge-workspace h3{margin:25px 0 12px}
.knowledge-workspace p,.knowledge-workspace li{line-height:1.75}
.knowledge-workspace aside .panel{margin-bottom:22px}
.knowledge-document{display:block;color:var(--blue);text-decoration:underline;margin-bottom:5px}
.knowledge-workspace small{display:block}
.knowledge-workspace ul{padding-left:20px;margin:16px 0 24px}
.research-task{display:block;width:100%;text-align:left;padding:15px;margin:12px 0;border:1px solid var(--line);border-radius:8px;background:var(--surface-2)}
.research-task span{display:block;font-size:var(--text-xs);color:var(--muted);margin-top:8px}
.chat-room{max-width:980px;color:var(--ink)}
.chat-messages{display:grid;gap:18px;margin:24px 0}
.chat-message{padding:20px;border:1px solid var(--line-2);border-radius:12px;overflow-wrap:anywhere}
.chat-assistant{background:var(--surface-2)}
.chat-byline{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.chat-byline span,.chat-sources small{font-size:var(--text-xs);color:var(--ink-3)}
.chat-text{white-space:pre-wrap;line-height:1.65}
.chat-sources{margin-top:16px}
.chat-sources small{display:block}
.chat-sources blockquote{margin:12px 0;padding-left:16px;border-left:2px solid #b6c1ac;white-space:pre-wrap;font-size:var(--text-sm)}
.chat-sources>div{margin-top:18px}
#chat-draft{width:100%;resize:vertical}
/* Common room: conversation and grounded member attention. */
.room-heading{display:flex;align-items:center;justify-content:space-between;gap:28px;margin:0 0 24px}
.room-heading h1{font-size:46px;letter-spacing:-1.5px;margin:8px 0 10px}
.room-heading p{max-width:70ch;font-size:14px;line-height:1.65;color:var(--ink-3)}
.room-actions{display:flex;gap:8px;flex-shrink:0}
.common-dashboard{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:24px;align-items:start}
.room-conversation{min-width:0}
.room-conversation .chat-room{margin:0;padding:24px;max-width:none;border-radius:var(--radius-lg);border-color:var(--line)}
.room-conversation .chat-room>.panel-caption{margin:0 0 12px;padding:0;border:0;font-size:var(--text-xs);color:var(--ink-3)}
.room-chat-heading{margin-bottom:8px}
.room-chat-heading h2{font-size:16px}
.room-conversation .chat-message{padding:16px;border-radius:8px;font-size:var(--text-sm)}
.room-conversation .chat-assistant{background:var(--blue-tint);border-color:var(--blue-soft)}
.room-conversation .chat-byline span{font-size:var(--text-xs)}
.room-conversation .chat-text{line-height:1.7}
.room-conversation #chat-compose{border-top:1px solid var(--line);padding-top:0}
.room-conversation #chat-compose .panel-caption{border:0;padding:0;margin:0}
.room-conversation #chat-draft{min-height:86px;background:var(--bg)}
.room-ledger{background:var(--surface);padding:24px;border:1px solid var(--line);border-radius:var(--radius-lg)}
.room-ledger .section-top{margin-bottom:8px;flex-wrap:wrap;gap:2px 12px}
.room-ledger h2{font-size:16px}
.ledger-caption{font-size:12px;color:var(--ink-3);line-height:1.7;margin-bottom:10px}
.member-ledger{border-bottom:1px solid var(--line);padding:16px 0}
.member-ledger summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:12px;border-radius:6px;min-height:44px}
.member-ledger summary::-webkit-details-marker{display:none}
.member-ledger summary>span:nth-child(2){flex:1;min-width:0}
.member-ledger summary strong{font-size:var(--text-sm);display:block}
.member-ledger summary strong small{display:inline-block;color:var(--blue);background:var(--blue-tint);font-size:10px;line-height:1.5;font-weight:500;border-radius:4px;padding:1px 5px;margin-left:6px;vertical-align:middle}
.member-ledger summary span span{font-size:var(--text-xs);color:var(--ink-3);display:block;margin-top:4px}
.ledger-expand{color:var(--ink-3);width:16px;height:16px;flex-shrink:0;transition:transform .16s}
.member-ledger[open] .ledger-expand{transform:rotate(180deg)}
.member-ledger-items{padding:12px 0 0 45px}
.attention-record{display:block;width:100%;border:0;border-left:2px solid var(--blue-soft);padding:8px 10px;background:none;color:var(--ink);text-align:left;margin:0 0 12px;overflow-wrap:anywhere;border-radius:0 6px 6px 0}
.attention-record:hover{background:var(--blue-tint)}
.attention-record strong{display:block;font-size:var(--text-xs);line-height:1.55;margin:4px 0}
.attention-record>span:not(.attention-state),.attention-record small{display:block;font-size:var(--text-xs);color:var(--ink-3);line-height:1.6}
.attention-state{color:var(--blue);font-size:var(--text-xs)}
.attention-state.blocked{color:#966621}
.attention-record small{font-size:var(--text-xs);margin-top:5px}
.room-knowledge{margin-top:32px;border-top:0;padding-top:0}
.recent-knowledge{display:flex;flex-direction:column;gap:12px;min-width:0;width:100%;text-align:left;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);padding:20px;color:var(--ink);transition:border-color .16s,background .16s}
.recent-knowledge strong{font-size:15px;font-weight:550;line-height:1.5;overflow-wrap:anywhere}
.knowledge-change-line{display:flex;gap:6px 12px;flex-wrap:wrap;font-size:var(--text-xs);color:var(--ink-3);margin:8px 0}
.knowledge-detail-heading .section-top{align-items:flex-start}
.knowledge-workspace [data-knowledge-interview]{display:block;margin-top:10px}
.knowledge-library>.section-top h2{font-size:var(--text-lg)}
#modal.knowledge-editor{width:min(780px,calc(100vw - 30px))}
#modal.knowledge-editor textarea[name=body]{min-height:260px}
.profile-edit-shortcut{display:block;margin:8px 0;color:var(--blue);font-size:var(--text-xs);padding:6px 0;text-align:left}
.project-actions .text-button{padding:5px 0;font-size:11px}
.sidebar .project{margin-top:28px;margin-bottom:18px}
.sidebar-bottom p{line-height:1.8;margin:10px 0 23px;margin-bottom:10px}
.repository-intro{max-width:80ch;color:var(--ink-3);font-size:var(--text-sm);margin-bottom:24px}
.repository-group{margin:28px 0}
.repository-group>h2{font-size:var(--text-lg);margin-bottom:14px}
.repository-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.repository-card{background:var(--surface);border:1px solid var(--line);padding:24px;border-radius:var(--radius-lg);min-width:0}
.repository-card h3{font-size:var(--text-lg);margin:0}
.repository-card p{font-size:var(--text-xs);line-height:1.7}
.repository-url{display:block;color:var(--blue);overflow-wrap:anywhere;font-size:var(--text-xs);margin:12px 0}
.repository-card .repository-meta{color:var(--ink-3);font-size:var(--text-xs);margin-top:7px}
.repository-actions{margin-top:12px;display:flex;gap:12px}
.item-interview-requests{margin:18px 0}
.item-interview-request{padding:14px;border:1px solid var(--line-2);border-radius:8px;margin:10px 0}
.item-interview-request.selected{border-color:var(--blue)}
.item-interview-request strong,.item-interview-request small{display:block}
.item-interview-request small{color:var(--ink-3);font-size:var(--text-xs);margin:6px 0}
.item-interview-request p{margin:8px 0;font-size:var(--text-xs)}
.work-rollup{display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between;margin-bottom:12px;font-size:var(--text-sm)}
.work-rollup span{color:var(--ink-3)}
.work-tree{margin:20px 0}
.work-branch .work-branch{margin-left:20px;border-left:2px solid var(--line-2);padding-left:8px}
.work-tree-row{display:flex;align-items:center;gap:15px;background:none;border:0;border-top:1px solid var(--line);width:100%;text-align:left;padding:15px 3px;color:var(--ink)}
.work-tree-row>span:nth-child(2){flex:1;min-width:0}
.work-tree-row strong{display:block;font-size:var(--text-sm);overflow-wrap:anywhere}
.work-tree-row small{display:block;margin-top:5px;color:var(--ink-3);font-size:var(--text-xs)}
.work-limits{font-size:var(--text-xs);color:var(--ink-3)}
.work-limits p{margin-top:8px}
.task-dependencies{border:1px solid var(--line-2);border-radius:6px;padding:12px}
.task-dependencies label{display:block;font-size:var(--text-xs);margin:8px 0}
.task-dependencies input{width:auto}
.task-dependencies legend{font-size:var(--text-xs);color:var(--ink-2)}
.chat-context{font-size:var(--text-xs);color:var(--ink-3);line-height:1.65}
.chat-context summary{cursor:pointer}
.chat-context p{margin:10px 0;max-width:80ch}
.room-conversation .chat-messages{overflow-y:auto;overscroll-behavior:contain;padding-right:4px;margin:16px 0;align-content:start;min-height:140px;max-height:min(420px,48vh)}
.sidebar nav button{padding-top:8px;padding-bottom:8px}
.sidebar nav{gap:1px}
.project-actions{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:4px;margin-bottom:14px}
.header-right{display:flex;align-items:center;gap:10px}
.attention-record>span:not(.attention-state){display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.interface-update .button{flex-shrink:0}
/* Keep long editors navigable and task evidence readable. */
#modal{max-height:calc(100dvh - 32px);overflow:hidden;padding:0}
#modal-form{display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}
#modal .modal-head{flex-shrink:0;padding:20px 24px;margin:0;border-bottom:1px solid var(--line)}
#modal-content{overflow-y:auto;overscroll-behavior:contain;padding:4px 24px 20px;min-height:0}
#modal .modal-actions{flex-shrink:0;margin:0;padding:14px 24px;border-top:1px solid var(--line);background:var(--surface)}
#modal-content .text-button{white-space:normal;text-align:left;overflow-wrap:anywhere}
.evidence-link{text-decoration:underline;display:inline-block}
.work-state{font-size:var(--text-xs);color:var(--blue);min-width:65px;max-width:90px;flex-shrink:0}
.field,.task-dependencies legend{color:var(--ink-2)}
#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--accent-hover);color:white;padding:12px 20px;border-radius:8px;font-size:var(--text-xs);opacity:0;pointer-events:none;transition:opacity .15s;max-width:calc(100vw - 32px);width:max-content;line-height:1.6;z-index:50}
/* ---------- Sticky header: keeps breadcrumb, inbox and share reachable on long pages ---------- */
header{height:65px;background:var(--bg);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 40px;font-size:12px;position:sticky;top:0;z-index:30;flex-shrink:0}
.interface-update{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 24px;background:var(--blue-tint);border-bottom:1px solid var(--blue-soft);color:var(--blue-deep);font-size:var(--text-xs);position:sticky;top:0;z-index:31}
main{width:100%;max-width:1480px;margin:0 auto;padding:36px 40px 48px;scroll-margin-top:80px;min-width:0;flex:1}
/* ---------- Grouped navigation ---------- */
.nav-group+.nav-group{margin-top:16px}
.nav-group-label{font-size:10px;font-weight:650;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0 0 8px;padding:0 12px}
nav button .nav-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.nav-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;color:currentColor}
.nav-icon svg{width:18px;height:18px}
nav button.active .nav-icon{color:var(--blue)}
/* ---------- Search palette ---------- */
.palette-open{display:flex;align-items:center;gap:9px;width:100%;padding:10px 11px;margin:0 0 22px;border:1px solid var(--line-2);border-radius:var(--radius);background:transparent;color:var(--ink-3);font-size:12px;text-align:left}
.palette-open:hover{border-color:var(--blue-soft);background:var(--blue-tint);color:var(--ink-2)}
.palette-open svg{width:15px;height:15px;flex-shrink:0}
.palette-open span{flex:1}
.palette-open kbd{font:inherit;font-size:var(--text-xs);color:var(--muted-2);border:1px solid var(--line-2);border-radius:5px;padding:1px 5px;background:var(--surface)}
#palette{width:min(600px,calc(100vw - 32px));max-height:min(70vh,560px);padding:0;border:0;border-radius:var(--radius-lg);box-shadow:0 24px 70px #1e342c26;background:var(--surface);color:var(--ink);overflow:hidden;display:flex;flex-direction:column}
#palette::backdrop{background:#1e342c26}
#palette:not([open]){display:none}
.palette-field{display:flex;align-items:center;gap:11px;padding:16px 20px;border-bottom:1px solid var(--line);flex-shrink:0}
.palette-field svg{width:18px;height:18px;color:var(--muted);flex-shrink:0}
#palette-input{flex:1;border:0;outline:0;background:none;font-size:var(--text-lg);color:var(--ink);min-width:0}
#palette-input::placeholder{color:var(--muted-2)}
#palette-results{overflow-y:auto;overscroll-behavior:contain;padding:8px;min-height:0}
.palette-result{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:baseline;gap:4px 12px;width:100%;border:0;background:none;text-align:left;padding:10px 12px;border-radius:var(--radius);color:var(--ink)}
.palette-result.selected{background:var(--blue-tint)}
.palette-kind{grid-row:span 2;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.palette-label{font-size:var(--text-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.palette-hint{font-size:var(--text-xs);color:var(--ink-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.palette-empty{padding:26px 20px;color:var(--ink-3);font-size:var(--text-sm);margin:0}
.palette-foot{margin:0;padding:11px 20px;border-top:1px solid var(--line);color:var(--muted-2);font-size:var(--text-xs);flex-shrink:0}
/* ---------- Single account entry point, replacing the header/sidebar/panel duplicates ---------- */
#account-button{display:flex;align-items:center;gap:10px;width:100%;margin-top:12px;padding:9px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);text-align:left;color:var(--ink)}
#account-button:hover{border-color:var(--blue-soft);background:var(--blue-tint)}
.account-text{flex:1;min-width:0;display:flex;flex-direction:column}
.account-text strong{font-size:var(--text-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-caret{color:var(--muted-2);flex-shrink:0}
.sidebar-identity[hidden]{display:none}
/* ---------- Dismissible standing notices ---------- */
.notice{display:flex;gap:10px;align-items:center;background:var(--surface-2);color:var(--ink-3);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;font-size:12px;margin-bottom:24px;position:relative}
.notice-dismiss{flex-shrink:0;border:0;background:none;color:var(--muted);font-size:var(--text-lg);line-height:1;padding:0 2px;margin-left:auto;align-self:flex-start}
.notice-dismiss:hover{color:var(--ink-2)}
.account-text small{font-size:11px;color:var(--ink-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
/* The project picker already names the selected project; drop the duplicate title block. */
.sidebar .project.has-picker{display:none}
/* ---------- Knowledge filter: narrow the library and the shared notes together ---------- */
.knowledge-filter{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0 0 22px}
.knowledge-search{display:flex;align-items:center;gap:9px;flex:1 1 260px;min-width:0;padding:9px 13px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface)}
.knowledge-search:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-tint)}
.knowledge-search svg{width:16px;height:16px;color:var(--muted);flex-shrink:0}
#knowledge-filter-input{flex:1;min-width:0;border:0;outline:0;background:none;font-size:var(--text-sm);color:var(--ink)}
#knowledge-filter-input::placeholder{color:var(--muted-2)}
.knowledge-facets{display:flex;flex-wrap:wrap;gap:6px}
.knowledge-facets .chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line-2);background:var(--surface);color:var(--ink-2);border-radius:999px;padding:7px 13px;font-size:var(--text-xs)}
.knowledge-facets .chip:hover{border-color:var(--blue-soft);background:var(--blue-tint)}
.knowledge-facets .chip span{color:var(--muted);font-variant-numeric:tabular-nums}
.knowledge-facets .chip.active{border-color:var(--blue);background:var(--blue);color:var(--surface)}
.knowledge-facets .chip.active span{color:var(--blue-soft)}
.knowledge-count{flex-basis:100%;margin:0;font-size:var(--text-xs);color:var(--ink-3)}
.knowledge-count .text-button{font-size:var(--text-xs);padding:0 0 0 4px}
.knowledge-library>h2{margin-bottom:6px}


/* Astra: shared orientation, conversation and a warmer editorial identity. */
.eyebrow{display:block;font-size:10px;font-weight:650;letter-spacing:.12em;line-height:1.6;color:var(--ink-3)}
.skip-link{position:fixed;left:16px;top:-80px;background:var(--blue);color:white;padding:12px 18px;border-radius:8px;z-index:150}
.skip-link:focus{top:16px}
nav button:hover{background:#e8eae1;color:var(--blue-deep)}
.button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.button:disabled,.text-button:disabled{cursor:not-allowed;opacity:.5}
.text-button:hover{text-decoration:underline;text-underline-offset:4px}
input::placeholder,textarea::placeholder{color:var(--muted)}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--blue)}
.section-top h2{overflow-wrap:anywhere}
.direction-banner{display:flex;align-items:center;gap:22px;padding:20px 24px;background:#eaf0e5;border:1px solid #dce4d5;border-radius:12px;margin-bottom:20px}
.direction-banner>div{flex:1;min-width:0}
.direction-banner .eyebrow{color:#596f52;font-size:9px;letter-spacing:.13em}
.direction-banner h2{font-family:var(--font-editorial);font-size:25px;font-weight:400;line-height:1.3;letter-spacing:-.4px;color:#304b32;margin:6px 0;overflow-wrap:anywhere}
.direction-banner p{font-size:12px;color:#586a52;line-height:1.65;overflow-wrap:anywhere}
.direction-symbol{font-size:48px;line-height:1;color:#6b8660;flex-shrink:0}
.direction-banner .text-button{font-size:11px;margin-left:16px}
.room-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-bottom:24px;padding:16px 8px}
.overview-item{display:flex;gap:15px;min-width:0;text-align:left;background:none;border:0;padding:6px 16px;color:var(--ink);border-right:1px solid var(--line);transition:background .16s;outline-offset:-4px}
.overview-item:last-child{border-right:0}
.overview-item:hover .overview-arrow{color:var(--blue);transform:translateX(3px)}
.overview-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:9px;background:var(--blue-tint);color:var(--blue);flex-shrink:0;margin-top:3px}
.overview-item.attention .overview-icon{background:#f5ecdf;color:#99673b}
.overview-item.knowledge .overview-icon{background:#eeedf5;color:#77718f}
.overview-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.overview-copy>span{font-size:12px;font-weight:500;color:var(--ink-2)}
.overview-copy strong{display:flex;align-items:center;justify-content:space-between;font-size:27px;font-weight:500;line-height:1.25;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.overview-copy small{font-size:12px;color:var(--ink-3);line-height:1.5}
.overview-arrow{font-size:17px;letter-spacing:0;color:var(--muted);transition:transform .16s}
.chat-welcome{text-align:center;padding:16px 12px 20px;align-self:center}
.chat-welcome-symbol{display:inline-grid;place-items:center;height:50px;width:50px;background:var(--blue-tint);border-radius:16px;color:#728367;font-size:34px;margin-bottom:14px}
.chat-welcome h3{font-family:var(--font-editorial);font-size:25px;line-height:1.3;letter-spacing:-.5px;font-weight:400;margin:0 0 10px}
.chat-welcome p{font-size:13px;line-height:1.75;color:var(--muted)}
.chat-room #chat-status{font-size:12px;line-height:1.65;margin-bottom:14px}
.chat-room #chat-compose .field{font-size:12px;margin-top:16px}
.member-ledger:last-child{border-bottom:0;padding-bottom:0}
.member-ledger summary:focus-visible,.chat-context summary:focus-visible,.chat-sources summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.member-ledger summary:hover strong{color:var(--blue)}
.member-ledger .avatar{width:32px;height:32px}
.room-knowledge h2{font-family:var(--font-editorial);font-size:27px;font-weight:400;margin-top:6px;letter-spacing:-.5px}
.recent-knowledge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.recent-knowledge:hover{border-color:#afbda6;background:var(--surface-2)}
.note-type{display:flex;align-items:center;gap:8px;color:var(--ink-3);font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.note-type .nav-icon{width:16px;height:16px}
.note-read{display:flex;justify-content:space-between;font-size:11px;color:var(--blue);margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}
.knowledge-welcome{display:flex;align-items:center;gap:20px;border:1px dashed #cdd4c5;border-radius:12px;padding:26px;background:var(--surface)}
.knowledge-welcome>div{flex:1;min-width:0}
.knowledge-welcome h3{font-family:var(--font-editorial);font-size:22px;line-height:1.3;font-weight:400;margin:0 0 6px}
.knowledge-welcome p{font-size:12px;color:var(--muted)}
.notebook-symbol{width:44px;height:50px;display:grid;place-items:center;background:#f1ede4;color:#8c7651;border-radius:7px;flex-shrink:0}
.work-tree-row:hover{background:var(--surface-2)}
.profile-card .profile-name .avatar{width:40px;height:40px;font-size:13px}
.profile-card .section-top{align-items:flex-start;flex-wrap:wrap}
.profile-card .button{margin-right:6px}
.login-story{position:relative;display:flex;flex-direction:column;min-height:740px;overflow:hidden;padding:48px 54px 32px;background:#e7edde;color:#2c4230}
.login-wordmark{display:flex;align-items:center;gap:10px;font-size:26px;letter-spacing:-.8px;font-weight:650;position:relative;z-index:1}
.brand-mark{font-size:38px;font-weight:400;line-height:1;color:#496242}
.login-wordmark>span:last-child{font-size:10px;font-weight:450;letter-spacing:.02em;margin:7px 0 0 6px;color:#607159}
.login-story-copy{margin-top:70px;position:relative;z-index:1}
.login-story-copy .eyebrow{color:#607159;font-size:9px;letter-spacing:.14em}
.login-story-copy h2{font-family:var(--font-editorial);font-size:clamp(46px,4.6vw,68px);font-weight:400;line-height:1.02;letter-spacing:-2.5px;margin:24px 0}
.login-story-copy em{font-weight:400;color:#617950}
.login-story-copy p{font-size:13px;color:#5e6d56;line-height:1.8}
.login-story-footer{font-size:11px;color:#617159;position:relative;margin-top:auto;padding-top:20px}
.alignment-art{height:230px;position:relative;margin:28px 0 16px;max-width:430px;flex-shrink:0}
.alignment-orbit{position:absolute;border:1px solid #a7b89a;border-radius:50%;width:165px;height:165px;top:10px}
.orbit-one{left:calc(50% - 125px)}
.orbit-two{left:calc(50% - 40px)}
.orbit-three{left:calc(50% - 82px);top:57px}
.orbit-center{position:absolute;left:calc(50% - 16px);top:83px;font-size:36px;color:#5b724b;line-height:1}
.orbit-dot{position:absolute;width:11px;height:11px;border-radius:50%;background:#9c704c}
.dot-one{left:calc(50% - 111px);top:37px}
.dot-two{left:calc(50% + 109px);top:127px;background:#809e6b}
.art-label{display:none}
.login-entry{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 48px 32px;position:relative;min-height:740px;background:var(--bg)}
.login-card form{margin-top:32px}
.login-card input{min-height:48px;font-size:14px;background:var(--surface)}
.login-entry-footer{font-size:11px;color:var(--muted);margin-top:64px}

/* Final interaction details share the same restrained visual language. */
.overview-item:hover{background:var(--surface-2)}
.overview-item:focus-visible{outline-offset:-4px;border-radius:6px}
.button:not(:disabled):active{transform:translateY(1px)}
.pill.blocked{color:#934936;background:#f8ebe4}
.member-profile-link{font-size:12px;margin-top:3px}
.ledger-expand svg{width:16px;height:16px;display:block}
.login-mobile-brand{display:none}
body:has(#login-screen:not([hidden])) .skip-link{display:none}
body:has(#login-screen:not([hidden])){overflow:hidden}
dialog summary{cursor:pointer}
dialog summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}

@media(prefers-reduced-motion:reduce){
*{transition:none!important;scroll-behavior:auto!important}
}
/* ---------- Keep the whole sidebar usable at short viewport heights ----------
   The nav list scrolls; brand, search and the account chip stay pinned. */
/* Desktop shell: fixed sidebar with its own scrolling nav region. */
@media(min-width:651px){
.sidebar{overflow:hidden}
.sidebar>nav{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0 -6px;padding:0 6px 4px;align-content:start}
.sidebar-bottom{margin-top:auto;flex-shrink:0;padding-top:16px;border-top:1px solid var(--line)}
.sidebar-bottom p{margin-bottom:10px}
.sidebar .project.has-picker+.project-picker{margin-top:26px}
.nav-group+.nav-group{margin-top:12px}
}
/* Wide desktop. */
@media(min-width:1200px){
.common-dashboard{grid-template-columns:minmax(0,1.85fr) minmax(300px,1fr)}
}
/* Very wide desktop. */
@media(min-width:1500px){
main{padding-top:42px}
.trajectory{padding:32px}
.trajectory h3{font-size:var(--text-3xl)}
.task{padding-top:22px;padding-bottom:22px}
}
/* Narrow desktop: tighter sidebar and page gutters. */
@media(max-width:1150px){

.overview-item{padding:4px 18px;gap:10px}
.overview-icon{width:30px;height:30px}
.overview-copy small{font-size:11px}
.direction-banner{padding:22px;gap:16px}
.direction-banner .text-button{margin-left:0}
.login-story{padding-left:36px;padding-right:36px}

.sidebar{width:205px;padding:25px 16px}
.shell{margin-left:205px}
main{padding:27px 25px}
.grid{grid-template-columns:minmax(0,1fr) 265px;gap:18px}
header{padding:0 25px}
.task{padding:16px 14px}
.task .avatar{display:none}
}
/* Small laptop: stack the common-room columns. */
@media(max-width:1050px){

.room-overview{margin-bottom:24px}
.room-ledger{padding:24px}
.recent-knowledge-grid{grid-template-columns:1fr}
.room-actions{align-self:flex-start}

.common-dashboard{grid-template-columns:minmax(0,1fr)}
.room-heading{flex-direction:column;gap:14px}
.room-ledger{padding-top:24px}
.member-ledger-items{padding-left:0}
.room-conversation .chat-messages{max-height:360px}
.room-heading h1{font-size:var(--text-3xl)}
}
/* Tablet landscape. */
@media(max-width:900px){
.grid{grid-template-columns:1fr}
.right-rail{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.sidebar{width:185px}
.shell{margin-left:185px}
.local-tag{display:none}
.task .avatar{display:inline-flex}
.intro-banner{display:block}
.intro-banner>div:last-child{margin-top:14px}
.repository-grid{grid-template-columns:1fr}
}
/* Tablet. */
@media(max-width:850px){

#login-screen{grid-template-columns:1fr}
.login-story{display:none}
.login-entry{min-height:100dvh;padding:32px 28px;justify-content:center}
.login-mobile-brand{display:flex;align-items:center;gap:8px;width:min(390px,100%);margin-bottom:40px;font-size:23px;font-weight:650;letter-spacing:-.7px;color:var(--blue-deep)}
.login-mobile-brand>span{font-size:32px;line-height:1}
.login-mobile-brand small{font-size:10px;font-weight:450;letter-spacing:0;color:var(--muted);margin-left:auto}
.login-entry-footer{margin-top:48px}
.direction-banner{flex-wrap:wrap}
.direction-banner .text-button{margin-left:64px}
.overview-icon{display:none}

.profile-grid{grid-template-columns:1fr}
.knowledge-workspace{grid-template-columns:1fr}
.knowledge-detail-heading h1{font-size:var(--text-2xl)}
}
/* Small tablet. */
@media(max-width:700px){
.specification-grid{grid-template-columns:1fr}
}
/* ---------- Mobile sidebar bar: brand, project, account, search, section scroller ----------
   The account chip must stay reachable here; it is the only route to profile and sign-out. */
/* Phone: the sidebar becomes a top bar with a horizontal section scroller. */
@media(max-width:650px){
.field input,.field textarea,.field select,.interview-compose textarea,.login-card input{font-size:16px}
#knowledge-filter-input,#palette-input{font-size:16px}


.room-overview{padding:12px 0;gap:0}
.overview-item{padding:4px 12px}
.overview-copy>span{font-size:11px;line-height:1.4;min-height:31px}
.overview-copy strong{font-size:24px}
.overview-copy small{display:none}
.overview-arrow{font-size:14px}
.direction-banner{display:grid;grid-template-columns:32px minmax(0,1fr);padding:18px;gap:10px 14px}
.direction-banner h2{font-size:22px}
.direction-banner .text-button{grid-column:2;justify-self:start;margin:0}
.direction-symbol{font-size:32px}
.direction-banner p{font-size:11px}
.knowledge-welcome{display:grid;grid-template-columns:44px minmax(0,1fr);padding:22px;gap:14px}
.knowledge-welcome .button{grid-column:2;justify-self:start;margin:0}
.room-knowledge h2{font-size:25px}
.room-ledger{padding:20px}
.room-chat-heading{flex-wrap:wrap;gap:2px 12px}
.room-chat-heading .text-button{font-size:11px}
.chat-welcome h3{font-size:22px}
.chat-welcome{padding:16px 4px}
.login-card h1{font-size:38px}
.login-card .eyebrow{font-size:9px}
.brand .logo{font-size:28px;top:-2px}
.sidebar .brand{padding-left:29px}
.button{min-height:42px}
nav button{min-height:42px}
.room-heading .eyebrow{font-size:9px}
.room-actions{width:100%;gap:8px}
.room-actions .button{flex:1}
.section-top{flex-wrap:wrap}

.brand{font-size:var(--text-xl)}
.brand-sub{display:none}
.project,.sidebar-bottom{display:none}
nav{display:flex;overflow:auto;margin-top:20px;gap:3px}
nav button{white-space:nowrap;font-size:var(--text-xs);padding:9px}
nav .nav-icon,nav .count{display:none}
.shell{margin:0}
header{height:55px;padding:0 18px}
.page-heading h1{font-size:var(--text-2xl)}
.page-heading p{max-width:240px}
.trajectory{padding:22px}
.trajectory h3{font-size:var(--text-2xl)}
.right-rail{display:block}
.notice{font-size:var(--text-xs);align-items:flex-start}
.task .avatar{display:none}
.task-title{font-size:var(--text-xs)}
footer{padding:0 18px 20px;gap:20px}
.sidebar-bottom{display:block;padding-top:14px}
.sidebar-bottom .connection,.sidebar-bottom p,.sidebar-bottom small{display:none}
.sidebar-bottom label{display:inline;margin-right:10px}
.sidebar-bottom select{display:inline;width:140px}
.avatar-stack{display:none}
.project-picker{margin:12px 0 0}
.admin-actions{flex-direction:column}
.directory-row{gap:8px}
.membership-label select{min-width:120px}
.page-heading{gap:15px}
.profile-card{padding:17px}
.inbox-bell{padding:9px}
.inbox-bell>span:first-of-type{display:none}
.interview-head{padding:18px}
.interview-head h2{font-size:var(--text-lg)}
.interview-scroll{padding:20px 18px}
.interview-compose{padding:15px 18px}
.interview-message.user{margin-left:12px}
.interview-actions{align-items:stretch}
.interview-actions>div{flex-wrap:wrap}
.interview-dialog{max-height:calc(100dvh - 16px)}
.interview-shell{max-height:calc(100dvh - 20px)}
.sidebar .project-picker select{font-size:var(--text-xs);padding:8px;margin-top:3px}
.header-right{flex-shrink:0;gap:5px}
.header-right .button{white-space:nowrap;padding:7px 9px;font-size:var(--text-xs)}
header .breadcrumb{max-width:35%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
header .slash,header #page-label{display:none}
.room-heading h1{font-size:var(--text-3xl)}
.room-conversation .chat-messages{max-height:240px;min-height:90px}
.interface-update{padding:12px 18px;font-size:var(--text-xs);align-items:flex-start}
main{padding:23px 18px;scroll-margin-top:55px}
.nav-group{display:contents}
.nav-group-label{display:none}
.nav-group [role=group]{display:contents}
.palette-open{margin-bottom:10px}
.palette-open kbd{display:none}
.sidebar{position:static;width:auto;border-right:0;border-bottom:1px solid var(--line);display:grid;align-items:center;gap:8px 14px;padding:14px 18px 10px;grid-template-columns:auto minmax(0,1fr) auto;flex-shrink:0}
.sidebar .brand{font-size:var(--text-lg);grid-column:1;grid-row:1}
.sidebar .project-picker{margin:0;font-size:var(--text-xs);grid-column:2;grid-row:1}
.sidebar .sidebar-bottom{display:contents}
.sidebar .sidebar-bottom>*{display:none}
.sidebar .sidebar-bottom>#account-button{display:flex;grid-column:3;grid-row:1;width:auto;margin:0;padding:5px 6px;border-radius:999px}
.sidebar .sidebar-bottom>#account-button .account-text,.sidebar .sidebar-bottom>#account-button .account-caret{display:none}
.sidebar .project-actions{grid-column:1/-1;grid-row:2;justify-content:flex-end;margin:0}
.sidebar .palette-open{grid-column:1/-1;grid-row:3;margin:0}
.sidebar nav{min-width:0;grid-column:1/-1;grid-row:4;margin-top:2px}
nav button .nav-label{overflow:visible}
.knowledge-filter{gap:9px}
.knowledge-facets{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
.knowledge-facets .chip{flex-shrink:0}
}
/* Small phone. */
@media(max-width:600px){
.room-conversation .chat-room{padding:16px}
.room-heading{margin:0 0 20px}
.room-heading p{font-size:var(--text-sm)}
.room-actions{flex-wrap:wrap}
.room-conversation .chat-byline{gap:4px}
.room-conversation .chat-message{padding:13px}
.knowledge-detail-heading .section-top{flex-direction:column}
.knowledge-change-line{font-size:var(--text-xs)}
.work-branch .work-branch{margin-left:8px;padding-left:4px}
.work-tree-row{gap:8px}
#my-profile-header{padding:7px 9px;font-size:var(--text-xs)}
.header-right .local-tag{display:none}
#modal .modal-head{padding:16px}
#modal-content{padding:4px 16px 16px}
#modal .modal-actions{padding:12px 16px}
.work-state{min-width:55px;font-size:var(--text-xs);max-width:65px}
}
/* Very small phone. */
@media(max-width:500px){
.topic-row{grid-template-columns:1fr 1fr}
.topic-name{grid-column:1/-1}
}

/* Short desktop viewport: only the rules not already covered below. */
@media(max-height:850px) and (min-width:651px){
.sidebar .project-picker{margin-bottom:12px}
.sidebar-bottom label{margin-top:13px}
}
/* Short desktop viewport: compact the sidebar so the account chip stays visible. */
@media(max-height:1000px) and (min-width:651px){
.sidebar{padding-top:20px;padding-bottom:16px}
.sidebar .project{margin-top:18px;margin-bottom:14px}
.sidebar-bottom p{display:none}
.sidebar nav button{padding-top:9px;padding-bottom:9px}
.nav-group-label{margin-bottom:3px}
}
