/* Windmill AC 8K — interactive installation guide
   Brand system lifted from the printed guide: navy ink, light-blue linework,
   pale-blue panels, lavender→peach sky. Brighton Std (print) → Fraunces (web). */

:root {
  --navy: #0e2240;
  --navy-deep: #12293f;
  --ink-70: rgba(14, 34, 64, .74);
  --ink-50: rgba(14, 34, 64, .52);
  --ink-12: rgba(14, 34, 64, .12);
  --ink-08: rgba(14, 34, 64, .08);
  --line: #afc9e9;
  --blob: #f5f9fd;
  --pale: #eef3f9;
  --mesh: #dbe1ea;
  --white: #fff;
  --peach: #fbf1dc;
  --sky-top: #b9c2d9;
  --sky-mid: #e2e6f3;
  --sky-low: #e4e1db;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --rail-w: 292px;
  --dock-h: 84px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.serif {
  font-family: var(--serif);
  font-weight: 500;
  /* low optical size keeps contrast close to Brighton Std's sturdy, bookish strokes */
  font-optical-sizing: none;
  font-variation-settings: "opsz" 24, "SOFT" 0, "WONK" 0;
  letter-spacing: -.018em;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────────────────── App shell ───────────────────────── */
.app {
  height: 100%;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  grid-template-rows: 1fr var(--dock-h);
  grid-template-areas: "rail stage" "rail dock";
}
.topbar { display: none; }

.rail {
  grid-area: rail;
  background: var(--navy-deep);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 28px 22px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  position: relative;
  z-index: 5;
}
.rail .logo { width: 132px; color: #fff; margin: 0 0 6px 6px; }
.logo svg { width: 100%; height: auto; display: block; }
.logo svg path { fill: currentColor; }
.rail-meta { font-size: 12px; opacity: .72; margin: 0 0 12px 6px; line-height: 1.5; }
.rail-switch {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px 6px; align-self: flex-start;
  padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22);
  font-size: 12px; font-weight: 600; text-decoration: none; color: rgba(255, 255, 255, .85); transition: background .25s, border-color .25s;
}
.rail-switch::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.rail-switch:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); color: #fff; }

.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chap button {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 13.5px;
  line-height: 1.3;
  transition: background .25s, color .25s;
}
.chap button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.chap .dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  font-family: var(--serif); font-size: 15px;
  transition: background .35s var(--ease-out), border-color .35s, color .35s, transform .35s var(--spring);
}
.chap .dot svg { width: 14px; height: 14px; }
.chap small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 1px; }
.chap.is-current button { background: rgba(255, 255, 255, .1); color: #fff; }
.chap.is-current .dot { background: #fff; color: var(--navy); border-color: #fff; transform: scale(1.06); }
.chap.is-done button { color: rgba(255, 255, 255, .86); }
.chap.is-done .dot { background: var(--line); border-color: var(--line); color: var(--navy); }
.chap .subdots { grid-column: 2; display: flex; gap: 5px; margin-top: 7px; }
.chap .subdots i { width: 16px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .2); transition: background .3s; }
.chap .subdots i.on { background: #fff; }

.rail-foot { margin-top: auto; padding: 22px 6px 0; display: grid; gap: 14px; }
.meter { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--line), #fff); border-radius: inherit; transition: width .7s var(--ease-out); }
.rail-foot .row { display: flex; justify-content: space-between; font-size: 12px; opacity: .8; }
.help-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  text-decoration: none; font-size: 13px; line-height: 1.35;
  transition: background .25s;
}
.help-link:hover { background: rgba(255, 255, 255, .13); }
.help-link .hi { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.help-link .hi svg { width: 26px; height: 26px; }
.help-link b { display: block; font-weight: 600; }

/* Stage & screens */
.stage { grid-area: stage; position: relative; overflow: hidden; background: var(--white); }
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.screen-inner { min-height: 100%; padding: 56px clamp(24px, 5vw, 80px) 48px; }

/* Dock (Back / progress / Next) */
.dock {
  grid-area: dock;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--ink-08);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  position: relative; z-index: 4;
}
.dock-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.dock-mid .where { font-size: 12.5px; color: var(--ink-70); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pips { display: flex; gap: 6px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--mesh); transition: background .3s, width .45s var(--ease-out), border-radius .45s; }
.pips i.done { background: var(--line); }
.pips i.on { width: 22px; border-radius: 6px; background: var(--navy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px;
  border-radius: 999px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff;
  font-weight: 600; font-size: 14.5px; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease-out), box-shadow .3s, background .3s, opacity .3s;
  box-shadow: 0 10px 24px -14px rgba(14, 34, 64, .7);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(14, 34, 64, .75); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease-out); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; border-color: var(--ink-12); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); box-shadow: none; }
