/* MarcusLabs — The Charter of Ability: its link in the book's panel on the homepage, and its own page (/book/charter/).
   Tokens only, apart from the emblem's shadow (the Eikus tumbler's own shadow colour). The emblem is the author's own
   picture: shown as it is, never tinted. It rocks gently all the time, like the Eikus tumbler (js/widgets/charter-tumbler.js
   turns it; nothing here animates it). */

/* ---------- the emblem, rocking, with a soft shadow on the ground under it ---------- */
.rocker { position: relative; display: inline-block; line-height: 0; }
.rocker img { position: relative; z-index: 1; display: block; }
/* centred under the point the egg stands on (40.4 % across, 95 % down the picture) and as big as the Eikus tumbler's
   shadow is under its egg, only lighter. Kept on purpose: the user keeps this one shadow (2026-10-26) */
.rocker-shadow { position: absolute; z-index: 0; left: 6%; top: 90.8%; width: 68.8%; height: 8.5%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(11 8 7 / .47), rgb(11 8 7 / .38) 30%, rgb(11 8 7 / .25) 55%, rgb(11 8 7 / .1) 78%, rgb(11 8 7 / 0)); }

/* ---------- homepage, the book's panel: the Charter in the top-right corner, both figures below it ----------
   Two rows: the Charter on top of the Ability column (the emblem in the corner, its name and count under it, larger, set
   right), the Ability figure under it; Knowledge spans both rows and sits lower down, its foot a step above Ability's.
   On a tall screen the figures settle to the bottom. The Ability figure and the link over it are one item of the
   [data-stagger] pair (a subgrid spanning both rows), so they are dragged along together. */
.pv-book.has-charter { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto; justify-content: center;
  align-items: start; row-gap: calc(var(--h) * .07); }
.pv-book.has-charter > .pv-item { grid-area: 1 / 1 / 3 / 2; align-self: end; margin-bottom: calc(var(--h) * .14); }
.pv-charter { grid-area: 1 / 2 / 3 / 3; display: grid; grid-template-rows: subgrid; }
.pv-charter > .pv-item { grid-row: 2; }
/* as wide as the picture under it (1440 × 1800, so .8 of its height) and lined up with it, even where the caption makes
   the figure wider */
.charter-link { grid-row: 1; align-self: start; justify-self: center; width: calc(var(--h) * .8); display: flex; flex-direction: column;
  align-items: flex-end; gap: clamp(calc(8 * var(--u)), calc(var(--h) * .03), calc(16 * var(--u))); text-align: right; text-decoration: none; color: var(--ink); }
.charter-link img { flex: none; width: auto; height: calc(var(--h) * .132); }
.charter-link-txt { display: grid; justify-items: end; gap: calc(8 * var(--u)); }
.charter-link-t { font-family: var(--sans); font-stretch: var(--expanded); font-weight: 820; font-size: clamp(calc(22 * var(--u)), calc(var(--h) * .098), calc(50 * var(--u)));
  line-height: 1.02; letter-spacing: -.01em; color: var(--olive); text-wrap: balance; transition: color .2s; }
