/* ==========================================================================
   Reel 01 — "The Build" (/resources/create-content-for-ai-search/). Loaded after resources.css on that page only.
   Every rule is scoped to body.ai1 or an .ai1- class. Default CSS = the final, complete, visible state.
   One-shot pre-states exist only as  @media (prefers-reduced-motion: no-preference) { html.ready .x:not(.in) … }
   (pages.js adds .in to [data-io]); the page brief's controls start [hidden] and are shown by /ai-build.js.
   Words never hide (text may dim to .35); nothing loops (the ch01 caret blinks 4 times, then holds).
   The spine: one web page under construction. The hero shows the whole page; each intertitle lights the layer its chapter adds.
   Colour meanings: teal = the part being built / your page cited · blue #3478D4 = a separate decision. No gold here.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. tokens + helpers */
.ai1 { --ai1-lab: 500 max(.7rem, 11px)/1.4 var(--mono); --ai1-panel: #0B0D10; --ai1-blue: #3478D4; }
.ai1 [hidden] { display: none !important; }
.ai1-lab { display: block; max-width: none; font: var(--ai1-lab); letter-spacing: .12em; text-transform: uppercase; color: var(--text2); }

/* ---------------------------------------------------------------- 2. compact intertitles + the page-under-construction glyph */
.ai1 .res-card { min-height: clamp(220px, 28vh, 310px); padding: 58px 96px 58px; margin-bottom: clamp(32px, 5vh, 52px); }
.ai1 .res-num::before { font-size: clamp(7rem, 15vw, 12rem); }
.ai1-pg { position: absolute; right: 30px; bottom: 26px; width: 48px; height: 60px; overflow: visible; }
.ai1-pf { fill: rgba(11, 13, 16, .7); stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1; }
.ai1-pf.is-now { stroke: var(--teal); filter: drop-shadow(0 0 4px rgba(25, 230, 207, .7)); }
.ai1-pp > * { fill: none; stroke: rgba(244, 243, 239, .3); stroke-width: .8; stroke-dasharray: 1.6 1.4; }            /* still to build: dashed */
.ai1-pp.is-done > * { fill: rgba(244, 243, 239, .34); stroke: none; }                                                    /* built */
.ai1-pp.is-now > * { fill: var(--teal); stroke: none; filter: drop-shadow(0 0 3px rgba(25, 230, 207, .9)); transition: fill .8s var(--ease) .5s; }   /* this chapter */
.ai1-pp > path { fill: none !important; stroke-dasharray: none; stroke-width: 1.2; stroke-linecap: round; }
.ai1-pp.is-done > path { stroke: rgba(244, 243, 239, .45); } .ai1-pp.is-now > path { stroke: var(--teal); }
@media (max-width: 699px) {
  .ai1 .res-card { min-height: 0; padding: 60px 20px 84px; }
  .ai1-pg { right: auto; left: 20px; bottom: 16px; width: 40px; height: 50px; }
}

/* ---------------------------------------------------------------- 3. hero: the page this guide builds */
.ai1-n { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin: 0 .32em 0 .04em; vertical-align: .14em;
  border: 1px solid color-mix(in srgb, var(--teal) 70%, transparent); border-radius: 50%; font: 500 max(.48em, 11px)/1 var(--mono); color: var(--teal); }
.ai1-n::before { content: attr(data-n); content: attr(data-n) / ""; }
.ai1-plate .res-plate-frame { background: radial-gradient(60% 80% at 60% 50%, rgba(24, 58, 102, .3), transparent 72%), #050607; }
.ai1-plate .res-plate-frame::after { display: none; }
.ai1-plate > .cb.br { bottom: -8px; }
.ai1-plate .res-plate-hud i { background: var(--teal); opacity: 1; box-shadow: 0 0 10px var(--teal), 0 0 2px var(--teal); }
@media (min-width: 1100px) {
  .ai1-plate .res-plate-frame { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%); mask-image: linear-gradient(90deg, transparent 0, #000 9%); }
  .ai1-plate .res-plate-hud { padding-right: calc(var(--gut) + 30px); }   /* the right label clears the corner bracket */
}
.ai1-bp { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ai1-bp-grid { fill: none; stroke: rgba(52, 120, 212, .16); stroke-width: 1; }
.ai1-win { fill: rgba(9, 11, 14, .95); stroke: rgba(244, 243, 239, .36); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ai1-chrome { fill: none; stroke: rgba(244, 243, 239, .18); stroke-width: 2; }
.ai1-dot { fill: rgba(244, 243, 239, .24); }
.ai1-url { fill: rgba(244, 243, 239, .06); stroke: rgba(244, 243, 239, .16); stroke-width: 1.5; }
.ai1-l rect, .ai1-l circle { fill: rgba(244, 243, 239, .17); }
.ai1-l .ai1-sun { fill: rgba(244, 243, 239, .3); }
.ai1-l .ai1-ln { fill: none; stroke: rgba(244, 243, 239, .5); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ai1-l .ai1-play { fill: rgba(244, 243, 239, .55); }
.ai1-l .ai1-brk { fill: none; stroke: var(--teal); stroke-width: 3; }
.ai1-acc .ai1-ln { stroke: var(--teal); }
.ai1-mk circle { fill: #0B0D10; stroke: var(--teal); stroke-width: 2.5; }
.ai1-mk text { font: 600 32px/1 var(--mono); fill: var(--teal); text-anchor: middle; }
.ai1-ans-bg { fill: rgba(15, 18, 23, .96); stroke: rgba(244, 243, 239, .22); stroke-width: 2; }
.ai1-q { fill: rgba(244, 243, 239, .05); stroke: rgba(244, 243, 239, .2); stroke-width: 1.5; }
.ai1-qm { fill: none; stroke: rgba(244, 243, 239, .5); stroke-width: 2; }
.ai1-bar { fill: rgba(244, 243, 239, .14); }
.ai1-tx { font: 500 32px/1 var(--mono); letter-spacing: .06em; fill: var(--text2); }   /* 32 user units ≥ 11px on screen from 640px up */
.ai1-chip { fill: rgba(244, 243, 239, .07); stroke: rgba(244, 243, 239, .24); stroke-width: 1.5; }
.ai1-chip.ai1-cite { fill: rgba(25, 230, 207, .16); stroke: var(--teal); stroke-width: 2.5; }
.ai1-pgi { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linejoin: round; }
.ai1-pin { fill: rgba(244, 243, 239, .36); }
.ai1-link { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(25, 230, 207, .6)); }
@media (max-width: 639px) { .ai1-tx { display: none; } }   /* the rows keep their marks; the prose names both outcomes */

/* ---------------------------------------------------------------- 4. intro: companion reel */
.ai1-pair { width: min(1040px, 100% - 32px); margin: 20px auto 0; padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  max-width: none; border: 1px solid var(--line); border-left: 2px solid var(--teal); background: rgba(21, 25, 31, .45); }
.ai1-pair-k::before { content: attr(data-l); content: attr(data-l) / ""; font: var(--ai1-lab); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-t); }
.ai1-pair a { font: 400 clamp(1.08rem, 1rem + .35vw, 1.25rem)/1.3 var(--serif); color: var(--text); text-decoration: underline 1px var(--teal); text-underline-offset: 3px; }
.ai1-pair a:hover { color: var(--accent-t); }
.ai1-pair-s { font: 400 .95rem/1.5 var(--sans); color: var(--text2); }

/* ---------------------------------------------------------------- 5. ch01: a workable article brief */
.ai1-dec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 18px; }
.ai1-dec .ai1-lab { flex: 0 0 100%; }
.ai1-tick { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line2); border-radius: 999px;
  font: var(--ai1-lab); letter-spacing: .08em; text-transform: uppercase; color: var(--text2); }
.ai1-tick::before { content: ''; flex: none; width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 2px; }
.ai1-tick.is-on { color: var(--text); border-color: color-mix(in srgb, var(--teal) 55%, transparent); }
.ai1-tick.is-on::before { border-color: var(--teal); background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%230B0D10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.2 5 8.4l4.4-4.8'/%3E%3C/svg%3E") center / 10px no-repeat; box-shadow: 0 0 8px var(--teal); }
.ai1-slots { border-top: 1px solid var(--line2); }
.ai1-slot { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: baseline; min-height: 56px; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.ai1-slot-v { font: italic 400 clamp(1.15rem, 1rem + .5vw, 1.35rem)/1.3 var(--serif); color: var(--text); }
.ai1-slot-v.is-blank { align-self: end; height: 1.3em; border-bottom: 1px dashed var(--text2); opacity: .75; }
.ai1-caret { display: inline-block; width: 1px; height: 1.1em; background: var(--teal); vertical-align: -.15em; }
@media (max-width: 699px) { .ai1-slot { grid-template-columns: 1fr; gap: 6px; } }

/* ---------------------------------------------------------------- 6. ch02: where the answer lands + the annotated opening */
.ai1-first-g { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 28px); }
.ai1-mini { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 300px; padding: 0 12px 16px 22px; background: var(--ai1-panel); border: 1px solid var(--line2); }
.ai1-mini-bar { height: 14px; margin: 0 -12px 4px -22px; background: #1A1F26; }
.ai1-blk { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); }
.ai1-blk b { font: 500 .84rem/1.3 var(--sans); color: var(--text2); }
.ai1-blk i { display: block; height: 6px; border-radius: 3px; background: rgba(244, 243, 239, .12); }
.ai1-blk i:nth-of-type(2) { width: 86%; } .ai1-blk i:nth-of-type(3) { width: 72%; } .ai1-blk i:nth-of-type(4) { width: 58%; }
.ai1-blk.is-ans { border-color: var(--teal); background: rgba(25, 230, 207, .08); }
.ai1-blk.is-ans b { color: var(--text); }
.ai1-side { justify-self: start; margin-top: 2px; padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--teal) 50%, transparent); border-radius: 999px;
  font: normal 500 max(.66rem, 11px)/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-t); }
.ai1-fold { height: 0; margin: 4px 0; border-top: 1px dashed var(--text2); opacity: .55; }
.ai1-eye { position: absolute; left: 9px; top: 26px; height: 40px; width: 1px; background: var(--teal); box-shadow: 0 0 6px rgba(25, 230, 207, .6); transform-origin: top; transition: transform 1.1s var(--ease) .3s; }
.ai1-eye.is-long { height: auto; bottom: 34px; }
.ai1-eye::before { content: ''; position: absolute; left: -5px; top: -9px; width: 11px; height: 7px; border: 1px solid var(--teal); border-radius: 50%; }
.ai1-eye::after { content: ''; position: absolute; left: -3px; bottom: -1px; width: 6px; height: 6px; border-right: 1px solid var(--teal); border-bottom: 1px solid var(--teal); transform: rotate(45deg); }
.ai1-qm { display: inline-block; margin: 0 .45em 0 .1em; padding: 3px 7px 2px; vertical-align: .22em; border: 1px solid color-mix(in srgb, var(--teal) 50%, transparent); border-radius: 3px;
  font: 500 max(.42em, 11px)/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-t); }
