/* CANIS VIGIL additions on top of the shared site.css (the lab's design language, both themes; no own accent colour:
   the one orange --signal marks the current / live / selected thing, cyan marks data and finished steps).
   The students' yellow-and-black hazard tape became a drafting hatch: the section line of an engineering drawing. */

/* ---------- 01 hero: a longer statement than CANIS AUTONOMA, so a smaller size from the same column rule ---------- */
.hero h1.sci{font-size:clamp(24px,6.9cqi,54px);line-height:1}
.hero h1.sci .stroke{font-size:.72em}
.hero .lead b{font-weight:600;color:var(--fg)}
.film{aspect-ratio:1168/526;object-fit:cover}
/* the Isaac Sim footage has a white studio: letterbox slivers and the frame behind it take its grey, in both themes */
.film,.rbox video,.gal figure{background:#f2f2f2}
/* the drawn ≈ inside a key number takes the number's type, not the caption style of .fact span */
.fact b .gl{max-width:none;font:inherit;letter-spacing:0;text-transform:none;color:inherit}
/* the cover frame is a white studio render: in the dark theme the scrim keeps it a faint ghost behind the text */
@media (min-width:901px){#top::before{background:
  linear-gradient(90deg,rgba(var(--bg-rgb),.97) 0%,rgba(var(--bg-rgb),.93) 32%,rgba(var(--bg-rgb),.86) 60%,rgba(var(--bg-rgb),.8) 100%),
  linear-gradient(0deg,rgba(var(--bg-rgb),1) 0%,rgba(var(--bg-rgb),.86) 22%,rgba(var(--bg-rgb),0) 52%),
  linear-gradient(180deg,rgba(var(--bg-rgb),.82) 0%,rgba(var(--bg-rgb),0) 26%)}}
/* the hazard tape of the original, redrawn as a hatched section line along the bottom edge of the cover */
#top::after{content:"";position:absolute;left:0;right:0;bottom:0;height:8px;border-top:1px solid var(--line);
  background:repeating-linear-gradient(-45deg,var(--line-strong) 0 1px,transparent 1px 7px)}

/* notes under a block start at the column's left edge like everything else (the text still wraps at 110ch) */
.page>.note{max-width:var(--maxw);padding-right:max(0px,calc(min(100%,var(--maxw)) - 110ch))}

/* ---------- 02 the three places: one row of three sheets down to tablets ---------- */
@media (min-width:701px) and (max-width:1200px){.uses{grid-template-columns:repeat(3,minmax(0,1fr))}}
.goal p.muted{font-size:15.5px;line-height:1.6}

/* ---------- 03 the 3D cycle ---------- */
#dog3d .tag3{top:auto;bottom:62px}
#dogbar .sp{flex:1 1 auto}
/* the buttons over the live 3D view: no blur (it would be recomputed every frame), the plate is opaque enough */
#dogbar button,#dog3d .tag3,.stat3{-webkit-backdrop-filter:none;backdrop-filter:none}
/* the current step: a HUD plate (number + what the robot is doing) */
.stat3{position:absolute;right:14px;top:14px;z-index:2;display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;align-items:start;
  max-width:min(340px,calc(100% - 28px));padding:11px 13px 12px;background:var(--glass);border:1px solid var(--line-strong);color:var(--muted);font-size:13px;line-height:1.45}
