
:root {
  color: #22302b;
  background: #f4f2eb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color-scheme: light;

  --ink: #22302b;
  --ink-soft: #4d5852;
  --muted: #6e7770;
  --faint: #8d9790;

  --paper: #fffdf8;
  --paper-sunk: #f8f7f1;
  --card: rgba(255, 255, 255, .72);
  --line: #dddcd3;
  --line-soft: #eceae3;

  --forest: #174f3d;
  --forest-bright: #247157;
  --mist: #e4eee7;
  --sun: #e7b052;
  --amber-ink: #70451c;
  --amber-line: #e3cf9f;
  --amber-wash: #fff0d7;
  --warn-ink: #9b493f;
  --warn-wash: #ffe9e4;

  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --pill: 999px;

  --gap: 18px;
  --pad: 24px;

  --shadow: 0 18px 55px rgba(41, 48, 43, .08);
  --shadow-flat: 0 2px 0 rgba(35, 48, 43, .02);
  --ring: 3px solid rgba(36, 113, 87, .3);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: var(--ring); outline-offset: 2px; }

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 7% 4%, rgba(231, 176, 82, .12), transparent 25rem),
    linear-gradient(135deg, rgba(23, 79, 61, .035), transparent 42%);
}

/* Shell chrome */
.topbar {
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(221, 220, 211, .8);
  background: rgba(255, 253, 248, .86);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  color: #fffdf8;
  background: var(--forest);
  font: 700 17px/1 var(--serif);
  box-shadow: 0 6px 18px rgba(23, 79, 61, .16);
}
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.shell-nav { display: flex; align-items: center; gap: 6px; }
.shell-link {
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: color .15s ease, background .15s ease;
}
.shell-link:hover { color: var(--ink); background: var(--paper-sunk); }
.shell-link[aria-current="page"] { color: var(--forest); background: var(--mist); }

/* Page frame */
.page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 96px; }
.page-heading { max-width: 700px; }
.eyebrow { margin: 0 0 12px; color: var(--forest-bright); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font: 500 clamp(36px, 5vw, 60px)/1.04 var(--serif); letter-spacing: -.035em; }
h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.012em; }
.lede, .page-heading > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

