/* foculoom.com software factory (v4, branch factory).
   Code-drawn CSS and inline SVG only: no imported art. Family colors only.
   The plant, line, machines and belt are decorative (aria-hidden). The
   two crates are the real links. Prefers-reduced-motion stops movement.
   A checkbox (no JS) falls back to the plain product list. */
#factory-plain-toggle{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

#what-we-make > h2{
  margin-top:1.1rem;
  margin-bottom:.45rem;
  /* Above .plant-saws (z-index 1) and .stacks (z-index 2 inside that
     context) so chimneys never cover heading text at any size or zoom. */
  position:relative;
  z-index:3;
}
/* At 1280 and above the page h2 is already 2rem at 100% text.
   A bare rem size (no vw/cqi/min cap) lets 200% text grow 2×. */
@media (min-width: 1280px){
  #what-we-make > h2{font-size:2rem}
}
.factory{margin-top:.25rem;padding-top:2.2rem}

/* The building. */
.plant{
  position:relative;
  min-width:0;
  max-width:100%;
  border:1px solid var(--border);
  border-top:0;
  /* Square: the floor strip below carries the rounded corners, and on the stone page a
     rounded plant edge would show a stone notch above it. */
  border-radius:0;
  background:var(--surface);
}
.plant-saws{
  display:flex;
  align-items:flex-end;
  height:4.4rem;
  margin:0 -1px;
  position:relative;
  z-index:1;
}
.plant-saws .saw{
  flex:1 1 0;
  height:4.4rem;
  background:var(--raised);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  position:relative;
  margin:0 -1px;
}
.plant-saws .saw::after{
  content:"";
  position:absolute;
  left:50%;
  top:52%;
  width:.7rem;
  height:.7rem;
  margin-left:-.35rem;
  background:var(--bg);
  border:1px solid var(--accent);
}
 .stacks{
  position:absolute;
  right:7%;
  bottom:100%;
  display:flex;
  gap:.55rem;
  align-items:flex-end;
  z-index:2;
}
.stack{
  position:relative;
  width:1.15rem;
  background:var(--border);
  border:1px solid var(--raised);
  border-bottom:0;
}
.stack-a{height:3.6rem}
.stack-b{height:2.6rem;width:.95rem}
.stack::before{
  /* Cap on the stack. */
  content:"";
  position:absolute;
  left:-.2rem;
  right:-.2rem;
  top:-.35rem;
  height:.35rem;
  background:var(--raised);
  border:1px solid var(--border);
}
.puff{
  position:absolute;
  left:50%;
  width:.7rem;
  height:.7rem;
  margin-left:-.35rem;
  border:1px solid var(--muted);
  border-radius:50%;
  background:transparent;
  opacity:0;
  animation:puff-rise 4s linear infinite;
}
.stack-a .puff:nth-child(1){animation-delay:0s}
.stack-a .puff:nth-child(2){animation-delay:1.3s}
.stack-a .puff:nth-child(3){animation-delay:2.6s}
.stack-b .puff:nth-child(1){animation-delay:.7s}
.stack-b .puff:nth-child(2){animation-delay:2s}
@keyframes puff-rise{
  0%{bottom:100%;opacity:0;transform:scale(.6)}
  15%{opacity:.85}
  100%{bottom:280%;opacity:0;transform:scale(1.3)}
}

/* Interior: hopper, line, dock. */
.plant-wall{
  display:grid;
  grid-template-columns:6.8rem minmax(0,1fr) 13.5rem;
  gap:0;
  min-width:0;
  max-width:100%;
  min-height:0;
  border-top:1px solid var(--border);
  background:var(--bg);
  align-items:stretch;
}
.plant-wall > *{
  min-width:0;
  max-width:100%;
}

