/* CREED front page: the Wayne State App Stack Code, 2026 Edition.

   A printed, bound code book: cream stock, green cloth, numbered chapters and
   clauses, rubber stamps for how each practice is held, margin notes for the
   reasons, an errata slip tipped in after printing, and a thumb index on the
   fore-edge. WayneUI 2.0.8 underneath (tokens, container, skip link, Lato);
   everything here is unlayered, so it sits on top of WayneUI's layers.

   Type: Source Serif 4 for the book, IBM Plex Mono for clause numbers,
   stamps and forms, Lato from WayneUI for running text. */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #f4f1ea;          /* CREED cream, the stock */
  --paper-hi: #fbf9f4;       /* a fresh leaf */
  --paper-lo: #ebe6da;       /* the shaded rows */
  --slip: #fbf5df;           /* the errata slip, a different stock */
  --ink: #1b2420;
  --ink-2: #47524d;          /* 7.4:1 on --paper */
  --rule: #c8c0ae;
  --rule-strong: #1b2420;
  --green: #0c5449;
  --green-deep: #08352f;
  --gold: #ffcc33;
  --ochre: #634d00;          /* the site accent from CREED's board */
  --red: #9a2a1f;            /* the inspector's red, 6.6:1 on --paper */
  --stamp-doc: #3c4a45;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", var(--wsu-font-family-mono);
  --sans: var(--wsu-font-family-body);

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-press: cubic-bezier(.5, 0, .2, 1.4);

  /* A whisper of paper grain. Static, no motion. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .2  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  /* Ink wear for rubber stamps: mottled alpha, so the ink looks pressed. */
  --wear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -1.9 0 0 0 1.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
}

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

html { background: var(--paper); scroll-padding-top: 4.5rem; }
html.motion { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .86em; background: rgba(12, 84, 73, .07); padding: .05em .3em; border-radius: 3px; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }

.wsu-skip-link { background: var(--green); color: var(--paper-hi); }

/* -------------------------------------------------------- the binding */
/* The green cloth spine down the left edge of the viewport. */
.binding {
  position: fixed; inset: 0 auto 0 0; width: 8px; z-index: 30;
  background: linear-gradient(90deg, var(--green-deep), var(--green) 70%, #0f5f53);
  box-shadow: 1px 0 0 var(--gold), 3px 0 6px rgba(27, 36, 32, .12);
  pointer-events: none;
}
@media (max-width: 700px) { .binding { width: 5px; } }

/* -------------------------------------------------------- running head */
.runhead {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 241, 234, .94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px);
}
.runhead__inner { display: flex; align-items: center; gap: 1.25rem; min-height: 3.25rem; }
.runhead__brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; letter-spacing: .08em; }
.runhead__brand img { border-radius: 6px; }
.runhead__edition { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-left: 1px solid var(--rule); padding-left: 1.25rem; }
.runhead__nav { margin-left: auto; display: flex; gap: 1.1rem; }
.runhead__nav a { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; transition: border-color .2s; }
.runhead__nav a:hover { border-bottom-color: var(--gold); }
@media (max-width: 900px) { .runhead__edition { display: none; } }
@media (max-width: 560px) {
  .runhead__inner { gap: .75rem; }
  .runhead__nav { gap: .7rem; }
  .runhead__nav a { font-size: .68rem; letter-spacing: .02em; }
  .runhead__nav a:nth-child(3) { display: none; }
}
@media (max-width: 359px) { .runhead__brand span { display: none; } }

/* -------------------------------------------------------- thumb index */
.thumbs { display: none; }
@media (min-width: 1320px) {
  .thumbs {
    display: flex; flex-direction: column; gap: 3px;
    position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 15;
  }
  .thumbs a {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.35rem;
    font-family: var(--mono); font-weight: 600; font-size: .8rem; color: var(--paper-hi);
    text-decoration: none; background: var(--green);
    border-radius: 7px 0 0 7px; box-shadow: inset -3px 0 0 rgba(0, 0, 0, .12);
    transition: transform .25s var(--ease-out), background .2s;
  }
  .thumbs a:nth-child(3n+2) { background: #2b6a60; }
  .thumbs a:nth-child(3n) { background: var(--ochre); }
  .thumbs a em {
    position: absolute; right: calc(100% + .4rem); white-space: nowrap;
    font-style: normal; font-weight: 400; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink); background: var(--paper-hi); border: 1px solid var(--rule); padding: .2rem .5rem; border-radius: 3px;
    opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease-out);
  }
  .thumbs a:hover, .thumbs a:focus-visible { transform: translateX(-5px); }
  .thumbs a:hover em, .thumbs a:focus-visible em { opacity: 1; transform: none; }
  .thumbs a.is-here { background: var(--gold); color: var(--ink); transform: translateX(-8px); }
}

