/* ═══ Rows 14 and 15: Files and LinkDrop (tools/rt16-files-block.py writes the markup, site S41) ═══════════════════
   Built from the page's own parts, as rows 12 and 13 are: rt-feat rows, the numbered rt-n, rt-tray and rt-plate, the
   amber of the page on the one thing that is active. Row 14 is a tour of real frames of the panel: the screen, a
   pointer that goes to what the next frame opens, ten chapter keys under it with a progress line each, the chapter's
   sentence under the keys (assets/rt16-files.js plays it while the row is in view). Row 15 draws how a link connects.
   Motion moves only transform and opacity. Reduced motion: no autoplay and no pointer; the keys switch the frames. */

.fx{padding-top:clamp(48px,6vw,90px)}
.fx-feats{margin-top:clamp(28px,4vw,56px)}
.fx-tour{display:block}

/* the row's words: number and heading on the left, the two paragraphs on the right, over the full-width screen */
.fx-head{display:grid;gap:clamp(8px,1.4vw,22px) clamp(18px,2.4vw,44px);margin-bottom:clamp(20px,2.6vw,38px)}
@media (min-width:1000px){.fx-head{grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-items:end}}
.fx-head h3{margin-bottom:0}
.fx-lead p:last-child{margin-bottom:0}

/* the plate: the screen, and beside it (from 1100 px) or under it the rail of chapter keys with the chapter's sentence.
   The screen is never taller than the window leaves room for, so screen, keys and sentence are seen together. */
.fx-plate{padding:clamp(8px,1.2vw,16px);background:radial-gradient(80% 60% at 70% 0%,rgba(255,176,32,.05),transparent 62%),var(--rack)}
.fx-stage{position:relative;width:100%;max-width:calc((100svh - 190px) * 1.6);margin-inline:auto}
@media (min-width:1100px){
  .fx-plate{display:grid;grid-template-columns:minmax(0,1fr) clamp(250px,21vw,330px);gap:clamp(12px,1.4vw,22px);align-items:start}
  .fx-stage{margin-inline:0 auto}
}
.fx-view{position:relative;overflow:hidden;border-radius:7px;background:#050505;aspect-ratio:1440/900;
  box-shadow:0 0 0 1px rgba(255,255,255,.06),0 18px 40px -24px rgba(0,0,0,.9);contain:paint}
.fx-phone{display:none;aspect-ratio:390/844}
@media (max-width:699px){
  .fx-desk{display:none}
  .fx-phone{display:block;width:min(100% - 72px,320px,calc((100svh - 250px) * 390 / 844));margin-inline:auto;border-radius:20px}
}
.fx-cam{position:absolute;inset:0;transform-origin:0 0}
.fx-f{position:absolute;inset:0;opacity:0;transition:opacity .38s cubic-bezier(.2,.7,.2,1)}
.fx-f.on{opacity:1}
.fx-f.bad{display:none}
.fx-f img{display:block;width:100%;height:100%}

