:root {
  color-scheme: light;
  --ink: #1c2c43;
  --muted: #536982;
  --paper: #eff3f8;
  --card: #ffffff;
  --line: #dce5ef;
  --forest: #2d67c6;
  --forest-dark: #1c4f9e;
  --accent-soft: #e4efff;
  --amber: #c28c45;
  --error: #a23e34;
  --shadow: 0 5px 24px #1d416b06, 0 1px 3px #1d416b03;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, p { margin-top: 0; }
h1, h2, h3, h4, h5 { font-weight: 600; }
h1 { margin-bottom: 0; font-size: 1.45rem; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: clamp(1.7rem, 2.2vw, 2rem); line-height: 1.4; letter-spacing: -.045em; font-weight: 600; }
h3 { font-size: 1.12rem; line-height: 1.6; }
h4 { font-size: 1rem; line-height: 1.6; }
p, li { line-height: 1.8; }
a { color: var(--forest); text-underline-offset: .2em; }
button, a, input, select, textarea, summary, [tabindex] { scroll-margin: 20px; }
:focus-visible { outline: 3px solid #86abe0; outline-offset: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #86abe0; outline-offset: 2px; }
::selection { color: #234b82; background: #dceaff; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-160%); z-index: 40; padding: 12px 16px; border-radius: 8px; background: white; color: var(--forest); }
.skip-link:focus { transform: none; }

/* A quiet frame keeps the work itself in the foreground. */
.topbar, main { width: min(1600px, calc(100% - 48px)); margin-inline: auto; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 29px; height: 29px; }
.brand-mark span { border-radius: 3px; background: #2d67c6; }
.brand-mark span:nth-child(2) { background: #7ca7e6; border-top-right-radius: 11px; }
.brand-mark span:nth-child(3) { background: #cadbfa; border-bottom-left-radius: 11px; }
.brand-mark span:nth-child(4) { background: #9bbce9; }
.brand-caption { display: block; margin-top: 3px; color: var(--muted); font-size: .65rem; font-weight: 400; letter-spacing: .035em; }
#logout { padding: 9px 14px; font-size: .82rem; }
main { padding-block: 24px 70px; }
.app-shell { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 24px; }
.app-sidebar { position: sticky; top: 20px; align-self: start; min-height: min(740px, calc(100vh - 120px)); padding: 25px 12px; border-radius: 14px; background: linear-gradient(165deg, #172d4b, #10223a); box-shadow: 0 10px 24px #112b4210; }
.nav-group-label { margin: 0 12px 21px; font-size: .7rem; letter-spacing: .08em; color: #a9bdd5; }
.sidebar-nav { display: grid; gap: 7px; margin-bottom: 27px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 11px 12px; text-align: left; border-radius: 7px; color: #b8c9df; background: transparent; font-size: .88rem; font-weight: 500; }
.nav-item svg { width: 19px; height: 19px; flex: 0 0 19px; }
.nav-item:hover { background: #243d5b; color: #ffffff; }
.nav-item[aria-current="page"] { background: #2b63b8; color: #ffffff; font-weight: 600; box-shadow: inset 2px 0 0 #91bafe; }
.capture-button { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; border-radius: 7px; min-height: 41px; padding-inline: 8px; font-size: .78rem; background: #2e4766; border: 1px solid #49637e; }
.capture-button span { font-size: 1.35rem; line-height: 1; font-weight: 400; }
.sidebar-note { display: flex; align-items: start; gap: 8px; margin: 42px 10px 0; }
.sidebar-note-mark { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; background: #759ac8; margin-top: 7px; }
.sidebar-note p { color: #bfd0e4; font-size: .73rem; line-height: 1.9; }
.sidebar-note p span { color: #a6bbd4; font-size: .65rem; }
.workspace-content, .task-detail, .task-workspace-main { min-width: 0; }
.workspace-content > section { animation: surface-enter .23s ease-out; }
.eyebrow { margin-bottom: 10px; font-size: .64rem; font-weight: 600; letter-spacing: .18em; color: #526b8a; }
.overview-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.overview-copy, .muted { margin-bottom: 0; color: var(--muted); line-height: 1.8; font-size: .92rem; }
.overview-heading .actions { justify-content: flex-end; }
.section-heading { max-width: 720px; margin-bottom: 24px; }
.section-heading > p:last-child { color: var(--muted); }

/* Controls use one visual rhythm across every workspace. */
button { border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; min-height: 40px; color: #ffffff; background: var(--forest); font-weight: 500; line-height: 1.5; cursor: pointer; transition: background .16s, border-color .16s, box-shadow .16s; }
button:hover { background: var(--forest-dark); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.quiet, button.secondary { border-color: var(--line); color: #345c91; background: transparent; }
button.quiet:hover, button.secondary:hover { border-color: #b0c8e8; color: var(--forest-dark); background: #eaf2ff; }
button.text-button { padding: 7px 0; min-height: 34px; font-size: .8rem; color: var(--muted); background: none; text-align: left; }
button.text-button:hover { color: var(--forest); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
label { display: grid; gap: 8px; margin: 18px 0; color: #52677f; font-size: .86rem; font-weight: 500; line-height: 1.7; }
input, select, textarea { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #ffffff; line-height: 1.7; font-weight: 400; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #526b8a; opacity: 1; }
input:read-only, textarea:read-only { color: #526b8a; background: #f1f5fb; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--forest); }
.card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.auth-grid, .workspace-grid, .inbound-email-grid, .proposal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.auth-grid { max-width: 880px; margin: 38px auto; }
.auth-grid > .section-heading { grid-column: 1 / -1; margin-bottom: 18px; }
.auth-grid > .section-heading h2 { max-width: 650px; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.auth-grid .card { padding: 32px; }
.auth-grid h3 { margin-bottom: 24px; }
#session-check { max-width: 600px; margin: 45px auto; }
.wide, .inbound-email-grid > .wide, .proposal-grid.wide, .proposal-grid > .wide { grid-column: 1 / -1; }
.safety-copy { color: var(--muted); font-size: .8rem; line-height: 1.8; }
.state, .assessment, .pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 7px; color: var(--forest); background: #eaf0e6; font-size: .77rem; font-weight: 500; }
.state[data-state="processing"], .assessment[data-assessment="uncertain"] { color: #806124; background: #f5eddc; }
.state[data-state="proposed"] { color: #47616e; background: #eaf0f2; }
.state[data-state="approved"], .state[data-state="applied"], .state[data-state="completed"], .assessment[data-assessment="yes"] { color: #376149; background: #e6efe3; }
.assessment { white-space: nowrap; }

/* Inbox is a conversation, with its history close by but out of the way. */
.home-heading { align-items: end; margin-bottom: 20px; }
.home-heading h2 { margin-bottom: 0; }
.home-caption { color: #526b8a; font-size: .8rem; padding-bottom: 5px; }
#conversations-panel { display: grid; grid-template-columns: 214px minmax(0, 1fr); grid-template-rows: auto 1fr; min-width: 0; min-height: 610px; border: 1px solid #d8e3f0; border-radius: 14px; background: #ffffff; box-shadow: 0 8px 30px #1a3b6506; overflow: clip; }
.inbox-toolbar { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; padding: 16px 28px; border-bottom: 1px solid #e4ebf4; }
.inbox-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.inbox-heading h3 { margin: 0; font-size: 1rem; letter-spacing: -.025em; }
.inbox-indicator { width: 7px; height: 7px; flex: 0 0 7px; background: #347bdd; border-radius: 50%; box-shadow: 0 0 0 4px #e8f1ff; margin-right: 3px; }
.conversation-phase { margin: 1px 0 0 5px; padding: 3px 8px; border-radius: 5px; background: #edf4fe; color: #466790; font-size: .7rem; line-height: 1.5; }
.conversation-library { position: static; width: auto; padding: 21px 14px; background: transparent; }
.conversation-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.conversation-library-heading h4 { margin: 0; color: #263f61; font-size: .83rem; font-weight: 600; }
.conversation-library-heading button { display: grid; place-content: center; min-height: 30px; width: 30px; padding: 3px; color: #2f66b0; background: #e4eefd; border-color: #c7dafa; border-radius: 7px; font-size: 1.15rem; }
.conversation-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: min(65vh, 640px); overflow-y: auto; scrollbar-gutter: stable; }
.conversation-list li { display: grid; gap: 3px; padding: 7px 0; border-top: 1px solid #e1eaf6; }
.conversation-list button { text-align: left; font-size: .82rem; color: var(--ink); background: transparent; border: 0; border-radius: 7px; padding: 9px 8px; overflow-wrap: anywhere; line-height: 1.7; }
.conversation-list button:hover, .conversation-list [aria-current="true"] { background: var(--accent-soft); }
.conversation-list .entry-meta { padding-inline: 8px; font-size: .69rem; color: #526b8a; }
.conversation-workspace { grid-column: 2; padding: 0 26px 23px; min-width: 0; }
.conversation-detail { display: flex; flex-direction: column; width: min(760px, 100%); min-height: 530px; margin: auto; min-width: 0; }
.conversation-welcome { display: flex; flex: 1; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 270px; padding: 25px 8px 28px; text-align: left; }
.conversation-welcome h3 { margin-bottom: 13px; font-size: clamp(1.45rem, 2.15vw, 2rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.5; color: #183452; }
.conversation-welcome > p:last-child { margin: 0; color: #5c718b; font-size: .9rem; line-height: 1.9; }
.conversation-status:empty, .conversation-turns:empty, .conversation-recovery:has(> [hidden]:only-child) { display: none; }
.conversation-status { margin: 22px 0 12px; border-left: 2px solid #7fa6dd; padding: 8px 14px; color: #526b8a; font-size: .82rem; background: #edf4fe; border-radius: 0 7px 7px 0; overflow-wrap: anywhere; }
.conversation-turns { list-style: none; padding: 8px 1px; margin: 0 0 14px; max-height: min(53vh, 570px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.conversation-turn { padding: 17px 20px; border-radius: 11px; margin-block: 16px; overflow-wrap: anywhere; }
.conversation-turn-human { margin-left: 9%; background: #e9f1fd; border: 1px solid #d8e5f8; border-bottom-right-radius: 3px; }
.conversation-turn-assistant { margin-right: 3%; border-left: 2px solid #83ace4; border-radius: 0; padding-left: 20px; }
.conversation-turn-status { border: 1px solid #e6dcc8; background: #f8f3e9; }
.entry-meta { color: #526b8a; font-size: .73rem; line-height: 1.7; }
.conversation-turn .entry-meta { margin-bottom: 10px; }
.conversation-text, #conversation-pending pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .98rem; line-height: 1.95; }
.conversation-turn .conversation-text { margin-bottom: 12px; }
.conversation-turn > button { margin: 5px 7px 0 0; padding: 5px 8px; min-height: 28px; font-size: .71rem; border: 0; color: #526b8a; }
.conversation-turn-assistant > button { border: 1px solid #dce7f7; padding: 8px 12px; min-height: 36px; color: var(--forest); font-size: .82rem; }
.conversation-waiting { display: flex; align-items: center; gap: 11px; min-height: 42px; margin: 12px 0 20px; color: #526b8a; font-size: .83rem; }
.waiting-orbit { width: 17px; height: 17px; border: 1.5px solid #d1e2f9; border-top-color: #377bd8; border-radius: 50%; animation: waiting-rotate 1.4s linear infinite; }
.waiting-dots { display: inline-block; width: 1.2em; margin-left: 2px; }
.waiting-dots::after { content: "."; animation: waiting-dots 1.7s steps(1, end) infinite; }
.inbox-composer { margin-top: auto; padding: 17px 18px 15px; border: 1px solid #a9c6ee; border-radius: 12px; background: #ffffff; box-shadow: 0 4px 18px #24518b0b, 0 0 0 4px #f1f6fd; transition: border-color .18s, box-shadow .18s; }
.inbox-composer:focus-within { border-color: #6f9ee0; box-shadow: 0 0 0 4px #e7f0fd, 0 7px 20px #24518b0c; }
.composer-label { display: flex; align-items: center; gap: 11px; margin: 0 0 10px; color: #35557e; font-size: .8rem; font-weight: 600; }
.composer-label span { color: #526b8a; font-size: .76rem; font-weight: 400; }
#conversation-text { min-height: 85px; max-height: 40vh; margin: 0; padding: 5px 0; border: 0; background: transparent; border-radius: 0; font-size: 1rem; line-height: 1.85; }
#conversation-text:focus { outline: none; }
.composer-footer { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 11px; }
.composer-footer .safety-copy { margin: 0; font-size: .82rem; color: #526b8a; }
#conversation-save { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 84px; padding: 8px 13px; border-radius: 9px; font-size: .85rem; }
#conversation-save svg { width: 17px; height: 17px; }
.conversation-recovery { margin-top: 17px; }
.pending-workspace-card { margin-top: 24px; }
#conversation-pending-section, #proposal-panel { margin-bottom: 24px; }
#proposal-panel { background: #f5f9ff; border-color: #bfd3ee; box-shadow: none; }
#proposal-panel > h3 { display: flex; align-items: center; gap: 9px; }
#proposal-panel > h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3274ce; }
#proposal-panel > p { font-size: .84rem; color: var(--muted); }
.proposal-operation { border-top: 1px solid #d6e4f7; padding: 20px 0; }
.proposal-operation h4 { margin-bottom: 15px; }
.proposal-operation label { display: flex; align-items: center; gap: 9px; margin: 10px 0; }
.proposal-operation input[type="checkbox"], .proposal-operation input[type="radio"] { flex: 0 0 auto; margin: 0; }
#proposal-content dl { display: grid; grid-template-columns: minmax(100px, 1fr) 3fr; gap: 9px 20px; font-size: .88rem; }
#proposal-content dt { color: var(--muted); }
#proposal-content dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
#proposal-panel .actions button { font-size: .8rem; }

/* Resource lists and detail surfaces share the same calm hierarchy. */
.task-workspace { display: grid; grid-template-columns: minmax(215px, 270px) minmax(0, 1fr); gap: 22px; align-items: start; }
.task-library { min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 17px; background: #f7faff; box-shadow: none; }
.task-library > label:first-child { margin-top: 2px; }
.task-library > button { font-size: .8rem; }
.task-list { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 8px; max-height: min(64vh, 760px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.task-list-item, #case-list button { display: grid; gap: 8px; width: 100%; padding: 13px 14px; color: var(--ink); background: #eef4fc; border: 1px solid transparent; border-radius: 9px; text-align: left; overflow-wrap: anywhere; }
.task-list-item:hover, .task-list-item[aria-current="true"], #case-list button:hover, #case-list button[aria-current="true"] { background: #e2edfd; border-color: #a9c5e9; }
.task-list-title { font-size: .88rem; line-height: 1.75; font-weight: 500; }
.task-list-phase { color: #6b7c5d; font-size: .73rem; font-weight: 400; }
.task-detail .workspace-grid { grid-template-columns: 1fr; gap: 18px; }
.task-detail .state { max-width: 100%; white-space: pre-wrap; line-height: 1.6; }
.detail-heading, .artifact-heading, .message-heading, .proposal-title { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.detail-heading h3 { max-width: 100%; overflow-wrap: anywhere; font-size: 1.3rem; line-height: 1.7; }
.detail-heading button { flex-shrink: 0; font-size: .78rem; }
.empty-state { min-height: 230px; display: grid; place-content: center; border: 1px solid #dce6f3; border-radius: 12px; padding: 45px 30px; color: #536d89; background: #ffffff; text-align: center; font-size: .91rem; line-height: 1.9; }
.proposal-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 20px; }
.proposal-fields dt { color: var(--muted); font-size: .82rem; font-weight: 500; }
.proposal-fields dd { margin: 0; overflow-wrap: anywhere; line-height: 1.7; }
.event-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#event-form, #event-semantics, #event-history, #task-record-form, #task-record-lifecycle, #task-record-history { margin-top: 18px; }
#event-summary dd, #task-record-fields dd, #task-record-dod li, #task-record-history-list dd { white-space: pre-wrap; overflow-wrap: anywhere; }
#event-history-list, #task-record-history-list { padding-left: 22px; }
#event-history-list li, #task-record-history-list li { margin-block: 16px; }
#event-retry { margin-top: 16px; }
#task-record-panel { margin-bottom: 20px; }
.revision-history-list { max-height: min(50vh, 480px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.workspace-entry-panel { margin-top: 24px; }
.entry-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
#cases-panel .task-workspace > * { min-width: 0; }
#case-context-items form { margin-block: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
#case-context, #case-flow, #workspace-links-panel { margin-top: 22px; }
#workspace-links-panel > section + section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
#workspace-links-panel li, #case-flow-content li { margin-bottom: 18px; overflow-wrap: anywhere; }
#attention-section-filter { max-width: 280px; }
#attention-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-height: none; }
#work-facts { display: grid; grid-template-columns: minmax(95px, 1fr) 2fr; gap: 10px 16px; }
#work-facts dt { color: var(--muted); font-size: .83rem; }
#work-facts dd { margin: 0; overflow-wrap: anywhere; }
#work-detail h4 { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 26px; }
pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.9; }
summary { cursor: pointer; line-height: 1.8; }

/* Optional email surfaces use the same components without visual exceptions. */
.inbound-email-panel { margin-top: 60px; border-top: 1px solid var(--line); padding-top: 38px; }
.forwarding-alias { display: block; overflow-wrap: anywhere; border: 1px dashed #abc6e9; border-radius: 10px; padding: 16px; color: var(--forest-dark); background: #eaf2ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .87rem; }
.message-list { display: grid; gap: 10px; }
.message-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 18px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--ink); background: white; text-align: left; }
.message-list button:hover, .message-list button[aria-current="true"] { border-color: #aac5eb; background: #edf4fe; }
.message-list .message-subject { font-weight: 500; }
.message-list .message-sender, .message-list .message-date, .message-list .message-status { color: var(--muted); font-size: .77rem; }
.message-list .message-date, .message-list .message-status { text-align: right; }
.message-body, .reply-draft { max-height: 28rem; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: white; }
.proposal-heading { grid-column: 1 / -1; margin-bottom: 0; }
.proposal-card { min-width: 0; }
.proposal-card:last-of-type { grid-column: 1 / -1; }
.proposal-decision { margin: 20px 0 0; border: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
.proposal-decision legend { padding: 0 0 8px; font-size: .85rem; font-weight: 500; }
.proposal-decision label { display: inline-flex; align-items: center; margin: 4px 18px 4px 0; }
#notice { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: min(470px, calc(100% - 32px)); border: 1px solid #376594; border-radius: 13px; padding: 15px 20px; color: white; background: #224979; box-shadow: 0 10px 40px #193b6625; font-size: .87rem; line-height: 1.8; }
#notice[data-kind="error"] { background: #8f4438; border-color: #a8665c; }


/* Conversation navigation stays beside the work on a desktop. */
.blue-conversation-library { grid-column: 1; grid-row: 1 / span 2; min-width: 0; border-right: 1px solid #dce7f5; background: #f4f8fe; }
.blue-conversation-library > summary { display: none; }
.conversation-library-note { margin: 0 0 12px; color: #657b95; font-size: .72rem; line-height: 1.75; }
.desk-symbol { position: relative; width: 78px; height: 75px; margin-bottom: 20px; }
.desk-symbol-back { position: absolute; top: 5px; left: 6px; width: 48px; height: 56px; border: 1px solid #bdd0eb; border-radius: 10px; background: #dfebfc; transform: rotate(-12deg); }
.desk-symbol-front { position: absolute; top: 12px; left: 20px; display: flex; flex-direction: column; gap: 6px; width: 48px; height: 57px; padding: 14px 9px; border: 1px solid #a5c1e9; border-radius: 10px; background: linear-gradient(150deg, #ffffff, #edf4ff); box-shadow: 0 5px 12px #2b62a513; transform: rotate(6deg); }
.desk-symbol-front span { height: 3px; border-radius: 2px; background: #8bafe0; }
.desk-symbol-front span:nth-child(2) { width: 80%; background: #bed1ed; }
.desk-symbol-front span:nth-child(3) { width: 55%; background: #d2dff1; }
.desk-symbol-dot { position: absolute; right: 0; bottom: 2px; width: 15px; height: 15px; border: 3px solid #ffffff; border-radius: 50%; background: #347de2; box-shadow: 0 1px 5px #2d63ab20; }
.capture-button:hover { background: #3c597b; }

@keyframes waiting-rotate { to { transform: rotate(360deg); } }
@keyframes waiting-dots { 0%, 100% { content: "."; } 33% { content: ".."; } 66% { content: "…"; } }
@keyframes surface-enter { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) { .conversation-detail { min-height: 590px; } }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 160px minmax(0, 1fr); gap: 20px; }
  .app-sidebar { padding-inline: 10px; }
  .nav-item { padding-inline: 10px; gap: 9px; }
  .capture-button { font-size: .73rem; }
  .task-workspace { grid-template-columns: 1fr; }
  .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 35vh; }
  .home-caption { display: none; }
}
@media (max-width: 1050px) {
  #conversations-panel { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; min-height: 0; }
  .blue-conversation-library { grid-column: 1; grid-row: 2; border-right: 0; border-bottom: 1px solid #dce7f5; }
  .blue-conversation-library > summary { display: flex; align-items: center; gap: 9px; padding: 13px 22px; color: #385b88; font-size: .83rem; cursor: pointer; list-style: none; }
  .blue-conversation-library > summary::-webkit-details-marker { display: none; }
  .blue-conversation-library > summary svg { width: 17px; height: 17px; }
  .blue-conversation-library > summary::after { content: "⌄"; margin-left: auto; }
  .blue-conversation-library[open] > summary::after { transform: rotate(180deg); }
  .conversation-library { padding: 4px 22px 18px; }
  .conversation-list { max-height: 260px; }
  .inbox-toolbar { grid-column: 1; grid-row: 1; min-height: 60px; padding: 15px 22px; }
  .conversation-workspace { grid-column: 1; padding-inline: 22px; }
  .conversation-detail { min-height: 505px; }
  .conversation-welcome { min-height: 250px; }
  .overview-heading, .panel-heading { align-items: start; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .topbar, main { width: calc(100% - 28px); }
  .topbar { min-height: 72px; }
  .brand-caption { display: none; }
  .brand-mark { width: 25px; height: 25px; }
  .brand { gap: 9px; }
  h1 { font-size: 1.35rem; }
  #logout { font-size: .76rem; padding: 8px 11px; }
  main { padding-top: 15px; }
  .app-shell { grid-template-columns: 1fr; gap: 20px; }
  .app-sidebar { position: static; min-height: 0; padding: 6px; border-radius: 11px; }
  .nav-group-label, .sidebar-note, .capture-button { display: none; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin: 0; }
  .nav-item { flex-direction: column; gap: 6px; min-height: 59px; padding: 9px 1px; text-align: center; font-size: .67rem; border-radius: 7px; }
  .nav-item[aria-current="page"] { box-shadow: inset 0 -2px 0 #91bafe; }
  .nav-item svg { width: 18px; height: 18px; flex-basis: 18px; }
  .overview-heading, .panel-heading { gap: 14px; margin-bottom: 19px; }
  .overview-heading h2, .panel-heading h2 { font-size: 1.55rem; }
  .overview-copy { font-size: .82rem; }
  .home-heading { margin-bottom: 16px; }
  .home-heading .eyebrow { margin-bottom: 5px; font-size: .59rem; }
  #conversations-panel { border-radius: 11px; }
  .inbox-toolbar { min-height: 53px; padding: 12px 17px; }
  .conversation-phase { font-size: .67rem; }
  .blue-conversation-library > summary { padding: 11px 17px; font-size: .78rem; }
  .conversation-library { padding-inline: 17px; }
  .conversation-workspace { padding: 0 15px 18px; }
  .conversation-detail { min-height: 410px; }
  .conversation-welcome { min-height: 190px; padding: 18px 4px 21px; }
  .desk-symbol { width: 67px; height: 52px; transform: scale(.7); transform-origin: left top; margin-bottom: 7px; }
  .conversation-welcome h3 { font-size: 1.4rem; margin-bottom: 9px; }
  .conversation-welcome > p:last-child { font-size: .82rem; }
  .inbox-composer { padding: 14px; border-radius: 9px; box-shadow: 0 0 0 3px #f1f6fd; }
  .composer-footer { gap: 9px; }
  .composer-footer .safety-copy { font-size: .78rem; line-height: 1.75; }
  .composer-label span { display: none; }
  #conversation-text { font-size: 1rem; min-height: 84px; }
  .conversation-turns { max-height: 46vh; }
  .conversation-turn { padding: 15px; }
  .conversation-turn-human { margin-left: 5%; }
  .conversation-turn-assistant { margin-right: 0; }
  .conversation-text { font-size: .94rem; }
  .auth-grid, .workspace-grid, .inbound-email-grid, .proposal-grid { grid-template-columns: 1fr; }
  .auth-grid { margin-top: 20px; }
  .auth-grid .card { padding: 25px; }
  .wide, .inbound-email-grid > .wide, .proposal-grid.wide, .proposal-grid > .wide, .proposal-heading, .proposal-card:last-of-type { grid-column: auto; }
  .task-list, #attention-list { grid-template-columns: 1fr; }
  .card { padding: 19px; border-radius: 10px; }
  .event-field-grid { grid-template-columns: 1fr; gap: 0; }
  .message-list button { grid-template-columns: 1fr; }
  .message-list .message-date, .message-list .message-status { text-align: left; }
  .detail-heading { gap: 10px; flex-wrap: wrap; }
  .proposal-fields { grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 10px 14px; }
  #proposal-content dl { display: block; }
  #proposal-content dd { margin: 5px 0 15px; }
  #notice { right: 14px; bottom: 14px; }
}
@media (max-width: 380px) {
  .topbar, main { width: calc(100% - 20px); }
  .nav-item { font-size: .61rem; }
  .conversation-workspace { padding-inline: 12px; }
  .inbox-toolbar { padding-inline: 14px; }
  .inbox-composer { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .waiting-dots::after { content: "…"; }
}