/* -------------------------------------------------------- shared type */
.sheet { padding-block: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--rule); position: relative; }
.folio-head {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  border-bottom: 1px solid var(--rule); padding-bottom: .5rem; margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}
.folio-head span:last-child { text-align: right; }

.chap-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.chap-head h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; letter-spacing: -.01em; margin: .2rem 0 .8rem; color: var(--ink); text-wrap: balance; }
.chap-head__kicker { font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ochre); margin: 0; }
.chap-head__lede { font-size: 1.1rem; color: var(--ink-2); margin: 0; max-width: 40rem; }

.chap-head--chapter { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); align-items: start; max-width: none; border-top: 5px solid var(--green); padding-top: 1.25rem; }
.chap-head__no {
  margin: 0; font-family: var(--serif); font-weight: 700; line-height: .8;
  font-size: clamp(4.5rem, 11vw, 8rem); color: var(--green);
  padding-right: clamp(1rem, 3vw, 2rem); border-right: 1px solid var(--rule);
  min-width: 1.1ch; text-align: center;
}

/* -------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.9rem; padding: .65rem 1.25rem;
  font-family: var(--mono); font-weight: 600; font-size: .86rem; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; border-radius: 3px; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s var(--ease-out), box-shadow .15s, background .2s;
}
.btn--ink { background: var(--green); color: var(--paper-hi); box-shadow: 0 3px 0 var(--green-deep); }
.btn--ink:hover { background: #0f6557; }
.btn--ink:active { transform: translateY(3px); box-shadow: 0 0 0 var(--green-deep); }
.btn--rule { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn--rule:hover { background: var(--paper-hi); box-shadow: 4px 4px 0 var(--gold); transform: translate(-2px, -2px); }

/* -------------------------------------------------------- title page */
.title-page { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.title-page__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (max-width: 860px) { .title-page__grid { grid-template-columns: minmax(0, 1fr); } .book { order: -1; } }

.edition { display: flex; flex-wrap: wrap; gap: .25rem .6rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 1.5rem; }
.title { margin: 0 0 1.75rem; }
.title__name { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(4.2rem, 12vw, 9rem); line-height: .86; letter-spacing: .03em; color: var(--green); }
.title__sub { display: block; margin-top: .9rem; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.2; color: var(--ink); }

/* §0.1: the acronym as a clause. Every word the same weight and colour. */
.clause--title { border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); padding: 1rem 0 1.1rem; margin: 0 0 1.75rem; }
.clause__no { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 .6rem; }
.clause__no span { color: var(--green); font-weight: 600; margin-right: .4rem; }
.short-title__lead, .short-title__tail { margin: 0; color: var(--ink-2); font-size: 1rem; }
.acronym { display: flex; flex-wrap: wrap; margin: .55rem 0 .6rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.3vw, 1.72rem); line-height: 1.25; color: var(--ink); }
.acronym__word { padding: .1rem .6rem; border-left: 1px solid var(--rule); }
.acronym__word:first-child { padding-left: 0; border-left: 0; }
@media (max-width: 600px) {
  .acronym { flex-direction: column; border-left: 3px solid var(--gold); padding-left: .9rem; }
  .acronym__word, .acronym__word:first-child { padding: .12rem 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .acronym__word:last-child { border-bottom: 0; }
}

.lede { font-size: 1.12rem; max-width: 38rem; margin: 0 0 1.75rem; }
.title-page__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }

.tally { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: .85rem 0 0; border-top: 1px solid var(--rule); }
.tally__item { display: flex; align-items: baseline; gap: .5rem; }
.tally dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); order: 2; }
.tally dd { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.6rem; line-height: 1; }
.tally__item--enforced dd { color: var(--green); }
.tally__item--checked dd { color: var(--ochre); }
.tally__item--documented dd { color: var(--stamp-doc); }
.tally__item--notyet dd { color: var(--red); }

