:root {
  color-scheme: light;
  --ink: #193345;
  --muted: #526779;
  --navy: #102e40;
  --canvas: #f3f6f7;
  --line: #dbe5e8;
  --teal: #17655f;
  --mint: #e5f4ef;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #218e85; outline-offset: 3px; }
p, h1, h2, h3, dl { margin: 0; }
.masthead {
  min-height: 67px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(18px, 4vw, 58px);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 20px; line-height: 1.15; }
.brand small { display: block; font-size: 9px; letter-spacing: .14em; margin-top: 4px; color: #c4d8df; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #7abbb1; border-radius: 10px; color: #b6e2d8; }
.demo-badge, .type-pill, .visibility-label, .follow-up { font-size: 11px; font-weight: 650; border-radius: 999px; white-space: nowrap; }
.demo-badge { background: #274959; border: 1px solid #597680; color: #e2f0f0; padding: 4px 10px; }
.workspace { max-width: 1440px; display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 22px; margin: 0 auto; padding: 25px clamp(14px, 3vw, 48px); }
.sidebar, main { min-width: 0; }
.sidebar { align-self: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.sidebar-label, .eyebrow { color: var(--teal); font-size: 11px; letter-spacing: .11em; font-weight: 750; }
.sidebar-label { margin: 0 0 11px 8px; }
.profile-button {
  text-align: left; width: 100%; display: block; padding: 8px 9px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--ink); font-weight: 650;
}
.profile-button small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.profile-button:hover { background: var(--canvas); }
.profile-button.selected { background: var(--mint); border-color: #b9dad2; }
.role-field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; margin: 19px 0 0; }
.sidebar-hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.profile-banner, .profile-content, .communications { background: #fff; border: 1px solid var(--line); padding: 17px 20px; }
.profile-banner { border-radius: 12px 12px 0 0; }
.profile-banner h1 { font-size: 27px; line-height: 1.25; margin: 4px 0; letter-spacing: -.02em; }
.profile-banner p, .profile-content p { color: var(--muted); }
.tabs { display: flex; gap: 16px; padding: 0 20px; background: #fff; border: 1px solid var(--line); border-top: 0; }
.tabs button { color: var(--muted); font-weight: 650; padding: 10px 4px 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; }
.tabs button[aria-selected="true"] { color: var(--teal); border-bottom-color: var(--teal); }
.profile-content, .communications { border-top: 0; border-radius: 0 0 12px 12px; }
.profile-content h2, .section-head h2 { font-size: 23px; letter-spacing: -.015em; }
.profile-content p { margin-top: 6px; }
.section-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 15px; }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.actions, .detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.primary, .secondary, .danger {
  background: var(--teal); color: #fff; padding: 7px 11px; border: 1px solid var(--teal); border-radius: 7px;
  font-size: 13px; font-weight: 650; min-height: 34px;
}
.primary:hover { background: #104d49; }
.secondary { background: #fff; color: var(--ink); border-color: #c9d8dd; }
.secondary:hover:enabled { background: var(--canvas); }
.danger { background: #9c292c; border-color: #9c292c; }
.toolbar { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 8px; margin-bottom: 8px; }
input:not([type="checkbox"]), select, textarea {
  min-width: 0; padding: 7px 8px; border: 1px solid #c9d8dd; border-radius: 6px; color: var(--ink); background: #fff;
}
.timeline-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 5px 0 6px; }
.keep { display: flex; align-items: center; gap: 5px; }
.month { margin: 10px 0; }
.month-heading { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.entry { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 5px; overflow: clip; }
.entry-row {
  width: 100%; text-align: left; border: 0; background: #fff; color: var(--ink); padding: 8px 10px;
  display: flex; align-items: center; gap: 9px; min-height: 45px;
}
.entry-row:hover, .entry-row[aria-expanded="true"] { background: #f0f7f7; }
.entry-row:focus-visible { outline-offset: -3px; }
.entry-date { min-width: 58px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.type-pill { color: #245261; background: #e8f1f5; padding: 2px 7px; }
.type-pill.email { color: #28534b; background: var(--mint); }
.type-pill.meeting { background: #edf0f8; color: #435382; }
.entry-name { min-width: 70px; flex: 1; }
.entry-name strong, .entry-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-name strong { font-size: 13px; }
.entry-name small, .source-label { font-size: 11px; color: var(--muted); }
.visibility-label { background: var(--canvas); color: var(--muted); padding: 2px 7px; }
.follow-up { background: #fff2d6; color: #70531e; padding: 2px 7px; }
.chevron { font-size: 16px; line-height: 1; color: var(--teal); }
.entry-detail { padding: 12px 13px; background: #fcfdfd; border-top: 1px solid var(--line); }
.detail-title { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 8px 0; }
.detail-field { min-width: 0; }
.detail-field dt { color: var(--muted); font-size: 11px; font-weight: 650; }
.detail-field dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.subtle, .empty { color: var(--muted); font-size: 13px; }
.empty { border: 1px dashed #c9d8dd; border-radius: 8px; padding: 17px; }
.more { margin-top: 6px; }
.editor { border: 1px solid var(--line); border-radius: 12px; color: var(--ink); width: min(590px, 94vw); max-height: 90vh; padding: 17px 20px; }
.editor::backdrop { background: rgb(12 38 54 / 43%); }
.editor h2 { margin-bottom: 8px; font-size: 21px; }
.field { display: grid; gap: 3px; margin: 6px 0; color: var(--ink); font-size: 13px; }
.field > span { font-weight: 650; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.checkboxes label { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; }
.dialog-actions { justify-content: flex-end; margin-top: 8px; }
.form-error { font-size: 13px; color: #9c292c; }
.messages { margin: 12px 0; }
.messages h4 { margin: 0 0 6px; font-size: 14px; }
.message { border: 1px solid var(--line); border-radius: 8px; margin: 5px 0; background: #fff; }
.message summary { padding: 8px 11px; font-weight: 650; }
.message summary small { margin-left: 8px; color: var(--muted); font-weight: 500; }
.message-headers, .attachment-notice { padding: 0 11px; }
.message-body { padding: 0 11px; }
.message-body iframe { display: block; width: 100%; height: 290px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.attachment-notice { font-size: 12px; color: var(--muted); margin: 8px 0; }
.attachment-notice ul { padding-left: 18px; margin: 2px 0 8px; overflow-wrap: anywhere; }
.import-count { font-weight: 650; }
.matches { color: var(--muted); font-size: 12px; padding-left: 17px; margin: 6px 0; overflow-wrap: anywhere; }
.overlap { margin: 7px 0; padding: 6px 8px; background: #fff2d6; border-radius: 6px; color: #70531e; font-size: 12px; }
.purge-warning { color: #832e30; background: #fff0ef; border-radius: 6px; font-size: 13px; padding: 7px 9px; }
.request-card { margin: 7px 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
@media (max-width: 800px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sidebar { padding: 9px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .sidebar-label, .sidebar-hint { display: none; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .profile-button { width: auto; }
  .role-field { margin: 0; }
}
@media (max-width: 570px) {
  .section-head { align-items: flex-start; flex-direction: column; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar input { grid-column: span 2; }
  .source-label, .visibility-label { display: none; }
  .entry-row { gap: 6px; padding-inline: 6px; }
  .entry-date { min-width: auto; }
  .detail-grid { grid-template-columns: 1fr; }
}
