/* CiteLantern tech layer. Additive to petrol.css; every rule is gated by a class tech.js sets. */

/* P1 Method strip, desktop: pinned section, horizontal track, filling line. */
.tech-strip.method{--strip-pad:44px;padding-top:0;padding-bottom:0;overflow-x:clip}
.tech-strip>.container{position:sticky;top:var(--strip-top,var(--header));padding-top:100px;padding-bottom:100px}
.tech-strip .method-flow{display:flex;gap:clamp(48px,5vw,88px);width:max-content;padding-top:var(--strip-pad);will-change:transform;
 background:repeating-linear-gradient(90deg,#17383C2E 0 1px,transparent 1px 24px) 0 0/100% 7px no-repeat}
.tech-strip .method-flow>li{flex:0 0 clamp(300px,30vw,440px);position:relative}
.tech-strip .method-flow::after{transform:scaleX(var(--strip-p,0))}
.tech-strip .method-flow>li::before,.tech-strip .method-flow>li::after{content:'';position:absolute;left:0;top:calc(-4.5px - var(--strip-pad));width:11px;height:11px;border-radius:50%;background:var(--paper);box-shadow:inset 0 0 0 1.5px var(--ink)}
.tech-strip .method-flow>li::after{background:var(--ink);box-shadow:0 0 0 4px var(--accent);opacity:0;transform:scale(.4);transition:opacity .4s var(--ease),transform .5s var(--ease)}
.tech-strip .method-flow>li.on::after,.tech-rail .method-flow>li.on::after{opacity:1;transform:scale(1)}
.tech-strip .method-flow>li>*{transition:opacity .5s var(--ease),transform .6s var(--ease)}
.tech-strip .method-flow>li:not(.on)>*{opacity:.36;transform:translateY(10px)}
.tech-strip .method-flow>li:not(.on) p{transform:translateY(16px)}

/* P1 Method rail, phone: vertical line fills down the existing dots. */
.tech-rail .method-flow{position:relative}
.tech-rail .method-flow::before,.tech-rail .method-flow::after{display:block;right:auto;top:34px;left:4px;width:1px;height:var(--rail-len,0);background:#17383C30}
.tech-rail .method-flow::after{left:3.5px;width:2px;background:var(--ink);transform:scaleY(var(--rail-p,0));transform-origin:50% 0}
.tech-rail .method-flow>li::before{z-index:1;background:var(--paper);box-shadow:inset 0 0 0 1.5px var(--ink)}
.tech-rail .method-flow>li::after{content:'';position:absolute;z-index:2;left:0;top:30px;width:9px;height:9px;border-radius:50%;background:var(--ink);box-shadow:0 0 0 4px var(--accent);opacity:0;transform:scale(.4);transition:opacity .4s var(--ease),transform .5s var(--ease)}

/* P1b Capture typewriter (illustrative record). Hidden unless strip/rail is active. */
.tc{display:none;margin:18px 0 0;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink);white-space:pre-wrap;word-break:break-word;opacity:.8}
.tech-strip .tc,.tech-rail .tc{display:grid}
.tc>span{grid-area:1/1}
.tc-g{visibility:hidden}

/* P2 Services previews. Every rule is gated by tech-orbit / tech-edit / tech-queue, set by tech.js. */
/* Row 1: the five engine pills orbit a core; the picked engine lights and the six recorded fields scan in. */
@keyframes t-orbit{from{transform:rotate(0deg) translateX(var(--orb-r,100px)) rotate(0deg)}to{transform:rotate(360deg) translateX(var(--orb-r,100px)) rotate(-360deg)}}
.tech-orbit .engine-list{position:relative;display:block;height:250px;margin-top:4px;
 background:radial-gradient(circle at 50% 50%,var(--accent) 0 5px,#D4F05B2e 6px 15px,transparent 16px 30px,#ffffff12 31px 32px,transparent 33px)}
.tech-orbit .engine-list::before{content:'';position:absolute;left:50%;top:50%;width:calc(var(--orb-r,100px)*2);height:calc(var(--orb-r,100px)*2);transform:translate(-50%,-50%);border-radius:50%;border:1px dashed #ffffff2e}
.tech-orbit .engine-list li{position:absolute;left:50%;top:50%;margin:0;translate:-50% -50%;padding:6px 11px;border:1px solid #ffffff26;border-radius:999px;background:var(--petrol);white-space:nowrap;cursor:pointer;
 animation:t-orbit 80s linear infinite;animation-delay:var(--orb-d,0s)}
.tech-orbit .engine-list li::after{content:'';position:absolute;inset:-5px;border-radius:inherit;box-shadow:0 0 0 1px #D4F05B80;opacity:0;transition:opacity .4s var(--ease)}
.tech-orbit .engine-list li.on{border-color:var(--accent)}
.tech-orbit .engine-list li.on::after{opacity:1}
.tech-orbit .engine-list li:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.tech-orbit:hover .engine-list li,.tech-orbit:focus-within .engine-list li,.tech-orbit.t-still .engine-list li{animation-play-state:paused}
.tech-orbit .check-fields span{position:relative;opacity:.5;transition:opacity .4s var(--ease) calc(var(--i,0)*90ms)}
.tech-orbit .check-fields span::after{content:'';position:absolute;left:0;right:0;top:-1px;height:1px;background:var(--accent);transform:scaleX(0);transform-origin:0 50%;transition:transform .5s var(--ease) calc(var(--i,0)*90ms)}
.tech-orbit .check-fields.scan span{opacity:1}
.tech-orbit .check-fields.scan span::after{transform:none}
.tech-orbit .check-fields.t-reset span,.tech-orbit .check-fields.t-reset span::after{transition:none}

/* Narrow boxes: logo badge with the name under it, so five items fit one ring without overlap. */
.tech-orbit .engine-list.t-compact li{flex-direction:column;gap:5px;padding:0;border:0;background:none;border-radius:0;font-size:12px;line-height:1.2}
.tech-orbit .engine-list.t-compact img{box-sizing:content-box;padding:7px;border-radius:50%;background:var(--petrol);border:1px solid #ffffff2e}
.tech-orbit .engine-list.t-compact li.on img{border-color:var(--accent)}
.tech-orbit .engine-list.t-compact li::after{inset:auto;left:50%;top:-5px;width:40px;height:40px;margin-left:-20px;border-radius:50%}

/* Row 2: drag the divider to reveal the proposed line; the current line always stays readable. */
.tech-edit .draft-lines{position:relative}
.tech-edit .new-line{width:fit-content;max-width:100%;padding-right:14px;clip-path:inset(-6px calc((1 - var(--cut,1))*100%) -6px -6px)}
.t-handle{display:none}
.tech-edit .t-handle{display:block;position:absolute;left:0;top:0;width:44px;margin-left:-22px;touch-action:pan-y;cursor:ew-resize;outline:0}
.t-handle::before{content:'';position:absolute;left:21px;top:-6px;bottom:-6px;width:2px;background:var(--accent)}
.t-handle::after{content:'';position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px #0C2428b3}
.t-handle:focus-visible::after{box-shadow:0 0 0 4px #0C2428b3,0 0 0 6px var(--paper)}

/* Row 3: the four actions join the queue in priority order; no line, Method below already has one. */
.tech-queue .action-rows li{opacity:0;transform:translateX(20px);transition:opacity .5s var(--ease),transform .7s var(--ease);transition-delay:calc(var(--i,0)*240ms)}
.tech-queue .action-rows li span::before{content:'';display:inline-block;width:6px;height:6px;margin-right:8px;vertical-align:1px;border-radius:50%;background:var(--accent);transform:scale(0);transition:transform .45s var(--ease) calc(var(--i,0)*240ms + 380ms)}
.tech-queue .action-rows.in li{opacity:1;transform:none}
.tech-queue .action-rows.in li span::before{transform:scale(1)}

/* P4 Principles bento: the four principles become cards, each with a small drawing. Gated by tech-bento. */
.principle-list.tech-bento{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.principle-list.tech-bento li{grid-column:auto;padding:22px 22px 24px;border:1px solid #ffffff20;border-radius:8px;background:#15353A}
.principle-list.tech-bento li:nth-child(4n+1),.principle-list.tech-bento li:nth-child(4n){grid-column:span 2}
.t-art{display:block;width:100%;max-width:240px;height:auto;margin-bottom:18px;overflow:visible;fill:none;stroke:#ffffff45;stroke-width:1.5}
.t-art .a{stroke:var(--accent)}.t-art .af{fill:var(--accent);stroke:none}.t-art .k{fill:var(--petrol);stroke:none}.t-art .d{stroke-dasharray:4 4}
.t-art .s{transform-box:fill-box;transform-origin:50% 50%;opacity:0;transform:translateY(8px);transition:opacity .5s var(--ease),transform .7s var(--ease);transition-delay:calc(var(--i,0)*120ms)}
.tech-bento li.in .t-art .s{opacity:1;transform:none}
@keyframes t-breathe{50%{opacity:.35}}
@keyframes t-sway{0%{transform:rotate(-48deg)}35%{transform:rotate(22deg)}65%{transform:rotate(-12deg)}100%{transform:rotate(40deg)}}
.tech-bento li.in .t-art .br{animation:t-breathe 2.8s ease-in-out infinite 1s}
.t-art .nd{transform-box:view-box;transform-origin:80px 50px;transform:rotate(-48deg)}
.tech-bento li.in .t-art .nd{animation:t-sway 5.2s ease-in-out infinite alternate .4s}
.tech-bento.t-still .t-art *{animation-play-state:paused}
@media(max-width:700px){.principle-list.tech-bento{grid-template-columns:1fr}.principle-list.tech-bento li:nth-child(n){grid-column:auto}.t-art{max-width:200px}}
