:root{
  --ink:#173e4d;
  --muted:#67818b;
  --teal:#2f829c;
  --teal-dark:#236579;
  --teal-soft:#eaf4f5;
  --orange:#e98a20;
  --orange-soft:#fff2df;
  --green:#258d68;
  --green-soft:#e8f5ef;
  --red:#d8564a;
  --red-soft:#fff0ee;
  --line:#c8dadd;
  --paper:#ffffff;
  --page:#f1f7f7;
  --shadow:0 16px 44px rgba(31,71,82,.12);
}
*{box-sizing:border-box}
body{
  margin:0;
  min-width:320px;
  color:var(--ink);
  background:
    linear-gradient(rgba(47,130,156,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(47,130,156,.035) 1px,transparent 1px),
    var(--page);
  background-size:32px 32px;
  font-family:"Microsoft YaHei","PingFang SC","Noto Sans SC",system-ui,sans-serif;
}
button,input{font:inherit}
.page-shell{width:min(1380px,calc(100% - 32px));margin:0 auto;padding:34px 0 52px}
.page-header{
  display:flex;align-items:flex-end;justify-content:space-between;gap:32px;
  margin-bottom:24px;padding:0 4px;
}
.eyebrow{display:block;color:var(--orange);font-size:15px;font-weight:800;letter-spacing:.12em;margin-bottom:8px}
h1{font-size:clamp(34px,4vw,54px);line-height:1.08;margin:0 0 10px;letter-spacing:-.04em}
.page-header p{margin:0;color:var(--muted);font-size:18px}
.model-note{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.model-note span{padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.72);font-size:14px;font-weight:700}
.workspace{display:grid;grid-template-columns:310px minmax(0,1fr);gap:20px;align-items:start}
.control-panel,.experiment-panel,.principle-strip{background:var(--paper);border:1px solid rgba(152,184,190,.65);box-shadow:var(--shadow);border-radius:22px}
.control-panel{padding:22px;position:sticky;top:18px}
.panel-heading,.experiment-topline>div:first-child{display:flex;align-items:center;gap:12px}
.step-number{display:grid;place-items:center;flex:0 0 auto;width:38px;height:38px;border-radius:12px;background:var(--orange-soft);color:var(--orange);font-size:14px;font-weight:900}
h2{font-size:20px;margin:0}
.panel-heading p{font-size:13px;color:var(--muted);margin:4px 0 0}
.speed-control{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:30px 0 14px;color:var(--muted);font-size:14px}
.speed-control strong{color:var(--ink);font-size:23px;white-space:nowrap}
input[type=range]{width:100%;height:8px;appearance:none;background:linear-gradient(90deg,var(--teal) 0 57.14%,#dbe7e9 57.14%);border-radius:999px;outline:none}
input[type=range]::-webkit-slider-thumb{appearance:none;width:24px;height:24px;border-radius:50%;background:#fff;border:7px solid var(--teal);box-shadow:0 3px 10px rgba(23,62,77,.2);cursor:pointer}
input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#fff;border:7px solid var(--teal);box-shadow:0 3px 10px rgba(23,62,77,.2);cursor:pointer}
.range-labels{display:flex;justify-content:space-between;margin-top:9px;color:var(--muted);font-size:13px}
.prediction-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0 0;padding:12px 0;border-top:1px solid #dbe7e9;color:var(--ink);font-size:14px;font-weight:800;cursor:pointer}
.switch-control{position:relative;display:block;flex:0 0 auto;width:48px;height:28px}
.switch-control input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.switch-track{display:block;width:48px;height:28px;padding:3px;border-radius:999px;background:#c9d7da;transition:background .18s ease}
.switch-track span{display:block;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 7px rgba(23,62,77,.22);transition:transform .18s ease}
.switch-control input:checked+.switch-track{background:var(--teal)}
.switch-control input:checked+.switch-track span{transform:translateX(20px)}
.switch-control input:focus-visible+.switch-track{outline:3px solid rgba(233,138,32,.42);outline-offset:3px}
.prediction-details[hidden]{display:none}
.threshold-note{font-size:14px;color:var(--muted);line-height:1.6;margin:8px 0 12px}
.threshold-note strong{color:var(--teal-dark)}
.prediction{display:flex;align-items:center;gap:12px;padding:14px 15px;border-radius:14px;margin:0 0 18px}
.prediction.success{background:var(--green-soft);color:var(--green)}
.prediction.fail{background:var(--red-soft);color:var(--red)}
.prediction-dot{width:11px;height:11px;border-radius:50%;background:currentColor;box-shadow:0 0 0 5px rgba(255,255,255,.65)}
.prediction div{display:flex;flex-direction:column;gap:2px}
.prediction small{font-size:12px;opacity:.78}
.prediction strong{font-size:18px}
.button-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.primary-button,.secondary-button{border-radius:12px;min-height:44px;padding:10px 14px;font-weight:800;cursor:pointer}
.primary-button{grid-column:1/-1;border:0;background:var(--teal);color:#fff}
.primary-button:hover{background:var(--teal-dark)}
.secondary-button{border:1px solid var(--line);background:#fff;color:var(--ink)}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,input:focus-visible{outline:3px solid rgba(233,138,32,.42);outline-offset:3px}
.fixed-data{margin:22px 0 0;padding-top:18px;border-top:1px solid #dbe7e9}
.fixed-data div{display:flex;justify-content:space-between;gap:16px;padding:7px 0}
.fixed-data dt{color:var(--muted);font-size:13px}.fixed-data dd{margin:0;font-size:14px;font-weight:800}
.experiment-panel{padding:20px;min-width:0}
.experiment-topline{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.status-badge{padding:8px 13px;border-radius:999px;font-size:14px;font-weight:850}
.status-badge.ready{background:var(--teal-soft);color:var(--teal-dark)}
.status-badge.running{background:var(--orange-soft);color:#a75c0c}
.status-badge.success{background:var(--green-soft);color:var(--green)}
.status-badge.fail{background:var(--red-soft);color:var(--red)}
.canvas-wrap{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:17px;background:#f8fbfb}
canvas{display:block;width:100%;height:auto;aspect-ratio:1200/650}
.slow-note{position:absolute;right:12px;bottom:10px;padding:6px 9px;border-radius:8px;background:rgba(255,255,255,.88);color:var(--muted);font-size:12px}
.data-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}
.data-card{padding:13px 14px;border-radius:14px;background:#f5f9f9;border:1px solid #dbe7e9}
.data-card span{display:block;color:var(--muted);font-size:14px;margin-bottom:5px}
.data-card strong{font-size:19px;font-variant-numeric:tabular-nums}
.principle-strip{display:flex;align-items:flex-start;gap:15px;margin-top:20px;padding:20px 24px}
.principle-strip h2{margin-bottom:7px}.principle-strip p{margin:0;color:var(--muted);font-size:15px;line-height:1.8}
.principle-strip strong{color:var(--ink)}
@media(max-width:900px){
  .page-header{align-items:flex-start;flex-direction:column}.model-note{justify-content:flex-start}
  .workspace{grid-template-columns:1fr}.control-panel{position:static}
  .button-row{grid-template-columns:2fr 1fr 1fr}.primary-button{grid-column:auto}
}
@media(max-width:620px){
  .page-shell{width:min(100% - 18px,1380px);padding-top:20px}
  .page-header p{font-size:16px}.control-panel,.experiment-panel{border-radius:17px;padding:15px}
  .data-grid{grid-template-columns:1fr 1fr}.button-row{grid-template-columns:1fr 1fr}.primary-button{grid-column:1/-1}
  .principle-strip{padding:17px}.principle-strip p{font-size:14px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