/* The book on the desk. */
.book { position: relative; width: min(100%, 340px); aspect-ratio: 3 / 4; justify-self: center; margin-right: 34px; transform: rotate(-2.5deg); transition: transform .5s var(--ease-out); }
@media (max-width: 860px) { .book { width: min(68vw, 250px); margin: 0 auto 3.25rem; transform: rotate(-2deg) translateX(-14px); } }
.book:hover { transform: rotate(-1deg) translateY(-4px); }
.book__pages {
  position: absolute; inset: 7px -16px -9px 10px; border-radius: 3px 6px 6px 3px;
  background:
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(120, 108, 84, .18) 2px 3px) right / 16px 100% no-repeat,
    var(--paper-hi);
  box-shadow: 0 18px 30px -14px rgba(27, 36, 32, .45), 0 2px 0 var(--rule);
}
.book__tab {
  position: absolute; right: -13px; top: calc(12% + var(--t) * 10.5%); width: 15px; height: 9%;
  border-radius: 0 4px 4px 0; background: var(--green);
  font-family: var(--mono); font-size: .55rem; font-weight: 600; color: transparent;
  transition: transform .3s var(--ease-out);
}
.book__tab:nth-child(3n+2) { background: #2b6a60; }
.book__tab:nth-child(3n) { background: var(--ochre); }
.book__tab:nth-child(2) { background: var(--gold); }
.book:hover .book__tab { transform: translateX(3px); }
.book:hover .book__tab:nth-child(2) { transform: translateX(6px); }
.book__cover {
  position: absolute; inset: 0; border-radius: 4px 9px 9px 4px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; padding: 12% 10%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .28) 0 5%, rgba(255, 255, 255, .06) 5.6%, transparent 9%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 4px),
    var(--green);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2), 0 1px 2px rgba(0, 0, 0, .2);
}
.book__rule { width: 70%; height: 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); padding-top: 3px; opacity: .9; }
.book__rule--top { margin-bottom: auto; }
.book__rule--bottom { margin-top: auto; }
.book__plate { width: 58%; aspect-ratio: 1; padding: 5px; border: 1px solid rgba(255, 204, 51, .75); border-radius: 22%; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .08); }
.book__plate img { display: block; width: 100%; height: 100%; border-radius: 19%; }
.book__foil { color: var(--gold); text-align: center; }
.book__foil--name { font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: .14em; line-height: 1; margin-top: .4rem; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.book__foil--sub { font-family: var(--serif); font-style: italic; font-size: clamp(.72rem, 1.1vw, .86rem); }
.book__foil--ed { font-family: var(--mono); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; }
.book__ribbon { position: absolute; bottom: -48px; left: 62%; width: 13px; height: 62px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); transform-origin: top; z-index: -1; }

/* Hero motion: the book is set down, the plate is pressed, the foil is
   struck letter-line by letter-line, the tabs come out of the fore-edge. */
.motion .book { animation: book-set 1s var(--ease-out) both; }
.motion .book__plate { animation: plate-press .7s .55s var(--ease-press) both; }
.motion .book__foil { animation: foil-strike .55s var(--ease-out) both; }
.motion .book__foil--name { animation-delay: .95s; }
.motion .book__foil--sub { animation-delay: 1.1s; }
.motion .book__foil--ed { animation-delay: 1.22s; }
.motion .book__rule { animation: foil-strike .5s .85s var(--ease-out) both; }
.motion .book__tab { animation: tab-out .45s calc(1.25s + var(--t) * .07s) var(--ease-out) both; }
.motion .book__ribbon { animation: ribbon-drop .6s 1.7s var(--ease-out) both; }
.motion .acronym__word { animation: set-type .5s calc(.25s + var(--w, 0) * .09s) var(--ease-out) both; }
.acronym__word:nth-child(2) { --w: 1; } .acronym__word:nth-child(3) { --w: 2; } .acronym__word:nth-child(4) { --w: 3; }
.acronym__word:nth-child(5) { --w: 4; } .acronym__word:nth-child(6) { --w: 5; }

@keyframes book-set { from { opacity: 0; transform: translateY(28px) rotate(-7deg); } }
@keyframes plate-press {
  0% { transform: scale(1.12); box-shadow: 0 10px 18px rgba(0, 0, 0, .35); opacity: 0; }
  60% { transform: scale(.97); opacity: 1; }
  100% { transform: none; }
}
@keyframes foil-strike { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes tab-out { from { transform: translateX(-15px); } }
@keyframes ribbon-drop { from { transform: scaleY(0); } }
@keyframes set-type { from { opacity: 0; transform: translateY(.35em); } }

/* -------------------------------------------------------- contents */
.toc { list-style: none; margin: 0 0 3rem; padding: 0; counter-reset: none; border-top: 2px solid var(--ink); }
.toc li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; border-bottom: 1px solid var(--rule); }
.toc a { display: flex; align-items: baseline; gap: .9rem; padding: .85rem .25rem; color: var(--ink); text-decoration: none; min-width: 0; transition: transform .25s var(--ease-out); }
.toc a:hover { transform: translateX(6px); }
.toc a:hover .toc__name { color: var(--green); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }
.toc__no { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--green); min-width: 2ch; }
.toc__name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.toc__lead { flex: 1; border-bottom: 2px dotted var(--rule); min-width: 1.5rem; transform: translateY(-.25em); }
.toc__range { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.toc__bar { display: flex; gap: 2px; width: 10.5rem; }
.toc__bar i { height: .6rem; width: calc(var(--n) * 1rem); border-radius: 1px; }
.toc__bar .e { background: var(--green); }
.toc__bar .c { background: var(--ochre); }
.toc__bar .d { background: var(--stamp-doc); opacity: .55; }
.toc__bar .n { background: transparent; box-shadow: inset 0 0 0 1.5px var(--red); }
@media (max-width: 700px) {
  .toc li { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: .7rem; }
  .toc a { flex-wrap: wrap; padding-bottom: .35rem; }
  .toc__lead { display: none; }
  .toc__range { flex-basis: 100%; padding-left: calc(2ch + .9rem); }
  .toc__bar { padding-left: calc(2ch + 1.15rem); width: auto; }
  .toc__bar i { width: calc(var(--n) * .8rem); }
}

.key { background: var(--paper-hi); border: 1px solid var(--rule); padding: 1.25rem 1.5rem; margin-bottom: 3rem; }
.key__title { font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1rem; color: var(--ink-2); font-weight: 600; }
.key__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem 2rem; margin: 0; }
.key__list div { display: grid; gap: .5rem; align-content: start; }
.key__list dd { margin: 0; color: var(--ink-2); font-size: .98rem; }

.articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.article { padding: 1.25rem 1.5rem 1.25rem 0; }
.article + .article { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.article__no { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ochre); margin: 0 0 .25rem; }
.article h3 { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; margin: 0 0 .5rem; }
.article p { margin: 0; }
@media (max-width: 820px) {
  .articles { grid-template-columns: minmax(0, 1fr); }
  .article, .article + .article { padding: 1.1rem 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* -------------------------------------------------------- stamps */
.stamp {
  --ink-c: var(--stamp-doc);
  display: inline-block; justify-self: start; align-self: start;
  font-family: var(--mono); font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1;
  color: var(--ink-c); padding: .55rem .7rem .5rem;
  border: 2px solid var(--ink-c); border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink-c);
  transform: rotate(-4deg);
  -webkit-mask-image: var(--wear); mask-image: var(--wear);
  -webkit-mask-size: 220px 120px; mask-size: 220px 120px;
  white-space: nowrap;
  transition: transform .2s var(--ease-out);
}
.stamp--enforced { --ink-c: var(--green); }
.stamp--checked { --ink-c: var(--ochre); transform: rotate(3deg); }
.stamp--documented { --ink-c: var(--stamp-doc); transform: rotate(-2deg); }
.stamp--notyet { --ink-c: var(--red); border-style: dashed; transform: rotate(5deg); }
.key .stamp, .clause .stamp { cursor: default; }
.clause:hover .stamp { transform: rotate(0deg) scale(1.05); }

/* -------------------------------------------------------- clauses */
.chapter .clause {
  display: grid; grid-template-columns: minmax(0, 1fr) 15rem; grid-template-areas: "body stamp" "body note";
  column-gap: clamp(1.5rem, 4vw, 3.5rem); row-gap: .9rem;
  padding: 1.6rem 0 1.6rem 1.1rem; border-bottom: 1px solid var(--rule); position: relative;
  transition: background .4s;
}
.chapter .clause::before { content: ""; position: absolute; left: 0; top: 1.6rem; bottom: 1.6rem; width: 3px; background: var(--rule); transition: background .3s, width .3s; }
.chapter .clause:hover::before { background: var(--green); }
.clause__body { grid-area: body; min-width: 0; }
.clause .stamp { grid-area: stamp; }
.margin-note { grid-area: note; font-family: var(--serif); font-style: italic; font-size: .98rem; line-height: 1.5; color: var(--ink-2); border-left: 1px solid var(--rule); padding-left: .9rem; }
.margin-note b { font-style: normal; font-family: var(--mono); font-weight: 600; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ochre); display: block; margin-bottom: .15rem; }
.clause__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.2rem, 2vw, 1.42rem); line-height: 1.3; margin: 0 0 .55rem; text-wrap: pretty; }
.clause__title > span:not(.clause__sec) { }
.clause__sec { font-family: var(--mono); font-weight: 600; font-size: .82em; color: var(--green); margin-right: .45rem; white-space: nowrap; }
.clause__body p { margin: 0 0 .55rem; max-width: 44rem; }
.xref { font-size: .95rem; color: var(--ink-2); }
.xref__label { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--rule); padding: .05rem .35rem; margin-right: .35rem; border-radius: 2px; background: var(--paper-hi); }
.tool { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--mono); font-weight: 600; font-size: .86em; letter-spacing: .04em; text-decoration: none; color: var(--green); border-bottom: 1px solid rgba(12, 84, 73, .35); transition: border-color .2s, background .2s; }
.tool img { width: 16px; height: 16px; border-radius: 4px; transition: transform .25s var(--ease-press); }
.tool:hover { border-bottom-color: var(--gold); background: rgba(255, 204, 51, .22); }
.tool:hover img { transform: rotate(-10deg) scale(1.15); }

