:root { color-scheme: light; --tint: var(--mint); --error: #963a35; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { font-family: Georgia, serif; font-size: clamp(28px, 3vw, 40px); font-weight: 400; line-height: 1.2; letter-spacing: -.025em; }
h2 { font-size: 19px; line-height: 1.4; }
h3 { font-size: 16px; }
a { color: var(--green); text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; }
input, textarea, select { background: #fff; color: var(--ink); width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 92px; }
button, .button { background: var(--green); color: white; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .button:hover { background: #0c3a2e; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.quiet { background: #fff; color: var(--green); border-color: #afc2b6; }
:focus-visible { outline: 3px solid #b66b13; outline-offset: 3px; }
label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
small, .muted { color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.environment { background: #eae6d8; border-bottom: 1px solid #d8d2be; color: #574722; padding: 8px 24px; font-size: 12px; text-align: center; letter-spacing: .025em; }
.skip { position: absolute; left: 12px; top: -100px; padding: 12px; background: white; z-index: 10; }
.skip:focus { top: 8px; }
.login-card { max-width: 470px; margin: 8vh auto; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.login-card input { margin-bottom: 18px; }
.login-card button { width: 100%; }
.example-login { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.example-login h2 { font-size: 25px; }
.example-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.example-buttons button { flex: 1 1 100px; width: auto; }
#example-login-status:empty { display: none; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 32px; }
.mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 26px Georgia, serif; }
.brand-name { font: 28px Georgia, serif; letter-spacing: -.04em; }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 37px); }
.rail { background: #173e34; color: #f5f4ec; padding: 32px 20px; display: flex; flex-direction: column; gap: 24px; }
.rail .brand { margin: 0 4px; }
.rail .eyebrow, .rail .muted { color: #c3d5c9; }
.rail nav { display: grid; gap: 6px; }
.rail nav a { color: #dae5de; padding: 11px 12px; border-radius: 8px; text-decoration: none; display: flex; gap: 12px; font-size: 15px; }
.rail nav a[aria-current=page] { background: #e8efdf; color: #173e34; font-weight: 700; }
.rail nav a:hover { box-shadow: inset 0 0 0 1px #89a995; }
.rail nav a span { font-size: 12px; opacity: .8; padding-top: 3px; }
.rail-bottom { margin-top: auto; border-top: 1px solid #466155; padding-top: 20px; }
.rail-bottom a { color: #e8efdf; display: block; margin: 10px 0 20px; font-size: 14px; }
.rail-bottom button { width: 100%; background: transparent; border-color: #789387; }
main.workspace { padding: 28px 32px 40px; min-width: 0; max-width: 1700px; width: 100%; margin: auto; }
.topbar { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.topbar p { margin: 0; overflow-wrap: anywhere; }
.identity { min-width: 0; }
.identity b { display: block; }
.scope { border-left: 2px solid #a5b9a0; padding-left: 14px; min-width: 0; }
.page-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.case-selector { width: 100%; max-width: 360px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .85fr); gap: 24px; align-items: start; }
.context, .card, .chat-panel { min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 18px; }
.card-title { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.overview-intro { border-top: 3px solid #698865; }
.notice { padding: 12px 14px; background: #faf3e3; border-left: 3px solid #b68f45; color: #624c25; font-size: 14px; margin-top: 16px; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.count { border-right: 1px solid var(--line); }
.count:last-child { border-right: 0; }
.count b { display: block; font: 34px Georgia, serif; }
.count span { font-size: 13px; color: var(--muted); }
.status-tag { display: inline-block; padding: 3px 9px; border: 1px solid #cbd8c9; background: var(--tint); border-radius: 5px; color: #355339; font-size: 12px; overflow-wrap: anywhere; }
.state-box { background: #f8f9f6; border: 1px dashed #c9d1c6; border-radius: 8px; padding: 18px; margin: 12px 0; }
.state-box p:last-child { margin-bottom: 0; }
.state-box.error { background: #fff6f3; color: var(--error); border-color: #d9b1a9; }
.state-box.loading { color: var(--muted); }
.state-box.loading::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 9px; background: #698865; border-radius: 50%; }
.records { list-style: none; padding: 0; margin: 0; }
.records li { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.records li:last-child { border-bottom: 0; }
.records b, .records small { display: block; }
.area-card { border-top: 3px solid #698865; }
.area-count { font: 28px Georgia, serif; padding: 0 12px; border-left: 1px solid var(--line); }
.finding-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; padding-top: 12px; }
.finding-details summary { color: var(--green); cursor: pointer; font-size: 14px; padding: 8px 0; }
.area-card .status-tag { margin-bottom: 8px; }
.area-card .quiet { margin-top: 16px; }
.capabilities { display: grid; gap: 12px; }
.capability { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.capability:last-child { border-bottom: 0; }
.capability small { color: var(--amber); text-align: right; flex-shrink: 0; }
.chat-panel { background: #fff; border: 1px solid #b9cbbc; border-radius: 12px; overflow: hidden; }
.chat-heading { padding: 20px 22px 15px; background: #eff3e9; border-bottom: 1px solid var(--line); }
.chat-heading p { margin: 0; }
.chat-heading h2 { margin-bottom: 6px; }
.chat-body { padding: 18px 22px; min-height: 200px; max-height: 440px; overflow-y: auto; }
.message { margin: 0 0 18px; max-width: 96%; overflow-wrap: anywhere; }
.message .body { white-space: pre-wrap; background: #f2f5ef; border: 1px solid #e1e8dd; padding: 13px 15px; border-radius: 0 10px 10px 10px; font-size: 15px; line-height: 1.7; }
.message.mine { margin-left: auto; }
.message.mine .body { background: #164e40; color: white; border: 0; border-radius: 10px 0 10px 10px; }
.message small { font-size: 12px; }
.composer { border-top: 1px solid var(--line); padding: 18px 22px; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; }
.composer-foot small { font-size: 12px; }
#send-status { font-size: 14px; margin: 10px 0 0; }
.workspace[data-view=conversa] .content-grid { grid-template-columns: minmax(0, 850px); justify-content: center; }
.workspace[data-view=conversa] .chat-body { max-height: 55vh; }
.footer-note { color: var(--muted); font-size: 13px; margin-top: 24px; max-width: 85ch; }
@media(max-width:1150px) { .content-grid { grid-template-columns: 1fr; } main.workspace { padding: 24px; } .chat-body { max-height: 400px; } }
@media(max-width:800px) {
  .layout { grid-template-columns: 1fr; }
  .rail { padding: 16px 20px; gap: 14px; }
  .rail .brand { margin: 0; }
  .rail nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .rail nav a { justify-content: center; padding: 10px 6px; font-size: 14px; }
  .rail nav a span, .rail > .eyebrow { display: none; }
  .rail-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
  .rail-bottom p { display: none; }
  .rail-bottom a { margin: 0; }
  .rail-bottom button { width: auto; padding: 7px 16px; }
  .page-heading { flex-direction: column; }
  .case-selector { max-width: none; }
}
@media(max-width:620px) {
  .environment { padding: 8px 14px; font-size: 11px; }
  .environment span { display: block; }
  main.workspace { padding: 20px 16px; }
  .rail { padding: 16px; }
  .topbar { gap: 10px; margin-bottom: 22px; }
  .scope { max-width: 46%; font-size: 12px; }
  .card, .chat-heading, .chat-body, .composer { padding: 18px; }
  .count b { font-size: 30px; }
  .capability { display: block; }
  .capability small { display: block; text-align: left; }
  .login-card { margin: 28px 16px; padding: 24px; }
  .composer-foot { align-items: start; }
}
#plan { min-width: 0; }
.plan-item { border-left: 3px solid #698865; }
.plan-item .card-title { align-items: start; flex-wrap: wrap; }
.plan-item h2 { flex: 1; min-width: 130px; overflow-wrap: anywhere; }
.plan-rank { font: 30px Georgia, serif; color: #698865; }
.plan-item-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin-bottom: 16px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#plan details { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
#plan summary { cursor: pointer; color: var(--green); font-weight: 600; padding: 6px 0; }
#plan fieldset { padding: 0; margin: 14px 0 0; border: 0; min-width: 0; }
.plan-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.plan-fields label { min-width: 0; }
.plan-wide { grid-column: 1 / -1; }
#plan pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.7 ui-monospace, monospace; background: #f5f5ef; padding: 14px; max-height: 420px; overflow: auto; }
.plan-hash { overflow-wrap: anywhere; }
@media(max-width:620px) { .plan-fields { grid-template-columns: 1fr; } .plan-actions button { width: 100%; } }

.source-preview { margin: 14px 0; padding: 16px; background: #f5f5ef; border-left: 3px solid var(--green); overflow-wrap: anywhere; }
.source-preview h3 { font-size: 24px; line-height: 1.3; }
.source-preview li { margin-bottom: 8px; }
.source-stale { border-left-color: var(--amber); }
.source-check-message { color: var(--green); }

.proposal-card { border-top: 3px solid var(--green); overflow-wrap: anywhere; }
.proposal-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.7 ui-monospace, monospace; background: var(--paper); padding: 16px; max-height: 360px; overflow: auto; }
.proposal-steps { border-block: 1px solid var(--line); padding-block: 16px; }
.proposal-ack { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; }
.proposal-ack input { width: 22px; min-height: 22px; flex: 0 0 22px; }
.proposal-receipt { background: var(--tint); border-left: 4px solid var(--green); padding: 16px; margin: 16px 0; }
#proposals form { margin: 16px 0; }
#proposals details { margin-top: 18px; }

.example-record { overflow-wrap: anywhere; }
.example-record h2 { margin-top: 12px; }
.example-record details { margin-block: 16px; }
.example-record summary { cursor: pointer; color: var(--green); padding-block: 8px; }
.example-document-text { white-space: pre-wrap; margin-block: 16px; line-height: 1.8; }
.case-selector select + label { margin-top: 12px; }

.workspace[data-example=true] .content-grid { grid-template-columns: minmax(0, 1fr); }
.workspace[data-example=true]:not([data-view=conversa]) .chat-panel { display: none; }

.chat-attachment { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.chat-attachment p { overflow-wrap: anywhere; font-size: 13px; margin-bottom: 0; }

/* The canonical site stylesheet is vendored as cifra-theme.css; tests require byte equality. */
body { line-height: 1.5; }
h1 { font-family: inherit; font-size: clamp(27px, 3vw, 36px); font-weight: 760; line-height: 1.15; letter-spacing: -.03em; }
.environment.demo { height: 30px; padding: 0 10px; border: 0; background: #0e4037; color: #d8eee7; font-size: 11px; letter-spacing: .14em; }
.layout { grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 30px); }
.rail { background: var(--white); color: var(--ink); padding: 24px 16px; gap: 0; }
.rail .brand { gap: 11px; margin: 0; padding: 0 10px 35px; font-size: 20px; }
.rail .mark { width: 34px; height: 34px; border-radius: 11px; border: 0; }
.rail nav { gap: 8px; }
.rail nav a { color: var(--muted); padding: 11px 13px; border-radius: 12px; font-size: 13px; gap: 12px; }
.rail nav a[aria-current=page], .rail nav a:hover { background: var(--mint); color: var(--green); box-shadow: none; }
.rail nav a span { font-size: 13px; padding: 0; opacity: 1; }
.rail-bottom { border-color: var(--line); padding: 20px 6px 0; }
.rail-bottom p { font-size: 13px; margin-bottom: 2px; }
.rail-bottom small { font-size: 11px; display: block; }
.rail-bottom a { color: var(--green); font-size: 12px; }
.rail-bottom button { color: var(--green); border-color: var(--line); margin-top: 14px; }
main.workspace { display: block; width: min(1240px, 100%); max-width: 1240px; padding: 42px 48px 28px; }
.topbar { padding: 0; border: 0; margin-bottom: 24px; }
.topbar h1 { margin: 5px 0 2px; }
.page-heading { align-items: end; }
.page-heading h2 { font-size: 20px; }
.case-selector { max-width: 340px; }
.case-selector select { font-size: 13px; }
.workspace[data-view=conversa] .page-heading > div:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.workspace[data-view=conversa] .page-heading { justify-content: flex-start; margin-bottom: 26px; }
.workspace .content-grid, .workspace[data-example=true] .content-grid { grid-template-columns: minmax(0, 1fr); }
.workspace[data-view=conversa] .content-grid { grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.case-panel { min-width: 0; }
.case-head h2 { font-size: 21px; line-height: 1.25; }
.case-head .status { float: none; display: inline-block; margin: 0; }
.plain p { font-size: 12px; overflow-wrap: anywhere; }
.facts b { font-size: 11px; overflow-wrap: anywhere; max-width: 65%; }
.case-actions .button { min-height: 42px; border-radius: 10px; padding: 10px; font-size: 12px; }
.case-actions .quiet { border: 1px solid var(--line); color: var(--green); background: white; }
.chat-panel { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chat-heading { background: transparent; margin: 0; padding: 20px 22px; align-items: center; justify-content: flex-start; }
.chat-heading h2 { margin: 0; font-size: 15px; }
.chat-heading p { font-size: 10px; }
.chief-avatar { flex: 0 0 43px; }
.chat-body, .workspace[data-view=conversa] .chat-body { background: #fcfdfc; padding: 22px; min-height: 220px; max-height: 500px; }
.message { max-width: 96%; }
.message .body { background: #eff6f3; border: 0; font-size: 13px; line-height: 1.55; padding: 12px 14px; }
.message.mine .body { background: var(--green); }
.message small { font-size: 10px; }
.suggestions { padding: 0 20px 14px; margin: 0; gap: 6px; }
.suggestions button { font-size: 11px; padding: 7px 9px; }
.composer { padding: 15px 20px; }
.compose-box label { font-size: 11px; color: var(--muted); font-weight: 500; }
.compose-box textarea { font: inherit; font-size: 13px; min-height: 54px; padding: 0; }
.compose-box button { min-height: 44px; font-size: 12px; }
.compose-box #send { background: var(--green); color: white; border-radius: 9px; }
.composer-foot small { font-size: 9px; margin-left: auto; max-width: 130px; }
.chat-attachment { border: 0; padding: 0; margin: 6px 0; }
.attachment-help, .chat-safety { font-size: 10px; color: var(--muted); font-weight: 400; }
.chat-safety { text-align: center; margin: 8px 0 0; }
#send-status:empty, #attachment-status:empty, #logout-status:empty { display: none; }
.notice { display: block; padding: 0; background: none; border: 0; color: var(--muted); font-size: 12px; box-shadow: none; }
.dossier-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.dossier-nav a { font-size: 13px; border: 1px solid var(--line); background: white; }
.dossier-nav a[aria-current=page] { color: var(--green); background: var(--mint); }
.footer-note { border-top: 1px solid var(--line); padding-top: 18px; font-size: 10px; }
@media(max-width:1100px) {
  main.workspace { padding: 30px 24px; }
  .workspace[data-view=conversa] .content-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .case-panel { padding: 20px; }
  .composer-foot small { display: none; }
}
@media(max-width:850px) {
  .layout { display: block; }
  .rail { position: static; height: auto; padding: 13px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .brand { padding: 0 0 11px; }
  .rail nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .rail nav a { padding: 9px 10px; min-height: 44px; }
  .rail nav a span { display: inline; }
  .rail-bottom { display: flex; justify-content: flex-end; padding: 0; border: 0; gap: 12px; }
  .rail-bottom p, .rail-bottom small, .rail-bottom details { display: none; }
  .rail-bottom button { margin: 6px 0 0; width: auto; }
  main.workspace { padding: 26px 18px; }
  .workspace[data-view=conversa] .content-grid { grid-template-columns: 1fr; }
  .workspace[data-view=conversa] .case-panel { order: 0; }
  .workspace[data-view=conversa] .chat-panel { order: 1; }
}
@media(max-width:600px) {
  .environment.demo { height: auto; min-height: 28px; padding: 7px 10px; font-size: 9px; }
  main.workspace { padding: 22px 14px; }
  .login-card { margin: 24px 14px; padding: 24px; width: auto; }
  .page-heading { align-items: stretch; }
  .case-selector { max-width: none; }
  .chat-heading { padding: 16px; }
  .chat-body, .workspace[data-view=conversa] .chat-body { padding: 16px; max-height: 500px; }
  .composer { padding: 12px; }
  .suggestions { display: flex; padding: 0 12px 12px; }
  .composer-foot { flex-direction: row; justify-content: space-between; }
  .composer-foot button { width: auto; }
}

.attachment-error { color: var(--error); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.topbar .eyebrow { display: inline; font-size: 10px; letter-spacing: .13em; color: #536c63; }
.topbar .muted { font-size: 16px; }
.topbar .notice { display: flex; flex: none; gap: 9px; align-items: center; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); }
.topbar .notice b { font-size: 12px; }
.topbar .notice:hover { background: var(--mint); }
.notifications { box-shadow: var(--shadow); }
.notifications ul { padding: 0; list-style: none; display: grid; gap: 8px; }
.notifications li button { width: 100%; justify-content: flex-start; text-align: left; }
.case-selector label { font-size: 11px; margin-bottom: 4px; }
.case-selector select { font-size: 12px; }
#issue-alert .eyebrow, .case-panel .eyebrow, .lower .eyebrow { font-size: 10px; letter-spacing: .13em; color: #536c63; }
.case-panel .journey { font-size: 9px; color: #536c63; }
.case-panel .facts small { font-size: 14px; }
.case-panel .facts b { text-align: right; }
.case-panel summary { padding: 6px 0; }
.case-head .status { font-size: 9px; }
.case-panel p { margin-bottom: 12px; }
.case-panel .plain p { margin: 0; }
.case-actions button, .case-actions .button { font-size: 12px; font-weight: 750; min-height: 42px; }
.chat-heading button { min-height: 24px; padding: 0; border: 0; color: var(--muted); background: none; }
.chat-heading .chief-avatar { flex: 0 0 43px; }
.chat-panel .team { font-size: 9px; }
.chat-body.messages { align-content: start; gap: 16px; }
.chat-body .message { margin: 0; max-width: min(84%, 680px); min-width: 0; }
.chat-body .message.mine { margin-left: auto; }
.message .message-content { min-width: 0; }
.chat-body .message .body { padding: 0; border: 0; border-radius: 0; background: none; font-size: 12px; line-height: 1.55; }
.chat-body .message small { font-size: 8px; }
.chat-body .message.mine small { color: #d8eee7; }
.chat-body .suggestions { padding: 0; margin-top: 10px; gap: 5px; }
.chat-body .suggestions button { font-size: 9px; padding: 6px 8px; min-height: 28px; border-radius: 9px; }
.compose-box textarea { border-radius: 0; min-height: 64px; padding: 0; resize: vertical; font-size: 12px; }
.compose-box textarea:focus-visible { outline: 2px solid #a65f12; outline-offset: 2px; }
.compose-box .composer-foot { margin-top: 0; gap: 9px; }
.compose-box button { font-size: 10px; padding: 6px 8px; min-height: 32px; }
.compose-box #send { padding: 0; min-height: 32px; width: 32px; flex: 0 0 32px; font-size: 14px; }
.composer-foot small { font-size: 8px; max-width: none; }
.composer .chat-safety { font-size: 8px; margin: 7px 0 0; }
.attachment-help { font-size: 9px; margin: 0; }
.footer-note { max-width: none; margin-top: 30px; }
.lower h2 { font-size: 20px; line-height: 1.5; margin: .83em 0; }
:focus-visible { outline: 3px solid #a65f12; outline-offset: 3px; }
@media(max-width:1000px) {
  .workspace[data-view=conversa] .content-grid { grid-template-columns: 1fr; }
  main.workspace { padding: 32px 28px; }
}
@media(max-width:850px) {
  body:has(.rail) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .rail { position: relative; display: block; backdrop-filter: none; }
  .rail .brand { padding: 0; }
  .rail nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; flex-wrap: nowrap; gap: 0; overflow: visible; padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
  .rail nav a { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; gap: 2px; padding: 6px 2px; font-size: 10px; min-height: 58px; text-align: center; position: relative; }
  .rail nav a span { font-size: 16px; }
  .rail nav a em { position: absolute; top: 0; right: 6px; padding: 0 4px; }
  .rail-bottom { position: absolute; right: 18px; top: 9px; }
  .rail-bottom button { margin: 0; min-height: 38px; font-size: 12px; }
  main.workspace { padding: 26px 18px; }
  .chat-body .suggestions button { min-height: 44px; }
  .compose-box button, .compose-box #send { min-height: 44px; }
  .compose-box #send { width: 44px; flex-basis: 44px; }
  .keyboard-open .rail nav { display: none; }
  .keyboard-open .composer { position: sticky; bottom: var(--keyboard-gap, 0px); background: white; z-index: 21; }
}
@media(max-width:600px) {
  main.workspace { padding: 22px 14px; }
  .topbar .notice { padding: 9px; }
  .topbar .notice b { display: none; }
  .topbar h1 { font-size: 25px; }
  .case-panel { padding: 19px; }
  .chat-heading { align-items: flex-start; }
  .chat-body .message { max-width: 96%; }
  .chat-body .suggestions { display: grid; }
  .composer-foot small { display: none; }
}


#message { scroll-margin-block: 30px 120px; }

.plain h3 { font-size: 15px; }

@media(max-width:850px) { .composer { scroll-margin-bottom: calc(88px + env(safe-area-inset-bottom)); } }

.chat-first.layout { display: block; min-height: calc(100dvh - 28px); }
.environment.demo { height: 28px; min-height: 28px; padding: 4px 12px; letter-spacing: .02em; font-size: 12px; line-height: 20px; }
.chat-first main.workspace { width: min(100%, 1040px); margin: 0 auto; padding: 20px 28px; }
.chat-first .topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.chat-first .identity { min-width: 0; display: flex; align-items: center; gap: 18px; }
.chat-first .identity .brand { flex: none; margin: 0; font-size: 20px; }
.chat-first .identity h1 { font-size: 16px; line-height: 1.4; letter-spacing: 0; margin: 0; overflow-wrap: anywhere; }
.account-controls { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.account-controls button { min-height: 44px; }
.chat-first .workspace[data-view=conversa] .content-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.chat-first .workspace[data-view=conversa] .page-heading { margin-bottom: 16px; }
.chat-first .chat-heading { padding: 16px 20px 8px; }
.chat-first .chat-heading button { min-width: 44px; min-height: 44px; margin-left: auto; }
.chat-tools { padding: 0 20px 10px; }
.chat-tools button { font-size: 12px; min-height: 36px; }
#chat-context-status:empty { display: none; }
#chat-context-status .state-box { margin: 8px 20px; }
.chat-first .workspace .chat-body { min-height: 180px; max-height: min(40dvh, 400px); }
.chat-first .chat-body .message .body { font-size: 14px; }
.chat-first .chat-body .message small { font-size: 11px; }
.chat-first .chat-body .suggestions button { font-size: 12px; min-height: 36px; }
.chat-first .suggestions button:hover { background: var(--mint); color: var(--green); }
.chat-first .compose-box textarea { font-size: 16px; }
.chat-first .compose-box button { font-size: 12px; min-height: 44px; }
.chat-first .compose-box #send { min-height: 44px; width: 44px; flex-basis: 44px; }
.chat-first .attachment-help, .chat-first .composer .chat-safety { font-size: 12px; }
@media(max-width:600px) {
  .chat-first main.workspace { padding: 14px 12px; }
  .chat-first .topbar { gap: 8px; align-items: flex-start; margin-bottom: 12px; }
  .chat-first .identity { flex-direction: column; align-items: flex-start; gap: 6px; }
  .chat-first .identity h1 { font-size: 14px; }
  .account-controls { gap: 6px; }
  .account-controls #logout { padding: 8px 12px; }
  .chat-first .chat-heading { padding: 12px; }
  .chat-first .chat-heading h2 { font-size: 14px; }
  .chat-first .chat-heading p { font-size: 11px; }
  .chat-first .chat-tools { padding: 0 12px 8px; }
  .chat-first .workspace .chat-body { max-height: min(30dvh, 250px); min-height: 130px; padding: 12px; }
  .chat-first .chat-body .suggestions button { min-height: 44px; }
  .chat-first .composer { padding: 12px; }
}
