.graph-lab { --lab-m: #89e5cf; --lab-b: #f3bf7c; --card-footer-color: #8ca9b1; display: flex; flex-direction: column; gap: var(--card-footer-gap); width: 100%; height: 100%; min-height: 0; padding: var(--format-top) max(var(--edge), env(safe-area-inset-right)) var(--content-bottom) max(var(--edge), env(safe-area-inset-left)); color: #f2f7f5; background: radial-gradient(ellipse at 85% 15%, #245d6455, transparent 65%), #132e39; }
.graph-lab button, .graph-lab input { font: inherit; -webkit-tap-highlight-color: transparent; }
.graph-lab button { cursor: pointer; }
.graph-lab button:focus-visible, .graph-lab input:focus-visible, .graph-lab__scroll:focus-visible { outline: 2px solid var(--lab-b); outline-offset: 3px; }
.graph-lab__scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #45626a transparent; }
.graph-lab__scroll.is-scrollable { touch-action: pan-y; }
.graph-lab__body { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 600px; min-height: 100%; margin-inline: auto; padding: 8px 0 2px; }
.graph-lab__intro { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.graph-lab__intro > div { min-width: 0; }
.graph-lab__eyebrow { margin: 0 0 6px; font-size: 9px; font-weight: 650; letter-spacing: .12em; color: #9fc4c7; }
.graph-lab__title { margin: 0; font-size: clamp(26px, 3.4vw, 36px); font-weight: 650; line-height: 1.12; letter-spacing: -.04em; overflow-wrap: anywhere; }
.graph-lab__reset { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #57777e88; border-radius: 50%; color: #c6dfdc; background: transparent; }
.graph-lab__reset svg { width: 21px; height: 21px; }
.graph-lab__workspace { min-width: 0; }
.graph-lab__equation { display: flex; justify-content: center; align-items: baseline; gap: .14em; margin: 4px 0 18px; font: 500 clamp(28px, 6vw, 38px)/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.05em; white-space: nowrap; }
.graph-lab__coefficient--m { color: var(--lab-m); }
.graph-lab__coefficient--b { color: var(--lab-b); }
.graph-lab__sign { padding: 0 .06em; color: #a5c0c5; }
.graph-lab__figure { margin: 0; padding: 10px 8px 12px; border-radius: 22px; background: #f5f8f3; color: #234a4e; }
.graph-lab__tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -6px; }
.graph-lab__footer { flex: none; }
.graph-lab__next { width: 100%; max-width: 600px; min-height: 48px; margin-inline: auto; padding: 10px 14px; border: 1px solid var(--lab-m); border-radius: 14px; background: var(--lab-m); color: #183d44; font-size: 14px !important; font-weight: 650 !important; }
.graph-lab__anticipate, .graph-lab__compare { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 0; border: 0; background: transparent; color: #b7d2d0; font-size: 11px !important; }
.graph-lab__anticipate { text-decoration: underline; text-underline-offset: 4px; text-align: left; }
.graph-lab__compare { margin-inline-start: auto; }
.graph-lab__compare::before { content: ''; width: 16px; border-top: 2px dashed currentColor; }
.graph-lab__compare[aria-pressed="false"] { color: #8faeb5; }
.graph-lab__plot { display: block; width: 100%; height: clamp(180px, 30dvh, 300px); }
.graph-lab__grid line { stroke: #dce6df; stroke-width: .8; }
.graph-lab__axes path { stroke: #789186; stroke-width: 1.1; fill: none; }
.graph-lab__axes text { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; fill: #536e60; }
.graph-lab__line { stroke: #087e79; stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.graph-lab__reference { stroke: #82958b; stroke-width: 1.6; stroke-dasharray: 5 5; }
.graph-lab .graph-lab__triangle, .graph-lab .graph-lab__point-label { display: none; }
.graph-lab__triangle { stroke: #087e7966; stroke-width: 1.5; stroke-dasharray: 3 3; fill: none; }
.graph-lab__intercept-point { fill: #c37a21; stroke: #fff7e8; stroke-width: 2.5; }
.graph-lab__point-label { font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; fill: #99601d; paint-order: stroke; stroke: #f5f8f3; stroke-width: 4px; stroke-linejoin: round; }
.graph-lab__caption { margin: 5px 0 0; text-align: center; color: #536e60; font-size: 11px; line-height: 1.4; }
.graph-lab__controls { display: grid; gap: 14px; }
.graph-lab__parameter { --parameter-color: var(--lab-m); min-width: 0; padding: 0 2px; touch-action: pan-x; }
.graph-lab__parameter--b { --parameter-color: var(--lab-b); }
.graph-lab__parameter-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.graph-lab__parameter-label { font-size: 12px; font-weight: 550; color: #c9dfde; }
.graph-lab__value { color: var(--parameter-color); font: 600 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.graph-lab__slider { --parameter-fill: 50%; display: block; width: 100%; height: 44px; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; accent-color: var(--parameter-color); cursor: ew-resize; touch-action: pan-x; }
.graph-lab__slider::-webkit-slider-runnable-track { height: 4px; border: 0; border-radius: 4px; background: linear-gradient(to right, var(--parameter-color) var(--parameter-fill), #45626a var(--parameter-fill)); }
.graph-lab__slider::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7px; border: 0; border-radius: 50%; appearance: none; -webkit-appearance: none; background: var(--parameter-color); }
.graph-lab__slider::-moz-range-track { height: 4px; border: 0; border-radius: 4px; background: #45626a; }
.graph-lab__slider::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--parameter-color); }
.graph-lab__slider::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--parameter-color); }
.graph-prediction { --sheet-surface: #f0f6f3; --sheet-ink: #234a4e; --sheet-muted: #6f8b7e; --sheet-border: #d4e2da; --sheet-control: #dfeae3; --sheet-control-ink: #356a62; --sheet-focus: #087e79; --sheet-handle: #c3d6c9; --sheet-backdrop: #071e2966; }
.graph-prediction__body { padding: 22px max(var(--edge), 20px); }
.graph-prediction__baseline { margin: 0 0 18px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #6d8575; }
.graph-prediction__options { margin: 0; padding: 0; border: 0; min-width: 0; }
.graph-prediction__options legend { margin-bottom: 18px; padding: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
.graph-prediction__option { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; padding: 14px 12px; min-height: 54px; border: 1px solid #ceded2; border-radius: 12px; color: #547064; font-size: 13px; line-height: 1.45; cursor: pointer; }
.graph-prediction__option.is-selected { border-color: #3b8d7c; color: #235e53; background: #dceee2; }
.graph-prediction__option input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #087e79; }
.graph-prediction__option:focus-within { outline: 2px solid #087e79; outline-offset: 2px; }
.graph-prediction__feedback { margin-top: 18px; padding: 15px; border-radius: 12px; background: #e1ede3; }
.graph-prediction__feedback strong { font-size: 16px; }
.graph-prediction__feedback p { margin: 8px 0 0; color: #547064; font-size: 13px; line-height: 1.55; }
.graph-prediction__actions { display: grid; gap: 3px; padding: 12px max(var(--edge), 20px) var(--content-bottom); border-top: 1px solid var(--sheet-border); }
.graph-prediction__check { width: 100%; min-height: 48px; border-radius: 12px; background: #236858; color: #fff; font-size: 14px !important; font-weight: 600 !important; }
.graph-prediction__check:disabled { opacity: .5; cursor: default; }
.graph-prediction__skip { min-height: 44px; color: #557b6c; background: transparent; font-size: 12px !important; }
@media (min-width: 700px) {
  .graph-lab__controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-height: 740px) {
  .graph-lab__body { gap: 9px; }
  .graph-lab__title { font-size: 25px; }
  .graph-lab__plot { height: 26dvh; }
  .graph-lab__equation { margin-bottom: 8px; font-size: 28px; }
}
@media (max-width: 699px) and (max-height: 740px) {
  .graph-lab__controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-lab__parameter { padding: 0 2px; }
  .graph-lab__parameter-header { gap: 6px; }
  .graph-lab__parameter-label { font-size: 11px; }
  .graph-lab__value { font-size: 18px; }
  .graph-lab__figure { padding-block: 6px; }
  .graph-lab__plot { height: clamp(120px, 28dvh, 200px); }
  .graph-lab__axes text, .graph-lab__point-label { font-size: 20px; }
}
@media (max-width: 699px) and (max-height: 600px) {
  .graph-lab__body { padding-block: 2px; }
  .graph-lab .graph-lab__plot { height: clamp(110px, 22dvh, 150px); }
  .graph-lab__next { min-height: 44px; }
}
@media (hover: hover) { .graph-lab__reset:hover, .graph-lab__anticipate:hover, .graph-lab__compare:hover { background: #ffffff12; } .graph-lab__next:hover { background: #a4edda; } }
