/* Pinch: four-to-seven chapter (wheel, build-a-technique, ladders). */

/* count chips with a polygon glyph */
.chip.size { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; }
.chip.size b { font-family: var(--f-display); font-size: 18px; font-weight: 700; }
.glyph { width: 20px; height: 20px; flex: none; }
.chip.tech.pinned { border-style: dashed; border-color: var(--ink); }

/* wheel + card */
.wheel-grid { display: grid; gap: 20px; margin-top: 8px; }
@media (min-width: 860px) { .wheel-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; } }
.wheel-box {
  width: 100%; max-width: 340px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); padding: 6px;
}
@media (min-width: 860px) { .wheel-box { max-width: 460px; } }
.wheel-box.small { max-width: 220px; padding: 4px; margin: 0; }
.wheel-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.wheel-svg:focus, .wheel-svg .wheel-node:focus { outline: none; }

/* nodes pop in as a shape is drawn */
@media (prefers-reduced-motion: no-preference) {
  .wheel-svg.pop .wheel-node.on circle { transform-box: fill-box; transform-origin: center; animation: node-pop .32s cubic-bezier(.3, 1.6, .5, 1) backwards; }
  .wheel-svg .wheel-edge { animation: edge-in .35s ease-out backwards; }
}
@keyframes node-pop { from { transform: scale(.5); } }
@keyframes edge-in { from { opacity: 0; } }

.wheel-card { min-width: 0; }
.tech-name { font-family: var(--f-display); font-size: 30px; font-weight: 720; letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.05; font-variation-settings: "SOFT" 60; }
.echips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; min-height: 28px; align-items: center; }
.echip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); line-height: 1.3; }
.echip i, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--el); flex: none; }
.tech-count { margin: 0 0 8px; font-size: 16px; }
.tech-count b { font-family: var(--f-display); font-size: 22px; font-weight: 720; }
.tech-count .of { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; margin-top: 2px; }
.tech-what { margin: 0 0 10px; font-size: 15.5px; color: var(--ink-2); line-height: 1.5; }
.reacts { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 0 0 14px; }
.reacts li { font-family: var(--f-mono); font-size: 11.5px; padding: 2px 9px; border-radius: 6px; border: 1.5px solid var(--ink); color: var(--ink); }
.diff { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--ink); background: var(--card); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-family: var(--f-display); font-size: 18px; line-height: 1.3; }
.chip.cmp { margin-top: 2px; }
.wheel-card .note { margin-top: 8px; }

/* build a technique */
#build-result { min-height: 96px; margin: 0 0 14px; }
#build-result b { margin-bottom: 4px; }
.build-reacts { min-height: 8px; margin-bottom: 14px; }
.build-reacts .k { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.build-reacts .reacts { margin-bottom: 0; }

/* ladders */
.stairs-wrap { margin-top: 18px; }
.stairs {
  --dough: #ead8b0; --risen: #f3e4c0; --crust: #c98a4b; --crust-d: #7a4a22; --score: #f0cf9b;
  --flour: #fbf5e8; --mayo: #f6ebb8; --hollandaise: #f0d46a;
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px;
}
.stair { margin-left: calc(var(--i) * 7px); }
@media (prefers-reduced-motion: no-preference) {
  .stair { animation: stair-in .4s ease-out backwards; animation-delay: calc(var(--i) * 70ms); }
}
@keyframes stair-in { from { opacity: 0; transform: translateY(14px); } }

.step {
  all: unset; box-sizing: border-box; font: inherit; color: inherit; text-align: left; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; width: 100%; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--el); border-radius: var(--r);
  padding: 12px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.step:hover { border-color: var(--line-2); border-top-color: var(--el); }
.step:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.step[aria-pressed="true"] { border-color: var(--ink); border-top-color: var(--el); box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--el) 70%, transparent); transform: translateY(-2px); }
.step .art { width: 96px; height: auto; align-self: start; }
.step-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.step-n { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dot { width: 12px; height: 12px; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.dot.new { width: 15px; height: 15px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); margin: 0 3px; }
.step-add { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.step-name { font-family: var(--f-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.step-what { font-size: 14px; line-height: 1.45; color: var(--ink); }
.step-without { font-size: 13px; line-height: 1.4; color: var(--ink-3); }

/* the picture styles */
.art .ln { stroke: var(--ink); stroke-opacity: .7; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.art .f-dough { fill: var(--dough); }
.art .f-risen { fill: var(--risen); }
.art .f-bowl { fill: var(--paper-3); }
.art .f-lid { fill: var(--ink-3); }
.art .f-crust { fill: var(--crust); }
.art .f-crust-d { fill: var(--crust-d); }

@media (min-width: 1100px) {
  .stairs-wrap { overflow-x: auto; padding-bottom: 8px; }
  .stairs { flex-direction: row; align-items: flex-start; gap: 10px; min-width: 100%; }
  .stair { margin-left: 0; margin-top: calc((var(--n) - 1 - var(--i)) * 24px); flex: 1 0 136px; }
  .step { padding: 10px; }
  .step-name { font-size: 18px; }
  .step-what { font-size: 13.5px; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step .art { width: 100%; max-width: 150px; justify-self: center; }
}

.lad-wheel { display: flex; gap: 16px; align-items: center; margin-top: 22px; }
.lad-cap { margin: 0; font-size: 15.5px; color: var(--ink-2); max-width: 28em; }
.lad-cap b { font-family: var(--f-display); font-size: 19px; color: var(--ink); }
@media (max-width: 480px) { .lad-wheel { flex-direction: column; align-items: flex-start; } }

.wheel-next { font-family: var(--f-display); font-size: clamp(20px, 3vw, 26px); letter-spacing: -.01em; margin: 8px 0 24px; }
.wheel-next a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--umami); }
.wheel-next a:hover { text-decoration-color: var(--ink); }
