.factory-page { background: #eff0f0; }
.factory-main {
  padding-block: calc(var(--header-height) + 48 * var(--u)) calc(58 * var(--u));
  line-height: max(25px, calc(28 * var(--u)));
}
.factory-page-intro h1 { font-size: calc(44 * var(--u)); line-height: calc(56 * var(--u)); font-weight: 400; }
.factory-page-intro > p { margin-top: calc(12 * var(--u)); color: var(--muted); }
.local-nav { display: flex; flex-wrap: wrap; gap: 0 calc(28 * var(--u)); margin-top: calc(12 * var(--u)); }
.local-nav a, .config-entry, .factory-footer a {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  min-height: max(44px, calc(44 * var(--u)));
}
.local-nav img, .config-entry img, .factory-footer img { width: calc(18 * var(--u)); height: auto; }
.factory-cover-photo { margin-top: calc(18 * var(--u)); }
.factory-wide { width: 100%; aspect-ratio: 1312 / 480; object-fit: cover; }
.factory-cover-photo figcaption {
  margin-top: calc(8 * var(--u));
  color: var(--muted);
  font-size: max(14px, calc(14 * var(--u)));
  line-height: max(22px, calc(22 * var(--u)));
  text-align: right;
}
.factory-section { border-top: 1px solid var(--rule); margin-top: calc(72 * var(--u)); padding-top: calc(28 * var(--u) - 1px); }
.smart-factory { margin-top: calc(17 * var(--u)); }
.factory-section h2 { font-size: calc(28 * var(--u)); line-height: calc(36 * var(--u)); font-weight: 400; }
.factory-section h3 { font-size: max(17px, calc(18 * var(--u))); line-height: max(25px, calc(28 * var(--u))); }
.factory-muted, figcaption, .ability-list p { color: var(--muted); }
.factory-deck { margin-top: calc(8 * var(--u)); }
.factory-split { display: grid; grid-template-columns: minmax(0, 421.333fr) minmax(0, 866.667fr); gap: var(--gutter); }
.factory-stat-layout { margin-top: calc(16 * var(--u)); padding-bottom: calc(10 * var(--u)); }
.factory-id h3 { display: flex; align-items: baseline; gap: calc(9 * var(--u)); font: inherit; font-size: calc(28 * var(--u)); line-height: calc(36 * var(--u)); }
.factory-version { font-size: calc(48 * var(--u)); line-height: 1.25; }
.factory-id p { margin-top: calc(12 * var(--u)); }
.factory-story { padding-top: calc(96 * var(--u)); }
.factory-story > p { max-width: calc(798 * var(--u)); text-wrap: pretty; }
.factory-story > p + p { margin-top: 12px; }
.factory-phrase { white-space: nowrap; }
.factory-stat-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: calc(18 * var(--u)); }
.factory-stat-list > div { display: grid; align-content: start; }
.factory-stat-value { grid-row: 1; display: flex; align-items: baseline; gap: calc(8 * var(--u)); line-height: 1.25; font-size: calc(46 * var(--u)); white-space: nowrap; }
.factory-stat-value small { color: var(--muted); font-size: calc(23 * var(--u)); }
.factory-stat-list dt, .process-photos figcaption, .process-detail-photo figcaption, .certificate-row figcaption, .system-certifications > p, .factory-footer p {
  font-size: max(14px, calc(16 * var(--u)));
  line-height: max(22px, calc(24 * var(--u)));
}
.factory-stat-list dt { margin-top: calc(12 * var(--u)); color: var(--muted); }
.process-photos {
  display: grid;
  grid-template-columns: minmax(0, 755fr) minmax(0, 533fr);
  gap: var(--gutter);
  margin-top: calc(28 * var(--u));
}
.process-photos img, .process-detail-photo img { width: 100%; object-fit: cover; }
.process-main-image img { aspect-ratio: 755 / 460; }
.process-photos figcaption, .process-detail-photo figcaption { margin-top: 9px; }
.process-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: clamp(14px, 1.25vw, 26px) var(--gutter);
}
.process-secondary img { aspect-ratio: 254 / 179; }
.process-wide { grid-column: 1 / -1; }
.process-wide img { aspect-ratio: 533 / 230; }
.process-intro {
  margin-top: clamp(34px, 4vw, 72px);
  padding-top: clamp(22px, 2.3vw, 36px);
  border-top: 1px solid var(--rule);
}
.process-intro h3 { font-size: clamp(21px, 1.65vw, 30px); margin-bottom: 8px; font-weight: 400; }
.process-intro > p { max-width: 74ch; text-wrap: pretty; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 0 var(--gutter);
  margin-top: clamp(22px, 2.8vw, 46px);
}
.process-step { border-top: 1px solid var(--rule); }
.process-step summary {
  list-style: none;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  align-items: center;
  gap: clamp(10px, 1.05vw, 20px);
  padding: 18px 2px;
  min-height: 92px;
  cursor: pointer;
}
.process-step summary::-webkit-details-marker { display: none; }
.process-step summary:hover, .process-step summary:focus-visible { background: rgba(32, 36, 36, .045); }
.process-step strong { display: block; font-size: clamp(16px, 1.15vw, 21px); font-weight: 500; line-height: 1.45; }
.process-step small { display: block; font-size: clamp(13px, .86vw, 16px); color: var(--muted); line-height: 1.5; margin-top: 5px; }
.process-icon { width: 32px; height: 32px; color: #4f595a; }
.process-toggle { position: relative; width: 12px; height: 12px; color: var(--muted); }
.process-toggle::before, .process-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 1px solid currentColor;
}
.process-toggle::after { transform: rotate(90deg); }
.process-step[open] .process-toggle::after { transform: none; }
.process-step-copy {
  color: var(--muted);
  font-size: clamp(14px, .9vw, 17px);
  line-height: 1.75;
  padding: 0 2px 22px;
}
.process-step-copy .factory-stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.process-step-copy .factory-stat-value { font-size: clamp(22px, 1.8vw, 38px); gap: 5px; }
.process-step-copy .factory-stat-value small { display: inline; font-size: .62em; }
.process-step-copy .factory-stat-list dt { margin-top: 5px; }
.process-detail-photo { margin-top: 14px; }
.process-detail-photo img { aspect-ratio: 1.75; object-position: center 58%; }
@media (max-width: 1000px) {
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .process-photos { grid-template-columns: minmax(0, 1fr); }
  .process-intro { gap: 14px; }
}
@media (max-width: 550px) {
  .process-steps { grid-template-columns: minmax(0, 1fr); }
  .process-step summary { min-height: 76px; }
}
@media (max-width: 1140px) {
  .factory-stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
}
#capabilities { margin-top: calc(76 * var(--u)); }
.ability-layout { margin-top: calc(72 * var(--u)); }
.ability-intro { max-width: calc(310 * var(--u)); }
.ability-intro h3 { font-size: calc(28 * var(--u)); line-height: calc(36 * var(--u)); font-weight: 400; }
.ability-intro p, .config-entry { margin-top: calc(12 * var(--u)); }
.ability-details { padding-top: calc(192 * var(--u)); }
.ability-list li { padding-block: calc(24 * var(--u)) calc(25.5 * var(--u)); box-shadow: inset 0 -1.5px var(--rule); }
.ability-list p { margin-top: calc(12 * var(--u)); }
.system-certifications { margin-top: calc(39 * var(--u)); }
.certificate-row {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  max-width: calc(354 * var(--u));
  gap: calc(18 * var(--u));
  margin-block: calc(20 * var(--u));
}
.certificate-row img { width: 100%; aspect-ratio: 94 / 128; object-fit: contain; }
.certificate-row figcaption { display: grid; gap: calc(8 * var(--u)); margin-top: calc(8 * var(--u)); }
.certificate-row strong { color: var(--ink); font-weight: 400; }
.system-certifications > p { max-width: calc(583 * var(--u)); }
.factory-footer {
  display: grid;
  grid-template-columns: minmax(0,1010fr) minmax(0,278fr);
  align-items: start;
  gap: var(--gutter);
  margin-top: calc(63 * var(--u));
  border-top: 1px solid var(--rule);
  padding-top: calc(24 * var(--u));
}
.factory-footer p { color: var(--muted); }
.factory-footer a { justify-self: start; }
@media (max-width: 1080px) {
  .factory-footer { grid-template-columns: 1fr auto; }
}
@media (max-width: 800px) {
  .factory-main { padding-block: calc(var(--header-height) + 24px) 34px; }
  .factory-cover-photo { margin-top: 18px; }
  .factory-wide { aspect-ratio: 2 / 1; }
  .factory-section, #capabilities { margin-top: 43px; }
  .smart-factory { margin-top: 14px; }
  .factory-split { grid-template-columns: minmax(0,1fr); }
  .factory-story, .ability-details { padding-top: 0; }
  .factory-stat-list { gap: 16px 10px; }
  .factory-stat-value { font-size: clamp(25px, 7.5vw, 56px); gap: 5px; }
  .factory-stat-value small { font-size: clamp(14px, 4.1vw, 24px); }
  .ability-layout { margin-top: 36px; }
  .system-certifications { margin-top: 30px; }
  .factory-footer { margin-top: 42px; }
}

