.experiment-title {
  margin-bottom: 22px;
}

.experiment-review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 14px;
  color: #4a5d6a;
  font-size: .9rem;
}

.experiment-review span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #07826d;
}

.experiment-review time {
  color: #60727e;
}

.experiment-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(270px, .88fr);
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid #cad6dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 13px 30px rgba(29, 49, 59, .07);
}

.experiment-inputs,
.experiment-results {
  min-width: 0;
  padding: 26px;
}

.experiment-results {
  border-left: 1px solid #d6e0e4;
  background: #f5f8f7;
}

.experiment-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.experiment-section-head h2,
.experiment-workbench h2 {
  margin: 2px 0 0;
  font-size: 1.65rem;
  line-height: 1.2;
}

.experiment-section-head .eyebrow,
.experiment-results > .eyebrow {
  margin: 0;
}

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

.experiment-fields > label,
.helper-fields label {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #344b58;
  font-size: .88rem;
  font-weight: 700;
}

.experiment-fields input,
.experiment-fields select,
.helper-fields input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #b9c8cf;
  border-radius: 6px;
  background: #fff;
  color: #17242a;
  font: inherit;
  font-weight: 600;
  padding: 9px 11px;
}

.experiment-fields input:focus,
.experiment-fields select:focus,
.helper-fields input:focus {
  outline: 3px solid rgba(0, 112, 94, .17);
  border-color: #00705e;
}

.unit-input,
.currency-input {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.unit-input input {
  min-width: 0;
  border-radius: 6px 0 0 6px;
}

.unit-input > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 42px;
  max-width: 108px;
  padding: 0 9px;
  border: 1px solid #b9c8cf;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #edf2f3;
  color: #536773;
  font-size: .8rem;
  font-weight: 800;
  text-align: center;
}

.currency-input > span:first-child {
  min-width: 36px;
  border: 1px solid #b9c8cf;
  border-right: 0;
  border-left: 1px solid #b9c8cf;
  border-radius: 6px 0 0 6px;
}

.currency-input input {
  border-radius: 0 6px 6px 0;
}

.field-suffix {
  position: absolute;
  right: 11px;
  bottom: 13px;
  color: #637681;
  font-size: .76rem;
}

