/* IKTEN landing · section «ΕΣΥ ΕΛΕΓΧΕΙΣ ΚΙ ΕΓΚΡΙΝΕΙΣ.» (#elegxos) · owner: builder ct · class prefix: ele-
   Purpose and Greek copy: work/FINAL_SPEC.md 3.10, work/PLAN_LIGHT.md B4. Look: work/LIGHT_SPEC.md (the contract is its part f).
   This file styles ONLY this section: every selector carries a class that starts with .ele- (or .sec-elegxos, or #elegxos),
   and every @keyframes name starts with ele-. The build refuses anything else.
   Shared materials (plate, tray, glass frame, page, stamp, keys, lamps, drums) are the .m-… classes of css/prims.css
   and the classes of css/page.css: used, never copied. The two pictures of the app are the kit's own markup (ik-…),
   light theme, sized and moved from outside only.

   The one moment: THE GATE. A slide switch tries the checks; the app's «Έλεγχοι» tab answers; a bay of black glass
   delivers the page of the αναλυτική out of a slot, or sinks it back and closes a shutter. Under it «Έγκριση» lands
   your stamp, «Ζήτα μια αλλαγή» stacks a new version in front. Beside it, smaller: the filing folder.
   Knobs: --ele-s (scale of the app pictures: 1.06 keeps the app's smallest type, 10.5 px, at 11 px or more),
   --m-k (size of the page in the bay). Heights of the two app screens are set by js/sec-elegxos.js (the tallest of
   their states); without a script they take their content's height. */

.sec-elegxos { --ele-s: 1.06; }
.ele-in { max-width: var(--page-max, 1840px); margin-inline: auto; }

/* ─────────────── the two rows ─────────────── */
.ele-r1 { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 20vw, 420px); gap: clamp(28px, 3.2vw, 60px); align-items: stretch; }
.ele-r2 { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2.05fr) minmax(0, .85fr); gap: clamp(28px, 3vw, 52px);
  align-items: start; margin-top: clamp(30px, 4vh, 56px); }
.ele-txt h3 { font: 640 clamp(21px, 1.7vw, 27px)/1.14 var(--f-text); letter-spacing: -.014em; color: var(--ink); }
.ele-txt p { margin-top: 12px; max-width: 34em; font-size: clamp(15.5px, 1.1vw, 17.5px); line-height: 1.5; color: var(--ink-2); }
.ele-txt h3 + p { margin-top: 14px; }
.ele-in .ele-note { margin-top: 14px; max-width: 30em; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.ele-in .ele-small { margin-top: 22px; font-size: 13.5px; color: var(--ink-3); }

/* the column beside the gate: the sentence at the top, the numeral at the foot, on the gate's lines */
.ele-why { display: flex; flex-direction: column; justify-content: space-between; gap: 36px; padding-top: 4px; }
.ele-num { --m-num-size: clamp(88px, 8vw, 128px); }
.ele-num p { max-width: 30em; }

/* ─────────────── THE GATE (plate A) ─────────────── */
.ele-gate { --m-plate-pad: clamp(14px, 1.3vw, 20px); position: relative; display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0 clamp(14px, 1.4vw, 22px); }
.ele-gate__l { display: flex; flex-direction: column; min-width: 0; }
.ele-gate__r { display: flex; flex-direction: column; min-width: 0; }
.ele-gate__lbl { margin: 1px 2px 9px; }

/* the slide switch: a recessed track of three cells, one black cap that slides onto the chosen one */
.ele-slide { --ele-i: 0; position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 56px; padding: 5px; border-radius: 12px; background: var(--tray); touch-action: pan-y;
  box-shadow: inset 0 0 0 1px var(--ink), inset 0 4px 7px rgba(var(--sh), .2), 0 1px 0 #fff; }
.ele-slide__c { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-width: 0;
  padding: 0 6px; border: 0; border-radius: 9px; background: none; cursor: pointer; text-align: center;
  font: 750 15px/1.05 var(--f-display); letter-spacing: .1em; color: var(--ink-3); -webkit-tap-highlight-color: transparent; }
.ele-slide__c + .ele-slide__c::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 1px;
  background: rgba(var(--sh), .26); box-shadow: 1px 0 0 rgba(255, 255, 255, .75); }
.ele-slide__c:focus-visible { outline: none; }
.ele-slide:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.ele-slide:has(.ele-slide__c:focus):not(:has(.ele-slide__c:focus-visible)) { outline: none; }
@media (hover: hover) and (pointer: fine) {
  .ele-slide__c[aria-checked="false"]:hover { color: var(--ink); }
}
.ele-slide__cap { position: absolute; z-index: 2; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3);
  transform: translateX(calc(var(--ele-i) * 100%)); transition: transform 260ms var(--inout); pointer-events: none; }
