/* =====================================================================
   THE MANUAL'S STATIC COPY (tools/docstatic.mjs → /manual/**; docs/contracts/
   docs.md → THE MANUAL'S WORDS ARE ALSO STATIC PAGES). A page of the manual
   as a document: the manual's own band, rail and page (css/docs.css, the
   kit's css/ds.css, the tokens and grounds of css/main.css), scrolled by the
   window instead of the terminal's stage, with the one way into the
   terminal in its band. Tokens only; both grounds (js/ui/docs/ground.js).
   ===================================================================== */
html:has(> body.mx:not(.mxl)),body.mx:not(.mxl){height:auto}
/* the manual's measures (css/docs.css → #view-docs.dx), for the band and the foot outside the page too */
body.mx{--dxMeasure:472px;--dxFit:720px;--dxMax:2240px;--dxRail:208px;--dxRailGap:40px;--dxLane:var(--sp48);--dxGut:clamp(20px,2.4vw,44px);
  display:block;min-height:100vh;overflow:visible;overflow-x:hidden}
.mx:not(.mxl) #view-docs.dx{display:block;overflow:visible;min-height:0}
/* the band stays over the page as it scrolls, on the page's own ground */
.mx .mx-band{position:sticky;top:0;z-index:5;background:var(--void)}
.mx:not(.mxl) .dx-chl.on{box-shadow:inset 0 -2px 0 var(--accent2)}
.mx-brand .ymark{flex:none;width:22px;height:22px}
.mx-open{flex:none;margin-left:auto;text-decoration:none;white-space:nowrap}
/* the rail stands under the band */
.mx:not(.mxl) .dx-otp{top:46px;max-height:calc(100vh - 60px)}
.mx-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sp12);max-width:var(--dxMax);margin:0 auto;
  padding:var(--sp20) var(--dxGut,24px) var(--sp28);font:var(--fBodySm);color:var(--faint);box-shadow:inset 0 1px 0 rgba(var(--ink),.08)}
@media (max-width:720px){
  .mx .mx-band{padding:0 16px}
  .mx:not(.mxl) .dx-chs{display:none}
  .mx:not(.mxl) .dx-art{padding:20px 16px 40px}
  .mx:not(.mxl) .dx-page{padding:0}
}
/* LIVE (js/manual/main.js): the manual's own view has drawn over the copy, and it is read as the terminal reads
   it, in a stage under a band that never scrolls away (css/docs.css); the window itself no longer scrolls */
body.mx.mxl{height:100vh;height:100dvh;min-height:0;overflow:hidden}
.mxl #view-docs.dx{height:100%}
.mxl .dx-band{background:var(--void)}

/* =====================================================================
   (v9 · Q66, round 2) THE MANUAL, READ AS A BOOK. The owner: "the idea is good the ui for the manual and the top page
   can be improved". Its own tab reads on the product's own material, cut for reading: the article is one paper sheet
   risen off the ground (the plates' face and shadow), the side index stays on the ground beside it, quiet; the words
   keep to a reading measure in a larger, calmer scale, the figures keep the sheet's width. The front is a calm
   entrance: the search first, then every chapter as a card (js/ui/docsview.js → front). The terminal's own Docs and a
   phone read as they did. Tokens only, both grounds.
   ===================================================================== */
