/* Carried from the deployed Lawyer's pages.css: its tokens named --la-, its data- states as is- classes. */
/*
 * The lawyer's page components: every piece a page is built from, so a site
 * wearing the lawyer design composes its pages and writes no layout of its
 * own. What a wearer wrote for itself, band and opening and chip and case
 * block, is absorbed here, because a shape a page needs and the library has
 * not is a hole in the library.
 *
 * One class family per component, each with one job, each documented above
 * its rules with what it is and where it is used. The `la-` prefix is this
 * design's and no other's.
 *
 * Every colour is a slot of `tokens.css`, read through `var()` and never a
 * literal, so both themes follow. Every other value is a slot of the kit's
 * scale with the scale's own number as its fallback, so this file stands on
 * `tokens.css` alone in the specimen and on the whole kit in a site.
 *
 * One figure frame and no second: the hero's, 24rem by 18rem. This design
 * has no drawing grammar, so its hero holds a photograph, a mark or a record
 * of the subject, and one frame is what makes those three land alike.
 *
 * The ramp is weight, not a second face. Geist sets everything, and a
 * heading is the sans at semibold with the tracking pulled in; the mono
 * carries every label said quietly, every case number and every command.
 * Saffron is where a reader acts and where a page introduces itself.
 *
 * The specimen's `/lawyer/library/` is where each of these is seen, and
 * `DESIGN.md`, "The pages", is the story.
 *
 * A court service's families stand in files of their own, laid down first
 * so this file's frame is read over them: the court record's pieces, the
 * site's ends, the calendar, the front and the legal document.
 */

/* ---- the page frame -------------------------------------------------- */

/*
 * `.la-shell` is the whole document's room, and it is what every component
 * below asks about instead of the window: a component inside a pane, a
 * preview or a phone gets the same answer. Used once, around the header, the
 * main and the footer. A wearer whose shell is the web kit's `Page.astro`
 * has `.la-viewport` for that room, so it is named here too, and no wearer
 * adds a container of its own.
 */
.la-viewport {
  container-name: nv-page la-page;
  container-type: inline-size;
}

.la-shell {
  container: la-page / inline-size;
  min-height: 100%;
  background: var(--la-color-bg);
  color: var(--la-color-fg-body);
  font-family: var(--la-font-sans);
  font-size: var(--la-text-base, 1rem);
  line-height: var(--la-leading-normal, 1.5);
}

/*
 * `.la-page` is a site's page: the window's width, each of its bands bleeding to it, their words held to Lawyer's one
 * column, `--la-page-edge`, so the mark, every heading and the colophon share one left edge.
 */
.la-page {
  width: 100%;
}

/* ---- the header ------------------------------------------------------ */

/*
 * `.la-head` is the head of every page: the mark home, the pages in their
 * lanes, the language switcher and the theme switcher. It is a raised bar
 * with a hairline under it, because the record below it is the page and the
 * chrome says so by sitting on its own paper.
 *
 * Wide, it is one line: the mark, the lanes, the switchers. Narrow, it is a
 * crumb, the mark and the page the reader is on, with a Menu that opens the
 * pages one to a line. The panel is open until a script sets `data-fold` on
 * the head, so with no script every link is reachable and a crawler reads
 * the same head.
 */
.la-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--la-space-4, 1rem);
  align-items: center;
  padding-block: var(--la-space-3, 0.75rem);
}

.la-head-crumb {
  display: flex;
  gap: var(--la-space-3, 0.75rem);
  align-items: center;
  min-width: 0;
}

/* The mark is an inlined drawing, so it wears the page's own ink. */
.la-head-mark {
  display: flex;
  flex: none;
  align-items: center;
  color: var(--la-color-fg);
}

.la-head-mark svg {
  display: block;
  width: auto;
  height: 2.25rem;
}

/* The crumb's second step: a rule, then the page the reader is on. */
.la-head-here {
  display: flex;
  gap: var(--la-space-2, 0.5rem);
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--la-color-fg-muted);
}

.la-head-here::before {
  content: '/';
  color: var(--la-color-border-strong);
}

/* The Menu, the one control in the head, at a thumb's height. */
.la-head-menu {
  display: inline-flex;
  gap: var(--la-space-2, 0.5rem);
  align-items: center;
  min-height: max(var(--la-control-lg), var(--la-tap-target));
  padding: 0 var(--la-space-3, 0.75rem);
  border: 1px solid var(--la-color-border-strong);
  border-radius: var(--la-radius-md);
  background: var(--la-color-bg-raised);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--la-color-fg);
  cursor: pointer;
}

