/* SCHED (2026-11-08, eve-v4/SCHED.md): the home's dock is a live schedule (schedule.js). Desktop first; below 801 px the
   dock folds back to the phone's three step cards (the lanes, axis and pins are desktop only).
   Layout: one grid at the masthead's margins. Column 1 holds the lane heads (the existing chapter links 01 Droga, 02 Sieć,
   03 Biogaz), column 2 the plot (three lanes over the gold time axis with its five stages, the playhead across both),
   column 3 the end cap, "Przygotuj zapytanie", on the axis line, which lights when the build has ended.
   Motion: the playhead, the bar fills and the pins move by transform only, written by schedule.js on the build's clock. */
@media (min-width:801px){
  html.sched-on{--sd-row:30px;--sd-axis:50px;--sd-bottom:clamp(20px,3.2vh,36px);--sd-headw:clamp(236px,17vw,290px);--sd-capw:clamp(170px,12vw,210px);--sd-gap:28px}
  html.sched-on .sched{position:absolute;z-index:3;left:4.4%;right:4.4%;bottom:var(--sd-bottom);display:grid;
    grid-template-columns:var(--sd-headw) minmax(0,1fr) var(--sd-capw);grid-template-rows:repeat(4,var(--sd-row)) var(--sd-axis);column-gap:var(--sd-gap)}
  /* a quiet floor under the dock so the type never fights the frame (the world above stays untouched) */
  html.sched-on .sched::before{content:"";position:absolute;z-index:-1;left:-4.9%;right:-4.9%;top:-34px;bottom:calc(-1 * var(--sd-bottom));pointer-events:none;
    background:linear-gradient(180deg,#10292200 0%,#102922b8 38%,#102922ee 100%)}

  /* Lane heads: the chapter links, one per lane row. */
  html.sched-on body .sched .world-steps{position:static;grid-column:1;grid-row:1 / 5;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(4,var(--sd-row));gap:0;left:auto;right:auto;bottom:auto}
  html.sched-on body .sched .world-steps a{position:relative;display:grid;grid-template-columns:26px auto 16px minmax(0,1fr);grid-template-rows:none;align-items:center;column-gap:8px;height:var(--sd-row);padding:0;border:0;background:none;opacity:1;transform:none;pointer-events:auto;backdrop-filter:none}
  html.sched-on body .sched .world-steps a > *{grid-row:1;translate:none;position:relative}
  html.sched-on body .sched .world-steps a::before,html.sched-on body .sched .world-steps a::after{display:none}
  html.sched-on body .sched .world-steps a:is(:hover,:active,:focus-visible){transform:none;background:none}
  html.sched-on .sched .world-steps .step-number{grid-column:1;font-size:10.5px;letter-spacing:.14em;color:var(--gold);opacity:.8}
  html.sched-on .sched .world-steps b{grid-column:2;font-size:21px;line-height:1;color:var(--paper);white-space:nowrap}
  html.sched-on .sched .world-steps .step-arrow{grid-column:3;font-size:13px;color:var(--gold);opacity:.55}
  html.sched-on .sched .world-steps small{grid-column:4;grid-row:1;font-size:11px;line-height:1.2;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html.sched-on .sched .world-steps a[aria-current] b,html.sched-on .sched .world-steps a:is(:hover,:focus-visible) b{color:var(--gold)}
  html.sched-on .sched .world-steps a:is(:hover,:focus-visible) .step-arrow{opacity:1}
  html.sched-on .sched .world-steps a:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
  html.sched-still .sched .world-steps small{opacity:1}

  /* The plot: lanes, then the axis; the playhead spans both. */
  html.sched-on .sched-plot{position:relative;grid-column:2;grid-row:1 / 6;display:grid;grid-template-rows:repeat(4,var(--sd-row)) var(--sd-axis)}
  html.sched-on .sched-tracks{display:contents}
  html.sched-on .sched-lane{position:relative}
  html.sched-on .sched-lane::before{content:"";position:absolute;left:0;right:0;top:calc(50% + 5px);height:1px;background:#ffffff12}
  html.sched-on .sched-bar{position:absolute;left:calc(var(--a) * 100%);width:calc((var(--b) - var(--a)) * 100%);top:calc(50% + 3px);height:5px;padding:0;border:0;border-radius:0;background:#dec38c24;cursor:pointer;transition:background var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-bar::before{content:"";position:absolute;left:0;right:0;top:-11px;bottom:-8px}
  html.sched-on .sched-fill{position:absolute;inset:0;display:block;background:var(--gold);transform:scaleX(0);transform-origin:left;opacity:.62;transition:opacity var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-lane.is-live .sched-fill{opacity:1}
  html.sched-on .sched-lane.is-live .sched-bar{background:#dec38c3d}
  html.sched-on .sched-bar:is(:hover,:focus-visible){background:#dec38c52}
  html.sched-on .sched-bar:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
  /* Scope ticks: the lane's own items (1.1 to 3.3) where each piece appears in the build. */
  html.sched-on .sched-tick{position:absolute;z-index:1;left:calc(var(--at) * 100%);top:0;bottom:0;width:30px;margin-left:-15px;padding:0;border:0;background:none;cursor:pointer;color:#f0eee46b;font:inherit}
  html.sched-on .sched-tick span{position:absolute;left:50%;top:1px;translate:-50% 0;font-size:10px;line-height:12px;letter-spacing:.06em;font-variant-numeric:tabular-nums;transition:color var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-tick::after{content:"";position:absolute;left:50%;top:calc(50% + 1px);width:1px;height:9px;background:currentColor;transition:background var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-tick.is-past{color:var(--gold)}
  html.sched-on .sched-tick:is(:hover,:focus-visible){color:var(--paper)}
  html.sched-on .sched-tick:focus-visible{outline:2px solid var(--gold);outline-offset:0}

  /* The time axis: one gold hairline, the five stages on it. */
  html.sched-on .sched-axis{position:relative;grid-row:5;margin:0;padding:0;list-style:none;border-top:1px solid #dec38c80}
  html.sched-on .sched-axis li{display:contents}
  html.sched-on .sched-stage{position:absolute;top:0;bottom:0;left:calc(var(--a) * 100%);width:calc((var(--b) - var(--a)) * 100%);box-sizing:border-box;padding:8px 8px 0 9px;white-space:nowrap;border:0;border-left:1px solid #dec38c4d;background:none;text-align:left;cursor:pointer;
    font:inherit;font-size:11px;line-height:1.35;letter-spacing:.01em;color:#f0eee480;transition:color var(--m-feedback) var(--m-ease-out),background var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-stage span{display:block;margin-bottom:3px;font-size:10px;letter-spacing:.14em;color:var(--gold);opacity:.75;font-variant-numeric:tabular-nums}
  html.sched-on .sched-stage.is-past{color:#f0eee4a8}
  html.sched-on .sched-stage[aria-current]{color:var(--paper);background:linear-gradient(180deg,#dec38c1f,#dec38c00 80%)}
  html.sched-on .sched-stage[aria-current] span{opacity:1}
  html.sched-on .sched-stage:is(:hover,:focus-visible){color:var(--gold)}
  html.sched-on .sched-stage:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}

  /* The playhead: a hairline through the lanes, a point on the axis. */
  html.sched-on .sched-head{position:absolute;z-index:2;left:0;top:-6px;width:1px;height:calc(4 * var(--sd-row) + 6px);margin-left:-.5px;pointer-events:none;background:linear-gradient(180deg,#dec38c00,var(--gold) 40%);will-change:transform}
  html.sched-on .sched-head::after{content:"";position:absolute;left:50%;bottom:-4px;width:7px;height:7px;translate:-50% 0;border-radius:50%;background:var(--gold);box-shadow:0 0 0 4px #dec38c2e,0 0 14px #dec38c99}
  html.sched-still .sched-head{display:none}

  /* The end cap: the axis line runs into it; it lights when the build has ended. */
  html.sched-on .sched-end{position:relative;grid-column:3;grid-row:5;align-self:start;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin-top:-1px;padding:0 2px 0 20px;
    border-top:1px solid #dec38c80;font-size:13px;letter-spacing:.02em;color:#f0eee499;transition:color var(--m-feedback) var(--m-ease-out),border-color var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-end::before{content:"";position:absolute;right:100%;top:-1px;width:var(--sd-gap);height:1px;background:#dec38c80}
  html.sched-on .sched-end span{color:var(--gold);transition:transform var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-end.is-on{color:var(--paper);border-top-color:var(--gold)}
  html.sched-on .sched-end:is(:hover,:focus-visible){color:var(--gold);border-top-color:var(--gold)}
  html.sched-on .sched-end:is(:hover,:focus-visible) span{transform:translateY(2px)}
  html.sched-on .sched-end:focus-visible{outline:2px solid var(--gold);outline-offset:4px}

  /* The pause control sits above the dock's right end. */
  html.sched-on .world-pin .timeline-toggle{bottom:calc(var(--sd-bottom) + 4 * var(--sd-row) + var(--sd-axis) + 22px)}

  /* Pins: the lane's card in the world, a leader from the object being built. */
  html.sched-on .sched-pins{position:absolute;inset:0;z-index:2;pointer-events:none}
  html.sched-on .sched-leaders{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
  html.sched-on .sched-leaders line{stroke:var(--gold);stroke-width:1;opacity:0}
  html.sched-on .sched-leaders .sched-dot{fill:var(--gold);opacity:0}
  html.sched-on .sched-leaders .sched-ring{fill:none;stroke:var(--gold);stroke-width:1;opacity:0;transform-box:fill-box;transform-origin:center}
  html.sched-on .sched-pin{position:absolute;left:0;top:0;box-sizing:border-box;width:clamp(290px,21vw,340px);padding:16px 20px 14px;opacity:0;visibility:hidden;will-change:transform,opacity;
    background:#0a1c17e6;border:1px solid #dec38c2e;border-top-color:var(--gold);box-shadow:0 18px 40px #0000004d;color:var(--paper)}
  html.sched-on .sched-pin p{margin:0}
  html.sched-on .sched-pin-lane{font-size:10.5px;line-height:14px;font-weight:500;letter-spacing:.18em;text-transform:uppercase;color:var(--gold)}
  html.sched-on .sched-pin-stage{margin-top:10px !important;font-family:"Instrument Serif","Instrument Serif fallback",serif;font-size:26px;line-height:1.05;color:var(--paper)}
  html.sched-on .sched-pin-stage span{margin-right:10px;font-family:Manrope,"Manrope fallback",sans-serif;font-size:11px;letter-spacing:.14em;color:var(--gold);vertical-align:.45em}
  html.sched-on .sched-pin-line{margin-top:10px !important;font-size:13px;line-height:1.5;color:#f0eee4c4}
  html.sched-on .sched-pin ol{list-style:none;margin:14px 0 0;padding:0;border-top:1px solid #ced6c826}
  html.sched-on .sched-pin li{display:grid;grid-template-columns:34px 1fr;padding:7px 0;font-size:12px;line-height:1.45;color:#f0eee4d9;border-bottom:1px solid #ced6c81a;opacity:.3;transition:opacity var(--m-dissolve) var(--m-ease-out)}
  html.sched-on .sched-pin li:last-child{border-bottom:0;padding-bottom:0}
  html.sched-on .sched-pin li i{font-style:normal;font-size:11px;letter-spacing:.1em;color:var(--gold);font-variant-numeric:tabular-nums}
  html.sched-on .sched-pin li.is-in{opacity:1}
}
@media (min-width:801px) and (prefers-reduced-motion:no-preference){
  html.sched-on:not(.sched-still) .sched-leaders .sched-ring{animation:sched-ring 2.4s var(--m-ease-out) infinite}
  @keyframes sched-ring{0%{transform:scale(.55);stroke-opacity:.9}100%{transform:scale(1.6);stroke-opacity:0}}
}
@media (prefers-reduced-motion:reduce){html.sched-on .sched-pin li{transition:none}}
/* Phone and tablet: the dock folds back to the three step cards; lanes, axis, end cap and pins wait for their own pass. */
@media (max-width:800px){
  .sched{display:contents}
  .sched-plot,.sched-end,.sched-pins{display:none}
}
/* Without the script (no html.sched-on) only the step cards show. */
html:not(.sched-on) :is(.sched-plot,.sched-end,.sched-pins){display:none}

/* ROUND 2 (eve-v4/SCHED.md, ART-fable 2-5). */
@media (min-width:801px){
  /* One source of truth: an item lights on its card on the same beat as its tick on the plot (no slower dissolve). */
  html.sched-on .sched-pin li{transition:opacity var(--m-feedback) var(--m-ease-out)}
  /* Only the lane on the build is in full gold; the finished ones rest quieter. */
  html.sched-on .sched-lane.is-done:not(.is-live) .sched-fill{opacity:.5}
  html.sched-on .sched-lane:not(.is-live) .sched-tick.is-past{color:#dec38cb3}
  /* On Odbiór the playhead drops its riser: a point travelling the axis, not a line into the plant. */
  html.sched-on .sched-head{transition:background-color var(--m-fade) var(--m-ease-out),opacity var(--m-fade) var(--m-ease-out)}
  html.sched-on .sched.is-final .sched-head{background:none}
  /* The three lane captions leave the dock on the finale; they become one line under the headline (world.css). */
  html.sched-on .sched .world-steps small{transition:opacity var(--m-fade) var(--m-ease-out)}
  html.sched-on .sched.is-ended .world-steps small{opacity:0}
  /* The sting: as the schedule completes, "Przygotuj zapytanie" lights gold for two seconds, then rests lit. */
  html.sched-on .sched-end.is-on{animation:sched-sting 2s var(--m-ease-out) 1 both}
  @keyframes sched-sting{0%{color:#f0eee499;border-top-color:#dec38c80;background:linear-gradient(90deg,#dec38c00,#dec38c00)}
    30%{color:var(--gold);border-top-color:var(--gold);background:linear-gradient(90deg,#dec38c00,#dec38c2e 60%,#dec38c00)}
    100%{color:var(--paper);border-top-color:var(--gold);background:linear-gradient(90deg,#dec38c00,#dec38c00)}}
}
@media (prefers-reduced-motion:reduce){html.sched-on .sched-end.is-on{animation:none}}

/* ROUND 3 (eve-v4/SCHED.md): the whole home composed at 1920 x 1080 as carefully as at 1440. Every piece of the dock and
   the cards was set in fixed pixels for 1440, so on a 1920 screen the schedule, its labels and the cards read a size
   smaller against a world that had grown by a third. One factor, --k, scales them with the window in three steps (only
   where the height grew too, so a wide short window keeps its room for the world): 1.12 from 1680 x 950, 1.22 from
   1860 x 1020 (1920 x 1080), 1.45 from 2300 x 1250 (2560 x 1440). The 1440 layout is the k = 1 case, unchanged. */
:root{--k:1}
@media (min-width:1680px) and (min-height:950px){:root{--k:1.12}}
@media (min-width:1860px) and (min-height:1020px){:root{--k:1.22}}
@media (min-width:2300px) and (min-height:1250px){:root{--k:1.45}}
@media (min-width:1680px) and (min-height:950px){
  html.sched-on{--sd-row:calc(30px * var(--k));--sd-axis:calc(50px * var(--k));--sd-bottom:calc(30px * var(--k));--sd-headw:calc(250px * var(--k));--sd-capw:calc(190px * var(--k));--sd-gap:calc(28px * var(--k))}
  html.sched-on body .sched .world-steps a{grid-template-columns:calc(26px * var(--k)) auto calc(16px * var(--k)) minmax(0,1fr);column-gap:calc(8px * var(--k))}
  html.sched-on .sched .world-steps .step-number{font-size:calc(10.5px * var(--k))}
  html.sched-on .sched .world-steps b{font-size:calc(21px * var(--k))}
  html.sched-on .sched .world-steps .step-arrow{font-size:calc(13px * var(--k))}
  html.sched-on .sched .world-steps small{font-size:calc(11px * var(--k))}
  html.sched-on .sched-lane::before{top:calc(50% + 5px * var(--k))}
  html.sched-on .sched-bar{top:calc(50% + 3px * var(--k));height:calc(5px * var(--k))}
  html.sched-on .sched-tick span{font-size:calc(10px * var(--k));line-height:calc(12px * var(--k))}
  html.sched-on .sched-tick::after{top:calc(50% + 1px * var(--k));height:calc(9px * var(--k))}
  html.sched-on .sched-stage{padding:calc(8px * var(--k)) 8px 0 calc(9px * var(--k));font-size:calc(11px * var(--k))}
  html.sched-on .sched-stage span{font-size:calc(10px * var(--k))}
  html.sched-on .sched-head{top:calc(-6px * var(--k));height:calc(4 * var(--sd-row) + 6px * var(--k))}
  html.sched-on .sched-head::after{width:calc(7px * var(--k));height:calc(7px * var(--k))}
  html.sched-on .sched-end{min-height:calc(44px * var(--k));padding-left:calc(20px * var(--k));font-size:calc(13px * var(--k))}
  html.sched-on .sched::before{top:calc(-34px * var(--k))}
  html.sched-on .world-pin .timeline-toggle{zoom:var(--k)}
  /* the cards */
  html.sched-on .sched-pin{width:calc(318px * var(--k));padding:calc(16px * var(--k)) calc(20px * var(--k)) calc(14px * var(--k))}
  html.sched-on .sched-pin-lane{font-size:calc(10.5px * var(--k));line-height:calc(14px * var(--k))}
  html.sched-on .sched-pin-stage{margin-top:calc(10px * var(--k)) !important;font-size:calc(26px * var(--k))}
  html.sched-on .sched-pin-stage span{margin-right:calc(10px * var(--k));font-size:calc(11px * var(--k))}
  html.sched-on .sched-pin-line{margin-top:calc(10px * var(--k)) !important;font-size:calc(13px * var(--k))}
  html.sched-on .sched-pin ol{margin-top:calc(14px * var(--k))}
  html.sched-on .sched-pin li{grid-template-columns:calc(34px * var(--k)) 1fr;padding:calc(7px * var(--k)) 0;font-size:calc(12px * var(--k))}
  html.sched-on .sched-pin li:last-child{padding-bottom:0}
  html.sched-on .sched-pin li i{font-size:calc(11px * var(--k))}
  /* the masthead and the hero block: their items scale as one (no script measures inside them) */
  .masthead > *{zoom:var(--k)}
  html:not(.world-still) .world-copy{width:min(calc(620px * var(--k)),91.2vw);max-width:calc(620px * var(--k))}
  html:not(.world-still) .world-copy h1{font-size:clamp(38px,4.5vw,calc(68px * var(--k)))}
  html:not(.world-still) .world-copy :is(.world-closing-eyebrow,.world-endcap-foot,.world-done){zoom:var(--k)}
  :root{--closing-top:calc(130px * var(--k))}
}

/* ROUND 3: the first five seconds. The schedule is drawn as the world appears, once, the moment the script takes the dock
   (html.sched-on): the axis runs out from the left with its five stages, the three lane tracks follow one beat apart, then
   their scope ticks. 1.3 s in all, inside the title's hold, so the opening reads "here is the plan" before the build
   moves. Clip and opacity only; the loop's later passes never replay it (an animation runs once per element). */
@media (min-width:801px) and (prefers-reduced-motion:no-preference){
  html.sched-on:not(.sched-still) .sched-axis{animation:sched-draw 1.1s var(--m-ease-out) .05s both}
  html.sched-on:not(.sched-still) .sched-lane::before,html.sched-on:not(.sched-still) .sched-bar{animation:sched-draw .9s var(--m-ease-out) both}
  html.sched-on:not(.sched-still) .sched-lane:nth-child(1) :is(.sched-bar),html.sched-on:not(.sched-still) .sched-lane:nth-child(1)::before{animation-delay:.25s}
  html.sched-on:not(.sched-still) .sched-lane:nth-child(2) :is(.sched-bar),html.sched-on:not(.sched-still) .sched-lane:nth-child(2)::before{animation-delay:.37s}
  html.sched-on:not(.sched-still) .sched-lane:nth-child(3) :is(.sched-bar),html.sched-on:not(.sched-still) .sched-lane:nth-child(3)::before{animation-delay:.49s}
  html.sched-on:not(.sched-still) .sched-lane:nth-child(4) :is(.sched-bar),html.sched-on:not(.sched-still) .sched-lane:nth-child(4)::before{animation-delay:.61s}
  html.sched-on:not(.sched-still) .sched-tick{animation:sched-in .5s var(--m-ease-out) .8s both}
  html.sched-on:not(.sched-still) .sched-end:not(.is-on){animation:sched-in .6s var(--m-ease-out) .9s both}
  html.sched-on:not(.sched-still) .sched .world-steps a{animation:sched-in .6s var(--m-ease-out) both}
  html.sched-on:not(.sched-still) .sched .world-steps a:nth-child(2){animation-delay:.12s}
  html.sched-on:not(.sched-still) .sched .world-steps a:nth-child(3){animation-delay:.24s}
  html.sched-on:not(.sched-still) .sched .world-steps a:nth-child(4){animation-delay:.36s}
  @keyframes sched-draw{from{clip-path:inset(-20px 100% -20px 0)}to{clip-path:inset(-20px 0 -20px 0)}}
  @keyframes sched-in{from{opacity:0}to{opacity:1}}
}
/* ROUND 3: before the script takes the dock, desktop showed the phone's three step cards for a moment (the first paint),
   then swapped them for the schedule. The page now marks itself (an inline line in <head>) and the dock waits, invisible,
   for html.sched-on; if the script never comes, it shows anyway after 4 s. */
@media (min-width:801px){
  html.sched-pre:not(.sched-on) .sched{visibility:hidden;animation:sched-late 0s linear 4s forwards}
  @keyframes sched-late{to{visibility:visible}}
}
/* ROUND 3 (ART-fable2 4): when the playhead reaches the end of the axis, "Przygotuj zapytanie" lights gold and holds. */
@media (min-width:801px){
  html.sched-on .sched-end.is-on{color:var(--gold)}
  @keyframes sched-sting{0%{color:#f0eee499;border-top-color:#dec38c80;background:linear-gradient(90deg,#dec38c00,#dec38c00)}
    30%{color:var(--light-gold);border-top-color:var(--gold);background:linear-gradient(90deg,#dec38c00,#dec38c2e 60%,#dec38c00)}
    100%{color:var(--gold);border-top-color:var(--gold);background:linear-gradient(90deg,#dec38c00,#dec38c00)}}
}

/* ROUND 4 (ART-fable2 4): the end cap lights gold when the playhead reaches the bar's right end and holds lit gold. */
@media (min-width:801px){
  html.sched-on .sched-end.is-on{animation:sched-sting-hold 1.2s var(--m-ease-out) 1 both}
  @keyframes sched-sting-hold{0%{color:#f0eee499;border-top-color:#dec38c80;background:linear-gradient(90deg,#dec38c00,#dec38c00)}
    35%{color:var(--gold);border-top-color:var(--gold);background:linear-gradient(90deg,#dec38c00,#dec38c33 60%,#dec38c00)}
    100%{color:var(--gold);border-top-color:var(--gold);background:linear-gradient(90deg,#dec38c00,#dec38c1f 60%,#dec38c00)}}
}
@media (prefers-reduced-motion:reduce){html.sched-on .sched-end.is-on{animation:none;color:var(--gold);border-top-color:var(--gold)}}
/* ROUND 4 (ART-fable2 3): the pin must be seen on its geometry. A 1 px gold leader vanished on the pale daytime frames
   (along the trench at 2.1 it lay over the trench's own gold timbers). The leader is 1.5 px with a dark keyline, and the
   dot is larger with a dark rim, so both read on asphalt, concrete, soil and the night alike. */
@media (min-width:801px){
  html.sched-on .sched-leaders line{stroke-width:1.5;filter:drop-shadow(0 0 1.2px #07140fe6) drop-shadow(0 0 3px #07140f80)}
  html.sched-on .sched-leaders .sched-dot{r:4.5px;stroke:#07140f;stroke-width:1.6px;paint-order:stroke}
  html.sched-on .sched-leaders .sched-ring{stroke-width:1.5;filter:drop-shadow(0 0 1.2px #07140fcc)}
}

/* ROUND 5 (ART-fable4 2): one unbroken gold line in every frame, work -> card -> playhead. The card docks above its own
   stage's column (schedule.js), a 1 px gold riser runs from its bottom edge down to the lanes' top, and the playhead's own
   hairline carries it on, solid now, through the lanes to its point on the axis. The riser wears the leader's dark keyline
   so it reads on the pale ground. */
@media (min-width:801px){
  html.sched-on .sched-leaders .sched-riser{stroke:var(--gold);stroke-width:1;opacity:0;shape-rendering:crispEdges;filter:drop-shadow(0 0 1px #07140fcc)}
  html.sched-on .sched-head{background:var(--gold)}
  html.sched-on .sched.is-final .sched-head{background:none}
  html.sched-still .sched-leaders .sched-riser{display:none}
}

/* ROUND 6 (ART-fable5 1, eve-v4/SCHED.md): the schedule is the hero instrument, not a footer. Round 5 drew the three lanes
   at footer weight (lane block ~110 px, 21 px names, 5 px bars all alike, 10-11 px stage labels and completions). Now the
   dock is ~180 px at 1440 x 900: lane rows 40 px over a 60 px axis, lane names 22 px, every bar a 3 px rule and only the
   lane on the build a 5 px gold one, scope numbers 12 px, stage numbers and names 13 px with the stage under the playhead
   in full gold at full weight (the rest dim), and the completions ("Dojazd gotowy." and so on) at a readable 14 px in gold.
   One factor for the dock, --kd, grows it more gently than the rest of the page at 1920 (k 1.22 -> kd 1.13), so the dock
   reads from across the room without crowding the plant. */
:root{--kd:calc(1 + (var(--k,1) - 1) * .6)}
@media (min-width:801px){
  html.sched-on{--sd-row:calc(38px * var(--kd));--sd-axis:calc(66px * var(--kd));--sd-headw:calc(clamp(312px,22vw,340px) * var(--kd));--sd-capw:calc(clamp(176px,12.4vw,214px) * var(--kd))}
  html.sched-on .sched::before{top:calc(-56px * var(--kd));background:linear-gradient(180deg,#10292200 0%,#102922c2 34%,#102922f2 100%)}
  /* lane heads */
  html.sched-on body .sched .world-steps a{grid-template-columns:calc(28px * var(--kd)) auto calc(18px * var(--kd)) minmax(0,1fr);column-gap:calc(9px * var(--kd))}
  html.sched-on .sched .world-steps .step-number{font-size:calc(13px * var(--kd));opacity:.9}
  html.sched-on .sched .world-steps b{font-size:calc(22px * var(--kd))}
  html.sched-on .sched .world-steps .step-arrow{font-size:calc(14px * var(--kd))}
  html.sched-on .sched .world-steps small{font-size:calc(14px * var(--kd));letter-spacing:.01em;color:var(--gold)}
  html.sched-on:not(.world-still) body .sched:not(.is-ended) .world-steps a small,
  html.sched-on:not(.world-still) body .sched:not(.is-ended) .world-steps a:not([aria-current]) small{opacity:clamp(0,calc((var(--step-p,0) - .9999) * 10000),.92)}
  /* lanes: a 3 px rule each, the live lane a 5 px gold one */
  html.sched-on .sched-lane::before{display:none}
  html.sched-on .sched-bar{top:calc(50% + 4px * var(--kd));height:3px;margin-top:-1.5px;background:#dec38c2e;transition:background var(--m-feedback) var(--m-ease-out),height var(--m-feedback) var(--m-ease-out),margin var(--m-feedback) var(--m-ease-out)}
  html.sched-on .sched-lane.is-live .sched-bar{height:5px;margin-top:-2.5px;background:#dec38c45}
  html.sched-on .sched-fill{opacity:.55}
  html.sched-on .sched-lane.is-live .sched-fill{opacity:1;box-shadow:0 0 12px #dec38c66}
  html.sched-on .sched-lane.is-done:not(.is-live) .sched-fill{opacity:.5}
  html.sched-on .sched-bar::before{top:calc(-14px * var(--kd));bottom:calc(-10px * var(--kd))}
  html.sched-on .sched-tick span{top:calc(2px * var(--kd));font-size:calc(12px * var(--kd));line-height:calc(14px * var(--kd))}
  html.sched-on .sched-tick::after{top:calc(50% - 2px * var(--kd));height:calc(12px * var(--kd))}
  /* the axis: numbers and names 13 px; the stage under the playhead full gold, full weight; the rest dim */
  html.sched-on .sched-stage{padding:calc(11px * var(--kd)) 8px 0 calc(10px * var(--kd));font-size:calc(13px * var(--kd));line-height:1.3;color:#f0eee466;font-weight:400;white-space:normal;text-wrap:balance;padding-right:calc(10px * var(--kd));hyphens:none}
  html.sched-on .sched-stage span{margin-bottom:calc(4px * var(--kd));font-size:calc(13px * var(--kd));letter-spacing:.12em;opacity:.55}
  html.sched-on .sched-stage.is-past{color:#f0eee48c}
  html.sched-on .sched-stage[aria-current]{color:var(--gold);font-weight:600;background:linear-gradient(180deg,#dec38c26,#dec38c00 85%)}
  html.sched-on .sched-stage[aria-current] span{opacity:1}
  html.sched-on .sched-stage:is(:hover,:focus-visible){color:var(--light-gold,var(--gold))}
  /* the playhead through the taller lanes */
  html.sched-on .sched-head{top:calc(-8px * var(--kd));height:calc(4 * var(--sd-row) + 8px * var(--kd))}
  html.sched-on .sched-head::after{width:calc(9px * var(--kd));height:calc(9px * var(--kd));bottom:calc(-5px * var(--kd))}
  html.sched-on .sched-end{min-height:calc(48px * var(--kd));padding-left:calc(20px * var(--kd));font-size:calc(14px * var(--kd))}
}

/* Keep the four lane heads intact while giving the five stage labels room at narrow desktop widths. */
@media (min-width:801px) and (max-width:1199px){
  html.sched-on{--sd-capw:140px;--sd-gap:12px;--sd-axis:82px}
  html.sched-on .sched-stage{padding:8px 2px 0 4px;font-size:10px;line-height:1.2;hyphens:auto}
  html.sched-on .sched-stage span{font-size:11px;margin-bottom:3px}
}

/* ROUND 6 (ART-fable5 3): one card, one dock. One frame (.sched-card, schedule.js) at one width carries every stage's
   words; it slides one column along the schedule on a step change while the words cross-fade inside it, and grows or
   shrinks from its fixed bottom edge, 24 px above the lanes. The pins are the words only. */
@media (min-width:801px){
  html.sched-on .sched-card{position:absolute;left:0;top:0;box-sizing:border-box;width:calc(420px * var(--kd));opacity:0;visibility:hidden;will-change:transform,opacity;pointer-events:none;
    background:#0a1c17eb;border:1px solid #dec38c2e;border-top-color:var(--gold);box-shadow:0 18px 40px #0000004d}
  html.sched-on .sched-pin{width:calc(420px * var(--kd));padding:calc(18px * var(--kd)) calc(24px * var(--kd)) calc(16px * var(--kd));background:none;border:1px solid #0000;box-shadow:none}
  html.sched-on .sched-pin-line{max-width:34em}
}

/* ROUND 6 (ART-fable5 5): the end cap's label lifts off into the gate under the headline at the finale (world.js writes
   its opacity); the end cap keeps its gold rule and lights as the playhead reaches it. */
html.sched-on .sched-end .sched-end-label{color:inherit;display:inline-flex;align-items:center;justify-content:space-between;gap:12px;flex:1;transition:none}
html.sched-on .sched-end .sched-end-label span{color:var(--gold);transition:transform var(--m-feedback) var(--m-ease-out)}
html.sched-on .sched-end:is(:hover,:focus-visible) .sched-end-label{transform:none}
html.sched-on .sched-end:is(:hover,:focus-visible) .sched-end-label span{transform:translateY(2px)}

/* ROUND 7 (ART-fable7 1, eve-v4/SCHED.md): at step 05 the three lanes become one. Column 05 had no bar. Three pre-drawn
   paths bend from each lane's row at the column's left edge into one 5 px gold line along the middle lane, running to
   the plot's right edge (the dim track is always there: the plan says it from frame zero). The gold copy is revealed
   behind the playhead by two opposite translations (a clip box moves left, its content moves back right), so the reveal
   is transform only on a layer that never repaints; no filters, no dash offsets. Path geometry is written by
   schedule.js on resize only. "Wszystko się łączy." stands over the merged line once the lanes have joined; the Biogaz
   lane's own completion steps aside for it (the same words are never on screen twice). */
@media (min-width:801px){
  html.sched-on .sched-merge{position:absolute;z-index:1;left:80%;width:20%;top:0;height:calc(4 * var(--sd-row));pointer-events:none}
  html.sched-on .sched-merge svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
  html.sched-on .sched-merge path{fill:none;stroke-linecap:round}
  html.sched-on .sched-merge-track path{stroke:#dec38c2e;stroke-width:3}
  html.sched-on .sched-merge-track path:last-child{stroke-width:5}
  html.sched-on .sched-merge-clip{position:absolute;inset:-12px 0;overflow:hidden;transform:translateX(-100%);will-change:transform}
  html.sched-on .sched-merge-in{position:absolute;inset:12px 0;transform:translateX(100%);will-change:transform}
  html.sched-on .sched-merge-gold path{stroke:var(--gold);stroke-width:3}
  html.sched-on .sched-merge-gold path.trunk{stroke-width:5}
  html.sched-on .sched-merge-gold path.glow{stroke:#dec38c26;stroke-width:11}
  html.sched-on .sched-merge-cap{position:absolute;left:34%;bottom:calc(100% - var(--sd-row) * 2 - 4px * var(--kd) + 11px * var(--kd));white-space:nowrap;font-size:calc(14px * var(--kd));line-height:1;letter-spacing:.01em;color:var(--gold);opacity:0;will-change:opacity}
  html.sched-on:not(.world-still) body .sched.is-merged .world-steps a[href="biogaz/"] small{opacity:0}
}
@media (min-width:801px) and (prefers-reduced-motion:no-preference){
  html.sched-on:not(.sched-still) .sched-merge-track{animation:sched-draw .9s var(--m-ease-out) .61s both}
}

/* ROUND 7 (ART-fable7 4): the card frame is scaled from its bottom edge (schedule.js), so its gold top rule is its own
   1 px element riding the top edge; the frame keeps the faint border on its other three sides. */
@media (min-width:801px){
  html.sched-on .sched-card{transform-origin:0 100%;border-top-color:#dec38c2e}
  html.sched-on .sched-card-rule{position:absolute;left:0;top:0;width:calc(420px * var(--kd));height:1px;background:var(--gold);opacity:0;visibility:hidden;will-change:transform,opacity;pointer-events:none}
}

/* ROUND 8 (ART-fable8 home 2): the playhead is the card's spine. The card's left edge rides the playhead (schedule.js), so
   its left border is the playhead's own gold line, running plant -> card -> lane. */
@media (min-width:801px){
  html.sched-on .sched-card{border-left-color:var(--gold)}
}

/* ROUND 8 (ART-fable8 home 3): the merged line runs to the lane block's end (schedule.js sets its width), three ticks on
   its trunk light behind the playhead (dim track ticks always drawn; the gold ones ride the same transform-only reveal),
   and the lane rows' completions stay on screen through the finale, each sealed (full strength, lane name in gold) as its
   tick lights. The hero's own line of the same three phrases is retired on desktop: the words are never on screen twice. */
@media (min-width:801px){
  html.sched-on .sched-merge-track path.ticks{stroke:#dec38c40;stroke-width:1.5;stroke-linecap:butt}
  html.sched-on .sched-merge-gold path.ticks{stroke:var(--gold);stroke-width:1.5;stroke-linecap:butt}
  html.sched-on:not(.world-still) body .sched.is-ended .world-steps a small{opacity:.92}
  html.sched-on:not(.world-still) body .sched .world-steps a.is-sealed small{opacity:1}
  html.sched-on:not(.world-still) body .sched .world-steps a.is-sealed b{color:var(--gold);transition:color var(--m-fade) var(--m-ease-out)}
  html.sched-on:not(.world-still) body .sched.is-merged .world-steps a[href="biogaz/"] small{opacity:0}
  html.sched-on.world-ended:not(.world-still) .world-copy .world-done{display:none}
}

/* CRISP 3 (ART-fable-bright2 3): the schedule stands on a crisp panel, not in a fog. The dock's ground was a gradient that
   rose out of the picture (transparent to 95 % over ~260 px): it veiled the trench, the tank's base and the truck, and
   still left the ticks on a half-lit ground. Now it is an opaque strip in the shell's green with a hard top edge (one
   gold hairline), from the window's left edge to its right: the picture above it is untouched to the last pixel row,
   and the lanes, ticks and stage names sit on a flat ground. */
@media (min-width:801px){
  html.sched-on:not(.world-still) body .sched::before{left:-4.9%;right:-4.9%;top:calc(-20px * var(--kd));bottom:calc(-1 * var(--sd-bottom));background:#0e251e;border-top:1px solid #dec38c59}
}

/* LIVE1 (ART-fable-live1 5): the card's panel is opaque (was 92 %: busy film showed through the words); it never fades,
   only its words cross-fade (schedule.js). */
@media (min-width:801px){
  html.sched-on .sched-card{background:#0a1c17}
}

/* LIVE1 (ART-fable-live1 4): each lane has its own accent, held back to three places: its bar's fill (and the live bar's
   glow), the card's lane eyebrow, the active step tab. Droga amber, Sieć copper, Biogaz a fresh green: three neighbours of
   the site's gold (same lightness band, oklab), so the instrument stays gold-and-green and only the lanes read apart. The
   playhead, ticks, merged line and Odbiór (all three lanes) stay gold. */
:root{--lane-droga:#e3ae52;--lane-siec:#d58c60;--lane-biogaz:#9fcf80;--lane-magazyn:#8fc6cf}
html.sched-on body .sched-lane[data-lane=droga],html.sched-on body .sched-pin:is([data-pin=prep],[data-pin=droga]),html.sched-on body .sched .world-steps a[href="droga/"]{--lane:var(--lane-droga)}
html.sched-on body .sched-lane[data-lane=siec],html.sched-on body .sched-pin[data-pin=siec],html.sched-on body .sched .world-steps a[href="siec/"]{--lane:var(--lane-siec)}
html.sched-on body .sched-lane[data-lane=biogaz],html.sched-on body .sched-pin[data-pin=biogaz],html.sched-on body .sched .world-steps a[href="biogaz/"]{--lane:var(--lane-biogaz)}
/* FOUR (story/EVE-v2.md): Magazyn energii, a cool mineral blue in the same lightness band (the white containers' cool side), on its bar and lane head only: no card or ring of its own until its footage exists. */
html.sched-on body .sched-lane[data-lane=magazyn],html.sched-on body .sched .world-steps a[href="magazyn/"]{--lane:var(--lane-magazyn)}
html.sched-on body .sched-lane .sched-fill{background:var(--lane,var(--gold))}
html.sched-on body .sched-pin .sched-pin-lane{color:var(--lane,var(--gold))}
html.sched-on body .sched .world-steps a[aria-current]{border-top-color:var(--lane,var(--gold))}
html.sched-on body .sched .world-steps a[aria-current] b{color:var(--lane,var(--gold))}
@media (min-width:801px){
  html.sched-on body .sched-lane.is-live .sched-fill{box-shadow:0 0 12px color-mix(in oklab,var(--lane,var(--gold)) 40%,transparent)}
}

/* R10 4 (ART-fable-r10 4): "Wszystko się łączy." is written in one place only, over the merged line (where the three
   lanes do join). The Biogaz lane's own copy of it stepped aside as the caption came in, but its 360 ms fade-out and the
   caption's fade-in overlapped, so both stood on screen at once. The lane row keeps it in the DOM (its link text for
   readers) and never shows it on the playing desktop build. */
@media (min-width:801px){
  html.sched-on:not(.world-still) body .sched .world-steps a[href="biogaz/"] small,
  html.sched-on:not(.world-still) body .sched.sched .world-steps a[href="biogaz/"].is-sealed small{opacity:0;transition:none}
}

/* R10 6 (ART-fable-r10 6): one marker style, a dot on the work and a short line toward the card (schedule.js MARK_LEN);
   the pulsing ring is gone (it read as a second marker, a lone hollow ring on the flare). On desktop the card hangs in one
   fixed slot at the top right (schedule.js), so its left edge is no longer the playhead's line: a faint edge like the rest. */
html.sched-on .sched-leaders .sched-ring{display:none}
@media (min-width:801px){
  html.sched-on:not(.sched-still) .sched-card{border-left-color:#dec38c2e}
}

/* R11 5 (ART-fable-r11 5): the marker is a 14 px ring (no fill, no pulse) and a 1 px leader, both in the lane's colour
   (Odbiór: gold). The old 3 px dot circle becomes the ring's 1 px dark keyline just outside it, so a copper ring still
   reads on copper bushings and a gold one on the lit plant (it shares the ring's centre and opacity). */
html.sched-on body .sched-leaders .sched-dot{display:inline;r:9px;fill:none;stroke:#0a1c17;stroke-opacity:.6;stroke-width:1px;paint-order:normal}
html.sched-on body .sched-leaders .sched-ring,html.sched-on:not(.sched-still) body .sched-leaders .sched-ring{display:inline;r:7px;fill:none;stroke-width:2px;stroke-opacity:1;animation:none;transform:none;filter:none}   /* never the old pulse (R10 6) */
html.sched-on body .sched-leaders line[data-leader]{stroke-width:1px}
/* Keep moving marker paints and the fixed shell local to their own boxes. */
html.sched-on .sched-leaders,html.sched-on .sched-card{contain:layout paint}
html.sched-on body .sched-leaders :is([data-ring=prep],[data-ring=droga],[data-leader=prep],[data-leader=droga]){stroke:var(--lane-droga)}
html.sched-on body .sched-leaders :is([data-ring=siec],[data-leader=siec]){stroke:var(--lane-siec)}
html.sched-on body .sched-leaders :is([data-ring=biogaz],[data-leader=biogaz]){stroke:var(--lane-biogaz)}
html.sched-on body .sched-leaders :is([data-ring=odbior],[data-leader=odbior]){stroke:var(--gold)}

/* R12 1 (ART-fable-r12 1): the desktop card is 340 px wide (x --kd; was 420) and fits its own words (schedule.js: no shared
   lintel height), so a short step no longer carries an empty lower half over the picture. */
@media (min-width:801px){
  html.sched-on .sched-card,html.sched-on .sched-pin,html.sched-on .sched-card-rule{width:calc(340px * var(--kd))}
  html.sched-on .sched-pin{padding:calc(16px * var(--kd)) calc(20px * var(--kd))}
}

/* R12 3 (ART-fable-r12 3): ring only, no leader; the card's top rule takes the lane's colour (Droga amber, Sieć copper,
   Biogaz green, Odbiór gold: the same accents as the bars and the ring), so ring and card read as one without a line. */
html.sched-on body .sched-leaders line[data-leader]{display:none}
@media (min-width:801px){
  html.sched-on .sched-card-rule:is([data-lane=prep],[data-lane=droga]){background:var(--lane-droga)}
  html.sched-on .sched-card-rule[data-lane=siec]{background:var(--lane-siec)}
  html.sched-on .sched-card-rule[data-lane=biogaz]{background:var(--lane-biogaz)}
}
@media (max-width:800px){
  html.sched-on .sched-card:is([data-lane=prep],[data-lane=droga]){border-top-color:var(--lane-droga)}
  html.sched-on .sched-card[data-lane=siec]{border-top-color:var(--lane-siec)}
  html.sched-on .sched-card[data-lane=biogaz]{border-top-color:var(--lane-biogaz)}
}

/* R12 5 (ART-fable-r12 5): a sub-step not yet reached stands at 55 % (was 30 %, read as broken in d-04): upcoming, legible. */
@media (min-width:801px){
  html.sched-on .sched-pin li{opacity:.55}
  html.sched-on .sched-pin li.is-in{opacity:1}
}

/* R12 6 (ART-fable-r12 6): the desktop 05 card ends on the same "Przygotuj zapytanie" row as the phone's (same link, same
   target #kontakt, the gold-outlined 44 px row x --kd), instead of a short card over the start of the finale. Out of the
   tab order like the phone's (the masthead's link is the keyboard's); it takes the pointer only while its card is up. */
@media (min-width:801px){
  html.sched-on .sched-pin-cta{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:calc(44px * var(--kd));margin-top:calc(14px * var(--kd));padding:0 calc(14px * var(--kd));
    border:1px solid var(--gold);color:var(--gold);font-size:calc(14px * var(--kd));letter-spacing:.02em;text-decoration:none;pointer-events:auto}
  html.sched-on .sched-pin-cta:is(:hover,:focus-visible){background:#dec38c14}
}

/* FOUR (story/EVE-v2.md): the lane-head column was 272-318 px; „Magazyn energii → Magazyn gotowy.” is the longest head and
   was clipped to „Magazyn g…” at 1440. The column is 312-340 px (x --kd); the plot gives up the difference. */
