/* moduleone.ai/os, v9 — component "uklad": the skeleton of the page under the opening.
   Contents on the left (README.md), chapter and subheading templates, the interface slot, Questions, the "Works with" row.
   Uses the tokens of site.css (v8): --page --plate --plate-h --rule --ink --ink-2 --muted --bar --band --gut --sans --mono
   --lede --body --small --r-plate --ease --t-ui. Every class here starts with "uk-", so nothing collides with v8 leftovers.
   Rules of the house: no accent bar on a left edge, one signal at a time, no page color outside the tokens. */
:root{
  --uk-wrap:1280px;                          /* widest the skeleton gets; the slot is what grows */
  --uk-gut:clamp(20px,3.4vw,80px);           /* side margin of the skeleton: tighter than --gut, so the interface gets the room */
  --uk-toc:240px;                            /* contents column */
  --uk-gap:48px;                             /* contents to chapter */
  --uk-lead:48px;                           /* end of the opening to the first chapter */
  --uk-chap:120px;                           /* between chapters */
  --uk-sub:64px;                             /* before a subheading that has its own interface */
  --uk-strip:44px;                           /* phone: the pinned strip of chapters */
  --uk-land:calc(var(--band) + 32px);        /* where a chapter lands under the pinned menu bar; the contents stick here too */
  --uk-h:500 2.75rem/1.06 var(--sans);  --uk-h-ls:-.03em;
  --uk-h3:500 1.5rem/1.2 var(--sans);   --uk-h3-ls:-.018em;
  --uk-note:500 1.1875rem/1.3 var(--sans);
}
@media (max-width:1099px){
  :root{--uk-toc:176px;--uk-gap:40px;--uk-chap:104px;--uk-lead:40px;--uk-h:500 2.375rem/1.08 var(--sans)}
}
@media (max-width:899px){
  :root{--uk-land:calc(var(--band) + var(--uk-strip) + 24px);--uk-lead:0px;--uk-chap:88px;--uk-sub:56px}
}
@media (max-width:699px){
  :root{--uk-chap:80px;--uk-sub:52px;--uk-h:500 2rem/1.1 var(--sans);--uk-h-ls:-.026em;--uk-h3:500 1.3125rem/1.25 var(--sans)}
}

/* ───────── 1. the skeleton: contents | chapters ───────── */
.uk-lay{width:min(var(--uk-wrap),100% - 2*var(--uk-gut));margin-inline:auto;padding-top:var(--uk-lead);
  display:grid;grid-template-columns:var(--uk-toc) minmax(0,1fr);column-gap:var(--uk-gap);align-items:start;counter-reset:uk-ch}
.uk-main{min-width:0}

/* ───────── 2. the contents. Sticky inside the skeleton, so it travels from the end of the opening to the start of the closing.
   No overscroll containment: the wheel over the contents and the keys after a click in them move the page (control r5-1, W-C) ───────── */
.uk-toc{position:sticky;top:var(--uk-land);align-self:start;margin:-4px -10px;padding:4px 10px;
  max-height:calc(100vh - var(--uk-land) - 24px);max-height:calc(100dvh - var(--uk-land) - 24px);overflow-y:auto;scrollbar-width:none;counter-reset:uk-toc}