.la-head-menu svg {
  width: var(--la-icon-sm, 1rem);
  height: var(--la-icon-sm, 1rem);
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
}

.la-head.is-open .la-head-menu {
  border-color: var(--la-color-accent);
  color: var(--la-color-accent);
}

.la-head-menu .is-glyph-close,
.la-head.is-open .la-head-menu .is-glyph-open {
  display: none;
}

.la-head.is-open .la-head-menu .is-glyph-close {
  display: inline;
}

/* The panel spans the head under the crumb. A script that can close it says
   so with `data-fold`; until then it stands open. */
.la-head-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.la-head.is-fold:not(.is-open) .la-head-panel {
  display: none;
}

/*
 * `.la-lanes` is the pages of the site in their lanes, each lane a named
 * group. Narrow they are groups read top to bottom, the pages one to a line
 * with room for a thumb. Wide they are one row, parted by a hairline, their
 * names dropped because the order already reads as the lanes.
 */
.la-lanes {
  display: grid;
  gap: var(--la-space-5, 1.5rem);
  padding-block: var(--la-space-4, 1rem) var(--la-space-3, 0.75rem);
}

.la-lane {
  display: grid;
}

.la-lane-name {
  padding-block-end: var(--la-space-2, 0.5rem);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--la-color-link);
}

.la-lanes a {
  display: block;
  padding-block: var(--la-space-3, 0.75rem);
  border-block-end: 1px solid var(--la-color-border-subtle);
  font-size: var(--la-text-xl, 1.25rem);
  font-weight: var(--la-weight-medium, 500);
  line-height: var(--la-leading-tight, 1.2);
  letter-spacing: -0.01em;
  color: var(--la-color-fg-muted);
  text-decoration: none;
}

.la-lanes a:hover {
  color: var(--la-color-fg);
}

.la-lanes a[aria-current='page'] {
  padding-inline-start: var(--la-space-3, 0.75rem);
  box-shadow: inset 3px 0 0 var(--la-color-accent);
  color: var(--la-color-fg);
}

/*
 * `.la-switchers` holds the language switcher and the theme switcher, the
 * only two controls in the head. Each is a `.la-switcher`, a row of small
 * mono words in a sunken track, the one in force sitting on paper so it
 * reads as the one pressed.
 */
.la-switchers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--la-space-3, 0.75rem);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--la-space-2, 0.5rem) var(--la-space-4, 1rem);
}

.la-switcher {
  display: inline-flex;
  gap: var(--la-space-1, 0.25rem);
  align-items: center;
  padding: var(--la-space-05, 0.125rem);
  border: 1px solid var(--la-color-border-subtle);
  border-radius: var(--la-radius-md);
  background: var(--la-color-bg-sunken);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.la-switcher a,
.la-switcher button {
  padding: var(--la-space-1, 0.25rem) var(--la-space-2, 0.5rem);
  border: 0;
  border-radius: var(--la-radius-sm);
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--la-color-fg-muted);
  text-decoration: none;
  cursor: pointer;
}

.la-switcher a[aria-current],
.la-switcher button[aria-pressed='true'] {
  background: var(--la-color-bg-raised);
  box-shadow: var(--la-shadow-sm);
  color: var(--la-color-fg);
}

/* Wide: one line, the crumb giving way to the mark alone and the Menu
   going with it. */
@container la-page (min-width: 56rem) {
  .la-head {
    grid-template-columns: auto minmax(0, 1fr);
    padding-block: var(--la-space-4, 1rem);
  }

  .la-head-here,
  .la-head .la-head-menu {
    display: none;
  }

  .la-head .la-head-panel,
  .la-head.is-fold:not(.is-open) .la-head-panel {
    display: flex;
    grid-column: auto;
    gap: var(--la-space-5, 1.5rem);
    align-items: center;
  }

  .la-lanes {
    display: flex;
    flex: 1;
    gap: var(--la-space-4, 1rem);
    justify-content: flex-start;
    padding-block: 0;
  }

  .la-lane {
    display: flex;
    gap: var(--la-space-4, 1rem);
    align-items: center;
  }

  .la-lane + .la-lane {
    padding-inline-start: var(--la-space-4, 1rem);
    border-inline-start: 1px solid var(--la-color-border);
  }

  .la-lane-name {
    display: none;
  }

  .la-lanes a {
    padding-block: var(--la-space-1, 0.25rem);
    border-block-end: 2px solid transparent;
    font-size: var(--la-text-sm, 0.875rem);
    font-weight: var(--la-weight-medium, 500);
    letter-spacing: 0;
    white-space: nowrap;
  }

  .la-lanes a[aria-current='page'] {
    padding-inline-start: 0;
    box-shadow: none;
    border-block-end-color: var(--la-color-accent);
  }

  .la-switchers {
    flex: none;
    flex-wrap: nowrap;
    margin-inline-start: auto;
    padding-block: 0;
  }
}

