/* Theme-adaptive research calendar. All selectors scoped to BioHack. */
.bphp-regimen,.bphp-regimen-launch{box-sizing:border-box;width:100%;min-width:0;max-width:none;color:var(--bphp-text,currentColor);font-family:inherit}
.bphp-regimen *,.bphp-regimen-launch *{box-sizing:border-box}
.bphp-regimen{container-type:inline-size;display:block;overflow:visible}
.bphp-regimen-header{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;padding:1.5rem 0;border-bottom:1px solid var(--bphp-line,#ddd);flex-wrap:wrap}
.bphp-regimen-header h2{font-size:clamp(1.8rem,3vw,3.1rem);line-height:1.1;margin:.3rem 0}.bphp-regimen-header p{margin:0;opacity:.75}
.bphp-regimen-kicker{font-size:.73rem;font-weight:750;letter-spacing:.17em;text-transform:uppercase;color:var(--bphp-primary,currentColor)}
.bphp-regimen button,.bphp-regimen-launch button{font:inherit;border:1px solid var(--bphp-line,#ccc);background:var(--bphp-surface,#fff);color:inherit;cursor:pointer;border-radius:.75rem;padding:.55rem .9rem}
.bphp-regimen button:hover,.bphp-regimen-launch button:hover{border-color:var(--bphp-primary,currentColor)}
.bphp-regimen-header>button,.bphp-regimen-form button[type=submit],.bphp-regimen-launch [data-regimen-open],.bphp-regimen [data-regimen-form] button[type=submit]{background:var(--bphp-primary,#222);color:var(--bphp-on-primary,#fff);border-color:var(--bphp-primary,#222)}
.bphp-regimen-toolbar{display:flex;align-items:center;gap:.75rem;margin:1.2rem 0}.bphp-regimen-toolbar h3{margin:0;flex:1;text-align:center;font-size:1.3rem}
.bphp-regimen-overview{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin:0 0 1rem;padding:0 0 .7rem;border-bottom:1px solid var(--bphp-line,#ddd)}
.bphp-regimen-overview-heading{font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;font-weight:750;margin-right:auto;opacity:.78}
.bphp-regimen-tally{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--bphp-line,#ddd);border-radius:1rem;padding:.45rem .75rem;text-transform:capitalize;font-size:.78rem;background:var(--bphp-surface,transparent)}
.bphp-regimen-tally b{font-size:1.08rem;color:var(--bphp-primary,currentColor)}
.bphp-regimen-tally[data-state=skipped]{border-style:dashed}
.bphp-regimen-tally[data-state=postponed] b{color:var(--bphp-accent,currentColor)}
.bphp-regimen-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;width:100%;min-width:0}
.bphp-regimen-week-label{font-size:.71rem;text-transform:uppercase;letter-spacing:.08em;padding:.5rem;text-align:center;opacity:.7;font-weight:750}
.bphp-regimen-day,.bphp-regimen-empty{min-width:0;min-height:115px;border:1px solid var(--bphp-line,#ddd);border-radius:.6rem;padding:.5rem;background:var(--bphp-surface,transparent)}
.bphp-regimen-empty{background:var(--bphp-soft,transparent);opacity:.45}
.bphp-regimen-date{display:inline-flex;width:1.8rem;height:1.8rem;align-items:center;justify-content:center;font-size:.83rem;font-weight:700;border-radius:50%}
.bphp-regimen-day:has(.bphp-regimen-event){border-top:3px solid var(--bphp-primary,currentColor)}
.bphp-regimen-day.is-today .bphp-regimen-date{background:var(--bphp-primary,#222);color:var(--bphp-on-primary,#fff)}
.bphp-regimen-event{background:var(--bphp-soft,#f6f6f6);border-left:3px solid var(--bphp-primary,currentColor);border-radius:.35rem;padding:.4rem;margin:.35rem 0;font-size:.76rem;overflow-wrap:anywhere}
.bphp-regimen-event[data-state=skipped]{opacity:.7;border-left-style:dashed;text-decoration:line-through;text-decoration-thickness:1px}.bphp-regimen-event[data-state=postponed]{border-left-color:var(--bphp-accent,currentColor)}
.bphp-regimen-event strong,.bphp-regimen-event span{display:block}.bphp-regimen-event span{opacity:.75;margin:.2rem 0}
.bphp-regimen-event-actions{display:flex;gap:.25rem;flex-wrap:wrap}.bphp-regimen-event-actions button{font-size:.66rem;padding:.25rem .4rem;border-radius:.3rem}
.bphp-regimen-panels{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;margin:1.3rem 0}
.bphp-regimen-card{border:1px solid var(--bphp-line,#ddd);border-radius:1rem;padding:1.2rem;min-width:0;background:var(--bphp-surface,transparent)}
.bphp-regimen-card h3{margin-top:0}.bphp-regimen-list-item{padding:.85rem 0;border-bottom:1px solid var(--bphp-line,#ddd);display:flex;justify-content:space-between;gap:.7rem;flex-wrap:wrap}
.bphp-regimen-list-item p{margin:.2rem 0;opacity:.8;font-size:.9rem}.bphp-regimen-list-item small{opacity:.7}
.bphp-regimen [data-regimen-form] label,.bphp-regimen-launch label{display:grid;gap:.35rem;min-width:0;font-size:.87rem;font-weight:600}
.bphp-regimen [data-regimen-form] input,.bphp-regimen-launch select{min-width:0;width:100%;font:inherit;border:1px solid var(--bphp-line,#ccc);background:var(--bphp-field-surface,#fff);color:inherit;border-radius:.5rem;padding:.55rem}
.bphp-regimen-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin:.8rem 0}
.bphp-regimen-weekdays{display:flex;flex-wrap:wrap;gap:.65rem}.bphp-regimen-weekdays label{display:flex!important;flex-direction:row;align-items:center;gap:.25rem}.bphp-regimen-weekdays input{width:auto!important}
.bphp-regimen fieldset{margin:1rem 0;padding:.7rem;border:1px solid var(--bphp-line,#ddd);border-radius:.65rem}
.bphp-regimen-launch{border:1px solid var(--bphp-line,#ddd);border-radius:1rem;margin:1.25rem 0;padding:1.1rem;background:var(--bphp-surface,transparent)}
.bphp-regimen-launch h3{margin:.15rem 0}.bphp-regimen-launch p{opacity:.8}
.bphp-regimen-launch-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:.7rem}
.bphp-regimen-print-brand{display:none}.bphp-regimen-footer{font-size:.8rem;opacity:.7;margin-top:1.5rem}
@container (max-width:850px){.bphp-regimen-day,.bphp-regimen-empty{min-height:84px;padding:.25rem}.bphp-regimen-event{font-size:.67rem}.bphp-regimen-panels{grid-template-columns:1fr}}
@media(max-width:650px){.bphp-regimen-launch-fields,.bphp-regimen-grid{grid-template-columns:1fr}.bphp-regimen-calendar{gap:2px}.bphp-regimen-week-label{font-size:.62rem}.bphp-regimen-day,.bphp-regimen-empty{min-height:60px;padding:2px}.bphp-regimen-event{font-size:.61rem;padding:.2rem}.bphp-regimen-event-actions button{font-size:.6rem;padding:.12rem}.bphp-regimen-header{padding:1rem 0}}
@media print{
  @page{size:landscape;margin:12mm}
  body:has(.bphp-regimen) header:not(.bphp-regimen-header),body:has(.bphp-regimen) nav,body:has(.bphp-regimen) footer:not(.bphp-regimen-footer){display:none!important}
  .bphp-regimen-header>button,.bphp-regimen-toolbar button,.bphp-regimen-panels,.bphp-regimen-event-actions,.bphp-regimen-footer,.bphp-regimen-launch{display:none!important}
  .bphp-regimen{color:#111!important;background:white!important;width:100%!important;max-width:none!important}
  .bphp-regimen-print-brand{display:flex!important;align-items:center;gap:10px;border-bottom:1px solid #ddd;margin-bottom:12px;padding-bottom:8px}
  .bphp-regimen-brand-logo{max-height:44px;max-width:90px;object-fit:contain}.bphp-regimen-print-brand small{margin-left:auto}
  .bphp-regimen-calendar{grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.bphp-regimen-day{min-height:90px;break-inside:avoid;background:white!important;border:1px solid #ccc!important}
  .bphp-regimen-event{background:#f4f4f4!important;color:#111!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
}
.bphp-regimen-view-picker{display:flex;gap:3px;border:1px solid var(--bphp-line,#ccc);border-radius:9px;padding:3px}
.bphp-regimen-view-picker button[aria-pressed=true]{background:var(--bphp-primary,#234);color:var(--bphp-on-primary,#fff)}
.bphp-regimen-card-intro{font-size:.82rem;opacity:.75}
.bphp-regimen-period{padding:0 0 13px;margin:0 0 14px}
.bphp-regimen-period h4{padding:9px 13px;background:color-mix(in srgb,var(--bphp-primary,currentColor) 12%,var(--bphp-surface,#fff));border-left:4px solid var(--bphp-primary,currentColor);border-radius:5px;margin:8px 0 0;font-size:.9rem}
.bphp-regimen-period[data-period=Midday] h4{border-color:#21ad9c}
.bphp-regimen-period[data-period=Afternoon] h4{border-color:#8364bd}
.bphp-regimen-period[data-period=Evening] h4{border-color:#ca8739}
.bphp-regimen-print-report{display:none}
.bphp-regimen-reschedule-dialog{border:1px solid var(--bphp-line,#ccc);border-radius:14px;padding:22px;background:var(--bphp-surface,#fff);color:var(--bphp-text,inherit);max-width:min(92vw,410px)}
.bphp-regimen-reschedule-dialog::backdrop{background:rgba(0,0,0,.4)}
.bphp-regimen-reschedule-dialog h3{margin:0 0 10px}.bphp-regimen-reschedule-dialog label{display:grid;gap:6px}.bphp-regimen-reschedule-dialog input{min-height:38px}
.bphp-regimen-dialog-actions{display:flex;justify-content:end;gap:8px;margin-top:15px}
.bphp-regimen-header,.bphp-regimen-card>h3{background:color-mix(in srgb,var(--bphp-primary,currentColor) 13%,var(--bphp-surface,#fff));padding:15px;border-radius:9px;color:var(--bphp-text,currentColor)}
.bphp-regimen-header h2,.bphp-regimen-card>h3{font-family:inherit}
.bphp-health-layout-sidebar .bphp-health-navigation{background:color-mix(in srgb,var(--bphp-primary,currentColor) 10%,var(--bphp-surface,#fff));border:1px solid var(--bphp-line,#ddd);border-radius:12px}
.bphp-health-layout-sidebar{min-width:0}
@container (max-width:780px){.bphp-f6-rotation-layout{grid-template-columns:minmax(0,1fr)}.bphp-f6-rotation-side .bphp-p4-rotation-key{max-height:none}}
@media(max-width:700px){.bphp-f6-rotation-layout{grid-template-columns:minmax(0,1fr)}.bphp-f6-rotation-layout .bphp-p5-rotation-art{max-width:380px;margin:auto}}
@media print{
  .bphp-regimen-calendar,.bphp-regimen-overview,.bphp-regimen-toolbar,.bphp-regimen-calc,.bphp-regimen-reschedule-dialog{display:none!important}
  .bphp-regimen-print-report{display:block!important;max-width:none!important;width:100%!important;color:var(--bphp-text,#111)}
  .bphp-regimen-print-report h3{font-size:16pt;margin:12px 0}
  .bphp-regimen-print-period{break-inside:avoid;margin:15px 0}
  .bphp-regimen-print-period h4{padding:7px 10px;border-left:5px solid var(--bphp-primary,#333);background:color-mix(in srgb,var(--bphp-primary,#333) 12%,#fff);print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .bphp-regimen-print-period table{width:100%;border-collapse:collapse;font-size:10pt}
  .bphp-regimen-print-period th,.bphp-regimen-print-period td{border-bottom:1px solid #aaa;padding:6px;text-align:left}
  .bphp-regimen-print-period tr[data-state=skipped]>td{opacity:.65;text-decoration:line-through}
  .bphp-regimen-print-period tr[data-state=postponed]>td{background:#fff0d5!important;print-color-adjust:exact}
}
/* Keep native calendar controls usable in narrow theme/editor columns. */
@container (max-width:600px){.bphp-regimen-toolbar{flex-wrap:wrap}.bphp-regimen-toolbar h3{flex:1 1 120px}.bphp-regimen-view-picker{display:flex;flex-wrap:wrap;gap:.25rem}}

.bphp-regimen-create{border:2px solid var(--bphp-primary,currentColor);background:color-mix(in srgb,var(--bphp-primary,currentColor) 5%,var(--bphp-surface,Canvas));box-shadow:0 8px 24px color-mix(in srgb,currentColor 8%,transparent)}.bphp-regimen-instructions{border-inline-start:4px solid var(--bphp-primary,currentColor);padding:1rem;background:color-mix(in srgb,currentColor 5%,transparent);margin:1rem 0}.bphp-regimen-instructions .bphp-regimen-kicker{font-weight:750;letter-spacing:.12em}.bphp-regimen-calc .rcpc-mode-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.bphp-regimen-calc .rcpc-results .rcpc-instrument-row{grid-column:auto;width:100%;min-width:0}.bphp-regimen-calc [data-p5-focus-regimen]{background:var(--bphp-primary,LinkText);color:var(--bphp-on-primary,Canvas);border-color:var(--bphp-primary,LinkText);width:100%}.bphp-regimen-explanations{max-width:100%;margin-top:1rem}.bphp-regimen-titration-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) auto;gap:.5rem;margin:.5rem 0}.bphp-regimen-titration-row input{min-width:0;width:100%}@media(max-width:720px){.bphp-regimen-calc .rcpc-mode-grid{grid-template-columns:1fr}.bphp-regimen-titration-row{grid-template-columns:1fr 1fr}}

.bphp-regimen-titration-row:has(>.bphp-native-record-list){display:block}.bphp-regimen-titration-row>.bphp-native-record-list{width:100%;min-width:0}.bphp-regimen-titration-row label{min-width:0}

/* A single date cell spans that day's individually aligned scheduled compounds. */
.bphp-regimen-print-day .bphp-regimen-print-date{vertical-align:top;font-weight:700}
@media print{.bphp-regimen-print-period{break-inside:auto}.bphp-regimen-print-day{break-inside:avoid}.bphp-regimen-print-period thead{display:table-header-group}.bphp-regimen-print-day+.bphp-regimen-print-day{border-top:1px solid #aaa}}
