#studio {
  width: min(1240px, 98vw);
  max-width: none;
  max-height: 96dvh;
  padding: 0;
  background: #f3f6ef;
  overflow: auto;
  border-radius: 12px;
}
#studio .studio-top {
  background: #18382b;
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
}
#studio .studio-top h2 {
  font: 28px Georgia;
  margin: 10px 0;
}
#studio .studio-top p {
  font-size: 11px;
  color: #c9d8c3;
  margin: 0;
}
.studio-eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #b9d09e;
}
#studio .studio-top button {
  background: transparent;
  color: white;
  font-size: 27px;
  border: 0;
  align-self: flex-start;
  padding: 0 4px;
}
.studio-body {
  display: grid;
  grid-template-columns: 300px 1fr;
}
.studio-setup {
  background: white;
  padding: 22px;
  border-right: 1px solid #d8e1d0;
}
.studio-setup h3,
.studio-work h3 {
  font: 22px Georgia;
  margin: 0 0 12px;
}
.studio-setup label {
  display: block;
  margin: 14px 0;
  font-size: 10px;
}
.studio-setup input,
.studio-setup select,
.studio-setup textarea {
  display: block;
  margin-top: 7px;
  width: 100%;
  font-size: 13px;
  padding: 11px;
  border: 1px solid #d5dfcb;
  background: #fbfcf8;
  border-radius: 4px;
  color: #274434;
}
.studio-setup textarea {
  font-family: Arial;
  resize: vertical;
}
.studio-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.studio-hint {
  font-size: 11px;
  line-height: 1.7;
  color: #718267;
}
.studio-save {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.studio-save button:first-child,
.launch-studio {
  background: #254b38 !important;
  color: #fff !important;
}
.studio-save button {
  padding: 10px;
  font-size: 11px;
}
#studioMessage {
  font-size: 11px;
  line-height: 1.6;
  color: #3f6846;
  min-height: 30px;
}
.studio-method {
  font-size: 11px;
  border-top: 1px solid #dce5d4;
  padding-top: 15px;
  line-height: 1.7;
}
.studio-method summary {
  cursor: pointer;
}
.studio-method a {
  color: #426548;
}
.studio-work {
  padding: 24px;
  min-width: 0;
}
.studio-workhead {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}
.studio-workhead p {
  font-size: 11px;
  color: #6e8067;
}
.studio-workhead > div:last-child {
  display: flex;
  gap: 6px;
}
.studio-workhead button {
  font-size: 11px;
  padding: 9px 10px;
}
.studio-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.studio-metrics > div {
  padding: 14px;
  background: white;
  border: 1px solid #d9e4cf;
  border-radius: 6px;
}
.studio-metrics small {
  display: block;
  font-size: 10px;
  color: #778b6d;
  margin-bottom: 8px;
}
.studio-metrics strong {
  font-size: 16px;
  font-weight: 500;
  color: #294e36;
}
.studio-diagram {
  background: white;
  border: 1px solid #dce6d3;
  border-radius: 6px;
  overflow: auto;
}
.studio-diagram svg {
  display: block;
  width: 100%;
  min-width: 500px;
}
.studio-diagram g[role="button"] {
  cursor: pointer;
}
.studio-diagram g[role="button"]:focus {
  outline: 2px solid #b58332;
}
.studio-legend {
  font-size: 10px;
  color: #728467;
  margin: 10px 0 20px;
}
.studio-table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #d8e3cf;
  border-radius: 6px;
}
#studioTable {
  min-width: 580px;
}
#studioTable th {
  font-size: 9px;
  padding: 12px 10px;
}
#studioTable td {
  padding: 9px 10px;
  font-size: 12px;
}
#studioTable td:first-child {
  font-family: Arial;
  max-width: none;
  white-space: nowrap;
}
#studioTable input {
  margin: 0;
  width: 105px;
  padding: 8px;
  font-size: 12px;
  background: #fafcf6;
}
#studioTable .selected {
  background: #e4efda;
}
.studio-footnote {
  font-size: 11px;
  color: #75886c;
  border-top: 1px solid #d9e2d1;
  padding-top: 18px;
  line-height: 1.8;
  margin-top: 20px;
}
#studioError {
  background: #fff2e6;
  border: 1px solid #e8c7a1;
  padding: 18px;
  margin: 20px 0;
  color: #82542c;
  font-size: 13px;
  line-height: 1.7;
}
#studioCopyFallback {
  width: 100%;
  min-height: 180px;
  margin-top: 20px;
}
#studioPrintNotes {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.7;
}
.launch-studio {
  padding: 13px 20px;
  font-size: 13px;
  border-color: #254b38;
  margin: 8px 0;
}
.studio-launch {
  padding: 20px;
  background: #e8efdf;
  border: 1px solid #ccdabc;
  border-radius: 7px;
  margin: 18px 0;
}
.studio-launch strong {
  font: 22px Georgia;
}
.studio-launch p {
  font-size: 12px;
  line-height: 1.7;
  color: #6a7d5e;
}
@media (max-width: 850px) {
  .studio-body {
    grid-template-columns: 1fr;
  }
  .studio-setup {
    border-right: 0;
    border-bottom: 1px solid #d8e1d0;
    padding: 20px;
  }
  .studio-work {
    padding: 18px;
  }
  .studio-workhead {
    flex-wrap: wrap;
  }
  .studio-metrics {
    grid-template-columns: 1fr 1fr;
  }
  #studio {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
  #studio .studio-top {
    padding: 22px 20px;
  }
  #studio .studio-top h2 {
    font-size: 24px;
  }
  .studio-setup > label {
    max-width: none;
  }
  .studio-save button {
    padding: 13px;
  }
  .studio-workhead button {
    padding: 12px;
  }
}
@media print {
  body:has(#studio[open]) > * {
    display: none !important;
  }
  body > #studio[open] {
    display: block !important;
    position: static;
    width: 100%;
    max-height: none;
    height: auto;
    overflow: visible;
    background: white;
    color: black;
    border: 0;
  }
  #studio::backdrop {
    display: none;
  }
  #studio .studio-top {
    background: white;
    color: black;
    padding: 0 0 15px;
    border-bottom: 2px solid #222;
  }
  #studio .studio-top p,
  #studio .studio-eyebrow {
    color: #333;
  }
  #studio .studio-top button,
  .studio-setup,
  .studio-workhead > div:last-child,
  .studio-hint,
  #studioCopyFallback {
    display: none !important;
  }
  .studio-body {
    display: block;
  }
  .studio-work {
    padding: 20px 0;
  }
  .studio-diagram svg {
    min-width: 0;
  }
  .studio-table-wrap {
    overflow: visible;
  }
  #studioTable {
    min-width: 0;
  }
  #studioTable input {
    border: 0;
    background: white;
    padding: 0;
    width: 75px;
    font: 12px Arial;
    appearance: textfield;
  }
  .studio-metrics {
    break-inside: avoid;
  }
  .studio-table-wrap tr {
    break-inside: avoid;
  }
  .studio-diagram {
    break-inside: avoid;
  }
  .studio-footnote {
    color: black;
  }
  .studio-top h2 {
    color: black !important;
  }
  .studio-workhead h3 {
    margin: 0;
  }
}