.checkbox-field {
  display: flex !important;
  align-items: flex-start;
  grid-column: 1 / -1;
  gap: 10px !important;
  padding: 12px;
  border: 1px solid #d3dde1;
  border-radius: 6px;
  background: #f7f9f9;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

.checkbox-field span {
  display: grid;
  gap: 3px;
}

.checkbox-field small,
.field-help,
.method-note {
  color: #5c707b;
  font-weight: 500;
  line-height: 1.55;
}

.field-help {
  margin: 16px 0 0;
  font-size: .87rem;
}

.segmented-control {
  display: flex;
  gap: 0;
  margin: 0 0 19px;
  padding: 0;
  border: 0;
}

.segmented-control legend {
  width: 100%;
  margin-bottom: 7px;
  color: #344b58;
  font-size: .82rem;
  font-weight: 800;
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: block;
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid #b8c8ce;
  background: #fff;
  color: #3e5662;
  text-align: center;
  font-size: .86rem;
  font-weight: 800;
}

.segmented-control label:first-of-type span {
  border-radius: 6px 0 0 6px;
}

.segmented-control label:last-of-type span {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.segmented-control input:checked + span {
  border-color: #006b5a;
  background: #006b5a;
  color: #fff;
}

.secondary-action,
.experiment-actions button,
.helper-panel button {
  min-height: 40px;
  border: 1px solid #b9c8cf;
  border-radius: 6px;
  background: #fff;
  color: #18333d;
  padding: 8px 13px;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
}

.secondary-action:hover,
.experiment-actions button:hover,
.helper-panel button:hover {
  border-color: #00705e;
  color: #006b5a;
}

.experiment-actions .primary-action {
  border-color: #006b5a;
  background: #006b5a;
  color: #fff;
}

.primary-result {
  display: grid;
  gap: 1px;
  margin: 12px 0 22px;
}

.primary-result strong {
  color: #006b5a;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.primary-result span {
  color: #4f626d;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d0dce0;
  border-radius: 6px;
  background: #d0dce0;
}

.result-grid div {
  min-width: 0;
  padding: 12px;
  background: #fff;
}

.result-grid dt {
  color: #60737e;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-grid dd {
  margin: 4px 0 0;
  color: #17262d;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.experiment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.action-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #08725f;
  font-size: .84rem;
}

.experiment-error {
  margin: 13px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #bc3d2f;
  background: #fff2f0;
  color: #8a2e24;
  font-weight: 700;
}

.experiment-preview-panel > p,
.bolt-layout-panel > p {
  color: #526975;
}

.experiment-preview {
  display: grid;
  place-items: center;
  min-height: 360px;
  margin-top: 18px;
  overflow: auto;
  border: 1px solid #ced9de;
  border-radius: 6px;
  background-color: #edf2f1;
  background-image: linear-gradient(45deg, #e4ebea 25%, transparent 25%), linear-gradient(-45deg, #e4ebea 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e4ebea 75%), linear-gradient(-45deg, transparent 75%, #e4ebea 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  padding: 20px;
}

.experiment-preview svg {
  display: block;
  max-width: 100%;
  max-height: 520px;
  filter: drop-shadow(0 9px 15px rgba(30, 48, 58, .14));
}

.preview-legend {
  display: flex;
  gap: 12px;
  color: #526873;
  font-size: .8rem;
  font-weight: 800;
}

.preview-legend span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 8px;
  margin-right: 5px;
}

.legend-trim::before {
  border: 2px solid #006b5a;
}

.legend-bleed::before {
  border: 2px dashed #cf7a12;
}

.method-grid,
.next-pass-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.method-grid article,
.next-pass-grid article {
  min-width: 0;
}

.method-grid h3,
.next-pass-grid h3 {
  margin: 0 0 7px;
  font-size: 1.03rem;
}

.method-grid p,
.next-pass-grid p {
  margin: 0;
  color: #536a76;
  line-height: 1.6;
}

.formula-box {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 9px 16px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  border-left: 4px solid #00705e;
  background: #f2f7f6;
}

.formula-box code {
  overflow-wrap: anywhere;
  color: #24434d;
  white-space: normal;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 27px;
  color: #415965;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .38em;
  width: 9px;
  height: 5px;
  border-bottom: 3px solid #07826d;
  border-left: 3px solid #07826d;
  transform: rotate(-45deg);
}

.bolt-output-grid {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(380px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.bolt-preview {
  min-height: 440px;
  margin: 0;
}

.bolt-table th,
.bolt-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bolt-table th:first-child,
.bolt-table td:first-child {
  text-align: left;
}

.helper-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #d0dce0;
  border-radius: 6px;
  background: #f7f9f9;
}

.helper-panel summary {
  color: #18343e;
  font-weight: 800;
  cursor: pointer;
}

.helper-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.helper-panel p {
  margin: 12px 0 0;
}

.calibration-status {
  display: grid;
  gap: 3px;
  margin: -5px 0 18px;
  padding: 11px 12px;
  border-left: 4px solid #07826d;
  background: #e9f6f1;
  color: #285447;
}

.calibration-status.is-close {
  border-color: #c7790d;
  background: #fff6e6;
  color: #71490d;
}

.calibration-status.is-off-target {
  border-color: #b83e32;
  background: #fff0ee;
  color: #7b2c25;
}

.calibration-status span {
  font-size: .85rem;
}

.experiment-notice {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 15px;
  align-items: start;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid #e1bd79;
  border-left: 5px solid #bf7509;
  border-radius: 6px;
  background: #fff8e9;
  color: #593d13;
}

.experiment-notice p {
  margin: 0;
  line-height: 1.55;
}

.next-pass-grid article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
}

.next-pass-grid article > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e1f1ed;
  color: #006b5a;
  font-weight: 900;
}

.source-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d1dce0;
  border-radius: 6px;
  background: #d1dce0;
}

.source-list a {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
  color: #006b5a;
  text-decoration: none;
}

.source-list a:hover strong {
  text-decoration: underline;
}

.source-list span {
  color: #526a76;
  line-height: 1.5;
}

.experiment-related {
  margin-top: 22px;
}

.experiment-sidebar .side-card a {
  overflow-wrap: normal;
}

@media (max-width: 980px) {
  .experiment-page-grid,
  .bolt-output-grid {
    grid-template-columns: 1fr;
  }

  .experiment-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .experiment-workbench,
  .experiment-fields,
  .method-grid,
  .next-pass-grid,
  .helper-fields {
    grid-template-columns: 1fr;
  }

  .experiment-results {
    border-top: 1px solid #d6e0e4;
    border-left: 0;
  }

  .experiment-inputs,
  .experiment-results {
    padding: 20px;
  }

  .experiment-notice {
    grid-template-columns: 1fr;
  }

  .formula-box {
    grid-template-columns: 1fr;
  }

  .experiment-preview {
    min-height: 280px;
    padding: 12px;
  }
}

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

  .experiment-section-head {
    align-items: center;
  }

  .experiment-section-head h2 {
    font-size: 1.35rem;
  }
}

@media print {
  .site-header,
  .breadcrumbs,
  .experiment-actions,
  .experiment-sidebar,
  .related-tools,
  .site-footer,
  .secondary-action {
    display: none !important;
  }

  .experiment-workbench {
    break-inside: avoid;
    box-shadow: none;
  }
}
