/* IKTEN landing · css/prims.css · the materials of the page as GENERIC classes. Shared file: frozen while the
   sections are being built (a builder who needs a change writes it in his hand-over note).

   Why: in css/page.css and css/demo.css most materials exist only under the selectors of one section
   (.console, .stage, .banks, .screen, .readout, .know__it, .pp, .slip …). A new section cannot use those names.
   Every class here repeats the values of its original, to the letter; no existing rule was changed and no
   existing element carries one of these classes. The gallery shows them all: python3 build.py --only kit,
   then open dev-kit.html (the build prints its address). The authority for how to use them is work/LIGHT_SPEC.md.

   Naming: m-… = a material of the machine · .sec = the root of a section. Generic classes that css/page.css
   and css/demo.css already give are NOT copied here: .key (.key--ink .key--paper .key--ghost .key--lg .key--sm
   .key--sq .key--count) · .sel · .chap · .k · .led · .plate (an engraved label with a lamp) · .big · .odo
   (.odo--big = black drums, .odo--num = plain rolling numerals) · .fmt · .smallprint · .sr-only · .ik-ico · the
   small schematic papers (.d and its parts .d-paper .d-xl .d-fan .d-duo .d-dwg .d-time .d-bars .d-photos).

   Loaded after css/page.css and css/demo.css and before the css/sec-KEY.css files, so a section may adjust a
   material inside its own selectors (.xar-box.m-plate { … }) and through the custom properties named below. */

:root {
  /* the ink of a stamp is uneven: a noise mask (the same one as on the page of the film, css/demo.css .pp__stamp) */
  --m-ink-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.5 1.72'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  /* a white sheet lying on the paper of the page: the three shadows of the slip of the headline
     (css/page.css .slip__feed, in em), written in px at the size the headline has at 1440 (124 px) */
  --m-sheet-shadow: 0 0 .62px rgba(var(--sh), .75), 0 3.72px 3.47px rgba(var(--sh), .26), 0 11.16px 12.4px rgba(var(--sh), .2);
}

/* ───────────────────────────── the root of a section ─────────────────────────────
   Source: css/page.css `.wall, .radio, .know` (padding, the line of ink above) and their three grounds.
   <section class="sec sec-KEY sec--paper" id="KEY" aria-labelledby="pre-h"> */
.sec { padding: clamp(56px, 9vh, 110px) var(--page-gut, var(--pad)) clamp(40px, 7vh, 80px); border-top: 1px solid var(--ink); }
/* --page-gut (css/page.css) = --pad, or more on a wide monitor so the inner content stops at --page-max (1840 px)
   and is centred while the ground stays full-bleed (integrator, 29/11: as .wall, .radio, .know). */
.sec--paper { background: var(--paper) url(../img/tooth.png); }       /* .radio  */
.sec--paper2 { background: var(--paper-2) url(../img/tooth.png); }    /* .wall   */
.sec--white { background: var(--white); }                             /* .know   */

/* ───────────────────────────── the head of a section ─────────────────────────────
   Source: `.wall__head`, `.radio__head` (two equal columns, the lead beside the title, both on one base line),
   `.know__head` (--auto: the title takes its own width, more room under it), and the lead paragraphs
   `.wall__lede > p:first-child, .radio__lede, .know__lede`. At 1100 px and below the lead goes under the title.
   <div class="m-head"><h2 class="big" id="pre-h" aria-label="…">…</h2><p class="m-lead">…</p></div> */