/* Raw input. */
.hopper{
  position:relative;
  background:var(--raised);
  border-right:1px solid var(--border);
  overflow:hidden;
}
.hopper-bin{
  position:absolute;
  left:1rem;right:1rem;top:.7rem;
  height:4.2rem;
  background:var(--bg);
  border:1px solid var(--border);
  border-bottom:0;
  display:flex;
  flex-direction:column;
}
.hopper-slot{
  flex:1;
  border-bottom:1px solid var(--border);
  position:relative;
}
.hopper-slot::after{
  content:"";
  position:absolute;
  top:.2rem;bottom:.2rem;right:.25rem;
  width:32%;
  background:var(--accent);
  opacity:.7;
}
.hopper-slot:nth-child(2)::after{width:18%;right:42%}
.hopper-slot:nth-child(3)::after{width:22%;right:58%}
.hopper-chute{
  position:absolute;
  left:1.6rem;right:1.6rem;top:4.8rem;
  height:2.4rem;
  background:var(--border);
  clip-path:polygon(0 0,100% 0,72% 100%,28% 100%);
}
.hopper-stream{
  position:absolute;
  left:0;right:0;top:6.6rem;bottom:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.45rem;
  animation:hopper-fall 6s linear infinite;
}
@keyframes hopper-fall{
  from{transform:translateY(-40%)}
  to{transform:translateY(40%)}
}

/* Bits: code, pixels, notes. */
.bit,.work{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:var(--accent);
  font:700 .7rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.bit.code,.work.code{
  min-width:1.6rem;
  height:1.1rem;
  border:1px solid var(--accent);
  padding:0 .2rem;
  background:var(--bg);
}
.bit.pix,.work.pix{
  width:1.1rem;
  height:1.1rem;
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:1fr 1fr;
  gap:1px;
  border:1px solid var(--accent);
  background:var(--bg);
  padding:1px;
}
.bit.pix i,.work.pix i{
  display:block;
  background:var(--accent);
}
.bit.pix i:nth-child(2),.bit.pix i:nth-child(3),
.work.pix i:nth-child(2),.work.pix i:nth-child(3){background:var(--bg)}
.bit.note,.work.note{
  width:1.1rem;
  height:1.2rem;
  position:relative;
}
.bit.note::before,.work.note::before{
  content:"";
  position:absolute;
  left:.35rem;top:0;
  width:2px;height:.75rem;
  background:var(--accent);
}
.bit.note::after,.work.note::after{
  content:"";
  position:absolute;
  left:.15rem;bottom:0;
  width:.5rem;height:.35rem;
  background:var(--accent);
  border-radius:50%;
}

/* Machines + belt. */
.shop{
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:.7rem .7rem 0;
  position:relative;
  overflow:visible;
}
.machines{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.6rem;
  flex:1 1 auto;
  align-items:stretch;
  padding-bottom:.35rem;
  z-index:1;
}
.machine{
  background:var(--surface);
  border:1px solid var(--border);
  border-bottom-width:3px;
  border-radius:.15rem .15rem 0 0;
  padding:0;
  min-height:6.2rem;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-end;
  position:relative;
  overflow:visible;
}
.machine-riser{
  flex:1 1 auto;
  min-height:.45rem;
  position:relative;
  background:var(--bg);
  border-bottom:1px solid var(--border);
  box-shadow:inset 0 6px 0 0 var(--border);
}
.machine-riser::before,
.machine-riser::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width:6px;
  background:var(--border);
  border:1px solid var(--raised);
}
.machine-riser::before{left:22%}
.machine-riser::after{right:26%}
.machine-flank{display:none}
.machine svg{width:100%;height:auto;flex:0 0 auto;display:block;overflow:visible;aspect-ratio:80 / 100}
.machine .pencil{transform-origin:18px 60px;animation:pencil-draw 3s ease-in-out infinite}
.machine .cursor{animation:cursor-move 3s ease-in-out infinite}
.machine .gear-a{transform-origin:30px 44px;animation:gear-cw 4s linear infinite}
.machine .gear-b{transform-origin:52px 56px;animation:gear-ccw 4s linear infinite}
.machine .piston{animation:piston 1.2s ease-in-out infinite}
.machine .scan{animation:scan 2s linear infinite}
.machine .stamp{animation:stamp 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
/* A finished part leaves Ship, rides toward the dock, and lands in a crate. */
.ship-eject,
.crate-catch{
  position:absolute;
  width:16px;
  height:13px;
  background:var(--accent);
  border:1px solid var(--border);
  border-top-width:3px;
  border-top-color:var(--heading);
  box-sizing:border-box;
  pointer-events:none;
  z-index:4;
  opacity:0;
}
.ship-eject{
  left:auto;
  right:10%;
  bottom:1.15rem;
  margin-left:0;
  animation:ship-eject 13.5s linear infinite;
}
.crate-catch{
  left:.7rem;
  top:.55rem;
  animation:crate-catch 13.5s linear infinite;
}
.factory .crate:nth-child(2) .crate-catch{animation-delay:4.5s}
@keyframes pencil-draw{
  0%,100%{transform:rotate(0deg)}
  50%{transform:rotate(12deg)}
}
@keyframes cursor-move{
  0%,100%{transform:translate(0,0)}
  50%{transform:translate(-16px,10px)}
}
@keyframes gear-cw{to{transform:rotate(360deg)}}
@keyframes gear-ccw{to{transform:rotate(-360deg)}}
@keyframes piston{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(10px)}
}
@keyframes scan{
  0%{transform:translateY(0);opacity:1}
  100%{transform:translateY(32px);opacity:.3}
}
@keyframes stamp{
  0%,40%,100%{transform:translateY(0)}
  55%{transform:translateY(14px)}
}

