/* ==========================================================================
   MANGA — one page. Loaded on a/manga.html only.

   Founder, 2026-09-26: the page is Annie's Claude artifact, shell excepted.
   The whole page is a manga page: numbered panels on a six-column sheet that
   flows right to left (direction: rtl on the board; the order follows the
   binding, not the script), panels of deliberately unequal size, and gutters
   unequal on purpose: rows 26px apart, panels inside a row 10px apart. The
   Build with it board (grammar/boards.ts, styled by grammar.css) sits in the
   sheet as its next full-width panel; only its frame is restyled here, every
   specimen stays on the grammar's own tokens (--gm-*).

   One ink on off-white stock; tone as CSS pattern fills that scale, never a
   raster at a fixed frequency. One colour plate, the corrections: colour
   marks editorial priority.

   MOTIONLESS BY FOUNDER RULING: no animation, no transition, anywhere. Speed
   and focus lines are drawn. Only user-triggered toggles change the page.

   Every rule is scoped to .mg-page main, .mg-mat, .mg-rec or the board
   (.mg-page .gm--manga). The shell is never restyled.

   Contrast (text/ground, WCAG AA):
   ink #111 on paper #F6F3EC 17.0 · on mat #D8D4CA 12.8
   spot #C22D41 on paper 5.1 · paper on spot 5.1 (the plate's tab)
   ink-2 #4A4640 on paper 8.5
   ========================================================================== */