.uk-toc::-webkit-scrollbar{display:none}
/* no JavaScript and no prerendered list: no empty column */
html:not(.js) .uk-toc:empty{display:none}
html:not(.js) .uk-toc:empty+.uk-main{grid-column:1/-1}
.uk-toc-f{margin:0 0 10px;padding-bottom:12px;border-bottom:1px solid var(--rule);font:500 .8125rem/1 var(--mono);color:var(--muted)}
.uk-toc-l,.uk-toc-subs ol{margin:0;padding:0;list-style:none}
.uk-toc-l{display:grid;gap:2px}
.uk-toc-c{counter-increment:uk-toc}
.uk-toc-c[data-nonum]{counter-increment:none}
.uk-toc a{display:flex;align-items:baseline;gap:12px;border-radius:8px;font:var(--small);color:var(--muted);text-decoration:none;transition:color var(--t-ui) ease-out,background-color var(--t-ui) ease-out}
.uk-toc-c>a{padding:7px 10px;margin-inline:-10px}
.uk-toc-c>a::before{content:counter(uk-toc,decimal-leading-zero);flex:none;width:2ch;font:400 .8125rem/1 var(--mono)}
.uk-toc-c[data-nonum]>a::before{content:""}
.uk-toc a:hover{color:var(--ink)}
.uk-toc a:focus-visible{outline-offset:-2px}
.uk-toc-c.on>a{color:var(--ink);background:var(--plate)}            /* the chapter you are in: ink on a plate, nothing else */
.uk-s{display:none}                                                 /* the short label: narrow column and phone strip */
/* subheadings: only under the chapter you are in */
.uk-toc-subs{display:grid;grid-template-rows:0fr;transition:grid-template-rows .26s var(--ease)}
.uk-toc-subs ol{min-height:0;overflow:hidden;visibility:hidden;transition:visibility 0s linear .26s}
.uk-toc-c.on .uk-toc-subs{grid-template-rows:1fr}
.uk-toc-c.on .uk-toc-subs ol{visibility:visible;transition-delay:0s}
.uk-toc-subs li:first-child{padding-top:4px}
.uk-toc-subs li:last-child{padding-bottom:8px}
.uk-toc-subs a{padding:5px 10px 5px calc(2ch + 12px);border-radius:6px;font-size:.8125rem;line-height:1.4}
.uk-toc-subs a[aria-current]{color:var(--ink)}

/* ───────── 3. a chapter: number, heading of three to five words, at most two short sentences, ONE interface ───────── */
.uk-ch{padding-top:var(--uk-chap);scroll-margin-top:calc(var(--uk-land) - var(--uk-chap))}
.uk-ch:first-child{padding-top:0;scroll-margin-top:var(--uk-land)}
.uk-ch[data-uk-ch]:not([data-uk-nonum]){counter-increment:uk-ch}
.uk-hd{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:32px;align-items:end}
.uk-hd>*{grid-column:1}
.uk-no{height:13px;font:500 .8125rem/1 var(--mono);color:var(--muted)}
.uk-no::before{content:counter(uk-ch,decimal-leading-zero)}
.uk-h{margin:16px 0 0;max-width:17em;font:var(--uk-h);letter-spacing:var(--uk-h-ls);color:var(--ink);text-wrap:balance}
.uk-no[hidden]+.uk-h,.uk-h:first-child{margin-top:0}
.uk-p{margin:18px 0 0;max-width:34rem;font:var(--lede);color:var(--ink-2);text-wrap:pretty}
.uk-p b{font-weight:500;color:var(--ink)}
/* ───────── 5. subheadings ───────── */
/* 5a. with its own interface */
.uk-sub{padding-top:var(--uk-sub);scroll-margin-top:calc(var(--uk-land) - var(--uk-sub))}
.uk-h3{margin:0;max-width:22em;font:var(--uk-h3);letter-spacing:var(--uk-h3-ls);color:var(--ink);text-wrap:balance}
.uk-sub .uk-p{margin-top:10px;max-width:32rem;font:var(--body)}
/* ───────── 6. Questions: the same chapter head, a list that unfolds in place of the interface ───────── */
.uk-ql{max-width:46rem;margin-top:32px;border-top:1px solid var(--rule)}
.uk-q{border:0;border-bottom:1px solid var(--rule);scroll-margin-top:var(--uk-land);interpolate-size:allow-keywords}
.uk-q>summary{display:flex;align-items:center;gap:16px;min-height:60px;padding:12px 0;cursor:pointer;list-style:none;font:500 1.0625rem/1.35 var(--sans);letter-spacing:-.006em;color:var(--ink)}
.uk-q>summary::-webkit-details-marker{display:none}
.uk-q>summary::after{content:"+";flex:none;width:1ch;margin-left:auto;padding:0;font:400 1.25rem/1 var(--mono);color:var(--muted);text-align:center}
.uk-q[open]>summary::after{content:"\2212"}
.uk-q>summary:focus-visible{outline:2px solid var(--ink);outline-offset:-2px;border-radius:6px}
.uk-q::details-content{block-size:0;overflow:hidden;transition:block-size .26s var(--ease),content-visibility .26s allow-discrete}
.uk-q[open]::details-content{block-size:auto}
.uk-a{max-width:38rem;padding:0 40px 22px 0;font:var(--body);color:var(--ink-2)}
.uk-q .uk-a p{margin:0!important}
.uk-q .uk-a p+p{margin-top:10px!important}

