:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-soft: #fafafa;
  --line: #e2e2e2;
  --line-strong: #c9c9c9;
  --text: #1f2933;
  --muted: #667085;
  --accent: #6b7280;
  --accent-dark: #4b5563;
  --accent-soft: #f1f3f5;
  --green: #59616b;
  --amber: #737373;
  --shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  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;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.appShell {
  min-height: 100vh;
  padding: 18px 22px 14px;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1520px;
  padding: 0 0 18px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 18px;
}

.brandLogo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  height: 54px;
  object-fit: contain;
  padding: 6px 8px;
  width: 160px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1;
}

.topbarActions {
  align-items: center;
  display: inline-flex;
  gap: 12px;
}

.topbar a {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 14px;
  font-weight: 650;
  gap: 8px;
  text-decoration: none;
}

.workspace {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.95fr);
  max-width: 1520px;
  margin: 0 auto;
}

.leftColumn,
.rightColumn {
  align-content: start;
  align-self: start;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 16px;
}

.sectionTitle {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.sectionTitle h2 {
  font-size: 18px;
  line-height: 1.1;
}

.systemTemperatureGrid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  margin-bottom: 14px;
}

.systemTemperatureGrid > .selectField {
  grid-column: 1 / -1;
}

.temperatureStack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.systemTemperatureGrid p,
.selectedMaterial p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.systemTemperatureGrid p {
  grid-column: 1 / -1;
}