.charter-link-m { font-size: calc(12.5 * var(--u)); line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.charter-link-m > span { white-space: nowrap; }   /* if it must wrap, only at the dot */
.charter-link-m .arr { display: inline-block; color: var(--amber); transition: transform .3s var(--ease-out); }
.charter-link:is(:hover, :focus-visible) { color: var(--ink); }
.charter-link:is(:hover, :focus-visible) .charter-link-t { color: var(--amber); }
.charter-link:is(:hover, :focus-visible) .arr { transform: translateX(calc(6 * var(--u))); }

@media (min-width: 861px) {
  /* the pair runs the text column's full height: the Charter level with the top of the words, the figures at the bottom;
     the Charter takes about .43 of a figure's height above the Ability figure, and keeps some air under the header */
  .pv-book.has-charter { align-self: stretch; --h: min(calc((100svh - calc(220 * var(--u))) / 1.43), calc(640 * var(--u)), calc((100cqi - calc(28 * var(--u))) / var(--sum))); }
  .pv-book.has-charter > .pv-charter:nth-child(2) { margin-top: 0; }
}
@media (max-width: 640px) {
  .charter-link img { height: calc(34 * var(--u)); }
  .charter-link-t { font-size: calc(19 * var(--u)); }
  .charter-link-m { font-size: calc(10.5 * var(--u)); letter-spacing: .06em; }
}

/* ---------- /book/charter/ ---------- */
/* the header names the chapter you are in; a long name gives way (…) before the links and the button do */
.charter .nav-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.charter .nav-links, .charter .nav-cta { flex-shrink: 0; }
/* hero: title, subtitle and byline on the left, the emblem on the right */
.charter-hero .page-hero-in { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.charter-hero .eyebrow a.t { text-decoration: none; }
.charter-hero .eyebrow a.t:hover { color: var(--amber); }
.charter-title { font-size: clamp(calc(44 * var(--u)), min(6.3vw, calc(11.5svh * var(--f))), calc(88 * var(--u))); text-wrap: balance; }   /* at width 125, "The Charter" still on one line */
.charter-sub { font-size: clamp(calc(14 * var(--u)), calc(1.45vw * var(--f)), calc(20 * var(--u))); color: var(--stone); }
.charter-by { margin: calc(14 * var(--u)) 0 0; font-size: calc(12 * var(--u)); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.charter-emblem { margin: 0; justify-self: center; width: min(100%, calc((100svh - calc(280 * var(--u))) * .832)); }
.charter-emblem .rocker, .charter-emblem img { width: 100%; }

/* each part: its heading on the left (it stays in view while its articles scroll by), the text on the right */
.ch-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(calc(32 * var(--u)), calc(5vw * var(--f)), calc(88 * var(--u))); align-items: start;
  padding-top: clamp(calc(26 * var(--u)), calc(3vw * var(--f)), calc(40 * var(--u))); border-top: 1px solid var(--line); }
.ch-head .eyebrow { margin-bottom: clamp(calc(14 * var(--u)), calc(1.6vw * var(--f)), calc(22 * var(--u))); }
.ch-title { font-weight: 820; font-size: clamp(calc(28 * var(--u)), calc(3.1vw * var(--f)), calc(50 * var(--u))); line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; }
/* "Supplementary" is one long word (about 9.1 em at width 125): sized to its column so it fills about 85% of it and
   keeps clear of the articles beside it */
#supplementary-provisions .ch-head { container-type: inline-size; }
#supplementary-provisions .ch-title { font-size: min(clamp(calc(28 * var(--u)), calc(3.1vw * var(--f)), calc(50 * var(--u))), 9.3cqi); }
.ch-meta { display: flex; flex-wrap: wrap; gap: calc(6 * var(--u)) calc(18 * var(--u)); margin: calc(18 * var(--u)) 0 0; font-size: calc(11.5 * var(--u)); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ch-meta a { color: var(--ink-3); text-decoration: none; }
.ch-meta a:hover { color: var(--amber); }
@media (min-width: 861px) {
  .ch-head { position: sticky; top: calc(100 * var(--u)); }
}

/* the Preamble reads a size up */
.preamble p { max-width: 38em; font-size: clamp(calc(16 * var(--u)), calc(1.32vw * var(--f)), calc(19.5 * var(--u))); line-height: 1.72; color: var(--ink-2); }
.preamble p:last-child { margin: 1.6em 0 0; color: var(--ink); }

/* the articles: the number set apart in the left margin, the text beside it */
.art { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 0 clamp(calc(14 * var(--u)), calc(2vw * var(--f)), calc(32 * var(--u))); padding: clamp(calc(18 * var(--u)), calc(1.8vw * var(--f)), calc(26 * var(--u))) 0;
  border-top: 1px dotted var(--line); scroll-margin-top: calc(96 * var(--u)); }
.art:first-child { padding-top: 0; border-top: 0; }
.art-n { margin: 0; display: grid; align-content: start; gap: calc(4 * var(--u)); font-family: var(--mono); font-stretch: 100%; font-weight: 400; }
.art-k { font-size: calc(10.5 * var(--u)); line-height: 1; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.art-i { font-family: var(--sans); font-stretch: var(--expanded); font-weight: 820; font-size: clamp(calc(26 * var(--u)), calc(2.3vw * var(--f)), calc(36 * var(--u))); line-height: 1;
  letter-spacing: -.01em; color: var(--amber); font-variant-numeric: tabular-nums; }
.art-t { margin: 0; max-width: 40em; font-size: clamp(calc(15.5 * var(--u)), calc(1.2vw * var(--f)), calc(18 * var(--u))); line-height: 1.66; color: var(--ink); }
.art:target .art-i { color: var(--cream); }

/* the chapter list: two columns, read down then across, like a book's contents */
h2.eyebrow { font-stretch: 100%; font-weight: 400; line-height: 1.5; }
.ch-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(8, auto);
  grid-auto-flow: column; column-gap: clamp(calc(32 * var(--u)), calc(5vw * var(--f)), calc(88 * var(--u))); border-bottom: 1px dotted var(--line); }
.ch-index a { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; gap: calc(14 * var(--u)); align-items: baseline; padding: calc(15 * var(--u)) 0 calc(14 * var(--u));
  border-top: 1px dotted var(--line); text-decoration: none; color: var(--ink); }
.ch-index .n { font-size: calc(12 * var(--u)); letter-spacing: .08em; color: var(--amber); }
.ch-index .t { font-family: var(--sans); font-stretch: var(--expanded); font-weight: 700; font-size: clamp(calc(16 * var(--u)), calc(1.45vw * var(--f)), calc(21 * var(--u))); line-height: 1.25; transition: color .15s; }
.ch-index .r { font-size: calc(11.5 * var(--u)); letter-spacing: .06em; color: var(--ink-3); white-space: nowrap; }
.ch-index a:hover .t { color: var(--amber); }

/* the Conclusion: the last word, alone on its screen */
.charter-end { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.charter-end .eyebrow { margin-bottom: clamp(calc(22 * var(--u)), calc(2.6vw * var(--f)), calc(36 * var(--u))); }
.charter-end-mark { width: clamp(calc(64 * var(--u)), 6.5vw, calc(96 * var(--u))); margin: 0 0 clamp(calc(26 * var(--u)), calc(3vw * var(--f)), calc(40 * var(--u))); }
.charter-end-mark .rocker, .charter-end-mark img { width: 100%; }
.charter-close { margin: 0; max-width: 17em; font-family: var(--sans); font-stretch: var(--expanded); font-weight: 300;
  font-size: clamp(calc(30 * var(--u)), calc(4.4vw * var(--f)), calc(68 * var(--u))); line-height: 1.1; letter-spacing: -.02em; color: var(--cream); text-wrap: balance; }
.charter-end .cta-row { margin-top: clamp(calc(40 * var(--u)), calc(5vw * var(--f)), calc(64 * var(--u))); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .charter-hero .page-hero-in { grid-template-columns: minmax(0, 1fr); gap: calc(28 * var(--u)); }
  .charter-emblem { order: -1; justify-self: start; width: clamp(calc(110 * var(--u)), 30vw, calc(200 * var(--u))); }
  .ch-in { grid-template-columns: minmax(0, 1fr); gap: calc(34 * var(--u)); }
  .ch-index { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
}
@media (max-width: 640px) {
  .art { grid-template-columns: minmax(0, 1fr); gap: calc(10 * var(--u)); }
  .art-n { display: flex; align-items: baseline; gap: calc(10 * var(--u)); }
  .art-i { font-size: calc(24 * var(--u)); }
  .ch-index a { grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: calc(10 * var(--u)); }
  .ch-index .r { font-size: calc(10.5 * var(--u)); }
}