.ai1-qm::before { content: attr(data-l); content: attr(data-l) / ""; }

/* ---------------------------------------------------------------- 7. ch03: the caption that explains + labelled results */
.ai1-evid-l { display: block; margin-top: 10px; }
.ai1-evid-l::before { content: attr(data-l); content: attr(data-l) / ""; font: var(--ai1-lab); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-t); }
.ai1-evid .res2-frame:nth-child(2) .res2-pencil path { transition-delay: 1.4s; }
.ai1-evid .res2-frame:nth-child(3) .res2-pencil path { transition-delay: 1.7s; }
.ai1-res-l { display: grid; gap: 12px; }
@media (min-width: 700px) { .ai1-res-l { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.ai1-tag { position: relative; display: grid; gap: 6px; padding: 14px 14px 14px 34px; border: 1px solid var(--line2); border-radius: 4px 16px 16px 4px; background: var(--ai1-panel); }
.ai1-tag::before { content: ''; position: absolute; left: 12px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; border: 1px solid var(--text2); }
.ai1-tag b { font: 400 1.35rem/1.15 var(--serif); color: var(--text); }
.ai1-tag span { font: var(--ai1-lab); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-t); }
.ai1-tag.is-more { border-style: dashed; }
.ai1-tag.is-more span { color: #A9B9CC; }
.ai1-res-brk { position: relative; display: block; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line2); }
.ai1-res-brk::before, .ai1-res-brk::after { content: ''; position: absolute; top: -6px; width: 1px; height: 6px; background: var(--line2); }
.ai1-res-brk::before { left: 0; } .ai1-res-brk::after { right: 0; }

/* ---------------------------------------------------------------- 8. ch04: one session, three formats, three jobs (replaces the timeline) */
.ai1-jobs-g { position: relative; display: grid; gap: 16px; }
.ai1-src { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.ai1-src > i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.ai1-outs { position: relative; display: grid; gap: 12px; margin-left: 6px; padding-left: 20px; border-left: 1px solid color-mix(in srgb, var(--teal) 55%, transparent); }
.ai1-out { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 14px; border: 1px solid var(--line2); background: var(--ai1-panel); }
.ai1-out::before { content: ''; position: absolute; left: -21px; top: 50%; width: 20px; height: 1px; background: color-mix(in srgb, var(--teal) 55%, transparent); }
.ai1-shape { grid-row: 1 / span 2; justify-self: center; border: 1.5px solid var(--teal); }
.ai1-out.is-reel .ai1-shape { width: 22px; height: 38px; border-radius: 3px; }
.ai1-out.is-page .ai1-shape { width: 30px; height: 38px; border-radius: 2px; background: repeating-linear-gradient(transparent 0 6px, rgba(25, 230, 207, .45) 6px 7px) 5px 8px / 18px 24px no-repeat; }
.ai1-out.is-svc .ai1-shape { width: 36px; height: 26px; border-radius: 3px 12px 12px 3px; }
.ai1-out b { font: 400 1.2rem/1.2 var(--serif); color: var(--text); }
.ai1-out span { font: var(--ai1-lab); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-t); }
@media (min-width: 760px) {
  .ai1-jobs-g { grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 0 26px; }
  .ai1-outs { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 22px 0 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--teal) 55%, transparent); }
  .ai1-out { grid-template-columns: 1fr; justify-items: start; gap: 8px; }
  .ai1-shape { grid-row: auto; justify-self: start; }
  .ai1-out::before { left: 50%; top: -23px; width: 1px; height: 22px; }
  .ai1-src::after { content: ''; position: absolute; left: 190px; top: 50%; width: 26px; height: 1px; background: color-mix(in srgb, var(--teal) 55%, transparent); }
}