.m-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 56px); align-items: end; margin-bottom: clamp(22px, 4vh, 40px); }
.m-head--auto { grid-template-columns: auto minmax(0, 1fr); margin-bottom: clamp(30px, 5.5vh, 56px); }
.m-head--stack { grid-template-columns: minmax(0, 1fr); align-items: start; }      /* the lead under the title at every width */
.m-lead { max-width: 34em; font-size: clamp(16.5px, 1.2vw, 19.5px); color: var(--ink-2); }
@media (max-width: 1100px) {
  .m-head, .m-head--auto { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* an engraved label: small poster capitals, widely spaced (type the capitals without accents).
   Source: `.stage__cols h4`, `.tools__ex h4`, `.stage__fmt > span:first-child`, `.tools__n`.
   (The existing `.plate` is the same lettering in --ink-2, with room for a lamp before it.) */
.m-label { font: 700 14px/1 var(--f-display); letter-spacing: .14em; color: var(--ink-3); }

/* ───────────────────────────── plate: white enamel ─────────────────────────────
   Source: `.dial, .set, .tools` (the three plates of the assistant); --deep = `.console` (the machine of the
   film); --stage = `.stage`. Knobs: --m-plate-r (18px; the console is 14px on a phone), --m-plate-pad (12px;
   the console is 8px on a phone). <div class="m-plate">…</div> */
.m-plate {
  --m-plate-cast: 0 30px 40px -30px rgba(var(--sh), .45);
  padding: var(--m-plate-pad, 12px); border-radius: var(--m-plate-r, 18px);
  background: linear-gradient(180deg, var(--white), var(--plate-lo));
  box-shadow: 0 0 0 1px var(--ink), inset 0 1px 0 #fff, 0 3px 0 0 rgba(var(--sh), .1), var(--m-plate-cast);
}
.m-plate--deep { --m-plate-cast: 0 28px 34px -26px rgba(var(--sh), .4), 0 60px 80px -52px rgba(var(--sh), .6); }
.m-plate--stage { --m-plate-cast: 0 30px 40px -30px rgba(var(--sh), .5); }

/* ───────────────────────────── tray: sunk into the page ─────────────────────────────
   Source: `.banks` (the deck of the 63 keys). Knob: --m-tray-pad (14px; 10px at 820 px and below).
   <div class="m-tray">…</div> */
.m-tray { padding: var(--m-tray-pad, 14px); border-radius: 18px; background: var(--tray);
  box-shadow: inset 0 0 0 1px var(--ink), inset 0 4px 7px rgba(var(--sh), .2), 0 1px 0 #fff; }

/* ───────────────────────────── black glass around a screen ─────────────────────────────
   Source: `.screen`, `.set__screen` (a screen of the app, ground #faf9f5) and `.stage__screen` (--bay: the output
   bay, glass inside too, white papers come up in it). Knob: --m-bezel (6px; `.screen` uses 5px at 640 px and
   below, `.stage__screen` 4px at 1100 px and below). Give it a size yourself: aspect-ratio 1440 / 880 (the film),
   4 / 3 (the bay, and the film on a phone), or a min-height (the chat: 520px).
   <div class="m-glass"><div class="ik-root ik-theme-light" aria-hidden="true" inert>…the app…</div></div> */
.m-glass { --m-bezel: 6px; position: relative; overflow: hidden; margin: calc(var(--m-bezel) + 1px); border-radius: 9px; background: #faf9f5; contain: paint;
  box-shadow: 0 0 0 1px #000, 0 0 0 var(--m-bezel) var(--glass), 0 0 0 calc(var(--m-bezel) + 1px) #000; }
.m-glass--bay { background: var(--glass); }

/* ───────────────────────────── read-out: a strip of black glass, white lettering ─────────────────────────────
   Source: `.readout`, `.readout__n`, `.readout__t` (the caption of the film). `.is-out` on the text, then off
   again, is how a new caption comes in.
   <div class="m-readout"><span class="m-readout__n">1/7</span><p class="m-readout__t">…</p></div> */
.m-readout { display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 56px;
  border-radius: 9px; color: #fff; background: linear-gradient(180deg, #232321, #111110);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), inset 0 0 0 1px #000, 0 1px 0 #fff; }
.m-readout__n { font: 800 22px/1 var(--f-display); letter-spacing: .06em; color: #fff; font-variant-numeric: tabular-nums; flex: none;
  padding-right: 14px; box-shadow: 1px 0 0 rgba(255, 255, 255, .26); }
.m-readout__n:empty { display: none; }
.m-readout__t { font: 620 clamp(16px, 1.34vw, 21px)/1.25 var(--f-text); letter-spacing: -.008em; color: #fff;
  transition: opacity 180ms linear, transform 260ms var(--out); }
.m-readout__t.is-out { opacity: 0; transform: translateY(6px); transition: none; }

/* ───────────────────────────── numerals ─────────────────────────────
   .m-rule = the 3 px rule of ink above a numeral (`.know__it`).
   .m-num  = a plain numeral that rolls, with its sentence (`.know__it .odo`, `.know__it p`); --xl = the two
             largest of the knowledge section. Knob: --m-num-size.
   <div class="m-rule m-num"><span class="odo odo--num" data-odo="9.000+" data-from="0.000+" aria-hidden="true"></span>
     <p><b>Πάνω από 9.000 …</b> …</p></div>      (the sentence says the number: the numeral itself is aria-hidden)
   The black drums are the existing `.odo.odo--big` inside any poster lettering:
   <h2 class="big"><span class="odo odo--big" data-odo="63" data-from="00" aria-hidden="true"></span><span class="sr-only">63</span> ΚΟΥΜΠΙΑ.</h2>
   js/main.js mounts every [data-odo] of the page and rolls it once when it is first seen. */
.m-rule { padding-top: 16px; border-top: 3px solid var(--ink); }
.m-num { min-width: 0; }
.m-num .odo { display: flex; font: 800 var(--m-num-size, clamp(96px, 10.6vw, 176px))/1 var(--f-display); letter-spacing: -.012em; color: var(--ink); }
.m-num--xl { --m-num-size: clamp(132px, 21vw, 340px); }
.m-num .odo__c { font-size: .58em; align-self: flex-start; margin-left: .04em; line-height: 1.24; }
.m-num .odo__c.is-dot { font-size: 1em; align-self: baseline; margin: 0; line-height: 1; }
.m-num p { margin-top: clamp(10px, 1.5vh, 18px); max-width: 33em; font-size: clamp(15.5px, 1.1vw, 17.5px); line-height: 1.48; color: var(--ink-2); }
.m-num p b { color: var(--ink); font-weight: 680; }
@media (max-width: 640px) {
  .m-num { --m-num-size: clamp(96px, 30vw, 150px); }
  .m-num--xl { --m-num-size: clamp(110px, 35vw, 180px); }
}
/* a count in a black box, beside an engraved name (`.bank__h i`): <i class="m-count">44</i> */
.m-count { padding: 3px 6px 1px; border-radius: 4px; background: var(--ink); color: #fff;
  font: 800 17px/1 var(--f-display); font-style: normal; font-variant-numeric: tabular-nums; }

/* ───────────────────────────── chips and lamps ─────────────────────────────
   .m-chip = a format chip, EXCEL · WORD · PDF · DXF (`.fmt`, which also exists as it is, but shrinks at 1100 px
   and below because it lives in the stage). <span class="m-chip">EXCEL</span>
   .led--white = a lit lamp on a black cap (`.sel[aria-checked="true"] .led`). <i class="led led--white is-on"></i> */
.m-chip { display: inline-block; padding: 5px 8px 4px; border-radius: 5px; background: var(--ink); color: #fff;
  font: 750 15px/1 var(--f-display); letter-spacing: .09em; }
.led--white.is-on { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }

/* ───────────────────────────── paper ─────────────────────────────
   .m-sheet = a white sheet on the paper of the page (pure white, the warm shadows of the slip). */
.m-sheet { background: #fff; color: var(--ink); box-shadow: var(--m-sheet-shadow); }

/* .m-page = a page in the form the Service expects: Times, black rules, a ruled table.
   Source: css/demo.css `.pp` and its parts (the page of the film). Every length is the original one times --m-k
   (1 = the film's page, drawn for a 1440 px window): set --m-k on the page to make it larger or smaller.
   Rows: tr.g a group · tr.a an article · tr.m a line of measurement (lighter rules) · tr.s the sum of an article.
   Cells: td.l text to the left · td.n a number to the right.
   <div class="m-page m-sheet">
     <div class="m-page__head"><div class="m-page__l">ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ<br>ΔΗΜΟΣ ΠΑΡΑΔΕΙΓΜΑΤΟΣ</div><div class="m-page__r">ΕΡΓΟ : …<br>ΑΝΑΔΟΧΟΣ : ΔΕΙΓΜΑ ΤΕΧΝΙΚΗ Ε.Ε.</div></div>
     <div class="m-page__title">1η ΑΝΑΛΥΤΙΚΗ ΕΠΙΜΕΤΡΗΣΗ</div><div class="m-page__sub">…</div>
     <table class="m-page__t"><thead><tr><th>α/α</th>…</tr></thead><tbody><tr class="a">…</tr><tr class="m">…</tr><tr class="s">…</tr></tbody></table>
     <div class="m-stamp"><span>ΕΛΕΓΧΘΗΚΕ ΚΑΙ</span><strong>ΕΓΚΡΙΘΗΚΕ</strong><span>ΑΠΟ ΕΣΕΝΑ</span></div>
   </div>
   Unlike the film's page, the rows are visible from the start. `.is-print` prints them one after the other
   (IK.print(page) sets the order and the class; nothing happens under reduced motion). */
.m-page { --m-k: 1; position: relative; padding: calc(44px * var(--m-k)) calc(78px * var(--m-k)) calc(150px * var(--m-k)); color: #000; background: #fff;
  font-family: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif; }
.m-page__head { display: flex; justify-content: space-between; gap: calc(40px * var(--m-k)); font-weight: 700; font-size: calc(15px * var(--m-k)); line-height: 1.45; }
.m-page__l { max-width: 46%; }
.m-page__r { max-width: 44%; text-align: center; }
.m-page__title { margin: calc(22px * var(--m-k)) 0 calc(2px * var(--m-k)); text-align: center; font-weight: 700; font-size: calc(26px * var(--m-k)); line-height: 1.15; }
.m-page__sub { margin: 0 0 calc(16px * var(--m-k)); text-align: center; font-size: calc(15px * var(--m-k)); }
.m-page__t { width: 100%; border-collapse: collapse; font-size: calc(14.5px * var(--m-k)); }
.m-page__t th, .m-page__t td { border: 1.5px solid #000; padding: calc(5px * var(--m-k)) calc(9px * var(--m-k)); text-align: center; font-weight: 700; vertical-align: middle; line-height: 1.2; }
.m-page__t th { padding: calc(7px * var(--m-k)) calc(9px * var(--m-k)); }
.m-page__t td.l { text-align: left; }
.m-page__t td.n { text-align: right; font-variant-numeric: tabular-nums; }
.m-page__t tr.m td { font-weight: 400; border-top-color: #9a9a9a; border-bottom-color: #9a9a9a; border-top-width: .75px; border-bottom-width: .75px; }
.m-page__t tr.m td.l { padding-left: calc(22px * var(--m-k)); }
.m-page__t tr.s td { border-top-width: .75px; border-top-color: #9a9a9a; }
.m-page__t tr.s td.l { text-align: right; }
.m-page__t .g td { font-size: calc(15px * var(--m-k)); }
.m-page.is-print .m-page__t tbody tr { animation: m-row 300ms var(--out) both; animation-delay: calc(var(--i, 0) * 95ms + 80ms); }
@keyframes m-row { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .m-page.is-print .m-page__t tbody tr { animation: none; }
}

/* .m-slip = a word that is a slip of paper with a perforated lower edge, sized by the lettering around it (em).
   Source: `.slip__feed` (the shadows; `.is-nudge` is the little push when the film prints) and `.slip__paper`.
   .m-slot = the black slot it comes out of (`.slip` and its ::before); the slot cuts the slip at its top edge.
   <span class="m-slot"><span class="m-slip"><span class="m-slip__paper">ΧΑΡΤΙ</span></span></span>
   or, with no slot: <span class="m-slip"><span class="m-slip__paper">ΧΑΡΤΙ</span></span> */
.m-slot { display: inline-block; position: relative; vertical-align: baseline; padding-top: .05em; clip-path: inset(0 -.4em -.4em -.4em); }
.m-slot::before { content: ""; position: absolute; left: -.035em; right: -.035em; top: 0; height: .05em; border-radius: .025em;
  background: #000; box-shadow: 0 .012em 0 rgba(255, 255, 255, .9); z-index: 2; }
.m-slip { display: inline-block; position: relative; vertical-align: baseline;
  filter: drop-shadow(0 0 .005em rgba(var(--sh), .75)) drop-shadow(0 .03em .028em rgba(var(--sh), .26)) drop-shadow(0 .09em .1em rgba(var(--sh), .2));
  transition: transform 700ms var(--out); }
.m-slot > .m-slip { display: block; }
.m-slip.is-nudge { transform: translateY(-9%); transition: transform 120ms linear; }
.m-slip__paper { display: block; padding: .075em .13em .06em; line-height: .9; background: #fff; color: var(--ink);
  -webkit-mask: radial-gradient(.05em at 50% 100%, #0000 96%, #000) 50% 100% / .15em 100% repeat-x;
          mask: radial-gradient(.05em at 50% 100%, #0000 96%, #000) 50% 100% / .15em 100% repeat-x; }

/* ───────────────────────────── the stamp: the only ink that is not black ─────────────────────────────
   The stamp says who approves: the engineer. It is a thing of the paper, never of the app. Use it for that only.
   .m-stamp = the stamp with words. Source: css/demo.css `.pp__stamp` (and `.is-on`, its landed state).
   .m-seal  = the small round seal with a check. Source: css/page.css `.slip__stamp` (the hero's seal, as ink since
              29/11: no white disc, no shadow, multiplied, the stamp's grain, outer ring lighter). Sized by its
              font-size (.424em wide: at the headline's 124 px it is 53 px).
   At rest both are LANDED, so the page is right when no script runs. `.is-up` (only with script) lifts a stamp
   out of sight with no motion; taking the class off lands it (340ms, a small overshoot). IK.stamp(el) does both.
   <div class="m-stamp"><span>ΕΛΕΓΧΘΗΚΕ ΚΑΙ</span><strong>ΕΓΚΡΙΘΗΚΕ</strong><span>ΑΠΟ ΕΣΕΝΑ</span></div>
   <i class="m-seal" style="font-size: 124px"></i>      --corner pins either at the corner of a positioned parent */
.m-stamp { display: inline-block; padding: .5em .8em .46em; text-align: center; color: var(--stamp);
  border: .16em solid currentColor; border-radius: .2em; outline: .06em solid currentColor; outline-offset: .14em;
  font: 800 23px/1 var(--f-display); white-space: nowrap; mix-blend-mode: multiply; pointer-events: none;
  opacity: .93; transform: rotate(-6deg); transition: transform 340ms var(--stampe), opacity 90ms linear;
  -webkit-mask-image: var(--m-ink-noise); mask-image: var(--m-ink-noise); }
.m-stamp strong { display: block; font-weight: 900; font-size: 1.86em; letter-spacing: .035em; margin: .08em 0 .1em; }
.m-stamp span { display: block; font-size: .6em; letter-spacing: .14em; }
.m-stamp--corner { position: absolute; right: 86px; bottom: 26px; }
.m-page .m-stamp { position: absolute; right: calc(86px * var(--m-k)); bottom: calc(26px * var(--m-k)); font-size: calc(23px * var(--m-k)); }
.js .m-stamp.is-up { opacity: 0; transform: rotate(-12deg) scale(1.7); transition: none; }

.m-seal { display: inline-block; position: relative; width: .424em; height: .424em; border-radius: 50%;
  border: .013em solid var(--stamp); background: transparent; mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask-image: var(--m-ink-noise); mask-image: var(--m-ink-noise);
  opacity: .93; transform: rotate(-12deg); transition: transform 340ms var(--stampe), opacity 90ms linear; }
.m-seal::after { content: ""; position: absolute; inset: .02em; border-radius: 50%; border: .03em solid var(--stamp); }
.m-seal::before { content: ""; position: absolute; left: .11em; top: .124em; width: .166em; height: .086em;
  border: solid var(--stamp); border-width: 0 0 .045em .045em; transform: rotate(-45deg); }
.m-seal--corner { position: absolute; z-index: 3; right: -.232em; top: -.075em; }
.js .m-seal.is-up { opacity: 0; transform: rotate(-24deg) scale(1.7); transition: none; }

/* .m-page--compact = the same page set for a phone, as the film sets it on a small screen. Source: css/demo.css
   `.screen.is-small .pp` and its parts (added by the foundation QA, 29/11): the head stacked and left-aligned, a
   smaller title, the table cut to α/α · the work with its calculation · the quantity (the 2nd and 4th columns,
   code and revision article, are hidden: it assumes the five columns of the film's table), tighter cells, the stamp
   nearer the corner. Every length is still × --m-k. The film draws it 452 px wide; its width is the section's. */
.m-page--compact { padding: calc(30px * var(--m-k)) calc(22px * var(--m-k)) calc(132px * var(--m-k)); }
.m-page--compact .m-page__head { flex-direction: column; gap: calc(8px * var(--m-k)); font-size: calc(14px * var(--m-k)); }
.m-page--compact .m-page__l, .m-page--compact .m-page__r { max-width: none; text-align: left; }
.m-page--compact .m-page__title { margin-top: calc(16px * var(--m-k)); font-size: calc(22px * var(--m-k)); }
.m-page--compact .m-page__t th:nth-child(2), .m-page--compact .m-page__t td:nth-child(2),
.m-page--compact .m-page__t th:nth-child(4), .m-page--compact .m-page__t td:nth-child(4) { display: none; }
.m-page--compact .m-page__t th:nth-child(1) { width: 9% !important; }
.m-page--compact .m-page__t th:nth-child(5) { width: 25% !important; font-size: calc(12.5px * var(--m-k)); }
.m-page--compact .m-page__t th, .m-page--compact .m-page__t td { padding: calc(5px * var(--m-k)) calc(6px * var(--m-k)); }
.m-page--compact .m-page__t tr.m td.l { padding-left: calc(10px * var(--m-k)); }
.m-page--compact .m-stamp { right: calc(18px * var(--m-k)); bottom: calc(20px * var(--m-k)); font-size: calc(20px * var(--m-k)); }

/* ───────────────────────────── narrow screens ─────────────────────────────
   A variant that has ONE original follows it at every width, with the values css/page.css gives that original
   at the same breakpoints (`.stage` and `.stage__screen` at 1100 px, `.banks` at 820 px, `.console` and
   `.readout` at 640 px). Only the material changes here; how the original is laid out (the stage becoming a
   grid, the console reaching into the gutter) belongs to its section. The plain .m-plate (the three plates of the
   assistant), .m-glass (`.set__screen`), .m-chip, .m-label, .m-stamp, .m-seal and .m-page do not change with the
   width by themselves (the film's page changes by a class on a small screen: that is .m-page--compact, above,
   which a section switches on in its own media query or script); the film's screen (`.screen`) has 5 px of glass at 640 px and below: give
   .m-glass `--m-bezel: 5px` there if a section wants that. The knobs still win: a section stylesheet loads later. */
@media (max-width: 1100px) {
  .m-plate--stage { --m-plate-pad: 8px; --m-plate-r: 14px;
    box-shadow: 0 0 0 1px var(--ink), inset 0 1px 0 #fff, 0 16px 24px -12px rgba(var(--sh), .55); }
  .m-glass--bay { --m-bezel: 4px; margin: 6px; }
}
@media (max-width: 820px) {
  .m-tray { --m-tray-pad: 10px; }
}
@media (max-width: 640px) {
  .m-plate--deep { --m-plate-pad: 8px; --m-plate-r: 14px; }
  .m-readout { padding: 9px 12px; min-height: 62px; }
  .m-readout__t { font-size: 16px; }
}
