.qtdb-qt-study {
  margin: 22px 0 28px;
  min-width: 0;
  padding: clamp(14px, 2.1vw, 26px);
  border: 1px solid #a8b5ad;
  border-radius: 20px;
  background: #f0f4ef;
  color: #203a35;
  box-shadow: 0 15px 32px rgba(23, 51, 47, .11);
}

.qtdb-qt-study h3 {
  margin: 4px 0 8px;
  color: #153e38;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
}

.qtdb-qt-eyebrow {
  margin: 0;
  color: #257064;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.qtdb-qt-intro,
.qtdb-qt-limits,
.qtdb-qt-source {
  max-width: 80ch;
  line-height: 1.55;
}

.qtdb-qt-intro { margin: 0 0 18px; }

.qtdb-qt-figure { margin: 0; }

.qtdb-qt-plot-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #bd9b92;
  border-radius: 12px;
  background: #fffaf3;
  box-shadow: inset 0 0 0 4px #f4e8dc, 0 9px 19px rgba(34, 55, 49, .09);
}

.qtdb-qt-plot {
  display: block;
  width: 100%;
  height: 340px;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
}

.qtdb-qt-paper { fill: #fffaf3; }
.qtdb-qt-grid-minor { stroke: rgba(179, 77, 70, .13); stroke-width: 1; }
.qtdb-qt-grid-major { stroke: rgba(172, 71, 64, .29); stroke-width: 1.2; }
.qtdb-qt-divider { stroke: rgba(116, 76, 66, .42); stroke-width: 1.5; }
.qtdb-qt-trace {
  fill: none;
  stroke: #26393e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.qtdb-qt-lead-label {
  fill: #173b3b;
  font: 800 17px system-ui, sans-serif;
  paint-order: stroke;
  stroke: #fffaf3;
  stroke-width: 5px;
  pointer-events: none;
}
.qtdb-qt-time {
  fill: #674c45;
  font: 700 13px ui-monospace, SFMono-Regular, Consolas, monospace;
  pointer-events: none;
}

.qtdb-qt-marker-layer { pointer-events: none; }
.qtdb-qt-marker-layer line { stroke-width: 2.8; }
.qtdb-qt-marker-layer text {
  font: 800 13px system-ui, sans-serif;
  paint-order: stroke;
  stroke: #fffaf3;
  stroke-width: 4px;
}
.qtdb-qt-marker-qrs line { stroke: #155d92; }
.qtdb-qt-marker-qrs text { fill: #155d92; }
.qtdb-qt-marker-t line { stroke: #a54f19; }
.qtdb-qt-marker-t text { fill: #a54f19; }
.qtdb-qt-marker-expert line { stroke: #39794a; stroke-dasharray: 7 5; }
.qtdb-qt-marker-expert text { fill: #27663a; }

.qtdb-qt-figure figcaption {
  margin: 8px 1px 0;
  color: #425d54;
  font-size: .82rem;
  line-height: 1.5;
}

.qtdb-qt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 9px;
  color: #3f5850;
  font-size: .78rem;
  font-weight: 700;
}
.qtdb-qt-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.qtdb-qt-legend-item[hidden] { display: none; }
.qtdb-qt-swatch { width: 18px; height: 0; border-top: 3px solid; }
.qtdb-qt-swatch-qrs { border-color: #155d92; }
.qtdb-qt-swatch-t { border-color: #a54f19; }
.qtdb-qt-swatch-expert { border-color: #39794a; border-top-style: dashed; }

.qtdb-qt-toolbar,
.qtdb-qt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
.qtdb-qt-toolbar { margin-bottom: 12px; }

.qtdb-qt-toolbar button,
.qtdb-qt-actions button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #477367;
  border-radius: 9px;
  background: #fff;
  color: #1c4a3d;
  font: inherit;
  font-size: .87rem;
  font-weight: 750;
  cursor: pointer;
}
.qtdb-qt-toolbar button[aria-pressed="true"] {
  background: #205e55;
  color: #fff;
  border-color: #205e55;
}
.qtdb-qt-actions button:first-child {
  background: #205e55;
  color: #fff;
  border-color: #205e55;
}
.qtdb-qt-actions button:disabled {
  opacity: .56;
  cursor: not-allowed;
}
.qtdb-qt-study button:focus-visible,
.qtdb-qt-study input:focus-visible {
  outline: 3px solid #aa5e24;
  outline-offset: 3px;
}

.qtdb-qt-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 15px;
}
.qtdb-qt-slider-label {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #c5d3c8;
  border-radius: 10px;
  background: #fff;
  color: #24483d;
  font-size: .86rem;
  font-weight: 760;
}
.qtdb-qt-slider-label input { width: 100%; accent-color: #205e55; }
.qtdb-qt-slider-value {
  color: #475e57;
  font: 700 .78rem ui-monospace, SFMono-Regular, Consolas, monospace;
}
.qtdb-qt-span {
  margin: 15px 0 0;
  font-weight: 790;
  color: #153f37;
}
.qtdb-qt-feedback {
  min-height: 2.7em;
  margin: 12px 0 0;
  line-height: 1.5;
  font-weight: 650;
}
.qtdb-qt-study[data-revealed="true"] .qtdb-qt-feedback {
  padding: 12px 14px;
  border-left: 4px solid #39794a;
  background: #e2eee3;
}
.qtdb-qt-limits {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid #c2d0c5;
  font-size: .84rem;
}
.qtdb-qt-source {
  margin: 13px 0 0;
  color: #496158;
  font-size: .78rem;
}
.qtdb-qt-source a { color: #145b6d; text-decoration-thickness: 1px; }

@media (max-width: 700px) {
  .additional-course-recorded-first-source .qtdb-qt-study { margin-top: 10px; }
  .qtdb-qt-controls { grid-template-columns: minmax(0, 1fr); }
  .qtdb-qt-lead-label { font-size: 48px; }
  .qtdb-qt-time,
  .qtdb-qt-marker-layer text { display: none; }
  .qtdb-qt-toolbar button,
  .qtdb-qt-actions button { flex: 1 1 150px; }
}

@media (max-width: 360px) {
  .qtdb-qt-study { padding: 13px; }
  .qtdb-qt-plot { height: 315px; }
}