/* ---------------------------------------------------------------- 9. ch05: link pairs, both ways */
.ai1-lp { display: grid; gap: 16px; }
.ai1-lp-r { display: grid; grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr); gap: 12px; align-items: center; }
.ai1-lp-a, .ai1-lp-b { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line2); background: var(--ai1-panel); font: 400 1rem/1.35 var(--sans); color: var(--text); }
.ai1-lp-b { border-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.ai1-lp-l { display: inline-flex; align-items: center; gap: 8px; font: 500 .95rem/1.3 var(--sans); color: var(--text); text-decoration: underline 1px var(--teal); text-underline-offset: 3px; }
.ai1-lp-l::after { content: '\2192'; content: '\2192' / ''; color: var(--teal); text-decoration: none; }
.ai1-lp-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; max-width: none; font: var(--ai1-lab); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-t); }
.ai1-lp-back::before { content: '\21A9'; content: '\21A9' / ''; font-size: 1.15em; color: var(--teal); }
@media (max-width: 699px) {
  .ai1-lp-r { grid-template-columns: 1fr; gap: 8px; }
  .ai1-lp-l { justify-self: start; padding-left: 14px; }
  .ai1-lp-l::after { content: '\2193'; content: '\2193' / ''; }
}

/* ---------------------------------------------------------------- 10. ch06: what a reader asks, and where this page answers */
.ai1-who-l li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ai1-who-l li:first-child { border-top: 0; }
.ai1-who-q { font: italic 400 1.15rem/1.3 var(--serif); color: var(--text); }
.ai1-who-a { position: relative; display: grid; gap: 4px; padding: 10px 12px; border-left: 2px solid var(--teal); background: rgba(25, 230, 207, .05); }
.ai1-who-a::before { content: ''; position: absolute; left: -36px; top: 50%; width: 26px; height: 1px; background: var(--teal); }
.ai1-who-a::after { content: ''; position: absolute; left: -14px; top: calc(50% - 3px); width: 6px; height: 6px; border-right: 1px solid var(--teal); border-top: 1px solid var(--teal); transform: rotate(45deg); }
.ai1-who-a b { font: 500 1rem/1.3 var(--sans); color: var(--text); }
@media (max-width: 699px) {
  .ai1-who-l li { grid-template-columns: 1fr; gap: 8px; }
  .ai1-who-a::before, .ai1-who-a::after { display: none; }
}

