:root {
  font-family: 'Inter', 'PingFang SC', system-ui, sans-serif;
  color: #172b27;
  background: #f2f4ef;
  font-synthesis: none;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #275c52;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}
main {
  max-width: 1420px;
  margin: auto;
  padding: clamp(16px, 3vw, 42px);
}
.mast,
.sectionHead,
.curveHead,
.transport,
.actions,
.historyRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mast {
  margin-bottom: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.breadcrumb {
  font-size: 13px;
  color: #69766f;
  margin: 0 0 8px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.05em;
  line-height: 1.2;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 15px;
}
.modeTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  padding: 7px 10px;
  border: 1px solid #c6cec4;
  border-radius: 6px;
  background: #fff;
  color: #1c3931;
  cursor: pointer;
}
button:disabled,
select:disabled,
input:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #329a7e;
  outline-offset: 2px;
}
.modeTabs button {
  font-size: 14px;
  background: transparent;
}
.modeTabs [aria-pressed='true'],
.primary {
  background: #225c4a;
  color: white;
  border-color: #225c4a;
}
.columns,
.bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(265px, 0.9fr);
  gap: 18px;
}
aside {
  display: grid;
  gap: 16px;
  align-content: start;
}
.panel,
.observation {
  border: 1px solid #cbd3c8;
  background: #fbfcf8;
  border-radius: 12px;
  padding: clamp(14px, 2vw, 23px);
  min-width: 0;
}
.sectionHead {
  margin-bottom: 12px;
}
.state,
#reportSource {
  font-size: 13px;
  color: #477263;
}
.stage {
  position: relative;
  background: #162d2c;
  border-radius: 8px;
  overflow: hidden;
}
.stage canvas {
  display: block;
  width: 100%;
  height: clamp(270px, 45vh, 470px);
}
#sourceTag,
#clock {
  position: absolute;
  background: #17332ee0;
  color: #e5f4e8;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 4px;
  top: 9px;
}
#sourceTag {
  left: 9px;
}
#clock {
  right: 9px;
  font-variant-numeric: tabular-nums;
}
.transport {
  margin: 11px 0 17px;
  font-size: 13px;
}
.transport input {
  min-width: 0;
  flex: 1;
  accent-color: #28664f;
}
.transport output {
  min-width: 44px;
  text-align: right;
}
.curveHead select,
.transport button {
  font-size: 13px;
}
.curveHead {
  margin-bottom: 5px;
}
#plot {
  height: 105px;
  width: 100%;
  display: block;
}
.panel h2 {
  margin-bottom: 10px;
}
.panel label {
  font-size: 14px;
  display: grid;
  gap: 3px;
  margin: 8px 0;
}
.panel label.check {
  display: flex;
  align-items: center;
  gap: 7px;
}
.check input {
  accent-color: #226650;
}
.panel select {
  width: 100%;
}
.actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}
.hint,
footer,
.empty {
  font-size: 13px;
  color: #53685e;
  margin: 7px 0;
  line-height: 1.65;
}
progress {
  display: block;
  width: 100%;
  margin: 10px 0;
}
dl {
  margin: 0;
}
dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e0e5dd;
}
dt,
dd {
  font-size: 14px;
  margin: 0;
}
dd {
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.bottom {
  margin-top: 18px;
  align-items: start;
}
.report p {
  margin: 7px 0;
}
.report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}
.report th,
.report td {
  text-align: left;
  padding: 6px 3px;
  border-bottom: 1px solid #dae1d7;
}
.report th {
  font-weight: 600;
  color: #52675b;
}
.historyRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  border-top: 1px solid #dfe5da;
  padding: 8px 0;
  font-size: 13px;
}
.historyRow > span {
  min-width: 0;
}
.historyRow button {
  font-size: 13px;
  padding: 4px 8px;
  min-height: 34px;
}
.historyRow small {
  display: block;
  color: #5e7367;
}
footer {
  margin-top: 18px;
}
footer p {
  margin-top: 4px;
}
strong {
  font-weight: 700;
}
[hidden] {
  display: none !important;
}
@media (max-width: 790px) {
  .columns,
  .bottom {
    grid-template-columns: 1fr;
  }
  .mast {
    gap: 12px;
  }
  .modeTabs {
    width: 100%;
  }
  .modeTabs button {
    flex: 1;
    white-space: nowrap;
  }
  .stage canvas {
    height: 340px;
  }
  .panel,
  .observation {
    padding: 14px;
  }
}
@media (max-width: 480px) {
  main {
    padding: 12px;
  }
  .modeTabs button {
    font-size: 12px;
    padding: 8px 3px;
  }
  .report table {
    font-size: 12px;
  }
  .transport {
    gap: 6px;
  }
  nav {
    gap: 10px;
  }
}
.panel label,
.panel input[type='file'] {
  min-width: 0;
}
.plotDetail {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-left: 3px solid #dba056;
  background: #f1f4ec;
}
.plotDetail output {
  font-size: 14px;
  font-weight: 680;
}
.plotDetail span,
.comparison p,
#captureAdvice p {
  font-size: 13px;
  color: #526559;
}
#reviewLinks,
.report .actions {
  font-size: 13px;
}
#reviewLinks a,
.report .actions a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
#captureAdvice {
  margin: 12px 0;
  border-left: 3px solid #bf8239;
  padding: 8px 12px;
  background: #fbf5e8;
}
#sharePanel {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #dae1d7;
}
#sharePanel .actions > * {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.selectedReading {
  color: #225c4a;
  background: #edf3e9;
}
.peakLink {
  display: block;
  width: fit-content;
  min-height: 32px;
  margin-top: 3px;
  color: #205a49;
  background: #eef5ec;
  border-color: #cddcca;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.historyRow[data-current] {
  border-left: 3px solid #47856b;
  padding-left: 8px;
  background: #f0f5ec;
}
.comparison {
  margin-top: 18px;
}
.comparison label {
  max-width: 720px;
}
.comparison table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.comparison th,
.comparison td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #dae1d7;
}
.comparison td {
  font-variant-numeric: tabular-nums;
}
.comparison tr > :last-child {
  font-weight: 650;
}
#stage,
#motionReport,
#comparePanel,
#setupPanel {
  scroll-margin-top: 80px;
}
@media (max-width: 790px) {
  .columns {
    grid-template-areas: 'settings' 'observation' 'readings';
  }
  .columns aside {
    display: contents;
  }
  #setupPanel {
    grid-area: settings;
  }
  #readoutPanel {
    grid-area: readings;
  }
  .observation {
    grid-area: observation;
  }
}
@media (max-width: 480px) {
  .comparison table {
    font-size: 12px;
  }
  .comparison td,
  .comparison th {
    padding: 6px 3px;
  }
}
.panel input[type='file'] {
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}