/* The clause the inspector cites: a highlighter swipe and a gold bar. */
.clause.is-cited::before { background: var(--gold); width: 5px; }
.clause.is-cited .clause__title { background: linear-gradient(transparent 58%, rgba(255, 204, 51, .7) 58%) no-repeat 0 0 / 100% 100%; display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.motion .clause.is-cited .clause__title { animation: highlight .6s var(--ease-out) both; }
@keyframes highlight { from { background-size: 0 100%; } }
.clause.is-cited .clause__title + p { margin-top: .6rem; }

@media (max-width: 820px) {
  .chapter .clause { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "stamp" "note"; }
}

/* -------------------------------------------------------- Table 2-1 */
.code-table { margin: 2.25rem 0 1rem; padding: 0; }
.code-table figcaption { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin-bottom: .6rem; }
.code-table__no { font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-hi); background: var(--ink); padding: .15rem .5rem; margin-right: .5rem; border-radius: 2px; vertical-align: .12em; }
.code-table__scroll { overflow-x: auto; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.code-table table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .95rem; }
.code-table th, .code-table td { text-align: left; padding: .45rem .75rem; border-bottom: 1px solid var(--rule); }
.code-table thead th { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--ink); }
.code-table tbody th[scope="row"] { font-family: var(--mono); font-weight: 600; }
.code-table td { font-family: var(--mono); font-size: .86rem; }
.code-table__group th { background: var(--paper-lo); font-family: var(--serif) !important; font-weight: 700; font-size: 1rem; }
.code-table__group span { font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-left: .75rem; }
.code-table__group b { color: var(--green); }
.code-table sup a { font-size: .7rem; color: var(--red); }
.code-table tr[data-c] { transition: background .3s; }
.code-table tr[data-c]:hover { background: rgba(255, 204, 51, .16); }
.code-table tr.is-inspected { background: rgba(255, 204, 51, .32); }
.code-table__note { font-size: .9rem; color: var(--ink-2); margin: .6rem 0 0; max-width: 48rem; }

.st { display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .1rem .4rem; border-radius: 2px; border: 1.5px solid currentColor; white-space: nowrap; }
.st--active { color: var(--green); }
.st--security { color: var(--ochre); }
.st--eol { color: var(--red); }
.st--eol_grace_expired { color: var(--paper-hi); background: var(--red); border-color: var(--red); }
.st--refused { color: var(--ink-2); border-style: dashed; }

/* -------------------------------------------------------- Form CR-1 */
.sheet--form { background: linear-gradient(var(--paper-lo), var(--paper-lo)); }
.form-cr1 { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .form-cr1 { grid-template-columns: minmax(0, 1fr); } }

.form-cr1__fields { display: grid; gap: 1.4rem; background: var(--paper-hi); border: 1px solid var(--ink); padding: 1.4rem; box-shadow: 6px 6px 0 var(--rule); }
.form-cr1__fields fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-cr1__fields legend, .field > label { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .6rem; padding: 0; }
.box-no { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; background: var(--ink); color: var(--paper-hi); font-size: .7rem; border-radius: 2px; }

.runtime-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; }
.runtime-pick label { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-family: var(--serif); font-size: 1.08rem; padding: .2rem 0; }
.runtime-pick input { appearance: none; -webkit-appearance: none; margin: 0; padding: 0; width: 1.25rem; height: 1.25rem; inline-size: 1.25rem; block-size: 1.25rem; min-inline-size: 0; min-block-size: 0; border: 2px solid var(--ink); border-radius: 1px; background: var(--paper-hi); display: grid; place-items: center; flex: none; cursor: pointer; }
.runtime-pick input::after { content: ""; width: .8rem; height: .8rem; background: var(--green); clip-path: polygon(14% 0, 50% 36%, 86% 0, 100% 14%, 64% 50%, 100% 86%, 86% 100%, 50% 64%, 14% 100%, 0 86%, 36% 50%, 0 14%); transform: scale(0); transition: transform .18s var(--ease-press); }
.runtime-pick input:checked::after { transform: scale(1); }
.runtime-pick input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.field select, .field input[type="date"] {
  width: 100%; font-family: var(--mono); font-size: 1rem; color: var(--ink);
  background: var(--paper-hi); border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding: .45rem .2rem; min-height: 2.75rem;
}
.field select:focus-visible, .field input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.chips button { font-family: var(--mono); font-size: .76rem; padding: .35rem .55rem; min-height: 2rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 2px; cursor: pointer; transition: background .15s, border-color .15s; }
.chips button:hover { border-color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.btn--stamp { justify-self: start; }

.certificate {
  position: relative; background: var(--paper-hi) var(--grain); border: 1px solid var(--ink);
  padding: clamp(1.25rem, 3vw, 2rem); min-height: 100%; overflow: hidden;
  box-shadow: 0 1px 0 var(--rule), 0 14px 30px -18px rgba(27, 36, 32, .5);
  outline: 1px solid var(--rule); outline-offset: -8px;
}
.certificate__head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 3px double var(--ink); padding-bottom: .6rem; margin-bottom: 1rem; }
.certificate__head p { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.55rem); }
.certificate__head .certificate__serial { font-family: var(--mono); font-weight: 400; font-size: .85rem; color: var(--red); align-self: end; }
.certificate__rows { margin: 0 0 1rem; display: grid; }
.certificate__rows div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .75rem; padding: .45rem 0; border-bottom: 1px dotted var(--rule); }
.certificate__rows dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding-top: .2rem; }
.certificate__rows dd { margin: 0; font-family: var(--serif); font-size: 1.08rem; min-width: 0; }
.certificate__rows dd code { font-size: .8rem; background: none; padding: 0; }
@media (max-width: 520px) { .certificate__rows div { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }
.certificate__finding { font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; margin: 0 0 .75rem; max-width: 30rem; min-height: 3.2em; }
.certificate__clause { margin: 0 0 1.25rem; font-size: .98rem; max-width: 26rem; }
.certificate__sign { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; margin: 0; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); max-width: 22rem; }
.certificate__line { flex: 1; min-width: 10rem; border-bottom: 1px solid var(--ink); font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); padding-bottom: .1rem; }