.field,
.selectField {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span,
.selectField span {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.fieldControl {
  align-items: center;
  display: flex;
  gap: 7px;
}

input,
select {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  height: 38px;
  min-width: 0;
  outline: none;
  padding: 0 11px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.16);
}

input:disabled {
  background: #f0f1f2;
  color: #6b7280;
}

.fieldControl b {
  color: #374151;
  font-size: 14px;
  min-width: 38px;
}

.flowGrid {
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  display: grid;
  grid-template-columns: 210px 1fr minmax(270px, 0.9fr);
  gap: 18px;
  padding: 16px;
}

.derivedFlow {
  align-items: center;
  align-self: end;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 9px;
  height: 38px;
  min-width: 0;
  padding: 0 11px;
}

.derivedFlow span {
  color: #374151;
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selectedMaterial {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 1.3fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr);
}

.selectedMaterial p {
  align-self: center;
  grid-column: 1 / -1;
}

.setpointGroup {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  padding-top: 14px;
}

.setpointGroup.isCollapsed {
  display: none;
}

.setpointSummary {
  align-items: center;
  background: #fafafa;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 10px;
  grid-column: 1 / -1;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 11px;
  text-align: left;
}

.setpointSummary span {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.setpointSummary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.setpointToggle {
  grid-column: 1 / -1;
}

.toggleField {
  align-items: center;
  background: #fafafa;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #374151;
  display: flex;
  font-size: 13px;
  font-weight: 750;
  gap: 9px;
  height: 38px;
  padding: 0 11px;
}

.toggleField input {
  accent-color: var(--accent);
  height: 16px;
  width: 16px;
}

.secondaryButton {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 750;
  gap: 9px;
  height: 42px;
  justify-content: center;
  min-width: 142px;
  padding: 0 18px;
}

.secondaryButton {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: #374151;
}

.compactButton {
  height: 38px;
  min-width: 104px;
  padding: 0 14px;
}

.resultsPanel {
  padding: 12px;
}

.resultsPanel .sectionTitle {
  margin-bottom: 10px;
}

.projectPanel {
  padding: 12px;
}

.projectPanel .sectionTitle {
  margin-bottom: 10px;
}

.projectGrid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.projectField .fieldControl {
  grid-template-columns: minmax(0, 1fr);
}

.projectField input {
  min-width: 0;
}

.metricTable {
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.metricRow {
  align-items: baseline;
  background: #fff;
  border-bottom: 0;
  display: grid;
  gap: 4px 7px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 48px;
  padding: 9px 11px;
}

.metricRow:nth-child(4n + 1),
.metricRow:nth-child(4n + 2) {
  background: #fcfcfc;
}

.metricRow:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.metricRow span {
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.metricRow strong {
  color: #374151;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.2;
  max-width: 150px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.metricRow em {
  color: #374151;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.metricRow small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  grid-column: 1 / -1;
  line-height: 1.2;
  min-width: 0;
}

.metricRow small:empty {
  display: none;
}

.emptyState {
  align-items: center;
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  min-height: 180px;
  padding: 18px;
}

.compactEmpty {
  min-height: 72px;
}

.schedulePanel {
  grid-column: 1 / -1;
  padding-bottom: 14px;
}

.exportPanel {
  align-items: center;
  display: flex;
  gap: 14px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.exportPanel .sectionTitle {
  margin-bottom: 6px;
}

.exportPanel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.exportActions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.scheduleToolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.scheduleToolbar p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.scheduleActions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.scheduleConductivity {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.scheduleConductivity span {
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.scheduleConductivity select {
  height: 38px;
}

.inlineScheduleInput {
  align-items: center;
  display: flex;
  gap: 7px;
}

.inlineScheduleInput input {
  height: 38px;
}

.inlineScheduleInput b {
  color: #374151;
  font-size: 13px;
  min-width: 24px;
}

.scheduleTableWrap {
  border: 1px solid var(--line);
  border-radius: 7px;
  max-width: 100%;
  overflow: auto;
}

.scheduleTable {
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.colIndex { width: 54px; }
.colReference { width: 96px; }
.colMaterial { width: 96px; }
.colSize { width: 72px; }
.colFlow { width: 74px; }
.colPressure { width: 84px; }
.colLength { width: 100px; }
.colVolume { width: 80px; }
.colInsulation { width: 98px; }
.colHeat { width: 76px; }
.colTotal { width: 108px; }
.colRemove { width: 64px; }

.scheduleTable th,
.scheduleTable td {
  border-bottom: 1px solid var(--line);
  color: #374151;
  font-size: 12px;
  overflow: hidden;
  padding: 8px 6px;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.scheduleTable th:first-child,
.scheduleTable td:first-child {
  text-align: center;
}

.scheduleTable th {
  background: var(--panel-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: clip;
  white-space: normal;
}

.scheduleTable td {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.scheduleTable tr:last-child td {
  border-bottom: 0;
}

.fittingDetailRow td {
  background: #fbfbfb;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  padding-top: 6px;
}

.fittingDetailRow.isCollapsed td {
  padding-bottom: 6px;
}

.fittingDetailRow.isCollapsed .fittingEditor {
  display: none;
}

.fittingDetailRow:not(.isCollapsed) .fittingCollapsedSummary {
  display: none;
}

.scheduleTable tfoot td {
  background: var(--panel-soft);
  border-top: 1px solid var(--line-strong);
  color: #1f2937;
  font-weight: 850;
}

.selectedScheduleRow td {
  background: #f7f8f9;
}

.indexRunSummary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.indexRunSummary div {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 10px;
}

.indexRunSummary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.indexRunSummary strong {
  color: #1f2937;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.scheduleReference {
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.scheduleLengthControl {
  align-items: center;
  display: flex;
  gap: 5px;
  width: 100%;
}

.scheduleLengthControl input {
  flex: 1;
  height: 34px;
  min-width: 0;
  padding: 0 9px;
}

.scheduleLengthControl b {
  color: #374151;
  font-size: 13px;
}

.scheduleSelect {
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  width: 100%;
}

input[data-schedule-selected] {
  height: 18px;
  padding: 0;
  width: 18px;
}

.rowActions {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
}

.rowActions .iconButton {
  height: 28px;
  width: 28px;
}

.fittingCollapsedSummary button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #4b5563;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  height: 26px;
  padding: 0;
}

.fittingEditor {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 64px 126px minmax(120px, 0.42fr);
}

.fittingEditor select,
.fittingEditor input {
  height: 32px;
}

.fittingEditor input {
  padding: 0 8px;
}

.fittingEditor > strong {
  color: #374151;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.miniButton {
  font-size: 12px;
  height: 32px;
  min-width: 0;
  padding: 0 10px;
}

.fittingList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
  min-height: 24px;
}

.fittingEmpty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fittingChip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #374151;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 6px 4px 8px;
}

.fittingChip b {
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}

.fittingChip button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  padding: 0;
  width: 20px;
}

.iconButton {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.pipeSummary {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(170px, 0.9fr) minmax(300px, 1.2fr);
}

.pipeCopy dl,
.pipeDiagram dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pipeSummary .sectionTitle {
  margin-bottom: 10px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 3px;
}

dd {
  color: #172b47;
  font-size: 15px;
  font-weight: 750;
  margin: 0;
}

.pipeDiagram {
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 126px;
  gap: 12px;
  align-items: center;
  padding-left: 16px;
}

.pipeDiagram svg {
  height: 132px;
  width: 100%;
}

.pipeDiagram text {
  fill: #243956;
  font-size: 15px;
  font-weight: 750;
}

.guide {
  stroke: #a9b8c6;
  stroke-dasharray: 7 7;
  stroke-width: 1.5;
}

.dimension,
.tick {
  fill: none;
  stroke: #007f9d;
  stroke-width: 2;
}

.guideRow {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 150px 1fr;
  margin-top: 10px;
  min-height: 44px;
  padding: 10px 12px 10px 16px;
}

.guideRow.green {
  box-shadow: inset 3px 0 0 var(--green);
}

.guideRow.amber {
  box-shadow: inset 3px 0 0 var(--amber);
}

.guideRow span,
.guideRow em {
  color: #4a5d76;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}

.guideRow strong {
  color: #1d477b;
  font-size: 17px;
  font-weight: 800;
}

.warning {
  background: #fff9eb;
  border: 1px solid #f0c86f;
  border-radius: 6px;
  color: #895800;
  font-size: 13px;
  font-weight: 650;
  margin-top: 12px;
  padding: 10px 12px;
}

footer {
  color: #607085;
  font-size: 12px;
  line-height: 1.5;
  margin: 14px auto 0;
  max-width: 1520px;
}

footer strong {
  color: #374151;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .selectedMaterial,
  .systemTemperatureGrid,
  .flowGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .appShell {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
    margin: 0 auto 12px;
    padding: 0 0 14px;
  }

  .brand {
    align-items: flex-start;
    display: grid;
  }

  .brandLogo {
    height: 46px;
    width: 136px;
  }

  h1 {
    font-size: 26px;
  }

  .topbar a {
    font-size: 13px;
  }

  .workspace,
  .leftColumn,
  .rightColumn {
    gap: 12px;
  }

  .panel {
    padding: 12px;
  }

  .systemTemperatureGrid {
    align-items: stretch;
    display: grid;
  }

  .flowGrid,
  .selectedMaterial,
  .systemTemperatureGrid,
  .setpointGroup,
  .projectGrid,
  .pipeSummary,
  .metricTable,
  .metricRow,
  .guideRow,
  .pipeDiagram {
    grid-template-columns: 1fr;
  }

  .indexRunSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metricRow,
  .metricRow:nth-child(4n + 1),
  .metricRow:nth-child(4n + 2) {
    background: #fff;
  }

  .metricRow:nth-child(odd) {
    background: #fcfcfc;
  }

  .pipeDiagram {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
  }

  .selectedMaterial {
    margin-left: 0;
    margin-right: 0;
  }

  .topbar,
  .topbarActions {
    align-items: stretch;
    display: grid;
  }

  .compactButton {
    min-width: 0;
    width: 100%;
  }

  .scheduleToolbar {
    align-items: stretch;
    display: grid;
  }

  .scheduleActions {
    align-items: stretch;
    display: grid;
  }

  .exportPanel {
    align-items: stretch;
    display: grid;
  }

  .exportActions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setpointSummary {
    align-items: stretch;
    display: grid;
    padding: 9px 11px;
  }

  .setpointSummary em {
    text-align: left;
  }

  .fittingEditor {
    grid-template-columns: 1fr;
  }

  .fittingEditor > strong {
    justify-self: start;
  }

  .metricRow strong {
    text-align: left;
  }

  .scheduleTableWrap {
    border: 0;
    overflow: visible;
  }

  .scheduleTable,
  .scheduleTable tbody,
  .scheduleTable tfoot,
  .scheduleTable tr,
  .scheduleTable td {
    display: block;
    width: 100%;
  }

  .scheduleTable colgroup,
  .scheduleTable thead {
    display: none;
  }

  .scheduleTable {
    border-collapse: separate;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px 7px 0 0;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) td {
    border-bottom: 0;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr;
    min-width: 0;
    overflow: visible;
    padding: 0;
    text-align: left;
    white-space: normal;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) td::before {
    color: var(--muted);
    content: "";
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.1;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(1)::before { content: "Index"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(2)::before { content: "Reference"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(3)::before { content: "Material"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(4)::before { content: "Size"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(5)::before { content: "Flow"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(6)::before { content: "Pa/m"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(7)::before { content: "Length"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(8)::before { content: "Volume"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(9)::before { content: "Insulation"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(10)::before { content: "Heat"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(11)::before { content: "Total dP"; }
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(12)::before { content: "Actions"; }

  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(1),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(12) {
    align-content: center;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(1),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(2),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(7),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(9),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(12) {
    grid-column: 1;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(3),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(4),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(5),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(6),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(8),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(10),
  .scheduleTable tbody tr:not(.fittingDetailRow) td:nth-child(11) {
    grid-column: 2;
  }

  .scheduleReference,
  .scheduleLengthControl,
  .scheduleSelect {
    max-width: 100%;
  }

  .scheduleTable tbody tr:not(.fittingDetailRow) td > input,
  .scheduleTable tbody tr:not(.fittingDetailRow) td > select,
  .scheduleTable tbody tr:not(.fittingDetailRow) td > .scheduleReference,
  .scheduleTable tbody tr:not(.fittingDetailRow) td > .scheduleLengthControl,
  .scheduleTable tbody tr:not(.fittingDetailRow) td > .scheduleSelect,
  .scheduleTable tbody tr:not(.fittingDetailRow) td > .rowActions {
    justify-self: stretch;
  }

  input[data-schedule-selected] {
    justify-self: start;
  }

  .rowActions {
    justify-content: start;
  }

  .fittingDetailRow {
    background: transparent;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 7px 7px;
    margin-bottom: 12px;
  }

  .fittingDetailRow td {
    border-bottom: 0;
    overflow: visible;
    padding: 9px 10px;
    white-space: normal;
  }

  .fittingDetailRow td:first-child {
    display: none;
  }

  .fittingCollapsedSummary button {
    min-width: 0;
    white-space: normal;
  }

  .fittingChip {
    align-items: flex-start;
    white-space: normal;
  }

  .scheduleTable tfoot {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    margin-top: 12px;
    padding: 10px;
  }

  .scheduleTable tfoot tr {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scheduleTable tfoot td {
    background: transparent;
    border-top: 0;
    padding: 0;
    white-space: normal;
  }

  .scheduleTable tfoot td:nth-child(1),
  .scheduleTable tfoot td:nth-child(3),
  .scheduleTable tfoot td:nth-child(6) {
    display: none;
  }

  .scheduleTable tfoot td:nth-child(2)::before,
  .scheduleTable tfoot td:nth-child(4)::before,
  .scheduleTable tfoot td:nth-child(5)::before {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 850;
    margin-bottom: 4px;
  }

  .scheduleTable tfoot td:nth-child(2)::before { content: "Volume"; }
  .scheduleTable tfoot td:nth-child(4)::before { content: "Heat"; }
  .scheduleTable tfoot td:nth-child(5)::before { content: "Total dP"; }
}

@media (max-width: 440px) {
  .indexRunSummary,
  .scheduleTable tfoot tr {
    grid-template-columns: 1fr;
  }
}
