.work-section, .lab-section, .system-section {
  padding: clamp(48px, 6.5vw, 96px) var(--side, clamp(20px, 5vw, 88px));
}
.work-wrap { max-width: 1440px; margin-inline: auto; }
.work-section, .lab-section { color: var(--ink); background: var(--paper); }
.work-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid #a8aea2;
}
.work-heading h2, .lab-intro h2, .system-section h2 {
  margin: 0;
  font: 700 clamp(44px, 5.7vw, 82px)/.98 var(--display);
  letter-spacing: -.045em;
}
.work-heading h2 span, .lab-intro h2 span { color: var(--rust); }
.hosted-openclaw { scroll-margin-top: 6rem; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(2rem, 6vw, 5rem) var(--side); background: #e5ded0; color: var(--ink); }
.hosted-openclaw h2 { margin: .35rem 0 1rem; font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1.05; letter-spacing: -.045em; }
.hosted-openclaw p { max-width: 54ch; line-height: 1.55; }
.hosted-openclaw a { display: inline-block; margin-top: 12px; color: var(--rust); font-weight: 700; text-underline-offset: .23em; }
.hosted-openclaw .openclaw-kicker { font: 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.openclaw-plan { border-left: 2px solid var(--rust); padding-left: 1.5rem; }
.openclaw-plan strong { display: block; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.2; }
@media (max-width: 720px) { .hosted-openclaw { grid-template-columns: 1fr; gap: 1.25rem; } }
.work-feature {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(30px, 6vw, 88px);
  padding: clamp(24px, 3.3vw, 52px) 0;
}
.work-story h3 {
  margin: 0;
  font: 700 clamp(32px, 3.4vw, 54px)/1 var(--display);
  letter-spacing: -.035em;
}
.work-feature h3 { font-size: clamp(44px, 5.2vw, 82px); }
.work-feature .harness-capture { max-width: 330px; margin-top: 24px; }
.work-feature .harness-capture .capture-zoom { aspect-ratio: 2.45; padding: 8px 4% 0; }
#try-harness { scroll-margin-block: 24px; }
.work-story p:not(.work-kicker), .lab-intro p, .lab-body > p {
  margin: 16px 0 20px;
  max-width: 58ch;
  color: #47544a;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
}
.work-kicker, .system-caption {
  margin: 0 0 14px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.work-kicker { color: var(--rust); }
.work-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid currentColor;
  padding: 4px 0;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.work-link span { color: var(--rust); }
.work-link:hover { color: var(--rust); }
.work-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  border-top: 1px solid #babeb4;
  padding-top: clamp(24px, 3.3vw, 52px);
}
.work-entry .work-story { padding-top: 22px; }
.product-gallery { margin: 0; min-width: 0; }
.capture-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.capture-zoom img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}
.work-section .capture-zoom {
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  aspect-ratio: 1.94;
  padding: clamp(18px, 2.4vw, 38px) 8% 0;
  background: linear-gradient(130deg, #e7cdac, #f4ddbb 58%, #d8ba94);
  border: 1px solid #d5c2a7;
  border-radius: 6px;
}
.work-section .capture-zoom img {
  min-height: 0;
  align-self: start;
  box-shadow: 0 8px 25px #271d1740;
  border: 1px solid #21252130;
}
.work-entry:nth-child(1) .capture-zoom { background: #cee0d6; border-color: #b9cfc4; }
.work-entry:nth-child(2) .capture-zoom { background: #dad6e6; border-color: #c5bfd5; }
.capture-zoom::after {
  content: '⤢';
  position: absolute;
  inset: auto 10px 10px auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #10201de8;
  color: #fff;
  border: 1px solid #ffffff5e;
  border-radius: 4px;
  font: 20px/1 Arial, sans-serif;
}
.capture-zoom:hover::after, .capture-zoom:focus-visible::after { background: #ac4124; }
.product-gallery [role=group] { display: flex; flex-wrap: wrap; align-items: center; gap: 0 15px; }
.product-gallery [data-capture] {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 0 7px;
  background: transparent;
  color: #586159;
  font: 500 12px/1.4 var(--mono);
  cursor: pointer;
}
.product-gallery [data-capture]:hover { color: var(--rust); }
.product-gallery [data-capture][aria-pressed=true] { color: var(--ink); border-color: var(--rust); }
.work-split {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 8vw, 130px);
}
.system-section { color: #f5f1e8; background: #162d27; }
.system-section .work-split { grid-template-columns: minmax(0, .74fr) minmax(0, 1.25fr); align-items: center; gap: clamp(28px, 5vw, 76px); }
.system-section h2 em { color: #d6dfa9; font-style: normal; }
.system-section .work-kicker, .system-section .work-link span { color: #d6dfa9; }
.system-section .work-story > p:not(.work-kicker) { color: #cbd3c9; }
.system-section .work-link:hover { color: #d6dfa9; }
.system-rack {
  min-width: 0;
  margin: 0;
  padding: 0;
  container-type: inline-size;
  border: 1px solid #617568;
  border-radius: 6px;
  background: #132520;
  overflow: hidden;
}
.system-legend {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.system-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px clamp(12px, 3cqi, 26px);
  margin: 0;
  border-bottom: 1px solid #51695a;
  color: #d9e4c7;
  background: #263c32;
  font-size: 10px;
}
.routing-board {
  --rail: #879b6e;
  --pitch: 59px;
  display: grid;
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr) minmax(82px, .75fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, var(--pitch));
  align-items: center;
  padding: 22px clamp(12px, 3cqi, 26px);
  background-color: #172f28;
  background-image: radial-gradient(#839d824d .9px, transparent 1px);
  background-size: 10px 10px;
}
.routing-board::before {
  content: '';
  position: absolute;
  top: calc(50% - var(--pitch));
  left: 50%;
  width: 1px;
  height: calc(2 * var(--pitch));
  background: var(--rail);
}
.board-hub {
  grid-column: 2;
  grid-row: 2;
  z-index: 2;
  justify-self: center;
  position: relative;
  padding: 12px clamp(5px, 1.4cqi, 18px);
  border: 1px solid #a9b98e;
  outline: 3px solid #172f28;
  box-shadow: inset 0 0 0 3px #2f483a;
  background: #c4d2aa;
  color: #20342b;
  text-align: center;
}
.board-hub span { display: block; margin-bottom: 3px; font: 10px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.board-hub strong { display: block; font-size: clamp(14px, 2.6cqi, 18px); line-height: 1.15; }
.board-port {
  position: relative;
  display: flex;
  min-height: 42px;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  padding: 6px clamp(7px, 1.7cqi, 14px);
  border: 1px solid #758d77;
  border-radius: 3px;
  background: #203b31;
  color: #f2f5e7;
  cursor: pointer;
}
.board-port::before {
  content: '';
  position: absolute;
  height: 1px;
  top: 50%;
  width: calc(40% + 2px);
  background: var(--rail);
  pointer-events: none;
}
.port-search, .port-automation, .port-media { grid-column: 1; }
.port-memory, .port-publishing, .port-files { grid-column: 3; }
.port-search::before, .port-automation::before, .port-media::before { left: 100%; }
.port-memory::before, .port-publishing::before, .port-files::before { right: 100%; }
.port-search, .port-memory { grid-row: 1; }
.port-automation, .port-publishing { grid-row: 2; }
.port-media, .port-files { grid-row: 3; }
.board-port input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.port-title { font-size: clamp(12px, 2.4cqi, 15px); line-height: 1.2; font-weight: 650; }
.port-count { min-width: 1.7em; padding: 2px 3px; border: 1px solid currentColor; border-radius: 2px; text-align: center; font: 12px/1.2 var(--mono); }
.board-port:hover { border-color: #e0eac8; }
.board-port:has(input:checked) { --rail: #f2aa7a; color: #192a23; background: #f2aa7a; border-color: #f2aa7a; }
.board-port:has(input:focus-visible) { outline: 3px solid white; outline-offset: 3px; }
.board-output { padding: 16px clamp(12px, 3cqi, 26px) 18px; border-top: 1px solid #51695a; }
.server-group h3 { margin: 0 0 4px; font: 650 17px/1.3 var(--display); letter-spacing: 0; }
.server-group p { margin: 0; color: #d2ddd2; font-size: 14px; line-height: 1.5; }
.server-group ul { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 12px 0 0; list-style: none; }
.server-group li { padding: 3px 6px; background: #253d31; border: 1px solid #49624e; border-radius: 2px; color: #dce7ca; font: 11px/1.4 var(--mono); overflow-wrap: anywhere; }
@supports selector(:has(*)) {
  .server-group { display: none; }
  .system-rack:has(.port-search input:checked) #servers-search,
  .system-rack:has(.port-memory input:checked) #servers-memory,
  .system-rack:has(.port-automation input:checked) #servers-automation,
  .system-rack:has(.port-publishing input:checked) #servers-publishing,
  .system-rack:has(.port-media input:checked) #servers-media,
  .system-rack:has(.port-files input:checked) #servers-files { display: block; }
}
@container (max-width: 390px) {
  .routing-board { grid-template-columns: 1fr 1fr; grid-template-rows: auto repeat(3, auto); gap: 10px; padding-top: 16px; padding-bottom: 16px; }
  .routing-board::before { top: 18px; height: calc(100% - 55px); }
  .board-hub { grid-column: 1 / -1; grid-row: 1; padding: 6px 16px; }
  .board-hub span { display: none; }
  .port-memory, .port-publishing, .port-files { grid-column: 2; }
  .port-search, .port-memory { grid-row: 2; }
  .port-automation, .port-publishing { grid-row: 3; }
  .port-media, .port-files { grid-row: 4; }
  .board-port::before { width: 6px; }
}
@media (max-width: 940px) {
  .system-section .work-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
.lab-index summary {
  display: grid;
  align-items: baseline;
  gap: 6px 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  list-style: none;
  cursor: pointer;
}
.lab-index summary::-webkit-details-marker { display: none; }
.lab-index summary::after { content: '+'; font: 20px/1 var(--mono); }
.lab-index details[open] > summary::after { content: '−'; }
.lab-section { border-bottom: 1px solid #c4c7bc; }
.lab-intro p { max-width: 39ch; }
.lab-index details { border-top: 1px solid #b0b8ab; }
.lab-index details:last-child { border-bottom: 1px solid #b0b8ab; }
.lab-index summary { padding: 17px 0; }
.lab-index summary span { font-weight: 700; font-size: clamp(19px, 1.7vw, 27px); letter-spacing: -.03em; }
.lab-index summary small { color: #59655b; font: 11px/1.4 var(--mono); }
.lab-index summary::after { color: var(--rust); }
.lab-body { padding: 0 0 24px; }
.lab-body > p { margin-top: 0; font-size: 15px; }
.lab-body .product-gallery { max-width: 520px; }
.lab-body .work-link { margin-top: 12px; }
@media (max-width: 760px) {
  .work-heading { padding-bottom: 15px; }
  .work-feature, .work-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .work-split { gap: 28px; }
  .work-feature .work-story { max-width: 58ch; }
  .lab-intro p { max-width: 58ch; margin-bottom: 0; }
}
@media (max-width: 580px) {
  .work-pair { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .work-entry .work-story { padding-top: 16px; }
  .lab-index summary { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .lab-index summary small { grid-area: 2 / 1; }
  .lab-index summary::after { grid-area: 1 / 2; }
}
