/* Project Human account. Shared visual language, private member workspace. */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --member-shadow: 0 1px 1px rgba(31, 48, 37, .04), 0 18px 50px -36px rgba(31, 48, 37, .28);
}
html { scroll-behavior: smooth; }
body { background: #f5f4ef; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #668c71; outline-offset: 4px; }
.wrap { max-width: 1120px; padding-top: 44px; padding-bottom: 100px; }
.top { padding: 0 4px; align-items: flex-start; margin-bottom: 32px; }
.top .brand { font-size: 15px; text-decoration: none; }
.top h1 { font-weight: 560; margin-top: 22px; font-size: clamp(2.35rem, 5.5vw, 4rem); letter-spacing: -.065em; }
.top .sub { max-width: 45ch; font-size: 16px; }
.card, .member-guide, .this-week, .book-banner { box-shadow: var(--member-shadow); border-color: #dce1d6; border-radius: 24px; }
.card { padding: clamp(22px, 4vw, 38px); }
.card h2 { font-size: 1.35rem; letter-spacing: -.035em; margin-bottom: 14px; }
.btn { border-radius: 13px; min-height: 46px; transition: background .16s, box-shadow .16s, transform .16s; }
.btn-primary { background: linear-gradient(180deg, #3d6758, #285347); color: #fff; border: 1px solid #285347; box-shadow: 0 1px 0 #ffffff26 inset, 0 4px 8px #28534714; }
.btn-ghost { background: linear-gradient(180deg, #fff, #f8f9f5); border: 1px solid #d5ddd0; color: #344e40; box-shadow: 0 1px 0 #fff inset; }
.btn:disabled { transform: none; box-shadow: none; }
.member-nav { position: sticky; top: 12px; z-index: 10; width: fit-content; max-width: 100%; display: flex; flex-wrap: nowrap; gap: 3px; padding: 6px; margin: 0 0 28px; background: rgba(250, 250, 246, .94); border: 1px solid #fff; border-radius: 18px; box-shadow: 0 1px 0 #cad5c5, 0 10px 30px -22px #20332888; backdrop-filter: blur(18px); overflow-x: auto; scrollbar-width: thin; }
.member-nav a { flex: 0 0 auto; border-radius: 12px; padding: 9px 15px; min-height: 42px; border: 0; background: transparent; white-space: nowrap; font-size: 13px; font-weight: 550; }
.member-nav a:hover, .member-nav a:focus-visible { background: #e7edde; }
#planCard, #aiCoachCard, #weeklyCard, #checkinsCard, #membershipCard, #billingCard, #dataControlsCard { scroll-margin-top: 105px; }
.member-overview { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(245px, 1fr); gap: 32px; margin: 0 0 28px; padding: 30px 4px 34px; align-items: center; }
.member-overview h2 { font-size: clamp(1.8rem, 4vw, 2.55rem); font-weight: 560; letter-spacing: -.055em; line-height: 1.12; margin: 10px 0 16px; }
.member-overview p:not(.section-eyebrow) { max-width: 47ch; color: var(--text-2); font-size: 15px; line-height: 1.8; }
.overview-action { display: inline-flex; align-items: center; gap: 26px; margin-top: 18px; min-height: 44px; font-weight: 600; font-size: 14px; }
.member-journey { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
.member-journey li { display: flex; align-items: center; gap: 14px; position: relative; padding: 12px 0; color: #718071; font-size: 14px; }
.member-journey li:not(:last-child)::after { position: absolute; content: ''; height: 17px; width: 1px; background: #d3decc; top: 54px; left: 19px; }
.journey-marker { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 40px; height: 40px; border-radius: 50%; background: #edf0e8; border: 1px solid #d9e0d3; font-size: 12px; font-weight: 650; box-shadow: 0 1px 0 #fff inset; }
.member-journey small { display: block; margin-top: 2px; color: #768274; font-size: 11px; font-weight: 400; }
.member-journey .is-complete { color: #344e40; }
.member-journey .is-complete .journey-marker { background: #dfe9d8; color: #365c43; border-color: #c8d8c0; }
.member-journey .is-next { color: #203c2c; font-weight: 600; }
.member-journey .is-next .journey-marker { background: #fff; color: #285347; box-shadow: 0 0 0 4px #e9eee3; border-color: #9cb68e; }
.this-week { background: linear-gradient(125deg, #e9efdf, #f5f7ef); border: 1px solid #d2dfc5; box-shadow: 0 1px 0 #fff inset, var(--member-shadow); }
.this-week .step { background: #ffffffb3; color: #33562f; border: 1px solid #d6e2cc; }
.this-week .step .lbl { color: #587e43; }
.do-next { background: #eff5e8; border-color: #d6e4ca; }
.do-next .lbl { color: #587e43; }
.plan-doc { border-color: #dbe3d4; box-shadow: 0 1px 0 #fff, 0 14px 30px -28px #28432a66; }
.plan-hero { background: linear-gradient(135deg, #e8eddd, #f8faf4); padding-top: 30px; padding-bottom: 30px; }
.plan-hero h3 { letter-spacing: -.055em; }
.plan-glance .g { background: #f5f7ef; }
.plan-section>summary { min-height: 62px; align-items: center; }
.plan-toolbar { justify-content: flex-end; }
.plan-history-toolbar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding: 16px 0; border-top: 1px solid #e0e6db; }
.plan-history-toolbar>div { flex: 1; min-width: 180px; max-width: 360px; }
.plan-history-toolbar label { margin: 0 0 6px; font-size: 12px; color: #60705e; }
.plan-history-toolbar select { background: #fafbf7; padding: 10px 12px; font-size: 14px; min-height: 44px; }
.plan-history-toolbar .btn { font-size: 12px; min-height: 44px; padding: 10px 13px; }
.saved-plan-notice { background: #faf3df; border: 1px solid #eadcba; padding: 14px 16px; margin: 0 0 18px; border-radius: 12px; color: #755524; font-size: 13px; line-height: 1.7; }
.saved-plan-notice:empty { display: none; }
#planHistoryStatus:empty { display: none; }
#planHistoryStatus { margin: 0 0 18px; font-size: 12px; }
.coach-workspace { display: grid; grid-template-columns: 205px minmax(0, 1fr); margin-top: 28px; border: 1px solid #dce3d5; border-radius: 18px; overflow: clip; background: #fbfcf8; }
.coach-library { padding: 20px 14px; border-right: 1px solid #dce3d5; background: linear-gradient(180deg, #eef2e8, #f8f9f5); min-width: 0; }
.thread-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.thread-library-heading h3 { font-size: 13px; font-weight: 650; letter-spacing: -.015em; }
.thread-new { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 21px; line-height: 1; color: #315b40; background: #fff; border: 1px solid #d2ddc9; border-radius: 11px; width: 40px; height: 40px; cursor: pointer; box-shadow: 0 1px 0 #fff inset; }
.thread-new:disabled { opacity: .45; cursor: default; }
#coachThreadSearch { background: #ffffffbf; padding: 9px 10px; min-height: 42px; font-size: 12px; border-color: #d6dfce; margin-bottom: 14px; }
.coach-thread-list { display: grid; gap: 7px; max-height: 420px; overflow-y: auto; }
.coach-thread { display: grid; gap: 5px; width: 100%; text-align: left; color: #495e48; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; font: inherit; cursor: pointer; min-height: 60px; }
.coach-thread:hover { background: #fdfefa; border-color: #d9e1d2; }
.coach-thread.is-active { background: #fff; border-color: #c9d9bd; box-shadow: 0 1px 1px #244c2a0a, 0 4px 12px -10px #244c2a66; color: #234e31; }
.coach-thread-name { font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.coach-thread-date { font-size: 10px; line-height: 1.4; color: #74846b; }
.thread-archive-toggle { font: inherit; display: block; border: 0; background: transparent; color: #5e7456; font-size: 11px; text-align: left; min-height: 44px; margin-top: 8px; cursor: pointer; }
.thread-archive-toggle:disabled { opacity: .5; cursor: default; }
.thread-earlier-library { font: inherit; font-size: 11px; min-height: 40px; margin-top: 10px; padding: 8px 10px; width: 100%; background: #fff; border: 1px solid #d4e0c9; border-radius: 10px; color: #4b6e3d; cursor: pointer; }
.thread-earlier-library:disabled { opacity: .5; cursor: default; }
.thread-library-status { color: #71826b; font-size: 10px; line-height: 1.7; margin-top: 4px; }
.coach-conversation { padding: 22px; min-width: 0; background: #fff; }
.conversation-heading { margin: 0; align-items: flex-start; }
.conversation-heading h3 { font-size: 17px; font-weight: 600; letter-spacing: -.035em; margin: 7px 0 0; overflow-wrap: anywhere; }
.conversation-heading .btn { flex: 0 0 auto; padding: 9px 11px; min-height: 40px; font-size: 11px; }
.thread-actions { display: flex; gap: 18px; margin: 10px 0 0; }
.thread-actions button { font: inherit; font-size: 11px; background: transparent; border: 0; color: #638156; min-height: 36px; cursor: pointer; }
.thread-rename { border: 1px solid #dce4d4; border-radius: 12px; padding: 14px; margin: 12px 0; background: #f7f9f3; }
.thread-rename label { margin-top: 0; font-size: 12px; }
.thread-rename input { background: #fff; font-size: 14px; }
.thread-rename>div { display: flex; gap: 8px; margin-top: 12px; }
.thread-rename .btn { font-size: 12px; padding: 9px 12px; min-height: 40px; }
.thread-earlier { margin-top: 20px; font: inherit; font-size: 12px; background: #fff; color: #527547; border: 1px solid #d8e3ce; border-radius: 999px; min-height: 40px; padding: 8px 14px; cursor: pointer; }
.coach-history { max-height: 480px; min-height: 40px; gap: 18px; margin: 22px -2px; padding: 2px; scrollbar-width: thin; }
.coach-message { max-width: 96%; border-radius: 16px; border: 1px solid #e5e9df; background: #f7f9f3; padding: 17px 18px; }
.coach-message.from-member { color: #fff; background: linear-gradient(135deg, #416650, #31523e); border-color: #31523e; margin-left: 28px; box-shadow: 0 1px 0 #ffffff14 inset; }
.coach-message.from-member .coach-message-label { color: #d5e4ce; }
.coach-message.from-member .coach-message-time { color: #c1d2b9; }
.coach-message.from-human { background: #edf3e5; border: 1px solid #cfdfc2; border-left: 3px solid #678d53; }
.coach-message-body { font-size: 14px; line-height: 1.85; }
.coach-message-label { font-size: 9px; letter-spacing: .1em; }
.coach-message-time { display: block; margin-top: 10px; color: #7c8975; font-size: 9px; line-height: 1.5; }
.coach-history-empty { padding: 20px 10px 30px; text-align: center; color: #395e36; font-size: 18px; font-weight: 550; letter-spacing: -.025em; }
.coach-history-empty span { display: inline-block; margin-top: 12px; max-width: 38ch; color: #74816d; font-size: 12px; font-weight: 400; line-height: 1.8; letter-spacing: 0; }
.coach-starters { gap: 6px; margin-top: 20px; }
.coach-starters button { background: #fcfdf9; font-size: 11px; padding: 8px 10px; min-height: 40px; }
#coachForm { padding-top: 6px; border-top: 1px solid #e9ede3; }
#coachForm label { font-size: 12px; font-weight: 600; margin-top: 16px; }
#coachMessage { background: #fbfcf8; border-color: #d8e1cf; border-radius: 14px; resize: vertical; min-height: 108px; font-size: 15px; }
#coachForm .actions { margin-top: 12px; }
#coachForm .btn { font-size: 12px; }
#coachStatus { font-size: 11px; line-height: 1.8; color: #71816b; }
.checkin-grid { gap: 0 24px; }
.checkin-grid select { background-color: #fbfcf7; }
.progress-strip { gap: 12px; }
.progress-stat { border: 1px solid #dfe6d6; border-radius: 15px; background: linear-gradient(160deg, #f3f7ec, #fafbf7); }
.progress-log { list-style: none; margin: 12px 0 0; padding: 0; }
.progress-log li { margin: 0; border-bottom: 1px solid #e5eadd; padding: 14px 0; }
.progress-log summary { cursor: pointer; font-size: 13px; color: #355431; line-height: 1.7; padding-right: 8px; }
.progress-log details p { font-size: 13px; color: #67765e; line-height: 1.8; margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.progress-log details .checkin-scores { font-size: 11px; padding: 10px 12px; border-radius: 8px; background: #f2f5eb; color: #547048; }
.kv { background: #f8faf3; border-color: #e1e7d8; }
.kv .k { color: #748268; font-size: 10px; }
.kv .v { color: #3d5434; font-weight: 550; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { filter: none; transform: translateY(-1px); box-shadow: 0 6px 14px -10px #1d432a88; }
}
@media (max-width: 850px) {
  .wrap { max-width: 760px; }
  .coach-workspace { grid-template-columns: minmax(0, 1fr); }
  .coach-library { border-right: 0; border-bottom: 1px solid #dce3d5; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(135px, 1fr); gap: 8px 16px; }
  .thread-library-heading { margin-bottom: 0; }
  #coachThreadSearch { margin: 0; align-self: center; }
  .coach-thread-list { grid-column: 1 / -1; display: flex; max-height: 145px; overflow: auto; padding-bottom: 4px; }
  .thread-earlier-library { grid-column: 1 / -1; margin-top: 2px; }
  .coach-thread { flex: 0 0 170px; max-width: 210px; min-height: 65px; }
  .thread-archive-toggle { margin: 0; min-height: 36px; }
  .thread-library-status { margin: 0; align-self: center; text-align: right; }
}
@media (max-width: 600px) {
  .wrap { padding-top: 26px; }
  .top { gap: 10px; flex-wrap: nowrap; }
  .top .sub { font-size: 14px; }
  #topActions .btn { font-size: 11px; padding: 10px 12px; min-height: 40px; white-space: nowrap; }
  .member-nav { width: 100%; top: 8px; border-radius: 16px; }
  .member-nav a { padding: 9px 13px; font-size: 12px; }
  .member-overview { grid-template-columns: minmax(0, 1fr); padding: 20px 2px 24px; gap: 22px; }
  .member-overview h2 { font-size: 1.9rem; }
  .member-overview p:not(.section-eyebrow) { font-size: 14px; }
  .member-journey li { font-size: 12px; padding: 10px 0; }
  .member-journey li:not(:last-child)::after { top: 52px; height: 13px; }
  .card { padding: 22px 18px; border-radius: 20px; }
  .card h2 { font-size: 1.2rem; }
  .coach-workspace { margin: 22px -8px -8px; border-radius: 16px; }
  .coach-library { padding: 13px; gap: 7px 12px; }
  .thread-library-heading h3 { font-size: 12px; }
  .thread-new { width: 38px; height: 38px; }
  .coach-conversation { padding: 18px 14px; }
  .conversation-heading { gap: 8px; }
  .conversation-heading h3 { font-size: 16px; }
  .conversation-heading .btn { font-size: 10px; max-width: 100px; padding: 7px 9px; }
  .coach-message { padding: 14px; }
  .coach-message.from-member { margin-left: 14px; }
  .coach-message-body { font-size: 14px; }
  .coach-starters { display: grid; grid-template-columns: minmax(0, 1fr); }
  .coach-starters button { text-align: left; font-size: 11px; min-height: 40px; }
  #coachForm .actions .btn { padding: 10px 12px; }
  .plan-history-toolbar { gap: 10px; }
  .plan-history-toolbar>div { max-width: none; }
  .plan-history-toolbar>.btn { width: 100%; }
  .plan-glance .g { padding: 15px 20px; }
  #billingCard .actions, #dataControlsCard .actions { align-items: stretch; }
  #billingCard .actions .btn, #dataControlsCard .actions .btn { width: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none !important; }
}
@media print {
  .member-nav, .member-overview, .coach-workspace, .plan-history-toolbar, .saved-plan-notice { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card, .plan-doc { box-shadow: none; }
}

/* Readable supporting text and controls, including saved conversations. */
.coach-thread-name { font-size: 13px; }
.coach-thread-date, .coach-message-time { color: #5d6d55; font-size: 11px; }
.thread-library-status, #coachStatus, .coach-history-empty span { color: #5b6c53; font-size: 12px; }
.coach-message-body { font-size: 15px; line-height: 1.75; }
.coach-message-label { font-size: 10px; }
.thread-new { width: 44px; height: 44px; }
.thread-actions button, .thread-archive-toggle, .thread-earlier, .thread-earlier-library,
.conversation-heading .btn, .coach-starters button, .thread-rename .btn { min-height: 44px; }
.thread-actions { gap: 8px; }
.thread-actions button { padding: 8px 10px; font-size: 12px; }
.progress-log summary { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
.progress-log details .checkin-scores { font-size: 12px; }
.kv .k { color: #5d6e53; font-size: 11px; }
.plan-week .wk-content { color: var(--text-2); line-height: 1.75; overflow-wrap: anywhere; }
.plan-week .wk-content > :last-child, .plan-week-intro > :last-child { margin-bottom: 0; }
.plan-week .wk-content :is(h4, h5, h6) { color: var(--text); font: inherit; font-weight: 650; margin: 18px 0 8px; }
.plan-week .wk-content table { display: block; max-width: 100%; overflow-x: auto; }
.plan-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.plan-table-scroll table { min-width: 0; }
.plan-verbatim { max-width: 100%; padding: 14px 16px; border: 1px solid #dce3d5; border-radius: 10px; background: #f7f9f3; color: var(--text-2); font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.account-restore, .password-recovery { max-width: 640px; margin-left: auto; margin-right: auto; }
.account-restore .actions { margin-top: 22px; }
.password-recovery form { margin-top: 24px; }
.password-recovery label { margin-top: 18px; }
.password-recovery input { font-size: 16px; }
#recoveryCode { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 22px; text-align: center; letter-spacing: .22em; }
.weekly-saved-receipt { padding: clamp(18px, 3vw, 26px); margin-top: 22px; border: 1px solid #d4e0ca; border-radius: 17px; background: linear-gradient(135deg, #eef4e7, #fafcf6); }
.weekly-saved-receipt h3 { margin: 7px 0 12px; font-size: 22px; letter-spacing: -.035em; }
.checkin-saved-scores { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 18px 0; }
.checkin-saved-scores dt, .checkin-saved-scores dd { margin: 0; padding: 11px 0; border-bottom: 1px solid #dce5d4; overflow-wrap: anywhere; font-size: 14px; }
.checkin-saved-scores dt { color: #5c7052; }
.checkin-saved-scores dd { color: #304c35; font-weight: 600; text-align: right; }
.weekly-saved-receipt summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
#weeklySavedNotes p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; margin: 10px 0; }
#weeklyNextOpen { margin-top: 14px; }
.coach-message-body > p { margin: 0 0 10px; }
.coach-message-body > :last-child { margin-bottom: 0; }
.coach-message-body :is(ul, ol) { margin: 10px 0; padding-left: 22px; }
.coach-message-body li { margin: 6px 0; }
.coach-message-body strong { font-weight: 650; }
.coach-message-body code { font: .9em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; background: #e9eee2; padding: 2px 5px; border-radius: 5px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .member-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 2px; padding: 5px; }
  .member-nav a { display: flex; align-items: center; justify-content: center; white-space: normal; text-align: center; min-height: 44px; padding: 7px 5px; line-height: 1.3; font-size: 12px; }
  #planCard, #aiCoachCard, #weeklyCard, #checkinsCard, #membershipCard, #billingCard, #dataControlsCard { scroll-margin-top: 126px; }
  .thread-new { width: 44px; height: 44px; }
  .thread-archive-toggle { min-height: 44px; }
  .conversation-heading .btn { font-size: 11px; max-width: 112px; }
  .coach-starters button { font-size: 12px; }
  #coachThreadSearch, #coachMessage, .thread-rename input { font-size: 16px; }
  .coach-library { grid-template-columns: minmax(0, 1fr) minmax(145px, 1fr); }
  .coach-thread { flex-basis: 180px; }
}
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  html, body { background: #fff !important; }
  #planCard { padding: 0; border: 0; border-radius: 0; }
  .plan-doc { border: 0; border-radius: 0; overflow: visible; }
  .plan-hero { padding: 18pt; }
  .plan-hero h3 { font-size: 24pt; }
  .plan-hero .mission { max-width: none; font-size: 11pt; line-height: 1.6; }
  .plan-doc-body { padding: 0; }
  .plan-section, .plan-hero, .plan-glance { break-inside: auto; }
  .plan-section > summary { break-after: avoid; break-inside: avoid; page-break-inside: avoid; min-height: 0; padding: 16pt 0 8pt; font-size: 13pt; }
  .plan-section .inner { padding: 0 0 14pt; font-size: 11pt; line-height: 1.6; }
  .plan-section .inner :is(p, li) { orphans: 3; widows: 3; }
  .plan-week { padding: 14pt; break-inside: avoid; }
  .plan-week .wk-top, .plan-week .wk-content :is(h4, h5, h6) { break-after: avoid; }
  .plan-week .wk-content { font-size: 11pt; line-height: 1.6; }
  .plan-section .inner table { break-inside: auto; }
  .plan-table-scroll, .plan-week .wk-content table { overflow: visible; }
  .plan-week .wk-content table { display: table; }
  .plan-verbatim { break-inside: auto; font-size: 10pt; }
  .plan-section .inner tr, .do-next, .plan-week .wk-marker { break-inside: avoid; }
}