.conveyor{
  position:relative;
  height:2.2rem;
  margin:0 -.8rem;
  background:var(--raised);
  border-top:3px solid var(--border);
  border-bottom:1px solid var(--border);
  overflow:hidden;
}
.conveyor::before{
  content:"";
  position:absolute;
  left:0;right:0;top:0;
  height:3px;
  background:var(--accent);
}
.conveyor-items{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:1.4rem;
  height:100%;
  padding:0 .8rem;
  width:max-content;
  animation:belt-travel 12s linear infinite;
}
@keyframes belt-travel{
  /* Rightward, toward Ship and the dock. The item list is duplicated so -50% loops. */
  from{transform:translateX(-50%)}
  to{transform:translateX(0)}
}
/* Three beats in 13.5s, locked to the staggered crate-catch delays. */
@keyframes ship-eject{
  0%,1%{opacity:0;transform:translate(0,-16px) scale(.6)}
  4%{opacity:1;transform:translate(0,0) scale(1)}
  9%{opacity:1;transform:translate(0,28px) scale(1)}
  16%{opacity:1;transform:translate(56px,36px) scale(1)}
  19%{opacity:0;transform:translate(80px,36px) scale(.8)}
  19.01%,33%{opacity:0;transform:translate(0,-16px) scale(.6)}
  36%{opacity:1;transform:translate(0,0) scale(1)}
  41%{opacity:1;transform:translate(0,28px) scale(1)}
  48%{opacity:1;transform:translate(56px,36px) scale(1)}
  51%{opacity:0;transform:translate(80px,36px) scale(.8)}
  51.01%,66%{opacity:0;transform:translate(0,-16px) scale(.6)}
  69%{opacity:1;transform:translate(0,0) scale(1)}
  74%{opacity:1;transform:translate(0,28px) scale(1)}
  81%{opacity:1;transform:translate(56px,36px) scale(1)}
  84%{opacity:0;transform:translate(80px,36px) scale(.8)}
  84.01%,100%{opacity:0;transform:translate(0,-16px) scale(.6)}
}
@keyframes crate-catch{
  0%,16%{opacity:0;transform:translateX(-24px) translateY(4px) scale(.5)}
  19%{opacity:1;transform:translateX(-8px) translateY(0) scale(.85)}
  24%,36%{opacity:1;transform:translateX(0) translateY(0) scale(1)}
  42%{opacity:0;transform:translateX(0) translateY(2px) scale(.7)}
  42.01%,100%{opacity:0;transform:translateX(0) translateY(2px) scale(.5)}
}

