@charset "UTF-8";
:root{font-family:Inter,"Segoe UI",sans-serif;color:#242433;background:#f7f6f2;font-synthesis:none;--muted:#74737f;--line:#e4e1e9;--purple:#6451bd;--wash:#f0edf9;--ink:#242433}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button{border:0}a{color:var(--purple)}[hidden]{display:none!important}.skip-link{position:fixed;top:-100px;left:20px;z-index:9;background:#fff;padding:12px}.skip-link:focus{top:10px}
.shell{min-height:100vh;display:grid;grid-template-columns:242px minmax(0,1fr)}.sidebar{border-right:1px solid var(--line);background:#f0efe9;padding:38px 25px;display:flex;flex-direction:column;gap:32px}.brand{display:flex;align-items:center;gap:11px;font-weight:750;font-size:20px;letter-spacing:3px}.brand-mark{width:30px;height:34px;display:grid;place-items:center;color:var(--purple);font-size:32px;letter-spacing:0}.brand-caption{font-size:11px;letter-spacing:1.3px;color:var(--muted);margin:8px 0 0 41px}.side-label,.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.7px;font-weight:700;color:var(--muted);margin:0 0 14px}.project-nav{display:grid;gap:6px}.project-button{padding:11px 12px;text-align:left;border-radius:7px;color:#595765;background:transparent;overflow-wrap:anywhere;line-height:1.4}.project-button:hover{background:#e9e6ed}.project-button.active{background:#e6e1f4;color:#4d3f91;font-weight:600}.side-bottom{margin-top:auto;padding-top:30px;font-size:12px;color:var(--muted);line-height:1.6}.side-bottom strong{color:var(--ink);font-weight:600}.side-bottom .text-button{padding-left:0;margin-top:9px}.main{min-width:0;padding:0 56px 52px}.topbar{min-height:92px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:16px;font-size:12px;color:var(--muted)}.development{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:#69616f;background:#eeebe6;padding:6px 10px;border-radius:20px}.development:before{content:"";width:5px;height:5px;background:#a68c58;border-radius:50%}.page-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:43px 0 31px}.page-head h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:44px;letter-spacing:-1.6px;line-height:1.1;margin:9px 0 12px;overflow-wrap:anywhere}.page-head p{max-width:650px;color:var(--muted);font-size:14px;line-height:1.65;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.primary,.secondary,.danger,.text-button{padding:11px 17px;border-radius:6px;font-size:13px;font-weight:600;white-space:nowrap}.primary{background:var(--purple);color:#fff}.primary:hover{background:#5442a5}.secondary{background:#fff;border:1px solid var(--line);color:var(--ink)}.secondary:hover{background:#faf9fc}.danger{color:#963d47;background:#faedf0}.text-button{background:transparent;color:var(--purple)}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin-bottom:24px}.tab{background:transparent;padding:14px 0;color:var(--muted);font-size:13px;border-bottom:2px solid transparent}.tab.active{border-bottom-color:var(--purple);color:var(--ink);font-weight:650}.count{display:inline-block;border-radius:5px;background:#e8e4f1;color:#665985;font-size:11px;padding:2px 6px;margin-left:7px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:22px}.search-form{display:flex;gap:8px;flex:1;max-width:470px}input,textarea,select{border:1px solid #dcd9e2;border-radius:6px;background:#fff;color:var(--ink);padding:11px 12px;font-size:13px}input,textarea{width:100%}textarea{resize:vertical;line-height:1.6;min-height:100px}.search-form input{min-width:0}.result-note{font-size:12px;color:var(--muted);margin:0 0 17px}.record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.record-card{background:#fff;border:1px solid var(--line);border-radius:9px;padding:24px;text-align:left;color:var(--ink);display:flex;flex-direction:column;gap:14px;transition:box-shadow .15s,transform .15s;min-height:226px}.record-card:hover{box-shadow:0 6px 20px #3530440b;transform:translateY(-2px)}.card-top{display:flex;justify-content:space-between;align-items:center}.type{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:var(--purple);font-weight:700}.card-version{font-size:11px;color:var(--muted)}.record-card h2{font-size:18px;line-height:1.35;font-weight:600;margin:0;overflow-wrap:anywhere}.record-card p{font-size:13px;line-height:1.7;color:var(--muted);margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.card-footer{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}.tag{font-size:10px;color:#6b6775;padding:4px 7px;background:#f5f4f7;border-radius:4px;overflow-wrap:anywhere}.empty{padding:66px 25px;text-align:center;border:1px dashed #dcd8e4;border-radius:9px;background:#ffffff69}.empty-symbol{color:var(--purple);font-family:Georgia,serif;font-size:40px;display:block;margin-bottom:12px}.empty h2{font-family:Georgia,serif;font-size:25px;font-weight:400;margin:0 0 10px}.empty p{font-size:13px;line-height:1.7;color:var(--muted);max-width:430px;margin:0 auto 19px}.policy-note{margin-top:30px;font-size:11px;line-height:1.7;color:var(--muted);border-top:1px solid var(--line);padding-top:17px}.notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;z-index:5;padding:13px 19px;border-radius:8px;box-shadow:0 4px 22px #24243325;max-width:calc(100% - 32px);font-size:13px}.inline-error{background:#fbefef;color:#913e45;border-radius:6px;padding:11px 14px;line-height:1.5;font-size:13px;margin:12px 0}.loading{color:var(--muted);padding:45px 0;font-size:14px}
dialog{border:1px solid var(--line);border-radius:12px;width:min(760px,calc(100% - 32px));max-height:90vh;padding:0;color:var(--ink);background:#fbfaf7;box-shadow:0 24px 80px #24243326}dialog::backdrop{background:#25223468;backdrop-filter:blur(3px)}.dialog-head{padding:25px 30px 20px;display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);align-items:flex-start}.dialog-head h2{font-family:Georgia,serif;font-size:29px;font-weight:400;margin:0;overflow-wrap:anywhere}.close-button{background:transparent;color:var(--muted);font-size:22px;padding:0 5px;line-height:1}.dialog-body{padding:25px 30px 30px}.dialog-body>p{font-size:13px;line-height:1.6;color:var(--muted)}.field{display:block;margin-bottom:18px;font-size:12px;font-weight:600;line-height:1.6}.field input,.field textarea,.field select{display:block;margin-top:6px}.field small{display:block;font-size:11px;font-weight:400;color:var(--muted);margin-top:5px}.form-actions{border-top:1px solid var(--line);padding-top:20px;display:flex;justify-content:flex-end;gap:9px}.content-body{font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:18px 0}.record-meta{font-size:11px;color:var(--muted);margin:14px 0}.reference-list{padding-left:20px;font-size:12px;line-height:1.8;overflow-wrap:anywhere}.comparison{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:22px 0}.comparison section{padding:17px;background:#fff;border:1px solid var(--line);border-radius:7px;min-width:0}.comparison h3{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin:0 0 17px}.comparison h4{font-size:15px;overflow-wrap:anywhere}.comparison .content-body{font-size:12px}.comparison .proposed{border-color:#d5ccef;background:#f8f6ff}.history-item{border-top:1px solid var(--line);padding:18px 0}.history-item summary{font-size:13px;cursor:pointer;font-weight:600}.review-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border:1px solid var(--line);background:#fff;border-radius:8px;margin-bottom:12px}.review-card h2{font-size:16px;margin:8px 0;overflow-wrap:anywhere}.review-card p{font-size:12px;color:var(--muted);margin:0}.access-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 24px}.access-card{width:100%;max-width:320px;display:flex;flex-direction:column;align-items:center;gap:36px;text-align:center}.access-card .brand{font-size:24px;gap:13px}.access-card .brand-mark{font-size:40px;width:38px;height:42px}.access-card .primary{min-height:46px;min-width:190px;padding:14px 28px}.access-card .inline-error{margin:0;width:100%}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1500px){.main{padding-left:75px;padding-right:75px}.record-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:1050px){.main{padding:0 30px 35px}.shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{padding:30px 18px}.record-grid{grid-template-columns:1fr}.page-head h1{font-size:37px}}@media(max-width:720px){.shell{display:block}.sidebar{padding:20px;border-right:0;border-bottom:1px solid var(--line);gap:20px}.brand-caption,.side-bottom{display:none}.project-nav{display:flex;overflow-x:auto;gap:6px}.project-button{flex-shrink:0;max-width:240px}.side-label{margin-bottom:6px}.main{padding:0 20px 30px}.topbar{min-height:65px}.page-head{margin:30px 0 24px;align-items:flex-start;flex-direction:column;gap:18px}.page-head h1{font-size:35px}.toolbar{align-items:stretch;flex-direction:column}.search-form{max-width:none}.comparison{grid-template-columns:1fr}.dialog-body{padding:20px}.dialog-head{padding:20px}.review-card{padding:20px;align-items:flex-start;flex-direction:column}.topbar>span:first-child{display:none}.card-top{gap:10px}}
/* Explicit project-scoped agent consent. */
.consent-destination{padding:15px 17px;background:#fff;border:1px solid var(--line);border-radius:7px;margin:20px 0;display:grid;gap:7px;overflow-wrap:anywhere}.consent-destination .side-label{margin:0}.consent-destination strong{font-size:14px;font-weight:600}.permission-list{font-size:13px;line-height:1.7;padding-left:21px;color:#595765}.permission-list li{margin:7px 0}.consent-boundary{padding:13px 16px;border-left:3px solid var(--purple);background:var(--wash)}.project-choices{margin:24px 0 14px;padding:0;border:0;min-width:0}.project-choices legend{font-size:13px;font-weight:650;margin-bottom:12px}.project-choice{display:flex;align-items:flex-start;gap:12px;background:#fff;padding:15px;border:1px solid var(--line);border-radius:7px;margin:8px 0;cursor:pointer}.project-choice:has(input:checked){border-color:var(--purple);background:#f7f4ff}.project-choice input{width:17px;height:17px;flex-shrink:0;margin:2px 0 0;accent-color:var(--purple)}.project-choice strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere}.project-choice small{display:block;color:var(--muted);font-size:12px;line-height:1.6;margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere}.connection-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:20px;margin:16px 0}.connection-heading{display:flex;justify-content:space-between;gap:15px;align-items:center}.connection-heading h3{font-size:16px;font-weight:600;margin:0}.connection-status{font-size:11px;color:#426350;background:#eef6ef;padding:4px 8px;border-radius:5px}.connection-status.revoked{color:var(--muted);background:#f0eef1}.connection-projects{font-size:13px;line-height:1.6;padding-left:20px;overflow-wrap:anywhere}.connection-card .danger{margin-top:7px}
/* Cursor pages are scoped to the current search and project. */
.pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--line);padding-top:22px;margin-top:27px}.pagination button:disabled{cursor:default;opacity:.45}.page-position{color:var(--muted);font-size:12px;text-align:center}.page-notice{background:var(--wash);color:#58478e;border-radius:6px;font-size:12px;line-height:1.6;padding:12px 15px;margin:0 0 17px}@media(max-width:420px){.pagination{flex-wrap:wrap}.page-position{order:3;width:100%}}
/* Account controls expose labels and permissions, never credential values. */
.account-section-title{font-size:15px;font-weight:650;margin:30px 0 12px}.account-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:18px 0;border-bottom:1px solid var(--line);margin-bottom:12px}.account-row h3,.grant-row h3{font-size:14px;font-weight:600;margin:0;overflow-wrap:anywhere}.account-row .record-meta{margin:7px 0 0}.account-row .actions{justify-content:flex-end}.grant-row{padding:19px;border:1px solid var(--line);border-radius:8px;background:#fff;margin:16px 0}.grant-options{display:flex;flex-wrap:wrap;gap:15px;margin:17px 0}.permission-choice{display:flex;gap:9px;align-items:center;font-size:12px}.permission-choice input{width:16px;height:16px;accent-color:var(--purple);margin:0}.auth-event-list{list-style:none;padding:0;margin:0}.auth-event-list li{border-bottom:1px solid var(--line);padding:12px 0}.auth-event-list strong{font-size:12px;font-weight:600}.auth-event-list .record-meta{margin:5px 0 0}@media(max-width:520px){.account-row{align-items:flex-start;flex-direction:column}.account-row .actions{justify-content:flex-start}}
/* Owner-only retained archive view. */
.archive-note{font-size:12px;line-height:1.7;color:#75603e;background:#f2ece1;border:1px solid #e4d9c6;border-radius:7px;padding:13px 16px;margin:0 0 20px}.archived-card{background:#fcfaf6}.archived-card .card-version{color:#8b7451}.tabs{flex-wrap:wrap;column-gap:28px;row-gap:0}
/* Review labels describe metadata, not an accuracy guarantee. */
.toolbar{flex-wrap:wrap}.governance-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.governance-badge{font-size:10px;font-weight:650;padding:4px 7px;border-radius:4px;display:inline-block}.governance-badge.due{color:#806126;background:#f5eddb}.governance-badge.superseded{color:#67528b;background:#eee7f6}.governance-date{font-size:11px;color:var(--muted)}.replacement-link{font-size:12px;background:transparent;color:var(--purple);text-align:left;padding:0;white-space:normal;overflow-wrap:anywhere;line-height:1.5;text-decoration:underline;text-underline-offset:3px}.record-title-button{font:inherit;color:inherit;background:transparent;padding:0;text-align:left;white-space:normal;overflow-wrap:anywhere}.record-title-button:hover{color:var(--purple)}.selected-replacement{padding:13px 16px;background:var(--wash);border-radius:7px;font-size:13px;line-height:1.65;overflow-wrap:anywhere;margin-bottom:17px}.selected-replacement p{margin:0}.selected-replacement .text-button{padding-left:0;white-space:normal}.replacement-search{display:flex;gap:8px;margin:18px 0}.replacement-search input{min-width:0}.replacement-choice{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid var(--line)}.replacement-choice strong{display:block;overflow-wrap:anywhere;font-size:13px;line-height:1.5}.replacement-choice .governance-badge{margin-top:5px}.replacement-candidates{margin-bottom:22px}@media(max-width:520px){.replacement-choice{align-items:flex-start;flex-direction:column}.replacement-candidates .pagination{flex-wrap:wrap}.replacement-candidates .page-position{order:3;width:100%}}
.project-actions{display:grid;gap:12px;max-width:380px}.project-actions .actions{justify-content:flex-end}.page-head .project-actions .result-note{font-size:12px;text-align:right}@media(max-width:720px){.project-actions .actions{justify-content:flex-start}.page-head .project-actions .result-note{text-align:left}}
.collaboration-list{display:grid;gap:14px;margin-top:20px}.collaboration-card{padding:18px;border:1px solid var(--line);border-radius:8px;background:#fff}.collaboration-card h3{margin:0 0 10px;overflow-wrap:anywhere}.collaboration-mode{font-weight:650;color:var(--purple)}.collaboration-attention{font-size:13px;color:#80572d;background:#fbf3e5;padding:10px;border-radius:5px}.collaboration-list .result-note{margin-bottom:12px}

/* Workspace refinement: local fonts, accessible controls and responsive layout. */
:root {
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #292735;
  background: #f8f7f4;
  --ink: #292735;
  --muted: #696573;
  --purple: #6450b5;
  --purple-dark: #4e3b99;
  --wash: #f0ecfa;
  --line: #dfdce5;
}
body { line-height: 1.5; }
button:disabled { cursor: default; }
button, a, input, select, textarea, summary, [tabindex] { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--purple); }
a { color: var(--purple-dark); text-underline-offset: 3px; }
::selection { background: #e1d8fa; color: var(--ink); }
.skip-link { padding: 12px 18px; border-radius: 8px; box-shadow: 0 4px 18px #29273518; }

/* Navigation and the project heading form one calm, consistent frame. */
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: #f0efeb; padding: 36px 24px 26px; min-width: 0; }
.brand { color: var(--ink); }
.brand-mark { height: 36px; }
.side-label, .eyebrow { letter-spacing: 1.5px; }
.project-button {
  position: relative; min-height: 46px; padding: 12px 14px;
  border: 1px solid transparent; border-radius: 8px; color: #56505f;
  line-height: 1.45; font-size: 13px;
}
.project-button:hover { background: #e8e5ee; color: var(--ink); }
.project-button.active { background: #e6dff5; border-color: #ddd3ef; color: #4e3b91; font-weight: 650; }
.project-button.active::before {
  content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px;
  width: 3px; background: var(--purple); border-radius: 0 3px 3px 0;
}
.project-nav > .text-button { text-align: left; margin-top: 3px; }
/* Keep project discovery distinct from the knowledge search in the main panel. */
.project-filter { display: grid; gap: 8px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.project-filter > .side-label { display: block; font-size: 12px; letter-spacing: 0; text-transform: none; margin-bottom: 0; }
.project-filter-input { width: 100%; min-width: 0; background: #ffffffb3; }
.project-filter-status { margin: 8px 0 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.project-filter-hint { margin: 6px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.project-filter-clear { margin: 4px 0 0; padding: 8px 10px; font-size: 12px; text-align: left; }
.project-filter > .side-label input { margin-top: 7px; }
.project-page-list { display: grid; gap: 7px; min-width: 0; }
.project-page-list > .project-button { width: 100%; }
.project-page-list > .result-note {
  margin: 0; padding: 14px; border: 1px dashed #c9bfd5; border-radius: 8px;
  background: #ffffff80; line-height: 1.7;
}
.project-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.project-pagination .secondary { min-width: 0; min-height: 44px; padding: 10px 8px; font-size: 12px; }
.current-project-pin { padding: 12px 0; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.current-project-pin .project-button { width: 100%; }
.current-project-pin .side-label { margin: 0 0 8px; }
.member-project-picker, .project-choices { min-width: 0; }
.dialog-body .project-filter { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.dialog-body .project-filter-clear { grid-column: 1 / -1; justify-self: start; }
.project-page-status:focus { outline: 2px solid var(--purple); outline-offset: 4px; border-radius: 3px; }
.project-nav > .result-note { margin: 6px 0; }
.project-nav + .text-button { text-align: left; margin-top: 6px; }
.workspace-tools { display: grid; gap: 9px; padding-top: 24px; border-top: 1px solid var(--line); }
.workspace-tools .secondary { background: #ffffff8c; text-align: left; font-weight: 500; }
.side-bottom { padding-top: 26px; line-height: 1.8; }
.side-bottom strong { color: #50495f; }
.main { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 48px 44px; }
.topbar { min-height: 84px; font-size: 11px; }
.topbar > span:first-child { letter-spacing: 1.2px; }
.topbar > .text-button { margin-left: auto; }
.development { gap: 8px; color: #6c5938; background: #f0e9dc; padding: 6px 11px; border: 1px solid #e7ddcb; line-height: 1.4; }
.development::before { width: 6px; height: 6px; flex-shrink: 0; background: #98753e; }
.page-head { align-items: flex-start; flex-wrap: wrap; gap: 24px 32px; margin: 40px 0 32px; }
.page-intro { flex: 1 1 340px; min-width: 0; }
.page-head h1 { font-size: clamp(34px, 3.3vw, 46px); letter-spacing: -1.5px; line-height: 1.15; margin: 9px 0 14px; }
.page-head p { line-height: 1.75; }
.project-actions { flex: 0 1 320px; min-width: 0; max-width: none; padding-top: 4px; }
.page-head .project-actions .result-note { line-height: 1.65; }

/* Every standard action has a comfortable target and a visible focus state. */
.primary, .secondary, .danger, .text-button {
  min-height: 44px; padding: 10px 16px; border-radius: 8px;
  line-height: 1.5; white-space: normal; overflow-wrap: anywhere;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.primary { border: 1px solid var(--purple); box-shadow: 0 2px 3px #4e3b9910; }
.primary:hover:not(:disabled) { background: var(--purple-dark); border-color: var(--purple-dark); }
.secondary { border-color: #d8d3df; color: #494253; }
.secondary:hover:not(:disabled) { background: #f3effa; border-color: #bfb2dc; }
.danger { color: #993a49; background: #fbedef; border: 1px solid #eed0d6; }
.danger:hover:not(:disabled) { background: #f6dfe4; border-color: #d9a3af; }
.text-button { color: var(--purple-dark); }
.text-button:hover:not(:disabled) { background: #ebe5f5; }
.actions { gap: 9px; }
.actions > * { max-width: 100%; }
.tab { min-height: 48px; padding: 13px 1px; border-bottom-width: 3px; margin-bottom: -1px; }
.tab:hover { color: var(--purple-dark); border-bottom-color: #d6cbea; }
.tab.active { color: var(--purple-dark); }
.count { border-radius: 6px; background: #eae3f7; color: #584481; padding: 2px 7px; }
.toolbar {
  gap: 12px; margin-bottom: 16px; justify-content: flex-start; align-items: flex-end;
  padding: 16px; border: 1px solid var(--line); border-radius: 12px;
  background: #f0eef5;
}
.view-status, .review-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 16px; margin-bottom: 18px;
}
.view-status > .result-note, .view-status > .search-summary,
.review-toolbar > .result-note { flex: 1 1 220px; margin: 0; }
.view-status > .loading { flex: 1 1 220px; margin: 0; padding: 10px 0; }
.view-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.view-refresh { flex-shrink: 0; }
.search-form { flex: 1 1 300px; min-width: 0; max-width: none; }
.search-form button { flex-shrink: 0; }
input, textarea, select {
  min-height: 44px; border-color: #958a9f; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; line-height: 1.5; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: #797280; opacity: 1; }
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: #79698d; }
input:focus, textarea:focus, select:focus { border-color: var(--purple); }
input:disabled, textarea:disabled, select:disabled { background: #f0eef3; color: var(--muted); cursor: default; }
textarea { line-height: 1.7; min-height: 120px; }
select { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--purple); }
.toolbar select { flex: 0 1 auto; }
.filter-field { display: grid; gap: 6px; flex: 0 1 auto; min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.5; color: #595160; }
.filter-field select { width: 100%; font-weight: 400; }
.filter-reset { flex-shrink: 0; }
.result-note, .search-summary { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0 0 18px; overflow-wrap: anywhere; }

/* Card hierarchy makes type, title, content and review state easy to scan. */
.record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.record-card {
  border-radius: 12px; gap: 16px; min-width: 0; min-height: 250px;
  box-shadow: 0 2px 3px #29273503; transition: box-shadow .15s, border-color .15s;
}
.record-card:hover, .record-card:focus-within { transform: none; border-color: #c4b6de; box-shadow: 0 6px 20px #44305f0a; }
.card-top { flex-wrap: wrap; gap: 8px 12px; }
.type { font-size: 11px; letter-spacing: 1.1px; color: var(--purple-dark); }
.record-card h2 { font-size: 19px; line-height: 1.4; letter-spacing: -.3px; }
.record-title-button { display: block; width: 100%; min-height: 44px; padding: 6px 0; margin: -6px 0; }
.record-title-button:hover { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 4px; }
.record-card p { line-height: 1.8; }
.card-footer { padding-top: 4px; }
.tag { font-size: 11px; color: #696070; padding: 4px 8px; background: #f3f1f6; border: 1px solid #ece8f0; border-radius: 5px; max-width: 100%; min-width: 0; white-space: normal; }
.empty { padding: 58px 24px; border-color: #ccc3d8; border-radius: 12px; background: #ffffff9c; }
.empty-symbol { font-size: 32px; display: grid; place-items: center; width: 62px; height: 62px; background: var(--wash); border-radius: 18px; margin: 0 auto 20px; }
.empty h2 { font-size: 28px; line-height: 1.25; margin-bottom: 12px; overflow-wrap: anywhere; }
.empty p { font-size: 14px; line-height: 1.8; max-width: 450px; margin-bottom: 22px; }
.policy-note { margin: 30px 0 0; font-size: 12px; line-height: 1.8; padding-top: 18px; }
.review-card { border-radius: 12px; }
.review-card:focus-within { border-color: #bfb2dc; box-shadow: 0 3px 14px #44305f0a; }
.review-card > div { min-width: 0; }
.review-card > button { flex-shrink: 0; }
.review-card h2 { font-size: 17px; line-height: 1.4; }
.loading { padding: 38px 0; }
.notice { padding: 14px 20px; border-radius: 10px; box-shadow: 0 8px 28px #24243325; width: max-content; line-height: 1.6; overflow-wrap: anywhere; }
.inline-error { color: #8e3341; border: 1px solid #ebcdd1; border-radius: 8px; padding: 12px 15px; line-height: 1.7; overflow-wrap: anywhere; }

/* Keep the native dialog's heading and close action in reach while scrolling. */
dialog { border-color: #d5cede; border-radius: 16px; width: min(780px, calc(100% - 32px)); max-height: 90dvh; background: #fbfaf8; box-shadow: 0 24px 80px #24243330; overscroll-behavior: contain; scroll-padding-block: 8rem 24px; }
dialog::backdrop { background: #25223475; backdrop-filter: blur(4px); }
.dialog-head { padding: 22px 28px; position: sticky; top: 0; z-index: 1; background: #fbfaf8; border-radius: 16px 16px 0 0; }
.dialog-head h2 { font-size: 30px; line-height: 1.25; margin-top: 5px; }
.close-button { background: #f0edf4; color: #62576d; border: 1px solid #e5dfeb; border-radius: 50%; font-size: 24px; padding: 0; width: 44px; height: 44px; flex-shrink: 0; }
.close-button:hover { background: #e7e0f0; color: var(--purple-dark); }
.dialog-body { padding: 26px 28px 30px; }
.dialog-body > p { font-size: 14px; line-height: 1.75; }
.dialog-body > h3 { font-size: 18px; margin-top: 0; }
.dialog-body > .card-footer + .actions,
.dialog-body > .reference-list + .actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.field { margin-bottom: 20px; font-size: 13px; }
.field input, .field textarea, .field select { margin-top: 7px; }
.field select { width: 100%; }
.field small, .field-hint { display: block; font-size: 12px; font-weight: 400; line-height: 1.7; color: var(--muted); margin-top: 6px; }
.form-actions { padding-top: 22px; margin-top: 24px; flex-wrap: wrap; gap: 10px; }
.form-actions > * { max-width: 100%; }
/* Make an explicit discard decision distinct from the form's normal save row. */
.draft-close-prompt {
  margin-top: 20px; padding: 18px; min-width: 0;
  border: 1px solid #d8bc8d; border-left: 3px solid #a77a39; border-radius: 10px;
  background: #faf2e3; color: #69502d; overflow-wrap: anywhere;
}
.draft-close-prompt > p { margin: 0; color: inherit; font-size: 14px; line-height: 1.75; }
.draft-close-prompt > .form-actions { border: 0; margin-top: 0; padding-top: 16px; }
.content-body { line-height: 1.85; margin: 20px 0; }
/* Long knowledge entries remain readable without narrowing forms or comparisons. */
.dialog-body > .content-body, .history-item > .content-body { max-inline-size: 72ch; }
.record-meta { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.reference-list { font-size: 13px; }
.reference-list li + li { margin-top: 6px; }
.reference-list a { display: inline-block; max-width: 100%; padding-block: 4px; }
.comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.comparison section { padding: 18px; border-radius: 10px; }
.comparison h4 { font-size: 16px; line-height: 1.5; }
.comparison .content-body { font-size: 13px; }
.comparison .proposed { border-color: #cdc0e6; background: #f6f2fd; }
/* Give approval comparisons a comfortable reading width and distinct headers. */
dialog:has(.comparison) { width: min(960px, calc(100% - 32px)); }
.comparison section { border-top: 3px solid #d8d2e0; }
.comparison h3 {
  color: #57505f; font-size: 12px; line-height: 1.6;
  padding-bottom: 12px; border-bottom: 1px solid #e5e0eb; margin-bottom: 18px;
}
.comparison .proposed { border-top-color: var(--purple); }
.comparison .proposed h3 { color: var(--purple-dark); border-bottom-color: #ded3ef; }
.comparison .content-body { font-size: 14px; line-height: 1.8; }
.comparison section > p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.comparison h4 { margin-block: 14px 16px; }
.comparison .card-footer { margin-top: 20px; }
.comparison + .form-actions { padding-top: 20px; }
.dialog-body > h4, .history-item > h4 {
  font-size: 20px; line-height: 1.4; letter-spacing: -.3px;
  margin-block: 12px 16px; overflow-wrap: anywhere;
}
/* Revision cards retain native disclosure and make the whole heading a target. */
.history-item {
  margin: 10px 0; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
.history-item summary {
  min-height: 48px; padding: 13px 16px; border-radius: 9px;
  line-height: 1.65; overflow-wrap: anywhere;
}
.history-item summary::marker { color: var(--purple-dark); }
.history-item summary:hover { background: #f5f1fc; }
.history-item summary:focus-visible { outline-offset: -3px; }
.history-item[open] { border-color: #c7b9df; padding-bottom: 18px; }
.history-item[open] > summary {
  margin-bottom: 18px; border-bottom: 1px solid #e5dcef;
  border-radius: 9px 9px 0 0; background: #f5f1fc;
}
.history-item > :not(summary) { margin-left: 16px; margin-right: 16px; }
.history-item > :last-child { margin-bottom: 0; }
.history-page + .pagination { margin-top: 22px; padding-top: 18px; }
.history-page + .pagination + .actions {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.access-card .primary { min-height: 48px; padding: 13px 28px; }

/* Consent, permissions and lifecycle controls share the same visual language. */
.consent-destination { padding: 17px 19px; border-radius: 10px; }
.permission-list { font-size: 14px; line-height: 1.8; color: #595160; }
.consent-boundary { padding: 15px 18px; border-radius: 0 8px 8px 0; }
.project-choice { padding: 17px; border-radius: 9px; margin: 10px 0; font-size: 14px; }
.project-choice:has(input:checked) { background: #f5f1fc; }
.project-choice:focus-within { outline: 2px solid var(--purple); outline-offset: 3px; }
.project-choice input { width: 18px; height: 18px; }
.project-choice > span { min-width: 0; overflow-wrap: anywhere; }
.project-choice strong { font-size: 14px; }
.project-choice small { line-height: 1.7; }
.connection-card { border-radius: 10px; padding: 22px; }
.connection-heading { flex-wrap: wrap; gap: 12px; }
.connection-heading h3 { overflow-wrap: anywhere; }
.connection-status { color: #39624a; background: #edf5ee; padding: 4px 9px; }
.connection-status.revoked { color: var(--muted); }
.connection-projects { line-height: 1.8; }
.account-section-title { font-size: 16px; }
.account-row > div { min-width: 0; }
.grant-row { padding: 20px; border-radius: 10px; }
.grant-draft-status {
  margin: 0 0 16px; padding: 10px 13px; border-left: 3px solid var(--purple);
  border-radius: 0 7px 7px 0; background: var(--wash); color: #584187;
  font-size: 13px; line-height: 1.7; overflow-wrap: anywhere;
}
.grant-draft-status:empty { display: none; }
.grant-row-actions { margin-top: 18px; padding-top: 18px; }
.grant-options { gap: 12px 20px; margin: 16px 0; }
.permission-choice { font-size: 13px; min-height: 44px; cursor: pointer; }
.permission-choice input { width: 18px; height: 18px; flex-shrink: 0; }
.permission-choice:has(input:disabled) { color: var(--muted); cursor: default; }
.page-notice { color: #584187; border: 1px solid #ddd2ee; border-radius: 8px; font-size: 13px; line-height: 1.7; padding: 13px 16px; }
.archive-note { font-size: 13px; color: #725734; background: #f3ede2; border-color: #e5d8c0; border-radius: 8px; padding: 14px 17px; }
.archived-card .card-version { color: #826542; }
.governance-badge { font-size: 11px; padding: 4px 8px; border-radius: 5px; }
.governance-badge.due { color: #775721; background: #f5ebd4; }
.governance-badge.superseded { color: #674889; background: #eee5f7; }
.governance-date { font-size: 12px; }
.replacement-link { font-size: 13px; color: var(--purple-dark); padding: 4px 0; line-height: 1.6; }
.selected-replacement { padding: 15px 18px; border-radius: 8px; line-height: 1.75; }
.replacement-choice > div { min-width: 0; }
.replacement-choice strong { font-size: 14px; line-height: 1.6; }
.collaboration-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px;
  padding: 22px; border-radius: 12px; box-shadow: 0 2px 3px #29273503;
}
.collaboration-card > * { min-width: 0; grid-column: 1 / -1; }
.collaboration-card h3 { grid-column: 1; margin: 0; font-size: 17px; line-height: 1.5; }
.collaboration-card .collaboration-status {
  grid-column: 2; grid-row: 1; align-self: start; margin: 0;
  border: 1px solid #d6d0de; border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 650; line-height: 1.5;
  color: #595160; background: #f3f1f6;
}
.collaboration-status.collaboration-status-ready { color: #4e3b91; background: #f0eafa; border-color: #d5c8ed; }
.collaboration-status.collaboration-status-claimed { color: #355a80; background: #edf3fa; border-color: #cadbec; }
.collaboration-status.collaboration-status-blocked { color: #795227; background: #fbf1df; border-color: #e8d6b5; }
.collaboration-status.collaboration-status-done { color: #315940; background: #eaf4ed; border-color: #c6ddcd; }
.collaboration-card > .result-note, .collaboration-card > .collaboration-attention { margin: 0; }
.collaboration-card > .actions { padding-top: 14px; border-top: 1px solid var(--line); }
.dialog-body > .actions + .result-note { margin-top: 16px; }
.collaboration-mode { color: var(--purple-dark); }
.collaboration-attention { line-height: 1.7; color: #795227; background: #fbf1df; border: 1px solid #ecddc0; padding: 12px 14px; border-radius: 7px; }

@media (min-width: 1600px) {
  .main { padding-left: 64px; padding-right: 64px; }
  .record-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Keep project navigation reachable while browsing a long knowledge page. */
@media (min-width: 721px) {
  .sidebar {
    position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-block: 24px;
  }
}
@media (max-width: 1150px) {
  .shell { grid-template-columns: 218px minmax(0, 1fr); }
  .sidebar { padding: 30px 18px; }
  .main { padding: 0 30px 36px; }
  .page-head { gap: 24px; }
  .project-actions { flex-basis: 100%; }
  .project-actions .actions { justify-content: flex-start; }
  .page-head .project-actions .result-note { text-align: left; }
  .record-card { padding: 21px; }
}
@media (max-width: 900px) and (min-width: 721px) {
  .record-grid { grid-template-columns: 1fr; }
  .tabs { column-gap: 20px; }
  .review-card { align-items: flex-start; flex-direction: column; }
  .topbar { flex-wrap: wrap; gap: 6px 12px; padding: 14px 0; }
}
/* Keep the two filters together when the sidebar narrows the workspace. */
@media (max-width: 960px) and (min-width: 721px) {
  .toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .search-form { grid-column: 1 / -1; }
  .toolbar select { width: 100%; min-width: 0; }
  .filter-field { align-self: end; }
  .filter-reset { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { padding: 22px 20px 18px; gap: 20px; }
  .sidebar .project-page-list {
    display: flex; overflow-x: auto; padding: 4px 4px 10px; margin-inline: -4px;
    scroll-snap-type: x proximity; scroll-padding-inline: 4px; scrollbar-width: thin;
  }
  .sidebar .project-page-list > .project-button {
    flex: 0 0 min(210px, 78vw); width: min(210px, 78vw); scroll-snap-align: start;
  }
  .sidebar .project-page-list > .result-note { flex: 1 1 100%; }
  .project-nav { padding: 4px; margin: -4px; scrollbar-width: thin; }
  .project-nav > button { flex-shrink: 0; max-width: 240px; }
  .project-nav > .text-button { margin: 0; }
  .side-label { margin-bottom: 10px; }
  .workspace-tools { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
  .workspace-tools .secondary { flex: 1 1 140px; text-align: center; font-size: 12px; padding: 9px 11px; }
  .main { padding: 0 20px 30px; }
  .topbar { min-height: 66px; gap: 12px; }
  .page-head { margin: 30px 0 24px; gap: 22px; flex-direction: row; }
  .page-intro { flex-basis: 100%; }
  .page-head h1 { font-size: 36px; letter-spacing: -1px; }
  .page-head .eyebrow { font-size: 10px; letter-spacing: 1.3px; }
  .project-actions { padding-top: 0; }
  .toolbar { gap: 10px; flex-direction: row; align-items: flex-end; padding: 12px; }
  .search-form { flex-basis: 100%; }
  .toolbar select { flex: 1 1 180px; min-width: 0; }
  .filter-field { flex: 1 1 180px; }
  .project-filter { margin-bottom: 12px; }
  .tabs { column-gap: 22px; flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 0; margin-left: -4px; margin-right: -4px; scrollbar-width: thin; }
  .tab { flex-shrink: 0; white-space: nowrap; margin-bottom: 0; }
  /* Inset rings remain visible inside horizontally scrolling navigation. */
  .project-nav > button:focus-visible, .sidebar .project-page-list > .project-button:focus-visible,
  .tab:focus-visible { outline-offset: -3px; }
  .record-grid { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }
  .comparison { gap: 14px; margin-block: 20px; }
  .comparison section { padding: 16px; }
  .dialog-body { padding: 22px; }
  .dialog-head { padding: 18px 22px; }
  .dialog-head h2 { font-size: 27px; }
  .review-card { gap: 16px; }
}
@media (max-width: 520px) {
  .dialog-body .project-filter { grid-template-columns: minmax(0, 1fr); }
  .record-grid { grid-template-columns: 1fr; }
  .record-card { min-height: 225px; }
  .sidebar, .main { padding-left: 16px; padding-right: 16px; }
  .workspace-tools .secondary { flex-basis: calc(50% - 8px); }
  .page-head { margin-block: 22px 20px; gap: 16px; }
  .page-head h1 { font-size: 33px; margin-block: 6px 10px; }
  .page-head .project-actions .result-note { margin-bottom: 0; }
  .view-status, .review-toolbar { gap: 6px 10px; margin-bottom: 14px; }
  .view-status > .result-note, .view-status > .search-summary,
  .review-toolbar > .result-note { flex-basis: 160px; }
  .project-actions .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-actions .primary { grid-column: 1 / -1; }
  .project-actions { flex: 1 1 100%; }
  .tabs { column-gap: 17px; }
  .tab { font-size: 12px; }
  .count { margin-left: 4px; }
  .empty { padding: 40px 20px; }
  .replacement-search { flex-wrap: wrap; }
  .replacement-search input { flex: 1 1 180px; }
  .dialog-head { padding: 16px 18px; gap: 12px; }
  .dialog-body { padding: 20px 18px 24px; }
  .dialog-head h2 { font-size: 25px; }
  .form-actions > button { flex: 1 1 120px; }
  .review-card > button, .replacement-choice > button { width: 100%; }
  .grant-row-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .draft-close-prompt { padding: 14px; }
  input, textarea, select { font-size: 16px; }
  .notice { bottom: 16px; }
  .history-item summary { padding: 12px; }
  .history-item > :not(summary) { margin-left: 12px; margin-right: 12px; }
  .history-page + .pagination {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  }
  .history-page + .pagination > .page-position {
    grid-column: 1 / -1; grid-row: 1; width: auto; order: 0;
  }
  .history-page + .pagination > button { min-width: 0; padding-inline: 10px; }
  .history-page + .pagination + .actions { gap: 10px; }
  .history-page + .pagination + .actions > button { flex: 1 1 120px; }
}
@media (max-width: 380px) {
  .pagination { flex-wrap: wrap; gap: 10px; }
  .page-position { order: 3; width: 100%; }
  .tab { padding-top: 10px; padding-bottom: 10px; }
  .project-actions .actions { grid-template-columns: 1fr; }
}
/* Compact text actions need the same target size when used by touch. */
@media (any-pointer: coarse) {
  .record-title-button, .replacement-link, .history-item summary, .reference-list a { min-height: 44px; }
  .record-title-button, .replacement-link, .history-item summary { padding-block: 10px; }
}
/* A short landscape window should keep room for the form itself. */
@media (max-height: 500px) {
  dialog { max-height: calc(100dvh - 24px); scroll-padding-block-start: 16px; }
  .dialog-head { position: static; }
}
.submission-status { display: inline-block; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 650; background: #eee9f8; color: #534374; }
.project-details-entry { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.project-details-entry h3 { margin-top: 0; }
.project-details-recovery:empty { display: none; }
.project-details-recovery { margin-top: 18px; }
.rejection-editor, .rejection-feedback { margin-top: 24px; padding: 20px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #f5f0fa; }
.rejection-editor h3, .rejection-feedback h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.rejection-editor .field { margin-top: 16px; }
.rejection-editor .form-actions { flex-wrap: wrap; }
.rejection-feedback > p { margin-block: 12px; font-size: 14px; line-height: 1.75; }
.rejection-feedback > .record-meta, .rejection-feedback > .result-note { font-size: 12px; }
.rejection-feedback > :last-child { margin-bottom: 0; }
.rejection-feedback .content-body { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Keep the next step separate from the private, read-only decision. */
.rejection-feedback + .actions { margin-top: 24px; }
.proposal-recovery:not(:empty) { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 520px) {
  .rejection-editor, .rejection-feedback { padding: 14px; }
  .rejection-editor .form-actions > button { flex: 1 1 100%; }
  .rejection-feedback + .actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
.submission-status.approved { background: #e3efe7; color: #315940; }
.submission-status.rejected { background: #f4e6e7; color: #783b48; }
.own-submission-card > div { min-width: 0; }
.own-submission-card h2 { overflow-wrap: anywhere; }
/* Keep page position ahead of equally sized navigation targets on small screens. */
@media (max-width: 520px) {
  .pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pagination > .page-position { grid-column: 1 / -1; grid-row: 1; width: auto; order: 0; }
  .pagination > button { min-width: 0; padding-inline: 10px; }
  .collaboration-card { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; }
  .collaboration-card .collaboration-status { grid-column: 1; grid-row: 2; justify-self: start; }
  .collaboration-card > .actions { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .primary, .secondary, .danger, .text-button, .project-button, .tab, .close-button { border: 1px solid ButtonText; }
  .project-button.active, .tab.active { outline: 2px solid Highlight; outline-offset: -3px; }
  .project-button.active::before, .development::before { background: Highlight; }
  .collaboration-card .collaboration-status { border-color: CanvasText; }
  .submission-status, .governance-badge, .connection-status, .count { border: 1px solid CanvasText; }
  .grant-draft-status { border-color: Highlight; }
  .project-choice:focus-within { outline-color: Highlight; }
  .draft-close-prompt { border-color: CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* An ink constellation inset keeps the surrounding workspace calm and readable. */
.knowledge-map { padding-top: 20px; }
.map-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 16px; }
.map-heading h1,.map-heading h2 { margin: 8px 0; font-size: clamp(26px,3vw,36px); letter-spacing: -.04em; }
.map-heading p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.map-heading select { max-width: 220px; }
.map-summary { color: var(--muted); font-size: 13px; }
.map-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; margin: 20px 0 14px; background: #fffdfb; }
.map-stage { position: relative; min-width: 0; min-height: 570px; overflow: hidden; background: radial-gradient(ellipse at 38% 40%,#2b2543 0%,#171625 56%,#12121e 100%); }
.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.map-canvas:active { cursor: grabbing; }
.map-canvas:focus-visible { outline-offset: -5px; }
.map-stage-hint { position: absolute; top: 18px; left: 22px; margin: 0; font-size: 9px; letter-spacing: .14em; color: #bdb2d0; pointer-events: none; }
.map-legend { position: absolute; bottom: 22px; left: 22px; display: flex; flex-wrap: wrap; gap: 16px; pointer-events: none; }
.map-key { display: inline-flex; align-items: center; gap: 7px; color: #ddd5eb; font-size: 11px; }
.map-key::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #f1c99a; }
.map-key.project::before { background: #dac8ff; }
.map-key.source::before { background: #75d5c5; }
.map-controls { position: absolute; right: 16px; top: 12px; display: flex; gap: 6px; }
.map-control { border: 1px solid #676077; background: #211d32; color: #ece6f7; border-radius: 8px; padding: 9px 12px; min-height: 40px; font-size: 12px; cursor: pointer; }
.map-control:hover { background: #373049; }
.map-panel { padding: 22px 20px; min-width: 0; }
.map-panel input,.map-panel select { width: 100%; min-width: 0; margin-bottom: 10px; }
.map-panel > h3 { font-size: 13px; margin-top: 22px; }
.map-inspector { min-height: 152px; padding-bottom: 18px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.map-inspector h3 { font-size: 20px; line-height: 1.35; margin: 10px 0; letter-spacing: -.025em; }
.map-inspector p { font-size: 12px; line-height: 1.65; }
.map-inspector button { padding: 9px 12px; font-size: 12px; }
.map-node-kind { font-size: 9px; font-weight: 700; letter-spacing: .13em; color: #73589b; }
.map-node-kind.source { color: #267568; }
.map-node-kind.record { color: #8b6339; }
.map-node-list { max-height: 225px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.map-node-button { width: 100%; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; font-size: 12px; color: #393444; cursor: pointer; overflow-wrap: anywhere; }
.map-node-button small { color: #7a7283; font-size: 10px; }
.map-node-button:hover { background: #f2eef7; }
.map-node-button[aria-pressed='true'] { background: #eee7f8; border-color: #d4c4eb; }
.map-provenance-note { max-width: 85ch; font-size: 12px; line-height: 1.7; color: var(--muted); }
.map-empty-note { font-size: 13px; line-height: 1.6; }
.map-fallback { position: absolute; top: 40%; padding: 24px; color: #eee7f8; }
@media (max-width: 1100px) { .map-layout { grid-template-columns: minmax(0,1fr) 240px; } .map-panel { padding: 18px 14px; } .map-stage-hint { top: 65px; } }
@media (max-width: 780px) { .map-layout { grid-template-columns: minmax(0,1fr); } .map-stage { height: 420px; } .map-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px 18px; } .map-inspector { grid-column: 1/-1; min-height: auto; } .map-panel > h3,.map-node-list,.map-panel > .result-note { grid-column: 1/-1; } .map-panel > h3 { margin: 10px 0 0; } .map-panel input,.map-panel select { margin: 0; } .map-node-list { max-height: 220px; } }
@media (max-width: 520px) { .map-heading { align-items: stretch; flex-direction: column; gap: 12px; } .map-heading select { max-width: none; } .map-stage { height: 350px; } .map-legend { gap: 10px; left: 14px; bottom: 14px; } .map-key { font-size: 10px; } .map-stage-hint { left: 14px; } .map-panel { padding: 18px 14px; } .map-control { min-height: 44px; } .map-node-button { min-height: 44px; } }
@media (forced-colors: active) { .map-node-button,.map-control { border: 1px solid ButtonText; } .map-node-button[aria-pressed='true'] { outline: 2px solid Highlight; } .map-key::before { background: CanvasText; } }
@media (max-width: 780px) { .map-stage { min-height: 0; } }
.page-head[hidden] { display: none; }

/* Dedicated project browsing pane, separate from workspace management. */
.shell { grid-template-columns: 192px 246px minmax(0,1fr); }
.sidebar { padding: 30px 18px 24px; gap: 26px; background: #eeede9; }
.sidebar .brand { font-size: 16px; letter-spacing: 2px; gap: 8px; }
.sidebar .brand-caption { margin-left: 38px; font-size: 9px; }
.workspace-tools { border-top: 0; padding-top: 8px; }
.workspace-tools .secondary { border: 0; background: transparent; padding: 12px 10px; font-size: 12px; white-space: normal; line-height: 1.5; }
.workspace-tools .secondary:hover { background: #e4e0eb; }
.workspace-tools .workspace-map-link[aria-pressed='true'] { background: #e5deef; color: #574083; font-weight: 650; }
.project-pane { min-width: 0; background: #faf9f6; border-right: 1px solid var(--line); padding: 30px 20px; }
.project-pane-heading { margin-bottom: 26px; }
.project-pane-heading h2 { font-size: 18px; letter-spacing: -.025em; margin: 0 0 8px; }
.project-pane-heading p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
.project-pane .project-filter { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.project-pane .project-filter .secondary { width: 100%; }
.project-pane .project-page-list { display: grid; gap: 6px; }
.project-pane .project-button { width: 100%; border: 1px solid transparent; padding: 12px; font-size: 13px; }
.project-pane .project-button.active { border-color: #d9cdec; box-shadow: inset 3px 0 #8065b4; }
.project-pane .project-pagination { display: flex; gap: 6px; }
.project-pane .project-pagination button { flex: 1; padding: 9px 7px; font-size: 11px; }
.project-pane .project-page-status { font-size: 11px; line-height: 1.5; }
.workspace-location { overflow-wrap: anywhere; line-height: 1.6; }
.main { padding-left: 32px; padding-right: 32px; }
.map-stage-hint { font-size: 10px; top: 66px; }
.map-panel > .eyebrow { margin: 0 0 10px; }
.map-heading select { max-width: 280px; min-width: 0; }
.map-layout { grid-template-columns: minmax(0,1fr) 260px; }
.map-legend { gap: 12px; }
@media (min-width: 1101px) {
  .project-pane { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-block: 24px; }
}
@media (min-width: 1600px) { .shell { grid-template-columns: 208px 270px minmax(0,1fr); } .main { padding-inline: 48px; } }
@media (max-width: 1300px) { .map-layout { grid-template-columns: minmax(0,1fr); } .map-stage { height: 480px; min-height: 0; } .map-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px 18px; } .map-panel > .eyebrow,.map-inspector,.map-panel > h3,.map-node-list,.map-panel > .result-note { grid-column: 1/-1; } .map-inspector { min-height: 0; } .map-panel input,.map-panel select { margin-bottom: 0; } }
@media (max-width: 1100px) and (min-width: 721px) {
  .shell { grid-template-columns: 228px minmax(0,1fr); }
  .sidebar { grid-column: 1/-1; position: static; height: auto; flex-direction: row; align-items: center; padding: 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .side-bottom,.sidebar .brand-caption { display: none; }
  .workspace-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
  .workspace-tools .secondary { padding: 8px 10px; }
  .project-pane { padding: 24px 16px; position: sticky; top: 0; align-self: start; max-height: 100dvh; overflow-y: auto; }
  .main { padding-inline: 24px; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { padding: 18px 20px; gap: 14px; }
  .workspace-tools { padding: 0; }
  .workspace-tools .secondary { padding: 8px 10px; }
  .project-pane { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-pane-heading { margin-bottom: 16px; }
  .project-pane .project-page-list { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 220px; overflow-y: auto; padding: 3px; }
  .project-pane .project-page-list > .result-note { grid-column: 1/-1; }
  .project-pane .project-pagination { margin-top: 12px; }
  .project-pane .project-filter { grid-template-columns: minmax(0,1fr) auto; align-items: end; }
  .project-pane .project-filter-clear { grid-column: 1/-1; justify-self: start; }
  .main { padding-inline: 20px; }
  .map-stage { height: 400px; }
  .map-panel > .eyebrow { margin: 0; }
}
@media (max-width: 520px) {
  .project-pane { padding-inline: 16px; }
  .project-pane .project-filter { grid-template-columns: minmax(0,1fr); }
  .project-pane .project-button { min-height: 44px; }
  .map-stage { height: 350px; }
  .main { padding-inline: 16px; }
}

/* Project commands stay in reach while only the catalog results scroll. */
.project-pane-heading { margin-bottom: 20px; }
.project-pane-heading > .primary { width: 100%; margin-top: 18px; }
.project-catalog-header { min-width: 0; }
.project-catalog-header .project-filter { margin-bottom: 12px; }
.project-catalog-header .project-page-status { margin: 0 0 12px; }
.project-catalog-scroll { min-width: 0; padding: 3px; margin-inline: -3px; }
.project-catalog-footer { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 14px; }
.project-catalog-footer .project-pagination { margin-top: 0; }
.project-catalog-footer > .text-button { width: 100%; margin-top: 6px; }
.project-pane .project-button.active::before { display: none; }

/* A single command bar gives the project actions a clear, shared home. */
.shell .page-head { margin: 32px 0 24px; }
.project-toolbar {
  margin: 0 0 26px; padding: 14px 16px 12px; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px; background: #fffdfb;
  box-shadow: 0 2px 4px #29273503;
}
.project-toolbar-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.project-toolbar-primary, .project-toolbar-secondary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.project-toolbar-secondary { margin-left: auto; }
.project-toolbar-actions button { min-height: 44px; padding: 10px 14px; }
.project-toolbar-secondary .secondary { background: transparent; border-color: #ded9e5; font-weight: 550; }
.project-toolbar-secondary .secondary:hover:not(:disabled) { background: #f3effa; border-color: #bfb2dc; }
.project-toolbar-status { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #ece8ef; color: #696070; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.project-toolbar-status:empty { display: none; }
@media (min-width: 721px) and (min-height: 650px) {
  .project-pane { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-height: none; overflow: hidden; }
  .project-pane-heading { flex: 0 0 auto; }
  .project-pane #project-catalog { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .project-catalog-header, .project-catalog-footer { flex: 0 0 auto; }
  .project-catalog-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-block: 8px; }
}
@media (min-width: 721px) and (max-height: 649px) {
  .project-pane { height: auto; max-height: none; overflow: visible; position: static; }
}
@media (max-width: 1000px) {
  .project-toolbar-secondary { margin-left: 0; }
  .project-toolbar-actions { align-items: flex-start; gap: 12px; }
}
@media (max-width: 720px) {
  .project-pane { height: auto; max-height: none; overflow: visible; }
  .project-pane-heading > .primary { margin-top: 14px; }
  .project-catalog-scroll { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 8px; }
  .project-pane .project-page-list { max-height: none; overflow: visible; }
  .project-toolbar { padding: 14px; margin-bottom: 22px; }
  .project-toolbar-actions, .project-toolbar-primary, .project-toolbar-secondary { width: 100%; }
  .project-toolbar-primary > .primary { width: 100%; }
  .project-toolbar-secondary > .secondary { flex: 1 1 140px; }
  .shell .page-head { margin-top: 26px; }
}
@media (forced-colors: active) {
  .project-toolbar, .project-catalog-footer, .project-toolbar-status { border-color: CanvasText; }
  .project-pane .project-button.active { border-color: Highlight; }
}

/* Keep project views on one navigable line at every content width. */
.shell .tabs { flex-wrap: nowrap; gap: 20px; overflow-x: auto; padding: 5px 4px 0; margin-inline: -4px; scroll-padding-inline: 8px; scrollbar-width: thin; }
.shell .tabs > .tab { flex: 0 0 auto; white-space: nowrap; }
.project-toolbar-actions button { white-space: normal; text-align: center; }
.shell .tabs { overflow-y: hidden; padding-block: 5px; }
.shell .tabs > .tab:focus-visible { outline-offset: -3px; }

/* Workspace navigation moves above the project and knowledge columns. */
.shell { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.workspace-header {
  grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  min-width: 0; padding: 16px 24px; border-bottom: 1px solid var(--line); background: #eeede9;
}
.workspace-header .brand { font-size: 16px; letter-spacing: 2px; gap: 8px; }
.workspace-header .brand-caption { display: none; }
.workspace-header .workspace-tools { display: flex; flex: 1 1 480px; flex-wrap: wrap; gap: 4px; padding: 0; min-width: 0; }
.workspace-header .workspace-tools .secondary { padding: 8px 10px; min-height: 44px; white-space: normal; font-size: 12px; }
.workspace-header-account { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; min-width: 0; }
.workspace-header-account .development { max-width: 100%; overflow-wrap: anywhere; }
.workspace-header-account .text-button { padding-inline: 10px; }
.workspace-header-account .account-role { display: inline-flex; align-items: center; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; background: #fbfaf8; color: var(--ink); font-size: 12px; line-height: 1.4; font-weight: 600; }
.shell > .main { padding: 0 28px 36px; max-width: none; }
.shell .page-head { margin: 24px 0 18px; }
.shell .page-head h1 { font-size: clamp(32px, 3vw, 40px); margin: 7px 0 10px; }
.shell .page-head .eyebrow { margin-bottom: 0; }
.shell .page-head p { line-height: 1.65; }
.shell .page-intro .workspace-location { display: block; margin-bottom: 14px; font-size: 11px; color: var(--muted); letter-spacing: .8px; }
.project-toolbar { margin-bottom: 14px; padding: 12px 14px 10px; }
.project-toolbar-status { margin-top: 9px; padding-top: 8px; }
.shell .tabs { margin-bottom: 18px; }
.shell .knowledge-toolbar {
  display: grid; grid-template-columns: minmax(0, 1fr) 152px 170px; gap: 12px; align-items: end;
  padding: 14px; margin-bottom: 12px;
}
.shell .knowledge-toolbar .search-form { grid-column: auto; width: 100%; min-width: 0; }
.shell .knowledge-toolbar .filter-field { width: 100%; }
.shell .knowledge-toolbar .filter-reset { grid-column: 1 / -1; justify-self: end; }
.shell .view-status { margin-bottom: 14px; }
.shell .record-card { padding: 22px; gap: 12px; }
.shell .record-card h2 { font-size: 18px; line-height: 1.4; }
.project-pane-summary { display: none; }
.project-pane-content { min-width: 0; }
.project-pane-heading { margin-bottom: 16px; }
.project-pane-heading > .primary { margin-top: 14px; }
@media (min-width: 721px) and (min-height: 650px) {
  .shell > .project-pane { display: block; position: sticky; top: 12px; height: calc(100dvh - 132px); min-height: 460px; overflow: hidden; padding: 24px 18px; }
  .project-pane-content { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .project-pane-content > .project-pane-heading { flex-shrink: 0; }
  .project-pane-content > #project-catalog { flex: 1 1 auto; min-height: 0; }
}
@media (min-width: 1350px) and (min-height: 650px) {
  .shell > .project-pane { height: calc(100dvh - 100px); }
}
@media (min-width: 1600px) { .shell { grid-template-columns: 270px minmax(0, 1fr); } .shell > .main { padding-inline: 40px; } }
@media (max-width: 1100px) {
  .workspace-header .workspace-tools { flex-basis: 100%; order: 3; }
  .workspace-header .workspace-tools .secondary { flex: 1 1 120px; }
  .shell .knowledge-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .knowledge-toolbar .search-form { grid-column: 1 / -1; }
}
@media (max-width: 900px) and (min-width: 721px) {
  .shell { grid-template-columns: 228px minmax(0, 1fr); }
  .shell > .main { padding-inline: 20px; }
  .workspace-header { padding: 12px 20px; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .workspace-header { padding: 12px 16px; gap: 8px 12px; }
  .workspace-header .workspace-tools { gap: 4px; }
  .workspace-header .workspace-tools .secondary { flex-basis: 135px; padding: 8px; }
  .workspace-header-account { flex: 1 1 auto; justify-content: flex-end; }
  .workspace-header-account .development { font-size: 10px; }
  .shell > .main { padding-inline: 16px; }
  .shell > .project-pane { padding: 0 16px; position: static; height: auto; min-height: 0; max-height: none; overflow: visible; }
  .project-pane-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
  .project-pane-summary::after { content: '+'; color: var(--purple-dark); font-size: 22px; flex-shrink: 0; }
  .project-pane[open] > .project-pane-summary::after { content: '−'; }
  .project-pane-summary .project-pane-current { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
  .project-pane-content { padding: 4px 0 18px; }
  .project-pane-heading p { display: none; }
  .project-pane-heading h2 { display: none; }
  .project-pane-heading > .primary { margin-top: 0; }
  .shell .page-head { margin-top: 22px; }
  .shell .page-intro .workspace-location { margin-bottom: 12px; }
  .project-toolbar { padding: 12px; }
  .shell .knowledge-toolbar { padding: 12px; }
}
@media (max-width: 520px) {
  .shell .knowledge-toolbar { grid-template-columns: minmax(0, 1fr); }
  .shell .knowledge-toolbar .search-form, .shell .knowledge-toolbar .filter-reset { grid-column: 1; }
}
@media (forced-colors: active) { .workspace-header { border-color: CanvasText; } }

/* The alpha context belongs with the workspace, leaving navigation on one row. */
.shell .workspace-context { display: flex; align-items: center; gap: 10px; min-width: 0; padding-top: 18px; }
.shell .workspace-context .development { padding: 4px 10px; line-height: 1.4; max-width: 100%; overflow-wrap: anywhere; }
.shell .page-head { margin: 10px 0 14px; }
.project-toolbar { padding: 10px 12px 8px; margin-bottom: 10px; }
.project-toolbar-status { border-top: 0; margin-top: 6px; padding-top: 0; }
.shell .tabs { padding-block: 3px; margin-bottom: 12px; }
.shell .knowledge-toolbar { padding-block: 12px; }
@media (min-width: 721px) and (min-height: 650px) {
  .shell > .project-pane { height: calc(100dvh - 108px); }
}
@media (max-width: 720px) {
  .shell .workspace-context { padding-top: 16px; }
  .shell .page-head { margin-top: 10px; }
  .project-toolbar { padding: 10px 12px; }
}
@media (max-width: 720px) {
  .workspace-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .workspace-header-account { margin-left: 0; }
  .workspace-header .workspace-tools {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; overflow: visible;
    gap: 6px; padding: 3px; margin-inline: -3px;
  }
  .workspace-header .workspace-tools .secondary { flex: 1 1 140px; min-width: 0; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
  .workspace-header .workspace-tools .secondary:focus-visible { outline-offset: -3px; }
}
/* Native details content needs an explicit height to bound its scrolling child. */
@media (min-width: 721px) and (min-height: 650px) {
  .shell > .project-pane { --project-pane-height: calc(100dvh - 108px); height: var(--project-pane-height); }
  .project-pane-content { height: calc(var(--project-pane-height) - 48px); }
}
@media (max-width: 720px), (max-height: 649px) {
  .project-pane-content { height: auto; }
}
@media (min-width: 721px) {
  .project-pane-heading { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: center; gap: 8px; }
  .project-pane-heading h2 { margin: 0; }
  .project-pane-heading > p { display: none; }
  .project-pane-heading > .primary { width: 100%; min-width: 0; margin: 0; padding-inline: 10px; }
}
@media (min-width: 721px) and (max-width: 1100px) and (min-height: 650px) {
  .shell > .project-pane { --project-pane-height: calc(100dvh - 164px); }
}

/* A project conversation stays beside approved knowledge on desktop. */
.conversation-pane[hidden] { display: none; }
.conversation-pane {
  min-width: 0; background: #fbfaf8; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden; padding: 20px 16px;
}
.conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 auto; }
.conversation-header h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.conversation-header button { min-height: 44px; padding: 8px 10px; white-space: normal; }
.conversation-intro { margin: 10px 0 14px; font-size: 12px; line-height: 1.65; color: var(--muted); flex-shrink: 0; }
.conversation-status { margin: 0 0 12px; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.conversation-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 3px; margin-inline: -3px; scroll-padding-block: 8px; }
.conversation-message { margin-bottom: 14px; padding: 16px 14px; border: 1px solid #e2dce9; border-radius: 12px; background: #fff; min-width: 0; }
.conversation-message-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; font-weight: 650; }
.conversation-message-header time { font-size: 10px; font-weight: 400; color: var(--muted); }
.conversation-route, .conversation-thread { margin: 6px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.conversation-thread { color: #76618c; }
.conversation-message-body { margin: 12px 0; font-size: 13px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-receipt { margin: 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.conversation-records { display: grid; gap: 6px; margin-top: 12px; }
.conversation-records button { width: 100%; min-height: 44px; padding: 8px 10px; font-size: 12px; text-align: left; white-space: normal; }
.conversation-footer { flex: 0 0 auto; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.conversation-footer button { flex: 1 1 100px; min-height: 44px; padding: 8px; font-size: 11px; white-space: normal; }
@media (min-width: 1100px) {
  .shell.has-conversation { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .shell.has-conversation > .main { padding-inline: 24px; }
  .shell.has-conversation > .conversation-pane { position: sticky; top: 12px; height: calc(100dvh - 108px); }
  .shell.has-conversation .knowledge-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell.has-conversation .knowledge-toolbar .search-form { grid-column: 1 / -1; }
  .shell.has-conversation .project-toolbar-secondary { margin-left: 0; }
  .shell.has-conversation .record-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1440px) {
  .shell.has-conversation { grid-template-columns: 240px minmax(0, 1fr) 320px; }
  .shell.has-conversation .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
  .shell.has-conversation { grid-template-columns: 270px minmax(0, 1fr) 360px; }
  .shell.has-conversation .knowledge-toolbar { grid-template-columns: minmax(0, 1fr) 152px 170px; }
  .shell.has-conversation .knowledge-toolbar .search-form { grid-column: auto; }
}
@media (max-width: 1099px) {
  .shell > .conversation-pane { position: fixed; z-index: 4; top: 12px; right: 12px; bottom: 12px; width: min(360px, calc(100vw - 24px)); border: 1px solid #d5cede; border-radius: 16px; box-shadow: 0 16px 70px #29273530; padding: 18px 16px; }
}
@media (min-width: 1100px) and (max-height: 649px) {
  .shell.has-conversation > .conversation-pane { height: 100dvh; top: 0; padding-block: 12px; }
  .conversation-intro { margin-block: 6px; }
}
@media (forced-colors: active) { .conversation-pane, .conversation-message, .conversation-footer { border-color: CanvasText; } }
.conversation-message-header h3 { margin: 0; font-size: 13px; line-height: 1.5; font-weight: 650; }
@media (max-width: 1099px) {
  .shell > .conversation-pane { width: min(360px, calc(100% - 24px)); }
}
.conversation-intro { overflow-wrap: anywhere; }

.connection-setup { padding: 18px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); }
.connection-setup h3 { margin: 0 0 14px; font-size: 16px; }
.connection-setup label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.connection-endpoint { width: 100%; min-width: 0; font-family: monospace; }
.connection-setup .result-note { margin: 12px 0 0; }

.revision-attribution { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.revision-source { font-weight: 600; }
.record-card .revision-attribution { padding-top: 10px; border-top: 1px solid var(--line); }

.connection-handoff-guide { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.connection-handoff-guide summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.connection-handoff-guide label { margin-top: 12px; }
.connection-handoff-recipe { width: 100%; min-width: 0; resize: vertical; font-size: 12px; line-height: 1.6; }

/* Keep independent project settings visually separate. */
.project-settings-section { padding-block: 22px; border-bottom: 1px solid var(--line); }
.project-settings-section:first-child { padding-top: 0; }
.project-settings-section:last-child { padding-bottom: 0; border-bottom: 0; }
.project-settings-section.project-details-entry { margin-bottom: 0; }
.project-settings-section h3 { margin-top: 0; }


/* Dedicated management pages: persistent navigation and document scrolling. */
.management-layout { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-rows: auto 1fr; background: #f7f6f2; }
.management-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 34px; border-bottom: 1px solid var(--line); background: #fffefa; }
.management-header .brand { font-size: 18px; }
.management-header .brand-caption { display: none; }
.management-header .actions { gap: 16px; }
.management-nav { min-width: 0; padding: 32px 18px; border-right: 1px solid var(--line); background: #f1f0eb; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.management-nav .eyebrow { padding: 18px 12px 4px; margin: 0; }
.management-nav button, .management-nav a { display: block; width: 100%; text-align: left; text-decoration: none; padding: 12px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 500; line-height: 1.45; background: transparent; color: #575365; white-space: normal; }
.management-nav button:hover, .management-nav a:hover { background: #eae7ef; }
.management-nav [aria-current="page"], .management-nav .active { color: #4b3993; background: #e7e1f6; border-color: #dcd3ef; font-weight: 650; }
.management-main { min-width: 0; width: 100%; max-width: 1180px; padding: 30px clamp(24px, 4vw, 60px) 72px; }
.management-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #777281; font-size: 12px; margin-bottom: 26px; }
.management-breadcrumbs button { padding: 6px 0; font-size: 12px; background: transparent; color: var(--purple); }
.management-page-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.management-page-head h1 { margin: 0 0 12px; font: 400 clamp(30px, 3.4vw, 44px)/1.13 Georgia, serif; letter-spacing: -1px; overflow-wrap: anywhere; }
.management-page-head p { color: #686371; max-width: 740px; line-height: 1.75; margin: 0; font-size: 14px; }
.management-body { min-width: 0; font-size: 14px; line-height: 1.7; }
.management-body > p { max-width: 780px; }
.management-body p { overflow-wrap: anywhere; }
.management-body h2 { font-size: 19px; line-height: 1.4; margin: 0 0 14px; font-weight: 650; }
.management-body h3 { font-size: 16px; line-height: 1.45; }
.management-body h4 { font-size: 14px; }
.management-body .result-note, .management-body .record-meta { color: #6b6674; font-size: 12px; line-height: 1.7; }
.management-section { min-width: 0; padding: 26px 28px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.management-section > :first-child { margin-top: 0; }
.management-section > :last-child { margin-bottom: 0; }
.management-section .account-section-title { margin: 0 0 16px; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.management-grid .management-section { margin-bottom: 0; }
.management-body .account-row { align-items: center; gap: 20px; padding: 22px 0; }
.management-body .account-row h3 { margin: 0 0 5px; font-size: 14px; }
.management-body .account-row .record-meta { margin: 0; }
.management-body .account-row .actions { justify-content: flex-end; gap: 8px; }
.management-body .account-row:last-child { border-bottom: 0; }
.management-body .auth-event-list { margin: 0; padding: 0; list-style: none; }
.management-body .auth-event-list li { padding: 16px 0; }
.management-body .auth-event-list li:last-child { border-bottom: 0; }
.management-body .auth-event-list strong { font-size: 13px; font-weight: 600; }
.management-body .project-settings-section { padding: 26px 28px; background: #fffefa; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 20px; }
.management-body .project-settings-section h3 { font-size: 19px; margin: 0 0 12px; }
.management-body .project-settings-section.project-removal-entry { border-color: #e9d7da; }
.management-body .project-settings-section.project-removal-entry h3 { color: #873844; }
.management-body .connection-setup, .management-body .grant-row { background: #fffefa; border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 18px; }
.management-body .connection-card { background: #fffefa; border-radius: 12px; }
.management-body .project-page-status { margin-block: 16px; }
.management-body .form-actions { gap: 12px; padding-top: 20px; }
.management-body .field { display: grid; gap: 8px; margin: 0 0 20px; font-size: 13px; font-weight: 600; }
.management-body .field input, .management-body .field textarea, .management-body .field select { font-weight: 400; }
.management-body .field-hint { color: #716b7c; font-weight: 400; }
.management-body .primary, .management-body .secondary, .management-body .danger, .management-body .text-button { white-space: normal; line-height: 1.45; }
.management-body input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--purple); flex: 0 0 auto; }
.management-body .inline-error { max-width: 780px; }
.management-body .comparison { min-width: 0; }
@media (min-width: 1440px) { .management-main { margin-inline: auto; } }
@media (max-width: 1000px) {
 .management-layout { grid-template-columns: 200px minmax(0, 1fr); }
 .management-grid { grid-template-columns: minmax(0, 1fr); }
 .management-body .account-row { flex-wrap: wrap; }
 .management-body .account-row .actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
 .management-layout { grid-template-columns: minmax(0, 1fr); }
 .management-header { padding: 18px 20px; gap: 12px; flex-wrap: wrap; }
 .management-header .brand { font-size: 16px; }
 .management-nav { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; gap: 6px; }
 .management-nav .eyebrow { flex-basis: 100%; padding: 10px 6px 2px; }
 .management-nav button, .management-nav a { width: auto; padding: 9px 10px; font-size: 12px; }
 .management-main { padding: 24px 20px 48px; }
 .management-breadcrumbs { margin-bottom: 20px; }
 .management-page-head { margin-bottom: 22px; padding-bottom: 20px; }
 .management-section, .management-body .project-settings-section, .management-body .connection-setup, .management-body .grant-row { padding: 20px; }
 .management-body .account-row { gap: 14px; }
 .management-body .account-row .actions { width: 100%; }
 .management-body .account-row .actions > button { flex: 1 1 auto; }
 .management-body .form-actions > button { flex: 1 1 auto; }
 .management-body .search-form { flex-wrap: wrap; }
 .management-body .search-form input { flex: 1 1 160px; }
}

/* Confirmation dialogs remain short and distinct from full management pages. */
dialog.confirmation-dialog { width: min(560px, calc(100% - 32px)); }
dialog.confirmation-dialog .dialog-head { padding: 22px 26px; }
dialog.confirmation-dialog .dialog-head h2 { font-size: 26px; }
dialog.confirmation-dialog .dialog-body { padding: 24px 26px 28px; }

.management-header > .account-role { margin-left: auto; }
.management-page-head { position: relative; }
.management-back { margin-top: 6px; }
@media (min-width: 1000px) {
 .management-page-head h1 { padding-right: 110px; }
 .management-page-head > .management-back { position: absolute; right: 0; bottom: 24px; margin: 0; }
}
@media (max-width: 760px) {
 .management-body .account-row { align-items: stretch; text-align: left; }
 .management-body .account-row > div:first-child { width: 100%; }
}

/* Management section navigation and disclosure headings. */
.management-section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 16px; }
.management-section > summary { cursor: pointer; font-size: 18px; font-weight: 650; padding: 3px 0; }
.management-section[open] > summary { margin-bottom: 20px; }

.management-nav-group { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.management-nav-heading { margin: 0; padding: 0 14px 7px; font-size: 10px; line-height: 1.5; letter-spacing: 1px; text-transform: uppercase; color: #716b7c; font-weight: 650; }
@media (max-width: 760px) {
 .management-nav-group { width: 100%; flex-direction: row; flex-wrap: wrap; margin-top: 6px; }
 .management-nav-heading { width: 100%; padding: 4px 10px 0; }
}
