/* ==========================================================================
   ZAAPTO LTD  ::  gazette.css
   A printed business section, set on dark stock.
   Naming universe: the gazette. A published record of verifiable facts.
   Blocks: nameplate, frontis, dictum, practice, docket, treatise,
           recital, wire, query, instrument, endmatter.
   Convention: BEM, block__element, block--modifier. Held throughout.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Surfaces */
  --ink-900:        #0E1013;  /* page base */
  --ink-850:        #15181D;  /* raised band */
  --ink-800:        #1B1F26;  /* card */

  /* Rules. hairline is decorative only and never the sole edge of a control. */
  --hairline:        #2A2F38; /* 1.4:1 on base */
  --hairline-strong: #5A626F; /* 3.1:1 on base */

  /* Type. Ratios measured against #0E1013 base and #1B1F26 card. */
  --text-primary:   #F2F4F7;  /* 17.3:1 base / 15.0:1 card */
  --text-secondary: #AEB6C2;  /*  9.2:1 base /  7.9:1 card */
  --text-muted:     #8A93A1;  /*  6.1:1 base /  5.3:1 card, floor for legal */

  /* Brass. At most three carriers per viewport. */
  --accent:         #C8A24A;  /*  7.9:1 base /  6.8:1 card */
  --accent-soft:    #E0C583;  /* 11.3:1 base */
  --focus:          #7FB2FF;  /*  8.8:1 base */

  /* Families. No monospace anywhere on this site. */
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Scale */
  --t-display-xl: clamp(2.75rem, 1.6rem + 4.4vw, 4.75rem);
  --t-display-l:  clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --t-h3:         1.5rem;
  --t-deck:       1.25rem;
  --t-body:       1.0625rem;
  --t-small:      0.875rem;
  --t-micro:      0.8125rem;

  /* Radius. Four steps, no exceptions. Never animated. */
  --r-1: 4px;
  --r-2: 10px;
  --r-3: 18px;
  --r-full: 999px;

  /* Measure and rhythm */
  --quire:   1120px;
  --narrow: 62ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --tier-y: clamp(4rem, 9vw, 7.5rem);
  --nameplate-h: 66px;
}

/* --- 2. Reset and base --------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nameplate-h) + 1rem);
  background: var(--ink-900);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Long tokens (addresses, references) must never push the page sideways. */
p, li, td, th, h1, h2, h3, a { overflow-wrap: break-word; }

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  font-size: var(--t-display-xl);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--t-display-l);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: 0.45em; }
li:last-child { margin-bottom: 0; }

strong, b { color: var(--text-primary); font-weight: 600; }

a { color: var(--text-primary); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  transition: none;
}

::selection { background: var(--accent); color: var(--ink-900); }

/* --- 3. Type utilities --------------------------------------------------- */

.slug {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.35rem 0.85rem 0.4rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-full);
  color: var(--accent);
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.overline {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.drophead {
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: var(--t-deck);
  line-height: 1.55;
}

.proof { max-width: 66ch; }
.proof > * + * { margin-top: 1.15em; }

.small { font-size: var(--t-small); line-height: 1.55; }

.term {
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
}

.tbc {
  display: inline;
  padding: 0.1em 0.45em;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-1);
  color: var(--accent-soft);
  font-size: 0.95em;
  font-weight: 500;
}

/* --- 4. Shell ------------------------------------------------------------ */

.quire {
  width: 100%;
  max-width: var(--quire);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.quire--narrow { max-width: calc(var(--narrow) + (var(--gutter) * 2)); }

.tier { padding-block: var(--tier-y); }
.tier--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.bypass {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--ink-900);
  border-radius: var(--r-1);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
}
.bypass:focus { top: 0.75rem; }

/* --- 5. Nameplate (sticky header) ---------------------------------------- */

.nameplate {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 16, 19, 0);
  border-bottom: 1px solid rgba(42, 47, 56, 0);
  transition: background-color 180ms linear, border-color 180ms linear;
}