/* ---- the footer ------------------------------------------------------ */

/*
 * `.la-foot` is the colophon at the foot of every page: who operates the
 * thing, where its data comes from, and what it is not. A site about a
 * public record owes its reader those three, so the foot has room for them:
 * a claim, a row of links, the notes, and `.la-foot-end` for the licence or
 * the disclaimer that closes it. Set in mono, as a colophon is.
 */
.la-foot {
  display: grid;
  justify-items: start;
  gap: var(--la-space-3, 0.75rem);
  padding-block: var(--la-space-7, 3rem) var(--la-space-8, 4rem);
  border-block-start: 1px solid var(--la-color-border);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-xs, 0.75rem);
  line-height: var(--la-leading-normal, 1.5);
  color: var(--la-color-fg-muted);
}

.la-foot a {
  padding-block: var(--la-space-1, 0.25rem);
  color: var(--la-color-fg-muted);
}

.la-foot a:hover {
  color: var(--la-color-fg);
}

.la-foot-end {
  color: var(--la-color-fg-subtle);
}

@container la-page (min-width: 40rem) {
  .la-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--la-space-3, 0.75rem) var(--la-space-6, 2rem);
  }

  .la-foot-end {
    margin-inline-start: auto;
  }
}

/* ---- the hero -------------------------------------------------------- */

/*
 * `.la-hero` is the opening of every page, and a page has exactly one. A
 * saffron wash sits behind it, the one gradient this design spends, and a
 * saffron rule runs down the words: a rule beside a passage is how a record
 * marks the passage that matters, and a page's opening is that passage.
 *
 * Two columns where the page has the room: the words, and one figure at the
 * hero's frame. On a phone one column, and the figure stands under the
 * statement at the column's width, because the sentence that says what this
 * is always precedes the picture of it.
 *
 * `data-level="section"` is a section landing's quieter opening: the same
 * layout, one rung down the ramp and no wash.
 */
.la-hero {
  padding-block: var(--la-space-7, 3rem) var(--la-space-6, 2rem);
  background:
    radial-gradient(60rem 28rem at 50% 0, var(--la-color-role-glow-hero), transparent 70%), var(--la-color-bg);
}

.la-hero.is-level-section {
  padding-block: var(--la-space-6, 2rem) var(--la-space-5, 1.5rem);
  background: var(--la-color-bg);
}

.la-hero > .la-page {
  display: grid;
  gap: var(--la-space-6, 2rem);
  align-items: center;
}

@container la-page (min-width: 60rem) {
  .la-hero > .la-page {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 24rem);
    column-gap: var(--la-space-7, 3rem);
  }
}

/* The words, with the rule down their inline start. */
.la-hero-words {
  position: relative;
  display: grid;
  gap: var(--la-space-4, 1rem);
  min-width: 0;
  padding-inline-start: var(--la-space-4, 1rem);
}

.la-hero-words::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  border-radius: var(--la-radius-sm);
  background: linear-gradient(180deg, var(--la-color-accent), var(--la-color-role-display-from));
}

.la-hero.is-level-section .la-hero-words {
  gap: var(--la-space-3, 0.75rem);
}

/* The kicker over the title: what this is, in mono, tracked out, in the
   link's saffron, which is the one saffron that carries on paper. */
.la-kicker {
  margin: 0;
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--la-color-link);
}

/* The one line that says the whole thing. Twenty-two characters, not the
   sixty a paragraph wants: a line set this large travels much further for
   the same count, and a title the width of the page stops being a title.
   `em` inside it is the display gradient, the one place type is painted. */