.breadcrumb { margin-bottom: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumb a { text-decoration: none; border-radius: 4px; }
.breadcrumb a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb > span[aria-hidden="true"] { color: var(--line); }

/* Buttons: one primary, one quiet, one tertiary. Nothing else. */
.button {
  min-height: 42px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-weight: 650;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { transform: none; cursor: wait; opacity: .55; }
.button-primary { color: #fffdf8; background: var(--forest); }
.button-primary:hover { background: var(--forest-bright); }
.button-primary:disabled { background: var(--forest); }
.button-block { width: 100%; }
.button-quiet { color: var(--muted); border-color: var(--line); background: transparent; }
.button-quiet:hover { color: var(--ink); background: var(--paper-sunk); }

/* Panels: every region of every page is one of these. */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-flat); }
.panel-head {
  padding: 21px var(--pad) 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head .eyebrow { margin-bottom: 6px; }
.panel-head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.panel-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.panel-status::before { width: 7px; height: 7px; content: ""; flex: none; border-radius: 50%; background: #9ea8a0; }
.panel-status-active::before { background: var(--sun); box-shadow: 0 0 0 4px rgba(231, 176, 82, .15); }
.panel-status-busy::before { background: var(--forest-bright); animation: pulse 1.4s infinite ease-in-out; }

/* Chips */
.fact { padding: 6px 9px; color: #506159; border-radius: 8px; background: #eef2ee; font-size: 11px; font-weight: 650; }
.chip {
  padding: 4px 9px;
  display: inline-block;
  color: var(--muted);
  border-radius: var(--pill);
  background: #edf0ed;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip-good { color: #23653b; background: #e3f5e8; }
.chip-wait { color: var(--amber-ink); background: var(--amber-wash); }
.chip-stop { color: #8d3025; background: var(--warn-wash); }

/* Absence and waiting are designed states, not blank boxes. */
.empty-state { min-height: 230px; padding: 32px 24px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.empty-state-symbol { width: 42px; height: 42px; display: grid; place-items: center; flex: none; color: var(--forest); border-radius: 50%; background: var(--mist); font-size: 20px; }
.empty-state strong { color: var(--ink); font: 600 20px/1.3 var(--serif); }
.empty-state p { max-width: 340px; margin: 0; font-size: 13px; line-height: 1.6; }
.empty-state-inline { min-height: 0; padding: 26px var(--pad); grid-auto-flow: column; grid-auto-columns: auto; justify-content: start; place-items: center start; gap: 13px; text-align: left; }
.empty-state-inline .empty-state-symbol { width: 30px; height: 30px; font-size: 15px; }
.empty-state-inline strong { font-size: 15px; }
.empty-state-inline p { font-size: 12px; }

.loading-panel { min-height: 200px; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .56); }
.loading-rows { padding: 20px var(--pad); display: grid; gap: 11px; }
.loading-row { height: 13px; border-radius: 7px; background: linear-gradient(90deg, #eeeee7, #f7f7f2, #eeeee7); background-size: 300% 100%; animation: shimmer 1.7s infinite linear; }
.loading-row:nth-child(2) { width: 72%; }
.loading-row:nth-child(3) { width: 48%; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--forest-bright); animation: pulse 1.4s infinite ease-in-out; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .45; } }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .button:hover { transform: none; }
}

/* Messages */
.inline-notice { margin: 0 0 18px; padding: 11px 13px; color: #6d5628; border: 1px solid #ead4a6; border-radius: var(--radius-sm); background: #fff7e7; font-size: 13px; line-height: 1.5; }
.notice { margin: 0 0 var(--gap); padding: 12px 15px; color: #23653b; border: 1px solid #bfdfc9; border-radius: var(--radius-sm); background: #e9f6ed; font-size: 13px; line-height: 1.5; }
.notice.failure { color: #8d3025; border-color: #f0c5bc; background: var(--warn-wash); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  .topbar { min-height: 64px; padding: 0 16px; gap: 10px; }
  .brand small { display: none; }
  .shell-nav { gap: 2px; }
  .shell-link { padding: 8px; font-size: 12px; }
  .topbar .button { min-height: 36px; padding: 8px 11px; font-size: 13px; }
  .page { width: min(100% - 32px, 1180px); padding: 40px 0 64px; }
  .panel-head { padding: 18px 18px 15px; }
  .empty-state { min-height: 190px; padding: 26px 18px; }
  .empty-state-inline { padding: 22px 18px; }
}

/* Below this the wordmark is the first thing to go; navigation outranks it. */
@media (max-width: 470px) {
  .brand > span:last-child { display: none; }
}

/* Persona list */
/* auto-fill (not auto-fit) keeps a lone card at column width instead of
   stretching it across the page — the single-persona case is the v1 norm. */
.persona-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 420px)); gap: 14px; }
.persona-card {
  min-height: 132px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .68);
  box-shadow: var(--shadow-flat);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.persona-card:hover { transform: translateY(-3px); border-color: #bdcfc5; box-shadow: var(--shadow); }
.persona-card-pending { border-color: #d39a55; box-shadow: inset 4px 0 0 var(--sun); }
.persona-monogram {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 17px;
  color: var(--forest);
  background: var(--mist);
  font: 600 18px/1 var(--serif);
}
.persona-card-copy { min-width: 0; display: grid; gap: 6px; }
.persona-card-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.persona-card-name strong { font: 600 21px/1.2 var(--serif); }
.persona-card-copy > span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.decision-badge { padding: 4px 9px; color: var(--amber-ink); border-radius: var(--pill); background: var(--amber-wash); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.arrow { color: var(--forest-bright); font-size: 22px; transition: transform .18s ease; }
.persona-card:hover .arrow { transform: translateX(4px); }
.persona-list-page .panel { margin-top: 40px; }

/* Persona home */
.persona-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.persona-identity { display: flex; align-items: flex-start; gap: 22px; }
.persona-identity > div { min-width: 0; }
.persona-heading h1 { font-size: clamp(36px, 4.6vw, 56px); }
.persona-heading p:last-child { max-width: 660px; margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.persona-monogram-large { width: 68px; height: 68px; margin-top: 22px; border-radius: 22px; font-size: 23px; }
.persona-actions { flex: none; padding-top: 6px; display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.decision-notification-control { min-height: 38px; padding: 8px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .72); font-size: 12px; font-weight: 600; transition: color .15s ease, border-color .15s ease; }
.decision-notification-control:hover:enabled { color: var(--ink); border-color: #bdcfc5; }
.decision-notification-control:disabled { cursor: default; opacity: .7; }

.workspace-shell { margin-top: 36px; display: grid; gap: var(--gap); }

/* The persona home is one conversation list in two registers. */
.conversation-opener { position: relative; }
.conversation-open-form { width: min(88vw, 390px); margin-top: 8px; padding: 14px; position: absolute; z-index: 4; top: 100%; right: 0; display: grid; gap: 10px; border: 1px solid #ccd7d0; border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow); }
.conversation-open-form[hidden] { display: none; }
.conversation-open-form label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.conversation-open-form input { min-height: 44px; padding: 10px 12px; border: 1px solid #c8cec8; border-radius: var(--radius-sm); background: white; }
.conversation-open-actions { display: flex; justify-content: flex-end; gap: 8px; }
.conversation-register { overflow: hidden; }
.principal-register { border-color: #cdd8d1; box-shadow: var(--shadow); }
.principal-register .panel-head {
  align-items: center;
  padding-block: 13px;
  background: #f2f5f0;
  border-bottom: 1px solid #d9e0d8;
}
.principal-register .panel-head h2 { font-size: 16px; letter-spacing: .01em; }
.principal-register .panel-head .eyebrow { margin-bottom: 3px; }
.queued-indicator { min-height: 28px; padding: 6px 10px; display: inline-flex; align-items: center; color: #657169; border: 1px solid #dfe3de; border-radius: var(--pill); background: #f4f5f0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.queued-indicator[data-count="0"] { color: var(--faint); }
.principal-list, .working-register-list, .recent-principal-list { margin: 0; padding: 0; list-style: none; }
.principal-row { border-top: 1px solid var(--line-soft); }
.principal-row:first-child { border-top: 0; }
.principal-link { padding: 20px var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; color: inherit; text-decoration: none; transition: background .15s ease; }
.principal-link:hover { background: #f8faf6; }
.principal-row-executive { border-top-color: #ead7b9; background: linear-gradient(90deg, #fff8e9 0, rgba(255, 252, 244, .5) 72%); box-shadow: inset 4px 0 0 var(--sun); }
.principal-row-executive .principal-link:hover { background: #fff5df; }
.principal-copy { min-width: 0; display: grid; gap: 5px; }
.principal-origin { color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.principal-row-executive .principal-origin { color: var(--amber-ink); }
.principal-copy strong { font: 600 19px/1.32 var(--serif); }
.principal-purpose { color: var(--muted); font-size: 12px; line-height: 1.55; }
.principal-meta { display: grid; justify-items: end; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.principal-action { color: var(--forest-bright); font-size: 12px; font-weight: 750; }
.principal-row-executive .principal-action { color: var(--amber-ink); }
.recent-principal { border-top: 1px solid var(--line-soft); background: #fafaf6; }
.recent-principal > summary { padding: 14px var(--pad); display: flex; align-items: center; justify-content: space-between; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.recent-principal > summary::-webkit-details-marker { display: none; }
.recent-principal > summary::after { content: '⌄'; color: var(--faint); }
.recent-principal[open] > summary::after { content: '⌃'; }
.recent-principal-list { border-top: 1px solid var(--line-soft); }
.recent-principal-row { padding: 13px var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; border-top: 1px solid #ebebe4; }
.recent-principal-row:first-child { border-top: 0; }
.recent-principal-row a { min-width: 0; color: inherit; text-decoration: none; }
.recent-principal-row strong { display: block; overflow: hidden; color: #59645e; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.recent-principal-row p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.recent-principal-row time { color: var(--faint); font-size: 10px; white-space: nowrap; }
.working-register { box-shadow: var(--shadow-flat); }
.working-register .panel-head { padding-block: 14px; background: #fafaf6; }
.working-register .panel-head h2 { font-size: 17px; }
.working-register-list { background: rgba(250, 250, 246, .58); }
.working-register-row { border-top: 1px solid #e9e9e2; }
.working-register-row:first-child { border-top: 0; }
.working-register-link { padding: 13px var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; color: inherit; text-decoration: none; transition: background .15s ease; }
.working-register-link:hover { background: #f5f7f2; }
.working-register-copy { min-width: 0; display: grid; gap: 4px; }
.working-register-copy strong { overflow: hidden; color: #556159; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.working-register-copy span, .working-register-meta { color: var(--faint); font-size: 10px; }
.working-register-meta { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }

/* Principal session: a bounded conversation, with an optional pinned decision. */
.principal-session-purpose { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.principal-archive-note { margin-top: 28px; padding: 13px 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 18px; color: #566159; border: 1px solid #dedfd8; border-radius: var(--radius-md); background: #f6f6f1; }
.principal-archive-note strong { font: 600 15px/1.3 var(--serif); }
.principal-archive-note span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.principal-session-workspace { margin-top: 30px; display: grid; gap: var(--gap); align-items: start; }
.principal-session-workspace-decision { grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr); }
.decision-session-panel { position: sticky; top: var(--gap); overflow: hidden; border-color: #dfbd83; box-shadow: inset 4px 0 0 var(--sun), var(--shadow-flat); }
.decision-session-panel .panel-head { background: #fff9eb; }
.decision-outcome { margin: 0; padding: 13px 14px; color: #536058; border: 1px solid #dce2dc; border-radius: var(--radius-sm); background: #f5f7f2; font-size: 13px; line-height: 1.55; }
.principal-conversation-panel { min-width: 0; overflow: hidden; }
.principal-conversation-panel .session-conversation { min-height: 360px; max-height: 650px; overflow-y: auto; }
#principal-message-form[hidden] { display: none; }
.principal-close-control { margin-top: var(--gap); overflow: hidden; }
.principal-close-control > summary { padding: 15px var(--pad); color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.principal-close-control > summary:hover { color: var(--ink); }
.principal-close-control form { padding: 16px var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr) auto; align-items: end; gap: 14px; border-top: 1px solid var(--line-soft); background: #fafaf6; }
.principal-close-control label { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.principal-close-control p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.principal-close-control input { min-height: 42px; padding: 9px 11px; border: 1px solid #ccd0ca; border-radius: var(--radius-sm); background: white; }
.decision-alert {
  padding: 15px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #4f3016;
  text-decoration: none;
  border: 1px solid #dfa75d;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff5df, #ffefd2);
  box-shadow: 0 10px 28px rgba(125, 75, 24, .09);
  transition: transform .18s ease, box-shadow .18s ease;
}
.decision-alert:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(125, 75, 24, .14); }
.decision-alert[hidden] { display: none; }
.decision-alert-copy { min-width: 0; display: grid; gap: 3px; }
.decision-alert-copy strong { font: 600 17px/1.3 var(--serif); }
.decision-alert-copy span { font-size: 13px; }
.decision-alert-arrow { flex: none; font-size: 14px; font-weight: 750; white-space: nowrap; }

.home-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: var(--gap); align-items: stretch; }
.decision-panel, .queue-panel, .sessions-panel, .tasks-panel, .wiki-panel { overflow: hidden; }
.decision-body { min-height: 330px; padding: var(--pad); }
.decision-question { margin: 0 0 20px; font: 500 clamp(23px, 2.6vw, 29px)/1.3 var(--serif); letter-spacing: -.02em; }
.decision-answer-label { margin: 0 0 10px; color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.decision-options { display: grid; gap: 9px; }
.decision-option {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  text-align: left;
  border: 1px solid #cdd7d0;
  border-radius: 13px;
  background: #f9fbf8;
  transition: border-color .15s ease, background .15s ease;
}
.decision-option:hover:enabled { border-color: #88aa99; background: var(--mist); }
.decision-option:disabled { cursor: wait; opacity: .56; }
.decision-option strong { font-weight: 700; }
.decision-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.45; }
.decision-option .arrow { flex: none; font-size: 17px; }
/* Park is deliberately not an answer: no arrow, no card, its own row. */
.decision-defer { margin-top: 16px; padding-top: 15px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px dashed #dcdbd2; }
.decision-defer span { color: var(--faint); font-size: 11px; line-height: 1.5; }
.decision-park { min-height: 34px; padding: 6px 11px; color: var(--muted); border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font-size: 12px; font-weight: 650; }
.decision-park:hover:enabled { color: var(--ink); border-color: var(--line); background: var(--paper-sunk); }
.decision-park:disabled { cursor: wait; opacity: .56; }
.decision-facts { margin: 22px 0 0; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line-soft); }
.provenance { margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.provenance strong { color: #4e5c55; }
.action-message { margin: 16px 0 0; color: var(--forest); font-size: 13px; font-weight: 650; }
.action-message-warning { color: var(--warn-ink); }

/* Executive chat */
.chat-panel { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-log { min-height: 270px; max-height: 440px; padding: 22px 20px; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; scroll-behavior: smooth; }
.chat-log > .empty-state, .chat-log > .loading-panel { margin: auto 0; border: 0; background: transparent; }
.chat-message { max-width: 84%; display: grid; gap: 5px; }
.chat-message-user { align-self: flex-end; }
.chat-message-persona { align-self: flex-start; }
.chat-label { color: #88928c; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.chat-message-user .chat-label { text-align: right; }
.chat-bubble { margin: 0; padding: 11px 13px; border-radius: 14px 14px 14px 4px; background: #f0f2ed; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-user .chat-bubble { color: #fffdf8; border-radius: 14px 14px 4px 14px; background: var(--forest); }
.chat-composer { margin-top: auto; padding: 14px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 9px; border-top: 1px solid var(--line-soft); background: rgba(250, 250, 246, .78); }
.chat-composer textarea { min-height: 46px; max-height: 150px; padding: 12px 13px; resize: vertical; border: 1px solid #ccd0ca; border-radius: 12px; background: white; font-size: 14px; line-height: 1.5; }
.chat-composer textarea:hover { border-color: #b4bdb5; }
.chat-composer .button { min-width: 78px; }
.chat-warning { margin: 0 14px 12px; color: var(--warn-ink); font-size: 12px; line-height: 1.5; }

/* Decision queue */
.queue-panel .panel-head { align-items: center; }
.queue-count { min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; color: var(--forest); border-radius: var(--pill); background: var(--mist); font-size: 12px; font-weight: 800; }
.queue-list { margin: 0; padding: 0; list-style: none; }
.queue-item { padding: 16px var(--pad); display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-top: 1px solid var(--line-soft); }
.queue-item:first-child { border-top: 0; }
.queue-rank { color: var(--faint); font: 600 15px/1 var(--serif); }
.queue-copy { min-width: 0; display: grid; gap: 4px; }
.queue-copy strong { font-size: 14px; font-weight: 650; line-height: 1.4; }
.queue-copy span { color: var(--muted); font-size: 11px; }

/* Working sessions */
.session-list { margin: 0; padding: 0; list-style: none; }
.session-list-item { border-top: 1px solid var(--line-soft); }
.session-list-item:first-child { border-top: 0; }
.session-link { padding: 16px var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; text-decoration: none; transition: background .15s ease; }
.session-link:hover { background: #f8faf6; }
.session-link-copy { min-width: 0; display: grid; gap: 5px; }
.session-link-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.session-link-copy span, .session-link-meta { color: var(--muted); font-size: 11px; }
.session-link-meta { display: grid; justify-items: end; gap: 4px; }

/* Working session page */
.session-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.session-heading h1 { max-width: 760px; font-size: clamp(34px, 4.4vw, 54px); }
.session-context { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 7px; }
.session-context span { padding: 6px 9px; color: #56645d; border-radius: 8px; background: #eef2ee; font-size: 11px; font-weight: 650; }
.session-context .session-state { color: var(--forest); background: var(--mist); }
.session-drive-panel { margin-top: 34px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.session-drive-panel > div { min-width: 0; }
.session-drive-panel h2 { margin: 0; font-size: 21px; line-height: 1.25; }
.session-drive-panel .eyebrow { margin-bottom: 6px; }
.session-drive-panel p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.session-drive-panel #session-intervention { color: var(--faint); font-size: 11px; }
.session-drive-panel > .button { flex: none; }
.session-workspace { margin-top: var(--gap); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); align-items: start; gap: var(--gap); }
.session-conversation-panel { min-width: 0; overflow: hidden; }
.session-conversation { min-height: 320px; padding: clamp(20px, 4vw, 36px); display: grid; align-content: start; gap: var(--gap); background: rgba(250, 250, 246, .48); }
.session-conversation > .empty-state { align-self: center; }
.session-turn { max-width: 82%; padding: 16px 18px; border: 1px solid #e0e4de; border-radius: 18px 18px 18px 5px; background: white; box-shadow: 0 7px 24px rgba(41, 48, 43, .04); }
.session-turn-user { justify-self: end; color: #fffdf8; border-color: var(--forest); border-radius: 18px 18px 5px 18px; background: var(--forest); }
.session-turn-system { max-width: 100%; color: #5d685f; border-style: dashed; border-radius: var(--radius-md); background: #f0f1eb; }
.session-turn > header { margin-bottom: 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.session-turn > header strong { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.session-turn > header time { flex: none; color: var(--faint); font-size: 10px; }
.session-turn-user > header time { color: rgba(255, 255, 255, .62); }
.session-turn-text { margin: 0; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.session-artifact { margin-top: 13px; overflow: hidden; color: var(--ink); border: 1px solid #dfe4de; border-radius: 12px; background: #f6f8f4; }
.session-turn-user .session-artifact { border-color: rgba(255, 255, 255, .24); }
.session-artifact > header { padding: 9px 11px; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e2e5df; font-size: 10px; }
.session-artifact > header span { color: var(--muted); overflow-wrap: anywhere; }
.session-artifact pre { margin: 0; padding: 11px; overflow-x: auto; color: #455149; background: transparent; font: 11px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.session-composer { position: sticky; bottom: 0; }
.session-composer .button { min-width: 84px; }
.session-focus-pane { min-width: 0; position: sticky; top: var(--gap); overflow: hidden; }
.focus-artifact-list { max-height: 680px; padding: 16px; display: grid; align-content: start; gap: 12px; overflow-y: auto; }
.focus-artifact { min-width: 0; overflow: hidden; border: 1px solid #dfe4de; border-radius: var(--radius-md); background: #f6f8f4; }
.focus-artifact > header { padding: 10px 12px; display: grid; gap: 4px; border-bottom: 1px solid #e2e5df; font-size: 10px; }
.focus-artifact > header span { color: var(--muted); overflow-wrap: anywhere; }
.focus-artifact pre { max-height: 360px; margin: 0; padding: 13px; overflow: auto; color: #455149; font: 11px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.focus-empty { min-height: 210px; padding: 28px 18px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.focus-empty > span { width: 36px; height: 36px; display: grid; place-items: center; color: var(--forest); border-radius: 50%; background: var(--mist); }
.focus-empty strong { color: var(--ink); font: 600 17px/1.3 var(--serif); }
.focus-empty p { max-width: 240px; margin: 0; font-size: 12px; line-height: 1.6; }
.browser-preview-slot { margin: 0 16px 16px; overflow: hidden; border: 1px solid var(--amber-line); border-radius: var(--radius-md); background: #fffaf0; }
.browser-preview-slot > header { padding: 12px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eadbb8; }
.browser-preview-slot .eyebrow { margin-bottom: 5px; color: #8b641c; }
.browser-preview-slot h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.browser-preview-empty { min-height: 140px; padding: 22px 18px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); text-align: center; }
.browser-preview-empty > span { color: #9a722b; font-size: 25px; }
.browser-preview-empty p { max-width: 250px; margin: 0; font-size: 11px; line-height: 1.6; }

/* Task board */
.knowledge-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--gap); align-items: start; }
.task-board { padding: 20px; display: grid; gap: 22px; }
.task-group { display: grid; gap: 10px; }
.task-group-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.task-group-head h3 { margin: 0; font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.task-group-head span { color: var(--faint); font-size: 11px; font-weight: 700; }
.task-list { display: grid; gap: 10px; }
.task-group-empty { margin: 0; padding: 14px 16px; color: var(--muted); border: 1px dashed #e0dfd6; border-radius: var(--radius-md); font-size: 12px; }
.task-card { padding: 16px; border: 1px solid #e3e3da; border-radius: var(--radius-md); background: #fdfcf8; }
.task-card-done { background: #f6f6f1; }
.task-card h4 { margin: 0 0 13px; font-size: 17px; line-height: 1.3; }
.task-card-done h4 { color: #69716c; }
.task-extract { margin-top: 12px; }
.task-extract:first-of-type { margin-top: 0; }
.task-extract dt { margin-bottom: 5px; color: var(--forest-bright); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.task-extract dd { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.task-provenance { display: block; margin-top: 6px; color: #919993; font-size: 10px; }

/* Wiki */
.wiki-layout { min-height: 400px; display: grid; grid-template-columns: 164px minmax(0, 1fr); }
.wiki-pages { padding: 14px 10px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; border-right: 1px solid var(--line-soft); background: #faf9f4; }
.wiki-page-button { width: 100%; padding: 8px 10px; color: #657169; text-align: left; border: 0; border-radius: 9px; background: transparent; font-size: 12px; line-height: 1.4; transition: color .15s ease, background .15s ease; }
.wiki-page-button:hover { color: var(--ink); background: #eef2ed; }
.wiki-page-button-active { color: var(--forest); background: var(--mist); font-weight: 750; }
.wiki-reader { min-width: 0; padding: 26px; overflow-wrap: anywhere; }
.wiki-reader h1 { margin: 0 0 16px; font-size: 28px; }
.wiki-reader h2 { margin: 24px 0 10px; font-size: 20px; line-height: 1.3; }
.wiki-reader h3 { margin: 20px 0 8px; font-size: 15px; line-height: 1.35; }
.wiki-reader p, .wiki-reader li, .wiki-reader blockquote { color: #4c5851; font-size: 13px; line-height: 1.75; }
.wiki-reader p { margin: 0 0 13px; }
.wiki-reader ul, .wiki-reader ol { margin: 0 0 16px; padding-left: 20px; }
.wiki-reader li { margin-bottom: 5px; }
.wiki-reader blockquote { margin: 16px 0; padding: 4px 0 4px 14px; border-left: 3px solid #b8cbbf; }
.wiki-reader pre { max-width: 100%; padding: 14px; overflow-x: auto; color: #f5f4ed; border-radius: var(--radius-sm); background: #25312c; font: 11px/1.6 var(--mono); }
.wiki-reader code:not(pre code) { padding: 2px 5px; border-radius: 5px; background: #eef0eb; font-family: var(--mono); font-size: .88em; }
.wiki-inline-link { padding: 0; color: var(--forest-bright); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; border: 0; background: transparent; font: inherit; }
.wiki-reader a { color: var(--forest-bright); }

/* Login */
.login-page { display: grid; place-items: center; padding: 28px; }
.login-wrap { width: min(100%, 1040px); min-height: calc(100vh - 56px); display: grid; place-items: center; }
.login-card { width: min(100%, 470px); padding: clamp(32px, 6vw, 54px); border: 1px solid rgba(221, 220, 211, .9); border-radius: 28px; background: rgba(255, 253, 248, .95); box-shadow: var(--shadow); }
.brand-login { margin-bottom: 46px; }
.login-card h1 { font-size: clamp(36px, 6.5vw, 52px); }
.login-card .lede { font-size: 15px; }
.login-form { margin-top: 30px; display: grid; gap: 10px; }
.login-form label { font-size: 13px; font-weight: 700; }
.login-form input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #cacbc2; border-radius: 12px; background: white; }
.login-form input:hover { border-color: #b4bdb5; }
.login-form .button-primary { margin-top: 4px; }
.form-error { margin: 0; padding: 10px 12px; color: #8d3025; border: 1px solid #f0c5bc; border-radius: var(--radius-sm); background: var(--warn-wash); font-size: 13px; line-height: 1.5; }
.form-error[hidden] { display: none; }

@media (max-width: 940px) {
  .home-grid { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .principal-session-workspace-decision { grid-template-columns: 1fr; }
  .decision-session-panel { position: static; }
  .session-workspace { grid-template-columns: 1fr; }
  .session-focus-pane { position: static; }
}

@media (max-width: 640px) {
  .persona-card { min-height: 0; padding: 18px; gap: 14px; }
  .persona-monogram { width: 44px; height: 44px; border-radius: 15px; font-size: 16px; }
  .persona-card-name strong { font-size: 19px; }
  .persona-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .persona-identity { gap: 16px; }
  .persona-monogram-large { width: 52px; height: 52px; margin-top: 18px; border-radius: 17px; font-size: 18px; }
  .persona-actions { padding-top: 0; }
  .conversation-opener { flex: 1 1 100%; }
  .conversation-opener > .button { width: 100%; }
  .conversation-open-form { position: static; width: 100%; }
  .decision-notification-control { width: 100%; }
  .decision-alert { align-items: flex-start; flex-direction: column; gap: 10px; }
  .decision-body { padding: 18px; }
  .principal-link { padding-inline: 18px; align-items: flex-start; grid-template-columns: 1fr; gap: 10px; }
  .principal-meta { justify-items: start; }
  .recent-principal-row { grid-template-columns: 1fr; gap: 5px; }
  .principal-archive-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .principal-close-control form { grid-template-columns: 1fr; align-items: stretch; }
  .queue-item, .session-link, .empty-state-inline { padding-inline: 18px; }
  .queue-item { grid-template-columns: 24px minmax(0, 1fr); }
  .queue-item > .fact { grid-column: 2; justify-self: start; }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-pages { flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .wiki-page-button { width: auto; flex: none; white-space: nowrap; }
  .wiki-reader { padding: 20px; }
  .session-heading { align-items: stretch; flex-direction: column; gap: 18px; }
  .session-heading > .button { align-self: flex-start; }
  .session-drive-panel { align-items: stretch; flex-direction: column; }
  .session-turn { max-width: 94%; }
  .task-board { padding: 16px; }
}