/* the pointer: twice a mouse pointer's size, rounded, with a shadow under it; on a phone a fingertip */
.fx-ptr{position:absolute;left:0;top:0;width:26px;height:26px;margin:-2px 0 0 -3px;opacity:0;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M4.2 2.6c0-.9 1-1.4 1.7-.8l15.4 12.6c.7.6.3 1.8-.6 1.8h-6.4c-.4 0-.8.2-1 .5l-3.9 5.6c-.5.8-1.8.4-1.8-.5z' fill='%23fff' stroke='%23111' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.55));transform-origin:3px 2px;will-change:transform}
.fx-phone .fx-ptr{width:38px;height:38px;margin:-19px 0 0 -19px;border-radius:50%;background:rgba(255,255,255,.28);
  box-shadow:0 0 0 2px rgba(255,255,255,.75),0 6px 16px rgba(0,0,0,.45);filter:none;transform-origin:50% 50%}
.fx-ring{position:absolute;left:0;top:0;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;opacity:0;pointer-events:none;
  box-shadow:0 0 0 2px var(--led),0 0 18px rgba(255,176,32,.55)}
.fx.go .fx-ptr{opacity:1}

/* pause and play, at the screen's corner: shown on hover and focus, always under a finger and while paused */
.fx-play{position:absolute;right:10px;bottom:10px;z-index:2;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;
  background:rgba(15,20,24,.78);box-shadow:0 0 0 1px rgba(255,255,255,.14),0 6px 16px rgba(0,0,0,.5);color:var(--ink);cursor:pointer;
  opacity:0;transition:opacity .25s ease}
.fx-play svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.fx-play .fx-ir{display:none;fill:currentColor;stroke:none}
.fx-tour.paused .fx-play .fx-ip{display:none}
.fx-tour.paused .fx-play .fx-ir{display:block}
.fx-stage:hover .fx-play,.fx-play:focus-visible,.fx-tour.paused .fx-play{opacity:1}
.fx-play:focus-visible{outline:2px solid var(--led);outline-offset:2px}
@media (hover:none){.fx-play{opacity:1}}
/* on a phone the button stands in the band beside the screen, never over the panel's own buttons */
@media (max-width:699px){.fx-play{right:0;bottom:0;width:32px;height:32px}}
@media (scripting:none){.fx-play{display:none}}

/* the chapter keys: a track of ten, the progress line on top of the one playing */
.fx-keys{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;margin-top:clamp(10px,1.2vw,14px)}
@media (max-width:1099px){.fx-keys{grid-template-columns:repeat(5,minmax(0,1fr))}}
.fx-key{position:relative;display:flex;flex-direction:column;gap:5px;min-width:0;padding:11px 8px 9px;border:0;border-radius:6px;background:transparent;
  color:var(--dim);text-align:left;cursor:pointer;font-family:var(--mono);transition:color .3s var(--ease-seat),background-color .3s var(--ease-seat)}
.fx-key::before{content:"";position:absolute;left:8px;right:8px;top:0;height:2px;border-radius:2px;background:var(--rule)}
.fx-key i{position:absolute;left:8px;right:8px;top:0;height:2px;border-radius:2px;background:var(--led);transform:scaleX(0);transform-origin:left;z-index:1}
.fx-kn{font-size:10.5px;letter-spacing:.12em}
.fx-kl{font-size:10.5px;line-height:1.35;letter-spacing:.08em;text-transform:uppercase;overflow-wrap:break-word;hyphens:auto}
.fx-key:hover{color:var(--ink);background:rgba(255,255,255,.025)}
.fx-key:focus-visible{outline:2px solid var(--led);outline-offset:1px}
.fx-key[aria-pressed="true"]{color:var(--ink)}
.fx-key[aria-pressed="true"] .fx-kn{color:var(--led)}
.fx-key.done i{transform:scaleX(1);opacity:.35}
/* beside the screen: one key a line, the progress line down its left edge */
@media (min-width:1100px){
  .fx-keys{grid-template-columns:minmax(0,1fr);gap:2px;margin-top:0}
  .fx-key{flex-direction:row;align-items:baseline;gap:12px;padding:8px 10px 8px 16px}
  .fx-key::before,.fx-key i{left:0;right:auto;top:6px;bottom:6px;width:2px;height:auto}
  .fx-key i{transform:scaleY(0);transform-origin:top}
  .fx-key.done i{transform:scaleY(1)}
  .fx-kl{font-size:11px}
  .fx-caps{margin-top:12px;padding-top:14px}
  .fx-caps li{font-size:15px}
}
@media (max-width:699px){
  .fx-keys{display:flex;gap:4px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:-4px;padding-inline:4px 28px;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent)}
  .fx-keys::-webkit-scrollbar{display:none}
  .fx-key{flex:none;width:9.2em;scroll-snap-align:start}
}
@media (scripting:none){.fx-keys{display:none}}

/* the chapter's sentence, one at a time in the same cell, on a rule like the page's tables */
.fx-caps{display:grid;margin:clamp(6px,1vw,10px) 0 0;padding:clamp(12px,1.4vw,16px) 2px 2px;border-top:1px solid var(--rule);list-style:none}
.fx-caps li{grid-area:1/1;opacity:0;transform:translateY(6px);transition:opacity .16s ease,transform .3s ease;
  color:var(--ink);font-size:clamp(15px,1.15vw,17px);line-height:1.55;text-wrap:pretty;max-width:68em;pointer-events:none}
.fx-caps li.on{opacity:1;transform:none;pointer-events:auto;transition:opacity .42s var(--ease-seat) .14s,transform .6s var(--ease-seat) .14s}
.fx-caps b{margin-right:.5em;font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--led);vertical-align:2px}
@media (scripting:none){.fx-caps li{grid-area:auto;opacity:1;transform:none;margin-bottom:8px}}

