/* Larger, consistent type across the product. Load after the feature styles. */
:root {
  --muted: #b6a8c9;
  --weak: #c7bad9;
}

body { font-size: 18px; line-height: 1.65; }
button, input, select, textarea { font-size: 18px; }
button { min-height: 44px; font-size: 16px; line-height: 1.5; }
input, select { min-height: 46px; }
textarea { line-height: 1.75; }
input::placeholder, textarea::placeholder { color: #a28daf; opacity: 1; }
small { font-size: 14px; color: #b6a2c7; }

.chat-view { max-width: 820px; }
.chat-shell { min-width: 0; }
.chat-head { gap: 10px; }
.chat-head h1 { font-size: 26px; line-height: 1.4; letter-spacing: 0; }
.chat-head p { font-size: 14px; color: #b6a8c9; }
.agent-chat-identity > div { min-width: 0; }
.head-actions { flex: none; }
.head-actions button { font-size: 16px; min-height: 44px; padding: 7px 10px; }
.head-actions #newChat { width: 44px; min-height: 44px; font-size: 26px; }
.workspace-nav { flex-wrap: wrap; gap: 6px; padding-block: 8px; }
.workspace-nav > span { flex: 1 1 140px; font-size: 14px; line-height: 1.6; color: #b2a1c4; }
.workspace-nav button { min-height: 42px; font-size: 16px; padding: 6px 8px; color: #d0bedf; }
.workspace-nav b { font-size: 14px; color: #b49bc6; }
.notice { font-size: 14px; line-height: 1.7; gap: 8px; }
.notice button { font-size: 14px; min-height: 42px; flex: none; }

.guided-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-card, #agentWorkflowToggle.entry-card { min-height: 100px; padding: 14px; gap: 10px; }
.entry-card strong { font-size: 20px; line-height: 1.5; }
.entry-card small { font-size: 14px; line-height: 1.6; color: #d5bfeb; }
.welcome { max-width: 590px; }
.welcome .eyebrow, .eyebrow { font-size: 14px; letter-spacing: .08em; color: #b994d7; }
.welcome h2 { font-size: 30px; line-height: 1.5; }
.welcome p { font-size: 18px; line-height: 1.85; max-width: 520px; color: #b7a5c9; }
.welcome .welcome-note { font-size: 14px; color: #aa92bd; }
.msg { font-size: 18px; line-height: 1.85; }
.msg-label { font-size: 14px; color: #c6a1e1; }
.message-body { font-size: 18px; line-height: 1.85; }
.message-body h2, .message-body h3, .message-body h4 { font-size: 22px; line-height: 1.6; }
.message-body code { font-size: 16px; }
.message-actions button { min-height: 42px; font-size: 14px; padding: 7px 11px; color: #c7b5d6; }
.source-details { font-size: 14px; color: #b6a0c8; }
.source-details summary { padding-block: 6px; }
.followups button { min-height: 42px; font-size: 16px; color: #ccb0e1; }
.pending-message { font-size: 16px; }
.prompt-row { gap: 8px; }
.prompt-row button { min-height: 42px; font-size: 16px; padding: 7px 11px; color: #c8b2dc; }
.attachment-tray, .pending-bar { font-size: 14px; line-height: 1.6; }
.attachment-tray button, .pending-bar button { min-height: 42px; font-size: 14px; }
.pending-bar { flex-wrap: wrap; }
.chat-input textarea { min-height: 74px; max-height: 150px; font-size: 18px; line-height: 1.7; }
.chat-input textarea::placeholder { color: #aa92bd; }
.channel-select select { font-size: 16px; min-height: 44px; color: #d0b6e3; }
.icon-button { width: 42px; min-height: 42px; padding: 9px; }
.icon-button svg { width: 21px; height: 21px; }
.composer-actions .primary { min-height: 44px; font-size: 16px; padding: 8px 13px; margin-left: 2px; }
.composer-actions .primary span { font-size: 18px; margin-left: 3px; }
.composer-footnote { font-size: 14px; line-height: 1.55; color: #a98fb9; letter-spacing: 0; }

.agent-workflow-mode { font-size: 16px; }
.agent-workflow-toolbar #workflowBack { min-height: 44px; font-size: 16px; }
.workflow-intro h2, .agent-workflow-brief h2 { font-size: 26px; line-height: 1.5; }
.workflow-intro p, .agent-workflow-brief p { font-size: 16px; line-height: 1.8; color: #baa6cb; }
.agent-workflow-brief > span { font-size: 14px; }
.agent-workflow-field { font-size: 16px; line-height: 1.6; }
.agent-workflow-panel input, .agent-workflow-panel select, .agent-workflow-panel textarea { font-size: 18px; }
.agent-workflow-panel .agent-workflow-mode select { min-height: 44px; font-size: 18px; }
.agent-workflow-panel textarea { min-height: 126px; }
.agent-workflow-starters button { min-height: 44px; font-size: 16px; padding: 7px 12px; }
.agent-workflow-optional summary { min-height: 46px; font-size: 16px; }
.agent-workflow-actions button { min-height: 48px; font-size: 18px; }

dialog { line-height: 1.65; overflow-x: hidden; }
.dialog-head > div { min-width: 0; }
.dialog-head h2, .profiles-head h2 { font-size: 26px; line-height: 1.45; overflow-wrap: anywhere; }
.dialog-head button { flex: none; min-height: 44px; width: 44px; font-size: 28px; }
.dialog-intro { font-size: 16px; line-height: 1.8; color: #bba6cb; margin-block: 17px 22px; }
.stack-form { gap: 18px; }
.stack-form label { font-size: 16px; gap: 9px; line-height: 1.65; color: #d1bce2; }
.stack-form input, .stack-form textarea, .stack-form select { font-size: 18px; }
.stack-form legend { font-size: 16px; }
.stack-form fieldset label { grid-template-columns: 44px minmax(0, 1fr); }
.stack-form .primary { min-height: 48px; }
.form-result { font-size: 16px; line-height: 1.75; }
.knowledge-item { flex-wrap: wrap; }
.knowledge-item strong { font-size: 18px; }
.knowledge-item p { font-size: 14px; color: #b99ecb; }
.knowledge-item button { font-size: 14px; min-height: 42px; padding: 7px 10px; }
.empty-note { font-size: 16px; color: #b89dc9; line-height: 1.85; }
.add-knowledge > summary { font-size: 18px; min-height: 44px; }
.file-label input { font-size: 16px; }
.history-item strong { font-size: 18px; }
.history-item p { font-size: 16px; color: #b8a0c9; }
.history-item span { font-size: 14px; color: #ac8fbe; }
.toast { font-size: 16px; line-height: 1.7; }

.directory-guide { font-size: 16px; color: #cbb4dd; }
.directory-number { width: 34px; height: 36px; font-size: 16px; }
.directory-section-head .directory-remove { font-size: 14px; min-height: 42px; padding: 6px 8px; color: #c3a5d6; }
.directory-section textarea::placeholder { font-size: 16px; color: #a991bb; }
.directory-draft-tools button { font-size: 14px; min-height: 42px; padding: 7px 10px; }
.directory-mode { font-size: 16px; }
.directory-mode select { width: 104px; font-size: 18px; }
.directory-actions > button { min-height: 48px; font-size: 16px; }
.directory-footer > small { font-size: 14px; color: #b9a0cc; }
.directory-conflict { font-size: 16px; }

.resource-chat-context { font-size: 14px; }
.resource-chat-context button { font-size: 14px; min-height: 42px; }
.profiles-search input { font-size: 18px; }
.profiles-toolbar > .primary { font-size: 16px; min-height: 48px; }
.profiles-list-meta { font-size: 14px; color: #bda2d0; flex-wrap: wrap; }
.profiles-list-meta label { min-height: 42px; gap: 8px; font-size: 16px; }
.profiles-list-meta input { width: 19px; height: 19px; min-height: 0; flex: none; }
.profile-number { width: 36px; height: 38px; font-size: 18px; }
.profile-row strong { font-size: 20px; line-height: 1.55; }
.profile-row p { font-size: 16px; line-height: 1.7; color: #bca2ce; }
.profile-tag { font-size: 14px; line-height: 1.5; padding: 3px 7px; color: #c1a6d4; }
.profile-row-arrow { font-size: 26px; }
.profiles-legacy { flex-wrap: wrap; }
.profiles-legacy > span { font-size: 14px; color: #ac90bf; }
.profiles-legacy button { font-size: 14px; min-height: 42px; }
.profile-topline { flex-wrap: wrap; }
.profile-topline > button { min-height: 44px; font-size: 16px; }
.profile-topline > span { max-width: 100%; font-size: 14px; color: #b297c6; overflow-wrap: anywhere; }
.profile-jumps button { min-height: 42px; font-size: 16px; padding: 7px 9px; }
.profile-jumps b { font-size: 14px; }
.profile-form-guide { font-size: 16px; line-height: 1.8; color: #c3a6d6; }
.profile-field-group > summary { font-size: 18px; min-height: 58px; line-height: 1.6; }
.profile-group-name { min-width: 0; flex-wrap: wrap; gap: 7px; }
.profile-group-number { font-size: 14px; }
.stack-form .profile-field { font-size: 16px; gap: 9px; color: #d1b5e3; }
.profile-field input, .profile-field textarea { font-size: 18px; }
.profile-field input::placeholder, .profile-field textarea::placeholder { font-size: 16px; color: #a890ba; }
.profile-field small { font-size: 14px; color: #bb9fcb; }
.profile-field textarea { min-height: 112px; }
.profile-draft-tools button { font-size: 14px; min-height: 42px; padding: 7px 9px; }
.stack-form .profile-savebar > label { font-size: 16px; }
.profile-savebar select { width: 104px; font-size: 18px; min-height: 46px; }
.profile-savebar > div > button { font-size: 16px; min-height: 48px; }
.profile-savebar small { font-size: 14px; color: #c5a9d7; }
.profile-section-heading h3 { font-size: 24px; line-height: 1.5; }
.profile-section-intro { font-size: 16px; color: #bda0ce; }
.profile-archive-summary strong { font-size: 18px; }
.profile-archive-summary small { font-size: 14px; color: #b398c6; }
.profile-archive-summary p { font-size: 16px; color: #bea1d0; }
.profile-archive-body .message-body { font-size: 18px; line-height: 1.85; }
.profile-archive-body .message-body h2, .profile-archive-body .message-body h3 { font-size: 22px; }
.profile-archive-conversation > summary { font-size: 16px; min-height: 42px; padding-block: 6px; }
.profile-archive-turn > strong { font-size: 14px; }
.profile-archive-actions button { font-size: 16px; min-height: 44px; }
.profile-archive-actions small { font-size: 14px; color: #b79bca; }
.profile-version-body { font-size: 16px; line-height: 1.85; }
.profile-version-body dl { grid-template-columns: minmax(110px, 30%) minmax(0, 1fr); }
.profile-version-body dt { color: #b99bcc; }
.profile-return-chat { font-size: 16px; min-height: 44px; }
.profile-empty-action { font-size: 16px; min-height: 44px; }

#profileMaintenanceNoteLabel { margin-top: 4px; }
.profile-topline { flex-wrap: wrap; }
.profile-topline .profile-delete { color: #edafbb; border: 1px solid #cd819c45; font-size: 16px; min-height: 42px; margin-left: auto; }
.profiles-list-meta { flex-wrap: wrap; }
#profilesTrashOpen { font-size: 16px; min-height: 42px; }
.profile-trash-row { display: flex; align-items: center; gap: 14px; border: 1px solid #b691d42b; border-radius: 12px; padding: 16px; }
.profile-trash-row > div { flex: 1; min-width: 0; }
.profile-trash-row strong { font-size: 18px; overflow-wrap: anywhere; }
.profile-trash-row p { font-size: 14px; color: #b398c6; margin: 6px 0 0; }
.profile-trash-row button { flex: none; min-height: 44px; font-size: 16px; }

@media (max-width: 520px) {
  .chat-shell { padding-inline: 12px; }
  .chat-head h1 { font-size: 24px; }
  .agent-chat-identity { gap: 8px; }
  .agent-chat-identity img { width: 36px; height: 36px; border-radius: 11px; }
  .head-actions { gap: 4px; }
  .head-actions button { padding-inline: 7px; }
  .head-actions #newChat { width: 42px; }
  .workspace-nav { gap: 3px; }
  .workspace-nav button { padding-inline: 6px; }
  .guided-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .entry-card, #agentWorkflowToggle.entry-card { display: block; min-height: 99px; padding: 11px 12px; }
  .entry-card .entry-icon, .entry-card .entry-arrow { display: none; }
  .entry-card strong { font-size: 18px; }
  .entry-card small { font-size: 14px; line-height: 1.55; margin-top: 4px; }
  .welcome { padding-inline: 5px; margin-top: 18px; }
  .welcome h2 { font-size: 28px; }
  .welcome p { font-size: 18px; max-width: none; }
  .welcome .welcome-note { font-size: 14px; }
  .msg { font-size: 18px; max-width: 100%; padding: 13px; }
  .msg.user { max-width: 94%; }
  .prompt-row { gap: 6px; }
  .prompt-row button { font-size: 16px; padding: 7px 9px; }
  .chat-input { padding: 6px 7px 8px; }
  .agent-composer__toolbar { gap: 3px; }
  .channel-select { gap: 4px; padding-inline: 2px; }
  .composer-actions { gap: 3px; }
  .composer-actions .primary { padding-inline: 10px; }
  .composer-footnote { margin-top: 7px; }
  dialog { padding-inline: 16px; }
  .profiles-dialog { padding-inline: 14px; }
  .dialog-head h2, .profiles-head h2 { font-size: 24px; }
  .profile-field-grid, .directory-top-fields { grid-template-columns: 1fr; }
  .profiles-toolbar { flex-wrap: wrap; }
  .profiles-search { flex: 1 1 160px; }
  .profiles-toolbar > .primary { padding-inline: 12px; }
  .profile-savebar > div, .directory-actions { flex-wrap: wrap; }
  .profile-savebar > div > button, .directory-actions > button { flex: 1 1 100%; font-size: 16px; }
  .directory-footer { margin-inline: -16px; padding: 12px 16px 17px; }
  .directory-section-head { gap: 6px; }
  .directory-section-head input { padding-inline: 8px; }
  .directory-section-head .directory-remove { padding-inline: 5px; }
  .profile-field-group { padding-inline: 12px; }
  .profile-version-body dl { grid-template-columns: 1fr; gap: 4px; }
  .profile-version-body dd { margin-bottom: 10px; }
  .profile-jumps { gap: 4px; }
  .profile-jumps button { font-size: 16px; padding-inline: 7px; }
}

@media (max-height: 700px) {
  .chat-shell { padding-top: max(10px, env(safe-area-inset-top)); }
  .chat-head { padding-bottom: 8px; }
  .workspace-nav { padding-block: 4px; }
  .guided-entry { margin-bottom: 8px; }
  .prompt-row { max-height: 100px; overflow-y: auto; margin-bottom: 8px; }
  .welcome { margin-block: 12px; }
  .welcome h2 { font-size: 28px; }
  .chat-input textarea { min-height: 64px; }
}

@media (max-height: 500px) {
  .chat-head p, .workspace-nav > span, .composer-footnote { display: none; }
  .guided-entry .entry-card small { display: none; }
  .entry-card, #agentWorkflowToggle.entry-card { min-height: 48px; padding-block: 7px; }
  .prompt-row { max-height: 48px; }
  .chat-input textarea { min-height: 52px; max-height: 90px; }
}
