
/* ---------- pipeline ---------- */
.chain { margin-top: 40px; border: 1px solid var(--faint); }
.chain-steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--faint); position: relative; }
.chain-steps li + li { border-left: 1px solid var(--line); }
.chain-steps button {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left; color: var(--dim);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; position: relative;
}
.chain-steps button b { font-family: var(--sans); font-size: 16px; font-weight: 600; }
.chain-steps button::after {
  content: "→"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--faint); font-size: 14px;
}
.chain-steps li:last-child button::after { content: none; }
.chain-steps button:hover { color: var(--ink); }
.chain-steps button.done { color: var(--ink); }
.chain-steps button.done .mono { color: var(--dim); }
.chain-steps button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--hot); background: var(--surface); }
.chain-steps button[aria-selected="true"] .mono { color: var(--hot); }
.chain-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; padding: 28px; }
.chain-detail h3 { font-size: 26px; font-weight: 600; font-stretch: 85%; margin: 8px 0 10px; }
.chain-detail p { color: var(--dim); font-size: 16px; line-height: 1.6; }
.chain-meta { display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--line); padding-left: 28px; }
.chain-meta p { color: var(--ink); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { font-family: var(--mono); font-size: 12px; border: 1px solid var(--faint); padding: 5px 9px; }

/* ---------- dieline demo ---------- */
.die { margin-top: 40px; display: grid; grid-template-columns: 260px 1fr; border: 1px solid var(--faint); }
.die-controls { padding: 22px; border-right: 1px solid var(--faint); display: flex; flex-direction: column; gap: 18px; }
.die-controls label { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.die-controls label input { grid-column: span 2; width: 100%; accent-color: var(--hot); }
.die-controls b { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.die-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.die-out div { display: flex; flex-direction: column; gap: 4px; }
.die-legend { display: flex; gap: 16px; align-items: center; }
.die-legend span { display: inline-flex; gap: 8px; align-items: center; }
.die-legend i { width: 22px; height: 0; border-top: 1.5px solid var(--ink); display: inline-block; }
.die-legend i.crease { border-top: 1.5px dashed var(--hot); }
.die-stage { padding: 20px; display: grid; place-items: center; min-height: 360px; background: var(--surface); }
.die-stage svg { width: 100%; max-height: 460px; }
.die-fill { fill: var(--bg); }
.die-cut { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.die-crease { fill: none; stroke: var(--hot); stroke-width: 1.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.die-labels text { fill: var(--dim); font-family: var(--mono); letter-spacing: .05em; }
.die-dim path { fill: none; stroke: var(--dim); stroke-width: 1; vector-effect: non-scaling-stroke; }

@media (max-width: 860px) {
  .chain-steps { grid-template-columns: repeat(3, 1fr); }
  .chain-steps li:nth-child(4) { border-left: 0; }
  .chain-steps li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .chain-steps button::after { content: none; }
  .chain-detail { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .chain-meta { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .die { grid-template-columns: 1fr; }
  .die-controls { border-right: 0; border-bottom: 1px solid var(--faint); }
  .die-stage { min-height: 240px; }
}

/* ---------- folding mailer (3D) ---------- */
.fold { margin-top: 40px; border: 1px solid var(--faint); }
.fold-stage {
  position: relative; aspect-ratio: 16 / 8.5; cursor: grab; touch-action: pan-y;
  background: radial-gradient(ellipse at 50% 60%, var(--surface) 0%, var(--bg) 72%);
}
.fold-stage:active { cursor: grabbing; }
.fold-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.fold-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.fold-hint { position: absolute; right: 16px; top: 14px; transition: opacity .4s; pointer-events: none; }
.fold:not(.ready) .fold-hint, .fold.touched .fold-hint { opacity: 0; }
.fold-bar {
  display: grid; grid-template-columns: auto 1fr minmax(220px, auto); gap: 18px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--faint);
}
.fold-bar input { width: 100%; accent-color: var(--hot); }
.fold-play {
  background: none; border: 1px solid var(--faint); color: var(--ink); cursor: pointer;
  padding: 7px 14px; min-width: 84px;
}
.fold-play:hover { border-color: var(--hot); }
.fold-step { color: var(--dim); text-align: right; }

.addon-feats {
  list-style: none; margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--faint); border-left: 1px solid var(--faint);
}
.addon-feats li { padding: 20px 22px 22px; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
.addon-feats .mono { color: var(--hot); }
.addon-feats p { margin-top: 10px; color: var(--dim); font-size: 15px; line-height: 1.55; }

@media (max-width: 860px) {
  .fold-stage { aspect-ratio: 1 / 1; }
  .fold-bar { grid-template-columns: auto 1fr; }
  .fold-step { grid-column: span 2; text-align: left; }
  .addon-feats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .addon-feats { grid-template-columns: 1fr; } }

.cap { margin-top: 14px; }
@media (max-width: 860px) {
}
.shot { margin-top: 56px; position: relative; border: 1px solid var(--faint); background: #1d1d1d; }
.shot img { display: block; width: 100%; height: auto; }
.shot-img { position: relative; }
.shot-bar { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid #2c2c2a; color: #8f8e89; }
.shot-bar i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3a3a38; margin-right: 6px; }
.shot .pin {
  position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%;
  background: var(--hot); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 500;
  box-shadow: 0 0 0 4px rgba(255, 91, 31, .22);
}
.pins { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--faint); border-top: 0; }
.pins li { padding: 14px 16px; color: var(--dim); line-height: 1.55; letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.pins li + li { border-left: 1px solid var(--line); }
.pins b { color: var(--hot); margin-right: 8px; }
.shot-nodes { background: #1d1d1d; }
@media (max-width: 860px) {
  .pins { grid-template-columns: 1fr; }
  .pins li + li { border-left: 0; border-top: 1px solid var(--line); }
  .shot .pin { width: 18px; height: 18px; font-size: 10px; }
}

/* ---------- 0427 demo: dieline + 3D side by side ---------- */
.die.fold { margin-top: 40px; }
.die-panes { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; }
.die-panes .die-stage { border-right: 1px solid var(--faint); min-height: 0; padding: 18px; }
.die-panes .die-stage svg { max-height: 420px; }
.fold-pane { display: flex; flex-direction: column; min-width: 0; }
.fold-pane .fold-stage { aspect-ratio: auto; flex: 1; min-height: 340px; }
.fold-pane .fold-bar { grid-template-columns: auto 1fr; }
.fold-pane .fold-step { grid-column: span 2; text-align: left; }

/* two renders side by side */
.duo { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--faint); }
.duo figure { margin: 0; padding: 12px; }
.duo figure + figure { border-left: 1px solid var(--line); }
.duo img { width: 100%; height: auto; display: block; }

@media (max-width: 1000px) {
  .die-panes { grid-template-columns: 1fr; }
  .die-panes .die-stage { border-right: 0; border-bottom: 1px solid var(--faint); }
  .fold-pane .fold-stage { aspect-ratio: 4 / 3; min-height: 0; flex: none; }
}
@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; }
  .duo figure + figure { border-left: 0; border-top: 1px solid var(--line); }
}
