:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; color: #252225; background: #f8f6f1; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f8f6f1; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(420px, 100%); margin: 0; padding: 0; }
.login-card { padding: 28px; border: 1px solid #e8e2d8; border-radius: 9px; background: #fff; box-shadow: 0 18px 55px rgb(31 39 34 / 12%); }
.login-card h1 { color: #0e4a59; }
.login-card p:not(.eyebrow) { color: #68716b; }
.login-form { display: grid; gap: 14px; margin-top: 22px; }
.login-form .primary-button { width: 100%; min-height: 42px; }
.login-message { min-height: 18px; margin: 0; color: #ba584e; font-size: 13px; }
.app-header { position: sticky; top: 0; z-index: 10; height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 28px; background: #fff; border-bottom: 1px solid #d9dfda; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; width: max-content; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: #0e4a59; color: #fff; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { color: #6d746f; margin-top: 1px; }
nav { display: flex; height: 100%; }
.nav-button { padding: 0 20px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #626a65; font-weight: 700; }
.nav-button.active { border-color: #0e4a59; color: #252225; }
.app-header > .secondary-button { justify-self: end; }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 5px; color: #b98253; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: 30px; line-height: 1.15; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: 0; }
.page-heading p:not(.eyebrow), .section-heading p:not(.eyebrow) { margin-bottom: 0; color: #68716b; }
.status { color: #5e6761; font-size: 13px; }
.source-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.source-pill { display: inline-flex; gap: 7px; padding: 7px 10px; border: 1px solid #d7ddd8; border-radius: 5px; background: #fff; color: #68716b; font-size: 12px; }
.source-pill.connected::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #0e4a59; }
.source-pill.unavailable::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #ba584e; }
.source-pill.waiting::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #d49b34; }
.budget-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; margin-bottom: 12px; padding: 16px 18px; border: 1px solid #d6e1e3; border-radius: 7px; background: #eef5f6; }
.budget-strip h2 { color: #0e4a59; }
.budget-strip p:not(.eyebrow) { margin: 4px 0 0; color: #46534e; }
.budget-score { display: grid; min-width: 120px; text-align: right; }
.budget-score strong { color: #0e4a59; font-size: 24px; line-height: 1; }
.budget-score span { margin-top: 5px; color: #65706a; font-size: 12px; }
.budget-modes { display: flex; gap: 6px; padding: 4px; border: 1px solid #d1dcde; border-radius: 6px; background: #fff; }
.budget-modes .text-button { min-height: 32px; padding: 6px 9px; border-radius: 4px; color: #5f6a65; }
.budget-modes .text-button.selected { background: #0e4a59; color: #fff; }
.weekly-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-bottom: 20px; overflow: hidden; border: 1px solid #e8e2d8; border-radius: 7px; background: #e8e2d8; }
.weekly-strip div { padding: 12px 14px; background: #fffdf8; }
.weekly-strip span, .weekly-strip strong { display: block; }
.weekly-strip span { color: #7a817d; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
.weekly-strip strong { margin-top: 4px; color: #332d27; font-size: 18px; }
.work-section { margin-bottom: 20px; border: 1px solid #e8e2d8; border-radius: 7px; background: #fff; overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 14px 18px; border-bottom: 1px solid #e8e2d8; }
.section-heading > strong { min-width: 34px; text-align: center; font-size: 20px; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.work-list, .relationship-list { display: grid; }
.work-row, .relationship-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 16px 18px; border-bottom: 1px solid #f0ebe3; }
.work-row:last-child, .relationship-row:last-child { border-bottom: 0; }
.row-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.row-heading strong { font-size: 16px; }
.row-heading span, .work-row small { color: #737b76; font-size: 12px; }
.work-row p { margin-bottom: 6px; color: #414a44; }
.work-row .context { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.crm-section { border-color: #e8e2d8; background: #fffdf8; }
.crm-section .section-heading { border-bottom-color: #e8e2d8; background: #f8f6f1; }
.crm-section .eyebrow, .crm-section h2, .crm-section .text-button { color: #0e4a59; }
.crm-section .heading-actions strong { color: #0e4a59; }
.crm-section .work-row { position: relative; border-bottom-color: #eee6dc; background: #fffdf8; }
.crm-section .work-row::before { content: ""; position: absolute; inset: 14px auto 14px 0; width: 4px; border-radius: 0 4px 4px 0; background: #b98253; }
.crm-section .row-heading strong { color: #0e4a59; }
.crm-section .row-heading span { border: 1px solid #e8e2d8; border-radius: 999px; background: #f8f6f1; color: #7b604b; padding: 3px 8px; font-weight: 700; }
.crm-section .why strong, .crm-section .context strong { color: #0e4a59; }
.crm-section .why { color: #312b25; }
.crm-section .context { color: #61584f; }
.relationship-context ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding-left: 18px; color: #4f5952; font-size: 13px; }
.why, .context { margin-bottom: 7px; color: #414a44; line-height: 1.45; }
.context { color: #5b655e; }
.evidence-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.evidence-chips span { padding: 4px 7px; border: 1px solid #e8e2d8; border-radius: 4px; background: #f8f6f1; color: #625b52; font-size: 11px; font-weight: 700; }
.evidence-chips .science { border-color: #c7d5d8; background: #eef5f6; color: #0e4a59; }
details { margin-top: 10px; color: #59635c; font-size: 12px; }
details summary { color: #0e4a59; cursor: pointer; font-weight: 700; }
details p { margin: 7px 0 0; }
.intelligence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.relationship-row.compact { grid-template-columns: 1fr; }
.signal-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #f0ebe3; }
.signal-row:last-child { border-bottom: 0; }
.signal-row span { color: #6e7771; font-size: 13px; text-align: right; }
.trigger { display: inline-block; padding: 4px 7px; border-radius: 4px; background: #f8f1e8; color: #8a5b32; font-size: 12px; font-weight: 700; }
.human-note { margin: 10px 0 0; padding-left: 10px; border-left: 3px solid #b98253; color: #4f4a3e; font-size: 13px; }
.row-actions { display: flex; align-items: start; gap: 7px; flex-wrap: wrap; max-width: 310px; }
.primary-button, .secondary-button, .text-button, .cadence-options button, .segmented button { min-height: 36px; padding: 7px 12px; border-radius: 5px; font-weight: 700; }
.primary-button { border: 1px solid #0e4a59; background: #0e4a59; color: #fff; }
.secondary-button { border: 1px solid #e8e2d8; background: #fff; color: #303934; }
.text-button { border: 0; background: transparent; color: #0e4a59; }
.text-button.quiet { color: #737b76; }
.boundary-note { margin: 0; padding: 10px 18px; border-top: 1px solid #f0ebe3; color: #747c77; font-size: 12px; }
.empty-state { margin: 0; padding: 24px 18px; color: #747c77; }
.memory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.memory-row, .event-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 18px; border-bottom: 1px solid #f0ebe3; }
.memory-row:last-child, .event-row:last-child { border-bottom: 0; }
.memory-row strong, .memory-row span { display: block; }
.memory-row span, .event-row span { color: #747c77; font-size: 12px; }
.event-row { justify-content: flex-start; align-items: baseline; }
.event-row span { min-width: 88px; }
.event-row p { margin: 0; }
.identity-row { align-items: flex-start; }
.decision-row { align-items: flex-start; }
.decision-row p { margin: 6px 0 0; color: #5b655e; font-size: 13px; }
.compact-actions { justify-content: flex-end; max-width: 420px; }
.compact-actions .text-button { min-height: 30px; padding: 4px 6px; font-size: 12px; }
dialog { width: min(520px, calc(100% - 28px)); padding: 24px; border: 0; border-radius: 7px; box-shadow: 0 18px 60px rgb(31 39 34 / 22%); }
dialog::backdrop { background: rgb(25 32 28 / 42%); }
dialog form { display: grid; gap: 16px; }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; background: transparent; font-size: 24px; }
label, fieldset { display: grid; gap: 7px; margin: 0; color: #3c453f; font-weight: 700; }
fieldset { padding: 0; border: 0; }
legend { margin-bottom: 7px; }
input, textarea, select { width: 100%; padding: 10px 11px; border: 1px solid #e8e2d8; border-radius: 5px; background: #fff; color: #202523; }
textarea { min-height: 92px; resize: vertical; }
em { color: #7a817d; font-size: 12px; font-style: normal; font-weight: 400; }
.segmented, .cadence-options, .energy-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.energy-options { grid-template-columns: repeat(5, 1fr); }
.segmented button, .cadence-options button, .energy-options button { min-height: 36px; padding: 7px 10px; border: 1px solid #e8e2d8; border-radius: 5px; background: #f8f6f1; color: #3f4842; font-weight: 700; }
.segmented button.selected, .energy-options button.selected { border-color: #0e4a59; background: #edf5f6; color: #0e4a59; }
.decision-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
@media (max-width: 760px) {
  .app-header { height: auto; grid-template-columns: 1fr auto; padding: 10px 14px; }
  .brand small { display: none; }
  nav { grid-row: 2; grid-column: 1 / -1; order: 3; height: 42px; border-top: 1px solid #f0ebe3; }
  .nav-button { flex: 1; }
  main { width: min(100% - 20px, 1180px); padding-top: 20px; }
  .page-heading { align-items: start; flex-direction: column; gap: 8px; }
  h1 { font-size: 25px; }
  .memory-grid { grid-template-columns: 1fr; gap: 0; }
  .intelligence-grid { grid-template-columns: 1fr; gap: 0; }
  .budget-strip { grid-template-columns: 1fr; align-items: start; }
  .budget-score { text-align: left; }
  .budget-modes { width: 100%; }
  .budget-modes .text-button { flex: 1; }
  .weekly-strip { grid-template-columns: 1fr 1fr; }
  .work-row, .relationship-row { grid-template-columns: 1fr; }
  .row-actions { max-width: none; }
  .section-heading { align-items: flex-start; }
  .heading-actions { align-items: center; flex-direction: row; }
  .segmented, .cadence-options { grid-template-columns: 1fr; }
  .energy-options { grid-template-columns: repeat(5, 1fr); }
  .decision-fields { grid-template-columns: 1fr; }
  .signal-row { align-items: flex-start; flex-direction: column; gap: 5px; }
  .signal-row span { text-align: left; }
  .identity-row { flex-direction: column; }
  .compact-actions { justify-content: flex-start; max-width: none; }
}
