guided-weight { display: block; min-width: 0; color: var(--ink); }
guided-weight h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.wt-head { display: flex; align-items: baseline; gap: .6rem; white-space: nowrap; overflow-x: auto; padding-bottom: 3px; }
.wt-head strong { font-size: clamp(1.2rem, 2.25vw, 1.65rem); letter-spacing: -.05em; }
.wt-head b { font-size: .82rem; color: var(--pine); }
.wt-head small, .wt-muted, .wt-period, .wt-legend, .wt-milestones span, .wt-notes small { color: var(--muted); }
.wt-head small, .wt-period, .wt-legend { font-size: .74rem; }
.wt-plot { position: relative; height: 150px; touch-action: pan-y; user-select: none; }
.wt-plot > svg { width: 100%; height: 100%; display: block; }
.wt-plot text { fill: var(--muted); font: 11px system-ui,sans-serif; }
.wt-grid { stroke: #ceddd4; stroke-width: 1; }
.wt-guide { fill: none; stroke: #a06c27; opacity: .48; stroke-width: 1; stroke-dasharray: 2 4; pointer-events: none; }
.wt-line, .wt-forecast { fill: none; stroke: var(--pine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wt-forecast { stroke: #8b5f2c; stroke-dasharray: 5 4; }
.wt-point { fill: var(--pine); }
.wt-band-0 { fill: #e8f1f5; }.wt-band-1 { fill: #e8f5ed; }.wt-band-2 { fill: #fcf1dc; }.wt-band-3 { fill: #f8e9e5; }
guided-weight button, guided-weight select { font: inherit; color: var(--pine); }
guided-weight button:focus-visible, guided-weight select:focus-visible, guided-weight summary:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.wt-flag { position: absolute; top: 0; width: 40px; height: 36px; padding: 4px; transform: translateX(-50%);
  border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.wt-flag:hover, .wt-flag[aria-expanded=true] { background: #f8efd9; border-radius: 8px; }
.wt-flag svg { width: 18px; height: 18px; color: #825315; }
.wt-flag small { font-size: .65rem; color: #825315; }
.wt-period { display: block; margin: 0 0 5px; font-variant-numeric: tabular-nums; }
.wt-legend, .wt-controls, .wt-legend label { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.wt-legend { margin: 2px 0 6px; }.wt-legend label { gap: 4px; cursor: pointer; }
.wt-legend input { accent-color: var(--pine); margin: 0; }
.wt-bmi-key::before { content: ''; display: inline-block; width: 12px; height: 8px; margin-right: 3px; background: linear-gradient(to right,#cae9d6,#f0cf9c,#e5b5b1); }
.wt-controls { gap: 4px; }
.wt-controls button, .wt-controls select, .wt-detail button { min-height: 32px; min-width: 32px; padding: 2px 6px;
  border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }
.wt-controls button, .wt-detail button { font-size: 1rem; }.wt-controls select { font-size: .82rem; }
.wt-controls button:disabled { opacity: .45; cursor: default; }
.wt-detail { margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f6faf7; }
.wt-detail button { float: right; margin: 0 0 4px 5px; }
.wt-detail p, .wt-notes p { margin: 2px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.wt-notes { display: grid; gap: 6px; font-size: .8rem; }
.wt-notes small, .wt-milestones span { display: block; font-size: .76rem; }
.wt-milestones { padding: 7px 0 0; margin: 7px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .8rem; }
.wt-milestones li + li { margin-top: 4px; }
.wt-all-notes { margin-top: 6px; font-size: .78rem; }
.wt-all-notes summary { color: var(--pine); cursor: pointer; }
.wt-all-notes[open] .wt-notes { max-height: 220px; overflow: auto; margin-top: 6px; }
.wt-reading-list p { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin: 3px 0; }
.wt-reading-list button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: white; }
@media (max-width: 760px), (min-width: 761px) and (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  /* Like native Home, the current reading leads the graph. Keep its heading accessible. */
  guided-weight:has(.wt-head) > h2 {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .wt-head { gap: .4rem; }
}
