
:root {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #19353d;
  background: #edf2f3;
  --ink: #19353d;
  --muted: #526b72;
  --line: #d9e5e4;
  --teal: #0b675c;
  --accent: #0a7567;
  --light: #eaf4f0;
  --panel-padding: clamp(16px, 1.55vw, 25px);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
main { width: min(calc(100% - 56px),1456px); margin: auto; padding: 33px 0 26px; }
.intro { margin: 0 0 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.14; letter-spacing: -.045em; }
.experiment-name { color: var(--muted); font-size: 13px; white-space: nowrap; }
.workspace {
  display: grid;
  grid-template-columns: minmax(236px,.78fr) minmax(378px,1.44fr) minmax(305px,1.14fr);
  background: #fff;
  border: 1px solid #cededd;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 9px #183d4010;
}
.workspace > section { min-width: 0; padding: var(--panel-padding); }
.workspace > section + section { border-left: 1px solid var(--line); }
.model-pane { background: #f0f7f5; }
.analysis-pane { background: #fbfdfc; }
.pane-head, .scenehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 14px; min-height: 42px; margin-bottom: 14px; }
.pane-head h2, .scenehead h2 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -.02em; }
#reportMeta { display: block; margin-top: 4px; overflow-wrap: anywhere; }
#count { padding: 4px 8px; border-radius: 5px; color: var(--teal); background: var(--light); white-space: nowrap; font-weight: 650; font-size: 12px; }
.small { color: var(--muted); font-size: 12px; line-height: 1.55; }
p { margin: 8px 0; }
:focus-visible { outline: 2px solid #147364; outline-offset: 3px; }
button, input, select, .template-link { font: inherit; }
button, .template-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 8px 11px; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; color: #fff; background: var(--teal); font-weight: 660; font-size: 13px; line-height: 1.3;
}
button:hover { background: #095c53; }
button:disabled { opacity: .6; cursor: wait; }
.secondary, .template-link {
  color: #185b51; background: #eaf4f0; border-color: #d5e6e0; text-decoration: none;
}
.secondary:hover, .template-link:hover { color: #123c37; background: #dceee7; }
input:not([type=checkbox],[type=file]), select {
  display: block; width: 100%; min-width: 0; min-height: 41px; border: 1px solid #c6d9d7;
  border-radius: 7px; padding: 8px 9px; color: var(--ink); background: #fff;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
select { padding-right: 26px; }
.field { display: block; margin-bottom: 5px; font-size: 13px; color: #334f58; font-weight: 650; }
.control { min-width: 0; margin-bottom: 13px; }
#modelCombination { margin: 6px 0 0; }
.model-figure, .more-info, .fit-details { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
summary { color: #28554f; font-size: 13px; font-weight: 650; cursor: pointer; line-height: 1.6; }
details[open] > summary { margin-bottom: 9px; }
#trussModel {
  display: block; width: 100%; max-height: 190px; border: 1px solid #d8e6e2;
  border-radius: 9px; background: #fafdfc; margin: 0;
}
.model-caption { padding-top: 10px; }
#modelName { font-size: 14px; }
#modelDescription { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.model-key, .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.model-key span, .legend span { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.model-key i, .dot { width: 8px; height: 8px; border-radius: 50%; }
.buttons, .analysis-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.analysis-actions label { font-size: 13px; }
.analysis-actions select { width: auto; }
.import-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 13px; }
.import-format { margin-left: 4px; }
#tableImportStatus { margin: -2px 0 10px; }
#tableImportStatus[data-error], #entryError { color: #9a392c; }
#entryError:empty { display: none; }
.measure-one { color: #087b6e; }
.measure-four { color: #994c0e; }
.measure-five { color: #685198; }
.scroll { overflow-x: auto; margin-top: 17px; }
table { width: 100%; border-collapse: collapse; text-align: center; font-size: 12px; white-space: nowrap; min-width: 360px; }
th, td { padding: 7px 4px; border-bottom: 1px solid #e3ecea; font-variant-numeric: tabular-nums; }
th { background: #f2f6f6; color: #385761; font-weight: 650; }
td { color: #34535d; }
td input[type=checkbox] { accent-color: var(--teal); }
td button { min-height: 29px; padding: 4px 6px; font-size: 12px; }
.empty { display: grid; place-items: center; min-height: 55px; color: var(--muted); font-size: 13px; border-bottom: 1px solid #e3ecea; }
.table-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.notice { padding: 10px 11px; background: #f9f4e5; border-left: 3px solid #c2852a; border-radius: 5px; color: #684110; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.notice:empty { display: none; }
#warn { margin-top: 12px; }
.analysis-pane .scenehead { display: block; }
.analysis-pane .legend { margin-top: 7px; }
.chart-empty, .chart-panel {
  margin: 0;
}
.chart-empty {
  display: grid; place-items: center; min-height: 201px; padding: 16px; text-align: center;
  border: 1px solid #dceae6; border-radius: 10px;
  background: linear-gradient(to right,#e7eeed 1px,transparent 1px) 0 0/24px 24px,
    linear-gradient(to bottom,#e7eeed 1px,transparent 1px) 0 0/24px 24px,#f7faf9;
  color: #354f59; font-size: 13px; line-height: 1.5;
}
.chart-empty span { background: #f7faf9; padding: 4px 7px; }
.chart { display: block; width: 100%; height: auto; margin: 4px 0 0; }
.fit-primary { width: 100%; margin-top: 12px; min-height: 42px; font-size: 14px; }
#fitResult { margin-top: 10px; }
.summarygrid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-top: 8px; }
.summarygrid > div { padding: 7px 5px; background: #edf5f2; border-radius: 6px; }
.summarygrid small, .summarygrid b { display: block; }
.summarygrid small { color: var(--muted); font-size: 11px; }
.summarygrid b { font-size: 13px; margin-top: 3px; }
.footer { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
@media(max-width:1050px) {
  .workspace { grid-template-columns: minmax(225px,.9fr) minmax(0,1.65fr); }
  .workspace > .analysis-pane { grid-column: 1/-1; border-left: 0; border-top: 1px solid var(--line); }
  .analysis-content { max-width: 720px; margin: 0 auto; }
}
@media(max-width:760px) {
  main { width: calc(100% - 28px); padding: 21px 0; }
  .intro { margin-bottom: 15px; }
  .experiment-name { display: none; }
  .workspace { grid-template-columns: minmax(0,1fr); border-radius: 12px; }
  .workspace > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .workspace > section { padding: 14px; }
  .pane-head, .scenehead { min-height: 0; margin-bottom: 12px; }
  .control { margin-bottom: 10px; }
  .chart-empty { min-height: 133px; }
  .import-tools button,.template-link{min-height:42px}
}
@media print {
  :root, body { background: #fff; }
  main { width: 100%; padding: 0; }
  .workspace { display: block; border: 0; box-shadow: none; }
  .workspace > section { background: #fff; border: 0; padding: 8px 0; }
  .site-header,.no-print,.table-actions,.more-info,.chart-empty,.fit-primary { display: none!important; }
  #modelFigure, .analysis-pane { break-inside: avoid; }
  .scroll { overflow: visible; }
}

@media(max-width:760px){
  table{min-width:0}
  th,td{padding:6px 2px}
  th{font-size:11px}
  td button{padding:3px 4px;min-height:31px}
}

.clear-table { background:#fff; color:#93614e; border-color:#e7d7ce; }
.clear-table:hover { background:#fbf3ee; color:#78422e; }
.table-actions button:disabled,.import-tools #download:disabled { cursor:default; }


.table-pane .scroll { margin-top:13px; border:1px solid var(--line); border-radius:7px; }
.table-pane table { table-layout:fixed; min-width:0; }
.table-pane th,.table-pane td { padding:0; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.table-pane tr>:last-child { border-right:0; }
.table-pane tr:last-child td { border-bottom:0; }
.table-pane th { height:35px; }
.table-pane td { height:37px; }
.pick-col,.step-col { width:9%; }
.action-col { width:13%; }
.table-pane input.grid-input {
  display:block; width:100%; min-width:0; min-height:36px; padding:6px 5px; border:0;
  border-radius:0; background:transparent; text-align:right; font-size:14px; outline-offset:-2px;
}
.table-pane input.grid-input:focus { z-index:1; outline:2px solid #16816e; background:#e8f5ef; }
.table-pane input.grid-input[aria-invalid=true] { color:#94382e; box-shadow:inset 0 0 0 1px #b96554; }
.table-pane tr:nth-child(even) { background:#f7faf9; }
.table-pane input[type=checkbox]:disabled { opacity:.32; }
.remove-row { min-height:30px; padding:3px 4px; background:transparent; border:0; color:#814c3e; }
.remove-row:hover { background:#f8efec; color:#672f21; }
.table-actions { gap:7px; }
.table-actions .add-row { background:var(--teal); color:#fff; }
#entryError,#pendingRows { margin:7px 0 0; }
@media(max-width:760px){
  .table-pane th { font-size:10px; }
  .table-pane input.grid-input { min-height:39px; padding:5px 3px; font-size:15px; }
  .remove-row { font-size:11px; padding:3px; }
}
@media print{
  .table-pane .incomplete-row,#pendingRows{display:none!important;}
}


:root {
  --ink:#242331; --muted:#625f70; --line:#dedde6; --teal:#594691; --accent:#594691;
  --light:#eeebf7; --paper:#fff; --lab-line:var(--line);
  font-family:Arial,"Microsoft YaHei",sans-serif; font-synthesis:none; color:var(--ink);
}
*,*::before,*::after { box-sizing:border-box }
body { margin:0; color:var(--ink); background:linear-gradient(135deg,#f5f3fa 0%,#faf9fc 36%,#fcfbfd 75%) fixed; min-height:100vh }
[hidden] { display:none!important }
main,.site-header-inner { width:min(calc(100% - 80px),1440px); margin-inline:auto }
main { padding:0 0 30px }
.site-header { border-bottom:1px solid var(--line); background:#fbfafdf5 }
.site-header-inner,.site-header b,.site-header nav,.site-header a { display:flex; align-items:center }
.site-header-inner { justify-content:space-between; gap:12px; min-height:58px }
.site-header b { gap:10px; font-size:15px; font-weight:650; white-space:nowrap }
.brand-mark { width:28px; height:21px; color:var(--accent) }
.site-header nav { gap:clamp(15px,3vw,32px); align-self:stretch }
.site-header a { color:var(--muted); font-size:14px; text-decoration:none; border-bottom:2px solid transparent }
.site-header a:hover,.site-header a[aria-current] { color:var(--accent) }
.site-header a[aria-current] { border-color:currentColor; font-weight:650 }
.intro { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:6px 12px; margin:clamp(22px,2.7vw,40px) 0 clamp(18px,1.8vw,27px) }
h1 { margin:0; font-size:clamp(26px,2.6vw,40px); line-height:1.18; font-weight:700; letter-spacing:-.045em }
h2,h3,p { margin:0 }
h2 { font-size:clamp(17px,1.35vw,21px); line-height:1.4; letter-spacing:-.025em }
h3 { font-size:14px; line-height:1.5 }
.small,.unit,.visit,.experiment-name { color:var(--muted); font-size:12px; line-height:1.6 }
button,input,select { font:inherit; font-variant-numeric:tabular-nums }
button,.template-link { cursor:pointer; font-weight:600; font-size:13px; line-height:1.35; min-height:36px; padding:7px 11px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--ink) }
button:hover,.template-link:hover { background:var(--light); color:var(--accent) }
button:disabled { opacity:.45; cursor:default }
input:not([type=range],[type=file],[type=radio],[type=checkbox]),select { font-size:14px; min-width:0; color:var(--ink); border:1px solid #c9c7d2; border-radius:5px; padding:7px 9px; background:white }
input[type=range],input[type=checkbox] { accent-color:var(--accent) }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px }
summary { cursor:pointer; color:var(--ink); font-size:14px; font-weight:600; padding:6px 0 }
summary::marker { font-size:.78em; color:var(--accent) }
.footer { margin:18px 0 0; color:var(--muted); font-size:12px }
@media(max-width:850px) {
  main,.site-header-inner { width:calc(100% - 36px) }
  .site-header-inner { min-height:52px }
}
@media(max-width:430px) {
  main,.site-header-inner { width:calc(100% - 24px) }
  .site-header nav { gap:12px }
  .site-header b { gap:5px; font-size:13px }
  .brand-mark { width:21px }
  .site-header a { font-size:13px }
}
@media print { body { background:white } main { width:100%; padding:0 } .site-header,.no-print,.footer { display:none!important } }

.workspace { display:grid; grid-template-columns:minmax(186px,.76fr) minmax(340px,1.36fr) minmax(290px,1.22fr); align-items:start; gap:0 clamp(14px,1.8vw,28px); overflow:visible; border:0; border-radius:0; background:transparent; box-shadow:none }
.workspace > section,.workspace > section + section { padding:0; border:0; background:transparent }

.workspace > .model-pane { display:grid; gap:15px; min-width:0 }
.model-setup h2 { font-size:clamp(18px,1.55vw,23px); margin:0 0 14px; line-height:1.3 }
.model-setup .control { margin:0 }
.model-setup select { width:100%; min-height:38px }
#modelCombination { margin:6px 0 0; font-size:12px }
#constraintOptions:not([hidden]) { display:grid; gap:8px; margin-top:12px }
.model-figure { margin:0; padding:0; border:0 }
.more-info { margin:0; padding:8px 0 0; border-top:1px solid var(--line) }
.more-info summary { padding:5px 0; font-size:13px }
#trussModel { border:0; background:#f0edf6; border-radius:6px }
.more-info .buttons { margin:8px 0 }
.workspace > .analysis-pane { grid-column:auto; position:sticky; top:18px }
.analysis-content { max-width:none; margin:0 }
.pane-head,.analysis-pane .scenehead { display:flex; align-items:baseline; flex-wrap:wrap; min-height:0; gap:2px 12px; margin:0 0 14px }
.pane-head h2,.scenehead h2 { font-size:clamp(18px,1.55vw,23px); color:var(--ink) }
.analysis-pane .scenehead h2 { flex:1 }
#reportMeta { margin:4px 0 0 }
#count,#plotScope { margin:0; padding:0; color:var(--muted); background:none; font-size:12px; font-weight:400 }
.analysis-pane .legend { flex:0 0 100%; margin-top:4px }
.import-tools,.table-actions,.analysis-actions { gap:6px 9px }
.import-tools { margin:0 0 10px }
.secondary,.template-link { background:#fff; color:#403b4b; border:1px solid var(--line); text-decoration:none }
.template-link { color:var(--accent); background:transparent; border-color:transparent; text-decoration:underline; text-underline-offset:3px }
#importTable { color:white; background:var(--accent); border-color:var(--accent) }
.table-pane .scroll { background:white; margin:0; max-height:min(62vh,630px); overflow:auto; border:1px solid #d7d5df; border-radius:6px }
.table-pane table { border-collapse:separate; border-spacing:0 }
.table-pane th { position:sticky; top:0; z-index:1; font-size:12px; color:#575363; background:#eeedf3 }
.table-pane td { border-color:#e5e3e9 }
.table-pane .measure-one { color:#3c589d } .table-pane .measure-four { color:#935314 } .table-pane .measure-five { color:#77469d }
.table-pane tr:nth-child(even) { background:#fbfafc }
.table-pane input.grid-input { color:var(--ink); background:transparent; border:0; border-radius:0; text-align:right; padding-right:8px }
.table-pane input.grid-input:focus { outline:2px solid var(--accent); outline-offset:-2px; background:#f4f0fa }
.table-actions .add-row { color:var(--accent); background:var(--light); border-color:transparent }
.clear-table { margin-left:auto }
.remove-row { color:#80594c; border:0; background:transparent }
.chart-empty,.chart { border:1px solid var(--line); border-radius:7px; background:white }
.chart { padding:5px 0 }
.chart-empty { min-height:clamp(190px,23vw,320px); background:repeating-linear-gradient(to top,transparent 0,transparent 46px,#f0eff3 46px,#f0eff3 47px),white; color:var(--muted) }
.chart-empty span { background:#fff; padding:5px 10px }
.fit-primary { background:var(--accent); color:#fff; border-color:var(--accent); width:auto; min-width:140px }
.fit-primary:hover,#importTable:hover { background:#493778; color:#fff }
.summarygrid>div { background:#f1eff6 }
#fitResult { color:#4d3c6d; background:#f0edf7; border-color:#9885b7 }
.fit-details summary { color:var(--ink) }
.instability-result { margin:10px 0; font-size:13px; line-height:1.6; color:var(--muted) }
.instability-result.has-instability { padding:9px 11px; background:#fcf0f4; color:#70244a; border-left:3px solid #a23369; border-radius:5px }
.instability-result strong,.instability-result span { display:block }
.event-segment { position:relative; flex:none; width:18px; height:2px; background:#a23369 }
.event-segment::before,.event-segment::after {
  content:""; position:absolute; top:50%; transform:translateY(-50%);
  width:7px; height:7px; box-sizing:border-box; border:1.5px solid #a23369;
  border-radius:50%; background:#fff;
}
.event-segment::before { left:0 }
.event-segment::after { right:0 }
#warn { position:sticky; top:0; z-index:10; margin:0 0 12px; background:#902744; color:white; padding:12px 16px; border:0; border-radius:6px; font-size:16px; font-weight:700 }

@media(max-width:959px) {
  .workspace { grid-template-columns:minmax(0,1fr); row-gap:24px }
  .workspace>.analysis-pane { position:static; grid-column:auto }
  .workspace>.model-pane { grid-template-columns:1fr 1fr; align-items:start; gap:12px 22px }
  .model-figure { grid-column:2; grid-row:1/3 }
  .table-pane .scroll { max-height:350px }
  .experiment-name { display:inline; white-space:normal }
}
@media(max-width:599px) {
  .workspace>.model-pane { grid-template-columns:minmax(0,1fr); gap:10px }
  .model-figure { grid-column:auto; grid-row:auto }
  #trussModel { max-height:150px }
  .model-setup h2 { margin-bottom:8px }
  .model-caption { padding-top:6px }
  .experiment-name { font-size:12px }
  .intro { align-items:baseline }
  .pick-col,.step-col { width:9% }
  .action-col { width:12% }
  .table-pane th { font-size:11px }
  .table-pane input.grid-input { padding-inline:3px }
  .table-actions { gap:5px }
  .clear-table { margin-left:0 }
  .table-actions button { padding-inline:8px }
}
@media print {
  .workspace,.workspace>.model-pane,.workspace>.analysis-pane { display:block; border:0; position:static }
  .table-pane .scroll { max-height:none; overflow:visible }
  .table-pane th { position:static }
  .workspace>section { padding-block:8px }
}

@media print { .model-pane .model-setup { margin-bottom:4px } }

.southwell textarea { display:block;width:100%;max-width:100%;margin:.35em 0 .65em;padding:.45em;font:inherit;border:1px solid #c9d4dc;border-radius:4px; }

.intro { justify-content:flex-start; align-items:center; gap:7px 18px; }
.intro .page-visits { color:#49357e; background:#eee7fb; border:1px solid #dbcef5; border-radius:999px; padding:4px 11px; font-size:14px; font-weight:700; white-space:nowrap; }
@media(max-width:520px) { .intro { align-items:flex-start; flex-direction:column; } }

.critical-result { margin:8px 0 3px; color:#556271; font-size:13px; line-height:1.45; }
.critical-result[data-kind="platform"], .critical-result[data-kind="post-drop"] { width:fit-content; padding:4px 8px; border-radius:7px; background:#ede7fa; color:#4b3788; font-weight:700; }
.critical-result[data-kind="post-drop"] { background:#f8eddc; color:#794913; }

.experiment-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}.experiment-tabs{display:flex;gap:6px;flex-wrap:wrap}.experiment-tab{background:#f2eef9;color:#44346e;border:1px solid #d8d0e8;padding:8px 11px;border-radius:6px}.experiment-tab.active{background:#5942a5;color:white}.account-panel{border-bottom:1px solid #d8d0e8;padding:18px 0;margin-bottom:22px}.account-panel[hidden]{display:none}.account-form{display:flex;flex-wrap:wrap;gap:14px;align-items:end}.account-form label{display:grid;gap:6px}.account-form input{min-height:38px;max-width:100%;padding:6px;border:1px solid #bbb0d0;border-radius:5px}.account-links{display:flex;gap:8px;margin-top:10px}.site-header-inner{gap:12px}.site-header-inner nav{margin-left:auto}#syncStatus{min-height:1.2em;margin:4px 0 12px}.remove-row[data-confirm]{color:#9b3252}@media(max-width:600px){.account-form{display:grid;grid-template-columns:1fr}.account-form label,.account-form input{width:100%;box-sizing:border-box}.site-header-inner{flex-wrap:wrap}.experiment-tab,#newExperiment{min-height:40px}}

#deleteExperiment[data-confirm]{color:#9b3252;border-color:#c59bac}

#sendEmail{background:#5942a5;border:1px solid #5942a5;color:white}#sendEmail:disabled{opacity:.65}#importTable{background:#fff;color:#44346e;border:1px solid #d8d0e8}