@font-face { font-family: "MgArchivo"; src: url("fonts/archivo.woff2") format("woff2-variations"), url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "MgArchivo"; src: url("fonts/archivo-latin-ext.woff2") format("woff2-variations"), url("fonts/archivo-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.mg-page {
  --mg-ink: #111111;
  --mg-ink2: #4A4640;
  --mg-paper: #F6F3EC;
  --mg-mat: #D8D4CA;
  --mg-spot: #C22D41;
  --mg-gut: 10px;   /* inside a row */
  --mg-row: 26px;   /* between rows: larger, on purpose */
  --mg-face: "MgArchivo", "Helvetica Neue", Arial, sans-serif;
}
.mg-page main { background: var(--mg-mat); color: var(--mg-ink); overflow-x: clip; }

/* Motionless by ruling reaches the shell's scroll reveal too: the record is
   present, never arriving. (Outranks site.css's .js-reveal rule.) */
.mg-page main > section.mg-rec { opacity: 1; transform: none; transition: none; will-change: auto; }

/* ---- the sheet ---------------------------------------------------------- */
.mg-mat { padding: clamp(10px, 3vw, 30px) clamp(10px, 3vw, 30px) 0; font: 400 17px/1.6 var(--mg-face); color: var(--mg-ink); font-synthesis: style; }
.mg-rec .mg-mat { padding-top: 0; padding-bottom: clamp(10px, 3vw, 30px); }
.mg-pg { max-width: 1160px; margin: 0 auto; padding: clamp(14px, 3vw, 34px); background: var(--mg-paper); box-shadow: 0 2px 0 #B9B4A8; }
.mg-pg--a { padding-bottom: var(--mg-row); box-shadow: none; }
.mg-pg--b { padding-top: 0; }
.mg-pnl a, .mg-lab a { color: var(--mg-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mg-pnl a:hover, .mg-lab a:hover { background: var(--mg-ink); color: var(--mg-paper); }
.mg-mat :focus-visible, .mg-page .gm--manga :focus-visible { outline: 3px solid var(--mg-ink); outline-offset: 3px; }
.mg-pnl b { font-weight: 800; }

.mg-board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--mg-gut); row-gap: var(--mg-row); direction: rtl; }
.mg-board > * { direction: ltr; }
.mg-board + .mg-board, .mg-evs { margin-top: var(--mg-row); }
.mg-tone-pnl { align-self: start; }
.mg-c2 { grid-column: span 2; } .mg-c3 { grid-column: span 3; } .mg-c4 { grid-column: span 4; } .mg-c6 { grid-column: span 6; }
.mg-r2 { grid-row: span 2; }

.mg-pnl { position: relative; min-width: 0; padding: 20px 22px 22px; border: 3px solid var(--mg-ink); background: var(--mg-paper); }
.mg-n { position: absolute; top: -3px; right: -3px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; background: var(--mg-ink); color: var(--mg-paper); font: 800 13px/1.2 var(--mg-face); font-stretch: 75%; letter-spacing: .06em; }
.mg-n svg { width: 12px; height: 9px; }
.mg-inner { position: relative; padding: 10px 14px; border: 2px solid var(--mg-ink); background: var(--mg-paper); }

/* tone, speed lines, focus lines: drawn fills that scale with the page */
.mg-tone1 { background-image: radial-gradient(var(--mg-ink) 22%, transparent 24%); background-size: 7px 7px; }
.mg-tone2 { background-image: radial-gradient(var(--mg-ink) 32%, transparent 34%); background-size: 5px 5px; }
.mg-ramp { background: linear-gradient(90deg, var(--mg-paper), #8D8A84); }
.mg-speed { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(17, 17, 17, .9) 6px 7px, transparent 7px 13px, rgba(17, 17, 17, .5) 13px 14px); -webkit-mask: linear-gradient(90deg, #000 0 30%, transparent 70%); mask: linear-gradient(90deg, #000 0 30%, transparent 70%); }
.mg-focus { position: absolute; inset: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg at 50% 50%, var(--mg-ink) 0 1.2deg, transparent 1.2deg 6deg); -webkit-mask: radial-gradient(circle at 50% 50%, transparent 32%, #000 34%); mask: radial-gradient(circle at 50% 50%, transparent 32%, #000 34%); }

/* type */
.mg-h1 { margin: 0; font: 900 clamp(54px, 9vw, 124px)/.85 var(--mg-face); letter-spacing: -.04em; text-transform: uppercase; }
.mg-h2 { margin: 0 0 10px; font: 900 clamp(24px, 3vw, 34px)/1 var(--mg-face); text-transform: uppercase; letter-spacing: -.01em; }
.mg-h3 { margin: 18px 0 6px; font: 800 19px/1.3 var(--mg-face); }
.mg-p { margin: 0 0 10px; }
.mg-p:last-child { margin-bottom: 0; }
.mg-small { margin: 8px 0 0; font-size: 14px; line-height: 1.55; }
.mg-lab { margin: 0 0 10px; font: 700 12px/1.6 var(--mg-face); font-stretch: 75%; letter-spacing: .14em; text-transform: uppercase; }
.mg-lab--in { margin: 0 0 6px; }
.mg-note { margin: 10px 0 0; font-size: 14px; line-height: 1.55; font-stretch: 87.5%; }
.mg-meta { margin: 10px 0 0; }
.mg-ul { margin: 6px 0 0; padding-left: 18px; }
.mg-k { display: inline-block; margin-right: 6px; padding: 1px 6px; border: 1.5px solid var(--mg-ink); font: 700 11px/1.5 var(--mg-face); font-stretch: 75%; letter-spacing: .1em; text-transform: uppercase; vertical-align: .1em; }
.mg-scope { display: block; margin-top: 4px; font: 700 12px/1.5 var(--mg-face); font-stretch: 75%; letter-spacing: .06em; }
.mg-ev { display: inline-block; padding: 0 5px; border: 1.5px dashed var(--mg-ink2); color: var(--mg-ink2); font: 600 12px/1.5 var(--mg-face); font-stretch: 87.5%; vertical-align: .1em; white-space: nowrap; }

/* 01 · the hero panel */
.mg-hero { display: flex; flex-direction: column; justify-content: flex-end; min-height: 360px; }
.mg-hero .mg-inner p { margin: 6px 0 0; }

/* 02 · the balloon */
.mg-bub { position: relative; display: inline-block; margin: 0; padding: 18px 26px; border: 2.5px solid var(--mg-ink); border-radius: 50% / 40%; background: #FFFFFF; font-weight: 600; }
.mg-bub::after { content: ""; position: absolute; right: 30%; bottom: -18px; border: 10px solid transparent; border-top: 14px solid var(--mg-ink); }
.mg-after { margin-top: 26px; }

/* 06 · size is duration */
.mg-pace { display: grid; grid-template-columns: 1fr 2fr 4fr; gap: 8px; margin-top: 12px; direction: rtl; }
.mg-pace div { direction: ltr; display: flex; align-items: flex-end; height: 90px; padding: 6px; border: 2.5px solid var(--mg-ink); font: 700 12px var(--mg-face); font-stretch: 75%; }

/* 07 · manpu */
.mg-manpu { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 8px; color: var(--mg-ink); }
.mg-manpu svg { width: 64px; height: 64px; }
.mg-manpu .mg-small { flex: 1 1 14rem; margin: 0; }
.mg-fx { min-height: 200px; display: flex; flex-direction: column; justify-content: center; }

/* 09 · the one colour plate */
.mg-colour { border-color: var(--mg-spot); }
.mg-colour .mg-h2 { color: var(--mg-spot); }
.mg-colour .mg-n { background: var(--mg-spot); }
.mg-lead { max-width: 75ch; }
.mg-q { border-top: 2px solid var(--mg-ink); }
.mg-q summary { display: flex; align-items: center; min-height: 44px; padding: 6px 0; list-style: none; cursor: pointer; font: 800 17px/1.35 var(--mg-face); }
.mg-q summary::-webkit-details-marker { display: none; }
.mg-q__n { flex: none; margin-right: .35em; white-space: nowrap; }
.mg-q summary::before { content: "+"; flex: none; width: 1.3em; color: var(--mg-spot); font-weight: 900; }
.mg-q[open] summary::before { content: "\2212"; }
.mg-q > .mg-p { margin: 0 0 12px 1.3em; max-width: 75ch; }

/* 10 · the rules */
.mg-rules { margin: 0; padding: 0; list-style: none; }
.mg-rules li { padding: 10px 0; border-top: 2px solid var(--mg-ink); }

/* 11 · tone, the lawful way */
.mg-tw { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mg-tw div { height: 110px; border: 2.5px solid var(--mg-ink); }

/* 12 · moving it to screen: two lists, stacked beside the rules */
.mg-two { display: grid; gap: 14px; }

/* 13 · the record */
.mg-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 15px; }
.mg-dl dt { font: 700 12px/1.9 var(--mg-face); font-stretch: 75%; letter-spacing: .1em; text-transform: uppercase; }
.mg-dl dd { margin: 0; min-width: 0; }
.mg-tblw { max-width: 100%; overflow-x: auto; margin-top: 12px; }
.mg-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.mg-tbl th, .mg-tbl td { padding: 6px 8px; border-top: 2px solid var(--mg-ink); text-align: left; vertical-align: top; }

/* what carries the look */
.mg-dims { margin: 8px 0 0; padding: 0; list-style: none; }
.mg-dims li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 4px 14px; padding: 6px 0; border-top: 2px solid var(--mg-ink); font-size: 15px; }
.mg-dim a, .mg-tags a, .mg-use a, .mg-conf a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }
.mg-dim .mg-k { display: table; margin-top: 2px; }
.mg-dimv { display: grid; gap: 6px; align-content: center; }
.mg-tags { display: flex; flex-wrap: wrap; gap: 0 14px; }
.mg-none { color: var(--mg-ink2); }
.mg-pal { display: flex; flex-wrap: wrap; gap: 8px; }
.mg-pal span { display: grid; gap: 3px; width: 70px; font-size: 12px; font-weight: 700; }
.mg-pal i { display: block; height: 44px; border: 2px solid var(--mg-ink); }

/* 14 · often confused with · use it */
.mg-conf, .mg-use { margin: 0 0 14px; padding: 0; list-style: none; }
.mg-conf li, .mg-use li { padding: 2px 0; }
.mg-conf li + li, .mg-use li + li { border-top: 2px solid var(--mg-ink); }
.mg-use { margin-bottom: 0; }
.mg-use a { margin-right: 10px; }

/* the provenance apparatus, set in the sheet's ink */
.mg-pg > .ex-prov-bar { margin: 0 0 14px; padding: 6px 0; background: transparent; border-block-end: 2px solid var(--mg-ink); color: var(--mg-ink2); font: 400 13px/1.5 var(--mg-face); }
.mg-pg > .ex-prov-bar label { display: inline-flex; align-items: center; min-height: 36px; border: 2px solid var(--mg-ink); color: var(--mg-ink); font-weight: 700; }
.mg-pg .ex-prov-mark { min-height: 24px; border: 1.5px solid var(--mg-ink); border-radius: 0; color: var(--mg-ink); background: var(--mg-paper); line-height: 20px; }
.mg-pg .ex-prov-mark[data-backed="no"] { border-style: dashed; color: var(--mg-ink2); }
.mg-pg .ex-prov { border: 2px solid var(--mg-ink); box-shadow: 4px 4px 0 var(--mg-ink); }

/* ==========================================================================
   THE BUILD WITH IT BOARD, as the sheet's next full-width panel. Frame only.
   ========================================================================== */
.mg-page .gm.gm--manga { max-width: none; margin: var(--mg-row) 0 0; padding: 20px 22px 22px; border: 3px solid var(--mg-ink); font-family: var(--mg-face), "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; }
.mg-page .gm--manga .gm__head { margin-bottom: 22px; }
.mg-page .gm--manga .gm__title { font: 900 clamp(24px, 3vw, 34px)/1 var(--mg-face); text-transform: uppercase; letter-spacing: -.01em; }
.mg-page .gm--manga .gm__key, .mg-page .gm--manga .gm__get { font-size: 14px; opacity: 1; }
.mg-page .gm--manga .gm-more summary { display: list-item; min-height: 44px; padding: 10px 0; line-height: 24px; }
.mg-page .gm--manga .gm-f__n { font-family: var(--mg-face); font-weight: 800; }

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .mg-board { grid-template-columns: minmax(0, 1fr); direction: ltr; }
  .mg-board > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .mg-hero { min-height: 300px; }
}
@media (max-width: 480px) {
  .mg-mat { font-size: 16px; }
  .mg-pnl, .mg-page .gm.gm--manga { padding: 18px 14px 16px; }
  .mg-dims li { grid-template-columns: minmax(0, 1fr); }
  .mg-dl { grid-template-columns: minmax(0, 1fr); }
  .mg-dl dd { margin-bottom: 6px; }
}