/* The rubber stamp. Decorative: the live line carries the words. */
.inkstamp {
  --ink-c: var(--ochre); --rot: -9deg;
  position: absolute; right: clamp(.75rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  display: grid; justify-items: center; gap: .3rem; max-width: calc(100% - 1.5rem);
  padding: .7rem 1.1rem .65rem; color: var(--ink-c);
  border: 4px solid var(--ink-c); border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--paper-hi), inset 0 0 0 5px var(--ink-c);
  transform: rotate(var(--rot)); transform-origin: 50% 60%;
  -webkit-mask-image: var(--wear); mask-image: var(--wear); -webkit-mask-size: 220px 120px; mask-size: 220px 120px;
  mix-blend-mode: multiply; pointer-events: none;
}
.inkstamp__top, .inkstamp__sub { font-family: var(--mono); font-weight: 600; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.inkstamp__word { font-family: var(--mono); font-weight: 600; font-size: clamp(1.35rem, 3.4vw, 2.1rem); letter-spacing: .08em; text-transform: uppercase; line-height: 1; white-space: nowrap; border-block: 2px solid var(--ink-c); padding: .3rem .2rem .25rem; }
.inkstamp--active { --ink-c: var(--green); --rot: -7deg; }
.inkstamp--security { --ink-c: var(--ochre); --rot: -9deg; }
.inkstamp--eol { --ink-c: var(--red); --rot: -11deg; }
.inkstamp--eol_grace_expired { --ink-c: var(--red); --rot: -6deg; }
.inkstamp--refused { --ink-c: var(--ink); --rot: -8deg; border-style: dashed; }
.inkstamp--ghost { opacity: .13; z-index: 0; }
@media (max-width: 520px) {
  .certificate { padding-bottom: 8.5rem; }
  .inkstamp { right: .75rem; bottom: 1rem; }
}
@media (min-width: 521px) { .certificate { padding-bottom: 2rem; } .certificate__finding, .certificate__clause { max-width: calc(100% - 15rem); } }
@media (min-width: 521px) and (max-width: 700px) { .certificate__finding, .certificate__clause { max-width: none; } .certificate { padding-bottom: 9rem; } }

.motion .inkstamp.is-thunk { animation: thunk .46s var(--ease-out) both; }
.motion .certificate.is-jolt { animation: jolt .46s linear both; }
@keyframes thunk {
  0% { opacity: 0; transform: rotate(calc(var(--rot) - 6deg)) scale(1.9) translateY(-18px); filter: blur(2px); }
  52% { opacity: 1; transform: rotate(var(--rot)) scale(.94); filter: blur(0); }
  70% { transform: rotate(var(--rot)) scale(1.03); }
  100% { transform: rotate(var(--rot)) scale(1); }
}
@keyframes jolt { 0%, 48% { transform: none; } 55% { transform: translateY(3px); } 70% { transform: translateY(-1px); } 100% { transform: none; } }

/* -------------------------------------------------------- errata slip */
.errata {
  background: var(--slip) var(--grain); border: 1px solid var(--rule);
  padding: clamp(1.25rem, 3.5vw, 2.25rem); position: relative;
  box-shadow: 0 16px 28px -20px rgba(27, 36, 32, .55);
  outline: 3px double var(--ink); outline-offset: -12px;
  transform: rotate(-.35deg);
}
.errata__head { max-width: 44rem; margin-bottom: 1.25rem; }
.errata__kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin: 0; }
.errata__head h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.8vw, 2.6rem); line-height: 1.1; margin: .25rem 0 .6rem; }
.errata__head p:last-child { margin: 0; color: var(--ink-2); }
.errata__scroll { overflow-x: auto; }
.errata__table { width: 100%; border-collapse: collapse; min-width: 30rem; }
.errata__table th, .errata__table td { text-align: left; vertical-align: top; padding: .65rem .75rem .65rem 0; border-bottom: 1px solid var(--rule); }
.errata__table thead th { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.errata__table tbody th { font-family: var(--mono); font-weight: 600; color: var(--red); white-space: nowrap; }
.errata__table td:nth-child(2) { font-family: var(--mono); font-size: .86rem; white-space: nowrap; }
.errata__table .open { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--red); border: 1.5px dashed var(--red); padding: .05rem .35rem; border-radius: 2px; }
.errata__foot { margin: 1rem 0 0; font-size: .95rem; color: var(--ink-2); }
@media (max-width: 640px) {
  .errata { transform: none; }
  .errata__table, .errata__table tbody, .errata__table tr, .errata__table th, .errata__table td { display: block; min-width: 0; }
  .errata__table thead { display: none; }
  .errata__table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .25rem .75rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
  .errata__table th, .errata__table td { padding: 0; border: 0; }
  .errata__table td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
}

