.hm-card {
  min-width: 0;
  padding: clamp(16px, 2.4vw, 30px);
  background: #f7f4ec;
  color: #283d4b;
  border: 1px solid #dbdeda;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}
.hm-card *, .hm-card *::before, .hm-card *::after { box-sizing: border-box; }
.hm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hm-card .hm-title { margin: 0; font-size: clamp(19px, 2vw, 25px); line-height: 1.45; font-weight: 660; color: #253c4d; }
.hm-card .hm-subtitle { margin: 5px 0 0; font-size: 14px; line-height: 1.5; color: #536776; }
.hm-ranges { display: flex; align-items: center; gap: 2px; border: 1px solid #ced5d3; border-radius: 7px; padding: 3px; }
.hm-ranges button { background: transparent; color: #536674; border: 0; border-radius: 4px; padding: 6px 11px; font-weight: 500; font-family: inherit; font-size: 14px; line-height: 1.3; cursor: pointer; white-space: nowrap; }
.hm-ranges button[aria-pressed="true"] { color: #fff; background: #334c5b; }
.hm-ranges button:hover:not([aria-pressed="true"]) { background: #e9e9df; }
.hm-card button:focus-visible, .hm-view:focus-visible { outline: 2px solid #172e43; outline-offset: 2px; }
.hm-view { overflow-x: auto; max-width: 100%; margin: 18px 0 10px; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: #9daaa9 #eeeae0; }
.hm-frame { min-width: min(100%, var(--hm-width)); container-type: inline-size; }
.hm-plot, .hm-x-axis { display: grid; grid-template-columns: 32px repeat(var(--hm-count), minmax(0, 1fr)); }
.hm-plot { grid-template-rows: repeat(var(--hm-count), clamp(13px, calc((100cqw - 32px) / var(--hm-count)), 32px)); position: relative; border-top: 1px solid #ccd3cf; border-bottom: 1px solid #ccd3cf; }
.hm-y-axis-title, .hm-x-axis-title { font: 600 12px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; color: #566b79; }
.hm-y-axis-title { margin: 0 0 6px; }
.hm-x-axis-title { text-align: center; padding: 2px 0 0 32px; }
.hm-y-label, .hm-x-month { align-self: center; font: 500 clamp(8px, calc(72cqw / var(--hm-count)), 12px)/1 ui-monospace, monospace; color: #647681; }
.hm-y-label { text-align: right; padding-right: 6px; }
.hm-year-line { color: #223e50; font-weight: 750; }
.hm-x-axis { grid-template-rows: 14px 22px; padding-top: 3px; }
.hm-x-month { grid-row: 1; text-align: center; }
.hm-x-year { grid-row: 2; text-align: center; color: #354c5c; font-weight: 650; font-size: 12px; border-left: 1px solid #cbd2ce; line-height: 21px; }
.hm-narrow-year { font-size: 9px; }
.hm-plot .hm-cell {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0; border-radius: 0;
  box-shadow: inset -1px -1px #ffffff50; color: #253c35; cursor: pointer;
  font: 500 clamp(6px, calc(41cqw / var(--hm-count)), 12px)/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: -.045em; white-space: nowrap; overflow: hidden;
}
.hm-plot .hm-cell[aria-pressed="true"], .hm-plot .hm-cell:hover, .hm-plot .hm-cell:focus-visible {
  position: relative; z-index: 1; outline: 2px solid #203a48; outline-offset: -2px;
}
.hm-legend { position: absolute; top: 9%; right: 2%; width: 33%; max-width: 290px; pointer-events: none; }
.hm-legend-colors { height: 8px; border-radius: 2px; background: linear-gradient(to right, #cf547e, #e68ca7 16%, #fbf1df 33%, #b4dcb9 49%, #77c19e 62%, #49a88f 78%, #277d73); }
.hm-legend-labels { position: relative; display: flex; justify-content: space-between; margin-top: 6px; font: 500 11px/1.4 ui-monospace, monospace; color: #4a6070; }
.hm-legend-labels :nth-child(2) { position: absolute; left: 33%; transform: translateX(-50%); }
.hm-details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; padding: 13px 0; margin-top: 8px; border-top: 1px solid #cdd4d0; }
.hm-selected-duration { font-size: 14px; font-weight: 600; color: #384d5c; }
.hm-details strong { font: 650 19px/1.3 ui-monospace, monospace; }
.hm-loss { color: #a03661; }
.hm-profit { color: #116c54; }
.hm-selected-prices, .hm-card .hm-method { color: #516674; font-size: 13px; line-height: 1.65; }
.hm-card .hm-method { margin: 0; }
.hm-method a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .hm-frame { min-width: var(--hm-width); }
  .hm-head { gap: 12px; }
  .hm-ranges button { min-height: 32px; }
  .hm-selected-prices { width: 100%; }
  .hm-card { padding: 16px 12px; }
}