.stat3>i{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line-strong);font:500 12px/1 var(--f-mono);font-style:normal;color:var(--signal-text);transition:background-color .25s,border-color .25s,color .25s}
.stat3 b{display:block;margin-bottom:2px;font-family:var(--f-display);font-stretch:129%;font-weight:810;font-size:14px;line-height:1.2;letter-spacing:.01em;text-transform:uppercase;color:var(--fg)}
/* the alert (the bag is left, the operator is notified): the plate is marked with the signal */
.stat3.alert{border-color:var(--signal)}
.stat3.alert>i{background:var(--signal-fill);border-color:var(--signal-fill);color:var(--on-signal)}
.stat3.alert::after{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:2px;background:var(--signal)}
.side3{display:grid;gap:clamp(18px,2vw,26px);align-content:start;min-width:0}
/* the seven steps: a ruled index like the rail; done = cyan, current = signal */
.steps7{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border-top:1px solid var(--line-strong);counter-reset:s}
.steps7 li{position:relative;counter-increment:s;display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:14px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--line);transition:background-color .25s}
.steps7 li::before{content:counter(s);grid-row:span 2;display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line-strong);font:500 11.5px/1 var(--f-mono);color:var(--caption);transition:background-color .25s,border-color .25s,color .25s}
.steps7 b{font-size:14.5px;font-weight:600;line-height:1.25;color:var(--fg)}
.steps7 span{margin-top:2px;font:400 11px/1.4 var(--f-mono);letter-spacing:.02em;color:var(--caption)}
.steps7 li.done::before{border-color:rgba(var(--cyan-rgb),.55);color:var(--cyan)}
.steps7 li.on{background:var(--tile-on)}
.steps7 li.on::after{content:"";position:absolute;left:0;top:-1px;bottom:-1px;width:2px;background:var(--signal)}
.steps7 li.on::before{background:var(--signal-fill);border-color:var(--signal-fill);color:var(--on-signal)}
.steps7 li.on span{color:var(--muted)}
/* the operator log: a mono console sheet */
.log3{padding:12px 14px 14px;border:1px solid var(--line-strong);background:var(--surface)}
.log3 h6{display:flex;align-items:center;gap:10px;margin:0 0 10px;padding-bottom:10px;border-bottom:1px solid var(--line);font:400 11px/1.2 var(--f-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--fg)}
.log3 h6::before{content:"";flex:none;width:6px;height:6px;background:var(--signal)}
.log3 h6 span{margin-left:auto;letter-spacing:.08em;color:var(--caption)}
.log3 ul{list-style:none;margin:0;padding:0;display:grid;gap:6px;min-height:118px;align-content:start}
.log3 li{display:grid;grid-template-columns:46px minmax(0,1fr);gap:10px;font:400 12px/1.45 var(--f-mono);color:var(--muted);animation:logIn .35s ease}
.log3 li time{color:var(--caption);font-variant-numeric:tabular-nums}
.log3 li:first-child{color:var(--fg)}
.log3 li.w time{color:var(--cyan)}
.log3 li.r,.log3 li.r time{color:var(--signal-text)}
.log3 li .gl{width:1.2em}
@keyframes logIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* ---------- 04 the Isaac Sim replay: the phase strip under the video and the phase list ---------- */
.pbar{position:relative;display:flex;height:30px;border:1px solid var(--line-strong);background:var(--cell)}
.pbar button{position:relative;z-index:1;min-width:0;padding:0;border:0;border-right:1px solid var(--line);background:transparent;color:var(--muted);font:500 10.5px/1 var(--f-mono);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:clip;transition:color .2s,background-color .2s}
.pbar button:last-child{border-right:0}
.pbar button:hover{color:var(--fg);background:var(--tint)}
.pbar button.past{color:var(--cyan)}
.pbar button.on{color:var(--fg)}
.pbar button.on::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--signal)}
.pbar button:focus-visible{outline:2px solid var(--signal);outline-offset:-2px}
.pbar .fill{position:absolute;left:0;top:0;bottom:0;z-index:0;width:0;background:rgba(var(--cyan-rgb),.13);box-shadow:inset -1px 0 0 var(--signal);pointer-events:none}
.phases{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border-top:1px solid var(--line-strong)}
.phases li{position:relative;display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:12px;align-items:center;padding:6px 10px;border-bottom:1px solid var(--line);color:var(--muted);font-size:14px;line-height:1.3;cursor:pointer;transition:background-color .2s,color .2s}
.phases li:hover{background:var(--tint);color:var(--fg)}
.phases li:focus-visible{outline:2px solid var(--signal);outline-offset:-2px}
.phases li i{display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--line-strong);font:500 11px/1 var(--f-mono);font-style:normal;color:var(--caption);transition:background-color .2s,border-color .2s,color .2s}
.phases li em{font:400 11px/1 var(--f-mono);font-style:normal;letter-spacing:.04em;color:var(--caption);font-variant-numeric:tabular-nums}
.phases li.past{color:var(--fg)}
.phases li.past i{border-color:rgba(var(--cyan-rgb),.55);color:var(--cyan)}
.phases li.on{background:var(--tile-on);color:var(--fg)}
.phases li.on::before{content:"";position:absolute;left:0;top:-1px;bottom:-1px;width:2px;background:var(--signal)}
.phases li.on i{background:var(--signal-fill);border-color:var(--signal-fill);color:var(--on-signal)}
.phases li.on em{color:var(--fg)}
/* the middle number is a word (на полу / в захвате / в ящике): its column is wider */
.mstat{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr)}
.mstat b{font-size:clamp(18px,1.55vw,22px);white-space:nowrap}
.phases{flex:1 1 auto}
.phases li{flex:1 1 auto}
.rbox .evt{min-height:68px}
.evt.ok{border-left-color:var(--signal)}
.evt.ok::before{background:var(--signal)}