/* what else Files does: one line of plain tags under the tray */
.fx-also{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px 16px;margin-top:clamp(18px,2.2vw,28px)}
.fx-also p{margin:0;font:500 11px/1.4 var(--mono);letter-spacing:.18em;text-transform:uppercase;color:var(--dim)}
.fx-also ul{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.fx-also li{padding:5px 11px;border-radius:999px;font-size:13px;line-height:1.35;color:color-mix(in srgb,var(--ink) 82%,transparent);
  background:rgba(255,255,255,.025);box-shadow:inset 0 0 0 1px var(--rule)}

/* ── row 15: how a link connects ─────────────────────────────────────────────────────────────────────────────── */
.lk-plate{padding:clamp(14px,1.8vw,22px);background:radial-gradient(90% 70% at 50% 18%,rgba(255,176,32,.06),transparent 60%),var(--rack)}
.lk-cap{margin:0 0 4px;font:500 11px/1.4 var(--mono);letter-spacing:.18em;text-transform:uppercase;color:var(--dim)}
.lk-scene{display:block;width:100%;height:auto;overflow:visible}
.lk-scene *{vector-effect:non-scaling-stroke}
.lk-scene text{font-family:var(--mono);font-size:17px;fill:var(--dim);text-anchor:middle;letter-spacing:.06em}
.lk-nas rect{fill:#121a1f;stroke:var(--rule-hi);stroke-width:1.4}
.lk-nas path{stroke:var(--rule-hi);stroke-width:1.2}
.lk-led{fill:var(--led);opacity:.9}
.lk-nas text{fill:var(--ink)}
.lk-svc rect{fill:rgba(255,176,32,.05);stroke:rgba(255,176,32,.38);stroke-width:1.2}
.lk-svc .lk-t{font-family:var(--cond);font-weight:600;font-size:23px;letter-spacing:.01em;fill:var(--ink)}
.lk-svc .lk-s{font-size:14px;fill:var(--dim)}
.lk-ctl path{fill:none;stroke:#4a5a64;stroke-width:1.4;stroke-dasharray:3 8}
.lk-wire{fill:none;stroke:var(--rule-hi);stroke-width:2}
.lk-lit{fill:none;stroke:var(--led);stroke-width:3;opacity:1;filter:drop-shadow(0 0 6px rgba(255,176,32,.6))}
.lk-nat rect{fill:#10161a;stroke:var(--rule-hi);stroke-width:1.4}
.lk-nat text{font-size:13px}
.lk-gate{stroke:var(--rule-hi);stroke-width:3;opacity:0}
.lk-dots *{opacity:0}
.lk-up,.lk-dn{fill:#9fb2bd}
.lk-hi{fill:var(--led)}
.lk-pk{fill:var(--led)}
.lk-ctl{opacity:.45}
/* the lanes under the drawing: the page's lane list (rows 12 and 13), the last one red */
.lk-lanes{margin-top:clamp(8px,1.2vw,14px)}
.lk-lanes li:first-child{color:var(--dim)}
.lk-lanes li:first-child .kx-dot{background:#26323A;box-shadow:inset 0 1px 1px rgba(0,0,0,.6)}
.lk-lanes li:not(.lk-none) .kx-dot{background:var(--led);box-shadow:0 0 8px rgba(255,176,32,.6)}
.lk-lanes li:not(.lk-none){color:var(--ink)}
.lk-lanes .lk-none .kx-dot{background:#E5484D;box-shadow:0 0 8px rgba(229,72,77,.7)}
.lk-lanes .lk-none small{color:#F2A3A6}
.lk-note{margin:12px 0 0;color:var(--dim);font-size:14px;line-height:1.55}

/* the loop (10 s), only while the row is in view (.lk-on from rt16-files.js) and motion is allowed: both NASes ask the
   service, it answers each with the other's address, both send at once and each router lets the other in, then the
   files flow straight from one to the other while the service stays out of the path */
@media (prefers-reduced-motion:no-preference){
  .lk.lk-anim .lk-lit{opacity:0}
  .lk.lk-anim .lk-gate{opacity:1}
  .lk.lk-anim .lk-ctl{opacity:1}
  .lk.lk-on .lk-ctl{animation:lk-ctl 10s linear infinite}
  .lk.lk-on .lk-lit{animation:lk-lit 10s linear infinite}
  .lk.lk-on .lk-gate{animation:lk-gate 10s linear infinite}
  .lk.lk-on .lk-up.a{animation:lk-up-a 10s cubic-bezier(.45,0,.55,1) infinite}
  .lk.lk-on .lk-up.b{animation:lk-up-b 10s cubic-bezier(.45,0,.55,1) infinite}
  .lk.lk-on .lk-dn.a{animation:lk-dn-a 10s cubic-bezier(.45,0,.55,1) infinite}
  .lk.lk-on .lk-dn.b{animation:lk-dn-b 10s cubic-bezier(.45,0,.55,1) infinite}
  .lk.lk-on .lk-hi.a{animation:lk-hi-a 10s cubic-bezier(.4,0,.6,1) infinite}
  .lk.lk-on .lk-hi.b{animation:lk-hi-b 10s cubic-bezier(.4,0,.6,1) infinite}
  .lk.lk-on .lk-pk{animation:lk-pk 10s linear infinite}
  .lk.lk-on .lk-pk:nth-of-type(2){animation-delay:-.32s}
  .lk.lk-on .lk-pk:nth-of-type(3){animation-delay:-.64s}
  .lk.lk-on .lk-pk:nth-of-type(4){animation-delay:-.96s}
  .lk.lk-on .lk-pk:nth-of-type(5){animation-delay:-1.28s}
}
@keyframes lk-ctl{0%,40%{opacity:1}48%,94%{opacity:.35}100%{opacity:1}}
@keyframes lk-lit{0%,43%{opacity:0}48%,94%{opacity:1}99%,100%{opacity:0}}
@keyframes lk-gate{0%,36%{opacity:1}40%,95%{opacity:0}100%{opacity:1}}
@keyframes lk-up-a{0%{opacity:0;transform:translate(170px,250px)}2%{opacity:1}13%{opacity:1;transform:translate(510px,112px)}15%,100%{opacity:0;transform:translate(510px,112px)}}
@keyframes lk-up-b{0%{opacity:0;transform:translate(1030px,250px)}2%{opacity:1}13%{opacity:1;transform:translate(690px,112px)}15%,100%{opacity:0;transform:translate(690px,112px)}}
@keyframes lk-dn-a{0%,15%{opacity:0;transform:translate(510px,112px)}17%{opacity:1}28%{opacity:1;transform:translate(170px,250px)}30%,100%{opacity:0;transform:translate(170px,250px)}}
@keyframes lk-dn-b{0%,15%{opacity:0;transform:translate(690px,112px)}17%{opacity:1}28%{opacity:1;transform:translate(1030px,250px)}30%,100%{opacity:0;transform:translate(1030px,250px)}}
@keyframes lk-hi-a{0%,31%{opacity:0;transform:translate(190px,330px)}33%{opacity:1}44%{opacity:1;transform:translate(594px,330px)}46%,100%{opacity:0;transform:translate(594px,330px)}}
@keyframes lk-hi-b{0%,31%{opacity:0;transform:translate(1010px,330px)}33%{opacity:1}44%{opacity:1;transform:translate(606px,330px)}46%,100%{opacity:0;transform:translate(606px,330px)}}
/* five packets, 1.6 s each across, from 48 % to 94 % of the loop (the delays stagger them) */
@keyframes lk-pk{
  0%,47.9%{opacity:0;transform:translate(190px,330px)}
  48%{opacity:1;transform:translate(190px,330px)}
  64%{opacity:1;transform:translate(1010px,330px)}64.01%{transform:translate(190px,330px)}
  80%{opacity:1;transform:translate(1010px,330px)}80.01%{transform:translate(190px,330px)}
  94%{opacity:1;transform:translate(907px,330px)}95%,100%{opacity:0;transform:translate(1010px,330px)}
}
@media (max-width:640px){.lk-scene text{font-size:22px}.lk-svc .lk-t{font-size:28px}.lk-svc .lk-s{font-size:17px}}

/* the page settles on the section's start like on the other sections (rt16.css, html.snap) */
@media (prefers-reduced-motion:no-preference) and (min-width:900px){#files-link{scroll-snap-align:start}}
@media (prefers-reduced-motion:reduce){
  .fx-f,.fx-caps li,.fx-key,.fx-play{transition:none}
  .fx-ptr,.fx-ring{display:none}
}

/* Japanese headings break at phrases, not inside a word (Chrome; other browsers keep their default) */
.fx:lang(ja) h2,.fx:lang(ja) h3{word-break:auto-phrase}