@media (min-width:721px){
  .mx #view-docs.dx{--dxMeasure:600px;--dxRail:216px;--dxRailGap:var(--sp32);--dxMax:1680px;
    --dxFH1:600 36px/1 var(--sans);--dxFLede:400 18px/1.6 var(--sans);--dxFH2:600 28px/1.3 var(--sans);--dxFH3:600 18px/1.3 var(--sans);
    --dxFP:400 15px/1.6 var(--sans);--dxFWords:400 15px/1.6 var(--sans)}
  .mx .dx-art{margin:var(--sp24) 0 var(--sp40);padding:var(--sp48) clamp(var(--sp32),4vw,var(--sp48)) var(--sp48);border-radius:var(--r16);
    background:var(--plateTall);box-shadow:var(--plateSh)}
  .mx .dx-h1{letter-spacing:-.02em}
  .mx .dx-ph{padding-bottom:var(--sp12)}
  .mx .dx-ptabs{margin-bottom:var(--sp20)}
  .mx .dx-sec{margin-top:var(--sp48)}
  .mx .dx-sec.dx-sub{margin-top:var(--sp32)}
  /* the head's acts speak as sentences, one family: the kit's quiet keys, sentence case */
  .mx .dx-acts .ds-btn{text-transform:none;letter-spacing:0;font:600 13px/1 var(--sans)}
  /* the side index: the chapter's name small, its pages in the title's ink, the parts under a hairline, the one in
     view ticked in the orange (css/docs.css → .dx-otparts) */
  .mx .dx-otp{padding-top:calc(var(--sp24) + var(--sp48))}
  .mx .dx-otpg{font:500 13px/1.3 var(--sans)}
  .mx .dx-otparts a{font:400 13px/1.3 var(--sans);padding-top:6px;padding-bottom:6px}

  /* ---- THE FRONT ---- */
  .mx .mx-hero{display:flex;flex-direction:column;align-items:flex-start;padding:var(--sp24) 0 var(--sp8)}
  .mx .mx-hero .dx-h1{font:600 48px/1 var(--sans);letter-spacing:-.022em}
  .mx-hl{margin:var(--sp12) 0 0;max-width:560px;font:400 18px/1.45 var(--sans);color:var(--dim);text-wrap:balance}
  .mx-q{position:relative;width:min(640px,100%);margin-top:var(--sp28)}
  .mx-q>.dx-findw.mx-big{width:100%}
  /* (v9 · Q66, round 3) THE SEARCH, A RAISED FIELD. The owner: "this doesn't look premium and modern". The front's search
     is a sheet risen off the page (the plate's face, a hairline and a soft shadow, never a grey recess), its glyph on a
     soft disc, its key at the right; typing, its edge takes the orange's glow and the answers hang from it as the same
     sheet, one piece. Light, tone and shadow only */
  .mx-big .dx-find{height:58px;padding:0 var(--sp12) 0 var(--sp10);gap:var(--sp12);border-radius:var(--r16);background:var(--plateHi);
    box-shadow:0 0 0 1px var(--hdRule),0 1px 0 var(--edge),0 10px 30px rgba(var(--shd),calc(.10*var(--shdK))),inset 0 1px 0 var(--lip);
    transition:box-shadow var(--tState) var(--ease),border-radius var(--tArrive) var(--ease)}
  .mx-big .dx-find>.ds-i{box-sizing:content-box;padding:9px;border-radius:50%;--is:16px;color:var(--dim);background:var(--track)}
  .mx-big .dx-find:focus-within{box-shadow:0 0 0 1px rgba(var(--acc2RGB),.55),0 0 0 4px rgba(var(--acc2RGB),.14),0 14px 36px rgba(var(--shd),calc(.14*var(--shdK))),inset 0 1px 0 var(--lip)}
  .mx-big .dx-find:focus-within>.ds-i{color:var(--accInk);background:rgba(var(--acc2RGB),.12)}
  .mx .mx-big .dx-find input,.mx .mx-big .dx-find input:focus{height:100%;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font:400 18px/1 var(--sans);letter-spacing:-.014em}
  .mx-big .dx-fk{min-width:24px;height:24px;font-size:12px}
  .mx-big .dx-res{left:0;right:auto;top:calc(100% + 10px);width:100%;padding:var(--sp8);border-radius:var(--r16);background:var(--plateHi);
    box-shadow:0 0 0 1px var(--hdRule),0 24px 60px rgba(var(--shd),calc(.22*var(--shdK))),inset 0 1px 0 var(--lip)}
  .mx-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:var(--sp12);max-width:none!important;margin-top:var(--sp40)}
  /* a chapter's card. (Round 3) its hover is light, never a lift (the owner: "add great hover ui for this cards"; the
     lesson: a hover that moves a thing leaves its old place unhovered and flickers): under the hand the face brightens,
     its edge and shadow deepen, its glyph takes the orange and an arrow comes up in its corner */
  .mx-card{position:relative;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr auto;column-gap:var(--sp12);row-gap:var(--sp6);min-height:112px;padding:var(--sp16);
    border-radius:var(--r14);text-decoration:none;color:var(--text);background:var(--panel2);box-shadow:0 0 0 1px var(--hdRule),0 0 0 rgba(var(--shd),0);--travel:0px;--downSh:none;
    transition:box-shadow var(--tState) var(--ease),background-color var(--tState) var(--ease)}
  .mx-card::after{content:"";position:absolute;right:var(--sp14);top:var(--sp14);width:18px;height:18px;opacity:0;
    -webkit-mask:var(--mxArrow) center/16px no-repeat;mask:var(--mxArrow) center/16px no-repeat;background:var(--accInk);transition:opacity var(--tState) var(--ease)}
  .mx-card{--mxArrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E")}
  @media (hover:hover){
    .mx-card:hover{background:var(--panel3);box-shadow:0 0 0 1px rgba(var(--ink),.14),0 14px 34px rgba(var(--shd),calc(.16*var(--shdK))),inset 0 1px 0 var(--lip)}
    .mx-card:hover::after{opacity:1}
    .mx-card:hover .mx-ci{color:var(--accInk);background:rgba(var(--acc2RGB),.12)}
    .mx-card:hover>b{color:var(--text)}
  }
  .mx-card:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
  .mx-ci{grid-row:1/4;display:grid;place-items:center;width:34px;height:34px;border-radius:var(--r10);background:var(--track);color:var(--dim);--is:16px;transition:color var(--tState) var(--ease),background-color var(--tState) var(--ease)}
  .mx-card>b{font:600 15px/1.3 var(--sans);letter-spacing:-.009em}
  .mx-cs{font:400 13px/1.45 var(--sans);color:var(--dim);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .mx-card>em{font:var(--fHdFig);font-style:normal;color:var(--faint)}
  .mx-intro{margin-top:var(--sp48);padding-top:var(--sp32);box-shadow:inset 0 1px 0 var(--hdRule)}
  .mx-intro .dx-lede{max-width:var(--dxMeasure)}
}