/* Finished product crates. */
.dock{
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  gap:.45rem;
  padding:.55rem .55rem .55rem;
  background:var(--surface);
  border-left:1px solid var(--border);
  justify-content:center;
  position:relative;
  min-width:0;
  max-width:100%;
}
.dock::before{
  /* Loading-bay opening. */
  content:"";
  position:absolute;
  left:0;top:.45rem;bottom:2.4rem;
  width:4px;
  background:var(--accent);
}
.factory .crate{
  margin:0;
  padding:.7rem .55rem .5rem;
  background:var(--raised);
  border:1px solid var(--border);
  border-top-width:5px;
  border-radius:.1rem .1rem .2rem .2rem;
  display:flex;
  flex-direction:column;
  flex-grow:0;
  gap:.2rem;
  min-width:44px;
  min-height:44px;
  max-width:100%;
  position:relative;
  text-decoration:none;
  color:inherit;
  box-sizing:border-box;
  container-type:inline-size;
}
.factory .crate::before{
  content:"";
  position:absolute;
  left:.4rem;right:.4rem;top:.28rem;
  height:3px;
  background:var(--border);
}
.factory .crate h3{font-size:1rem;margin:0}
.factory .crate p{font-size:.82rem;line-height:1.35;margin:0;color:var(--muted)}
.factory .crate > p:not(.status):not(.actions):not(.kicker){display:none}
.factory .crate .status{font-size:.62rem;padding:.1rem .4rem;margin:0 0 .15rem;max-width:100%;overflow-wrap:break-word;word-break:normal;-webkit-hyphens:auto;hyphens:auto}
.factory .crate .kicker{margin:0;font-size:.78rem;font-weight:600;color:var(--heading)}
.factory:has(#factory-plain-toggle:checked) .crate .kicker{font-size:.95rem;margin:0 0 .2rem}
.factory .crate .actions{margin:.3rem 0 0}
.factory .crate .button{
  display:block;
  width:100%;
  text-align:center;
  padding:.5rem .6rem;
  font-size:.9rem;
  overflow-wrap:break-word;
  word-break:normal;
  -webkit-hyphens:auto;
  hyphens:auto;
}
.factory .crate:focus-visible{
  border-color:var(--accent);
  outline:var(--focus-width) solid var(--focus-ring);
  outline-offset:2px;
}

.factory-floor{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:.35rem .7rem;
  padding:.35rem 1rem;
  min-height:2.4rem;
  border:1px solid var(--border);
  border-top:0;
  border-radius:0 0 .7rem .7rem;
  background:var(--surface);
}
.factory-hint{
  margin:0;
  font-size:.82rem;
  color:var(--muted);
  text-align:center;
}
.factory-hint[hidden]{display:none}
/* Keyboard hint stays off the first impression; show it while a crate has focus. */
.factory-js .factory:has(.plant:focus-within) .factory-hint[hidden]{display:block}
.factory-plain-toggle{
  font:inherit;
  font-size:.8rem;
  color:var(--accent);
  text-decoration:underline;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  min-width:44px;
  min-height:44px;
  padding:.55rem .7rem;
}
.factory-plain-toggle:focus-visible,
#factory-plain-toggle:focus-visible + .factory-plain-toggle{
  outline:var(--focus-width) solid var(--focus-ring);
  outline-offset:2px;
}
.factory-plain-toggle .label-factory{display:none}