/* Keep the current phone layout while reviewing the desktop revision. */
.process-scene-info, .process-scene-desktop-caption { display: none; }

@media (min-width: 801px) {
  .factory-page .factory-page-intro .local-nav a[data-desktop-hidden] { display: none; }
  .factory-cover-photo .factory-wide { aspect-ratio: 1700 / 684; }
  .factory-cover-photo > figcaption { display: none; }
  .factory-story > p {
    font-size: 16px;
    line-height: 1.85;
    color: #4f5456;
  }
  .factory-story > .factory-stat-list {
    margin-top: clamp(44px, 4vw, 72px);
  }
  .process-intro > p {
    justify-self: end;
    max-width: 70ch;
    font-size: 16px;
    line-height: 1.85;
  }
  .process-scene {
    position: relative;
    overflow: hidden;
  }
  .process-scene picture { display: block; }
  .process-scene img { transition: transform .5s ease, filter .5s ease; }
  .process-scene-info {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 110px;
    padding: 34px 24px 22px;
    color: #fff;
    background: linear-gradient(transparent, rgba(16, 23, 26, .83));
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    pointer-events: none;
  }
  .process-scene-copy strong, .process-scene-copy small { display: block; }
  .process-scene-copy strong { font-size: 18px; line-height: 1.45; font-weight: 500; }
  .process-scene-copy small { margin-top: 5px; font-size: 14px; line-height: 1.5; opacity: .86; }
  .process-scene-info .process-icon { color: currentColor; width: 32px; height: 32px; }
  .process-secondary .process-scene-info {
    min-height: 82px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    padding: 26px 14px 13px;
  }
  .process-secondary .process-scene-info .process-icon { width: 24px; height: 24px; }
  .process-secondary .process-scene-copy strong { font-size: 14px; }
  .process-secondary .process-scene-copy small { font-size: 12px; margin-top: 3px; }
  .process-scene[data-expanded] img { transform: scale(1.045); filter: brightness(.91); }
  .process-scene[data-expanded] .process-scene-info {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  .process-scene:focus-visible { outline: 2px solid #4f595a; outline-offset: 4px; }
  .process-scene-original-caption { display: none; }
  .process-scene-desktop-caption { display: inline; }
  .process-step > summary {
    grid-template-columns: 32px minmax(0, 1fr);
    cursor: default;
  }
  .process-step .process-toggle { display: none; }
  .process-step[open] > summary { color: #202020; }
  .process-step[open] .process-step-copy { animation: process-content-reveal .2s ease-out; }
  @keyframes process-content-reveal {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .process-scene img, .process-scene-info { transition: none; }
  .process-step[open] .process-step-copy { animation: none; }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .process-secondary .process-scene-info {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    padding: 14px 10px 10px;
  }
  .process-secondary .process-scene-info .process-icon { width: 20px; height: 20px; }
  .process-secondary .process-scene-copy strong { font-size: 12px; line-height: 1.35; }
  .process-secondary .process-scene-copy small { font-size: 11px; line-height: 1.35; }
}

@media (min-width: 801px) {
  .process-steps {
    row-gap: 18px;
    column-gap: clamp(24px, 2.3vw, 36px);
  }
}