/* -------------------------------------------------------- authorities */
.ahj { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ahj__row { display: grid; grid-template-columns: 2.75rem 11rem minmax(0, 1fr) minmax(0, 15rem); align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--rule); transition: background .25s; }
.ahj__row:hover { background: var(--paper-hi); }
.ahj__row:target { background: rgba(255, 204, 51, .25); }
.ahj__mark img { display: block; width: 2.5rem; height: 2.5rem; border-radius: 9px; transition: transform .3s var(--ease-press); }
.ahj__row:hover .ahj__mark img { transform: rotate(-6deg) scale(1.08); }
.ahj__mark--wayneui { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9px; background: var(--green); }
.ahj__mark--wayneui img { width: 1.75rem; height: 1.75rem; border-radius: 0; }
.ahj__name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.ahj__name .new { font-style: normal; font-family: var(--mono); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); border: 1px solid currentColor; padding: 0 .3rem; border-radius: 2px; vertical-align: .25em; margin-left: .3rem; }
.ahj__role { color: var(--ink-2); }
.ahj__cites { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .2rem .5rem; justify-content: flex-end; text-align: right; }
.ahj__row--this { background: rgba(12, 84, 73, .06); }
@media (max-width: 820px) {
  .ahj__row { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .15rem 1rem; align-items: start; }
  .ahj__mark { grid-row: span 3; }
  .ahj__cites { justify-content: flex-start; text-align: left; }
}

/* -------------------------------------------------------- appendix */
.appendix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 900px) { .appendix { grid-template-columns: minmax(0, 1fr); } }
.appendix__part { min-width: 0; }
.appendix__part h3 { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; margin: 0 0 .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--ink); }
.appendix__part > p { margin: 0 0 .9rem; }
.soon { display: inline-block; font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); border: 1.5px dashed var(--ochre); padding: .05rem .4rem; border-radius: 2px; margin-left: .3rem; }
.appendix__note { grid-column: 1 / -1; border: 1px solid var(--ink); border-left: 6px solid var(--gold); background: var(--paper-hi); padding: 1rem 1.25rem; }
.appendix__note p { margin: 0; }
.appendix__maint { font-size: .95rem; color: var(--ink-2); }