.la-title {
  max-width: 22ch;
  margin: 0;
  font-size: var(--la-text-5xl, clamp(2rem, 1.5rem + 2.6vw, 3.5rem));
  font-weight: var(--la-weight-bold, 700);
  line-height: var(--la-leading-display, 1.05);
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--la-color-fg);
}

.la-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--la-color-role-display-from), var(--la-color-role-display-to));
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.la-hero.is-level-section .la-title {
  max-width: 26ch;
  font-size: var(--la-text-4xl, clamp(2rem, 1.55rem + 2vw, 2.625rem));
  font-weight: var(--la-weight-semi, 600);
}

/* The statement under the title: the sentence that says what it is. */
.la-statement {
  max-width: 56ch;
  margin: 0;
  font-size: var(--la-text-lg, 1.125rem);
  line-height: var(--la-leading-normal, 1.5);
  color: var(--la-color-fg-muted);
}

@container la-page (min-width: 48rem) {
  .la-title {
    font-size: var(--la-text-6xl, clamp(2.25rem, 1.5rem + 3.4vw, 4rem));
  }

  .la-statement {
    max-width: 64ch;
    font-size: var(--la-text-xl, 1.25rem);
  }
}

/*
 * `.la-hero-figure` is the hero's one figure, and this design's only frame.
 * 24rem by 18rem, four to three, the proportion of a record card, so a
 * photograph, a mark and a drawn-out case land at one size and a page never
 * argues about how big its picture is. What goes inside is cropped to the
 * frame rather than letterboxed, and sits on raised paper with a hairline
 * and the design's own small shadow.
 */
.la-hero-figure {
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-width: 24rem;
  max-height: 18rem;
  border: 1px solid var(--la-color-border);
  border-radius: var(--la-radius-lg);
  background: var(--la-color-bg-raised);
  box-shadow: var(--la-shadow-md);
}

.la-hero-figure :is(img, svg, picture, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- a clause -------------------------------------------------------- */

/*
 * `.la-clause` is a section of a page read as a clause of a record: a
 * hairline above it, its number in the margin as a small ink tile with the
 * figure in saffron, and `.la-hold` for the text. The number sits in a
 * margin column where the page has the room and above the title where it
 * does not.
 *
 * `data-plain` is a clause with no number: it wants the whole frame, and is
 * what a document read whole stands in.
 */
.la-clause {
  border-block-start: 1px solid var(--la-color-border);
}

.la-clause > .la-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--la-space-3, 0.75rem) var(--la-space-6, 2rem);
  padding-block: var(--la-space-8, 4rem);
}

@container la-page (min-width: 52rem) {
  .la-clause > .la-page {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
}

/* On a phone a clause breathes a rung less, so it does not open on a screen
   of empty paper. */
@container la-page (max-width: 36rem) {
  .la-clause > .la-page {
    padding-block: var(--la-space-7, 3rem);
  }
}

.la-clause.is-plain > .la-page {
  display: block;
}

/* The clause's number: an ink tile in both themes, its figure in saffron,
   which is the emphasis band shrunk to one square. */
.la-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0 var(--la-space-2, 0.5rem);
  border-radius: var(--la-radius-md);
  background: var(--la-color-role-emphasis);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm, 0.875rem);
  font-weight: var(--la-weight-semi, 600);
  color: var(--la-color-role-emphasis-accent);
}

/*
 * `.la-hold` is the clause's text column, and the room everything inside it
 * asks about. A ruled row and a card grid reflow on this column and not on
 * the page: past 52rem the clause gives 4rem of itself to the number, and a
 * piece that queried the page would believe it had room it was never given.
 */
.la-hold {
  container: la-column / inline-size;
  min-width: 0;
}

.la-clause h2 {
  max-width: 24ch;
  margin: 0 0 var(--la-space-3, 0.75rem);
  font-size: var(--la-text-3xl, 1.875rem);
  font-weight: var(--la-weight-semi, 600);
  line-height: var(--la-leading-tight, 1.2);
  letter-spacing: -0.018em;
  color: var(--la-color-fg);
}

.la-clause p {
  max-width: 64ch;
  color: var(--la-color-fg-body);
}

.la-hold > p + p {
  margin-block-start: var(--la-space-4, 1rem);
}

@container la-page (min-width: 48rem) {
  .la-clause h2 {
    font-size: var(--la-text-4xl, clamp(2rem, 1.55rem + 2vw, 2.625rem));
  }
}