.ele-slide.is-drag .ele-slide__cap { transition: none; }
.ele-slide__knob { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 6px; border-radius: 9px;
  background: linear-gradient(180deg, var(--blk-a), var(--blk-b)); color: #fff; text-align: center;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, .34), 0 3px 4px -1px rgba(var(--sh), .35), 0 10px 14px -10px rgba(var(--sh), .7); }
.ele-slide__capt { font: 750 15px/1.05 var(--f-display); letter-spacing: .1em; }
.ele-slide.is-land .ele-slide__knob { animation: ele-dip 300ms var(--spring); }
@keyframes ele-dip { 0% { transform: none; } 30% { transform: translateY(2px); } 100% { transform: none; } }
html:not(.js) .ele-slide, html:not(.js) .ele-gate__lbl { display: none; }

/* the screen of the app: the deliverable open on «Έλεγχοι» */
.ele-screen { margin-top: 13px; margin-bottom: 7px; flex: 1 0 auto; height: var(--ele-scr-h, auto); }
.ele-app { position: relative; width: calc(100% / var(--ele-s)); height: calc(100% / var(--ele-s)); transform: scale(var(--ele-s));
  transform-origin: 0 0; background: var(--surface-2); --ik-ico-stroke: 2; --ik-vh: 6px; }
html:not(.js) .ele-app, html:not(.js) .ele-fapp { width: auto; height: auto; transform: none; }
html:not(.js) .ele-screen { background: #fff; }
.ele-app__fill { flex: 1; }
.ele-elg > * { transition: opacity 180ms linear; }
.ele-elg.is-swap > * { opacity: 0; transition: none; }

/* the output bay: black glass; a strip with the lamp, what the bay says and the version on drums; the well with the slot */
.ele-bay { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 320px; }
.ele-bay__top { position: relative; z-index: 4; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 12px 9px 15px;
  color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .1); }
.ele-bay__say { flex: 1; min-width: 0; font: 750 15px/1.15 var(--f-display); letter-spacing: .1em; color: #fff; }
.ele-bay__led:not(.is-on) { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .42); }
.ele-bay__ver { display: flex; align-items: center; gap: 8px; flex: none; }
.ele-bay__ver .m-label { color: rgba(255, 255, 255, .78); }
.ele-bay__odo { font: 800 30px/1 var(--f-display); }
.ele-bay__odo .odo__d { box-shadow: inset 0 .022em 0 rgba(255, 255, 255, .24), inset 0 -.1em .11em rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .28); }
html:not(.js) .ele-bay__odo { color: #fff; }
.ele-bay__well { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* the pages are cut at the lip of the slot: what stands above it is out, the rest is still in the machine */
.ele-stack { position: absolute; left: 0; right: 0; top: 0; bottom: 14px; overflow: hidden; }
.ele-pg { --m-k: .8; position: absolute; left: clamp(16px, 1.9vw, 28px); right: clamp(14px, 1.6vw, 24px); top: 40px;
  transform: translate(var(--ele-x, 0px), calc(var(--ele-y, 0px) + var(--ele-sink, 0%)));
  transition: transform 420ms var(--out); }
.ele-gate.is-pre .ele-pg, .ele-pg.is-new { --ele-sink: 106%; transition: none; }
.ele-gate.is-rise .ele-pg { transition-duration: 600ms; }
/* blocked: the pages sink into the slot (420 ms), then the shutter closes over it (220 ms) */
.ele-gate[data-state="block"] .ele-pg { --ele-sink: 106%; transition: transform 420ms var(--inout); }
.ele-gate.is-back .ele-pg { transition-delay: 200ms; }
.ele-pg.is-gone { --ele-sink: 106%; transition: transform 420ms var(--inout); }
.ele-pg + .ele-pg { box-shadow: var(--m-sheet-shadow), 0 -6px 14px -6px rgba(0, 0, 0, .55); }
/* the stamp of the engineer lands at the top right of the page, over the letterhead (the page is compact: the head is left-aligned) */
.ele-pg .ele-stamp { top: calc(8px * var(--m-k)); right: calc(8px * var(--m-k)); bottom: auto; font-size: calc(22px * var(--m-k)); }
.ele-pg .m-page__t th:first-child { white-space: nowrap; }
.ele-bay__lip { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 14px;
  background: linear-gradient(180deg, #3a3a36 0, #23231f 2px, #161614 100%); box-shadow: 0 -1px 0 #000, inset 0 1px 0 rgba(255, 255, 255, .28); }
.ele-bay__shut { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 14px; height: 30px; border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(180deg, transparent 0 7px, rgba(255, 255, 255, .3) 7px 8px, transparent 8px 9px),
              linear-gradient(180deg, #43433e, #292926);
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, .32);
  transform-origin: 50% 100%; transform: scaleY(0); transition: transform 220ms var(--out); }
.ele-gate[data-state="block"] .ele-bay__shut { transform: scaleY(1); transition-delay: 420ms; }

/* the two keys under the bay */
.ele-keys { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding-bottom: 2px; }
.ele-keys .key { flex: 1 1 auto; }
.ele-k__short { display: none; }
.ele-k[hidden] { display: none; }
html:not(.js) .ele-keys, html:not(.js) .ele-fold__keys { display: none; }
/* a key that cannot be pressed now: sunk into its well, under a veil of the tray (as a key outside a filter) */
.ele-k .key__cap { position: relative; }
.ele-k .key__cap::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tray); opacity: 0;
  transition: opacity 220ms linear; pointer-events: none; }
.ele-k[aria-disabled="true"] { cursor: default; background: #cfccc1; box-shadow: 0 0 0 1px rgba(19, 19, 17, .28); }
.ele-k[aria-disabled="true"] .key__cap { transform: translateY(var(--kd)); box-shadow: none; }
.ele-k[aria-disabled="true"] .key__cap::after { opacity: .8; }

/* ─────────────── THE FOLDER (plate B) ─────────────── */
.ele-fold { --m-plate-pad: clamp(12px, 1.3vw, 18px); min-width: 0; }
.ele-fold__glass { height: var(--ele-fold-h, auto); }
.ele-fapp { width: calc(100% / var(--ele-s)); transform: translateY(var(--ele-fold-y, 0px)) scale(var(--ele-s)); transform-origin: 0 0; padding: 0 14px 14px;
  background: var(--surface-2); --ik-ico-stroke: 2; }
.ele-fapp .ele-fk-xs, .ele-fapp .ele-fk-st { transition: opacity 160ms linear; }
.ele-fapp .is-fade { opacity: 0; transition: none; }
.ele-fold__keys { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin: 22px 0 8px; }
.ele-hands, .ele-file { padding-top: 6px; }

/* reduced motion: the page's own rule makes every movement instant; the waits between them go too */
@media (prefers-reduced-motion: reduce) {
  .ele-pg, .ele-bay__shut, .ele-gate.is-back .ele-pg, .ele-gate[data-state="block"] .ele-bay__shut { transition-delay: 0s; }
}

/* ─────────────── wide screens ─────────────── */
@media (min-width: 1600px) {
  .sec-elegxos { --ele-s: 1.14; }
  .ele-pg { --m-k: .92; }
}

/* up to 1399 px the app screen takes a little more of the gate, so the app's four tabs stay on one line */
@media (max-width: 1399px) {
  .ele-gate { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
}

/* ─────────────── under 1240 px: the gate takes the whole width, its two sentences go under it ─────────────── */
@media (max-width: 1239px) {
  .ele-r1 { grid-template-columns: minmax(0, 1fr); }
  .ele-why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 0; }
  .ele-r2 { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-areas: "hands fold" "file fold"; align-items: start; row-gap: 32px; }
  .ele-hands { grid-area: hands; }
  .ele-fold { grid-area: fold; }
  .ele-file { grid-area: file; }
}
@media (max-width: 1100px) {
  .ele-pg { --m-k: .76; }
}

/* ─────────────── 900 px and below: the gate stands in one column, the bay first (the consequence is seen at once),
   then the keys, then the app ─────────────── */
@media (max-width: 900px) {
  .ele-gate { grid-template-columns: minmax(0, 1fr); }
  .ele-gate__l, .ele-gate__r { display: contents; }
  .ele-gate__lbl { order: 1; margin: 4px 4px 9px; }
  .ele-slide { order: 2; }
  .ele-bay { order: 3; margin-top: 18px; min-height: 0; height: clamp(340px, 56vw, 420px); flex: none; }
  .ele-keys { order: 4; }
  .ele-screen { order: 5; margin-top: 18px; }
  .ele-pg { --m-k: .86; }
  .ele-r2 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hands" "fold" "file"; }
  /* stacked, the key of the folder comes right under its card, before the sentence */
  .ele-file { display: flex; flex-direction: column; }
  .ele-file .ele-fold__keys { order: -1; margin: -8px 0 24px; }
  .ele-txt p { max-width: 40em; }
}

/* ─────────────── phones ─────────────── */
@media (max-width: 640px) {
  .ele-gate { --m-plate-pad: 10px; }
  .ele-slide { height: 62px; }
  .ele-slide__c, .ele-slide__capt { font-size: 14px; letter-spacing: .08em; line-height: 1.1; padding: 0 4px; }
  .ele-slide__knob { padding: 0 4px; }
  .ele-slide__c > span, .ele-slide__capt { max-width: 5.8em; }   /* the long label always on two lines on a phone */
  .ele-bay { height: 318px; }
  .ele-screen { max-height: 440px; }
  html:not(.js) .ele-app .ik-doc__head { display: none; }
  .ele-keys { flex-wrap: nowrap; gap: 9px; }
  .ele-keys .key { flex: 1 1 0; min-width: 0; }
  .ele-keys .key__cap { min-height: 52px; padding: 12px 8px 11px; font-size: 21px; }
  .ele-k__long { display: none; }
  .ele-k__short { display: inline; }
  .ele-bay__say { font-size: 14px; letter-spacing: .08em; }
  .ele-bay__top { padding: 8px 10px 8px 12px; min-height: 50px; }
  .ele-bay__odo { font-size: 27px; }
  .ele-pg { --m-k: .78; top: 34px; }
  .ele-why { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ele-r2 { row-gap: 28px; }
  .ele-bay { margin-top: 14px; }
  .ele-screen { margin-top: 14px; }
  .ele-in .ele-small { margin-top: 16px; }
  .ele-fold__keys .key--lg { flex: 1 1 100%; }
  .ele-fold__keys .key--lg .key__cap { min-height: 52px; }
}
@media (max-width: 380px) {
  .ele-slide__c, .ele-slide__capt { font-size: 13px; letter-spacing: .05em; }
  .ele-keys .key__cap { font-size: 19.5px; gap: .35em; }
}