.cmd { display: flex; align-items: stretch; background: var(--ink); color: var(--paper-hi); border-radius: 3px; margin: 0 0 1rem; overflow: hidden; }
.cmd__code { flex: 1; min-width: 0; font-family: var(--mono); font-size: .9rem; padding: .8rem 1rem; background: none; color: inherit; overflow-wrap: anywhere; }
.cmd__dim { color: #b8c4bf; user-select: none; }
.cmd__copy { flex: none; border: 0; background: var(--gold); color: var(--ink); font-family: var(--mono); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: 0 1rem; min-height: 2.75rem; cursor: pointer; transition: background .2s; }
.cmd__copy:hover { background: #ffd65c; }
.cmd__copy.is-copied { background: var(--paper-hi); }

.snippet, .term { margin: 0 0 1rem; background: var(--ink); color: #e9efe9; border-radius: 3px; padding: 1rem 1.1rem; font-family: var(--mono); font-size: .8rem; line-height: 1.6; overflow-x: auto; max-width: 100%; }
.snippet code, .term code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.c-k { color: #ffd65c; } .c-f { color: #a8dccf; } .c-s { color: #f3d9a6; } .c-c { color: #a9b5b0; font-style: italic; }

.os__tabs { display: flex; gap: 0; border-bottom: 2px solid var(--ink); }
.os__tabs [role="tab"] { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; background: transparent; border: 1px solid transparent; border-bottom: 0; padding: .55rem .9rem; min-height: 2.6rem; cursor: pointer; color: var(--ink-2); border-radius: 3px 3px 0 0; }
.os__tabs [aria-selected="true"] { background: var(--ink); color: var(--paper-hi); }
.os__panel { padding-top: .75rem; }
.os__note { margin: 0 0 .5rem; font-size: .92rem; color: var(--ink-2); }

/* -------------------------------------------------------- colophon */
.colophon { background: var(--green); color: var(--paper); padding-block: 3rem 3.5rem; border-top: 4px solid var(--gold); }
.colophon__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; }
.colophon__inner > div:last-child { max-width: 48rem; }
.colophon__mark img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 204, 51, .6); }
.colophon p { margin: 0 0 .6rem; }
.colophon__fine { font-size: .9rem; color: #d4dfdb; }

/* -------------------------------------------------------- toast */
.toast:empty { visibility: hidden; }
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translate(-50%, calc(100% + 2rem)); background: var(--ink); color: var(--paper-hi); font-family: var(--mono); font-size: .82rem; padding: .6rem 1rem; border-radius: 3px; max-width: calc(100vw - 2rem); transition: transform .3s var(--ease-out); z-index: 40; }
.toast.is-on { transform: translate(-50%, 0); }

/* -------------------------------------------------------- reveals */
/* Only with motion and script: content starts printed everywhere else. */
.motion.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.motion.js [data-reveal].is-in { opacity: 1; transform: none; }
.motion.js .clause[data-reveal] .stamp { opacity: 0; transform: rotate(-12deg) scale(1.6); transition: opacity .25s .35s, transform .35s .35s var(--ease-press); }
.motion.js .clause[data-reveal].is-in .stamp { opacity: 1; transform: rotate(-4deg); }
.motion.js .clause[data-reveal].is-in .stamp--checked { transform: rotate(3deg); }
.motion.js .clause[data-reveal].is-in .stamp--documented { transform: rotate(-2deg); }
.motion.js .clause[data-reveal].is-in .stamp--notyet { transform: rotate(5deg); }
.motion.js .clause[data-reveal].is-in:hover .stamp { transform: rotate(0deg) scale(1.05); }
.motion.js .errata[data-reveal].is-in { transform: rotate(-.35deg); }
@media (max-width: 640px) { .motion.js .errata[data-reveal].is-in { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .runhead, .thumbs, .binding, .toast, .form-cr1__fields { display: none; }
  body { background: #fff; }
}

/* Table 2-1 on a phone: each edition becomes one ruled entry, state first. */
.code-table td { white-space: nowrap; }
@media (max-width: 640px) {
  .code-table__scroll { overflow: visible; }
  .code-table table, .code-table tbody, .code-table tr, .code-table th, .code-table td { display: block; min-width: 0; }
  .code-table thead { display: none; }
  .code-table tr[data-c], .code-table tbody tr:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .75rem; padding: .55rem .5rem; border-bottom: 1px solid var(--rule); }
  .code-table tr[data-c] > *, .code-table tbody tr:last-child > * { border: 0; padding: 0; }
  .code-table tr > td:last-child { grid-column: 2; grid-row: 1; justify-self: end; }
  .code-table tr > td:nth-child(2), .code-table tr > td:nth-child(3), .code-table tr > td:nth-child(4) { grid-column: 1 / -1; font-size: .8rem; color: var(--ink-2); white-space: normal; }
  .code-table tr[data-c] > td:nth-child(2)::before { content: "Active until "; }
  .code-table tr[data-c] > td:nth-child(3)::before { content: "Security until "; }
  .code-table tr[data-c] > td:nth-child(4)::before { content: "Latest patch "; }
  .code-table tr[data-c] > td::before { font-family: var(--sans); font-size: .78rem; color: var(--ink-2); }
  .code-table__group th { padding: .5rem; border-bottom: 1px solid var(--ink); }
}

/* A part's mark and name are one link: the name's link stretches over its
   whole entry, so the mark is clickable too and the entry takes the focus
   ring. No underline on these; the mark brightens (and, with motion allowed,
   lifts) on hover instead. Prose links elsewhere keep their underline. */
li.ahj__row { position: relative; }
li.ahj__row .part-link { color: inherit; text-decoration: none; }
li.ahj__row .part-link::after { content: ""; position: absolute; inset: 0; }
li.ahj__row .part-link:focus-visible { outline: none; box-shadow: none; }
li.ahj__row:has(.part-link:focus-visible) { outline: 3px solid currentColor; outline-offset: -3px; }
li.ahj__row:has(.part-link:hover) img { filter: brightness(1.12) saturate(1.1); }
@media (prefers-reduced-motion: no-preference) {
li.ahj__row img { transition: transform 160ms ease, filter 160ms ease; }
li.ahj__row:has(.part-link:hover) img { transform: translateY(-2px); }
}