/* ---- the card grid --------------------------------------------------- */

/*
 * `.la-cards` is a row of cards, two-up, three-up or four-up by `data-up`,
 * every card the same size and none of them floated. A row of five is two
 * rows, four and one, and says so with `data-up="4"`. Four-up and three-up
 * fall to two on a narrow column and to one on a phone; two-up falls
 * straight to one.
 *
 * `.la-card` is one of them, and it is a record rather than a tile: raised
 * paper, a hairline, the design's single-line shadow, and a mono number at
 * its head where the card is one of a counted set.
 */
.la-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--la-space-4, 1rem);
  margin-block: var(--la-space-6, 2rem);
}

@container la-column (min-width: 30rem) {
  .la-cards.is-up-3,
  .la-cards.is-up-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container la-column (min-width: 40rem) {
  .la-cards.is-up-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--la-space-5, 1.5rem);
  }

  .la-cards.is-up-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .la-cards.is-up-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.la-card {
  padding: var(--la-card-pad, 1.25rem);
  border: 1px solid var(--la-color-border);
  border-radius: var(--la-radius-md);
  background: var(--la-color-bg-raised);
  box-shadow: var(--la-shadow-sm);
}

.la-card-no {
  margin-block-end: var(--la-space-2, 0.5rem);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  color: var(--la-color-accent);
}

.la-card h3 {
  margin: 0 0 var(--la-space-2, 0.5rem);
  font-size: var(--la-text-lg, 1.125rem);
  font-weight: var(--la-weight-semi, 600);
  line-height: var(--la-leading-tight, 1.2);
  letter-spacing: -0.012em;
  color: var(--la-color-fg);
}

.la-card p {
  max-width: none;
  margin: 0;
  font-size: var(--la-text-sm, 0.875rem);
  color: var(--la-color-fg-muted);
}

/* ---- ruled rows ------------------------------------------------------ */

/*
 * `.la-rows` is several of one thing: a ruled list and never a box per row,
 * because a row is an entry of a record and a record rules its entries.
 * Each row is a name, `.la-name`, and its text side by side where the column
 * has the room, and stacked where it has not.
 */
.la-rows {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.la-shell p + .la-rows {
  margin-block-start: var(--la-space-6, 2rem);
}

.la-rows > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--la-space-1, 0.25rem) var(--la-space-6, 2rem);
  padding-block: var(--la-space-5, 1.5rem);
  border-block-start: 1px solid var(--la-color-border);
}

.la-rows > li:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}

@container la-column (min-width: 36rem) {
  .la-rows > li {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: baseline;
  }
}

.la-rows p {
  max-width: 58ch;
  margin: 0;
  color: var(--la-color-fg-body);
}

.la-rows p + p,
.la-rows .la-commands + p {
  margin-block-start: var(--la-space-2, 0.5rem);
}

/* The name of a row, one rung under a clause's title. */
.la-name {
  margin: 0;
  font-size: var(--la-text-xl, 1.25rem);
  font-weight: var(--la-weight-semi, 600);
  line-height: var(--la-leading-tight, 1.2);
  letter-spacing: -0.015em;
  color: var(--la-color-fg);
}

/* ---- a short list ---------------------------------------------------- */

/*
 * `.la-list` is several short sentences: a hairline before each, never a
 * bullet, because a record rules its lines and does not dot them.
 */
.la-list {
  margin: var(--la-space-2, 0.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.la-list li {
  padding-block: var(--la-space-2, 0.5rem);
  border-block-start: 1px solid var(--la-color-border-subtle);
  color: var(--la-color-fg-body);
}

.la-list li:first-child {
  border-block-start: 0;
}

/* ---- commands -------------------------------------------------------- */

/*
 * `.la-commands` is a pair list where the value is the exact string: a
 * command, a case number, a source, a date. The label over each in the small
 * tracked mono, the value in mono under it, wrapping wherever the column is
 * narrow rather than pushing the page sideways.
 */
.la-commands {
  display: grid;
  gap: var(--la-space-2, 0.5rem);
  margin: var(--la-space-4, 1rem) 0;
}

.la-commands dt {
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--la-color-fg-muted);
}

.la-commands dd {
  margin: 0;
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm, 0.875rem);
  overflow-wrap: anywhere;
  color: var(--la-color-fg);
}

/* ---- a quotation ----------------------------------------------------- */