/* ---------------------------------------------------------------- 11. ch07: who reads the page, and for what */
.ai1-door-g { display: grid; gap: 22px; }
.ai1-page { align-self: start; padding: 14px 16px 10px; border: 1px solid var(--line2); border-top: 14px solid #1A1F26; background: var(--ai1-panel); }
.ai1-page li { position: relative; padding: 8px 0 8px 18px; border-top: 1px solid var(--line); font: 400 .95rem/1.35 var(--sans); color: var(--text); }
.ai1-page li::before { content: ''; position: absolute; left: 0; top: 1em; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--teal); }   /* hollow: a check to make, not a status */
.ai1-lanes { display: grid; gap: 12px; }
.ai1-lane { position: relative; display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr) auto; gap: 10px 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line2); background: var(--ai1-panel); }
.ai1-lane-k { font: 500 .98rem/1.3 var(--sans); color: var(--text); }
.ai1-lane-p { display: flex; flex-wrap: wrap; gap: 6px; }
.ai1-lane-p i, .ai1-ctl-o i { font-style: normal; padding: 3px 9px; border: 1px solid var(--line2); border-radius: 999px; font: 400 .86rem/1.3 var(--sans); color: var(--text2); }
.ai1-ctl { grid-column: 1 / -1; display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed color-mix(in srgb, var(--teal) 40%, transparent); }
.ai1-ctl b { font: var(--ai1-lab); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-t); }
.ai1-ctl-o { display: flex; flex-wrap: wrap; gap: 6px; }
.ai1-ctl-o i.is-on { color: var(--text); border-color: var(--teal); }
.ai1-lane-to { justify-self: end; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--teal) 50%, transparent); font: 500 .9rem/1.3 var(--sans); color: var(--text); }
.ai1-lane.is-t { margin-top: 30px; border-style: dashed; border-color: color-mix(in srgb, var(--ai1-blue) 60%, transparent); grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); }
.ai1-lane.is-t .ai1-lane-to { justify-self: start; border-color: color-mix(in srgb, var(--ai1-blue) 65%, transparent); }
.ai1-lane-sep { position: absolute; left: 0; top: -26px; font: var(--ai1-lab); letter-spacing: .12em; text-transform: uppercase; color: #A9B9CC; }
@media (min-width: 900px) {
  .ai1-door-g { grid-template-columns: 250px minmax(0, 1fr); gap: 0 44px; align-items: center; }
  .ai1-lane::before { content: ''; position: absolute; left: -45px; top: 50%; width: 44px; height: 1px; background: color-mix(in srgb, var(--teal) 50%, transparent); }
  .ai1-lane.is-t::before { background: color-mix(in srgb, var(--ai1-blue) 60%, transparent); }
}
@media (max-width: 699px) {
  .ai1-lane, .ai1-lane.is-t { grid-template-columns: 1fr; }
  .ai1-lane-to { justify-self: start; }
}

/* ---------------------------------------------------------------- 12. ch08: the improvement loop (replaces the empty log) */
.ai1-loop-g { position: relative; display: grid; gap: 22px; }
.ai1-loop-c { position: relative; display: grid; align-content: start; gap: 9px; padding: 14px; border: 1px solid var(--line2); background: var(--ai1-panel); }
.ai1-loop-c + .ai1-loop-c::before { content: ''; position: absolute; left: 24px; top: -22px; height: 22px; border-left: 1px solid var(--teal); }
.ai1-loop-k { margin-bottom: 2px; font: 400 1.15rem/1.25 var(--serif); color: var(--text); }
.ai1-fix { display: block; font: 400 .93rem/1.4 var(--sans); }
.ai1-fix i { font-style: normal; color: var(--text2); }
.ai1-fix i::after { content: '\2192'; content: '\2192' / ''; margin: 0 6px; color: var(--teal); }
.ai1-fix b { font-weight: 500; color: var(--text); }
.ai1-exit { display: flex; align-items: center; gap: 8px; font: 400 .95rem/1.35 var(--sans); color: var(--text); }
.ai1-exit::before { content: '\2197'; content: '\2197' / ''; color: var(--teal); }
.ai1-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.ai1-fields i { font-style: normal; padding: 3px 9px; border: 1px solid var(--line2); border-radius: 3px; font: var(--ai1-lab); letter-spacing: .06em; text-transform: uppercase; color: var(--text2); }
@media (min-width: 900px) {
  .ai1-loop-g { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 34px; margin-bottom: 30px; }
  .ai1-loop-c + .ai1-loop-c::before { left: -30px; top: 50%; width: 26px; height: 0; border-left: 0; border-top: 1px solid var(--teal); }
  .ai1-loop-g::after { content: ''; position: absolute; left: 16%; right: 16%; bottom: -22px; height: 16px; border: 1px solid color-mix(in srgb, var(--teal) 55%, transparent); border-top: 0; border-radius: 0 0 14px 14px; }
}

/* ---------------------------------------------------------------- 13. ch09: your page brief (real controls; no <form>) */
.ai1-tool { padding-top: 28px; }
.ai1-tool h3 { margin: 0 0 8px; font: 400 clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem)/1.1 var(--serif); color: var(--text); }
.ai1-tool-lede, .ai1-priv { max-width: 40em; font: 400 .98rem/1.6 var(--sans); color: var(--text2); }
.ai1-priv { margin-top: 6px; font-size: .92rem; }
.ai1-fields-l { margin-top: 18px; border-top: 1px solid var(--line2); }
.ai1-f { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 8px 18px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.ai1-f label { display: flex; gap: 10px; align-items: baseline; padding-top: 10px; font: 500 .95rem/1.35 var(--sans); color: var(--text); }
.ai1-f label b { flex: none; width: 1.2em; font: 500 .8rem/1 var(--mono); color: var(--teal); }
.ai1-f:nth-child(2) label { color: var(--accent-t); }
.ai1-f textarea { width: 100%; min-height: 64px; resize: vertical; padding: 10px 12px; font: 400 1rem/1.5 var(--sans); color: var(--text); caret-color: var(--teal);
  background: rgba(244, 243, 239, .03); border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; }
.ai1-f textarea:focus { border-bottom-color: var(--teal); box-shadow: 0 1px 0 var(--teal); }
.ai1-f textarea::placeholder { color: var(--text2); opacity: .75; }
.ai1-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ai1-act-b { min-height: 44px; padding: 0 16px; background: transparent; color: var(--text); cursor: pointer; border: 1px solid color-mix(in srgb, var(--teal) 55%, transparent);
  border-radius: 0; font: var(--ai1-lab); letter-spacing: .14em; text-transform: uppercase; transition: background .3s, border-color .3s; }
.ai1-act-b:hover, .ai1-act-b:focus-visible { background: rgba(25, 230, 207, .08); border-color: var(--teal); }
.ai1-act-b[data-armed] { border-color: var(--teal); background: rgba(25, 230, 207, .14); }
.ai1-printroot { display: none; }
@media (max-width: 759px) { .ai1-f { grid-template-columns: 1fr; } .ai1-f label { padding-top: 0; } }
@media (max-width: 559px) { .ai1-acts { display: grid; grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- 14. one-shot reveals (decoration only; text dims, never hides) */
@media (prefers-reduced-motion: no-preference) {
  /* hero: keyed to the plate's own .in, so on phones the page builds when the plate is seen */
  .ai1-plate .ai1-win { transition: stroke-dashoffset 1.1s var(--ease) .15s; }
  .ai1-plate .ai1-link { transition: stroke-dashoffset 1.2s var(--ease) 1.9s; }
  .ai1-l, .ai1-mk { transition: opacity .6s var(--ease) calc(.5s + var(--k, 0) * .16s); }
  .ai1-ans { transition: opacity .8s var(--ease) 1.3s; }
  .ai1-chip.ai1-cite, .ai1-pgi { transition: fill .6s var(--ease) 2.9s, stroke .6s var(--ease) 2.9s; }
  html.ready.res-motion .ai1-plate:not(.in) .ai1-win, html.ready.res-motion .ai1-plate:not(.in) .ai1-link { stroke-dashoffset: 1; }
  html.ready.res-motion .ai1-plate:not(.in) .ai1-l { opacity: .12; }
  html.ready.res-motion .ai1-plate:not(.in) .ai1-mk { opacity: .35; }
  html.ready.res-motion .ai1-plate:not(.in) .ai1-ans { opacity: .2; }
  html.ready.res-motion .ai1-plate:not(.in) .ai1-chip.ai1-cite { fill: rgba(244, 243, 239, .07); stroke: rgba(244, 243, 239, .24); }
  html.ready.res-motion .ai1-plate:not(.in) .ai1-pgi { stroke: rgba(244, 243, 239, .3); }
  /* intertitles: this chapter's layer lights */
  html.ready .ai1-card:not(.in) .ai1-pp.is-now > * { fill: rgba(244, 243, 239, .34); filter: none; }
  html.ready .ai1-card:not(.in) .ai1-pp.is-now > path { stroke: rgba(244, 243, 239, .45); }
  /* ch01 */
  .ai1-slot { transition: opacity .6s var(--ease) calc(var(--k, 0) * .12s), transform .6s var(--ease) calc(var(--k, 0) * .12s); }
  html.ready .ai1-slot:not(.in) { opacity: .35; transform: translateX(-10px); }
  html.ready .ai1-slot.in .ai1-caret { animation: resBlink 1.1s steps(1) .9s 4; }
  /* ch02 */
  html.ready .ai1-mini:not(.in) .ai1-eye { transform: scaleY(0); }
  .ai1-qm { transition: opacity .6s var(--ease) .4s; }
  html.ready .ai1-quote:not(.in) .ai1-qm { opacity: .35; }
  /* ch03 */
  .ai1-tag { transition: opacity .6s var(--ease) calc(var(--k, 0) * .15s), transform .6s var(--ease) calc(var(--k, 0) * .15s); }
  html.ready .ai1-tag:not(.in) { opacity: .35; transform: translateY(8px); }
  /* ch04 to ch08 */
  .ai1-out, .ai1-lp-r, .ai1-who-l li, .ai1-page, .ai1-lane, .ai1-loop-c, .ai1-src { transition: opacity .6s var(--ease) calc(var(--k, 0) * .15s); }
  html.ready .ai1-out:not(.in), html.ready .ai1-src:not(.in), html.ready .ai1-lp-r:not(.in), html.ready .ai1-who-l li:not(.in),
  html.ready .ai1-page:not(.in), html.ready .ai1-lane:not(.in), html.ready .ai1-loop-c:not(.in) { opacity: .35; }
}

/* ---------------------------------------------------------------- 15. reduced motion (belt and braces) */
@media (prefers-reduced-motion: reduce) {
  .ai1 [class*="ai1-"], .ai1 [class*="ai1-"]::before, .ai1 [class*="ai1-"]::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- 16. forced colours */
@media (forced-colors: active) {
  .ai1-n, .ai1-tick, .ai1-out, .ai1-lane, .ai1-tag { border-color: CanvasText; }
  .ai1-tick.is-on::before { forced-color-adjust: none; background: Highlight; }
  .ai1-lane.is-t { border-style: dashed; }
}

/* ---------------------------------------------------------------- 17. print (and the brief's own print mode) */
@media print {
  .ai1-plate, .ai1-pg, .ai1-brief, .ai1-first, .ai1-res, .ai1-jobs, .ai1-links, .ai1-who, .ai1-door, .ai1-loop, .ai1-qm, .ai1-n, .ai1-pair-k, .ai1-acts,
  .ai1-evid-l { display: none !important; }
  .ai1-pair, .ai1-tool { width: auto; margin-inline: 0; background: none !important; border-color: #999 !important; }
  .ai1-tool h3, .ai1-f label, .ai1-tool-lede, .ai1-priv, .ai1-pair a, .ai1-pair-s { color: #000 !important; }
  .ai1-f textarea { border: 0; border-bottom: 1px solid #000; background: none; color: #000; }
  html.ai1-print-sheet body > :not(.ai1-printroot) { display: none !important; }
  html.ai1-print-sheet .ai1-printroot { display: block !important; }
  .ai1-printroot pre { white-space: pre-wrap; font: 11pt/1.55 Georgia, serif; color: #000; }
}