.spiral-controls {
  background: #eff4e8;
  border: 1px solid #d5e0c8;
  border-radius: 6px;
  padding: 12px;
  margin: 15px 0;
}
.spiral-controls[hidden],
.spiral-view[hidden] {
  display: none;
}
.spiral-controls h4 {
  font-size: 13px;
  margin: 0;
}
.spiral-controls p,
.spiral-controls small {
  font-size: 10px;
  line-height: 1.7;
  color: #59764f;
}
.spiral-controls .studio-pair {
  gap: 8px;
}
.spiral-view {
  background: white;
  border: 1px solid #d8e3ce;
  padding: 18px;
  border-radius: 6px;
  margin: 20px 0;
}
.spiral-view h4 {
  font: 18px Georgia;
  margin: 0 0 8px;
}
.spiral-view p {
  font-size: 11px;
  color: #6c805e;
  line-height: 1.7;
}
.spiral-circles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.spiral-circles figure {
  margin: 0;
  text-align: center;
}
.spiral-circles svg {
  width: 100%;
  max-width: 140px;
}
.spiral-circles figcaption {
  font-size: 10px;
  color: #6a7c5e;
}
.spiral-circles strong {
  display: block;
  font-size: 13px;
  color: #355735;
  margin-top: 6px;
}
@media print {
  .spiral-view {
    break-inside: avoid;
  }
}
.bumper-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.studio-setup .bumper-check input {
  width: auto;
  display: inline-block;
  margin: 0;
}
#studio [hidden] {
  display: none !important;
}
.bumper-row {
  background: #fff8ec;
}
.spiral-controls button {
  font-size: 10px;
  margin-bottom: 10px;
}
