#diary, #mentor-tools { max-width: 65rem; }
.folder-section { border-top: 1px solid var(--rule); margin-top: 1.5rem; }
.folder-section > summary { cursor: pointer; padding: 1.25rem 0; font: 400 1.65rem/1.3 'Instrument Serif', Georgia, serif; }
.folder-content { padding-bottom: 1.25rem; }
.folder-table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.folder-table { width: 100%; border-collapse: collapse; text-align: left; }
.folder-table th, .folder-table td { padding: .9rem; border: 1px solid var(--rule); vertical-align: top; min-width: 10rem; }
.folder-table th { background: var(--sand); font-size: .9rem; font-weight: 500; }
.folder-table tr > :first-child { min-width: 3.5rem; width: 3.5rem; text-align: center; }
.folder-table tbody th { background: transparent; font-weight: 600; }
.folder-table td:last-child button { margin: 0 .5rem .5rem 0; }
.folder-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.folder-editor { display: grid; padding: 1.25rem; border: 1px solid var(--rule); background: var(--paper); }
.folder-editor h3 { margin: 0; }
.folder-editor textarea { width: 100%; resize: vertical; padding: .85rem 1rem; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; }
#diary h2, #mentor-tools h2 { font: 400 clamp(2rem, 5vw, 3.5rem)/1.05 'Instrument Serif', Georgia, serif; margin: 0 0 .65rem; }
#diary .eyebrow, #progress, .diary-day small, #day-status { color: #75535a; }
#diary #week-range { display: block; padding: 1rem 1.25rem; margin: .25rem 0 1.5rem; border-left: 4px solid var(--accent); background: var(--sand); color: var(--accent); font-size: .9375rem; font-weight: 600; line-height: 1.7; letter-spacing: .045em; }
#mentor-tools { margin-bottom: 2rem; }
#clients { max-width: 25rem; }
.diary-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; }
#days { border-top: 1px solid var(--rule); }
.diary-day { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .5rem; text-align: start; border: 0; border-bottom: 1px solid var(--rule); }
.diary-day[aria-pressed='true'] { background: var(--sand); color: var(--ink); }
.diary-day.has-feedback { border-left: 4px solid var(--accent); background: #fdf8f4; }
.diary-day.has-feedback[aria-pressed='true'] { background: #faede3; }
.diary-day small { display: block; }
.diary-day-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.feedback-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .55rem; background: var(--accent); color: #fff; border-radius: 9999px; }

.client-feedback-highlight { margin-bottom: 1.5rem; padding: 1.15rem 1.35rem; background: #fdf8f4; border: 1.5px solid var(--accent); border-radius: 6px; box-shadow: 0 4px 16px rgba(117, 83, 90, 0.1); }
.client-feedback-highlight h3 { margin: 0 0 .6rem; font: 600 1.15rem/1.3 Inter, sans-serif; color: var(--accent); display: flex; align-items: center; gap: .4rem; }
.client-feedback-highlight p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }

.mentor-feedback-editor { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 2px dashed var(--rule); }
.mentor-feedback-editor h3 { font: 400 1.5rem/1.2 'Instrument Serif', Georgia, serif; color: var(--accent); margin: 0 0 .75rem; }
.mentor-feedback-editor form { display: grid; gap: .85rem; }
.mentor-feedback-editor textarea { min-height: 5.5rem; width: 100%; padding: .85rem 1rem; border: 1px solid var(--rule); background: #fff; color: var(--ink); font: inherit; }
.mentor-feedback-editor textarea:focus { border-color: var(--accent); outline: 1px solid var(--accent); }
.mentor-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.mentor-notify-label, .folder-notify-label { display: inline-flex; align-items: center; gap: .45rem; font-size: .875rem; color: var(--ink); cursor: pointer; user-select: none; font-weight: 500; }
.mentor-notify-label input, .folder-notify-label input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); cursor: pointer; }
.mentor-status-msg { margin: 0; font-size: .875rem; font-weight: 500; color: #2e6b38; }
#day-detail { border: 1px solid var(--rule); padding: 1.25rem; background: var(--paper); }
#day-detail form:not(#day-close) { display: grid; gap: 1.1rem; margin: 0; }
#day-detail textarea { display: block; min-height: 4.5rem; width: 100%; resize: vertical; padding: .8rem .9rem; border: 1px solid var(--rule); border-radius: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 Inter, sans-serif; }
#day-detail textarea:focus { outline: 1px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
#day-detail textarea::placeholder { color: #857776; opacity: 1; }
#day-detail label { gap: .45rem; font-size: .9375rem; font-weight: 500; }
#day-detail #day-status { margin: 0; font-size: .875rem; }
#day-detail #day-status:empty { display: none; }
#day-detail p { white-space: pre-wrap; overflow-wrap: anywhere; }
.diary-day-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.15rem; border-bottom: 1px solid var(--rule); }
.diary-day-identity { min-width: 0; }
#day-detail #day-title { margin: 0; color: var(--ink); font: 400 2.15rem/1.12 'Instrument Serif', Georgia, serif; }
#day-detail .diary-day-date { margin: .35rem 0 0; color: #75535a; font-size: .875rem; line-height: 1.4; }
#day-close { flex: 0 0 auto; }
#day-close .detail-close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: 0; margin: -.25rem -.4rem 0 0; border: 0; background: transparent; color: var(--ink); }
#day-close .detail-close:hover { background: var(--sand); }
#day-close .detail-close svg { width: 1.25rem; height: 1.25rem; }
#day-dialog .diary-day-heading { position: sticky; top: 0; z-index: 2; background: var(--paper); padding-top: .15rem; }
#day-detail form:not(#day-close) > button { width: 100%; }
#day-close { display: none; margin: 0; }
#day-dialog #day-close { display: block; }
#day-dialog #day-detail { border: 0; padding: 0; }
body:has(#day-dialog[open]) { overflow: hidden; }
@media (max-width: 680px) {
  .diary-layout { display: block; }
  .diary-layout > #day-detail { display: none; }
  #day-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
}

#day-dialog { width: min(34rem, calc(100% - 1rem)); max-height: calc(100dvh - 1rem); margin: auto; padding: 1.25rem; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); box-shadow: 0 1rem 4rem rgb(63 28 33 / .2); }
#day-dialog::backdrop { background: rgb(63 28 33 / .45); }

/* Week selector */
.diary-week-selector { display: flex; flex-wrap: wrap; gap: .6rem; margin: .5rem 0 1.25rem; }
.diary-week-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.15rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 500 .9375rem Inter, sans-serif; cursor: pointer; border-radius: 4px; transition: all .15s ease; }
.diary-week-btn:hover { background: var(--sand); }
.diary-week-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; box-shadow: 0 2px 8px rgba(117, 83, 90, 0.2); }
.diary-week-btn .week-badge-new { display: inline-block; padding: .15rem .45rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: #2e6b38; color: #fff; border-radius: 9999px; }
.diary-week-btn.active .week-badge-new { background: #fff; color: #2e6b38; }

/* Supplements card */
.supplements-box { padding: 1.1rem 1.25rem; background: #fdfaf6; border: 1px solid var(--rule); border-radius: 6px; display: grid; gap: .75rem; }
.supplements-checkbox-label { display: flex; align-items: center; gap: .65rem; font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none; }
.supplements-checkbox-label input[type="checkbox"] { width: 1.3rem; height: 1.3rem; accent-color: var(--accent); cursor: pointer; }
.supplements-hint { margin: 0; font-size: .85rem; line-height: 1.45; color: #75535a; }
.supplements-sublabel { font-size: .875rem; font-weight: 500; color: var(--ink); margin-top: .25rem; }
.supplements-note-input { width: 100%; padding: .65rem .85rem; border: 1px solid var(--rule); background: #fff; color: var(--ink); font: inherit; font-size: .9375rem; }
.supplements-note-input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }

/* Mentor view sections */
.mentor-entry-section { margin-bottom: 1.1rem; padding-bottom: .95rem; border-bottom: 1px solid var(--rule); }
.mentor-entry-label { display: block; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: .35rem; }
.mentor-entry-value { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }
.mentor-entry-value.empty { color: #857776; font-style: italic; }
.supplements-status-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 9999px; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; }
.supplements-status-pill.taken { background: #eaf5eb; color: #245e2c; border: 1px solid #b8dfbe; }
.supplements-status-pill.not-taken { background: #f7f3ee; color: #75535a; border: 1px solid #dfd7ce; }
.supplements-note-display { margin: .35rem 0 0; font-size: .9375rem; color: #4a3e36; line-height: 1.5; }

/* Week 3 Supplements Table & Fields */
.supplements-table-wrapper {
  overflow-x: auto;
  margin: .65rem 0 1rem;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}
.supplements-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  min-width: 22rem;
}
.supplements-table th, .supplements-table td {
  padding: .85rem .75rem;
  border: 1px solid var(--rule);
  vertical-align: middle;
}
.supplements-table th {
  background: var(--sand);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
}
.supplements-table td {
  background: #fff;
}
.supplement-check-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  cursor: pointer;
  user-select: none;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink);
  padding: .45rem .6rem;
  border-radius: 4px;
  min-height: 54px;
}
.supplement-check-label:hover {
  background: #fbf6f0;
}
.supplement-check-label input[type="checkbox"] {
  width: 1.6rem;
  height: 1.6rem;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}
.supplement-check-subtext {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.supplement-check-subtext.is-taken {
  color: #2e6b38;
}
.supplement-check-subtext.is-empty {
  color: #857776;
}
.supplement-day-status {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .8125rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.supplement-day-status.taken {
  background: #eaf5eb;
  color: #245e2c;
  border: 1px solid #b8dfbe;
}
.supplement-day-status.not-taken {
  background: #f7f3ee;
  color: #75535a;
  border: 1px solid #dfd7ce;
}

/* Mentor supplement editor */
.mentor-supplements-box {
  background: #fdfaf6;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
}
.mentor-supplements-box h4 {
  margin: 0 0 .35rem;
  font: 600 1.05rem/1.3 Inter, sans-serif;
  color: var(--accent);
}
.mentor-supplements-desc {
  margin: 0 0 .9rem;
  font-size: .85rem;
  line-height: 1.5;
  color: #75535a;
}
.supplement-header-cell {
  position: relative;
  min-width: 9.5rem;
  padding-top: 1.25rem !important;
}
.supplement-header-input {
  width: 100%;
  padding: .45rem .5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}
.supplement-header-input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}
.btn-remove-sup-col {
  position: absolute;
  top: .2rem;
  right: .3rem;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #857776;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-remove-sup-col:hover {
  background: #f0e6e8;
  color: var(--accent);
}
.supplements-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: .85rem;
}
.btn-add-sup-col {
  padding: .5rem .85rem;
  font-size: .8125rem;
  background: var(--sand);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}
.btn-add-sup-col:hover {
  background: #eedfd3;
}
.btn-save-supplements {
  padding: .55rem 1.1rem;
  font-size: .8125rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.btn-save-supplements:hover {
  filter: brightness(0.95);
}
.btn-save-supplements.has-changes {
  background: #2e6b38;
  border-color: #2e6b38;
  box-shadow: 0 0 0 2px rgba(46, 107, 56, 0.25);
}
.btn-save-supplements.saved {
  background: #2e6b38;
  border-color: #2e6b38;
}
.supplements-feedback-msg {
  font-size: .8125rem;
  font-weight: 600;
  color: #2e6b38;
}
.supplements-feedback-msg.pending {
  color: #b35900;
}
.supplements-feedback-msg.success {
  color: #2e6b38;
}
.supplements-feedback-msg.error {
  color: #a4262c;
}
.supplements-empty-box {
  padding: 1.1rem 1.25rem;
  background: #fdfaf6;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  color: #75535a;
  font-size: .9375rem;
  line-height: 1.5;
}
.time-input {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem Inter, sans-serif;
}
.time-input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

/* Josipa protocol layout */
.josipa-intro-box {
  padding: 1.1rem 1.25rem;
  background: #fdfaf6;
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin-bottom: 1.25rem;
}
.josipa-intro-box h3 {
  margin: 0 0 .35rem;
  font: 600 1.15rem/1.3 Inter, sans-serif;
  color: var(--accent);
}
.josipa-intro-box p {
  margin: 0;
  font-size: .875rem;
  color: #75535a;
  line-height: 1.45;
}
.josipa-card {
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.josipa-card.josipa-feeling-card {
  background: #fdfaf6;
  border-color: #eedfd3;
}
.josipa-card-title {
  display: block;
  font: 600 1rem/1.3 Inter, sans-serif;
  color: var(--ink);
  margin-bottom: .6rem;
}
.josipa-card-title.highlight {
  color: var(--accent);
}
.josipa-field-hint {
  margin: -.25rem 0 .75rem;
  font-size: .85rem;
  color: #75535a;
  line-height: 1.45;
}
.josipa-checklist {
  display: grid;
  gap: .65rem;
}
.josipa-check-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .65rem .85rem;
  background: #fdfaf6;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.josipa-check-row:hover {
  background: #fbf5ef;
  border-color: #d6c6b8;
}
.josipa-check-row input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--accent);
  cursor: pointer;
  margin-top: .15rem;
  flex-shrink: 0;
}
.josipa-check-text {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.josipa-item-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
}
.josipa-item-desc {
  font-size: .8125rem;
  color: #75535a;
  line-height: 1.35;
}
.josipa-mentor-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .6rem;
  margin-top: .5rem;
}
.josipa-mentor-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: #fff;
  font-size: .875rem;
}
.josipa-mentor-item.checked {
  background: #f4faf4;
  border-color: #b8dfbe;
}
.josipa-status-badge {
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
  white-space: nowrap;
}
.josipa-status-badge.checked {
  background: #eaf5eb;
  color: #245e2c;
}
.josipa-status-badge.unchecked {
  background: #f7f3ee;
  color: #857776;
}
.josipa-feeling-highlight {
  background: #fdfaf6;
  border-left: 4px solid var(--accent);
}