.btn.ghost-light:hover { border-color: #fff; }
.btn[disabled] { opacity: .38; pointer-events: none; box-shadow: none; }
.btn.back { padding: 0 20px 0 16px; }
.btn.back svg { transform: rotate(180deg); }
.btn.back:hover svg { transform: rotate(180deg) translateX(3px); }
.btn.nudge { animation: nudge .6s var(--ease-out); }
@keyframes nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Full-bleed screens (cover / back cover) hide the chrome */
.app.is-full { grid-template-columns: 0 1fr; grid-template-rows: 1fr 0; }
.app.is-full .rail { visibility: hidden; overflow: hidden; padding: 0; }
.app.is-full .dock, .app.is-full .topbar { display: none; }
.app { transition: grid-template-columns .6s var(--ease-out), grid-template-rows .6s var(--ease-out); }

/* ───────────────────────── Reveal choreography ───────────────────────── */
.rv { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms + 140ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.mask-line { display: block; overflow: hidden; padding-bottom: .26em; margin-bottom: -.26em; } /* room for descenders (y, g, p) at display sizes; the negative margin keeps line spacing unchanged */
.mask-line > span { display: inline-block; animation: lineup 1s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 110ms + 120ms); }
@keyframes lineup { from { transform: translateY(135%); } to { transform: none; } }

/* ───────────────────────── Shared bits ───────────────────────── */
.eyebrow { font-family: var(--serif); font-size: 19px; margin: 0 0 18px; font-weight: 500; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
.h-page { font-size: clamp(40px, 5.2vw, 68px); line-height: 1.02; margin-bottom: 28px; }
.lede { font-size: 16px; color: var(--ink-70); max-width: 46ch; }
.num {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--pale);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  flex: none;
}
.note { font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.strong { font-weight: 700; }
.panel { background: var(--pale); border-radius: var(--radius); padding: 22px 24px; }
.callout {
  display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: center;
  background: var(--pale); border-radius: 14px; padding: 16px 20px;
  font-size: 13px; font-weight: 700; line-height: 1.5;
}
.callout .ico svg { width: 42px; height: auto; display: block; }
.callout.soft { font-weight: 500; }
.callout.soft b { font-weight: 700; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(14, 34, 64, .1);
  font-size: 12.5px; font-weight: 600;
  backdrop-filter: blur(6px);
}
.chip .ci { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.chip .ci svg { width: 22px; height: 22px; }

/* ───────────────────────── Cover ───────────────────────── */
.cover { background: var(--navy-deep); color: #fff; }
.cover .screen-inner { display: flex; flex-direction: column; min-height: 100%; padding: 36px clamp(24px, 5vw, 72px) clamp(32px, 6vh, 64px); position: relative; z-index: 2; }
.cover .logo { width: 150px; }
.cover h1 { font-size: clamp(64px, 11vw, 176px); line-height: .96; margin-top: auto; letter-spacing: -.02em; }
.cover-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; margin-top: 40px; }
.cover-meta { font-size: 14px; line-height: 1.45; }
.cover-meta b { font-weight: 700; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sky-balloons { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.sky-balloons img { position: absolute; bottom: -30%; opacity: .16; animation: ascend linear infinite; }
@keyframes ascend {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(24px, -70vh, 0); }
  100% { transform: translate3d(-10px, -150vh, 0); }
}
.cover-wind { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .5; }
.cover-wind path { fill: none; stroke: rgba(175, 201, 233, .35); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 120 900; animation: gust 9s var(--ease-io) infinite; }
.cover-wind path:nth-child(2) { animation-delay: 3s; }
.cover-wind path:nth-child(3) { animation-delay: 6s; }
@keyframes gust { from { stroke-dashoffset: 1020; } to { stroke-dashoffset: 0; } }

/* ───────────────────────── Before you start ───────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 48px; margin: 12px 0 40px; max-width: 980px; }
.tip { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; }
.tip .ti { width: 64px; height: 64px; border-radius: 50%; background: var(--blob); display: grid; place-items: center; transition: transform .5s var(--spring); }
.tip:hover .ti { transform: rotate(-8deg) scale(1.06); }
.tip .ti svg { width: 58px; height: 58px; }
.tip p { margin: 0; font-size: 15px; color: var(--ink-70); }
.tip p b { color: var(--navy); font-weight: 600; }
.clock-anim .ti svg path:nth-of-type(n+3) { transform-box: view-box; transform-origin: 50% 50%; }
.important { max-width: 560px; font-size: 13.5px; }
.important p { margin: 0 0 10px; }
.important p:last-child { margin: 0; }

/* ───────────────────────── Safety ───────────────────────── */
.safety-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; margin-bottom: 34px; }
.safety-head .h-page { margin: 0; }
.safety-head p { margin: 0; color: var(--ink-70); max-width: 52ch; }
.warn-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.warn-col { border: 1px solid var(--ink-08); border-radius: var(--radius); padding: 24px 26px; }
.warn-col h3 { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.warn-col h3 svg { width: 26px; height: auto; }
.warn-col ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--ink-70); }
.warn-col li { margin: 0 0 9px; padding-left: 4px; }
.warn-col li::marker { color: var(--navy); }
.warn-col ul ul { margin-top: 8px; list-style: circle; }
.warn-col b { color: var(--navy); }
.ack {
  margin-top: 26px; display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: var(--radius); background: var(--pale);
  cursor: pointer; user-select: none; transition: background .3s;
}
.ack:hover { background: #e6eef8; }
.ack input { position: absolute; opacity: 0; pointer-events: none; }
.ack .box { flex: none; }
.ack span.txt { font-weight: 600; font-size: 14.5px; }

/* Custom checkbox tick used across the guide */
.box {
  width: 26px; height: 26px; border-radius: 8px;
  border: 1.5px solid var(--navy); background: #fff;
  display: grid; place-items: center;
  transition: background .25s, transform .3s var(--spring);
}
.box svg { width: 16px; height: 16px; }
.box svg path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s var(--ease-out) .05s; }
input:checked + .box, .is-on > .box { background: var(--navy); transform: scale(1.04); }
input:checked + .box svg path, .is-on > .box svg path { stroke-dashoffset: 0; }
input:focus-visible + .box { outline: 2px solid var(--navy); outline-offset: 3px; }

/* ───────────────────────── Window requirements ───────────────────────── */
.win-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.win-art { position: sticky; top: 0; }
.art-host svg { width: 100%; height: auto; display: block; overflow: visible; }
.art-host .lbl { font-family: var(--sans); }
.win-copy p { color: var(--ink-70); margin: 0 0 14px; }
.form { margin-top: 26px; display: grid; gap: 18px; }
.seg { justify-self: start; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--pale); position: relative; }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 9px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-70); transition: color .3s; }
.seg button[aria-pressed="true"] { color: #fff; }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--navy); transition: transform .45s var(--ease-out), width .45s var(--ease-out); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field .inp { position: relative; }
.field input {
  width: 100%; height: 54px; border-radius: 14px;
  border: 1.5px solid var(--mesh); background: #fff;
  padding: 0 52px 0 16px; font-size: 20px; font-family: var(--serif); font-weight: 500;
  transition: border-color .25s, box-shadow .25s;
  -moz-appearance: textfield;
}
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(175, 201, 233, .45); }
.field .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--ink-50); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--ink-50); min-height: 18px; transition: color .3s; }
.field.ok input { border-color: var(--line); }
.field.ok .hint { color: var(--navy); }
.field.bad input { border-color: var(--navy); }
.field.bad .hint { color: var(--navy); font-weight: 700; }
.q { display: grid; gap: 8px; }
.q > span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.checks { display: grid; gap: 8px; }
.check {
  display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ink-08);
  font-size: 14px; transition: border-color .25s, background .25s;
}
.check:hover { border-color: var(--line); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check:has(input:checked) { background: var(--blob); border-color: var(--line); }
.verdict {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: 16px; background: var(--pale);
  font-size: 14px; line-height: 1.5;
  animation: rise .5s var(--ease-out) both;
}
.verdict .vi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.verdict .vi svg { width: 20px; height: 20px; }
.verdict.good { background: var(--navy); color: #fff; }
.verdict.good .serif { font-size: 19px; }
.verdict-list { display: grid; gap: 10px; }

/* ───────────────────────── What's in the box ───────────────────────── */
.box-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.box-hero { display: grid; gap: 28px; }
.bh-item { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; }
.bh-item h3 { font-size: 24px; margin-bottom: 6px; }
.bh-item p { margin: 0; font-size: 14px; color: var(--ink-70); }
.bh-item .note { margin-top: 12px; color: var(--navy); }
.inv { display: grid; gap: 18px; }
.inv h4 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; display: flex; justify-content: space-between; }
.inv h4 span { color: var(--ink-50); letter-spacing: .04em; }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item {
  position: relative; display: grid; grid-template-columns: 58px 1fr 26px; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 16px; background: var(--blob); border: 1px solid transparent;
  text-align: left; font-size: 13px; line-height: 1.35; color: var(--ink-70);
  transition: background .3s, border-color .3s, transform .3s var(--ease-out);
}
.item:hover { border-color: var(--line); transform: translateY(-1px); }
.item .ii { height: 48px; display: grid; place-items: center; }
.item .ii svg { max-width: 54px; max-height: 46px; width: auto; height: auto; }
.item b { display: block; color: var(--navy); font-weight: 600; font-size: 13.5px; }
.item em { font-style: normal; font-weight: 700; font-size: 11.5px; color: var(--navy); }
.item.is-on { background: #fff; border-color: var(--navy); color: var(--navy); }
.item.is-on .ii { animation: pop .5s var(--spring); }
@keyframes pop { 40% { transform: scale(1.18) rotate(-4deg); } }
.box-count { display: flex; align-items: center; gap: 14px; font-size: 13.5px; margin-top: 4px; }
.box-count .meter { flex: 1; background: var(--pale); height: 6px; }
.box-count .meter i { background: var(--navy); }

/* ───────────────────────── Step intro (sky) ───────────────────────── */
.sky {
  background:
    radial-gradient(120% 60% at 80% 0%, rgba(255, 255, 255, .25), transparent 60%),
    linear-gradient(180deg, var(--sky-top) 0%, #d3d8e8 38%, var(--sky-low) 76%, var(--peach) 100%);
}
.sky.blue { --sky-top: #aec4e6; }
.sky .screen-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: 24px; padding-top: 40px; }
.clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sky .intro-copy, .sky .scene { position: relative; z-index: 1; }
.sky .screen-inner {
  background:
    radial-gradient(120% 60% at 80% 0%, rgba(255, 255, 255, .25), transparent 60%),
    linear-gradient(180deg, var(--sky-top) 0%, #d3d8e8 38%, var(--sky-low) 76%, var(--peach) 100%);
}
.clouds img { position: absolute; will-change: transform; animation: drift var(--t, 38s) ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(calc(var(--dx, 40px) * -1), 0, 0); } to { transform: translate3d(var(--dx, 40px), -6px, 0); } }
.balloon { position: absolute; pointer-events: none; z-index: 1; animation: bob var(--t, 7s) ease-in-out infinite alternate; }
@keyframes bob { from { transform: translate3d(0, 10px, 0) rotate(-1.5deg); } to { transform: translate3d(6px, -16px, 0) rotate(1.5deg); } }
.intro-copy { display: flex; flex-direction: column; min-height: calc(100vh - var(--dock-h) - 96px); }
.intro-copy .eyebrow { font-size: 22px; }
.intro-title { font-size: clamp(46px, 5.6vw, 104px); line-height: .95; letter-spacing: -.022em; }
.intro-flags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.caution-card {
  margin-top: 22px; max-width: 520px;
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .62); backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
}
.caution-card svg { width: 34px; height: auto; }
.need { margin-top: auto; padding-top: 36px; }
.need-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.need-item { display: grid; justify-items: center; gap: 8px; width: 92px; text-align: center; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.need-item .ni { height: 64px; display: grid; place-items: center; transition: transform .45s var(--spring); }
.need-item:hover .ni { transform: translateY(-6px) rotate(-6deg); }
.need-item .ni svg { height: 56px; width: auto; max-width: 86px; }
.need-item.wide { width: 150px; }
.need-item.wide .ni svg { height: 76px; max-width: 150px; }
.scene { position: relative; align-self: center; justify-self: center; width: min(100%, 460px); }
.scene img.win { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(60, 70, 110, .12)); animation: sceneIn 1.2s var(--ease-out) both .15s; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }

/* ───────────────────────── Sub-step ───────────────────────── */
.sub .screen-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding-top: 40px; }
.sub-art { position: relative; }
.art-stage { position: relative; border-radius: 26px; padding: clamp(10px, 2vw, 26px); }
.art-stage .art-host { max-width: 560px; margin: 0 auto; }
.art-stage .art-host.var { display: none; }
.art-stage .art-host.var.show { display: block; }
.art-tools { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.replay {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: none; padding: 8px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-70);
  transition: background .25s, color .25s;
}
.replay:hover { background: var(--pale); color: var(--navy); }
.replay svg { width: 16px; height: 16px; transition: transform .6s var(--ease-out); }
.replay:hover svg { transform: rotate(-200deg); }
.art-label { text-align: center; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.sub-copy .eyebrow { margin-bottom: 26px; }
.sub-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.sub-head .of { font-size: 12px; font-weight: 600; color: var(--ink-50); letter-spacing: .04em; }
.sub-title { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; margin-bottom: 18px; }
.sub-body p { margin: 0 0 14px; color: var(--ink-70); font-size: 15.5px; }
.sub-body p.strong { color: var(--navy); }
.sub-body .note { color: var(--navy); margin-top: 16px; }
.sub-body .callout { margin-top: 18px; }
.outro {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--ink-08);
  font-family: var(--serif); font-size: 20px; line-height: 1.3;
}
.skip-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--navy); }

