.bp-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.bp-card{background:#f4f8f3;border:1px solid #dbe5d9;border-radius:12px;padding:14px}.bp-card h4{margin:0 0 10px;font-size:15px}.bp-card b{font-size:24px}.bp-card p{margin:10px 0}.bp-card span{font-size:12px;color:#506356}.bp-toolbar,.bp-source-tools{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.bp-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.bp-editor label{display:block;font-size:13px}.bp-editor input,.bp-editor select,.bp-editor textarea,#bp-day{display:block;width:100%;box-sizing:border-box;padding:10px;border:1px solid #b7cbbd;border-radius:8px;font:inherit;background:white;color:#163d2e}.bp-confirm{display:flex!important;gap:8px;align-items:start;margin:15px 0}.bp-confirm input{width:auto;margin-top:3px}.bp-editor textarea{min-height:65px}.bp-editor select{max-width:100%}#bp-source{margin:12px 0}#bp-source-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.bp-badge{color:#356b58}.bp-editor details{padding:10px;background:#f3f7f0;border-radius:8px}@media(max-width:650px){.bp-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.bp-pair{gap:8px}.bp-card{padding:10px}.bp-card b{font-size:21px}}@media(max-width:380px){.bp-fields{grid-template-columns:1fr}}

.bp-guide{margin:12px 0 16px;padding:12px 14px;background:#f2f7f1;border:1px solid #dce7dd;border-radius:12px}.bp-guide summary{cursor:pointer;font-weight:600}.bp-guide p{line-height:1.65;margin:10px 0}.bp-guide a{text-decoration:underline}


.bp-card-note{display:block;margin-top:10px;padding-top:8px;border-top:1px solid #dbe5d9;font-size:12px;font-weight:400;line-height:1.6;color:#506356;overflow-wrap:anywhere}

/* Calendar readings: phase colors are contextual, not clinical ratings. */
.calday .bp-badge{display:block;align-self:stretch;margin:0 0 5px;padding:4px 5px;background:#eaf3f6;border-radius:6px;color:#244f60;font-variant-numeric:tabular-nums;line-height:1.35}
.bp-mini-label{display:block;font-size:11px;font-weight:600}.bp-mini-row{display:flex;justify-content:space-between;gap:4px;font-size:12px}.bp-mini-row b{font-size:12px;white-space:nowrap}.bp-mini-more{display:block;font-size:11px}
@media(max-width:650px){.calday .bp-badge{padding:3px 2px}.bp-mini-row{flex-wrap:wrap;gap:0 3px}.bp-mini-row b{font-size:11px}.bp-mini-row,.bp-mini-label,.bp-mini-more{font-size:10px}}
.pressure-view details{margin:12px 0}.pressure-view summary{cursor:pointer;padding:9px 0}.pressure-view h3{margin:18px 0 8px}.pressure-view h3 small{font-size:13px;font-weight:400}.pressure-options,.pressure-month{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.pressure-view button[aria-pressed=true]{background:#205744;color:white}.pressure-compare{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pressure-compare>div{display:grid;gap:3px;padding:12px;border-radius:12px;background:#f3f6f2}.pressure-compare b{font-size:clamp(22px,5vw,34px);color:#173e31}.pressure-compare small,.pressure-reading span{color:#51665b}.pressure-view .sectionhead{flex-wrap:wrap;gap:8px}.pressure-chart{display:block;width:100%;max-height:290px}.pressure-chart text{fill:#43594d;font-size:12px}.pressure-chart g{cursor:pointer}.pressure-key{font-size:14px}.pressure-key span:first-child{color:#176b54}.pressure-key span:nth-child(2){color:#77569d}.pressure-reading{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 14px;padding:8px 0;border-bottom:1px solid #e1e9e3}.pressure-reading small{font-weight:400}.pressure-month{justify-content:space-between}.pressure-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;gap:3px;margin:8px 0}.pressure-days > button{position:relative;padding:6px 0;min-height:40px}.pressure-days .has-reading:after{content:'';position:absolute;bottom:3px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:currentColor}

.pressure-view > .sectionhead:first-child{display:flex;flex-direction:row;align-items:center;justify-content:space-between}
.pressure-view .bp-reload{min-width:44px;min-height:44px;padding:4px;font-size:20px}
.bp-current{margin:14px 0;padding:16px;background:#f3f7f2;border-radius:12px}
.bp-current h3{margin:0 0 12px}
.bp-result-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bp-result-pair span,.bp-result-pair strong{display:block}
.bp-result-pair strong{color:#173e31;font-size:2rem;line-height:1.2}
.bp-current small{display:block;margin-top:8px;color:#506356}
.bp-difference{margin:12px 0 0;padding-top:10px;border-top:1px solid #d8e4dc}
.bp-day-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));gap:8px;margin:12px 0}
.bp-day-results .bp-current{margin:0;padding:12px}.bp-observation strong{font-size:1.5rem}.bp-observation+.bp-observation{margin-top:10px}.bp-day-results .bp-difference{font-size:.9rem}
#pressure-trend .pressure-options{display:inline-flex;margin:0 8px 6px 0}

#pressure-calendar{container-type:inline-size}
.bp-cell-key{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:12px 0;font-size:.875rem}
.bp-cell-before,.bp-cell-after{border-radius:4px;font-variant-numeric:tabular-nums}
.bp-cell-before{background:#d9eee5;color:#154b39}
.bp-cell-after{background:#eae4f6;color:#493565}
.bp-cell-key span{padding:2px 7px}
.pressure-days > button{display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:5px 1px;min-width:0;min-height:44px}
.bp-cell-value{font:600 .8125rem/1.5 system-ui,sans-serif;letter-spacing:-.025em;overflow-wrap:anywhere}
.bp-calendar-detail{grid-column:1/-1;text-align:start;background:#f3f7f3;border:1px solid #cbdccd;border-radius:12px;padding:12px;margin:3px 0 8px}
.pressure-view .bp-calendar-detail h3{margin:0 0 6px;font-size:1rem}
.bp-calendar-detail .bp-day-results{margin:0}
.bp-calendar-detail .bp-current{background:white}
@container(max-width:345px){.pressure-days{gap:2px}.bp-cell-value{font-size:.75rem;letter-spacing:-.045em}}

.bp-ecg-link{margin-inline-start:auto;color:#205744;font-weight:650;text-decoration:underline;text-underline-offset:3px;padding:7px}
.bp-calendar-detail{padding:8px 10px}
.bp-calendar-detail .bp-compact-table{width:100%;min-width:0;margin:0;border-collapse:collapse;font-size:.875rem;background:transparent}
.bp-compact-table :is(td,th){padding:3px;text-align:start;border:0;background:transparent;white-space:normal;font-variant-numeric:tabular-nums}
.bp-compact-table thead th{font-size:.8rem;color:#4b6155;font-weight:500}
.bp-compact-table tbody th span{padding:1px 4px;border-radius:4px;white-space:nowrap}
#pressure-trend{border-top:1px solid #cbdccd;margin-top:7px;padding-top:6px}
#pressure-trend h4{font-size:.9rem;margin:0 0 4px}
.bp-chart-tools{display:flex;gap:5px 10px;flex-wrap:wrap}
#pressure-trend .pressure-options{gap:2px;margin:0}
#pressure-trend button{min-height:30px;padding:3px 7px;font-size:.85rem}
#pressure-trend .pressure-key{font-size:.8rem;margin:4px 0 0}
#pressure-trend .pressure-chart{height:auto;max-height:105px}
.bp-calendar-detail details.bp-compare-note{font-size:.8125rem;margin:2px 0}.bp-compare-note summary{padding:2px 0}.bp-compare-note p{margin:3px 0}

.ecg-badge{display:block;background:#dceff0;color:#174b53;padding:1px 2px;border-radius:4px;font:600 .76rem/1.4 system-ui;text-align:center}
.ecg-day{border-inline-start:3px solid #41808a;padding:4px 8px;margin:6px 0;color:#20484e}
.ecg-day p{margin:2px 0;font-variant-numeric:tabular-nums}

.pressure-view.panel { padding-block-start: .75rem; }
.pressure-view > .sectionhead:first-child, .pressure-view > .sectionhead:first-child h2 { margin-block: 0; }
.pressure-days > button.bp-empty { min-height: 28px; padding-block: 2px; justify-content: center; }
.pressure-days > .bp-empty[aria-pressed=false] { background: #f6f8f5; color: #58695f; border-color: #e2e8e1; }
.pressure-days > .bp-empty b { font-size: .875rem; font-weight: 500; }
.pressure-days > .bp-recorded { border-color: #b4ccbc; }
.bp-calendar-detail { position: relative; margin-top: 6px; }
.bp-calendar-detail::before {
  content: ''; position: absolute; top: -5px;
  left: calc((var(--day-column) + .5) * 100% / 7 - 4px);
  width: 8px; height: 8px; transform: rotate(45deg);
  background: inherit; border-top: 1px solid #cbdccd; border-left: 1px solid #cbdccd;
}

/* Keep the pressure calendar at the same height below the race banner on both sites. */
main:has(.pressure-view) > .journal-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding-block: 0 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
main:has(.pressure-view) > .journal-nav > a {
  min-height: 38px;
  padding: 6px 11px;
}
main:has(.pressure-view) > .journal-nav > a.active {
  position: sticky;
  inset-inline-end: 0;
  background: var(--ink);
}

.ecg-history{margin:.6rem 0;padding:.65rem .85rem;border:1px solid #cbd8cd;border-radius:10px}
.ecg-history summary{cursor:pointer;font-weight:650}
.ecg-history label{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:.6rem 0}
.ecg-history article{border-top:1px solid #d8e2da;padding:.8rem 0;overflow-wrap:anywhere}
.ecg-history article h2{font-size:1rem;margin:0}
.ecg-history article p{margin:.4rem 0}
.ecg-history article details{margin-top:.7rem}
.ecg-history input,.ecg-history select{max-width:100%;font:inherit}

.bp-calendar-detail details#pressure-trend {margin:4px 0 0;padding:0;border:0;border-top:1px solid #d1ded6;background:transparent}
.bp-calendar-detail #pressure-trend summary {padding:6px 0;font-size:.85rem;font-weight:600;cursor:pointer}