.nameplate.is-settled {
  background: rgba(14, 16, 19, 0.86);
  border-bottom-color: var(--hairline);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nameplate__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--nameplate-h);
}

.nameplate__word {
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nameplate__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.85rem, 2.4vw, 1.9rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nameplate__nav li { margin: 0; }

.nameplate__link {
  color: var(--text-secondary);
  font-size: var(--t-small);
  text-decoration: none;
  padding-block: 0.35rem;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 200ms ease;
}

.nameplate__link:hover,
.nameplate__link:focus-visible { background-size: 100% 1px; }

.nameplate__link[aria-current="page"] {
  color: var(--text-primary);
  background-size: 100% 1px;
}

/* --- 6. Links and actions ------------------------------------------------ */

.trace {
  color: var(--text-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 200ms ease;
  padding-bottom: 2px;
}
.trace:hover, .trace:focus-visible { background-size: 100% 1px; }

/* Prose links inside a legal document. The contents list is excluded: it
   carries its own hover rule and must not be a wall of underlines. */
.proof a:not(.trace):not(.impress),
.instrument__body a:not(.trace):not(.impress) {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.impress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.impress {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: filter 90ms ease, transform 90ms ease, background-color 150ms ease;
}

.impress--brass {
  background: var(--accent);
  color: var(--ink-900);
}
.impress--brass:hover { background: var(--accent-soft); }
.impress--brass:active { transform: translateY(1px); filter: brightness(0.94); }

.impress--outline {
  border-color: var(--hairline-strong);
  color: var(--text-primary);
}
.impress--outline:hover { border-color: var(--accent); }
.impress--outline:active { transform: translateY(1px); filter: brightness(0.94); }

/* --- 7. Family A. Frontis (editorial masthead) --------------------------- */

.frontis {
  padding-top: clamp(3rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.frontis__inner { max-width: 62ch; }

.frontis__deck { margin-top: 1.75rem; }

.frontis__note {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: var(--t-small);
  line-height: 1.55;
  max-width: 56ch;
}

.frontis__rule {
  margin-top: clamp(2.75rem, 6vw, 4rem);
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* --- 8. Family B. Dictum (statement band) -------------------------------- */

.dictum {
  background: var(--ink-850);
  border-radius: var(--r-3);
  padding: clamp(4rem, 11vw, 12rem) clamp(1.5rem, 6vw, 4rem);
  text-align: center;
}

.dictum__line {
  max-width: 24ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: var(--t-display-l);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

/* --- 9. Family C. Practice mosaic ---------------------------------------- */

.practice__head { max-width: 58ch; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.practice__head p { margin-top: 1.1rem; }

.practice__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.practice__card {
  background: var(--ink-800);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-2);
  padding: clamp(1.5rem, 3vw, 2.1rem);
}

.practice__card h3 { margin-bottom: 0.85rem; }
.practice__card p { color: var(--text-secondary); }
.practice__card p + p { margin-top: 0.9rem; }

.practice__ord {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}

/* --- 10. Family D. Docket ledger -------------------------------------- */

.docket__head { max-width: 56ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

.docket__list { display: block; }

.docket__row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding-block: clamp(1.6rem, 3.2vw, 2.4rem);
  border-top: 1px solid var(--hairline);
}

.docket__row:last-child { border-bottom: 1px solid var(--hairline); }

.docket__row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms ease-out;
}

.docket__row:hover::after,
.docket__row:focus-within::after { transform: scaleX(1); }

.docket__ord {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.docket__name {
  color: var(--text-primary);
  font-family: var(--serif);
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.docket__note { max-width: 62ch; }
.docket__note p + p { margin-top: 0.8rem; }

/* --- 11. Family E. Treatise (asymmetric prose) --------------------------- */

.treatise {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.treatise__head h2 { margin-bottom: 1rem; }
.treatise__head p { color: var(--text-muted); font-size: var(--t-small); }

.treatise__run > * + * { margin-top: 1.3em; }
.treatise__run h3 { margin-top: 2.4em; }
.treatise__run p { max-width: 66ch; }

/* --- 12. Family F. Recital (definition table) --------------------------- */

.recital__head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.recital__head p { margin-top: 1.1rem; }

.recital__list { margin: 0; }

.recital__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 2.5rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--hairline);
}
.recital__row:last-of-type { border-bottom: 1px solid var(--hairline); }

.recital__key {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.recital__val {
  margin: 0;
  max-width: 62ch;
  color: var(--text-secondary);
}

.recital__val strong { color: var(--text-primary); }

.recital__foot {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: var(--t-small);
  max-width: 62ch;
}

/* --- 13. Family G. Wire (contact panel) ------------------------------ */

.wire {
  background: var(--ink-850);
  border-radius: var(--r-3);
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
}

.wire__line {
  max-width: 22ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: var(--t-display-l);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.wire__sub {
  max-width: 54ch;
  margin: 1.4rem auto 0;
  color: var(--text-secondary);
}

.wire .impress-row { justify-content: center; margin-top: 2rem; }

.wire__route {
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: var(--t-small);
}

/* --- 14. Query disclosure ---------------------------------------------- */

.query { border-top: 1px solid var(--hairline); }

.query__item { border-bottom: 1px solid var(--hairline); }

.query__q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.35rem 0;
  background: none;
  border: 0;
  border-radius: var(--r-1);
  color: var(--text-primary);
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.query__q:hover { color: var(--accent-soft); }

.query__sign {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.query__a { padding-bottom: 1.35rem; }
.query__a p { max-width: 66ch; }
.query__a p + p { margin-top: 0.9rem; }

.js .query__a {
  display: grid;
  grid-template-rows: 0fr;
  padding-bottom: 0;
  transition: grid-template-rows 300ms ease, padding-bottom 300ms ease;
}
.js .query__a > div { overflow: hidden; }
.js .query__item.is-open .query__a {
  grid-template-rows: 1fr;
  padding-bottom: 1.35rem;
}

/* --- 15. Instrument (legal documents) ------------------------------------ */

.instrument__masthead {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--hairline);
}

.instrument__masthead h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
}

.instrument__masthead .drophead { margin-top: 1.35rem; }

.instrument__stamp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: var(--t-micro);
  letter-spacing: 0.04em;
}

/* minmax(0,1fr), not 1fr: a grid item defaults to min-width:auto, which lets
   the 640px minimum of a wide table push the whole document sideways. */
.instrument {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.instrument__index,
.instrument__body,
.instrument__part { min-width: 0; }

.instrument__index {
  background: var(--ink-850);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  padding: 1.4rem 1.5rem;
}

.instrument__index h2 {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.instrument__index ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.instrument__index li { margin-bottom: 0.5rem; }

.instrument__index a {
  color: var(--text-secondary);
  font-size: var(--t-small);
  line-height: 1.4;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 200ms ease;
}
.instrument__index a:hover,
.instrument__index a:focus-visible { background-size: 100% 1px; }

.instrument__body > .instrument__part + .instrument__part { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.instrument__part h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 1.9rem);
  margin-bottom: 1.1rem;
  scroll-margin-top: calc(var(--nameplate-h) + 1.5rem);
}

.instrument__part h3 {
  font-size: 1.1875rem;
  margin-top: 1.9rem;
  margin-bottom: 0.7rem;
  scroll-margin-top: calc(var(--nameplate-h) + 1.5rem);
}

.instrument__part h4 {
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
}

.instrument__part p, .instrument__part li { max-width: 74ch; }
.instrument__part p { margin-bottom: 1.05em; }

.role {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.2rem 0.6rem 0.25rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-1);
  color: var(--accent);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}

.rubric {
  margin: 1.5rem 0;
  padding: 1.15rem 1.35rem;
  background: var(--ink-850);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-2);
}
.rubric p { max-width: 68ch; }
.rubric p:last-child { margin-bottom: 0; }

/* --- 16. Tables ---------------------------------------------------------- */

.tableau__frame {
  max-width: 100%;
  margin: 1.5rem 0 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-2);
  -webkit-overflow-scrolling: touch;
}

.tableau {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--t-small);
  line-height: 1.5;
}

.tableau caption {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: var(--t-micro);
  letter-spacing: 0.04em;
  text-align: left;
}

.tableau th, .tableau td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.tableau thead th {
  background: var(--ink-850);
  color: var(--text-primary);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tableau tbody th {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 11rem;
}

.tableau tbody td { color: var(--text-secondary); }
.tableau tbody tr:last-child th,
.tableau tbody tr:last-child td { border-bottom: 0; }

.tableau__hint {
  margin: -1.25rem 0 1.75rem;
  color: var(--text-muted);
  font-size: var(--t-micro);
}

/* --- 17. Endmatter (footer) ----------------------------------------------- */

.endmatter {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--hairline);
  background: var(--ink-900);
  padding-block: clamp(2.5rem, 5vw, 3.75rem) 2rem;
}

.endmatter__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
}

.endmatter__col h2 {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.endmatter__col p { color: var(--text-secondary); font-size: var(--t-small); line-height: 1.6; }
.endmatter__col p + p { margin-top: 0.75rem; }

.endmatter__links { margin: 0; padding: 0; list-style: none; }
.endmatter__links li { margin-bottom: 0.5rem; }
.endmatter__links a { color: var(--text-secondary); font-size: var(--t-small); text-decoration: none; }
.endmatter__links a:hover { color: var(--accent-soft); }

.endmatter__disclosure {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.endmatter__disclosure p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--t-micro);
  line-height: 1.65;
  max-width: 92ch;
}

.endmatter__disclosure p + p { margin-top: 0.6rem; }

.endmatter__disclosure a { color: var(--text-muted); }

/* --- 18. Compose reveal ---------------------------------------------------------- */

.js .compose {
  opacity: 0;
  transform: translateY(12px);
}

.js .compose.is-set {
  opacity: 1;
  transform: none;
  transition: opacity 420ms cubic-bezier(.22,.61,.36,1), transform 420ms cubic-bezier(.22,.61,.36,1);
}

/* --- 19. Breakpoints ----------------------------------------------------- */

@media (min-width: 40rem) {
  .docket__row { grid-template-columns: 4.5rem minmax(9rem, 14rem) 1fr; }
  .recital__row  { grid-template-columns: minmax(10rem, 15rem) 1fr; align-items: start; }
  .endmatter__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 62rem) {
  .practice__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .treatise {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 2rem;
  }
  .treatise__head {
    grid-column: 1 / span 4;
    position: sticky;
    top: calc(var(--nameplate-h) + 2rem);
    align-self: start;
  }
  .treatise__run { grid-column: 6 / span 7; }

  .instrument {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }
  .instrument__index {
    position: sticky;
    top: calc(var(--nameplate-h) + 1.5rem);
    max-height: calc(100vh - var(--nameplate-h) - 3rem);
    overflow-y: auto;
  }

  .endmatter__grid { grid-template-columns: 1.4fr 0.8fr 1fr 1.1fr; gap: 2.5rem; }
}

/* --- 20. Reduced motion -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .compose { opacity: 1; transform: none; }
  .docket__row::after { transform: scaleX(0); }
}

/* --- 21. Print ----------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  .nameplate, .bypass, .wire, .instrument__index { display: none; }
  .instrument__part p, .instrument__part li { max-width: none; }
  a { text-decoration: underline; }

  /* Nothing revealed on scroll may be missing from paper. */
  .js .compose { opacity: 1 !important; transform: none !important; }
  .js .query__a { grid-template-rows: 1fr; padding-bottom: 1.35rem; }
  .query__sign { display: none; }
}