/* ---------- 05 how it works: six steps in rows of three ---------- */
.flow.f3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (min-width:1201px){.flow.f3>div:nth-child(3n)::after{content:none}}

/* ---------- 06 components: six sheets ---------- */
.lc{text-transform:none}                                    /* RealSense D435i keeps its lower-case i in the upper-case title */
@media (min-width:701px) and (max-width:1000px){#arch .grid3{grid-template-columns:repeat(2,minmax(0,1fr))}}
#arch .tbl td:first-child{width:32%}

/* ---------- 08 the six tasks: a hairline sheet; shown in the simulation = cyan, partly = signal outline ---------- */
.tasks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line-strong);border-left:1px solid var(--line)}
.task{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px 16px;align-items:start;align-content:start;min-width:0;padding:20px 22px 22px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--tile);transition:background-color .3s}
.task:hover{background:var(--tile-hover)}
.task>i{grid-row:span 2;display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line-strong);font:500 12px/1 var(--f-mono);font-style:normal;color:var(--caption)}
.task.ok>i{border-color:rgba(var(--cyan-rgb),.6);color:var(--cyan)}
.task span{min-width:0;font-size:14.5px;line-height:1.55;color:var(--muted)}
.task span b{display:block;margin-bottom:8px;font-family:var(--f-display);font-stretch:129%;font-weight:810;text-transform:uppercase;font-size:clamp(15px,1.15vw,17px);line-height:1.12;letter-spacing:-.004em;color:var(--fg)}
.task>em{grid-column:2;justify-self:start;margin-top:6px;font-style:normal}
.pill.g,.pill.y{color:var(--fg)}
.pill.g::before{border-color:var(--cyan);background:var(--cyan)}
.pill.y::before{border-color:var(--signal)}

/* ---------- 09 team: five name plates in one row (two per row below 1200 px, the odd last one spans both) ---------- */
.team{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-top:1px solid var(--line-strong);border-left:1px solid var(--line)}
.team>div{display:flex;align-items:center;gap:14px;min-width:0;padding:18px 20px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--tile)}
.team i{flex:none;display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line-strong);font:500 12.5px/1 var(--f-mono);font-style:normal;letter-spacing:.06em;color:var(--fg)}
.team b{min-width:0;font-size:15.5px;font-weight:600;line-height:1.3;color:var(--fg)}

/* ---------- 09 frames: white studio renders, so the caption sits on a crisp plate instead of a dark fog ---------- */
.gal figcaption{padding:9px 12px 10px;background:rgba(var(--scrim),.84)}
/* phones: the frames are small, so the plate goes under the frame instead of covering half of it */
@media (max-width:700px){
  .gal figure,.gal figure.w{display:flex;flex-direction:column;aspect-ratio:auto}
  .gal img{flex:none;height:auto;aspect-ratio:16/10}
  .gal figcaption{position:relative;flex:1 1 auto;padding:8px 10px 9px}
}
/* ---------- footer: the wordmark spans the column (CANIS VIGIL is 7.16em wide) ---------- */
.foot-mark{font-size:clamp(26px,calc((min(100vw - var(--rail),var(--maxw) + 2 * var(--pad)) - 2 * var(--pad)) / 7.3),150px)}

/* ---------- responsive ---------- */
@media (max-width:1200px){
  .side3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team>div:last-child:nth-child(odd){grid-column:1/-1}
  .flow.f3>div:nth-child(3n)::after{content:""}
  .flow.f3>div:nth-child(2n)::after{content:none}
}
@media (max-width:900px){.tasks,.side3{grid-template-columns:minmax(0,1fr)}}
@media (max-width:700px){
  .flow.f3{grid-template-columns:minmax(0,1fr)}
  .flow.f3>div:not(:last-child)::after{content:""}
  #dog3d{min-height:440px}
  #dog3d .tag3,#dogbar .sp{display:none}
  .stat3{left:10px;right:10px;top:10px;max-width:none;padding:9px 11px 10px;font-size:12px}
  #dogbar{left:10px;right:10px;bottom:10px}
  #dogbar button{padding:0 9px;letter-spacing:.04em}
  .pbar button{font-size:0}
  .mstat b{font-size:16px}
  .team{grid-template-columns:minmax(0,1fr)}
  .task{padding:18px 16px 20px}
  #arch .tbl td:first-child{width:40%;white-space:normal}
}

/* light mode (phones, weak PCs, data saver, reduced motion — set in <head>): no glass blur, no endless animation */
html.lite *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.lite .site-header[data-scrolled="true"],html.lite body.menu-open .site-header{background:var(--bg)}
html.lite .kick .badge::before,html.lite .chip.live::before,html.lite .scrollhint::after{animation:none!important}
