.hr-assistant-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.hr-assistant-layout .card { min-width: 0; margin: 0; }
.hr-history { position: sticky; top: 14px; }
.hr-history h3 { margin: 0 0 8px; }
.hr-history-note { color: var(--text-soft); font-size: .85rem; }
#hr-conversations { max-height: 55vh; overflow-y: auto; }
.hr-conversation-row { display: flex; gap: 3px; margin-bottom: 6px; }
.hr-conversation, .hr-conversation-delete { border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); color: var(--text); font: inherit; cursor: pointer; }
.hr-conversation { flex: 1; min-width: 0; padding: 10px; text-align: left; font-size: .86rem; overflow-wrap: anywhere; }
.hr-conversation[aria-pressed="true"] { border-color: var(--primary); background: #e6f5f1; }
.hr-conversation-delete { flex-shrink: 0; min-width: 40px; min-height: 44px; font-size: 1.35rem; }
.hr-chat { display: flex; flex-direction: column; gap: 12px; }
.hr-chat-heading { display: flex; gap: 12px; align-items: center; }
.hr-chat-heading img { width: 50px; height: 58px; object-fit: contain; flex-shrink: 0; }
.hr-chat-heading h3 { margin: 0 0 5px; }
.hr-chat-heading p { margin: 0; color: var(--text-soft); font-size: .86rem; }
.hr-service-status { margin: 0; padding: 10px 12px; border: 1px solid #c5e5dc; border-radius: 9px; background: #f0f9f6; color: #235c4c; font-size: .85rem; overflow-wrap: anywhere; }
.hr-welcome { padding: 16px 0; }
.hr-welcome h3 { margin-top: 0; }
.hr-welcome p { color: var(--text-soft); line-height: 1.55; }
.hr-suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.hr-suggestion { min-height: 48px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: .9rem; }
.hr-suggestion:hover:not(:disabled) { border-color: var(--primary); background: #f0f9f6; }
.hr-messages { display: grid; gap: 14px; max-height: min(58vh, 680px); overflow-y: auto; overscroll-behavior: contain; scroll-padding: 12px; padding: 3px; }
.hr-messages:empty { display: none; }
.hr-message { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); }
.hr-message-user { margin-left: min(12%, 72px); background: #eaf5f2; border-color: #cfe7df; }
.hr-message-assistant { margin-right: min(6%, 30px); }
.hr-message-author { display: block; font-size: .78rem; color: var(--text-soft); }
.hr-message-content { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; line-height: 1.6; }
.hr-action-card { margin-top: 14px; padding: 14px; border: 1px solid #b9d8ce; border-radius: 10px; background: var(--surface); }
.hr-action-card h4 { margin: 0 0 7px; overflow-wrap: anywhere; }
.hr-action-status { color: #235c4c; font-size: .85rem; font-weight: 600; }
.hr-action-failed, .hr-action-stale, .hr-action-expired, .hr-action-uncertain { color: #9c3c25; }
.hr-action-card summary { cursor: pointer; font-weight: 600; padding: 8px 0; font-size: .85rem; }
.hr-preview-fields { display: grid; grid-template-columns: minmax(100px, 30%) minmax(0, 1fr); gap: 7px 10px; font-size: .85rem; margin: 10px 0; }
.hr-preview-fields dt { color: var(--text-soft); overflow-wrap: anywhere; }
.hr-preview-fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hr-preview-list { padding-left: 20px; margin: 0; }
.hr-preview-list > li { margin-bottom: 8px; }
.hr-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; }
.hr-business-preview h5 { margin: 12px 0 7px; font-size: .85rem; }
.hr-changes-summary { margin: 8px 0; font-size: .85rem; font-weight: 600; }
.hr-change-details { border-top: 1px solid var(--border); margin-top: 6px; }
.hr-change-details > .hr-preview-list { padding-top: 8px; }
.hr-download { margin-top: 12px; min-height: 44px; }
.hr-catalog, .hr-workspace { border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-width: 0; }
.hr-catalog > summary, .hr-workspace > summary { cursor: pointer; font-weight: 600; line-height: 1.5; }
.hr-catalog > p, .hr-workspace > p { color: var(--text-soft); font-size: .82rem; line-height: 1.55; }
.hr-catalog label { display: block; margin: 12px 0 5px; font-size: .85rem; }
#hr-capability-search { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; min-width: 0; }
.hr-capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; max-height: 55vh; overflow-y: auto; padding: 3px; }
.hr-capability-group { min-width: 0; }
.hr-capability-group h4, .hr-workspace-section h4 { margin: 0 0 8px; font-size: .88rem; }
.hr-capability-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.hr-capability { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--surface-muted); color: var(--text); text-align: left; font: inherit; font-size: .85rem; min-height: 48px; overflow-wrap: anywhere; cursor: pointer; }
.hr-capability-kind { display: block; font-size: .72rem; color: var(--text-soft); margin-top: 4px; }
.hr-handoffs { display: grid; gap: 10px; margin-top: 12px; }
.hr-handoffs:empty { display: none; }
.hr-handoffs h4 { margin: 0; font-size: .9rem; }
.hr-handoff { min-width: 0; padding: 10px; background: var(--surface-muted); border-radius: 8px; font-size: .85rem; }
.hr-handoff p { color: var(--text-soft); line-height: 1.5; }
.hr-handoff a { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border-radius: 8px; text-decoration: none; min-height: 44px; }
#hr-workspace-content { display: grid; gap: 16px; max-height: 55vh; overflow-y: auto; padding: 3px; }
.hr-workspace-item { padding: 12px; margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; overflow-wrap: anywhere; }
.hr-workspace-meta { font-size: .8rem; color: var(--text-soft); line-height: 1.5; }
.hr-workspace-description { font-size: .85rem; line-height: 1.5; white-space: pre-wrap; }
.hr-workspace-item button { min-height: 44px; margin: 5px 5px 0 0; }
.hr-checklist { font-size: .82rem; padding-left: 18px; line-height: 1.55; }
.hr-rich-content { white-space: normal; }
.hr-rich-content p { margin: 8px 0; overflow-wrap: anywhere; }
.hr-rich-content h4 { margin: 14px 0 6px; font-size: .94rem; }
.hr-rich-content ul, .hr-rich-content ol { padding-left: 22px; margin: 8px 0; }
.hr-rich-content li { margin: 4px 0; overflow-wrap: anywhere; }
.hr-rich-content pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--border); padding: 10px; border-radius: 8px; }
.hr-rich-content code { overflow-wrap: anywhere; font-size: .85em; }
.hr-rich-table-wrap { overflow-x: auto; max-width: 100%; margin: 10px 0; }
.hr-rich-table-wrap table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.hr-rich-table-wrap th, .hr-rich-table-wrap td { border: 1px solid var(--border); padding: 8px; text-align: left; min-width: 90px; overflow-wrap: anywhere; }
.hr-action-help { color: var(--text-soft); font-size: .8rem; line-height: 1.5; }
.hr-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-action-buttons button { min-height: 44px; }
.hr-error { padding: 12px; border: 1px solid #efc7c0; border-radius: 9px; background: #fff5f2; color: #9c3c25; margin: 0; overflow-wrap: anywhere; }
.hr-composer { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: 1px solid var(--border); }
.hr-composer label { color: var(--text); font-size: .88rem; font-weight: 600; }
.hr-composer textarea { width: 100%; min-height: 90px; max-height: 280px; resize: vertical; font: inherit; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); }
.hr-composer-footer { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.hr-composer-footer p, .hr-disclaimer { font-size: .75rem; line-height: 1.5; color: var(--text-soft); margin: 0; }
.hr-composer-footer button { min-height: 44px; min-width: 110px; }
#hr-assistant button:focus-visible, #hr-assistant textarea:focus-visible, #hr-assistant summary:focus-visible, .hr-messages:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
#hr-assistant button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 900px) {
  .hr-assistant-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hr-history { position: static; padding: 14px; }
  #hr-conversations { display: flex; gap: 7px; max-height: 130px; overflow: auto; }
  .hr-conversation-row { flex: 0 0 210px; }
  .hr-history-note { margin: 6px 0; }
  .hr-chat { padding: 16px; }
  .hr-messages { max-height: 54dvh; }
  .hr-message-user { margin-left: 15px; }
  .hr-message-assistant { margin-right: 0; }
}
@media (max-width: 480px) {
  .hr-capabilities { grid-template-columns: minmax(0, 1fr); }
  #hr-capability-search { font-size: 16px; }
  .hr-suggestions { grid-template-columns: minmax(0, 1fr); }
  .hr-preview-fields { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hr-preview-fields dd { margin-bottom: 8px; }
  .hr-chat { padding: 12px; }
  .hr-message, .hr-action-card { padding: 11px; }
  .hr-composer textarea { font-size: 16px; }
  .hr-composer-footer { align-items: end; }
  .hr-composer-footer p { max-width: 170px; }
  .hr-action-buttons { flex-direction: column; }
}