/*
 * `.la-quote` is a sentence quoted from somewhere the reader can check: a
 * statute, a ruling, a source. Ruled at its start in saffron and set on
 * sunken paper, because a quotation is a place the reader is asked to look
 * and its edge is where the page stops speaking in its own voice.
 */
.la-quote {
  margin: var(--la-space-5, 1.5rem) 0;
  padding: var(--la-space-3, 0.75rem) var(--la-space-4, 1rem);
  border-inline-start: 3px solid var(--la-color-accent);
  border-start-end-radius: var(--la-radius-sm);
  border-end-end-radius: var(--la-radius-sm);
  background: var(--la-color-bg-sunken);
}

.la-quote p {
  margin: 0 0 var(--la-space-2, 0.5rem);
  color: var(--la-color-fg);
}

.la-quote cite {
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--la-color-fg-muted);
}

/* ---- what done looks like -------------------------------------------- */

/*
 * `.la-done` is what done looks like at the end of a step: the state a
 * reader can check for themselves, ruled above from the step it closes.
 */
.la-done {
  margin-block-start: var(--la-space-4, 1rem);
  padding-block-start: var(--la-space-3, 0.75rem);
  border-block-start: 1px solid var(--la-color-border);
  color: var(--la-color-fg-body);
}

.la-done strong {
  font-weight: var(--la-weight-semi, 600);
  color: var(--la-color-fg);
}

/* ---- code ------------------------------------------------------------ */

/*
 * `.la-code` is code or a record shown rather than run: a sunken block with
 * a hairline, scrolling sideways on its own so the page never does. Whatever
 * follows it keeps the distance, because the block carries no bottom margin.
 */
.la-code {
  margin: var(--la-space-5, 1.5rem) 0 0;
  padding: var(--la-space-4, 1rem);
  overflow-x: auto;
  border: 1px solid var(--la-color-border);
  border-radius: var(--la-radius-md);
  background: var(--la-color-bg-sunken);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm, 0.875rem);
  line-height: var(--la-leading-normal, 1.5);
  color: var(--la-color-fg);
}

.la-code + * {
  margin-block-start: var(--la-space-5, 1.5rem);
}

/* ---- a row of actions ------------------------------------------------ */

/*
 * `.la-actions` is a row of places the reader may go, in the hero or closing
 * a clause. `.la-action` is one of them, at a thumb's height, and the one
 * marked `data-variant="accent"` is filled with saffron and lettered in
 * navy, because saffron is what a reader acts on and navy is what is legible
 * on it in either theme.
 */
.la-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--la-space-3, 0.75rem);
}

.la-hold > .la-actions {
  margin-block-start: var(--la-space-5, 1.5rem);
}

.la-action {
  display: inline-flex;
  align-items: center;
  min-height: max(var(--la-control-lg), var(--la-tap-target));
  padding: 0 var(--la-space-5, 1.5rem);
  border: 1px solid var(--la-color-border-strong);
  border-radius: var(--la-radius-md);
  background: var(--la-color-bg-raised);
  font-size: var(--la-text-sm, 0.875rem);
  font-weight: var(--la-weight-semi, 600);
  color: var(--la-color-fg);
  text-decoration: none;
}

.la-action.is-variant-accent {
  border-color: var(--la-color-accent);
  background: var(--la-color-accent);
  color: var(--la-color-fg-on-accent);
  box-shadow: var(--la-shadow-sm);
}

.la-action:hover {
  border-color: var(--la-color-accent);
  color: var(--la-color-accent);
}

.la-action.is-variant-accent:hover {
  border-color: var(--la-color-accent-hover);
  background: var(--la-color-accent-hover);
  color: var(--la-color-fg-on-accent);
}

.la-action:focus-visible {
  outline: 0;
  border-color: var(--la-color-border-focus);
  box-shadow: var(--la-shadow-focus);
}

/* ---- a quiet line ---------------------------------------------------- */

/*
 * `.la-quiet` is a line said quietly: a note under a block, a caveat, what
 * the page is careful to add. The muted ink, one rung small.
 */
.la-quiet {
  font-size: var(--la-text-xs, 0.75rem);
  line-height: var(--la-leading-normal, 1.5);
  color: var(--la-color-fg-muted);
}

/* ---- a document read whole ------------------------------------------- */