/* Interactive helpers inside sub-steps */
.helper { margin-top: 22px; padding: 18px 20px; border-radius: 18px; border: 1px dashed var(--line); background: #fff; }
.helper h4 { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.screws { display: flex; flex-wrap: wrap; gap: 8px; }
.screw {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--ink-12); background: #fff;
  font-size: 12.5px; font-weight: 600; transition: border-color .25s, background .25s;
}
.screw .box { width: 22px; height: 22px; border-radius: 50%; }
.screw .box svg { width: 13px; height: 13px; }
.screw.is-on { border-color: var(--navy); background: var(--blob); }
.screw-count { margin-top: 12px; font-size: 12.5px; color: var(--ink-70); }
.screw-count b { color: var(--navy); }
.numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.numbers .field input { padding-right: 16px; text-align: center; font-size: 26px; }
.cutlines { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cutline { padding: 16px; border-radius: 16px; background: var(--pale); text-align: center; }
.cutline small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cutline .big { font-family: var(--serif); font-size: 44px; line-height: 1.1; }
.cutline .mark { display: inline-flex; align-items: center; gap: 6px; }
.cutline .mark i { width: 1.5px; height: 30px; background: var(--navy); display: block; transform: skewX(-18deg); }
.cutline em { font-style: normal; font-size: 12px; color: var(--ink-70); }

/* Tilt explainer (step 2.3) */
.tilt { margin-top: 20px; border-radius: 18px; background: var(--blob); padding: 14px 16px 10px; }
.tilt svg { width: 100%; height: auto; display: block; }
.tilt .unit-g { transform-box: view-box; transform-origin: 118px 78px; animation: tilt 5s var(--ease-io) infinite; }
@keyframes tilt { 0%, 18% { transform: rotate(0deg); } 40%, 100% { transform: rotate(2.4deg); } }
.tilt .drop { animation: drip 5s var(--ease-io) infinite; }
@keyframes drip {
  0%, 42% { transform: translate(0, 0); opacity: 0; }
  48% { opacity: 1; }
  78% { transform: translate(96px, 4px); opacity: 1; }
  92% { transform: translate(100px, 28px); opacity: 0; }
  100% { opacity: 0; }
}
.tilt .lvl { animation: lvl 5s var(--ease-io) infinite; }
@keyframes lvl { 0%, 18% { opacity: 1; } 34%, 100% { opacity: 0; } }
.tilt .ok { animation: okk 5s var(--ease-io) infinite; }
@keyframes okk { 0%, 38% { opacity: 0; } 48%, 100% { opacity: 1; } }

/* ───────────────────────── More / finish ───────────────────────── */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
.more-card { border: 1px solid var(--ink-08); border-radius: 22px; padding: 26px 28px; }
.more-card .num { margin-bottom: 18px; }
.more-card h3 { font-size: 26px; line-height: 1.12; margin-bottom: 12px; }
.more-card p, .more-card li { color: var(--ink-70); font-size: 14px; }
.more-card p { margin: 0; }
.more-card ul { margin: 0; padding-left: 18px; }
.more-card li { margin-bottom: 6px; }
.more-card ol { margin: 0; padding-left: 22px; }
.more-card ol li { padding-left: 4px; margin-bottom: 8px; }
.more-card ol li::marker { font-weight: 700; color: var(--navy); font-size: 12px; }
details.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .plus { width: 34px; height: 34px; border-radius: 50%; background: var(--pale); display: grid; place-items: center; flex: none; transition: transform .4s var(--ease-out); }
details.acc[open] summary .plus { transform: rotate(45deg); }
details.acc .acc-body { padding-top: 16px; animation: rise .5s var(--ease-out) both; }
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }
.celebrate img { position: absolute; bottom: -200px; animation: liftoff var(--t, 5s) var(--ease-io) forwards; }
@keyframes liftoff { to { transform: translate3d(var(--dx, 0), -125vh, 0) rotate(var(--r, 0deg)); } }
.finish-banner {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  margin-bottom: 36px; padding: 24px 28px; border-radius: 22px;
  background: linear-gradient(120deg, var(--sky-top), #dfe3f0 55%, var(--peach));
}
.finish-banner p { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
.finish-banner .stat { text-align: right; font-size: 12px; font-weight: 600; }
.finish-banner .stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 500; }

/* Back cover */
.end { background: var(--navy-deep); color: #fff; }
.end .screen-inner { position: relative; z-index: 1; }
.end-wind { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.end-wind path { fill: none; stroke: url(#endWindGrad); stroke-linecap: round; stroke-width: 1.1; }
.end-wind .gust { stroke-dasharray: 280 720; stroke-dashoffset: 1000; opacity: 0; animation: gustFlow var(--t) cubic-bezier(.45, 0, .55, 1) var(--dl) infinite; }
@keyframes gustFlow {
  0% { stroke-dashoffset: 1000; opacity: 0; }
  25% { opacity: .32; }
  75% { opacity: .32; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.end-wind .sway { animation: sway var(--s) ease-in-out var(--sd) infinite alternate; }
@keyframes sway { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
.end .screen-inner { display: flex; flex-direction: column; justify-content: space-between; }
.end-mid { margin: auto 0; display: grid; gap: 30px; justify-items: start; }
.end .logo { width: 220px; }
.end-foot { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; }
.end-foot a { text-decoration: none; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1180px) {
  :root { --rail-w: 250px; }
  .box-layout, .win-layout { grid-template-columns: 1fr; }
  .win-art { position: relative; max-width: 560px; }
}
@media (max-width: 960px) {
  body { overflow: auto; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; grid-template-areas: "top" "stage" "dock"; height: 100dvh; }
  /* long "Next: …" labels truncate instead of widening the page */
  .dock #nextBtn { min-width: 0; max-width: calc(100% - 64px); }
  .dock #nextBtn .lbl { overflow: hidden; text-overflow: ellipsis; }
  .app.is-full { grid-template-columns: 1fr; grid-template-rows: 0 1fr 0; }
  .topbar {
    grid-area: top; display: flex; align-items: center; gap: 14px;
    height: 58px; padding: 0 16px; background: var(--navy-deep); color: #fff; position: relative; z-index: 6;
  }
  .topbar .logo { width: 104px; }
  .topbar .meter { flex: 1; }
  .icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
  .icon-btn svg { width: 20px; height: 20px; }
  .rail {
    position: fixed; inset: 58px 0 0 0; width: auto; z-index: 20;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease-out), transform .4s var(--ease-out), visibility 0s .4s;
  }
  .rail.open { transform: none; opacity: 1; visibility: visible; transition: opacity .3s var(--ease-out), transform .4s var(--ease-out); }
  .rail .logo, .rail .rail-meta { display: none; }
  .dock { height: 76px; padding: 0 16px; padding-bottom: env(safe-area-inset-bottom); }
  .dock .btn { min-height: 46px; padding: 0 18px; font-size: 13.5px; }
  .dock .btn.back .lbl { display: none; }
  .dock .btn.back { padding: 0 14px; }
  .dock-mid .where { display: none; }
  .screen-inner { padding: 30px 16px 40px; }
  .sub .screen-inner, .sky .screen-inner, .grid-2 { grid-template-columns: 1fr; }
  .sub .screen-inner { gap: 16px; padding-top: 20px; }
  .intro-copy { min-height: 0; }
  .scene { width: min(78%, 340px); order: -1; margin-top: -4px; }
  .sky .screen-inner { padding-top: 24px; }
  .tips, .warn-cols, .more-grid, .fields, .items { grid-template-columns: 1fr; }
  .safety-head { grid-template-columns: 1fr; gap: 14px; }
  .bh-item { grid-template-columns: 110px 1fr; }
  .cover h1 { font-size: clamp(54px, 15vw, 96px); }
  .finish-banner { grid-template-columns: 1fr; }
  .finish-banner .stat { text-align: left; }
}
@media (max-width: 480px) {
  .dock .pips { display: none; } /* the top bar meter already shows progress */
}
@media (max-width: 420px) {
  .numbers, .cutlines { grid-template-columns: 1fr 1fr; }
  .need-item { width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .clouds img, .balloon, .sky-balloons img, .tilt *, .end-wind * { animation: none !important; }
}
