/* Comfortable reading theme. Keep layout and clinical meaning unchanged. */
:root {
  --ink: #283f3a;
  --muted: #607367;
  --green: #286e5e;
  --pale: #eaf2ec;
  --line: #dce5dd;
  --paper: #ffffff;
  --bg: #f5f6f2;
  --warm: #f7efdf;
  --reading: #52685b;
  --secondary: #637367;
  --metric-bg: #f0f4ed;
  --amber: #856022;
}
body { font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--ink); text-wrap: pretty; }
h1 { font-size: 34px; letter-spacing: -.6px; }
small, .muted { color: var(--muted); }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green); outline-offset: 4px;
}
input, select, textarea { font-size: 15px; border-color: #d6e1d7; }
input::placeholder, textarea::placeholder { color: #7d8e82; }
.primary:hover { background: #205d4e; }
.quiet:hover { background: #f0f5ee; border-color: #c7d8ca; }
.badge { font-size: 12px; padding: 4px 9px; }
.badge.warm { color: var(--amber); background: var(--warm); }
.badge.gray { color: #66776a; background: #eef2ec; }
.sidebar { background: #fcfdfb; }
.brand span { font-size: 18px; letter-spacing: .2px; }
.profile { margin: 28px 0 24px; }
.profile strong { font-size: 16px; }
.profile small, .person-switch-label, .nav-caption { font-size: 12px; color: var(--muted); }
.nav-caption { letter-spacing: 1px; }
nav button { font-size: 15px; color: #607365; padding: 12px; }
nav button.active { background: #e5efe6; color: #246351; }
nav button:hover { background: #edf3e9; }
.person-tabs { background: #edf2e9; border-color: #d8e3d5; }
.person-tab { color: #667a67; font-size: 14px; }
.person-tab.active { color: #286447; border-color: #ccddcb; }
.topbar { color: var(--secondary); font-size: 13px; background: rgba(252,253,250,.94); }
.page-heading h1 { line-height: 1.4; margin-bottom: 8px; }
.page-heading p { font-size: 15px; line-height: 1.8; }
.panel, .stat, .document-card, .bp-filter-panel {
  border-color: var(--line); border-radius: 12px;
  box-shadow: 0 3px 14px rgba(40,63,48,.025);
}
.panel-header h2, .medication-section h2, .vaccine-plan h2, .vaccine-history h2 { font-size: 22px; }
.panel-header h3, .bp-charts .panel-header h3 { font-size: 19px; }
.panel-header small { font-size: 13px; }
.stat > small { color: var(--secondary); font-size: 13px; }
.stat strong { color: var(--ink); font-size: 30px; }
.stat span { font-size: 13px; }
.stat .stat-date { font-size: 18px; }
.notice { background: #f7f2e7; border-color: #e8ddc5; color: #7c653c; font-size: 13px; }
footer { color: var(--secondary); font-size: 12px; }

/* Overview: the section names and record names lead, dates remain easy to find. */
.overview-dashboard { --ov-edge: var(--line); --ov-subtle: var(--secondary); --ov-accent: #5a9277; }
.ov-section-title h2, .ov-side .ov-section-title h2 { font-size: 20px; letter-spacing: 0; }
.ov-section-title span, .ov-side .ov-section-title span { font-size: 12px; }
.ov-section-title .text-button { font-size: 13px; }
.ov-vital { border-color: var(--line); }
.ov-vital:before { background: #91b59a; }
.ov-vital-label { color: var(--reading); font-size: 14px; }
.ov-vital > strong { color: #315f48; }
.ov-vital > small, .ov-vital-foot, .ov-vital-foot.ov-inline-link { color: var(--secondary); font-size: 12px; }
.ov-vital-attention { background: #fbf6eb; border-color: #e6d8b9; }
.ov-vital-attention > strong { color: var(--amber); }
.ov-measurement-note, .ov-method-note { color: var(--secondary); font-size: 12px; }
.ov-topic-head h3 { font-size: 18px; line-height: 1.6; }
.ov-topic-index { font-size: 12px; color: #668772; }
.ov-topic-metric > small { font-size: 13px; color: var(--reading); }
.ov-topic-metric > strong { font-size: 22px; color: #2e654e; }
.ov-topic-metric > strong span, .ov-topic-metric > small.ov-metric-date { font-size: 12px; color: var(--secondary); }
.ov-topic-details summary, .ov-topic-details > small { color: var(--secondary); font-size: 13px; }
.ov-topic-details p { font-size: 14px; color: var(--reading); }
.ov-topic-actions button, .ov-inline-link, .ov-topic-linked .care-link-button { font-size: 13px; }
.ov-topic-actions button:last-child { color: var(--secondary); }
.ov-med-name h3, .ov-med-row > h3, .ov-vaccine-title h3 { font-size: 17px; line-height: 1.65; }
.ov-med-row > strong { font-size: 18px; color: #345f46; }
.ov-med-row > p, .ov-vaccine-note, .ov-feedback > p { font-size: 14px; color: var(--reading); }
.ov-med-row small, .ov-feedback-foot > span { font-size: 12px; color: var(--secondary); }
.ov-vaccine-title .badge { font-size: 12px; }
.ov-vaccine-window { color: #3d6c4e; }
.ov-vaccine-window span { font-size: 12px; color: var(--secondary); }
.ov-vaccine-button { font-size: 13px; background: #eff4e9; color: #406b4b; }
.ov-archive-bar span, .ov-archive-actions button { font-size: 13px; color: #536f59; }

/* Monthly plans and summaries are readable at ordinary browser zoom. */
.schedule-group { background: #fcfdf9; border-color: #dce5d6; }
.schedule-group-head { background: #edf2e4; border-color: #dce5d6; }
.schedule-group-head h3 { font-size: 17px; color: #3c6142; }
.schedule-group-head > span { font-size: 12px; color: #61755c; }
.schedule-item h4 { font-size: 16px; line-height: 1.7; }
.schedule-item-foot > .badge { font-size: 12px; }
.schedule-item-foot button, .schedule-item-foot .care-link-button { font-size: 13px; }
.schedule-note { color: var(--secondary); font-size: 12px; }
.monitoring-head h2, .bp-near-card .monitoring-head h2 { font-size: 24px; line-height: 1.5; }
.monitoring-head .eyebrow { font-size: 14px; letter-spacing: 1px; }
.monitoring-head p, .bp-near-card .monitoring-head p { font-size: 14px; color: var(--muted); }
.monitoring-date { font-size: 13px; color: var(--secondary); border-color: #d7e2d8; }
.monitoring-values, .bp-near-stats, .surgery-facts, .medication-card {
  background: var(--metric-bg); border-color: #dce6d7;
}
.monitoring-value > small:first-child, .bp-near-stats small { font-size: 13px; color: var(--reading); }
.monitoring-value > span, .monitoring-value > small:last-child { font-size: 12px; color: var(--secondary); }
.monitoring-value strong { font-size: 27px; color: #2c6b52; }
.monitoring-copy { color: var(--reading); font-size: 15px; line-height: 1.85; }
.monitoring-actions button, .bp-near-actions button, .bp-near-actions button:last-child { font-size: 14px; }
.monitoring-actions button:last-child { color: var(--secondary); }
.monitoring-footnote, .bp-method-note { color: var(--secondary); font-size: 12px; }
.bp-near-stats strong { font-size: 27px; color: #365f44; }
.bp-near-stats strong > span, .bp-near-summary { font-size: 12px; color: var(--secondary); }
.bp-near-summary .attention { color: var(--amber); }
.bp-near-analysis > .badge, .monitoring-analysis > .badge { font-size: 13px; }
.bp-near-analysis p { color: var(--reading); font-size: 15px; line-height: 1.85; }
.bp-filter-fields label { font-size: 13px; color: var(--reading); }
.bp-filter-fields input, .bp-filter-fields select { font-size: 14px; }
.bp-filter-foot, .bp-stats .stat > small:last-child { font-size: 12px; color: var(--secondary); }
.bp-table th, .bp-table button, .bp-source-label { font-size: 13px; color: var(--secondary); }
.bp-table td, .bp-table td strong { color: var(--reading); font-size: 15px; }
.bp-table td small, .bp-table th small { font-size: 12px; color: var(--secondary); }
.bp-legend, .bp-high-panel .panel-header small { font-size: 12px; color: var(--secondary); }
.bp-high-date > strong { font-size: 15px; }
.bp-high-date > small, .bp-high-readings button small, .bp-high-note { font-size: 12px; color: var(--secondary); }
.bp-high-readings button { background: #eff4e9; }
.bp-high-readings .bp-high-pulse { color: var(--reading); }

/* Care records, reports and related entries share the same title hierarchy. */
.medication-card-head h3, .medication-pending-card .medication-card-head h3 { font-size: 19px; }
.medication-card-head small, .medication-section > .panel-header small { font-size: 13px; }
.medication-regimen small, .medication-meta { color: var(--secondary); font-size: 12px; }
.medication-regimen strong { color: var(--reading); font-size: 15px; }
.medication-status-note, .medication-pending-card .medication-status-note { color: var(--reading); font-size: 14px; }
.medication-meta button, .medication-history-actions button { font-size: 13px; }
.medication-history-name h3 { font-size: 17px; }
.medication-history-copy p { font-size: 14px; color: var(--reading); }
.medication-history-name small, .medication-history-copy > small { font-size: 12px; color: var(--secondary); }
.medication-pending summary { font-size: 16px; }
.medication-pending > p { font-size: 13px; color: var(--secondary); }
.medication-pending-card { background: #faf7ef; border-color: #e7dfcc; }
.vaccine-row h3, .vaccine-record h3, .surgery-followup strong, .record-heading h3 { font-size: 17px; }
.vaccine-row p, .vaccine-record p, .record p { color: var(--reading); font-size: 15px; }
.vaccine-plan-head p, .vaccine-season p, .vaccine-record-meta, .vaccine-plan-actions small { font-size: 13px; color: var(--secondary); }
.surgery-head h2 { font-size: 25px; }
.surgery-recovery h3, .surgery-pathology h3, .surgery-followups h3, .related-section > h3 { font-size: 17px; }
.surgery-recovery p, .surgery-details p { color: var(--reading); font-size: 15px; }
.surgery-pathology { background: #faf6ec; border-color: #e8dfca; }
.surgery-pathology p { font-size: 14px; color: #786741; }
.surgery-details summary, .surgery-actions button { font-size: 14px; }
.surgery-recovery small, .surgery-followup small { color: var(--secondary); font-size: 12px; }
.care-preview-head h3, .medication-card .care-preview-head h3 { font-size: 15px; }
.linked-record-row strong, .medication-card .linked-record-row strong { font-size: 14px; color: #46694e; }
.linked-record-row small, .medication-card .linked-record-row small { font-size: 12px; color: var(--secondary); }
.care-link-button, .care-preview-all { font-size: 13px; }
.related-group > summary { font-size: 15px; }
.document-card h3 { font-size: 16px; }
.document-card small, .document-card .record-actions { font-size: 12px; color: var(--secondary); }
.timeline-row strong { font-size: 15px; }
.record-meta, .record-actions { font-size: 12px; color: var(--secondary); }
.record-actions button { font-size: 13px; }
.empty { color: var(--secondary); }
.viewer pre { color: var(--reading); font-size: 15px; }
.dialog-head h2 { font-size: 24px; }
.login-heading p, .login-note { font-size: 14px; color: var(--muted); }
.login-note span { font-size: 12px; color: var(--secondary); }

@media (max-width: 1100px) {
  .brand { gap: 8px; }
  .brand span { font-size: 16px; }
}
@media (min-width: 701px) and (max-width: 1150px) {
  .ov-main-grid { grid-template-columns: 1fr; }
  .ov-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .sidebar { padding: 18px 18px 8px; }
  .brand span { font-size: 18px; }
  .person-tab { font-size: 16px; }
  nav button { font-size: 14px; padding: 11px 12px; }
  .topbar { height: auto; min-height: 54px; padding: 9px 18px; }
  .topbar > div { gap: 6px; flex-wrap: wrap; }
  .topbar .quiet { font-size: 12px; }
  h1 { font-size: 29px; }
  .page-heading p { font-size: 14px; }
  .content { padding: 24px 18px; }
  .panel-header h2, .medication-section h2, .vaccine-plan h2, .vaccine-history h2 { font-size: 21px; }
  .ov-section-title h2, .ov-side .ov-section-title h2 { font-size: 19px; }
  .ov-section-title span { font-size: 12px; }
  .ov-vital-label { font-size: 13px; }
  .ov-vital > strong { font-size: clamp(20px, 6vw, 25px); }
  .ov-vital > small, .ov-vital-foot { font-size: 12px; }
  .ov-topic-head h3 { font-size: 18px; }
  .ov-topic-metric > strong { font-size: 24px; }
  .stat { padding: 17px 15px; min-width: 0; }
  .stat strong, .bp-stats .stat strong { font-size: 27px; }
  .stat .stat-date { font-size: 16px; overflow-wrap: anywhere; }
  .schedule-group-head h3 { font-size: 16px; }
  .schedule-item h4 { font-size: 15px; }
  .monitoring-head h2, .bp-near-card .monitoring-head h2 { font-size: 22px; }
  .monitoring-head { flex-wrap: wrap; }
  .monitoring-head .eyebrow { font-size: 14px; }
  .monitoring-date { font-size: 12px; }
  .monitoring-value strong { font-size: 26px; }
  .monitoring-head p, .bp-near-card .monitoring-head p { font-size: 13px; }
  .bp-near-stats strong { font-size: clamp(20px, 6.3vw, 25px); }
  .bp-near-stats > div { padding: 0 11px; }
  .bp-near-stats strong > span { font-size: 11px; margin: 0 3px; }
  .medication-card-head h3, .medication-pending-card .medication-card-head h3 { font-size: 18px; }
  .medication-card-head { flex-wrap: wrap; gap: 7px; }
  .medication-card-head .badge { font-size: 11px; }
  .surgery-head h2 { font-size: 23px; }
  .surgery-head .badge, .surgery-date { font-size: 12px; }
  .heading-actions { gap: 9px; }
  input, select, textarea, .bp-filter-fields input, .bp-filter-fields select,
  .monitoring-metric-editor input { font-size: 16px; }
}
/* Let two month groups share the row instead of leaving an empty third column. */
@media (min-width: 1151px) {
  .schedule-groups { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
.ov-topic-grid > .ov-topic:last-child:nth-child(odd) { grid-column: 1 / -1; }
.surgery-facts dt { font-size: 13px; color: var(--reading); }
.bp-filter-fields > label { min-width: 0; }
@media (max-width: 360px) {
  .bp-filter-fields { grid-template-columns: minmax(0, 1fr); }
}
