/* ORGANIDIO, on top of site.css (ALKALIO's sheet with the brand colour swapped).
   The mark: a mitochondrion, the picture people meet first when they search «οργανίδιο».
   Outer membrane in ink, the matrix in the brand colour, the folded inner membrane (cristae) in white,
   three matrix granules, and ATP sparks leaving it. The same drawing in the header, the hero, the opening,
   the brand page and the game, so the opening can land exactly on the hero. */

/* ── the mark ── */
.cellmark{overflow:visible;color:var(--ink)}
.cellmark .om{fill:none;stroke:currentColor;stroke-width:5;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:0}
.cellmark .mx{fill:var(--brand);transform-box:fill-box;transform-origin:center}
.cellmark .cr{fill:none;stroke:#fff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:0}
.cellmark .gr circle{fill:#fff;fill-opacity:.85;transform-box:fill-box;transform-origin:center}
.cellmark .atp circle{fill:var(--brand);opacity:0;transform-box:fill-box;transform-origin:center}

/* draw: the membrane is drawn, the matrix swells into it, the folds are drawn, the granules appear */
.cellmark.draw .om{animation:cmDraw 1.1s cubic-bezier(.6,0,.3,1) both}
.cellmark.draw .mx{animation:cmGrow .8s .75s cubic-bezier(.2,.8,.2,1.15) both}
.cellmark.draw .cr{animation:cmDraw 1.1s 1.2s ease-in-out both}
.cellmark.draw .gr circle{animation:cmPop .4s 2.2s both}
.cellmark.draw .gr circle:nth-child(2){animation-delay:2.35s}
.cellmark.draw .gr circle:nth-child(3){animation-delay:2.5s}
/* live: the matrix breathes and ATP leaves it, slowly (nothing fast, no spinning) */
.cellmark.live .mx{animation:cmBreath 5s ease-in-out infinite}
.cellmark.draw.live .mx{animation:cmGrow .8s .75s cubic-bezier(.2,.8,.2,1.15) both,cmBreath 5s 2.4s ease-in-out infinite}
.cellmark.live .atp circle{animation:cmAtp 4.8s linear infinite}
.cellmark.live .atp circle:nth-child(2){animation-delay:1.6s}
.cellmark.live .atp circle:nth-child(3){animation-delay:3.2s}
@keyframes cmDraw{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@keyframes cmGrow{from{opacity:0;transform:scale(.55)}to{opacity:1;transform:none}}
@keyframes cmPop{from{fill-opacity:0;transform:scale(0)}to{fill-opacity:.85;transform:none}}
@keyframes cmBreath{50%{transform:scale(1.035)}}
@keyframes cmAtp{0%{opacity:0;transform:translate(0,0) scale(.6)}15%{opacity:.9}100%{opacity:0;transform:translate(9px,-16px) scale(1)}}
@media (prefers-reduced-motion: reduce){.cellmark *{animation:none!important}}

/* header mark */
.top .brand svg{width:30px;height:30px}

/* ── home hero: the mark in place of ALKALIO's flask ── */
.home .cellbox{position:relative;display:grid;justify-items:center}
.home .cellbox .cellmark{width:min(330px,64vw);height:auto;position:relative;z-index:1}
.home .cellbox .eqLine{position:relative;z-index:1;text-align:center}
html.intro #heroCell{opacity:0}
@media (max-width:720px){
  .home .cellbox{order:-1;justify-items:start;grid-template-columns:auto 1fr;align-items:end;gap:12px}
  .home .cellbox .cellmark{width:96px}
  .home .cellbox .eqLine{margin:0 0 6px;font-size:12px;text-align:left}
}

/* the opening (home.js) */
#orgIntro{position:fixed;inset:0;z-index:96;display:grid;place-content:center;justify-items:center;gap:14px;background:var(--bg);transition:background-color .7s ease}
#orgIntro .cellmark{width:260px;height:260px;transform-origin:0 0}
#orgIntro .w{font:700 44px/1 var(--brandf);letter-spacing:.08em;color:var(--ink);opacity:0;transform:translateY(6px);transition:opacity .45s ease,transform .45s ease}
#orgIntro .e{font:500 14px var(--mono);color:var(--dim);opacity:0;transition:opacity .45s ease}
#orgIntro.done .w,#orgIntro.done .e{opacity:1;transform:none}
#orgIntro.fly{background-color:transparent}
#orgIntro.fly .w,#orgIntro.fly .e,#orgIntro.fly .skip{opacity:0;transition:opacity .3s ease;pointer-events:none}
#orgIntro .skip{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--panel);color:var(--dim);font:600 13px var(--sans);cursor:pointer}
@media (max-width:520px){#orgIntro .w{font-size:34px}#orgIntro .e{font-size:12px}}
@media (prefers-reduced-motion: reduce){#orgIntro{display:none}}

/* the game's own screens are 4:3 (tablet captures): keep the whole frame, never crop the controls */
.shot img,.freeShot img{aspect-ratio:4/3}
.cardImg img{aspect-ratio:16/10;object-position:50% 40%}

/* ── topics ── */
.topics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:22px}
.topic{display:flex;flex-direction:column;gap:6px;padding:16px 16px 14px;border:1px solid var(--line);border-radius:var(--r);
  background:color-mix(in srgb,var(--panel) 86%,transparent);text-decoration:none;min-height:132px}
.topic:hover{border-color:color-mix(in srgb,var(--brand) 55%,var(--line))}
.topic b{font:700 34px/1 var(--brandf);color:var(--brand)}
.topic strong{font-size:16px;line-height:1.25}
.topic span{font-size:14px;color:var(--dim);line-height:1.35}
@media (max-width:1000px){.topics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:620px){.topics{grid-template-columns:repeat(2,minmax(0,1fr))}.topic{min-height:118px;padding:14px}.topic b{font-size:28px}}

/* ── the family: ALKALIO beside ORGANIDIO ── */
.family{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px;margin-top:22px}
.fam{display:flex;gap:16px;align-items:center;padding:20px;border:1px solid var(--line);border-radius:var(--r);background:color-mix(in srgb,var(--panel) 86%,transparent);text-decoration:none}
.fam svg{width:56px;height:56px;flex:none}
.fam b{display:block;font:700 22px/1.1 var(--brandf);letter-spacing:.08em}
.fam small{display:block;font:600 12px var(--mono);letter-spacing:.1em;margin-top:4px}
.fam.alk small{color:#d81b7a}
.fam.org small{color:var(--brand)}
.fam.clu small{color:#7a5400}
@media (prefers-color-scheme:dark){.fam.clu small{color:#f2bd2c}}
.fam p{margin:8px 0 0;font-size:15px;color:var(--dim)}
@media (max-width:720px){.family{grid-template-columns:1fr}}

/* ── level pages ── */
.lvkick{font:700 17px/1.4 var(--sans);color:var(--brand);margin:6px 0 10px}
.lvkick .mono{font-weight:700}
.lvshot{margin:0 0 22px;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:var(--panel)}
.lvshot img{display:block;width:100%;height:auto;aspect-ratio:4/3}
.eq{font:500 15px/1.5 var(--mono);color:var(--ink);background:var(--brand-soft);border-radius:10px;padding:10px 14px;margin:10px 0 0}
.lvnav{display:flex;justify-content:space-between;gap:12px;margin:30px 0 8px;flex-wrap:wrap}
.lvnav a{text-decoration:none;font-weight:600;color:var(--brand)}

/* ── brand page ── */
.bstage{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
.bpanel{border:1px solid var(--line);border-radius:18px;padding:30px 20px 22px;display:grid;justify-items:center;gap:12px;min-height:340px;align-content:center}
.bpanel.light{background:#f5f3f7;color:#14213a;--ink:#14213a;--dim:#5c6378}
.bpanel.dark{background:#121017;color:#efeaf5;--ink:#efeaf5;--dim:#aba3b8}
.bpanel .cellmark{width:180px;height:180px}
.bword{font:700 40px/1 var(--brandf);letter-spacing:.08em}
.bline{font:600 12px var(--mono);letter-spacing:.1em;color:var(--brand)}
.bpanel.dark .bline{color:var(--brandDark,var(--brand))}
.swatches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}
.sw{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel)}
.sw i{display:block;height:74px}
.sw div{padding:10px 12px;font-size:14px}
.sw code{font:500 13px var(--mono);color:var(--dim)}
.opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.opt{all:unset;box-sizing:border-box;cursor:pointer;border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;gap:12px;align-items:center;background:var(--panel)}
.opt[aria-pressed="true"]{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink) inset}
.opt i{width:38px;height:38px;border-radius:50%;flex:none}
.opt b{display:block;font-size:15px}
.opt span{display:block;font-size:13px;color:var(--dim)}
.sizes{display:flex;gap:22px;align-items:flex-end;flex-wrap:wrap;margin-top:16px}
.sizes figure{margin:0;display:grid;justify-items:center;gap:6px;font:500 12px var(--mono);color:var(--dim)}
@media (max-width:820px){.bstage{grid-template-columns:1fr}.swatches{grid-template-columns:repeat(2,minmax(0,1fr))}.opts{grid-template-columns:1fr}}

/* legal: the storage table on the cookies page */
.legal table.lt{width:100%;border-collapse:collapse;margin:12px 0 0;font-size:15px}
.legal table.lt th,.legal table.lt td{border-bottom:1px solid var(--line);padding:8px 10px;text-align:left;vertical-align:top}
.legal table.lt td.mono{font-size:13px;white-space:nowrap}
@media (max-width:520px){.legal table.lt td.mono{white-space:normal;word-break:break-all}}

/* the Stories (29 Nov 2026; pictures, reels and a page per story 30 Nov 2026, as alkalio.com): on the home page a card per shelf
   with its first story's poster and each story with a thumbnail; the story box on a story level's page with the reel beside it;
   /stories/ and /stories/<slug> */
.shelves .shelf{display:flex;flex-direction:column}
.shelves .shelfpic{display:block;margin:-20px -20px 16px;border-radius:var(--r) var(--r) 0 0;overflow:hidden;border-bottom:1px solid var(--line);aspect-ratio:16/10;background:var(--panel2)}
.shelves .shelfpic img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 0}
.storylist{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:10px}
.storylist a{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:start;text-decoration:none;color:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.storylist a:not(:has(.th)){grid-template-columns:minmax(0,1fr)}
.storylist a:hover,.storylist a:focus-visible{border-color:var(--brand)}
.storylist .th{display:block;width:72px;height:60px;border-radius:8px;overflow:hidden;background:var(--panel2)}
.storylist .th img{display:block;width:100%;height:100%;object-fit:cover}
.storylist .stt{display:block;min-width:0}
.storylist b{display:block;font-size:16px;line-height:1.3}
.storylist .stt>span{display:block;font-size:14px;color:var(--dim);margin-top:2px;line-height:1.4}
.storybox{border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:var(--r);padding:16px 18px;margin:0 0 22px;background:var(--panel)}
.storybox h2{font-size:22px;margin:4px 0 6px}
.storybox h2 a{color:inherit;text-decoration:none}
.storybox h2 a:hover{color:var(--brand)}
.storybox .hook{font-size:18px;margin:0 0 8px}
.storybox .dim{margin:0}
.storybox .more{margin:10px 0 0;font-weight:700}
.storybox.hasreel{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:20px;align-items:start}
.storybox .reel{margin:0}
@media (max-width:560px){.storybox.hasreel{grid-template-columns:minmax(0,1fr)}.storybox .reel{max-width:260px}}
/* the reel: a 4:5 loop, never taller than the screen leaves room for, with black bars rather than a crop */
.reel{margin:0;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--panel)}
.reel video{display:block;width:100%;height:auto;max-height:min(78vh,640px);object-fit:contain;background:#000}
.reel figcaption{padding:10px 14px 12px;font-size:14px;color:var(--dim);border-top:1px solid var(--line)}
.reel figcaption .tr{display:block;margin-top:6px;font-style:italic}
.storypage{padding-bottom:48px}
.story{display:grid;grid-template-columns:minmax(0,380px) minmax(0,1fr);grid-template-areas:"reel head" "reel body";grid-template-rows:auto 1fr;column-gap:44px;align-items:start;margin-top:8px}
.story .sthead{grid-area:head}
.story>.reel,.story>.lvshot{grid-area:reel}
.story .stbody{grid-area:body}
.story .hook{font-size:21px;line-height:1.45;margin:0 0 6px;max-width:34em}
.story .stbody h2{font-size:20px;margin:22px 0 6px}
.story .stbody p{max-width:38em}
.story .stgoal{font-size:18px}
.stcta{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 10px}
@media (max-width:820px){.story{grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "reel" "body";grid-template-rows:auto}.story>.reel{max-width:420px;width:100%;margin:14px 0 4px}}
/* phone landscape: a short screen keeps the reel beside the text, not above it */
@media (max-height:500px) and (min-width:700px){.story{grid-template-columns:minmax(0,260px) minmax(0,1fr);column-gap:28px}}
.stmore,.stshelf{margin-top:40px}
.stmore h2,.stshelf h2{font-size:24px;margin:0 0 6px}
.stgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(184px,1fr));gap:14px;margin-top:14px}
.stcard{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit;background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:0 0 14px;overflow:hidden}
.stcard:hover,.stcard:focus-visible{border-color:var(--brand)}
.stcard .stpic{display:block;aspect-ratio:6/5;overflow:hidden;background:var(--panel2);border-bottom:1px solid var(--line);margin-bottom:6px}
.stcard .stpic img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 0}
.stcard>b{font-size:16px;line-height:1.3;padding:0 12px}
.stcard .sthook{font-size:14px;color:var(--dim);line-height:1.4;padding:0 12px}
.stcard .stlv{font-size:13px;color:var(--brand);padding:0 12px;margin-top:auto}
/* a phone: each story card a row, its picture at the left, so a shelf is not a long column of big pictures */
@media (max-width:560px){.stgrid{grid-template-columns:minmax(0,1fr);gap:12px}
  .stcard{display:grid;grid-template-columns:104px minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:12px;row-gap:4px;padding:0 12px 0 0;min-height:118px}
  .stcard .stpic{grid-row:1/4;aspect-ratio:auto;height:100%;margin:0;border-bottom:0;border-right:1px solid var(--line)}
  .stcard>b,.stcard .sthook,.stcard .stlv{padding:0}
  .stcard>b{padding-top:10px;font-size:16px}
  .stcard .stlv{padding-bottom:10px}}
/* the page never scrolls sideways (29 Nov 2026, measured before going public in Greek too): the hero's halo reached 14px past
   the edge at 874×360, and at 390px the header row needed 382px of 358 (the Play button ran past the edge). The halo is clipped
   at the hero's edge; below 400px the name's letter spacing and mark give the room back, every button keeps its size */
.hero{overflow-x:clip}
@media (max-width:400px){.top .brand{letter-spacing:.04em;gap:6px}.top .brand svg{width:24px;height:24px}}
@media (max-width:384px){.top .brand{font-size:16px;letter-spacing:.02em}.top .brand svg{width:22px;height:22px}.top .right{gap:4px}}
/* 401 to 479px (the larger phones, 414 and 430 measured 29 Nov 2026): site.css's narrow header (flags alone, a 72px Play) stopped at
   400px and the header ran 52px past the edge; the same rule up to 479px */
@media (max-width:479px){.top .wrap{gap:8px}.right{gap:6px}.lang{grid-template-columns:38px 38px}.lang .lt{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.lang .flag{width:21px;height:14px}.top .btn.sm{width:72px}.top .btn.go{width:84px}}
@media (max-width:384px){.hero .btn.big{padding:0 14px}}

/* ── About, For teachers, For schools, Contact (30 Nov 2026, dev/pages_info.mjs) ── */
/* the four pages are in the Menu (below 1200px) and in the footer; the wide header has no room for them beside the six links */
.nav a.x{display:none}
.menu-panel a.x{display:flex}
/* phones held sideways (874×360): ten links in two columns, so the Menu fits under the header without a scroll */
@media (max-height:480px){.menu-panel{width:min(460px,calc(100% - 32px));display:grid;grid-template-columns:1fr 1fr;gap:0 4px}}
.info h3{font-size:19px;margin-top:22px}
.info .cta{margin-top:26px}
.info .note{margin:16px 0 0}

/* the Contact page's form: alkalio.com's step card in ORGANIDIO's colour (assets/interest.js). Every control keeps its box in
   every state; the card's body keeps the height of the tallest choice step (interest.js floor()) */
.interest{margin:14px 0 30px}
.qcardw{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;align-items:start}
@media (max-width:760px){.qcardw{grid-template-columns:1fr}}
.qcard,.qside{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:20px;min-width:0}
.qcard{position:relative}
.qcard .qstep{font-family:var(--mono);font-size:13px;color:var(--brand);margin:0 0 6px}
.qcard .qh{font-size:21px;margin:0 0 14px}
.qopts{display:flex;flex-wrap:wrap;gap:10px}
.qchip{box-sizing:border-box;min-height:44px;max-width:100%;padding:10px 16px;border-radius:999px;border:1.5px solid var(--line);background:var(--panel2);color:var(--ink);font:inherit;font-size:16px;line-height:1.3;cursor:pointer;text-align:start}
.qchip:hover,.qchip:focus-visible{border-color:var(--brand);outline:none}
.qchip.on{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.qcard label{display:block;font-weight:700;margin:14px 0 6px}
.qcard input:not(.hp),.qcard textarea{width:100%;box-sizing:border-box;font:inherit;font-size:16px;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--ink)}
.qcard textarea{resize:vertical}
.qcard #iqCheck{margin-top:16px}
.qnav{display:flex;gap:10px;justify-content:space-between;margin-top:18px}
.qnav .btn{min-width:110px}
.qmsg{min-height:1.5em;margin:10px 0 0}
.qside .eyebrow{font:700 13px/1.3 var(--mono);color:var(--brand);margin:0 0 10px}
.qside dl{display:grid;gap:6px;margin:0}
.qside dt{font-size:13px;color:var(--dim);margin-top:6px}
.qside dd{margin:0;font-weight:700;overflow-wrap:anywhere}
.qcard .hp{position:absolute;left:-9999px;width:1px;height:1px}
.bug .bugCheck{margin:14px 0 4px;max-width:560px}
/* the teaching half of a level page (site/dev/level_teach.mjs, 30 Nov 2026; ALKALIO's rules with the brand colour) */
.lvbody h2.th{font-size:20px;margin:30px 0 10px}
.lvbody p,.lvbody li,.lvbody dd{max-width:46em;line-height:1.6;overflow-wrap:break-word}
.list.cols{columns:2 16em;column-gap:28px}
.list.cols li{break-inside:avoid}
.terms{display:grid;grid-template-columns:minmax(8em,max-content) 1fr;gap:8px 18px;margin:0}
.terms dt{font-weight:700}
.terms dd{margin:0}
@media (max-width:560px){.terms{grid-template-columns:1fr;gap:2px}.terms dd{margin-bottom:10px}}
.qa{padding-left:1.3em;margin:0}
.qa>li{margin:0 0 18px}
.qa .q{font-weight:700;margin:0 0 6px}
.qa details{border-left:3px solid var(--brand);padding:2px 0 2px 12px}
.qa summary{cursor:pointer;color:var(--brand);font-weight:700;min-height:28px;display:list-item}
.qa details p{margin:.4em 0}
