.sdd-workbench {
  max-width: 1150px;
  --sdd-soft: color-mix(in srgb, var(--green) 6%, var(--paper));
  --sdd-emphasis: color-mix(in srgb, var(--green) 12%, var(--white));
}
.sdd-back {
  display: inline-block;
  font: 11px var(--mono);
  color: var(--muted);
  margin-bottom: 24px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sdd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  align-items: center;
  gap: 40px;
  margin: 0 0 32px;
}
.sdd-kicker {
  font: 500 11px var(--mono);
  color: var(--green);
  letter-spacing: 0.08em;
  display: block;
}
.sdd-hero h1 {
  font-size: clamp(35px, 4.4vw, 58px);
  line-height: 1.04;
  margin: 16px 0 18px;
}
.sdd-hero p {
  color: var(--lede);
  font-size: 16px;
  line-height: 1.75;
  max-width: 600px;
}
.sdd-schematic {
  position: relative;
  isolation: isolate;
  aspect-ratio: 380 / 222;
}
.sdd-schematic:before {
  content: '';
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, #7c3aed 12%, transparent),
    color-mix(in srgb, var(--green) 6%, transparent) 60%,
    transparent
  );
}
.sdd-schematic svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dl-node rect {
  fill: var(--white);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}
.dl-node text {
  font: 600 10.5px var(--mono);
  fill: var(--ink);
  letter-spacing: 0.03em;
}
.dl-glyph {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dl-node.is-agent rect {
  fill: color-mix(in srgb, #7c3aed 9%, var(--white));
  stroke: color-mix(in srgb, #7c3aed 55%, var(--line-strong));
}
.dl-node.is-agent .dl-glyph {
  stroke: none;
  fill: #8b5cf6;
  animation: dl-spark 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.dl-node.is-check rect {
  fill: var(--emerald-soft);
  stroke: color-mix(in srgb, var(--acid) 60%, var(--line-strong));
}
.dl-node.is-check .dl-glyph {
  stroke: var(--emerald-ink);
}
.dl-node.is-you rect {
  fill: var(--primary-soft);
  stroke: color-mix(in srgb, var(--green) 50%, var(--line-strong));
}
.dl-link {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}
.dl-packet {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 92;
  stroke-dashoffset: 100;
  opacity: 0;
  animation: dl-packet 6s linear infinite;
  animation-delay: calc(var(--i) * 2s);
}
.dl-packet[style*='--i:1'] {
  stroke: #8b5cf6;
}
.dl-packet[style*='--i:2'] {
  stroke: var(--acid);
}
.dl-tick {
  fill: none;
  stroke: var(--acid);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: dl-tick 6s ease infinite 3.4s;
}
@keyframes dl-packet {
  0% {
    stroke-dashoffset: 100;
    opacity: 1;
  }
  28% {
    stroke-dashoffset: 8;
    opacity: 1;
  }
  33%,
  100% {
    stroke-dashoffset: 8;
    opacity: 0;
  }
}
@keyframes dl-spark {
  50% {
    transform: rotate(45deg) scale(1.2);
  }
}
@keyframes dl-tick {
  0%,
  10% {
    stroke-dashoffset: 30;
  }
  25%,
  70% {
    stroke-dashoffset: 0;
  }
  90%,
  100% {
    stroke-dashoffset: 30;
  }
}
.sdd-boundary {
  position: relative;
  border: 1px solid color-mix(in srgb, #7c3aed 22%, var(--line));
  border-left: 4px solid #8b5cf6;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    100deg,
    color-mix(in srgb, #7c3aed 7%, var(--white)),
    var(--white) 60%
  );
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 30px;
  font-size: 14px;
}
.sdd-boundary strong {
  font-weight: 600;
  font-size: 16px;
}
.sdd-boundary p {
  line-height: 1.75;
  margin-top: 8px;
  max-width: 90ch;
  color: var(--muted);
}
.sdd-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  scroll-margin-top: 90px;
}
.sdd-step {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-align: left;
  line-height: 1.4;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.sdd-step span {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font: 600 11px var(--mono);
  color: var(--muted);
  background: var(--white);
}
.sdd-step:hover:not(.sdd-active) {
  background: color-mix(in srgb, var(--white) 60%, transparent);
  color: var(--ink);
}
.sdd-step.sdd-active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}
.sdd-active span {
  border-color: var(--green);
  background: var(--green);
  color: var(--on-accent);
}
.sdd-section-heading {
  margin-bottom: 23px;
}
.sdd-section-heading h2 {
  font-size: 31px;
  margin: 13px 0;
}
.sdd-section-heading p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 80ch;
}
.sdd-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.sdd-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.sdd-button:hover {
  border-color: var(--green);
  background: var(--sdd-emphasis);
}
.sdd-button-primary {
  background: var(--sdd-emphasis);
  border-color: var(--green);
  color: var(--ink);
}
.sdd-caption {
  font-size: 11px;
  color: var(--muted);
  max-width: 360px;
}
.sdd-confirm {
  border-left: 3px solid var(--orange);
  background: var(--white);
  padding: 16px 20px;
  font-size: 13px;
}
.sdd-confirm .sdd-actions {
  margin-bottom: 0;
}
.sdd-spec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 25px;
  align-items: start;
}
.sdd-field {
  margin: 22px 0;
}
.sdd-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.sdd-field p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 8px;
}
.sdd-field input,
.sdd-field textarea {
  width: 100%;
  display: block;
  padding: 12px 14px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
  resize: vertical;
}
.sdd-field input::placeholder,
.sdd-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.sdd-version {
  max-width: 300px;
}
.sdd-inspector {
  position: sticky;
  top: 20px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--sdd-soft);
}
.sdd-inspector h3 {
  font-size: 23px;
  margin: 14px 0 12px;
}
.sdd-inspector p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.sdd-checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  font-size: 11px;
}
.sdd-checklist li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sdd-check-state {
  font: 13px var(--mono);
  color: var(--muted);
  flex: none;
}
.sdd-check-state.sdd-present {
  color: var(--green);
}
.sdd-human-check {
  border-left: 3px solid var(--green);
  padding: 13px 16px;
  background: var(--sdd-soft);
  font-size: 12px;
  line-height: 1.8;
  margin: 21px 0;
}
.sdd-human-check strong {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}
.sdd-human-check p {
  color: var(--muted);
  max-width: 90ch;
}
.sdd-inspector .sdd-human-check {
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}
.sdd-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin: 27px 0 10px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}
.sdd-plan {
  list-style: none;
  counter-reset: sdd-plan;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 25px 0;
  background: var(--white);
  border: 1px solid var(--line);
}
.sdd-plan li {
  counter-increment: sdd-plan;
  padding: 17px;
  border-right: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.8;
}
.sdd-plan li:last-child {
  border: 0;
}
.sdd-plan li:before {
  content: '0' counter(sdd-plan);
  display: block;
  font: 13px var(--mono);
  color: var(--green);
  margin-bottom: 10px;
}
.sdd-plan b {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}
.sdd-plan span {
  color: var(--muted);
}
.sdd-details {
  border: 1px solid var(--line);
  background: var(--white);
  margin: 18px 0;
}
.sdd-details summary {
  cursor: pointer;
  padding: 17px;
  font-size: 13px;
  color: var(--ink);
}
.sdd-details summary span {
  display: inline-block;
  font: 10px var(--mono);
  color: var(--muted);
  margin: 4px 0 4px 12px;
}
.sdd-details pre.sdd-prompt {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 11px/1.9 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 440px;
  overflow: auto;
}
.sdd-downloads {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 24px;
  border: 1px solid var(--line);
  padding: 24px;
  background: var(--sdd-soft);
  margin: 28px 0 14px;
}
.sdd-downloads h3 {
  font-size: 25px;
  margin: 12px 0;
}
.sdd-downloads p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
  margin: 10px 0;
}
.sdd-downloads code {
  background: var(--white);
  color: var(--ink);
  overflow-wrap: anywhere;
  line-height: 2;
}
.sdd-downloads .sdd-actions {
  align-content: center;
  align-items: stretch;
  flex-direction: column;
  justify-content: center;
  margin: 0;
}
.sdd-footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 13px 0;
  max-width: 90ch;
}
.sdd-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr);
  gap: 25px;
  margin: 25px 0;
}
.sdd-code-label {
  font: 10px var(--mono);
  color: var(--muted);
  padding: 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--white);
}
.sdd-patch {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--sdd-soft);
  color: var(--ink);
  font: 11px/1.9 var(--mono);
  padding: 18px;
  white-space: pre;
  overflow: auto;
  overflow-wrap: normal;
  max-height: 580px;
}
.sdd-patch code {
  background: none;
  color: inherit;
  font: inherit;
}
.sdd-findings {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.sdd-findings legend {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 0;
  margin-bottom: 8px;
}
.sdd-findings > p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 15px;
}
.sdd-finding {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  padding: 12px;
  background: var(--white);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 8px;
  cursor: pointer;
}
.sdd-finding:has(input:checked) {
  border-color: var(--green);
  background: var(--sdd-emphasis);
}
.sdd-finding input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--green);
  margin: 3px 0 0;
}
.sdd-findings > .sdd-button {
  margin-top: 10px;
  width: 100%;
}
.sdd-review-feedback {
  border: 1px solid var(--green);
  padding: 24px;
  background: var(--sdd-soft);
  margin: 25px 0;
}
.sdd-review-feedback h3 {
  font-size: 24px;
  margin-bottom: 12px;
}
.sdd-review-feedback p,
.sdd-review-feedback li {
  font-size: 12px;
  line-height: 1.8;
}
.sdd-review-feedback p {
  color: var(--muted);
}
.sdd-review-feedback ul {
  padding-left: 18px;
  margin: 16px 0 0;
}
.sdd-review-feedback li {
  padding: 6px 0;
}
.sdd-review-feedback strong {
  font-weight: 600;
}
.sdd-contract-text {
  font-size: 12px;
  line-height: 1.85;
  padding: 0 18px 18px;
  max-width: 95ch;
}
.sdd-status {
  font-size: 12px;
  line-height: 1.7;
  color: var(--green);
  min-height: 24px;
  margin: 20px 0;
}
.sdd-footer {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.sdd-footer p {
  max-width: 90ch;
  line-height: 1.8;
}
.sdd-footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--green);
}
@media (max-width: 1100px) {
  .sdd-spec-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 20px;
  }
  .sdd-review-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sdd-patch {
    max-height: 480px;
  }
  .sdd-plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sdd-plan li:nth-child(2) {
    border-right: 0;
  }
  .sdd-plan li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 800px) {
  .sdd-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .sdd-schematic {
    max-width: 380px;
    width: 100%;
  }
  .sdd-spec-grid {
    grid-template-columns: 1fr;
  }
  .sdd-inspector {
    position: static;
    margin-top: 0;
  }
  .sdd-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }
  .sdd-steps {
    margin-bottom: 24px;
  }
  .sdd-step {
    font-size: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 10px;
  }
  .sdd-downloads {
    grid-template-columns: 1fr;
  }
  .sdd-downloads .sdd-actions {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .sdd-hero h1 {
    font-size: 37px;
  }
  .sdd-section-heading h2 {
    font-size: 28px;
  }
  .sdd-hero p,
  .sdd-section-heading p {
    font-size: 13px;
  }
  .sdd-step {
    padding: 10px 8px;
    font-size: 10px;
  }
  .sdd-field textarea,
  .sdd-field input {
    font-size: 16px;
    line-height: 1.65;
    padding: 11px;
  }
  .sdd-inspector {
    padding: 18px;
  }
  .sdd-checklist {
    grid-template-columns: 1fr;
  }
  .sdd-plan {
    grid-template-columns: 1fr;
  }
  .sdd-plan li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sdd-downloads {
    padding: 18px;
  }
  .sdd-downloads .sdd-button {
    width: 100%;
  }
  .sdd-patch {
    font-size: 10px;
    padding: 14px;
  }
  .sdd-review-feedback {
    padding: 18px;
  }
  .sdd-details summary span {
    display: block;
    margin-left: 0;
  }
  .sdd-bottom .sdd-button {
    width: 100%;
  }
  .sdd-button {
    font-size: 11px;
  }
}

.sdd-review-grid > div {
  min-width: 0;
}
.sdd-patch {
  max-width: 100%;
}