/* Plain list: no plant chrome, the three cards as a list. */
.factory:has(#factory-plain-toggle:checked) .plant-saws,
.factory:has(#factory-plain-toggle:checked) .hopper,
.factory:has(#factory-plain-toggle:checked) .shop,
.factory:has(#factory-plain-toggle:checked) .factory-hint,
.factory:has(#factory-plain-toggle:checked) .dock::before{
  display:none;
}
.factory:has(#factory-plain-toggle:checked) .plant{
  border:0;
  background:none;
}
.factory:has(#factory-plain-toggle:checked) .plant-wall{
  display:block;
  min-height:0;
  background:none;
  border:0;
}
.factory:has(#factory-plain-toggle:checked) .dock{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
  padding:0 0 2.2rem;
  background:none;
  border:0;
}
.factory:has(#factory-plain-toggle:checked) .crate{
  padding:1.15rem 1.2rem 1.2rem;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:.7rem;
  animation:none;
}
.factory:has(#factory-plain-toggle:checked) .crate-catch,
.factory:has(#factory-plain-toggle:checked) .ship-eject{
  display:none;
}
.factory:has(#factory-plain-toggle:checked) .crate h3{font-size:1.2rem}
.factory:has(#factory-plain-toggle:checked) .crate > p:not(.status):not(.actions){display:block}
.factory:has(#factory-plain-toggle:checked) .crate p{font-size:1.06rem;line-height:1.7;color:var(--text)}
.factory:has(#factory-plain-toggle:checked) .crate .button{
  width:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  margin-top:auto;
  min-height:44px;
  padding:.85rem 1.2rem;
  font-size:1rem;
  line-height:1.2;
}
.factory:has(#factory-plain-toggle:checked) .factory-floor{
  justify-content:flex-start;
  background:none;
  border:0;
  padding:.2rem 0 0;
}
.factory:has(#factory-plain-toggle:checked) .label-list{display:none}
.factory:has(#factory-plain-toggle:checked) .label-factory{display:inline}

/* List view sits on the stone page, not the charcoal band. Re-point the
   focus token at the factory root so every focusable (crates, toggle, and
   anything later) draws the page ring --focus-ring-page on stone,
   not band gold (App Tester palettes-1126 M1, Nov 26, 2026). The toggle
   label uses the page link token for the same reason (VD-SIGNOFF.md H1). */
.factory:has(#factory-plain-toggle:checked) {
  --focus-ring: var(--focus-ring-page);
}
.factory:has(#factory-plain-toggle:checked) .factory-plain-toggle { color: var(--link-page); }
.factory:has(#factory-plain-toggle:checked) #factory-plain-toggle:focus-visible + .factory-plain-toggle { outline-color: var(--focus-ring-page); }

/* Phone: the whole plant, including both crates, stays in the first view. */
@media (max-width: 800px), (orientation: landscape) and (max-height: 540px){
  #what-we-make > h2{margin-top:.7rem;margin-bottom:.35rem}
  .factory{margin-top:.25rem;padding-top:1.35rem}
  .plant-saws{height:2.1rem}
  .plant-saws .saw{height:2.1rem}
  .plant-saws .saw::after{width:.4rem;height:.4rem;margin-left:-.2rem}
  .stacks{right:6%;bottom:100%;gap:.35rem}
  .stack-a{height:2.1rem;width:.8rem}
  .stack-b{height:1.5rem;width:.65rem}
  .puff{width:.45rem;height:.45rem;margin-left:-.225rem}
  .plant-wall{
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto auto;
    min-width:0;
    min-height:0;
  }
  .hopper{
    border-right:0;
    border-bottom:1px solid var(--border);
    height:4.2rem;
  }
  .hopper-bin{left:.7rem;top:.35rem;width:38%;right:auto;height:2.4rem}
  .hopper-chute{
    left:calc(38% + .7rem);right:auto;top:.35rem;
    width:1.6rem;height:2.4rem;
    clip-path:polygon(0 18%,100% 38%,100% 62%,0 82%);
  }
  .hopper-stream{
    left:calc(38% + 2.4rem);right:.4rem;top:0;bottom:0;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:center;
    gap:.5rem;
    animation:hopper-row 7s linear infinite;
  }
  @keyframes hopper-row{
    from{transform:translateX(-20%)}
    to{transform:translateX(20%)}
  }
  .shop{padding:.45rem .45rem 0}
  .machines{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:.3rem;
    padding-bottom:.25rem;
  }
  .machine{min-height:0;padding:0}
  .machine-riser{min-height:.3rem;box-shadow:inset 0 4px 0 0 var(--border)}
  .machine svg{height:auto;width:100%}
  @keyframes crate-catch{
    0%,16%{opacity:0;transform:translateY(-18px) scale(.5)}
    19%{opacity:1;transform:translateY(-6px) scale(.85)}
    24%,36%{opacity:1;transform:translateY(0) scale(1)}
    42%{opacity:0;transform:translateY(2px) scale(.7)}
    42.01%,100%{opacity:0;transform:translateY(2px) scale(.5)}
  }
  @keyframes ship-eject{
    0%,1%{opacity:0;transform:translate(0,-12px) scale(.6)}
    4%{opacity:1;transform:translate(0,0) scale(1)}
    9%{opacity:1;transform:translate(0,20px) scale(1)}
    16%{opacity:1;transform:translate(6px,32px) scale(1)}
    19%{opacity:0;transform:translate(6px,48px) scale(.8)}
    19.01%,33%{opacity:0;transform:translate(0,-12px) scale(.6)}
    36%{opacity:1;transform:translate(0,0) scale(1)}
    41%{opacity:1;transform:translate(0,20px) scale(1)}
    48%{opacity:1;transform:translate(6px,32px) scale(1)}
    51%{opacity:0;transform:translate(6px,48px) scale(.8)}
    51.01%,66%{opacity:0;transform:translate(0,-12px) scale(.6)}
    69%{opacity:1;transform:translate(0,0) scale(1)}
    74%{opacity:1;transform:translate(0,20px) scale(1)}
    81%{opacity:1;transform:translate(6px,32px) scale(1)}
    84%{opacity:0;transform:translate(6px,48px) scale(.8)}
    84.01%,100%{opacity:0;transform:translate(0,-12px) scale(.6)}
  }
  .conveyor{height:1.6rem;margin:0 -.45rem}
  .dock{
    flex-direction:row;
    flex-wrap:wrap;
    gap:.35rem;
    padding:.4rem .4rem .45rem;
    border-left:0;
    border-top:1px solid var(--border);
    min-width:0;
    max-width:100%;
  }
  .dock::before{left:.4rem;right:.4rem;top:0;bottom:auto;width:auto;height:3px}
  .factory .crate{padding:.55rem .3rem .35rem;flex:1 1 6rem;min-width:44px;max-width:100%}
  .factory .crate h3,
  .factory .crate .kicker{min-width:0;overflow-wrap:normal;word-break:normal}
  .factory .crate h3{font-size:.78rem}
  .factory .crate .status{font-size:.5rem;letter-spacing:.04em;padding:.05rem .25rem;min-width:0;max-width:100%;overflow-wrap:break-word;word-break:normal;-webkit-hyphens:auto;hyphens:auto}
  .factory .crate .button{font-size:1rem;padding:.38rem .25rem}
  .factory-floor{min-height:2.1rem;padding:.25rem .6rem}
  .factory:has(#factory-plain-toggle:checked) .dock{
    display:grid;
    grid-template-columns:1fr;
    gap:.85rem;
    padding:0 0 2rem;
    border:0;
  }
  .factory:has(#factory-plain-toggle:checked) .crate p{display:block}
  .factory:has(#factory-plain-toggle:checked) .crate{padding:1.15rem 1.2rem 1.2rem}
  .factory:has(#factory-plain-toggle:checked) .crate h3{font-size:1.2rem}
  .factory:has(#factory-plain-toggle:checked) .crate .button{font-size:1rem;padding:.85rem 1.2rem}
}

@media (max-width: 319px){
  /* Bring the top of the factory into the first screen at 188 without
     changing the 320 / 390 / 1280 layouts. padding-right: 2.5rem keeps
     glyphs off the stacks at 100% text. At 200% text the words are wider
     than the gap beside the chimneys, so margin-bottom uses rem minus px,
     floored at 2.4px so a smaller root cannot pull the factory up:
     2.4px at a 16px root (fold stays y=253.5) and 72.8px at a
     32px root so the plant, caps and stacks start below the last line.
     z-index: 3 on the base rule stays as a safety net. */
  #what-we-make > h2{
    margin-top:.3rem;
    margin-bottom:max(2.4px, calc(4.4rem - 68px));
    font-size:1.05rem;
    text-wrap:auto;
    padding-right:2.5rem;
  }
  .factory{margin-top:0;padding-top:.3rem}
  /* Crate titles, kickers and buttons wrap at spaces. Rem type scales
     at 200% text (WCAG 1.4.4); the crate reflows instead of freezing
     at the 16px-root size. Visit buttons stay at least 1rem. */
  .factory .crate,
  .factory .crate h3,
  .factory .crate .kicker,
  .factory .crate .button,
  .factory .crate .status{
    min-width:0;
    max-width:100%;
    overflow-wrap:break-word;
    word-break:normal;
    -webkit-hyphens:auto;
    hyphens:auto;
  }
  /* Stack the crates at 188 so Visit / status type at 200% can sit
     on a full-width row instead of mid-breaking “Noraze” or “DEVELOPMENT”. */
  .dock{
    flex-direction:column;
    flex-wrap:nowrap;
    /* Cap 200% rem padding so the stacked crate stays wide enough
       for “Noraze” and “DEVELOPMENT” at 1rem / .5rem. At a 16px root
       the caps equal the 800px-query .4rem padding, so 188/100% is unchanged. */
    padding:min(.4rem, 6.4px) min(.4rem, 6.4px) min(.45rem, 7.2px);
  }
  .factory .crate{
    padding:min(.55rem, 8.8px) min(.3rem, 4.8px) min(.35rem, 5.6px);
    flex:1 1 auto;
    width:100%;
    max-width:100%;
  }
  .factory .crate .button{
    letter-spacing:-0.02em;
  }
  .factory .crate h3,
  .factory .crate .kicker{
    font-size:.78rem;
  }
  .factory .crate .button{
    font-size:1rem;
    /* No side padding at 188 so 200% 1rem “Noraze” / “Studio” fit a line. */
    padding:.38rem 0;
    overflow-wrap:normal;
  }
  .factory .crate .status{
    font-size:.5rem;
    letter-spacing:0;
    padding:.05rem 0;
    -webkit-hyphens:auto;
    hyphens:auto;
    overflow-wrap:normal;
  }
}

@media (prefers-reduced-motion:reduce){
  .puff,.hopper-stream,.conveyor-items,
  .machine .pencil,.machine .cursor,.machine .gear-a,.machine .gear-b,
  .machine .piston,.machine .scan,.machine .stamp,
  .ship-eject,
  .crate-catch,
  .factory .crate:nth-child(1) .crate-catch,
  .factory .crate:nth-child(2) .crate-catch{
    animation:none;
  }
  .puff,.ship-eject,.crate-catch{opacity:0;visibility:hidden}
}

/* Short landscape (e.g. 844x390): tighten the compact plant so the Visit crates stay in the first view. */
@media (orientation: landscape) and (max-height: 540px){
  /* Beat the inlined family chrome (.lede / h2 / main) so the short plant starts higher. */
  main.wrap{padding-top:.85rem;padding-bottom:1rem}
  p.lede{font-size:.88rem;line-height:1.25;margin-bottom:.1rem;max-width:none;white-space:normal;overflow-wrap:break-word;word-break:normal}
  #what-we-make > h2{margin:.15rem 0 .05rem;font-size:1.05rem}
  .factory{margin-top:0;padding-top:.45rem}
  .plant-saws,.plant-saws .saw{height:1rem}
  .stack-a{height:1.1rem;width:.65rem}
  .stack-b{height:.8rem;width:.5rem}
  .plant,
  .plant-wall,
  .shop,
  .machines,
  .factory{
    min-width:0;
    max-width:100%;
    overflow-x:hidden;
  }
  .plant-wall{
    grid-template-columns:5rem minmax(0,1fr);
    grid-template-rows:auto auto;
  }
  .hopper{
    grid-row:1;
    border-right:1px solid var(--border);
    border-bottom:0;
    height:auto;
    min-height:0;
  }
  .hopper-bin{height:1.8rem;top:.25rem}
  .hopper-chute{height:1.8rem;top:.25rem}
  .shop{grid-row:1;padding:.15rem .3rem 0}
  .dock{
    grid-column:1 / -1;
    flex-direction:row;
    flex-wrap:wrap;
    padding:.15rem .3rem .2rem;
  }
  /* Four machines use the row; no empty gold side-housings. Each bay
     keeps the 80×100 art aspect so labels stay readable. */
  .machines{
    display:flex;
    justify-content:space-evenly;
    align-items:stretch;
    gap:.35rem;
    padding-bottom:.08rem;
  }
  .machine-riser,
  .machine-flank{display:none}
  .machine{
    flex:1 1 0;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-end;
    width:auto;
    min-width:0;
    height:auto;
    min-height:0;
    max-height:5.5rem;
    aspect-ratio:80 / 100;
    padding:0;
  }
  .machine svg{
    flex:1 1 auto;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    aspect-ratio:80 / 100;
  }
  .ship-eject{bottom:.2rem}
  @keyframes ship-eject{
    0%,1%{opacity:0;transform:translate(0,-10px) scale(.6)}
    4%{opacity:1;transform:translate(0,0) scale(1)}
    9%{opacity:1;transform:translate(0,16px) scale(1)}
    16%{opacity:1;transform:translate(8px,28px) scale(1)}
    19%{opacity:0;transform:translate(8px,40px) scale(.8)}
    19.01%,33%{opacity:0;transform:translate(0,-10px) scale(.6)}
    36%{opacity:1;transform:translate(0,0) scale(1)}
    41%{opacity:1;transform:translate(0,16px) scale(1)}
    48%{opacity:1;transform:translate(8px,28px) scale(1)}
    51%{opacity:0;transform:translate(8px,40px) scale(.8)}
    51.01%,66%{opacity:0;transform:translate(0,-10px) scale(.6)}
    69%{opacity:1;transform:translate(0,0) scale(1)}
    74%{opacity:1;transform:translate(0,16px) scale(1)}
    81%{opacity:1;transform:translate(8px,28px) scale(1)}
    84%{opacity:0;transform:translate(8px,40px) scale(.8)}
    84.01%,100%{opacity:0;transform:translate(0,-10px) scale(.6)}
  }
  @keyframes crate-catch{
    0%,16%{opacity:0;transform:translateY(-18px) scale(.5)}
    19%{opacity:1;transform:translateY(-6px) scale(.85)}
    24%,36%{opacity:1;transform:translateY(0) scale(1)}
    42%{opacity:0;transform:translateY(2px) scale(.7)}
    42.01%,100%{opacity:0;transform:translateY(2px) scale(.5)}
  }
  .conveyor{height:1.05rem;margin:0 -.3rem}
  .factory .crate{
    flex-direction:column;
    flex-wrap:nowrap;
    align-items:stretch;
    justify-content:space-between;
    padding:.1rem .3rem;
    min-height:44px;
    gap:.25rem;
    min-width:0;
    flex:1 1 12rem;
  }
  .factory .crate::before{display:none}
  .factory .crate .status{display:none}
  /* Rem type, wrap at spaces, no nowrap or ellipsis. Stack the
     kicker, title and Visit button so 200% text can grow. */
  .factory .crate h3,
  .factory .crate .kicker,
  .factory .crate .button{
    min-width:0;
    max-width:100%;
    overflow-wrap:break-word;
    word-break:normal;
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
  }
  .factory .crate h3{font-size:.8rem;margin:0}
  .factory .crate .kicker{font-size:.78rem}
  .factory .crate .button{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    width:auto;
    max-width:100%;
    min-width:44px;
    min-height:44px;
    box-sizing:border-box;
    font-size:1rem;
    padding:.15rem .45rem;
    line-height:1.15;
    text-align:center;
  }
  .factory-floor{min-height:44px;padding:0 .4rem}
  .factory:has(#factory-plain-toggle:checked) .plant-wall{display:block}
  .factory:has(#factory-plain-toggle:checked) .dock{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-column:auto;
  }
  .factory:has(#factory-plain-toggle:checked) .crate .button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:auto;
    min-height:44px;
    padding:.85rem 1.2rem;
    font-size:1rem;
  }
}

/* Narrow short landscape (e.g. 667x375): keep the lede on one line and the Visit row in the first view. */
@media (orientation: landscape) and (max-height: 540px) and (max-width: 720px){
  p.lede{font-size:.78rem;line-height:1.2;white-space:normal;overflow:visible;text-overflow:unset;overflow-wrap:break-word;word-break:normal}
  .machine{height:auto;min-height:0;max-height:4.75rem;min-width:0;flex:1 1 0}
  .dock{flex-direction:column;flex-wrap:nowrap}
  .factory .crate{flex:1 1 auto;width:100%}
  .factory .crate .button{font-size:1rem;padding:.12rem .35rem}
}

/* Taller short landscape (e.g. 926x428): give the four machines more of the leftover height. */
@media (orientation: landscape) and (min-height: 400px) and (max-height: 540px){
  .machine{height:6rem;min-height:6rem;max-height:6rem}
}