/*
 * `.la-reading` is a whole document read on the page, which for this design
 * is the terms, the privacy notice or a ruling: its sections in a rail
 * beside the reading column where there is room, and folded into a bar at
 * the top of the window where there is not. It stands inside a
 * `.la-clause.is-plain`, which rules it above and gives it the frame.
 */
.la-reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--la-space-6, 2rem) var(--la-space-7, 3rem);
}

@container la-page (min-width: 56rem) {
  .la-reading {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
}

.la-rail-hold {
  align-self: start;
  min-width: 0;
}

.la-rail {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--la-font-mono);
  font-size: var(--la-text-xs, 0.75rem);
  scrollbar-width: thin;
}

/* Beside the column, the rail is sticky and scrolls inside the window's
   height, so a section far down the list is reachable while the reader is
   far down the text. */
@container la-page (min-width: 56rem) {
  .la-rail-hold {
    position: sticky;
    inset-block-start: var(--la-space-5, 1.5rem);
    padding: var(--la-space-4, 1rem);
    border: 1px solid var(--la-color-border-subtle);
    border-radius: var(--la-radius-md);
    background: var(--la-color-bg-sunken);
  }

  .la-rail {
    max-height: calc(100vh - var(--la-space-8, 4rem));
    overflow-y: auto;
  }

  .la-rail-hold .la-rail-toggle {
    display: none;
  }
}

/* Narrow, and only where a script has said it can fold, the rail is a bar
   held at the top: the word for the list and the section under the eye. It
   opens into the same links, which scroll in their own box. */
@container la-page (max-width: 55.99rem) {
  .la-rail-hold.is-fold {
    position: sticky;
    z-index: var(--la-z-sticky, 10);
    inset-block-start: 0;
    margin-inline: calc(-1 * var(--la-gutter, 1rem));
    padding-inline: var(--la-gutter, 1rem);
    border-block-end: 1px solid var(--la-color-border);
    background: var(--la-color-bg-raised);
  }

  .la-rail-hold.is-fold .la-rail {
    display: none;
  }

  .la-rail-hold.is-fold.is-open .la-rail {
    display: block;
    max-height: 60vh;
    overflow-y: auto;
    padding-block: var(--la-space-2, 0.5rem) var(--la-space-4, 1rem);
    overscroll-behavior: contain;
  }

  .la-rail-hold.is-fold .la-rail li {
    padding-block: var(--la-space-2, 0.5rem);
  }

  /* A heading followed from the bar lands under it, not behind it. */
  .la-paper :is(h2, h3) {
    scroll-margin-block-start: var(--la-space-9, 6rem);
  }
}

.la-rail-toggle {
  display: flex;
  align-items: baseline;
  gap: var(--la-space-3, 0.75rem);
  width: 100%;
  min-height: max(var(--la-control-lg), var(--la-tap-target));
  padding: var(--la-space-3, 0.75rem) 0;
  border: 0;
  background: transparent;
  font-family: var(--la-font-mono);
  font-size: var(--la-text-xs, 0.75rem);
  text-align: start;
  color: var(--la-color-fg);
  cursor: pointer;
}

/* The chevron says the bar opens, and turns when it has. */
.la-rail-toggle::after {
  content: '';
  flex: none;
  align-self: center;
  width: 0.45rem;
  height: 0.45rem;
  margin-inline-start: auto;
  border-inline-end: 1.5px solid currentcolor;
  border-block-end: 1.5px solid currentcolor;
  transform: translateY(-25%) rotate(45deg);
}

.la-rail-hold.is-open .la-rail-toggle::after {
  transform: translateY(25%) rotate(-135deg);
}

.la-rail-label {
  flex: none;
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--la-color-link);
}

.la-rail-now {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--la-color-fg-muted);
}

/* The number keeps its own column, so a heading with none lines up under the
   text of the one above it and an entry that wraps keeps its indent. */
.la-rail li {
  display: grid;
  grid-template-columns: 2.5ch minmax(0, 1fr);
  gap: var(--la-space-2, 0.5rem);
  padding-block: var(--la-space-1, 0.25rem);
}

.la-rail li.is-level-3,
.la-rail li.is-level-4 {
  padding-inline-start: var(--la-space-4, 1rem);
}

/* In the rail the clause number is a bare figure, not the ink tile: a list
   of forty entries is a list, and forty tiles would be a wall. */
.la-rail .la-no {
  display: inline;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: var(--la-text-xs, 0.75rem);
  color: var(--la-color-fg-subtle);
}

