:root {
  --canvas: #edf3f4;
  --surface: #ffffff;
  --subtle: #f5f8f9;
  --ink: #18343d;
  --muted: #526a73;
  --line: #d5e0e3;
  --petrol: #153e48;
  --petrol-light: #c9e0e5;
  --accent: #14685f;
  --accent-hover: #0b514a;
  --selected: #e5f1ee;
  --amber: #f8e4b7;
  --amber-ink: #71510c;
  --error: #9a3931;
  --focus: #a26311;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .22em; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: #b9dbd4; color: #18343d; }
input, textarea { caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #627780; opacity: 1; }
* { scrollbar-color: #819da6 #eef3f4; scrollbar-width: thin; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 30px; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -.015em; }
h3 { font-size: 15px; font-weight: 650; }
h4 { font-size: 13px; font-weight: 650; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.app-bar { background: var(--petrol); color: white; }
.app-bar-inner { max-width: 1440px; padding: 0 36px; margin: auto; height: 70px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: white; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.brand svg { width: 29px; height: 29px; stroke: #c7e2df; }
.bar-divider { height: 22px; width: 1px; background: #52717a; }
.business-name { font-size: 13px; color: var(--petrol-light); }
.bar-link { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: #e4f3f6; text-decoration: none; min-height: 42px; }
.bar-link:hover { color: white; text-decoration: underline; }
.bar-link svg { width: 16px; height: 16px; }
.demo-strip { min-height: 38px; padding: 8px 24px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #435f69; background: #dfeaec; font-size: 11px; }
.demo-tag { font-weight: 650; color: #254b55; white-space: nowrap; }
.customer-main { max-width: 1248px; margin: 0 auto; padding: 35px 32px 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-heading p, .owner-heading p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; padding: 10px 15px; font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s ease-out, color .15s ease-out; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button.secondary:hover:not(:disabled) { background: #e8eff1; }
.full-button { width: 100%; }
.text-button { color: var(--accent); background: none; border: 0; padding: 8px 3px; min-height: 38px; font-size: 12px; font-weight: 600; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: .22em; }
.customer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(350px, 1fr); gap: 24px; align-items: start; }
.conversation-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.panel-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 15px; }
.panel-header p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.panel-header .text-button { margin-left: auto; font-size: 11px; }
.desk-avatar { display: grid; place-items: center; width: 40px; height: 40px; background: #e4eeef; color: var(--petrol); border-radius: 12px; flex-shrink: 0; }
.chat-log { padding: 26px 24px 12px; min-height: 276px; max-height: 425px; overflow-y: auto; }
.bubble { padding: 0 0 22px; max-width: 92%; line-height: 1.65; font-size: 14px; }
.bubble p { overflow-wrap: anywhere; white-space: pre-wrap; }
.speaker { display: block; font-size: 11px; font-weight: 650; color: var(--accent); margin-bottom: 7px; }
.bubble.customer { margin: 0 0 23px auto; padding: 13px 16px; background: #eaf0f6; color: #243f50; border-radius: 12px 12px 3px 12px; max-width: 86%; }
.bubble.customer .speaker { color: #425e70; }
.bubble-meta { display: block; margin-top: 10px; font-size: 11px; color: var(--muted); }
.source-chip { color: var(--accent); background: none; border: 0; display: inline-block; padding: 8px 10px 8px 0; text-align: left; font-size: 11px; text-decoration: underline; text-underline-offset: .22em; }
.inline-action { display: block; padding: 10px 0 2px; font-size: 12px; font-weight: 650; background: none; border: 0; color: var(--accent); text-align: left; }
.inline-action:hover { text-decoration: underline; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 22px 20px; }
.suggestions button { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: #3e5f69; font-size: 11px; text-align: left; min-height: 36px; }
.suggestions button:hover { background: var(--subtle); }
.composer { display: flex; align-items: center; gap: 8px; margin: 0 20px; padding: 8px 8px 8px 14px; background: var(--subtle); border: 1px solid #b8cbd0; border-radius: 10px; }
.composer:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.composer input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 8px 0; font-size: 13px; }
.send-button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: var(--accent); color: white; display: grid; place-items: center; }
.send-button:hover:not(:disabled) { background: var(--accent-hover); }
.chat-bottom { padding: 12px 22px 17px; }
.chat-footnote { color: var(--muted); font-size: 10px; line-height: 1.5; }
.chat-status { font-size: 12px; color: var(--muted); padding: 0 22px 12px; }
.chat-status:empty { display: none; }
#retry-question { padding-bottom: 0; }
.next-panel { background: #f7fafb; border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; min-width: 0; }
.panel-intro .section-icon { width: 29px; height: 29px; color: var(--accent); margin-bottom: 16px; }
.panel-intro h2 { font-size: 21px; margin-bottom: 10px; }
.panel-intro p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.handoff-steps { list-style: none; padding: 0; margin: 25px 0; }
.handoff-steps li { display: flex; gap: 13px; padding: 0 0 20px; }
.handoff-steps li:last-child { padding-bottom: 0; }
.handoff-steps li>span { width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: #e1ebeb; color: #2b5658; font-size: 11px; font-weight: 650; }
.handoff-steps strong { font-size: 13px; font-weight: 650; }
.handoff-steps p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.microcopy { text-align: center; font-size: 11px; color: var(--muted); margin-top: 11px; }
.knowledge-details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.knowledge-details summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; }
.knowledge-details summary::-webkit-details-marker { display: none; }
.knowledge-details summary svg { width: 16px; height: 16px; }
.knowledge-details[open] summary svg { transform: rotate(180deg); }
.facts-list { margin-top: 20px; }
.facts-list article+article { margin-top: 17px; }
.facts-list h3 { font-size: 12px; margin-bottom: 5px; }
.facts-list p { font-size: 12px; color: var(--muted); }
.workspace-caption { margin: 23px 0 0; font-size: 12px; color: #48646d; }
.site-footer { margin: 20px auto 0; max-width: 1440px; padding: 22px 36px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
.request-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.request-heading h2 { font-size: 19px; }
.request-heading p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: #e8eff1; }
.example-button { padding: 10px 0; margin: 8px 0 15px; font-size: 12px; border: 0; color: var(--accent); background: none; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-width: 0; padding: 10px; border: 1px solid #bdced3; border-radius: 7px; background: white; color: var(--ink); font-size: 12px; }
.form-grid input, .form-grid select { min-height: 41px; }
.form-grid textarea { resize: vertical; }
.form-grid small, .optional { font-size: 10px; font-weight: 400; color: var(--muted); }
.full-width { grid-column: 1/-1; }
.form-continue { margin-top: 21px; }
.form-error { margin-top: 14px; font-size: 12px; color: var(--error); white-space: pre-wrap; }
.form-error:empty { display: none; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 20px; margin: 22px 0; }
.review-grid>div { min-width: 0; }
.review-grid dt { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.review-grid dd { margin: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.review-grid>div:last-child:nth-child(odd) { grid-column: 1/-1; }
.consent { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.consent input { accent-color: var(--accent); width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.form-actions .button { padding: 10px 13px; font-size: 12px; }
.success-step { padding: 10px 0; }
.success-icon { width: 46px; height: 46px; color: var(--accent); margin-bottom: 20px; }
.success-step h2 { font-size: 23px; margin-bottom: 12px; }
.success-step p { font-size: 13px; margin-bottom: 18px; }
.success-step .full-button { margin: 7px 0 10px; }
.reference-number { font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); white-space: nowrap; }
#saved-id { color: var(--accent); display: inline-block; padding: 3px 7px; background: var(--selected); border-radius: 5px; }
.owner-main { max-width: 1440px; margin: 0 auto; padding: 28px 32px 10px; }
.owner-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.owner-heading h1 { font-size: 28px; }
.queue-summary { display: flex; gap: 20px; font-size: 12px; color: var(--muted); }
.queue-summary strong { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.owner-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 24px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tabs button { background: none; border: 0; color: var(--muted); border-radius: 7px; font-size: 12px; padding: 9px 13px; min-height: 36px; }
.filter-tabs button[aria-pressed=true] { background: var(--petrol); color: white; }
.filter-tabs button:hover:not([aria-pressed=true]) { background: #dee9ec; }
.small-button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.small-button svg { width: 16px; height: 16px; }
.owner-grid { display: grid; grid-template-columns: 246px minmax(0,1fr); gap: 20px; margin-top: 21px; align-items: start; }
.inbox-panel { background: #e1ecee; border-radius: var(--radius); min-width: 0; overflow: hidden; }
.list-title { font-size: 12px; font-weight: 650; padding: 17px 17px 14px; color: #375f69; }
.request-list { display: grid; gap: 1px; padding: 0 7px 7px; }
.request-card { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 9px; background: none; padding: 16px 13px; text-align: left; color: var(--ink); }
.request-card:hover { background: #ecf4f5; }
.request-card.selected { background: var(--surface); border-color: #bdd0d5; }
.request-card strong { font-size: 15px; font-weight: 650; }
.request-card>span { font-size: 12px; overflow-wrap: anywhere; }
.request-card .card-meta { font-size: 10px; color: var(--muted); line-height: 1.6; font-variant-numeric: tabular-nums; }
.request-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; min-height: 430px; }
.detail-top { padding: 23px 25px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.request-identity { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.request-identity h2 { font-size: 25px; }
.detail-top p { margin-top: 7px; font-size: 11px; }
.status-pill { background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.status-pill[data-state=reviewed] { background: #ddefe7; color: #215a46; }
.status-pill[data-state=archived] { background: #e8edf0; color: #4a616a; }
.detail-grid { display: grid; grid-template-columns: minmax(270px,.94fr) minmax(310px,1.06fr); }
.inquiry-sheet { min-width: 0; padding: 24px 25px; }
.reply-sheet { min-width: 0; border-left: 1px solid var(--line); background: #fbfcfd; padding: 24px; border-bottom-right-radius: var(--radius); }
.inquiry-sheet .review-grid { gap: 20px 16px; }
.consent-receipt { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 25px; color: var(--accent); }
.consent-receipt svg { width: 17px; height: 17px; }
.consent-receipt strong { display: block; font-size: 11px; font-weight: 600; }
.consent-receipt p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.decision-note { margin-top: 24px; }
.decision-note p { margin-top: 6px; font-size: 12px; color: var(--muted); }
.reply-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.draft-label { font-size: 10px; color: var(--muted); }
.reply-sheet>.small { margin: 7px 0 14px; }
#reply-draft { width: 100%; min-height: 290px; padding: 14px; border: 1px solid #bfcfd5; border-radius: 8px; background: white; color: var(--ink); resize: vertical; font-size: 12px; line-height: 1.75; }
.owner-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.owner-actions .button { font-size: 12px; padding: 9px 13px; min-height: 39px; }
.secondary-actions { display: flex; align-items: center; gap: 14px; margin-top: 7px; flex-wrap: wrap; }
.secondary-actions .text-button { font-size: 11px; }
.secondary-actions span { margin-left: auto; font-size: 10px; }
.save-notice { font-size: 12px; color: var(--accent); margin-top: 10px; }
.empty-state { padding: 60px 35px; max-width: 570px; margin: 0 auto; text-align: center; }
.empty-state svg { width: 44px; height: 44px; color: #547e87; margin-bottom: 20px; }
.empty-state h2 { font-size: 23px; text-wrap: balance; }
.empty-state p { font-size: 13px; color: var(--muted); margin: 12px 0 23px; max-width: 44ch; margin-inline: auto; }
.empty-list { font-size: 12px; padding: 12px; }
.owner-boundary { font-size: 11px; color: var(--muted); padding-top: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 6px; left: 10px; z-index: 20; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; background: white; color: var(--ink); }
.skip:focus { width: auto; height: auto; overflow: visible; clip-path: none; padding: 10px; }
@keyframes saved { from { background: #d2e9df; } to { background: var(--selected); } }
#saved-id { animation: saved .6s ease-out; }
@media (max-width:1180px) {
 .owner-grid { grid-template-columns: 220px minmax(0,1fr); gap: 16px; }
 .detail-grid { grid-template-columns: 1fr; }
 .reply-sheet { border-left: 0; border-top: 1px solid var(--line); }
 .inquiry-sheet .review-grid { grid-template-columns: 1fr 1fr 1fr; }
 .inquiry-sheet .review-grid>div:last-child { grid-column: 1/-1; }
 #reply-draft { min-height: 240px; }
}
@media (max-width:900px) {
 .app-bar-inner { padding-inline: 24px; gap: 16px; }
 .customer-main { padding: 28px 24px; }
 .customer-grid { grid-template-columns: minmax(0,1fr) minmax(310px,.9fr); gap: 17px; }
 .next-panel { padding: 20px; }
 .panel-header { padding: 16px; gap: 9px; }
 .panel-header .text-button { max-width: 84px; font-size: 10px; }
 .chat-log { padding: 22px 18px 12px; }
 .owner-main { padding-inline: 24px; }
}
@media (max-width:720px) {
 .app-bar-inner { height: 62px; padding-inline: 18px; gap: 12px; }
 .brand { font-size: 18px; gap: 7px; }
 .brand svg { width: 26px; height: 26px; }
 .bar-divider, .business-name { display: none; }
 .bar-link { font-size: 11px; gap: 5px; }
 .demo-strip { align-items: flex-start; font-size: 10px; gap: 8px; padding: 9px 18px; justify-content: flex-start; }
 .customer-main { padding: 25px 18px 14px; }
 .page-heading { display: block; margin-bottom: 20px; }
 h1 { font-size: 27px; }
 .page-heading p { font-size: 13px; margin-top: 9px; }
 .page-heading>.button { margin-top: 16px; min-height: 38px; font-size: 12px; }
 .customer-grid { grid-template-columns: 1fr; gap: 20px; }
 .panel-header .text-button { max-width: none; }
 .chat-log { min-height: 220px; max-height: 360px; }
 .bubble { font-size: 14px; }
 .composer input { font-size: 16px; }
 .suggestions { padding: 0 18px 16px; }
 .composer { margin: 0 16px; }
 .chat-bottom { padding-inline: 18px; }
 .next-panel { padding: 23px 20px; }
 .form-grid input, .form-grid select, .form-grid textarea { font-size: 16px; }
 .form-grid { gap: 15px 12px; }
 .form-grid label { font-size: 12px; }
 .form-grid input, .form-grid select { padding: 9px; }
 .site-footer { padding: 20px 18px; gap: 18px; font-size: 10px; }
 .site-footer span:last-child { max-width: 185px; text-align: right; }
 .owner-main { padding: 24px 18px 10px; }
 .owner-heading { display: block; }
 .owner-heading h1 { font-size: 27px; }
 .owner-heading p { font-size: 13px; }
 .queue-summary { margin-top: 14px; gap: 17px; }
 .owner-toolbar { margin-top: 19px; align-items: flex-start; gap: 6px; }
 .filter-tabs { gap: 3px; }
 .filter-tabs button { font-size: 11px; padding: 7px 9px; }
 .small-button { font-size: 11px; padding: 7px 9px; }
 .small-button svg { display: none; }
 .owner-grid { grid-template-columns: 1fr; gap: 17px; }
 .request-list { grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); }
 .list-title { padding: 13px 16px 8px; }
 .request-card { padding: 12px; }
 .request-card strong { font-size: 14px; }
 .request-card .card-meta { font-size: 9px; }
 .detail-top { padding: 20px 18px 16px; gap: 10px; }
 .request-identity { gap: 7px; }
 .request-identity h2 { font-size: 23px; }
 .request-identity .reference-number { font-size: 10px; }
 .status-pill { font-size: 10px; padding: 5px 8px; }
 .detail-grid { grid-template-columns: 1fr; }
 .inquiry-sheet { padding: 20px 18px; }
 .inquiry-sheet .review-grid { grid-template-columns: 1fr 1fr; }
 .reply-sheet { padding: 20px 18px; }
 #reply-draft { font-size: 14px; min-height: 320px; }
 .owner-actions .button { flex: 1; }
 .empty-state { padding: 35px 20px; }
 .empty-state h2 { font-size: 21px; }
}
/* Legibility floor for secondary information at every viewport. */
.demo-strip, .demo-tag, .bar-link, .panel-header p, .panel-header .text-button,
.speaker, .bubble-meta, .source-chip, .suggestions button, .chat-footnote,
.microcopy, .form-grid small, .optional, .reference-number, .request-card .card-meta,
.request-identity .reference-number, .detail-top p, .status-pill, .draft-label,
.review-grid dt, .consent-receipt strong, .consent-receipt p,
.secondary-actions .text-button, .secondary-actions span, .owner-boundary,
.filter-tabs button, .small-button, .site-footer { font-size: 12px; }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .app-bar, .demo-strip, .owner-toolbar, .owner-actions, .secondary-actions, .composer, .suggestions { display: none; } body { background: white; } .owner-main,.customer-main { padding: 0; } .owner-grid { grid-template-columns: 1fr; } .inbox-panel { display: none; } }