/* ───────── 7. "Works with", right under the headline of the opening. Names set in the page face; a logo goes in the same
   item as <img> or <svg> BEFORE the name once its owner allows it (zrodla.md). ───────── */
.uk-works{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 18px;margin-top:26px}
.uk-works[data-align="start"]{justify-content:flex-start}
.uk-works-l{font:400 .8125rem/1 var(--mono);color:var(--muted);white-space:nowrap}
.uk-works ul{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 0;margin:0;padding:0;list-style:none}
.uk-works li{display:inline-flex;align-items:center;gap:8px;height:24px;font:500 1.0625rem/1 var(--sans);letter-spacing:-.012em;color:var(--ink);white-space:nowrap}
.uk-works li+li::before{content:"";flex:none;width:1px;height:16px;margin:0 8px 0 16px;background:var(--muted);opacity:.45}
.uk-works img,.uk-works svg{flex:none;display:block;width:auto;height:20px}

/* ───────── 8. the footer row about other companies' marks (drop it into the footer of the closing) ───────── */
.uk-marks{flex-basis:100%;display:block!important;max-width:none!important;margin:0;font:400 .8125rem/1.5 var(--sans);color:var(--dim)}

/* ───────── narrower windows ───────── */
@media (max-width:1099px){
  .uk-t{display:none}.uk-s{display:inline}     /* a narrow contents column and the phone strip use the short labels (data-uk-short) */
}
@media (max-width:899px){
  /* phone and narrow tablet: the contents become one horizontal strip of chapters, pinned right under the menu bar with the widget */
  .uk-lay{display:block}
  .uk-toc{z-index:6;top:var(--band);height:var(--uk-strip);max-height:none;margin:0 calc(-1*var(--uk-gut));padding:0;overflow:visible;
    background:var(--bar);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 1px 0 var(--rule)}
  .uk-toc-f,.uk-toc-subs{display:none}
  .uk-toc-l{display:flex;gap:2px;height:100%;padding:0 calc(var(--uk-gut) - 12px);overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 12px,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 12px,#000 calc(100% - 28px),transparent 100%)}
  .uk-toc-l::-webkit-scrollbar{display:none}
  .uk-toc-c{flex:none}
  .uk-toc-c>a{position:relative;isolation:isolate;align-items:center;gap:7px;height:100%;margin:0;padding:0 12px;border-radius:0;white-space:nowrap}
  .uk-toc-c.on>a{background:none}
  .uk-toc-c>a::after{content:"";position:absolute;z-index:-1;inset:7px 0;border-radius:999px;background:var(--plate);opacity:0;transition:opacity var(--t-ui) ease-out}
  .uk-toc-c.on>a::after{opacity:1}
  .uk-toc-c>a:focus-visible{outline-offset:-4px;border-radius:999px}
  .uk-toc-c[data-nonum]>a::before{display:none}
  .uk-main{padding-top:56px}
}
@media (max-width:699px){
  .uk-hd{grid-template-columns:minmax(0,1fr)}
  .uk-p{margin-top:14px}
  /* the slot runs from edge to edge of the screen, so a 360 pt surface of the app fits at 1:1 */
  .uk-ql{margin-top:24px}
  .uk-a{padding-right:28px}
  .uk-works{gap:10px 14px;margin-top:22px}
  .uk-works li{font-size:1rem}
}
/* touch: at least 44 x 44 */
@media (max-width:699px),(hover:none){
  .uk-toc-subs a{min-height:44px;align-items:center}
}
@media (prefers-reduced-motion:reduce){
}
