:root {
  color-scheme: dark;
  --bg: #090e18;
  --panel: #101827;
  --panel-2: #131e30;
  --panel-3: #172338;
  --line: rgba(164, 190, 224, .12);
  --line-strong: rgba(164, 190, 224, .2);
  --text: #edf4ff;
  --muted: #91a1ba;
  --subtle: #667791;
  --cyan: #59e0d0;
  --cyan-soft: rgba(89, 224, 208, .12);
  --violet: #a89bff;
  --blue: #73b9ff;
  --amber: #f3c77d;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 34% -20%, rgba(44, 78, 125, .2), transparent 42%), var(--bg); }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
body.embed-mode .app { height: 100%; min-height: 0; }
body.embed-mode .workspace { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
body.embed-mode .footer-row { flex: 0 0 auto; }
.topbar { height: 66px; flex: 0 0 66px; padding: 0 30px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(9, 14, 24, .92); }
.brand-mark { width: 30px; height: 30px; border: 1px solid rgba(89,224,208,.5); border-radius: 50%; position: relative; display: grid; place-items: center; box-shadow: 0 0 18px rgba(89,224,208,.12), inset 0 0 10px rgba(89,224,208,.08); }
.brand-mark::before { content: ""; width: 16px; height: 16px; border: 1px solid var(--cyan); border-radius: 50%; transform: rotate(-28deg) scaleX(1.35); }
.brand-mark span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.brand-mark i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--violet); transform: translate(10px,-8px); }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-name { font-size: 11px; font-weight: 800; letter-spacing: .19em; }
.brand-sub { color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .14em; }
.brand-sub span { color: var(--cyan); padding: 0 4px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.live-dot, .corner-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px rgba(89,224,208,.8); }
.topbar-divider { height: 15px; width: 1px; background: var(--line-strong); margin: 0 4px; }
.seed-label { color: #73849f; font-variant-numeric: tabular-nums; }
.workspace { width: min(1600px, 100%); margin: 0 auto; padding: 24px 30px 18px; display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(340px, .92fr); gap: 20px; align-items: start; flex: 1 0 auto; }
.visual-column, .side-column { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.intro-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 1px 2px 3px; }
.eyebrow { color: #8da1bc; font-size: 9px; font-weight: 800; letter-spacing: .16em; line-height: 1.5; }
h1 { margin: 5px 0 6px; font-size: clamp(22px, 2.3vw, 31px); line-height: 1.14; letter-spacing: -.045em; font-weight: 670; }
.intro-copy { max-width: 690px; margin: 0; color: #9aaac0; font-size: 12px; line-height: 1.55; }
.method-stamp { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: #9aabc3; font-size: 8px; font-weight: 750; letter-spacing: .13em; line-height: 1.55; border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: rgba(18,29,46,.65); }
.stamp-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--cyan); background: var(--cyan-soft); font-family: Georgia, serif; font-size: 15px; }
.stage-card, .transport-card, .caption-card, .readout-panel, .control-panel, .check-panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(18,28,44,.98), rgba(13,21,34,.98)); box-shadow: 0 14px 36px rgba(0,0,0,.12); }
.stage-card { overflow: hidden; }
.stage-head { min-height: 59px; padding: 13px 16px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.stage-title { margin-top: 3px; font-size: 14px; font-weight: 650; letter-spacing: -.015em; }
.stage-actions { display: flex; gap: 6px; align-items: center; }
.mini-button { min-height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: rgba(20,32,50,.85); color: #9bacc3; font-size: 8px; font-weight: 800; letter-spacing: .1em; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.mini-button:hover { border-color: rgba(89,224,208,.45); color: var(--text); transform: translateY(-1px); }
.mini-button.active { color: var(--cyan); border-color: rgba(89,224,208,.34); background: rgba(89,224,208,.08); }
.screenshot-button { display: flex; align-items: center; gap: 6px; }
.camera-icon { width: 11px; height: 9px; border: 1.3px solid currentColor; border-radius: 2px; display: inline-block; position: relative; }
.camera-icon::before { content: ""; position: absolute; width: 4px; height: 3px; left: 2.2px; top: -4px; border: 1px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.camera-icon::after { content: ""; position: absolute; width: 3px; height: 3px; border: 1px solid currentColor; border-radius: 50%; left: 2.7px; top: 1.5px; }
.canvas-wrap { width: 100%; height: clamp(270px, 27vw, 350px); position: relative; background: radial-gradient(ellipse at 55% 42%, rgba(37,69,105,.16), transparent 58%), #0d1625; }
#chart { display: block; width: 100%; height: 100%; }
.canvas-corner { position: absolute; top: 13px; right: 16px; display: flex; align-items: center; gap: 7px; color: #6f829e; font-size: 8px; font-weight: 750; letter-spacing: .12em; pointer-events: none; }
.canvas-corner .corner-dot { width: 5px; height: 5px; }
.legend-row { min-height: 38px; display: flex; flex-wrap: wrap; align-items: center; gap: 13px; padding: 8px 17px; border-top: 1px solid var(--line); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: #a3b2c8; font-size: 8px; font-weight: 750; letter-spacing: .075em; }
.legend-line { display: inline-block; width: 17px; height: 0; border-top: 2px solid var(--cyan); }
.model-line { border-color: var(--cyan); }
.fit-line { border-color: var(--violet); border-top-style: dashed; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px rgba(243,199,125,.5); }
.legend-spacer { flex: 1; }
.legend-note { color: #687b95; font-size: 8px; letter-spacing: .04em; }
.legend-note span { color: var(--cyan); padding: 0 3px; }
.transport-card { padding: 12px 15px; display: grid; grid-template-columns: auto minmax(110px, 1fr) auto; align-items: center; gap: 16px; }
.transport-buttons { display: flex; gap: 6px; }
.transport-button { height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(22,34,53,.8); color: #9bacc2; font-size: 8px; font-weight: 800; letter-spacing: .1em; cursor: pointer; transition: .18s ease; }
.transport-button:hover { color: var(--text); border-color: rgba(89,224,208,.38); }
.transport-button.primary { color: #061a1a; border-color: transparent; background: var(--cyan); min-width: 88px; }
.transport-button.primary:hover { background: #83f1e3; }
.pause-icon { width: 9px; height: 10px; display: inline-block; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.play-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; display: inline-block; }
.step-icon { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid currentColor; position: relative; }
.step-icon::after { content: ""; position: absolute; left: 3px; top: -5px; height: 10px; border-left: 1px solid currentColor; }
.reset-icon { font-size: 16px; line-height: 1; font-weight: 500; }
.speed-control { min-width: 0; }
.speed-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; color: #7e91ac; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.speed-label strong { color: var(--cyan); font-size: 10px; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; width: 100%; height: 13px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--cyan); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(89,224,208,.8), rgba(89,224,208,.18)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(89,224,208,.8), rgba(89,224,208,.18)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; border: 2px solid #0e1928; background: var(--cyan); box-shadow: 0 0 0 2px rgba(89,224,208,.35), 0 0 10px rgba(89,224,208,.4); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #0e1928; background: var(--cyan); box-shadow: 0 0 0 2px rgba(89,224,208,.35); }
.range-ends { display: flex; justify-content: space-between; color: #61738d; font-size: 8px; font-variant-numeric: tabular-nums; }
.sweep-readout { padding-left: 13px; border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 4px; min-width: 76px; }
.sweep-label { color: #71849e; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.sweep-readout strong { color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.caption-card { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; background: linear-gradient(110deg, rgba(22,43,58,.8), rgba(16,26,42,.96)); }
.caption-icon { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--cyan); background: rgba(89,224,208,.1); font-size: 14px; }
.caption-card p { margin: 3px 0 0; color: #a7b7cb; font-size: 11px; line-height: 1.5; }
.side-column { gap: 14px; }
.readout-panel, .control-panel, .check-panel { padding: 15px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-heading h2, .check-head h2 { margin: 3px 0 0; font-size: 15px; font-weight: 650; letter-spacing: -.025em; }
.model-pill { padding: 5px 7px; border-radius: 5px; color: var(--cyan); background: rgba(89,224,208,.08); font-size: 7px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-card { min-width: 0; padding: 11px 11px 9px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(135deg, rgba(22,34,53,.92), rgba(16,26,42,.8)); }
.metric-card.metric-primary { border-color: rgba(89,224,208,.3); background: linear-gradient(135deg, rgba(27,64,68,.48), rgba(16,31,44,.9)); }
.metric-label { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: #8c9db5; font-size: 7px; font-weight: 800; letter-spacing: .09em; white-space: nowrap; }
.metric-label span { color: #c3d0e2; font-size: 8px; letter-spacing: 0; }
.metric-value { margin-top: 7px; color: var(--text); font-size: clamp(20px, 2vw, 25px); line-height: 1.05; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-primary .metric-value { color: var(--cyan); }
.metric-unit { margin-top: 3px; color: #778aa4; font-size: 8px; }
.metric-foot { margin-top: 9px; display: flex; align-items: center; gap: 6px; color: #8192aa; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; }
.metric-dot.cyan { background: var(--cyan); box-shadow: 0 0 7px rgba(89,224,208,.5); }
.metric-dot.violet { background: var(--violet); }
.metric-dot.blue { background: var(--blue); }
.metric-dot.amber { background: var(--amber); }
.pivot-strip { margin-top: 9px; min-height: 29px; padding: 0 2px; display: flex; align-items: center; gap: 8px; color: #7e90a9; font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.pivot-strip strong { color: #dce8f8; font-size: 10px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pivot-divider { height: 12px; width: 1px; margin: 0 2px; background: var(--line-strong); }
#sampleCountValue { color: #8192aa; font-weight: 550; letter-spacing: 0; }
.sliders-icon { color: var(--cyan); font-size: 19px; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 15px; }
.preset-button { min-width: 0; min-height: 51px; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; text-align: left; background: rgba(18,30,47,.75); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { transform: translateY(-1px); border-color: rgba(89,224,208,.32); }
.preset-button.selected { border-color: rgba(89,224,208,.4); background: rgba(89,224,208,.075); }
.preset-symbol { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--cyan); background: rgba(89,224,208,.1); font-size: 16px; }
.noisy-symbol { color: var(--amber); background: rgba(243,199,125,.1); }
.preset-button strong { display: block; color: #dce7f5; font-size: 9px; font-weight: 700; white-space: nowrap; }
.preset-button small { display: block; margin-top: 3px; color: #7f91aa; font-size: 8px; white-space: nowrap; }
.control-list { display: flex; flex-direction: column; gap: 12px; }
.control-item { min-width: 0; }
.control-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.control-top label { color: #b4c2d5; font-size: 10px; font-weight: 600; }
.control-top output { color: var(--cyan); font-size: 9px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.control-item input[type="range"] { margin-top: 4px; }
.control-foot { display: flex; justify-content: space-between; align-items: center; color: #63758f; font-size: 7px; font-variant-numeric: tabular-nums; }
.source-tag { color: #71849c; font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.last-control { padding-bottom: 1px; }
.check-panel { padding: 13px 15px 12px; }
.check-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.check-icon { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--cyan); background: rgba(89,224,208,.1); font-size: 14px; }
.check-head h2 { font-size: 12px; }
.check-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.check-values div { display: flex; flex-direction: column; gap: 4px; }
.check-values span { color: #8293aa; font-size: 8px; }
.check-values strong { color: #dce8f7; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.check-result { display: flex; align-items: center; gap: 8px; padding: 9px 0 4px; }
.check-result > span:first-child { color: #8c9db3; font-size: 8px; }
.check-result strong { color: var(--cyan); font-size: 13px; font-variant-numeric: tabular-nums; }
.check-status { margin-left: auto; padding: 4px 6px; border-radius: 5px; color: var(--cyan); background: rgba(89,224,208,.08); font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.check-note { margin: 3px 0 0; color: #7789a2; font-size: 8px; line-height: 1.45; }
.footer-row { width: min(1600px, 100%); margin: 0 auto; padding: 9px 30px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: #64758e; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.footer-row > span i { color: var(--cyan); font-style: normal; padding: 0 3px; }
.science-details { margin-left: auto; position: relative; }
.science-details summary { list-style: none; display: flex; align-items: center; gap: 8px; color: #a6b5c9; font-size: 8px; font-weight: 800; letter-spacing: .14em; cursor: pointer; padding: 5px 0; }
.science-details summary::-webkit-details-marker { display: none; }
.chevron { color: var(--cyan); font-size: 14px; transition: transform .18s ease; }
.science-details[open] .chevron { transform: rotate(180deg); }
.science-content { position: absolute; z-index: 5; right: 0; bottom: calc(100% + 10px); width: min(820px, calc(100vw - 36px)); padding: 18px; border: 1px solid var(--line-strong); border-radius: 13px; background: #111c2c; box-shadow: 0 18px 50px rgba(0,0,0,.45); color: #a6b6cb; letter-spacing: 0; font-weight: 400; }
.science-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; }
.science-grid h3 { margin: 0 0 8px; color: #e3edf9; font-size: 11px; }
.science-grid p { margin: 0 0 8px; font-size: 9px; line-height: 1.6; }
.science-grid strong { color: var(--cyan); font-weight: 650; }
.disclaimer { margin: 8px 0 0; padding-top: 9px; border-top: 1px solid var(--line); color: #8193aa; font-size: 8px; }
@media (min-width: 1500px) { .workspace { padding-top: 30px; gap: 24px; } .visual-column, .side-column { gap: 17px; } .canvas-wrap { height: 440px; } }
@media (max-width: 1120px) { .workspace { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .95fr); padding-left: 20px; padding-right: 20px; gap: 14px; } .topbar { padding: 0 20px; } .footer-row { padding-left: 20px; padding-right: 20px; } .transport-card { grid-template-columns: 1fr; gap: 9px; } .transport-buttons { order: 1; } .speed-control { order: 2; } .sweep-readout { display: none; } }
@media (max-width: 820px) { .workspace { grid-template-columns: minmax(0,1fr); padding: 18px 16px 14px; gap: 14px; } .side-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } .readout-panel { grid-column: 1 / -1; } .check-panel { grid-column: 1 / -1; } .canvas-wrap { height: clamp(300px, 54vw, 410px); } .footer-row { padding: 8px 16px 14px; } .science-details { margin-left: auto; } }
@media (max-width: 540px) {
  .topbar { height: 58px; flex-basis: 58px; padding: 0 14px; gap: 9px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 9px; letter-spacing: .15em; }
  .brand-sub { font-size: 7px; letter-spacing: .1em; }
  .topbar-right { gap: 6px; font-size: 7px; letter-spacing: .08em; }
  .topbar-divider, .seed-label { display: none; }
  .workspace { padding: 15px 12px 12px; gap: 12px; }
  .intro-row { align-items: flex-start; }
  .eyebrow { font-size: 8px; }
  h1 { max-width: 330px; font-size: 24px; }
  .intro-copy { max-width: 330px; font-size: 11px; }
  .method-stamp { display: none; }
  .visual-column, .side-column { gap: 11px; }
  .stage-head { min-height: 57px; padding: 11px 10px; align-items: flex-start; }
  .stage-title { font-size: 12px; }
  .stage-actions { gap: 4px; }
  .mini-button { min-height: 26px; padding: 0 6px; font-size: 7px; }
  .screenshot-button { font-size: 0; gap: 0; width: 28px; }
  .screenshot-button .camera-icon { width: 12px; height: 10px; }
  .canvas-wrap { height: 330px; }
  .canvas-corner { top: 10px; right: 10px; font-size: 7px; }
  .legend-row { gap: 8px 11px; padding: 8px 10px; }
  .legend-item { font-size: 7px; }
  .legend-spacer { display: none; }
  .legend-note { margin-left: auto; font-size: 7px; }
  .transport-card { padding: 10px; gap: 8px; }
  .transport-buttons { gap: 5px; }
  .transport-button { height: 33px; padding: 0 9px; font-size: 7px; }
  .transport-button.primary { min-width: 82px; }
  .speed-control { width: 100%; }
  .caption-card { padding: 11px 12px; gap: 9px; }
  .caption-card p { font-size: 10px; }
  .side-column { display: flex; }
  .readout-panel, .control-panel, .check-panel { padding: 13px; }
  .readout-grid { gap: 7px; }
  .metric-card { padding: 10px 9px 8px; }
  .metric-value { font-size: 23px; }
  .metric-label { font-size: 7px; }
  .metric-foot { font-size: 7px; }
  .pivot-strip { font-size: 7px; }
  .control-list { gap: 13px; }
  .control-top label { font-size: 10px; }
  .preset-button { padding: 7px; }
  .preset-button strong { font-size: 8px; }
  .preset-button small { font-size: 7px; }
  .footer-row { padding: 7px 13px 12px; gap: 7px 12px; font-size: 6px; }
  .science-details { width: 100%; margin-left: 0; }
  .science-content { position: fixed; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: min(78dvh, 650px); overflow: auto; }
  .science-grid { grid-template-columns: 1fr; gap: 9px; }
}
@media (max-width: 370px) { .canvas-wrap { height: 300px; } .stage-actions .mini-button { padding: 0 5px; } .readout-panel { padding: 10px; } .metric-value { font-size: 20px; } .legend-note { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
