:root{color-scheme:light;--ink:#19313a;--muted:#64757b;--accent:#24675e;--border:#dfe7e4;--bg:#f6f8f7}*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg)}a{color:var(--accent)}.topbar{display:flex;align-items:center;gap:24px;background:#101e2b;color:#eef3f1;padding:14px max(24px,calc((100vw - 1450px)/2));min-height:67px}.brand{display:flex;align-items:center;gap:10px;color:white;text-decoration:none;font-weight:750}.mark{background:#e2eee8;color:#123b3a;padding:6px 8px;border-radius:7px;font-weight:900}.mark span{color:#1f9d81}.section-title{color:#b2c4c9;font-size:14px;border-left:1px solid #44606b;padding-left:22px}.back{margin-left:auto;color:#c1dcd7;font-size:13px;text-decoration:none}main{max-width:1500px;margin:0 auto;padding:20px 24px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:4px 0 14px}.controls,.right-controls{display:flex;align-items:center;gap:9px}.controls label{font-size:12px;font-weight:700;color:var(--muted)}select,button{font:inherit;border:1px solid #ccd8d4;border-radius:8px;padding:9px 10px;background:#fff;color:#243c43}button{cursor:pointer}button:hover{background:#eef5f1}.status{font-size:13px;color:var(--muted)}.status.ok{color:#157559}.status.bad{color:#b3443f}.legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;font-weight:650;color:#465c65;margin:0 0 10px}.swatch{display:inline-block;background:var(--c);height:3px;width:19px;margin-left:10px}.chart-card{position:relative;border:1px solid var(--border);border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 10px 26px rgba(18,42,47,.045)}#chart{width:100%;height:min(78vh,850px);min-height:490px}.error{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);max-width:560px;width:calc(100% - 40px);padding:22px;border:1px solid #f0ceca;background:#fff8f7;border-radius:10px;color:#96392f;text-align:center;font-size:14px}.footnote{display:flex;gap:15px;justify-content:space-between;flex-wrap:wrap;color:#61717b;font-size:12px;margin:12px 2px}.attribution{color:#77868c;font-size:11px;margin:15px 2px}.attribution a{color:#52706d}@media(max-width:720px){.topbar{padding:14px 16px;gap:11px}.section-title{display:none}main{padding:12px}.toolbar{align-items:flex-start;flex-direction:column}.controls{flex-wrap:wrap}#chart{min-height:460px;height:72vh}.back{font-size:12px}}

/* Clickable Plotly-style series legend, grouped by chart pane. */
.legend{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 15px;margin:0 0 12px}
.legend-group{display:flex;align-items:center;flex-wrap:wrap;gap:5px 4px;min-height:32px}
.legend-heading{font-size:11px;color:#526a70;white-space:nowrap;margin-right:5px}
.legend-toggle{appearance:none;display:inline-flex;align-items:center;gap:6px;
  font:inherit;font-size:11px;font-weight:600;padding:5px 7px;border:1px solid #e0e7e4;
  border-radius:6px;background:#fff;line-height:1.1;white-space:nowrap;cursor:pointer}
.legend-toggle:hover{background:#eef5f1;border-color:#a9c7bf}
.legend-toggle:focus-visible{outline:2px solid #1f9d81;outline-offset:2px}
.legend-toggle .swatch{margin:0;width:16px;flex-shrink:0}
.legend-toggle.is-hidden .swatch{background:#a8b4b4}
#chart{height:min(90vh,1050px);min-height:620px}
@media(max-width:720px){#chart{height:85vh;min-height:550px}.legend{gap:7px 12px}}

/* Pane-heading switches; click the heading to hide/show the whole metric pane. */
.legend-heading-button{appearance:none;font:inherit;font-size:11px;font-weight:750;
  background:#e9f2ee;border:1px solid #c9dad3;border-radius:6px;
  color:#254e46;padding:6px 9px;margin-right:5px;cursor:pointer;white-space:nowrap}
.legend-heading-button:hover{background:#d6e9e1;border-color:#9bbeb2}
.legend-heading-button:focus-visible{outline:2px solid #1f9d81;outline-offset:2px}
/* Один стиль для всех выключенных панелей, линий и событий. */
.legend-heading-button[aria-pressed="false"],
.legend-toggle[aria-pressed="false"] {
  color: #758986;
  background: #fff;
  border-color: #dfe7e4;
  text-decoration: line-through;
}
.history-range{margin-inline-start:8px;font-size:12px;color:#334851;font-weight:700;white-space:nowrap}

/* Fixed-width history window buttons: 1 / 7 / 30 / 90 days. */
.history-day-controls{display:inline-flex;align-items:center;gap:2px;
  padding:3px;border:1px solid #ccd8d4;border-radius:8px;background:#fff}
.history-day-button{min-width:34px;padding:5px 8px;border:0;border-radius:5px;
  background:transparent;font-size:12px;font-weight:650;line-height:1.4;color:#526a70}
.history-day-button:hover{background:#eef5f1}
.history-day-button.is-active{background:#24675e;color:#fff}
.history-day-button.is-active:hover{background:#1b554c}
.history-day-button:focus-visible{outline:2px solid #1f9d81;outline-offset:2px}

/* Переход к дате и сообщение о загрузке истории. */
.toolbar .controls { flex-wrap: wrap; }
#history-jump { display: flex; align-items: center; gap: 6px; }
#history-date { font: inherit; padding: 7px; border: 1px solid #ccd8d4; border-radius: 8px; }
#history-message { font-size: 12px; color: var(--muted); }

/* Подписи слева пропускают мышь к графику. Справа кликабельны только кнопки. */
.pane-readout {
  position: absolute;
  left: 10px;
  right: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.pane-readout-values, .pane-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
}
.pane-readout-values {
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .88);
  color: #29434a;
  font: 600 11px Inter, system-ui, sans-serif;
}
.pane-legend { justify-content: flex-end; }
.pane-legend .legend-toggle { pointer-events: auto; white-space: nowrap; }

#candle-interval { align-self: center; }

/* Границы выходных поверх панелей, под подписями и легендой. */
.weekend-layer { position: absolute; top: 0; left: 0; right: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.weekend-boundary { position: absolute; inset-block: 0; border-left: 1px dashed rgba(190, 50, 52, .7); }
#weekends[aria-pressed="true"] { background: #24675e; color: #fff; }

/* Звёзды FOMC над осью времени. Только сами метки принимают наведение. */
.fomc-layer { position: absolute; inset-inline: 0; height: 20px; z-index: 2; pointer-events: none; }
.fomc-star { color: #a66a00; }
.fomc-marker {
  position: absolute;
  inset-block-end: 1px;
  transform: translateX(-50%);
  font-size: 16px;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
  pointer-events: auto;
}
#fomc[aria-pressed="true"] { background: #fff1cb; border-color: #d9ae55; color: #62420c; }

/* Режим шкалы QLIKE и отметка о пике выше верхней границы. */
.qlike-scale { pointer-events: auto; padding: 3px 5px; font-size: 11px; cursor: pointer; }
.qlike-overflow { color: #8e351d; font-weight: 750; }

.chart-tools { display: flex; margin: 0 0 6px; }
#measure { display: grid; place-items: center; width: 32px; height: 28px; padding: 0; }
#measure[aria-pressed="true"] { color: #fff; background: #24675e; }
#measure:disabled { opacity: .45; cursor: default; }
.ruler-icon {
  width: 19px; height: 8px; border: 1px solid currentColor; border-radius: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 4px) 2px 0 / 14px 3px no-repeat;
  transform: rotate(-28deg);
}
#chart { cursor: grab; }
#chart.is-dragging-chart { cursor: grabbing; }
.measure-input {
  position: absolute; top: 0; left: 0; z-index: 4;
  cursor: crosshair; touch-action: none;
}
.measurement-layer { position: absolute; inset: 0 auto auto 0; overflow: hidden; z-index: 2; pointer-events: none; }
.measurement-box, .measurement-label { position: absolute; }
.measurement-box { border: 1px solid #24675e; background: rgba(36, 103, 94, .15); }
.measurement-label { padding: 4px 6px; border-radius: 4px; background: #24675e; color: white; font-size: 12px; white-space: nowrap; }
.measurement-layer.is-down .measurement-box { border-color: #ad4545; background: rgba(173, 69, 69, .15); }
.measurement-layer.is-down .measurement-label { background: #ad4545; }

#fomc[aria-pressed="false"] .fomc-star { color: inherit; }

/* Дублирующая шкала времени на нижней границе панели со свечами. */
.price-time-axis {
  position: absolute;
  left: 0;
  height: 22px;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
  border-top: 1px solid #dce5e0;
  color: #334851;
  font-size: 11px;
}
.price-time-axis span {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  white-space: nowrap;
}