.la-rail a {
  color: var(--la-color-fg-muted);
  text-decoration: none;
}

.la-rail a:hover {
  color: var(--la-color-fg);
}

.la-rail a[aria-current] {
  margin-inline-start: calc(-1 * var(--la-space-2, 0.5rem));
  padding-inline-start: var(--la-space-2, 0.5rem);
  box-shadow: inset 3px 0 0 var(--la-color-accent);
  color: var(--la-color-fg);
}

/*
 * `.la-paper` is the read document itself, at its own measure, which is
 * wider than a clause's: its paragraphs, lists, tables and code share one
 * right edge. A ruled table scrolls sideways inside its own box, so the page
 * never does.
 */
.la-paper {
  max-width: 70ch;
  min-width: 0;
  font-size: var(--la-text-base, 1rem);
  line-height: var(--la-leading-relaxed, 1.625);
}

.la-paper :is(p, li)[id] {
  scroll-margin-block-start: var(--la-space-9, 6rem);
}

.la-paper h1 {
  max-width: 24ch;
  margin: 0 0 var(--la-space-5, 1.5rem);
  font-size: var(--la-text-4xl, clamp(2rem, 1.55rem + 2vw, 2.625rem));
  font-weight: var(--la-weight-bold, 700);
  line-height: var(--la-leading-tight, 1.2);
  letter-spacing: -0.022em;
  color: var(--la-color-fg);
}

.la-paper h2 {
  margin: var(--la-space-7, 3rem) 0 var(--la-space-3, 0.75rem);
  padding-block-start: var(--la-space-5, 1.5rem);
  border-block-start: 1px solid var(--la-color-border);
  font-size: var(--la-text-2xl, 1.5rem);
  font-weight: var(--la-weight-semi, 600);
  line-height: var(--la-leading-tight, 1.2);
  letter-spacing: -0.016em;
  color: var(--la-color-fg);
}

.la-paper h3 {
  margin: var(--la-space-6, 2rem) 0 var(--la-space-2, 0.5rem);
  font-size: var(--la-text-lg, 1.125rem);
  font-weight: var(--la-weight-semi, 600);
  color: var(--la-color-fg);
}

.la-paper :is(p, ul, ol) {
  max-width: none;
  margin: 0 0 var(--la-space-4, 1rem);
  color: var(--la-color-fg-body);
}

.la-paper :is(ul, ol) {
  padding-inline-start: var(--la-space-5, 1.5rem);
}

.la-paper li {
  margin-block-end: var(--la-space-2, 0.5rem);
}

.la-paper strong {
  font-weight: var(--la-weight-semi, 600);
  color: var(--la-color-fg);
}

.la-paper code {
  padding: var(--la-space-05, 0.125rem) var(--la-space-1, 0.25rem);
  border-radius: var(--la-radius-sm);
  background: var(--la-color-bg-sunken);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm, 0.875rem);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.la-paper pre {
  margin: var(--la-space-4, 1rem) 0 var(--la-space-5, 1.5rem);
  padding: var(--la-space-4, 1rem);
  overflow-x: auto;
  border: 1px solid var(--la-color-border);
  border-radius: var(--la-radius-md);
  background: var(--la-color-bg-sunken);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm, 0.875rem);
  line-height: var(--la-leading-normal, 1.5);
  color: var(--la-color-fg);
}

.la-paper pre code {
  padding: 0;
  background: none;
}

.la-paper table {
  width: 100%;
  margin: 0 0 var(--la-space-5, 1.5rem);
  border-collapse: collapse;
  font-size: var(--la-text-sm, 0.875rem);
}

.la-paper :is(th, td) {
  padding: var(--la-space-2, 0.5rem) var(--la-space-3, 0.75rem);
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--la-color-border-subtle);
}

.la-paper th {
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs, 0.6875rem);
  font-weight: var(--la-weight-semi, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--la-color-fg-muted);
  border-block-end-color: var(--la-color-border-strong);
}

/* ---- links ----------------------------------------------------------- */

/* A link in running text is the dark saffron, because the bright one does
   not carry body text on paper. */
.la-hold a,
.la-paper a,
.la-statement a {
  color: var(--la-color-link);
}

.la-hold a:hover,
.la-paper a:hover,
.la-statement a:hover {
  color: var(--la-color-link-hover);
}
