.wellness-page { --side-line-inset: max(12px, calc((100vw - 1180px) / 2)); --side-line-width: 4px; background: #fafbf8; }
.wellness-shell { width: min(1040px, calc(100% - 64px)); padding-top: 28px; }
.wellness-header { padding-bottom: 25px; border-bottom: 1px solid #dce3d6; }
.wellness-brand { font-size: 30px; font-weight: 700; color: #4f7d24; text-decoration: none; }
.wellness-page .blog-nav a { display: inline-flex; align-items: center; min-height: 44px; background: white; }
.wellness-page .blog-nav a.active { background: #eaf0fa; }
.wellness-intro { margin: 36px 0 20px; }
.wellness-intro h1 { margin: 4px 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; color: #274a16; }
.wellness-intro p { max-width: 620px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: #4d712e; margin: 0 0 8px; }
.wellness-card { padding: 24px; margin-bottom: 20px; border: 1px solid #dce3d6; border-radius: 14px; background: white; min-width: 0; }
.wellness-card h2 { margin: 0 0 12px; font-size: 21px; line-height: 1.3; color: #284817; }
.wellness-card h3 { font-size: 16px; }
.wellness-card p { margin-top: 8px; }
.wellness-card .muted, .muted, .wellness-account { color: #52606d; }
.small, .wellness-account { font-size: 13px; }
.wellness-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.wellness-stats h2 { font-size: 15px; color: #52606d; font-weight: 400; }
.stat-value { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; color: #234510; }
.wellness-stats .muted { font-size: 13px; margin-bottom: 0; }
.wellness-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.wellness-form { display: grid; gap: 14px; }
.wellness-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; min-width: 0; }
.wellness-page input, .wellness-page select { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; border: 1px solid #adbca5; border-radius: 7px; background: #fff; color: #1f2933; padding: 10px; font: inherit; font-size: 16px; }
.wellness-page input[type=file] { font-size: 14px; }
.wellness-page button, .wellness-page summary { min-height: 44px; cursor: pointer; }
.wellness-page button { font-size: 14px; }
.wellness-page button:disabled { opacity: .55; cursor: wait; }
.wellness-page :focus-visible { outline: 3px solid #1f5fbf; outline-offset: 3px; }
.wellness-page .primary-button { background: #416823; border: 1px solid #416823; }
.wellness-page .primary-button:hover { background: #2b4d12; }
.wellness-page .secondary-button { margin: 0; }
.wellness-form button { justify-self: start; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-top input { width: 170px; }
.wellness-status { padding: 8px 0; min-height: 32px; }
.wellness-status.error { color: #a12323; }
.wellness-status:empty { display: none; }
#weight-chart svg { width: 100%; height: auto; max-height: 240px; display: block; }
#weight-chart text { font: 13px Arial, sans-serif; fill: #52606d; }
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-week { margin: 18px 0 8px; font-size: 11px; text-align: center; color: #52606d; }
.calendar-grid button { border: 1px solid #e1e6dc; border-radius: 6px; min-height: 56px; padding: 3px 0; background: #fff; color: #263420; }
.calendar-grid button span { display: block; font-size: 9px; }
.calendar-grid .has-record { background: #eef4e7; }
.calendar-grid .goal-day { border: 2px solid #1f5fbf; }
.calendar-grid button[aria-pressed=true] { outline: 2px solid #416823; outline-offset: 0; }
.weight-range { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.wellness-page .weight-range select { width: auto; min-width: 130px; }
.day-records { list-style: none; padding: 0; }
.day-records li { padding: 10px 0; border-bottom: 1px solid #edf0e9; display: flex; align-items: center; gap: 12px; justify-content: space-between; font-size: 14px; }
.day-records button { flex-shrink: 0; padding: 5px 9px; }
.health-card { background: #f4f7ef; }
.health-card details { margin: 16px 0; }
.health-card summary, .delete-details summary { color: #1f5fbf; font-weight: 700; padding: 8px 0; }
#health-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#health-sources label { font-size: 14px; font-weight: 700; }
#health-sources select { display: block; margin-top: 5px; }
.table-scroll { max-height: 290px; overflow: auto; margin-bottom: 18px; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.table-scroll th, .table-scroll td { border-bottom: 1px solid #dce3d6; padding: 8px; }
.table-scroll th { position: sticky; top: 0; background: #f4f7ef; }
.delete-details { margin-top: 18px; }
.danger-button { color: #a12323; border-color: #a12323; }
[hidden] { display: none !important; }
@media (max-width: 740px) {
  .wellness-columns { grid-template-columns: 1fr; gap: 0; }
  .wellness-stats { gap: 8px; }
  .wellness-stats .wellness-card { padding: 14px 10px; }
  .stat-value { font-size: 23px; }
  .wellness-shell { width: calc(100% - 48px); }
  .wellness-card { padding: 18px; }
}
@media (max-width: 420px) {
  .wellness-shell { width: calc(100% - 40px); }
  .wellness-stats { grid-template-columns: 1fr; }
  .wellness-stats .wellness-card { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 0; padding: 14px; }
  .wellness-stats { margin-bottom: 20px; }
  .wellness-stats h2, .wellness-stats p { margin: 0; }
  .wellness-stats .stat-value { grid-column: 2; grid-row: 1 / 3; align-self: center; text-align: right; }
  .form-pair, #health-sources { grid-template-columns: 1fr; }
}
