/* SPDX-License-Identifier: AGPL-3.0-or-later - The Hoard Wall */

/* The rule under the masthead is a length of brass, not a 1px border: it is
   brightest where the title is and fades out towards the margins, so the page
   has somewhere it begins rather than a line drawn across it. A border cannot
   do this - `border-image` can, but it takes the radius with it - so the rule
   is a pseudo-element and the border is gone. */
.masthead {
  position: sticky; inset-block-start: 0; z-index: 3;
  /* Wrapping, because at 390px the title and the nav together want about
     440px and flex shrinks both by default - so "Dragon's Vault" broke
     across two lines and "6 treasures" broke across two more, on the one
     device this vault is used from most. Wrapped, the nav takes its own line
     and the title keeps one line at every width down to 320px. */
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem;
  max-inline-size: 1400px; margin-inline: auto;
  padding-block: calc(1.5rem - var(--settle) * 0.8rem) calc(1rem - var(--settle) * 0.4rem);
  /* Nothing at rest: a header that is already frosted over a page that has
     not moved is decoration pretending to be feedback. */
  /* 76% left a quarter of the page showing through at full settle, and
     backdrop-filter softens high-contrast Literata without removing it - card
     fragments were legible across the header band, colliding with the title.
     92% is opaque enough to sit over text and still reads as frost rather
     than as a bar, because the blur underneath is doing the other half. */
  background: color-mix(in oklab, var(--background) calc(var(--settle) * 92%), transparent);
  backdrop-filter: blur(calc(var(--settle) * 14px)) saturate(calc(1 + var(--settle) * 0.4));
}

/* A custom property only interpolates if the engine knows what type it is.
   Without this registration `--settle` is a string, the animation below
   becomes a discrete flip at the halfway mark, and the header snaps rather
   than settles - which looks like a bug and is one. */
@property --settle {
  syntax: "<number>";
  /* Inherited, because .masthead::after reads it too and a pseudo-element
     takes its custom properties by inheritance from the element that bore it.
     With `inherits: false` the rule under the header would sit at the initial
     value forever while the header above it moved. */
  inherits: true;
  initial-value: 0;
}

/* The header condenses as the page moves under it, and the whole thing is a
   scroll timeline - no scroll listener, no rAF loop, no class being toggled
   at 60fps from the main thread while the main thread is also the thing
   rendering the wall. The browser drives it off the compositor.
 *
 * Range is 0 to 7rem: roughly the height of the drawbridge, so the header has
 * finished settling at about the moment the first row of cards reaches it. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .masthead {
      animation: masthead-settle linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 7rem;
    }
  }
}
@keyframes masthead-settle {
  from { --settle: 0; }
  to   { --settle: 1; }
}

.masthead::after {
  content: ""; position: absolute; inset-block-end: 0; inset-inline: 0;
  block-size: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in oklab, var(--accent) 55%, transparent) 12%,
    color-mix(in oklab, var(--accent) 22%, transparent) 62%,
    transparent);
  /* The brass brightens as the header settles onto the page - the one cue
     that says the rule is now an edge with something underneath it. */
  opacity: calc(0.55 + var(--settle) * 0.45);
}
.masthead h1 {
  font-family: var(--font-display); --fraunces-opsz: 28;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: var(--step-3); margin: 0; letter-spacing: -0.01em;
  color: var(--foreground-bright);
}
.masthead .count {
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--muted); margin-inline-start: auto;
  display: flex; gap: .5rem; align-items: baseline;
}
/* The count row aligns on the baseline, which is right for text and wrong for
   an SVG: a replaced element's baseline is its bottom edge, so the sigil
   would hang a third of its height below the word it labels. */
.masthead .sigil { align-items: center; }
.masthead a { color: var(--muted); text-decoration: none; }
.masthead a:hover { color: var(--accent); text-decoration: underline; }
.masthead h1 a { color: inherit; text-decoration: none; }

/* The drawbridge: paste, drop, or prefix a URL. */
.drawbridge {
  max-inline-size: 1400px; margin: 1rem auto;
  display: flex; gap: .5rem;
}
/* The field grows; the button does not.
 *
 * This said `.drawbridge input`, and an <input type="submit"> is an input -
 * so Seek and Hoard were laid out as equal partners of the fields they
 * belong to and took half the row each. A search box with a button the same
 * width as itself reads as two fields, and the one that is a field is not
 * the one your eye starts on. */
.drawbridge > .keyed,
.drawbridge > input:not([type="submit"]) { flex: 1 1 14rem; }
.drawbridge > input[type="submit"] { flex: 0 0 auto; }

/* CSS masonry (grid-lanes) is Safari-only, so columns with an @supports
   upgrade rather than a layout that breaks on three of four engines. */

/* The wall answers to how much is on it.
 *
   `columns: 4 260px` reaches for four columns whatever it has been given, so
   six treasures on a 1440x900 screen produced four stubby columns clustered
   in the top third with a ragged bottom edge and 370px of empty soot beneath
   - a container that happened to fill partway rather than a page. A hoard
   that is small should look composed, not sparse.
 *
   So: two wide plates until there are enough things to justify density, then
   four. `:has()` counting its own children is the whole mechanism - no
   server-side branch, no class, nothing for a Turbo Stream arrival to get
   wrong, and the wall re-composes itself the moment the ninth card lands. */
.wall {
  max-inline-size: 1400px; margin-inline: auto; padding-block: 1rem 4rem;
  columns: 2 420px; column-gap: 1.25rem;
}
.wall:has(> .card:nth-child(7)) {
  columns: 4 260px; column-gap: 1rem;
}

/* A sparse wall has room to read, so it gives the excerpt room. A dense one
   is for scanning, and three lines is a glance. */
.wall .excerpt { -webkit-line-clamp: 6; }
.wall:has(> .card:nth-child(7)) .excerpt { -webkit-line-clamp: 3; }

/* A wide plate is not a licence for a wide line. At 1440px a two-column wall
   gives each card about 690px, which at the excerpt's 13px is a hundred
   characters - a third again past where the eye starts losing the line
   return. --measure is in `em`, so the same constant that was derived from
   Literata's glyph advances for the Lectern applies here at a quarter of the
   size without being restated. */
.card .excerpt, .card .brooding, .card .ribbon, .card .verdict { max-inline-size: var(--measure); }
/* The skeleton stands in for the excerpt, so it takes the excerpt's measure.
   Left uncapped it drew three 690px bars, which reads as a loading graphic
   rather than as the shape of the sentences about to arrive. */
.card .skeleton { max-inline-size: var(--measure); }

/* Which leaves the far side of a wide plate empty - so the kind fills it.
 *
   The mark moves out of the meta row and becomes the object's own device,
   struck into the plate at the end edge: what this thing IS, at the size a
   maker's mark would be, rather than a 13px glyph in a row of metadata. The
   word stays exactly where it was in the meta row, because the colour and
   the glyph are still not allowed to be the only carriers.
 *
   Not for a note. A note has no source, no host and often no excerpt - the
   text IS the card - so a device stamped beside it would be marking a thing
   with a picture of itself. */
/* Hidden by default. It appears only on a wide plate with room for it, and
   never on a note - a note has no source and often no excerpt, the text IS
   the card, and a device beside it would be marking a thing with a picture
   of itself. */
.device { display: none; }

@media (min-width: 46rem) {
  .wall:not(:has(> .card:nth-child(7))) > .card:not(.kind-note) .device {
    display: block;
    position: absolute;
    inset-block-start: 1rem; inset-inline-end: 1.1rem;
    inline-size: 3.6rem; block-size: 3.6rem;
  }
  .wall:not(:has(> .card:nth-child(7))) > .card:not(.kind-note) .device .sigil-mark {
    inline-size: 100%; block-size: 100%;
  }
  /* The device sits in the corner, so the title stops short of it rather
     than running underneath. */
  .wall:not(:has(> .card:nth-child(7))) > .card:not(.kind-note) h2,
  .wall:not(:has(> .card:nth-child(7))) > .card:not(.kind-note) .verdict,
  .wall:not(:has(> .card:nth-child(7))) > .card:not(.kind-note) .meta {
    /* The verdict belongs in this list and was left out of it. It sits
       between the two that carry the gutter, on the one card that is large
       enough for the device to be drawn at all - and the Slovenian of any
       sentence here will be longer than the English. */
    padding-inline-end: 4.4rem;
  }
  /* Silhouette, not line work. At 3.6rem the PDF mark's own lettering is
     legible, so it says "pdf" two lines above the meta row that already says
     it - a second label rather than a struck mark. Inverted from the working
     sigil: the shape carries it and the drawing recedes. */
  .wall:not(:has(> .card:nth-child(7))) > .card .device .sigil-duo { opacity: .3; }
  .wall:not(:has(> .card:nth-child(7))) > .card .device .sigil-line { opacity: .12; }
}

/* And one card is the lede.
 *
   Only while the wall is sparse. With eight things on it there is no
   argument about where to look and a lede is just one card shouting; with
   three, a page needs somewhere for the eye to land or it is a list. That
   ceiling stays here rather than moving into Ruby with the rest, because
   cards arrive by broadcast after the server has already chosen - `:has`
   re-evaluates on every arrival and a Ruby count cannot.
 *
   WHICH card is no longer a CSS question. It used to be
   `:first-child:not(.pending)` - freshest, which is least enriched, so the
   largest object on the page was structurally most likely to be three grey
   bars saying "the dragon is reading this one". The rule now lives in
   Item.lede, which picks the oldest treasure that was actually read AND
   named, and the card says out loud why it was picked. A wall that makes a
   thing big without giving its reason has an opinion it will not defend. */
.wall:not(:has(> .card:nth-child(7))) > .card.lede h2 {
  font-size: var(--step-2);
  --fraunces-opsz: 23;
}
.wall:not(:has(> .card:nth-child(7))) > .card.lede .excerpt {
  font-size: var(--step-0);
  -webkit-line-clamp: 9;
}

/* The reason, in the voice the card already speaks in.
 *
   That claim used to be made in a comment and contradicted by the rule under
   it. `.brooding` and `.ribbon` - the two sentences the dragon already says
   on a card - are JetBrains Mono at --step--2. This was Inter at --step--1,
   in a colour byte-identical to the rune chips beside it and to every link
   in the app, so the one line carrying the wall's editorial voice was set in
   the same face and colour as the interface around it and read as a third
   row of metadata.
 *
   Mono, at the size the other two use. Accent rather than their muted and
   warning, because the three are not the same statement: brooding is the
   dragon working, the ribbon is the dragon failing, and this is the dragon
   having an opinion - which is the only one of the three worth the brass. */
.verdict {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  line-height: var(--leading-ui);
  color: var(--accent);
  /* Both margins, and the bottom one is the point. This copied the zero
     bottom margin `.brooding` and `.ribbon` carry without copying the
     condition that makes zero safe there - both of those are followed by
     `.runes` or the skeleton, which bring their own space. The verdict is
     followed by `.card .meta`, which declares none, so the measured gap was
     0px against 5.4px of leading inside the verdict's own two lines: the
     dragon's judgment and the file's metadata set as one three-line block,
     told apart only by hue. */
  margin-block: .4rem .4rem;
  text-wrap: pretty;
}
/* Below the ceiling the claim is withdrawn along with the size. Leaving the
   sentence behind on a card that no longer looks like the lede is the wall
   asserting something its own layout has stopped supporting. */
.wall:has(> .card:nth-child(7)) .verdict { display: none; }
/* A card is a brass plate lying under the light the room already has - see
   theme.css, where the direction is decided once for the whole app. So the
   top edge catches it and the bottom edge does not, the face is very slightly
   brighter at the top than at the bottom, and lifting the plate on hover
   brightens the highlight rather than only moving the shadow. Getting the two
   to agree is the entire difference between a raised object and a rectangle
   with a drop shadow under it. */
.card {
  break-inside: avoid; margin-block-end: 1rem;
  display: block; text-decoration: none; color: inherit;
  /* 4% over 1.2rem, not a flat fill: a plate this size under a light source
     is measurably brighter where it faces it, and the eye reads the ramp as
     curvature even when it cannot name it. Past ~6% it stops being light and
     starts being a gradient, which is a 2013 button. */
  /* Monotonic, and steeper. The old stop list went lighter -> 4% darker at
     1.2rem -> lighter again, so the face was a V: measured, the BOTTOM was
     brighter than the top, and the whole modulation was 0.85 of 255 - under
     the Weber threshold, and less than the grain sitting on top of it. The
     brass button already proves a 12% ramp reads; this is 7%, on a surface
     that should be quieter than the metal. */
  background:
    linear-gradient(
      var(--background-lighter),
      color-mix(in oklab, var(--background-dark) 7%, var(--background-lighter)));
  border: var(--edge); border-radius: var(--radius-lg);
  border-inline-start: 3px solid var(--card-edge, var(--muted));
  /* --edge is isotropic and sits one pixel outside the bevel, so it undid
     the direction the bevel had just established: the bottom edge of a plate
     lit from above measured brighter at its outermost pixel than one pixel
     in. Survivable when the bevel was +1.6 levels; not now that it is +33.
     The two ends of the border agree with the light. */
  border-block-start-color: color-mix(in oklab, var(--accent) 34%, transparent);
  border-block-end-color: color-mix(in oklab, var(--background-darker) 55%, transparent);
  padding: .9rem 1rem;
  /* Rim plus contact. The contact term is the one that was missing: without
     it the row immediately below a resting card measured brighter than the
     floor it was lying on, so every plate on the wall was an inlay until a
     pointer touched it and 40px of penumbra appeared from nothing. */
  box-shadow: var(--bevel), var(--contact);
  /* The plate sits on the page; the shadow it is about to cast is not drawn
     yet, because an unlifted object casting a 40px shadow is the tell that
     nothing here has weight. */
  transition:
    transform .22s cubic-bezier(.2,.8,.2,1),
    box-shadow .22s cubic-bezier(.2,.8,.2,1),
    border-color .22s;
}
.card:hover, .card:focus-within {
  /* 3px, not 2: below about 3px the shadow that grows underneath is doing all
     the work and the plate itself appears not to move. */
  transform: translateY(-3px);
  box-shadow: var(--bevel-lit), var(--shadow-lifted);
  outline: none;
  /* Three edges, not `border-color`. The shorthand sets all four, and the
     fourth is the 3px kind colour - so pointing at a video card turned it
     into a brass card and erased the one thing on it that says what it is.
     The kind edge is the only part of a card that must not respond to a
     pointer, because it is not a state. */
  border-block-color: color-mix(in oklab, var(--accent) 50%, transparent);
  border-inline-end-color: color-mix(in oklab, var(--accent) 50%, transparent);
}
/* :focus-within above rather than :focus-visible: the card is not focusable -
   the title's link inside it is - so :focus-visible on .card matched nothing
   and a card reached by keyboard lifted for no one. */

/* The kind colour bleeds off its rule and across the head of the card, so the
   3px edge reads as a lit filament rather than a printed stripe. It stays
   decoration: the word beside it still says `video`, and nothing here is the
   only carrier of any meaning. */
.card::before {
  content: "";
  position: absolute; inset-block-start: 0; inset-inline: 0;
  block-size: 4.5rem; border-start-start-radius: inherit; border-start-end-radius: inherit;
  pointer-events: none;
  background: linear-gradient(105deg,
    color-mix(in oklab, var(--card-edge, var(--accent)) 22%, transparent),
    transparent 58%);
  opacity: .5;
  transition: opacity .22s;
}
.card:hover::before, .card:focus-within::before { opacity: 1; }

/* Cards rise out of the soot as the wall scrolls past them.
 *
 * Driven by a view() timeline, which means the animation's clock IS the
 * card's position in the viewport - not a scroll listener, not an
 * IntersectionObserver toggling a class, not a rAF loop measuring geometry on
 * the same thread that has to lay out four columns of cards. The old way is
 * the reason "reveal on scroll" has a reputation; this one runs off the
 * compositor and a hundred cards cost what one does.
 *
 * `translate`, deliberately not `transform`: the card's hover lift is a
 * transform, and one property cannot hold both. The independent transform
 * properties exist for exactly this - a card can be arriving and lifting at
 * the same time without either one clobbering the other.
 *
 * A card already on screen when the page loads is past `entry 100%`, so it
 * renders at the end state immediately. Nothing above the fold ever waits for
 * a scroll that may not come - which is the failure mode of every version of
 * this built with an observer. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .wall .card {
      animation: card-rise linear both;
      animation-timeline: view();
      /* Finishes at `cover 26%`, a quarter of the way across the viewport:
         late enough to be seen arriving, early enough that a card is settled
         well before it is anywhere near readable. An animation still running
         when you start reading is an animation you are waiting for. */
      animation-range: entry 0% cover 26%;
    }
  }
}
@keyframes card-rise {
  from { opacity: 0; translate: 0 2rem; }
  to   { opacity: 1; translate: 0 0; }
}
.card h2 {
  font-family: var(--font-reading); font-variation-settings: normal;
  font-size: var(--step-0); line-height: var(--leading-tight);
  margin: 0 0 .4rem; color: var(--foreground-bright);
  text-wrap: balance;
  /* Same reason as .prose: a card whose title is still a URL is a card with
     one unbreakable word in a 260px column. */
  overflow-wrap: break-word;
}
.card .meta {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--muted); text-transform: lowercase;
}
/* The mark and the word are one unit: a mark that wraps away from its own
   label is worse than no mark, because then the colour IS the only thing
   saying what the card is. */
.sigil {
  display: inline-flex; align-items: center; gap: .32rem;
  color: var(--foreground-dark); font-weight: 500;
}
/* 1.3em against a 12px mono label, which puts the mark's optical weight level
   with the cap height beside it - Phosphor draws on a 256 grid with a 16-unit
   stroke, so at 1em it reads a half step lighter than the text it labels. */
.sigil-mark {
  inline-size: 1.3em; block-size: 1.3em; flex: none;
  /* The kind colour rides on the mark and never on the word. Four of the six
     fail AA as text against --background; as a glyph beside a word that says
     the same thing, they are decoration and carry nothing alone.
   *
     currentColor is the fallback rather than --accent, so a mark that is not
     a kind - the flame on Burn - takes the colour of the control it sits in
     instead of arriving brass on a red button. */
  color: var(--card-edge, currentColor);
}
/* The whole point of a true duotone weight rather than a filled or a line
   set: the ratio between the two is ours to set per surface. Resting, the
   silhouette is a shadow under the line work; under a pointer the kind
   colour fills in, which is the card acknowledging the hover with something
   other than a shadow. */
.sigil-duo { fill: currentColor; opacity: .26; transition: opacity .22s; }
.sigil-line { fill: currentColor; }
.card:hover .sigil-duo, .card:focus-within .sigil-duo { opacity: .6; }
/* The kind colour lives on the edge, not on a word: --kind-video is 3.16:1
   and --kind-link 3.28:1 against --background, so four of the six failed AA
   as text. As a 3px rule beside the card it is decoration and carries no
   meaning a colour-blind reader would lose - the word says it too. */
.card { border-inline-start-width: 3px; }
.card .excerpt {
  font-family: var(--font-reading); font-size: var(--step--1);
  /* Not 1.5. :lang(sl) sets --leading-read to 1.65 because carons rise above
     cap height and collide with the descenders above them; a flat 1.5 here
     took that room back on the one element that holds Slovenian prose. */
  line-height: var(--leading-read); color: var(--foreground-dark);
  hyphens: auto; text-wrap: pretty;
  margin: .5rem 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

.kind-link    { --card-edge: var(--kind-link); }
.kind-article { --card-edge: var(--kind-article); }
.kind-video   { --card-edge: var(--kind-video); }
.kind-pdf     { --card-edge: var(--kind-pdf); }
.kind-image   { --card-edge: var(--kind-image); }
.kind-note    { --card-edge: var(--kind-note); }

.empty {
  max-inline-size: var(--measure); margin: 4rem auto; text-align: center;
  color: var(--muted); font-family: var(--font-reading);
}
/* A <span>, so it matched none of h1,h2,h3,.display and inherited no
   font-variation-settings at all - Fraunces at its default SOFT, under the
   50 floor, which turns the carons in "Nicesar" into shimmering hairlines. */
.empty .big {
  font-family: var(--font-display); font-size: var(--step-2);
  --fraunces-opsz: 23;
  font-variation-settings: "opsz" var(--fraunces-opsz), "SOFT" 60, "WONK" 1;
  color: var(--foreground-dark);
}

/* The dragon's voice. A brass plate rather than a tinted box: this is where
   the fourth non-negotiable is cashed - every automatic action is undoable,
   six seconds, one line - and the one control that takes it back should not
   look like a browser alert. */
.flash {
  position: relative; overflow: hidden;
  max-inline-size: 1400px; margin: .5rem auto 0; padding: .6rem .9rem;
  background:
    linear-gradient(
      color-mix(in oklab, var(--accent) 17%, var(--background-lighter)),
      color-mix(in oklab, var(--accent) 11%, var(--background-lighter)));
  border: var(--edge); border-radius: var(--radius);
  border-inline-start: 3px solid var(--accent);
  box-shadow: var(--bevel), var(--contact);
  font-family: var(--font-mono); font-size: var(--step--1);
}

/* Six seconds, drawn.
 *
 * A window that is stated and never shown is a window nobody trusts, so the
 * filament along the bottom IS the window: when it runs out the plate goes,
 * and the undo goes with it.
 *
 * Guarded on reduced motion, and this is the guard that matters most in the
 * whole stylesheet. The global rule in typography.css collapses every
 * animation to 0.01ms - which, on this one, would take the undo off the
 * screen before anyone could read the sentence offering it. A reader who
 * asked for less motion gets a flash that simply stays. */
@media (prefers-reduced-motion: no-preference) {
  .flash.transient { animation: flash-recede 6.5s linear forwards; }
  .flash.transient::after {
    content: ""; position: absolute;
    inset-block-end: 0; inset-inline-start: 0;
    block-size: 2px; inline-size: 100%;
    background: var(--accent);
    transform-origin: 0 50%;
    animation: undo-window 6s linear forwards;
  }
}
@keyframes undo-window {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
@keyframes flash-recede {
  0%, 92%  { opacity: 1; }
  /* visibility, not only opacity: an invisible plate that still takes a tap
     is worse than a visible one. */
  100%     { opacity: 0; visibility: hidden; }
}

/* Fading alone leaves a plate-shaped hole between the header and the
   drawbridge, which reads as a rendering fault rather than as something
   having finished. Where keyword interpolation exists the plate also
   collapses and the page closes over it.
 *
 * Redefining the keyframes rather than adding a second animation: two
 * animations on one element both writing opacity is a cascade question
 * nobody should have to answer. Outside the @supports the earlier definition
 * stands and the flash simply fades, which is the behaviour it had - a
 * `block-size: auto` to `0` step on an engine without the opt-in is discrete
 * and would collapse the plate in one frame, halfway through, while it is
 * still fully opaque. */
@supports (interpolate-size: allow-keywords) {
  .flash.transient { interpolate-size: allow-keywords; }

  @keyframes flash-recede {
    0%, 86% {
      opacity: 1;
      block-size: auto; margin-block-start: .5rem;
      padding-block: .6rem; border-block-width: 1px;
    }
    100% {
      opacity: 0; visibility: hidden;
      block-size: 0; margin-block-start: 0;
      padding-block: 0; border-block-width: 0;
    }
  }
}

/* A failed extraction must look deliberate, not like a blank bug. Worn by
   the card and by the Lectern, which have to agree. */
.ribbon {
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--warning); margin: .4rem 0 0;
}

/* Runes: what a treasure is about, at a glance. */
.card .runes { margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.rune {
  font-family: var(--font-ui); font-size: var(--step--2); font-weight: 500;
  padding: .12rem .45rem; border-radius: var(--rune-radius);
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
}
/* Was font-variant: small-caps inside a mono context. JetBrains Mono has no
   smcp table, so the browser synthesised them - scaled-down capitals with
   stems too light against the real ones, which is the faux small caps this
   project refuses by name. Real uppercase in the UI face instead. */
.rune-lang {
  font-family: var(--font-ui); font-size: var(--step--2);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 500;
  color: var(--foreground-dark);
}
/* Seeking is secondary to hoarding, so its field recedes. It used to do that
   by sitting at --background-dark while every other field sat a step lighter;
   controls.css now cuts all fields into the plate at that same value, so the
   seek field has to go one step further down to keep the difference. */
.drawbridge.seek input { background: var(--background-darker); }

/* The gate: register, sign in, recover. Deliberately plain - it is the one
   screen a stranger might see. */
.gate { margin-inline: auto; padding-block: 5rem 4rem; max-inline-size: 34rem; }
.gate h1 { font-size: var(--step-4); margin-block-end: .5rem; }
.muted { color: var(--muted); font-size: var(--step--1); }
.gate .status { color: var(--accent); min-height: 1.4em; }
.gate input { inline-size: 100%; }
/* A secret shown once, in a box you can select cleanly.
 *
 * The border, the padding and the text must not live on the same element.
 * A selection that spans more than one line is painted to the end of each
 * line box - the full content width - so putting the border on the text's
 * own element draws a bar edge to edge and squares off the rounded corners.
 * The plate carries the box; the text inside is only as wide as it needs to
 * be, so selecting the codes highlights the codes. */
.plate {
  background: var(--background-darker); border: var(--edge);
  border-radius: var(--radius); padding: 1rem; overflow-x: auto;
}
.plate pre {
  margin: 0; inline-size: max-content; max-inline-size: 100%;
  font-size: var(--step-0); line-height: 1.9; letter-spacing: .06em;
}
/* A key is one long unbroken string, so it wraps rather than shrink-wraps -
   but as an inline box, so the highlight still hugs the glyphs. */
.plate code { word-break: break-all; font-size: var(--step--1); line-height: 1.8; }


/* A page you read: the Lectern and Settings both sit on one. */
.page { margin-inline: auto; padding-block: 2rem 5rem; }
.prose .meta { color: var(--muted); font-size: var(--step--1); }

/* The Lectern's own title, sized for the one surface where the display face
   is at display size. `opsz` is named rather than left to
   font-optical-sizing, for the reason typography.css gives: the moment
   font-variation-settings appears, whether the automatic axis still applies
   is engine-dependent. */
.treasure .prose > h1 {
  --fraunces-opsz: 36;
  font-size: var(--step-4);
  letter-spacing: -0.015em;
  margin-block: 0 .6rem;
  color: var(--foreground-bright);
}

/* No drop cap here, and that is a decision rather than an omission.
   `initial-letter` sizes by cap height, and Fraunces' Č carries its caron
   24.3% of a cap height above it - so on a three-line cap that is half a line
   of ink overshooting into the margin above. Half this vault is Slovenian and
   `Če`, `Šele` and `Življenje` all start sentences. */

/* The filament: how far through the piece you are, drawn as the brass rule
   under the header filling with light.
 *
 * Scoped with :has() rather than a body class, because the condition really
 * is "this page contains a treasure" - the wall's masthead is the same
 * element and must not grow one. Scroll timeline again, so there is no
 * listener and no measurement on the main thread.
 *
 * Guarded on reduced motion for a subtler reason than usual: the global rule
 * in typography.css collapses a scroll timeline to `auto`, which lands a
 * progress bar at 100% and holds it there. A progress bar that is always full
 * is not reduced motion, it is a lie. Better to have none. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    body:has(.treasure) .masthead::before {
      content: ""; position: absolute;
      inset-block-end: 0; inset-inline-start: 0;
      block-size: 2px; inline-size: 100%;
      background: linear-gradient(90deg,
        color-mix(in oklab, var(--accent) 35%, transparent),
        var(--accent));
      box-shadow: 0 0 12px color-mix(in oklab, var(--accent) 45%, transparent);
      /* Scaling from the start edge, so the filament grows from where the
         reader's eye starts rather than from the middle outwards. */
      transform-origin: 0 50%;
      /* The resting state is EMPTY, and it has to be stated here rather than
         left to the keyframes. A scroll timeline on a page with nothing to
         scroll is inactive: the animation produces no effect at all, the
         underlying value shows through, and `transform: none` is a full bar.
         So every article short enough to fit on one screen drew a progress
         bar saying it had been read before it had been opened - which is
         also the first frame of every longer one. */
      transform: scaleX(0);
      animation: read-through linear both;
      animation-timeline: scroll(root block);
    }
  }
}
@keyframes read-through {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* The Ledger: keys, what they have opened, and when they last did. */
.ledger { inline-size: 100%; margin-block-start: 1rem; border-collapse: collapse; }
.ledger th {
  text-align: start; font-weight: 500; color: var(--muted);
  font-size: var(--step--1); padding-block-end: .4rem;
}
.ledger td { padding-block: .4rem; border-block-start: var(--edge); vertical-align: middle; }
.ledger tr.revoked { opacity: .45; }

/* A QR stays black on white whatever the theme is doing. A scanner wants
   contrast, and a brass-on-soot code is one nobody can read. */
.qr-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-block: 1rem 1.5rem; }
.qr { margin: 0; }
.qr-code {
  background: #fff; padding: .55rem;
  border-radius: var(--radius); border: var(--edge);
  inline-size: 9.5rem; block-size: 9.5rem;
}
.qr-code svg { inline-size: 100%; block-size: 100%; display: block; }
.qr figcaption {
  margin-block-start: .5rem; text-align: center;
  color: var(--muted); font-family: var(--font-mono); font-size: var(--step--1);
}

/* The card stopped being one big anchor when runes became links: an <a>
   inside an <a> is closed by the parser and the rest of the card falls out.
   The title's link stretches over the whole card instead, and the chips sit
   above it so they stay clickable. */
.card { position: relative; }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .rune { position: relative; z-index: 1; }
/* Unscoped, because a rune is a pill wherever it is drawn and the pill IS
   the affordance. Scoped to .card, the Lectern's runes inherited the prose
   underline and rendered with a line struck through the word inside its own
   chip - on screen, on a phone and on paper. */
.rune { text-decoration: none; }
.card .rune:hover {
  background: color-mix(in oklab, var(--accent) 28%, transparent);
  color: var(--foreground-bright);
}

/* On the item page a rune shows its other label beside it - the one place a
   wrong pairing is visible enough to get corrected. */
.prose .runes { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-block: .75rem; }
.rune-alt {
  font-family: var(--font-ui); font-size: var(--step--2);
  color: var(--muted); margin-inline-start: -.2rem;
}

/* An optional aside: present, clearly secondary, and closed until wanted. */
.aside {
  border-inline-start: 2px solid var(--edge-colour, color-mix(in oklab, var(--accent) 22%, transparent));
  padding-inline-start: 1.25rem; margin-block: 1.5rem;
}
.aside > summary {
  cursor: pointer; color: var(--accent);
  font-family: var(--font-ui); font-weight: 600;
  padding-block: .35rem;
}
.aside > summary::marker { color: var(--muted); }
.aside[open] > summary { margin-block-end: .75rem; }
.aside ol { line-height: var(--leading-read); }
.aside li { margin-block-end: .4rem; }

/* A QR is for pointing a phone at another screen. On the phone itself it is
   worse than useless - you cannot photograph the display in your hand - so
   the code hides and a tappable link takes its place. Pure CSS: no device
   sniffing, no JavaScript, and it follows the device rather than the guess. */
.on-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .on-screen, .qr-code { display: none; }
  .on-touch { display: block; }
  .qr figcaption { margin-block-start: 0; }
  a.on-touch { display: inline-flex; }
  .qr { text-align: center; }
}

/* ---- The swatches ------------------------------------------------------ */

/* A swatch is not a picture of a theme. It carries that theme's own
   `data-theme`, so every token inside it resolves to that theme's value - its
   background, its brass, its bevel, its corner radius. Ministry Grey's swatch
   has 3px corners and no glow because Ministry Grey says so in its own file,
   and nobody had to write that twice.
 *
 * Which also means the preview cannot lie. If a theme is added and its
 * derivation is wrong, it is wrong here, in the one place you are looking at
 * it on purpose. */
/* A grid rather than a wrapping flex row, because the picker lives inside
   .prose and .prose is 29.4em wide - four 8.5rem swatches do not fit, so the
   fourth wrapped onto a line of its own and the set stopped reading as one
   object. auto-fit shares whatever width there is: four across on a page,
   three on a phone, and always a full row. */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: .75rem;
  margin-block: 1rem 1.5rem;
}
.swatches form.button_to { display: block; }

.swatch {
  display: flex; flex-direction: column; align-items: stretch; gap: .5rem;
  inline-size: 100%;
  padding: .7rem;
  background: var(--background);
  color: var(--foreground);
  border: var(--edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--bevel), var(--contact);
  font-family: var(--font-ui); font-weight: 500; font-size: var(--step--1);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s;
}
.swatch:hover {
  background: var(--background);
  transform: translateY(-2px);
  box-shadow: var(--bevel-lit), var(--shadow-lifted);
}
.swatch:active { transform: translateY(0); box-shadow: var(--bevel), var(--contact); }
/* The ring is the swatch's OWN accent, which is the honest way to say "this
   is the one you are looking through right now". */
.swatch[aria-current="true"] {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* A card, three marks on it: the ink you read, the brass you press, and the
   grey everything secondary is written in. Those three decide how a theme
   feels far more than its background does. */
.swatch-plate {
  display: flex; align-items: center; gap: .4rem;
  block-size: 2.4rem; padding-inline: .55rem;
  background: var(--background-lighter);
  border: var(--edge); border-radius: var(--radius);
  box-shadow: var(--recess);
}
.swatch-plate > span { border-radius: var(--rune-radius); block-size: .85rem; }
.swatch-ink   { inline-size: 1.9rem; background: var(--foreground); }
.swatch-brass { inline-size: .85rem; background: var(--accent); }
.swatch-quiet { inline-size: .85rem; background: var(--muted); }

/* Balanced, because "Ljubljana Night" is two words in a 7rem column and a
   lone "Night" on the second line makes one swatch taller than its
   neighbours - which a grid then imposes on all four. */
.swatch-name { color: var(--foreground); text-align: start; text-wrap: balance; }

/* ---- Still arriving ---------------------------------------------------- */

/* The third non-negotiable: the row is written and the card appears first,
   and extraction follows as a job. Which means a card with no excerpt and no
   runes on it is the system keeping its promise - and if it does not SAY so,
   it reads instead as a capture that half worked. This is what a promise
   being kept looks like.
 *
 * The sweep is a translated bar rather than an animated background-position,
 * so it runs on the compositor: a burst of twenty captures from a Telegram
 * forward is twenty of these at once, and twenty repaints a frame is a
 * different thing from twenty transforms. */
.card.pending { overflow: hidden; }
.card.pending::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0;
  inline-size: 55%; pointer-events: none;
  background: linear-gradient(105deg,
    transparent,
    color-mix(in oklab, var(--accent) 15%, transparent),
    transparent);
  animation: forge-sweep 2.6s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes forge-sweep {
  from { transform: translate3d(-110%, 0, 0); }
  to   { transform: translate3d(290%, 0, 0); }
}

.brooding {
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--muted); margin: .4rem 0 0;
}

/* Three bars where the excerpt will be. Not a grey box: the lengths are
   uneven and the last one is short, because a paragraph ends mid-line and a
   skeleton that does not is read as a loading graphic rather than as text on
   its way. Widths in `ch` on purpose - this is standing in for prose, and the
   mono advance is the one place `ch` is exact. */
.skeleton {
  display: flex; flex-direction: column; gap: .42rem;
  margin: .55rem 0 .1rem;
}
/* Cut into the plate, not pasted onto it. Measured across nine rows, these
   bars were perfectly flat - no bevel, no contact, no grain - the only
   surface in the app the lighting model did not reach. They stand in for
   text that has not arrived, and text sits IN a page rather than on it. */
.skeleton span {
  block-size: .62rem; border-radius: 3px;
  background: color-mix(in oklab, var(--foreground) 9%, transparent);
  box-shadow:
    inset 1px 1px 2px rgb(0 0 0 / 0.22),
    inset -1px -1px 0 color-mix(in oklab, var(--accent) 10%, transparent);
}
.skeleton span:nth-child(1) { inline-size: 100%; }
.skeleton span:nth-child(2) { inline-size: 94%; }
.skeleton span:nth-child(3) { inline-size: 47%; }

/* ---- An empty hoard ---------------------------------------------------- */

/* The first screen anyone ever sees, and for a while the only one. It used to
   be two sentences in the middle of a very large dark rectangle.
 *
 * The six kinds, drawn faintly, are an empty case showing the shapes of the
 * things that go in it. Honest - each one is something the vault genuinely
 * takes - and each keeps its own kind colour, so the row doubles as the
 * legend for every card that will later sit here. */
.empty .case {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 1.4rem; margin-block-end: 2rem;
}
.empty .case .sigil-mark {
  inline-size: 2.1rem; block-size: 2.1rem;
  color: var(--card-edge, var(--muted));
}
/* Far quieter than on a card: this is a case, not a collection. The
   silhouette carries almost all of it and the line work is a whisper, which
   is the opposite balance to the working sigils and the reason the ratio was
   never allowed to be a constant. */
.empty .case .sigil-duo { opacity: .22; }
.empty .case .sigil-line { opacity: .45; }

.empty p { margin-block: 0 .75rem; }
.empty p:last-child { margin-block-end: 0; }

/* ---- An aside that opens, rather than appearing ------------------------ */

/* <details> has always been a jump cut: closed, then suddenly a page of
   content, with nothing connecting the two. Every smooth version of it on the
   web is JavaScript measuring scrollHeight and writing pixel values back -
   which is why every one of them breaks when the content reflows.
 *
 * ::details-content plus interpolate-size does it in CSS, with no measuring
 * and nothing to get stale. `block-size: auto` is a keyword and keywords do
 * not interpolate, which is the whole reason this was impossible until
 * recently; interpolate-size is the opt-in that makes them.
 *
 * Set on .aside rather than on :root deliberately. Turning keyword
 * interpolation on globally changes how EVERY transition to `auto` behaves,
 * including ones written before the opt-in existed, and a global switch that
 * retroactively alters unrelated rules is not a progressive enhancement. */
@supports (interpolate-size: allow-keywords) and selector(::details-content) {
  .aside { interpolate-size: allow-keywords; }
  .aside::details-content {
    block-size: 0;
    overflow: clip;
    /* content-visibility is a discrete property: without allow-discrete it
       flips at the start and the content is visible below a zero-height box
       for the whole 320ms. */
    transition:
      block-size .32s cubic-bezier(.2, .8, .2, 1),
      content-visibility .32s allow-discrete;
  }
  .aside[open]::details-content { block-size: auto; }
}

/* The dragon's voice arrives from under the header rather than appearing
   where it already is. @starting-style is the declarative half of the pattern
   everyone writes with a class and a requestAnimationFrame: it states what
   the element looked like the instant before it existed.
 *
 * No reduced-motion guard here, and that is correct rather than an oversight:
 * this is a transition, and the global rule in typography.css collapses
 * transition-duration to 0.01ms, which lands it in its resting position
 * immediately. The rules that DO need a guard are the ones the global rule
 * cannot reach - a scroll timeline, which has no duration, and an
 * auto-dismiss, which must not be instant. */
.flash { transition: translate .32s cubic-bezier(.2, .8, .2, 1); }
@starting-style {
  .flash { translate: 0 -0.7rem; }
}

/* ---- The forge cools --------------------------------------------------- */

/* The one frame in this product worth watching: a card that was still being
   read finishing, in front of you, without you having asked.
 *
 * It fires on `.arrived`, which the server sets on exactly one broadcast -
 * the one carrying a finished row - so it plays once, when the thing really
 * happened, and never again on a reload. That is the whole discipline here:
 * no interval, no fake progress, no animation that runs because a page was
 * loaded.
 *
 * The card's start edge is its kind. It comes off the forge white and cools
 * into being a video card, a pdf card, an article card. Failure gets the same
 * mechanism and the opposite physics: a degraded card never flares, it just
 * arrives cold - so which of the two happened is legible from across a room,
 * before anyone reads a word.
 *
 * No View Transition wrapping the stream render, deliberately. A root
 * cross-fade for every card update would flash the entire wall each time a
 * job finished; the card's own entrance is targeted, cheaper, and does not
 * touch the 199 cards that did not change. */
.card.arrived {
  /* `backwards`, NOT `both`.
   *
     `both` includes `forwards`, and a filled animation applies in the
     animation origin - which outranks every normal author declaration. So
     when forge-cool finished, its 100% frame kept `box-shadow: var(--bevel),
     var(--contact)` applied permanently and beat `.card:hover`. Nothing ever
     removes `.arrived` (it is set on one broadcast and never cleared), so
     the card that just finished in front of you became the one card on the
     wall that no longer answered a pointer: it still rose 3px, because
     `transform` is not in the keyframes, but with no shadow growing under
     it - which is the exact failure the comment on .card:hover names, "the
     plate itself appears not to move".
   *
     There is no delay, so `backwards` behaves identically at the start; and
     the 100% frame already equals the resting declared values, so releasing
     the fill changes nothing visible and hands hover back. */
  animation: forge-cool .52s cubic-bezier(.2, .8, .2, 1) backwards;
}
.card.arrived.degraded { animation: none; }

@keyframes forge-cool {
  0% {
    border-inline-start-color: var(--foreground-bright);
    box-shadow: var(--bevel-lit),
                0 0 20px color-mix(in oklab, var(--accent) 50%, transparent),
                var(--contact);
  }
  100% {
    border-inline-start-color: var(--card-edge, var(--muted));
    box-shadow: var(--bevel), var(--contact);
  }
}

/* Text arriving, rather than a box swapping. Scoped to `.arrived` on purpose:
   unscoped, @starting-style would run this on every card on every page load,
   which turns opening the wall into two hundred staggered fades and delays
   the one thing you came to do, which is read. */
.card.arrived .excerpt {
  transition: opacity .26s ease-out, translate .26s cubic-bezier(.2, .8, .2, 1);
}
@starting-style {
  .card.arrived .excerpt { opacity: 0; translate: 0 5px; }
}

/* The runes land in sequence. They genuinely arrived together - one call,
   one set - so this is not faked progress; it is a single arrival given a
   direction. Three brass pills striking a card in a row reads as a decision
   being made, where three appearing at once reads as a repaint. */
.card.arrived .rune {
  transition: opacity .3s ease-out, translate .3s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--rune-index, 0) * 70ms);
}
@starting-style {
  .card.arrived .rune { opacity: 0; translate: 0 6px; }
}

/* The amber closing.
 *
 * The second non-negotiable is that the archive is sacred, and the moment
 * that becomes true of a treasure - the frozen copy existing - was reported
 * by a word in the margin of the Lectern and by nothing whatsoever on the
 * wall. The most load-bearing promise in the vault happened off screen.
 *
 * So it is poured: a warm pane runs down the face over three quarters of a
 * second, the picture warms under it while it passes, and it clears. What is
 * left is the card exactly as it was - the seal is a fact about the archive,
 * not a badge the card wears for ever.
 *
 * `.arrived.sealed`, and both are required. `arrived` is true on the single
 * broadcast that carries a finished item, so this fires when the amber
 * actually closed; `sealed` is true whenever there is a copy. The wall is
 * full of sealed cards and only one of them just happened.
 *
 * ::before, because ::after below is the scrim - that one is structure, this
 * one is a beat. z-index puts the pour over the photograph rather than
 * under it; a positioned pseudo with no z-index would paint beneath an image
 * that is simply in flow. */
.card.arrived.sealed .face::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    color-mix(in oklab, var(--accent) 58%, transparent) 0%,
    color-mix(in oklab, var(--accent) 30%, transparent) 38%,
    color-mix(in oklab, var(--accent) 6%, transparent) 72%,
    transparent 100%);
  /* Resting invisible, and no fill on the animation - `.arrived` is set on
     one broadcast and never removed, so a filled animation would apply in
     the animation origin for the rest of the page's life and outrank every
     declaration under it. design_system_test.rb asserts this rule across the
     whole stylesheet, having watched forge-cool take a card's hover away. The
     pour ends at opacity 0 and the declaration below it says the same thing,
     so releasing the fill changes nothing. */
  opacity: 0;
  animation: amber-close .78s cubic-bezier(.32, .06, .2, 1);
}
@keyframes amber-close {
  0%   { translate: 0 -110%; opacity: 0; }
  18%  { opacity: 1; }
  74%  { translate: 0 0; opacity: .9; }
  100% { translate: 0 0; opacity: 0; }
}

/* The picture warms while the pour passes over it and cools back to the
   wall's resting treatment. No fill: the resting `filter` on .face img is a
   declaration, and a filled animation would outrank it - the card that just
   sealed would be the one card whose face never brightens under a pointer
   again. The same lesson forge-cool learned the hard way, one rule up. */
.card.arrived.sealed .face img { animation: amber-warm .78s cubic-bezier(.32, .06, .2, 1); }
@keyframes amber-warm {
  0%   { filter: saturate(.72) brightness(.66) contrast(1.06) sepia(.14); }
  46%  { filter: saturate(1.04) brightness(.92) contrast(1.04) sepia(.3); }
  100% { filter: saturate(.72) brightness(.66) contrast(1.06) sepia(.14); }
}

/* ---- The Lectern's furniture ------------------------------------------- */

/* A 470px column of text at x=441 in a 1440px viewport, with 440px of nothing
   on either side and 600px of nothing below it. The measure is right - that
   is the whole argument of typography.css - but a measure is a constraint on
   the LINE, not an instruction to leave the rest of the page empty.
 *
   So the margin gets an apparatus: kind, source, capture date, state, runes
   and the two acts you can perform on the thing, set small in mono and
   right-aligned against the text block like a nameplate beside a plate. It
   is the same markup at every width; below 72rem it simply stays in flow,
   above the body, which is where a phone wants it anyway.
 *
   When the kin rail from docs/PLAN.md arrives it goes here, in a Turbo
   Frame, and this column is already the right width for it. */
@media (min-width: 72rem) {
  .treasure {
    display: grid;
    /* Two children, two columns, ONE row. The first attempt gave the article
       a column each and asked the furniture to span `1 / -1`, which does not
       do what it reads as: with no explicit rows, -1 resolves to the end of
       the EXPLICIT grid, which is line 1, so the span collapsed to a single
       row and that row then had to be tall enough for the whole nameplate -
       leaving 200px of nothing under the title.
     *
       minmax(0, ...) on the text track rather than the bare measure: a track
       sized from content refuses to shrink below it, and one unbreakable URL
       would otherwise push the column wider than the measure it is named
       after. */
    grid-template-columns: 15rem minmax(0, var(--measure-reading));
    column-gap: 3rem;
    /* The pair is centred, not the text alone - otherwise adding a margin
       column would shove the prose off to the right of where it has always
       been. */
    justify-content: center;
    align-items: start;
  }

  /* DOM order is READING order: the title comes first, everywhere. It used
     to be the other way round because the furniture is visual column 1 - and
     below this breakpoint the grid drops, DOM order becomes reading order,
     and a phone read `shortcut / September 20 / enriching / Shelve / Burn`
     and only then the name of the thing. An irreversible act above the name
     of what it destroys, on the device this vault is used from most. The
     `turbo_confirm` catches the consequence; it does not excuse the
     composition.
   *
     So the text is first in the document and the columns are stated here. */
  .treasure > .prose { grid-column: 2; grid-row: 1; }
  .treasure > .furniture {
    grid-column: 1; grid-row: 1;
    text-align: end;
    /* The nameplate's first line sits on the title's.
       Measured with a zero-size inline-block, which lands on the baseline of
       the line box it joins. A Range rect gives you the line box instead,
       and that is a different number for every font size - which is how this
       passed inspection while reading crooked on the page. The 13px meta
       baseline came in 10.2px above the 36px title's. Stated in rem so it
       tracks the type scale, which is rem all the way down. */
    margin-block-start: .64rem;
    /* NOT sticky, and that is a reversal. "A nameplate that scrolls away is
       a caption" argues for the plate - but this plate carries Burn, and a
       destructive control pinned to the viewport for the length of a long
       read is a hazard that follows you. When the kin rail arrives it can be
       sticky on its own; the acts cannot. */
  }
  /* One rune per line, its other label directly beneath it. Laid out in a
     row, a bilingual pair in a 13rem column wraps mid-pair - "statistika
     statistics regulacije control" then "theory" on its own - and the
     provenance surface stops showing which label belongs to which rune,
     which is the entire reason both are drawn. */
  .treasure > .furniture .runes {
    /* display:flex explicitly. `.prose .runes` used to supply it, and the
       furniture is a SIBLING of .prose now rather than a child - so the
       direction and alignment below were being set on a block box and doing
       precisely nothing. */
    display: flex;
    flex-direction: column; align-items: flex-end; gap: .15rem;
  }
  .treasure > .furniture .rune-alt { margin-inline-start: 0; margin-block-end: .45rem; }
  .treasure > .furniture .row { justify-content: flex-end; }
  /* Two acts, stacked: at 13rem they would wrap mid-row, and a Burn button
     that has wrapped under its own Shelve reads as an afterthought rather
     than as the other half of a pair. */
  .treasure > .furniture .row { flex-direction: column; align-items: flex-end; }
}

/* Below the grid breakpoint the furniture is a block AFTER the body, and it
   had nothing whatever between it and the last paragraph. Measured on a
   390px phone: 0px of gap, no rule, no margin, and a box exactly as wide as
   the column of text above it - so the state of the thing and the button
   that destroys it simply continued the article in a smaller face.
 *
   A nameplate in the margin is separated by being in the margin. Once it
   drops into the flow it has to say so itself, which is a rule and some air.
   The hairline is `var(--edge)` rather than a colour because print.css
   redefines that token to 1px #999 - so the same rule is what prints, on the
   surface where a nameplate running into the body is worst. */
@media (max-width: 71.999rem) {
  .treasure > .furniture {
    max-inline-size: var(--measure);
    margin-block-start: 2rlh;
    padding-block-start: 1rlh;
    border-block-start: var(--edge);
  }
}

/* Below the grid breakpoint the furniture is just a block above the body, so
   it needs the row behaviour .prose used to lend it. */
.furniture .runes { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
/* `.prose .meta` used to supply this size. The furniture is a sibling of
   .prose now, so it inherited the root 16px instead of --step--1 - and at
   16px JetBrains Mono, "September 20, 2026 18:28" is 230px against a 208px
   column, so the time wrapped onto a line of its own with 380px of empty
   margin beside it. The same orphaning that silently took `display: flex`
   off the runes. */
.furniture .meta {
  font-size: var(--step--1);
  line-height: 1.7;
  color: var(--muted);
}
/* Four unrelated facts - channel, date, time, state - were set identically.
   The date is the one you scan for; the channel and the state are labels. */
.furniture .meta time { color: var(--foreground-dark); }
.furniture > * + * { margin-block-start: .9rlh; }

/* ---- Settings, in the same margin ------------------------------------- */

/* The Lectern put the nameplate in the margin and kept the measure for the
   text. Settings had the measure and nothing else: five headings sitting on
   top of their own content in one centred column, with 400px of empty either
   side of it - the same room the Lectern had already found a use for. Two
   long pages in one app, laid out to two different ideas.
 *
   So a section is a leaf, its heading is the nameplate, and the grid is the
   Lectern's grid: same 15rem margin, same 3rem gutter, same
   `minmax(0, var(--measure-reading))`, stated the same way. They are the same
   apparatus and they should be spelled the same, so that changing one is
   visibly a decision about both. */
.settings > .leaf + .leaf { margin-block-start: 2.6rlh; }

@media (min-width: 72rem) {
  /* The nameplate-and-measure shape, shared. It was written for settings,
     the Lectern already had its own copy of the same idea, and the Hourglass
     is the third surface that is a heading in the margin beside a column of
     text. A fourth would be the argument for a class rather than a list. */
  .settings .leaf, .hourglass .leaf, .ask .leaf {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--measure-reading));
    column-gap: 3rem;
    justify-content: center;
    align-items: start;
  }
  .settings .leaf > h2, .hourglass .leaf > h2, .ask .leaf > h2 {
    grid-column: 1; grid-row: 1;
    text-align: end;
    /* The heading's baseline on the first paragraph's, measured the same way
       as the Lectern's nameplate - a zero-size inline-block, which sits on
       the baseline rather than on the line box. Without it a 23px heading
       and a 19px paragraph start at the same TOP, which puts the heading
       about four pixels high and reads as a misalignment nobody can name. */
    margin-block-start: .43rem;
  }
  .settings .leaf > .prose, .hourglass .leaf > .prose, .ask .leaf > .prose { grid-column: 2; grid-row: 1; }
}

/* Below the breakpoint the grid drops and the leaf is a heading above its
   own text, which is what it always was - but the heading now lives outside
   `.prose`, so the spacing `.prose :is(h2, h3)` used to lend it has to be
   stated. */
@media (max-width: 71.999rem) {
  .settings .leaf > h2, .hourglass .leaf > h2, .ask .leaf > h2 { margin-block-end: .5rlh; }
}

/* ---- Thrown ------------------------------------------------------------ */

/* The first beat of the loop, and the one that was missing.
 *
 * A capture was narrated ("fetching the page") and a capture was resolved
 * (the forge cooling). What had no physics at all was the capture itself -
 * the highest-frequency interaction in the whole product, in the tab the
 * user is actually looking at: you type, you press Hoard, the text vanishes,
 * and a card is simply there. Every other transition in this app has a
 * paragraph behind it; that one was a form submit.
 *
 * So the card is thrown. It falls from where the drawbridge is, into the
 * pile - `translate` rather than `transform` for the same reason the entrance
 * gives, and a hair of `scale` because a thing arriving from further away is
 * smaller before it lands.
 *
 * No reduced-motion guard, and that is deliberate for the same reason the
 * flash's arrival has none: this is a transition, and the global rule in
 * typography.css collapses transition-duration, which lands the card exactly
 * where it belongs with no motion at all. */
.card.cast {
  transition:
    opacity .42s ease-out,
    translate .42s cubic-bezier(.2, .8, .2, 1),
    scale .42s cubic-bezier(.2, .8, .2, 1);
}
@starting-style {
  .card.cast { opacity: 0; translate: 0 -2.6rem; scale: .97; }
}

/* And it lands hot.
 *
 * The fall was already here and it was the whole of the event: a card slid
 * 2.6rem and stopped. What was missing is the contact - the instant where
 * the thing you threw hits the wall and the wall answers. So the plate
 * arrives bright-edged and cools into being a link, an article, a video,
 * over the same 420ms as the fall, which is the grammar the rest of the loop
 * already speaks: brass goes bright when something happens, and cools into
 * what the thing is.
 *
 * `backwards`, never `forwards`. A filled animation applies in the animation
 * origin and outranks every author declaration under it - that is what once
 * cost a finished card its hover, and the note on forge-cool is the long
 * version. */
.card.cast { animation: strike .46s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes strike {
  0% {
    border-inline-start-color: var(--foreground-bright);
    box-shadow: var(--bevel-lit),
                0 0 26px color-mix(in oklab, var(--card-glow, var(--accent)) 55%, transparent),
                var(--contact);
  }
}

/* And the door it came through cools behind it, running the forge-cool
   language in reverse on the field you typed into: bright at the instant of
   the throw, back to its resting brass over the same 420ms. The whole loop
   then shares one grammar - brass goes bright when something happens, and
   cools into what the thing is.
 *
   `backwards`, never `forwards`: a filled animation applies in the animation
   origin and would outrank :focus-visible on the field for the rest of the
   session. That lesson cost a card its hover. */
.drawbridge.cast input:not([type="submit"]) {
  animation: door-cool .42s cubic-bezier(.2, .8, .2, 1) backwards;
}
@keyframes door-cool {
  from {
    border-color: var(--foreground-bright);
    box-shadow:
      var(--recess),
      0 0 22px color-mix(in oklab, var(--accent) 55%, transparent);
  }
}

/* The gate's wordmark. Small and above the sentence, the way a letterhead
   sits above a letter - the gate is a door, not a landing page, and the name
   on it is a plate rather than a banner. */
.gate .wordmark {
  font-family: var(--font-display); --fraunces-opsz: 19;
  font-variation-settings: "opsz" var(--fraunces-opsz), "SOFT" 60, "WONK" 1;
  font-size: var(--step-1); font-weight: 600;
  color: var(--accent);
  letter-spacing: .01em;
  margin-block-end: .4rlh;
}

/* On screen the masthead already says it, three lines above. */
.letterhead { display: none; }

/* ---- The mark ---------------------------------------------------------- */

/* Struck metal, lit by the same source as everything else: the ring catches
   the rim, the field is a recess behind it, and the ward is solid. The three
   parts are separate classes so a surface can tune the ratio - a mark beside
   a masthead wants less contrast than one alone on a locked door. */
.mark {
  inline-size: var(--mark-size, 1.6em);
  block-size: var(--mark-size, 1.6em);
  flex: none;
  color: var(--accent);
  overflow: visible;
}
.mark-field { fill: currentColor; opacity: .1; }
/* The milled rim. 24 teeth, struck by a dash pattern against the 240 units
   mark_helper.rb renormalises the circumference to - see there for why that
   attribute is load-bearing rather than decorative.

   `butt` caps, deliberately: `round` adds half the stroke width to each end
   of every tooth, which at this weight closes all 24 gaps into a solid ring
   and throws the whole reeding away. (This said 44 for a while, five lines
   under a sentence that said 28 - left over from a previous cut, in a file
   whose whole discipline is that the comments are true.) */
.mark-ring {
  fill: none; stroke: currentColor; stroke-width: 15; opacity: .85;
  stroke-dasharray: 5 5;
  stroke-linecap: butt;
}
.mark-charge { fill: currentColor; }

/* On the masthead it stands beside the name, at the cap height of the word
   it belongs to rather than at the line height of the row. */
/* The anchor too, not only the h1. reset.css makes every svg a block - the
   sigils need that or they sit on the text baseline with a descender-sized
   gap under each one - so inside the item page's `<h1><a>mark + name</a></h1>`
   the mark became a block and pushed the name onto a second line. The wall's
   h1 has no anchor, which is why it looked right there and wrong one page
   over. */
.masthead h1,
.masthead h1 a {
  display: flex; align-items: center; gap: .55rem;
}
.masthead .mark { --mark-size: 1.05em; }
/* .6 when the rim was a solid stroke. A reeded one puts less ink on the
   same circle - 28 teeth with equal gaps is half the pixels - so the same
   opacity that read as quiet read as absent at 1.05em. */
.masthead .mark-ring { opacity: .8; }
.masthead .mark-field { opacity: .07; }

/* On the gate it is the first thing on the screen, above the name, at the
   size a seal is pressed. */
.gate .mark { --mark-size: 3.2rem; display: block; margin-block-end: .9rem; }

/* And in an empty case it anchors the six kinds rather than leaving them
   floating in the middle of a very large dark rectangle. */
.empty .mark { --mark-size: 2.6rem; display: block; margin: 0 auto 1.6rem; opacity: .55; }

/* ---- A pulse at rest ---------------------------------------------------- */

/* Everything else that moves here moves because you moved: you hover, it
   lifts; you scroll, the header settles; you capture, a card is thrown and
   then finishes. Take your hand off the mouse and the room is a photograph
   with embers in it.
 *
 * This is the one thing that moves because the MACHINE is doing something. A
 * bright node travels the brass rule under the masthead while there is work
 * outstanding, and stops when there is not.
 *
 * It is a real queue-depth indicator, not a decoration: the selector matches
 * if and only if a card on this page is genuinely mid-extraction. When the
 * last job finishes the selector stops matching and the node goes. Nothing
 * anywhere fakes activity - which is the whole reason it is allowed to exist.
 *
 * Both surfaces where that state is true. `.card.pending` is the wall;
 * `.treasure.pending` is the Lectern, where you are most likely to be sitting
 * and waiting for it, and where the machine used to fall silent while the
 * nameplate beside you said `enriching`.
 *
 * It is its own pseudo-element and it TRANSLATES.
 *
 * The first version animated `background-position` on a second background
 * layer of `.masthead::after` - a 1400px-wide element, repainting every frame,
 * `infinite`, during exactly the window when the main thread is also
 * rendering Turbo Stream card updates. atmosphere.css spends a paragraph
 * saying not to do that, four files away, and I did it anyway. A rule you
 * wrote down and then broke is worth more as a caught mistake than as a
 * comment nobody tested. */
@media (prefers-reduced-motion: no-preference) {
  body:has(.card.pending, .treasure.pending) .masthead .queue-node {
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    inline-size: 14%;
    block-size: 1px;
    background: linear-gradient(90deg,
      transparent,
      color-mix(in oklab, var(--foreground-bright) 85%, transparent) 50%,
      transparent);
    will-change: transform;
    animation: queue-node 3.4s linear infinite;
  }
}
/* The dial stills it with everything else. */
:root[data-motion="still"] .masthead .queue-node { animation: none; }

@keyframes queue-node {
  from { transform: translate3d(-100%, 0, 0); }
  to   { transform: translate3d(715%, 0, 0); }
}

/* ---- The Face of the Item ----------------------------------------------
 *
 * Until this existed the wall was a list of sentences ABOUT pages, and the
 * only pictures on it were six kind sigils - so a screenshot, a chart, a
 * scanned Uradni list and an essay all arrived as the same rectangle of
 * text. A hoard you cannot recognise at a glance is a database with a serif
 * font.
 *
 * The image is the frozen copy (Extractors::Amber), not a fetch: what you see
 * is what the vault kept, which is also the only honest thing to show. If the
 * page is gone tomorrow the card looks exactly the same.
 */
.card .face {
  /* Out to the plate's edges. A framed image inside the padding is a picture
     hanging on the card; bleeding it makes the card BE the page. */
  margin: -.9rem -1rem .7rem;
  border-start-start-radius: calc(var(--radius-lg) - 1px);
  border-start-end-radius: calc(var(--radius-lg) - 1px);
  overflow: hidden; position: relative;
  /* A fixed depth, NOT an aspect ratio, and the difference is not cosmetic.
     `aspect-ratio: 16/7` with `max-block-size` looks like it caps the height
     and leaves the width alone; it does the opposite. When a max constraint
     bites, the ratio recomputes the OTHER axis - so the face stopped 110px
     short of the card's right edge and the bleed turned into a gutter.

     A window has a depth. The card's width is whatever the column gives it,
     the image covers, and the two never argue. 200px because at two columns
     the ratio gave 297px, which is more picture than the title, the claim,
     the runes and the excerpt put together. */
  block-size: 200px;
  background: var(--background-darker);
  /* The plate's own top edge catches the light; the face sits under it, so
     it gets the shadowed side of that same edge rather than a second
     highlight. */
  box-shadow: inset 0 -1px 0 color-mix(in oklab, var(--background-darker) 60%, transparent);
}
.card .face img {
  inline-size: 100%; block-size: 100%; display: block;
  object-fit: cover; object-position: top center;
  /* A dark room with lit windows in it.
   *
   * A screenshot of the modern web is a white rectangle, and a dozen of them
   * on a soot-coloured wall is a lightbox, not a hoard - the brightest thing
   * on the screen would be the thing you are not reading. Resting, the face
   * is dimmed and warmed until it sits at about the value of the brass around
   * it; under a pointer it comes up to its real colour, because THEN it is
   * the thing you are looking at. The wall stays dark and the attention is
   * where the cursor is. */
  filter: saturate(.72) brightness(.66) contrast(1.06) sepia(.14);
  transition: filter .3s cubic-bezier(.2,.8,.2,1), transform .5s cubic-bezier(.2,.8,.2,1);
}
/* The scrim: the bottom of the image dissolves into the plate it is lying on,
   so the title below reads as continuing out of the page rather than as a
   caption stuck under a picture. */
.card .face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom,
    color-mix(in oklab, var(--background-darker) 30%, transparent) 0%,
    transparent 30%,
    color-mix(in oklab, var(--background-lighter) 72%, transparent) 88%,
    var(--background-lighter) 100%);
}
.card:hover .face img, .card:focus-within .face img {
  filter: saturate(.98) brightness(.99) contrast(1.02) sepia(0);
  /* A whisper of a push-in. Enough that the window feels like it has depth
     behind it, not enough to be a Ken Burns effect on a bookmark. */
  transform: scale(1.018);
}
/* The head gradient is the kind colour bleeding across the top of a card with
   nothing else there. A faced card has something else there. */
.card:has(.face)::before { display: none; }
/* Nor does it need a maker's mark: the device exists to give a text-only card
   an object to be, and a card showing the page itself already is one.
   Written at the density rule's own specificity, because that is what turns
   the device on - a plain `.card:has(.face) .device` loses to it and the
   sigil went on being stamped into the corner of the photograph. */
.wall:not(:has(> .card:nth-child(7))) > .card:has(.face) .device { display: none; }

/* The toast stack.
 *
 * The plate itself is unchanged - same .flash, same six-second filament, same
 * undo - and what moved is where it lives once there is more than one of it.
 * That is a real change to a documented decision: the flash used to be
 * rendered inline, "offered where the action happened rather than filed to be
 * found", which is the better argument for one plate and the wrong one for
 * three. In the Furnace `s`, `s`, `s` takes two seconds, and inline meant the
 * first two undos were gone before their own windows had run.
 *
 * Bottom and to the start edge, away from the drawbridge at the top and the
 * ways out at the bottom right of the Furnace - a toast that lands under the
 * cursor of the key you are about to press again is a toast you dismiss by
 * accident. */
#toast-stack {
  position: fixed;
  z-index: 40;
  inset-block-end: 1rem; inset-inline-start: 1rem;
  display: flex; flex-direction: column-reverse; gap: .5rem;
  inline-size: min(30rem, calc(100vw - 2rem));
  pointer-events: none;
}
#toast-stack:empty { display: none; }
#toast-stack .flash {
  pointer-events: auto;
  margin: 0;
  touch-action: pan-y;
  box-shadow: var(--bevel), 0 1rem 2.5rem -1rem rgb(0 0 0 / .55);
  transition: translate .22s cubic-bezier(.2, .8, .2, 1), opacity .22s ease-out;
}
/* Arriving from the edge it will leave by. @starting-style rather than an
   animation so a dismissal mid-entrance interrupts it instead of queueing. */
@starting-style {
  #toast-stack .flash { translate: -1.5rem 0; opacity: 0; }
}
#toast-stack .flash.closing { translate: -110% 0; opacity: 0; }
.toast-close {
  margin-inline-start: auto;
  background: none; border: 0; padding: 0 .1rem;
  color: var(--muted); cursor: pointer;
  font-size: var(--step--1); line-height: 1;
  min-block-size: 0;
}
.toast-close:hover { color: var(--foreground); }

/* The sky: the Constellation's island.
 *
 * `touch-action: none` is the whole of the pinch. Without it the browser
 * claims two fingers for page zoom before a single pointermove reaches the
 * canvas, and the gesture that justifies building an island at all belongs
 * to the platform instead. */
.sky-frame {
  position: relative;
  margin-block: 1rem 1.4rem;
  border: var(--edge); border-radius: var(--radius-lg);
  background: linear-gradient(var(--background-darker), var(--background));
  box-shadow: var(--recess);
  overflow: hidden;
}
.sky-canvas {
  display: block;
  inline-size: 100%;
  block-size: min(62vh, 560px);
  touch-action: none;
  cursor: grab;
}
.sky-canvas:active { cursor: grabbing; }
.sky-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sky-legend, .sky-hint {
  position: absolute; margin: 0;
  font-size: var(--step--2); color: var(--muted);
  pointer-events: none;
}
.sky-legend { inset-block-start: .7rem; inset-inline-start: .9rem; color: var(--foreground-dark); }
.sky-hint { inset-block-end: .7rem; inset-inline-start: .9rem; }
@media (max-width: 40rem) {
  .sky-canvas { block-size: 54vh; }
  /* Two lines of instructions over a small sky is mostly instructions. */
  .sky-hint { display: none; }
}

/* The dragon, as an eye. See app/helpers/dragon_helper.rb for why it is an
   eye and not a creature: four attempts at a whole dragon proved the mark's
   own argument, which is that at the sizes this is used a creature becomes a
   smudge. Drawn in the sigils' language - duotone, currentColor, inline. */
.dragon {
  display: block; margin-inline: auto;
  inline-size: 5.2rem; block-size: 5.2rem;
  color: var(--accent);
}
.dragon-duo { fill: currentColor; opacity: .16; }
.dragon-solid { fill: currentColor; }
.dragon-line, .dragon-thin {
  fill: none; stroke: currentColor;
  stroke-linecap: round; stroke-linejoin: round;
}
.dragon-line { stroke-width: 9; }
.dragon-thin { stroke-width: 6; }

/* A sleeping thing breathes. Six and a half seconds is a resting breath for
   something this size, and 3.5% is under the threshold where it reads as a
   pulse - you notice it only if you stay on the empty screen long enough to
   wonder whether anything is alive in here, which is exactly when it should
   answer. transform-origin low, because a breath lifts the back and not the
   jaw. */
@media (prefers-reduced-motion: no-preference) {
  .dragon-asleep { animation: dragon-breath 6.5s ease-in-out infinite; transform-origin: 50% 72%; }
}
@keyframes dragon-breath { 50% { scale: 1.035; } }

/* The light the page casts.
 *
 * docs/PLAN.md asked for a dominant-colour edge. The edge is already spoken
 * for - it carries KIND, which is categorical, and wall.css argues above why
 * that must not move. So the page's own colour goes where a colour with no
 * fixed vocabulary belongs: in the light. Touch a card and it glows with the
 * colour the page is actually made of - Rails red, RTVSLO orange - which is
 * recognition rather than classification, and nothing is lost if you cannot
 * see it. */
.card:hover, .card:focus-within {
  box-shadow: var(--bevel-lit), var(--shadow-lifted),
              0 0 0 1px color-mix(in oklab, var(--card-glow, var(--accent)) 26%, transparent),
              0 1.2rem 3rem -1.2rem color-mix(in oklab, var(--card-glow, var(--accent)) 30%, transparent);
}

/* Density. The wall's three densities are one continuum (docs/PLAN.md), and
   the face is the part of a card that should give way first: at seven cards
   you are scanning, and a scan wants more titles per screen, not bigger
   pictures. */
.wall:has(> .card:nth-child(7)) .face { block-size: 124px; }
.wall:not(:has(> .card:nth-child(7))) > .card.lede .face { block-size: 280px; }
/* A phone column is 358px wide; 200px of picture on it is half the screen. */
@media (max-width: 40rem) {
  .card .face { block-size: 148px; }
  .wall:not(:has(> .card:nth-child(7))) > .card.lede .face { block-size: 190px; }
}

/* The Restraint Dial and the system setting both reach this. A face that
   grows under the pointer is exactly the kind of motion somebody turns off. */
@media (prefers-reduced-motion: reduce) {
  .card .face img { transition: filter .3s; }
  .card:hover .face img, .card:focus-within .face img { transform: none; }
}
/* The Restraint Dial reaches this too. Its rule blankets transition-duration,
   which leaves the hover transform arriving as a jump - and an instant cut is
   what the dial asked for everywhere except where the cut is the motion. */
:root[data-motion="still"] .card:hover .face img,
:root[data-motion="still"] .card:focus-within .face img { transform: none; }

/* ---- The Lectern's plate -----------------------------------------------
 *
 * The reading page opened with a title and then several hundred pixels of
 * brown, because everything it had to show was three lines of excerpt. The
 * frozen copy was there the whole time and nothing looked at it.
 *
 * Full width of the pair - furniture column plus text column - so it reads
 * as the opening spread of the item rather than as an illustration dropped
 * into the margin. */
.plate {
  margin: 0 auto 2rem; max-inline-size: var(--measure-reading);
  border-radius: var(--radius-lg); overflow: hidden;
  border: var(--edge);
  border-block-start-color: color-mix(in oklab, var(--accent) 30%, transparent);
  box-shadow: var(--bevel), var(--contact);
  background: var(--background-darker);
  position: relative;
}
@media (min-width: 72rem) {
  /* The same total width the .treasure grid occupies: the furniture column,
     the gap, and the measure. Stated from the same values so the two cannot
     drift apart. */
  .plate { max-inline-size: calc(15rem + 3rem + var(--measure-reading)); }
}
.plate img {
  inline-size: 100%; block-size: auto; display: block;
  /* Lifted from the wall's resting dim, but not all the way. On the Lectern
     you have already chosen this one, so it is not competing with eleven
     others - it is still a lit window in a dark room, just nearer. */
  filter: saturate(.86) brightness(.80) contrast(1.04) sepia(.07);
}
/* Not a clickable thumbnail. The link to the frozen page is in the
   furniture, where it is named - an image that silently opens something is
   the kind of control this app does not have anywhere else. */
.plate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom,
    transparent 70%, color-mix(in oklab, var(--background-darker) 45%, transparent) 100%);
}

/* The seal statement. Quiet, in the furniture, in the mono face the rest of
   the nameplate uses - it is a fact about the archive, not a claim about the
   treasure. */
.seal { color: var(--muted); font-size: var(--step--2); margin-block-start: .9rem; }
.seal a { color: var(--accent); text-underline-offset: .2em; }

/* ---- The kin rail ------------------------------------------------------
 *
 * Five treasures beside the one you are reading, each with the reason it is
 * there. docs/PLAN.md killed the standalone graph view as "a screensaver
 * pretending to be navigation"; this is the half that survived, and the
 * reason under each tile is what makes it navigation - you can see the
 * guess and its grounds at once, and dismiss it yourself.
 */
.kin {
  margin: 3rem auto 0; max-inline-size: var(--measure-reading);
  border-block-start: var(--edge); padding-block-start: 1.5rem;
}
@media (min-width: 72rem) {
  /* The same total width as the .treasure grid and the plate. */
  .kin { max-inline-size: calc(15rem + 3rem + var(--measure-reading)); }
}
.kin h2 {
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 400;
  text-transform: lowercase; letter-spacing: .12em;
  color: var(--muted); margin: 0 0 1rem;
}
.kin ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  /* Wrapping, not scrolling. A horizontal rail on a phone hides items behind
     a gesture, and five is few enough to show all of them. */
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}
.kin li { min-inline-size: 0; }
.kin a { display: block; text-decoration: none; color: inherit; }
.kin-face {
  display: block; block-size: 5.5rem; overflow: hidden;
  border-radius: var(--radius); border: var(--edge);
  border-inline-start: 2px solid var(--card-edge, var(--muted));
  background: var(--background-darker);
  margin-block-end: .5rem;
  box-shadow: var(--contact);
}
.kin-face img {
  inline-size: 100%; block-size: 100%; display: block;
  object-fit: cover; object-position: top center;
  filter: saturate(.7) brightness(.62) contrast(1.06) sepia(.16);
  transition: filter .3s cubic-bezier(.2,.8,.2,1);
}
.kin a:hover .kin-face img, .kin a:focus-visible .kin-face img {
  filter: saturate(.95) brightness(.94) contrast(1.02) sepia(0);
}
.kin-title {
  display: block; font-family: var(--font-reading); font-size: var(--step--1);
  line-height: var(--leading-tight); text-wrap: balance;
  /* Two lines and then stop. A rail whose tiles are different heights
     because one title is long is a rail that looks broken. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.kin a:hover .kin-title, .kin a:focus-visible .kin-title { color: var(--accent); }
/* The reason, in the same voice and the same class the wall uses for its one
   editorial claim - because that is what this is. */
.kin .verdict { margin: .35rem 0 0; }

/* ---- The Video Room ----------------------------------------------------
 *
 * docs/PLAN.md's highest-scoring feature: the video, and every word of it
 * with the moment it was said attached.
 *
 * Two columns on a desk, because the point of the room is that the two are
 * side by side - a transcript under a player is a transcript you scroll away
 * from the thing it belongs to. One column on a phone, where side by side
 * would give each half about 170px.
 */
.room {
  margin: 0 auto 2rem; max-inline-size: var(--measure-reading);
  display: grid; gap: 1.25rem;
}
@media (min-width: 72rem) {
  .room {
    max-inline-size: calc(15rem + 3rem + var(--measure-reading));
    /* The stage takes the room it needs for 16:9 and the transcript takes
       the rest. Not 1fr 1fr: a transcript is a column of short lines and
       does not want half a desk. */
    grid-template-columns: minmax(0, 1.6fr) minmax(14rem, 1fr);
    align-items: start;
  }
}

.room .stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg); border: var(--edge);
  border-block-start-color: color-mix(in oklab, var(--accent) 30%, transparent);
  box-shadow: var(--bevel), var(--contact);
  background: var(--background-darker);
}
.room .stage img, .room .stage iframe {
  inline-size: 100%; block-size: 100%; display: block; border: 0;
}
.room .stage img { object-fit: cover; filter: saturate(.8) brightness(.62) contrast(1.05); }

/* The play control, which is also the thing that says "nothing has been
   loaded from YouTube yet". It is brass, like every other control that
   commits you to something. */
.room .play {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; padding: 0;
  transition: background .25s;
}
.room .play:hover, .room .play:focus-visible {
  background: color-mix(in oklab, var(--background-darker) 30%, transparent);
  outline: none;
}
.room .play-mark {
  inline-size: 4.5rem; block-size: 4.5rem; border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 88%, var(--background-darker));
  box-shadow: var(--bevel), 0 1rem 2.5rem -0.8rem color-mix(in oklab, var(--accent) 45%, transparent);
  display: grid; place-items: center;
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
/* The triangle, drawn rather than set: a glyph is whatever the font happens
   to carry, and on a machine with no emoji font the one control that starts
   the video is a hollow rectangle. Same argument as the flame on Burn. */
.room .play-mark::after {
  content: ""; inline-size: 0; block-size: 0;
  border-inline-start: 1.35rem solid var(--background-darker);
  border-block: .85rem solid transparent;
  margin-inline-start: .35rem;
}
.room .play:hover .play-mark, .room .play:focus-visible .play-mark { transform: scale(1.06); }
.room .play:focus-visible .play-mark { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Two reasons a transcript line ran off the side of the page, and only the
   second one was the actual cause.
 *
   A grid item's `min-width` is `auto` - "no smaller than my content" - so a
   column of long lines can push past its own track while the TRACK stays
   exactly the width it was told to be. True, worth fixing, and not what was
   happening: the track was right and the text inside it was one unbroken
   line per cue.
 *
   `controls.css` gives every <button> `white-space: nowrap`, which is
   correct for every button this app had until now - a label that wraps is a
   control that has stopped looking like one. A transcript line is a button
   because pressing it moves a player rather than navigating anywhere, and
   it inherited the chrome of a thing it is not. This is the failure mode
   the design system exists to cause rather than the one it exists to
   prevent, and the cure is to say so here rather than to loosen the rule
   there. */
.room .transcript { min-inline-size: 0; }
.room .transcript ol { min-inline-size: 0; }
.room .transcript .said { min-inline-size: 0; overflow-wrap: anywhere; }

.room .transcript h2 {
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 400;
  text-transform: lowercase; letter-spacing: .12em;
  color: var(--muted); margin: 0 0 .6rem;
}
.room .transcript ol {
  list-style: none; margin: 0; padding: 0;
  /* Its own scroll, capped to the stage's height on a desk. A transcript is
     thousands of lines and the page below it is the reading surface; letting
     it run pushes the Lectern off the bottom of the document. */
  max-block-size: 26rem; overflow-y: auto; overscroll-behavior: contain;
  border-block: var(--edge);
  padding-block: .35rem;
  scrollbar-width: thin;
}
.room .transcript button {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .5rem;
  inline-size: 100%; text-align: start;
  background: none; border: 0; cursor: pointer;
  padding: .3rem .4rem; border-radius: var(--radius);
  color: var(--foreground-dark); font: inherit;
  /* See above: this is a button that is a line of prose. */
  white-space: normal;
  transition: background .18s, color .18s;
}
.room .transcript .at {
  font-size: var(--step--2); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.room .transcript .said { font-size: var(--step--1); line-height: var(--leading-ui); }
.room .transcript button:hover, .room .transcript button:focus-visible {
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  color: var(--foreground); outline: none;
}
.room .transcript button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The line you pressed keeps its mark, so a long transcript does not lose
   your place the moment the player takes focus. */
.room .transcript [aria-current] {
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  color: var(--foreground);
}
.room .transcript [aria-current] .at { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .room .play:hover .play-mark, .room .play:focus-visible .play-mark { transform: none; }
}

/* ---- What the dragon did -----------------------------------------------
 *
 * CLAUDE.md's fourth non-negotiable is about permission, not about buttons:
 * the dragon may act on its own BECAUSE every act can be taken back. A
 * permission nobody can see is one nobody granted, so the acts are listed
 * where the treasure is read, in the dragon's own words.
 *
 * Quiet, in the nameplate, in mono. It is a record of what happened, not a
 * control panel - the loud version would make every card look like it needs
 * supervising, which is the opposite of what an undo is for. */
.acts { color: var(--muted); font-size: var(--step--2); margin-block-start: .9rem; }
.acts-heading {
  display: block; text-transform: lowercase; letter-spacing: .1em;
  margin-block-end: .3rem;
}
.acts ul { list-style: none; margin: 0; padding: 0; }
.acts .act { display: block; margin-block-end: .25rem; }
/* An act that has been taken back stays in the list, struck through -
   deleting it would make the undo itself invisible. */
.acts .act.undone { text-decoration: line-through; opacity: .55; }
.acts form { display: inline; }
.acts form button {
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--accent); padding: 0; min-block-size: 0;
  text-decoration: underline; text-underline-offset: .2em;
}

/* ---- Why-Chips (F02) ---------------------------------------------------
 *
 * A rune with no stated grounds is an assertion; a rune that says where it
 * came from is evidence you can weigh. It matters most where it is least
 * flattering - `auto` means a word was lifted out of the document by
 * frequency with no model involved, which is a fine rune and a terrible
 * summary, and somebody who thinks the dragon chose it will trust it
 * further than it deserves.
 *
 * Under the group, not on every chip: four runes from one source would
 * otherwise carry the same sentence four times. */
.runes-grounds { margin-block-end: .7rem; }
.runes-grounds .runes { margin-block-end: .2rem; }
.runes-grounds .why {
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--muted); margin: 0; text-wrap: pretty;
}
@media (min-width: 72rem) {
  /* In the nameplate column, which is right-aligned. */
  .treasure > .furniture .runes-grounds .why { text-align: end; }
}

/* ---- The Hourglass (F61) -----------------------------------------------
 *
 * The one surface here that is oldest-first. A wall is for what just
 * arrived; a queue read in that order is a queue whose bottom you never
 * reach, and the older half of a hoard you only ever see newest-first is a
 * half you will not meet again.
 *
 * No badge, no count in the masthead, no red dot. The point of an hourglass
 * is that it shows time passing without telling you off about it - a number
 * that goes up turns reading into a debt, which is the surest way to stop. */
.waiting { list-style: none; margin: 1rem 0 0; padding: 0; }
.waiting li { border-block-start: var(--edge); }
.waiting li:last-child { border-block-end: var(--edge); }
.waiting a {
  display: grid; grid-template-columns: 3.4rem 1.4rem minmax(0, 1fr);
  gap: .6rem; align-items: baseline;
  padding: .55rem .2rem; text-decoration: none; color: inherit;
  border-inline-start: 3px solid transparent;
  transition: border-color .18s, background .18s, padding-inline-start .18s;
}
.waiting a:hover, .waiting a:focus-visible {
  background: color-mix(in oklab, var(--accent) 7%, transparent);
  border-inline-start-color: var(--card-edge, var(--accent));
  padding-inline-start: .5rem; outline: none;
}
/* The sand: how long this one has been standing there, in the same stamp the
   wall uses, so a column of them lines up under tabular-nums. */
.waiting .waited { color: var(--muted); font-size: var(--step--2); font-variant-numeric: tabular-nums; }
.waiting .sigil { color: var(--card-edge, var(--muted)); }
.waiting .named {
  font-family: var(--font-reading); line-height: var(--leading-tight);
  overflow-wrap: anywhere;
}
.waiting a:hover .named, .waiting a:focus-visible .named { color: var(--accent); }
.hourglass .big { font-size: var(--step-2); font-family: var(--font-display); }

/* ---- The Ledger (F39) --------------------------------------------------
 *
 * The whole hoard as data. The wall is for recognising things and the
 * Lectern is for reading one; this answers the questions neither can - how
 * much Slovenian is in here, what arrived by bookmarklet and was never
 * read, what has been sitting degraded since March.
 *
 * Mono and tabular throughout, because every column is the same question
 * asked of every row and the eye should be able to run down one. This is
 * the one surface here that is allowed to look like a spreadsheet. */
.page.wide { max-inline-size: min(100% - 2rem, 90rem); margin-inline: auto; }
.ledger-heading { font-family: var(--font-display); margin-block: 1.5rem .4rem; }
.ledger-tally { color: var(--muted); font-size: var(--step--2); margin-block-end: 1rem; }
/* The one line on the Eye that is about the code rather than the hoard. It
   goes the colour of a broken promise when a deploy is overdue, because that
   is what it is: the vault serving something nobody put in front of it. */
.ledger-tally.overdue { color: var(--red, var(--kind-video)); }
.ledger-tally .deploy-hint { color: inherit; font-weight: 600; }

table.ledger { inline-size: 100%; border-collapse: collapse; font-size: var(--step--2); }
table.ledger th {
  text-align: start; font-family: var(--font-mono); font-weight: 400;
  color: var(--muted); text-transform: lowercase; letter-spacing: .08em;
  border-block-end: var(--edge); padding-block: .4rem; white-space: nowrap;
}
table.ledger th a { color: inherit; text-decoration: none; }
table.ledger th a:hover { color: var(--accent); }
/* The sorted column says so in the markup for a screen reader and draws it
   for everyone else. One column, never three. */
table.ledger th[aria-sort] a { color: var(--accent); }
table.ledger th[aria-sort="ascending"] a::after { content: " ↑"; }
table.ledger th[aria-sort="descending"] a::after { content: " ↓"; }
table.ledger td {
  padding-block: .35rem; padding-inline-end: .8rem;
  border-block-start: var(--edge); vertical-align: baseline;
  font-variant-numeric: tabular-nums;
}
table.ledger tr { transition: background .15s; }
table.ledger tbody tr:hover { background: color-mix(in oklab, var(--accent) 6%, transparent); }
table.ledger td a { color: inherit; text-decoration: none; }
table.ledger tbody tr:hover td a { color: var(--accent); }
/* The kind colour, on the one cell that is about kind. */
table.ledger td:nth-child(2) { color: var(--card-edge, var(--muted)); }
/* Something you have never opened is the thing you came here to find. */
table.ledger tr.unread td:nth-child(6) { font-weight: 600; color: var(--foreground); }
.runes-cell { color: var(--muted); max-inline-size: 16rem; overflow-wrap: anywhere; }
.state-degraded, .state-failed { color: var(--red, var(--kind-video)); }
.state-captured, .state-enriching { color: var(--muted); }

@media (max-width: 60rem) {
  /* Three columns are noise on a phone: the tongue, where it came from and
     the runes are all things you would open the treasure to see anyway. */
  table.ledger th:nth-child(3), table.ledger td:nth-child(3),
  table.ledger th:nth-child(4), table.ledger td:nth-child(4),
  table.ledger th:nth-child(7), table.ledger td:nth-child(7) { display: none; }
}

/* ---- The Chronicle and its ways through (F83, F43) ---------------------- */
.week { margin-block-end: 1.6rem; }
.week h3 { font-family: var(--font-display); font-size: var(--step-0); margin-block-end: .15rem; }
.week h3 a { color: inherit; text-decoration: none; }
.week h3 a:hover { color: var(--accent); }
.week .meta { color: var(--muted); font-size: var(--step--2); margin-block: 0 .3rem; }
.week .said { color: var(--foreground-dark); margin: 0; text-wrap: pretty; }

/* A way through is an offer, so it is drawn as one: the two ends, a link
   between them, and the two answers. Both answers are permanent - refusing
   has to stick or the same offer comes back next week and you stop reading
   the section. */
.passages { list-style: none; margin: .8rem 0 0; padding: 0; }
.passages li {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between;
  border-block-start: var(--edge); padding-block: .7rem;
}
.passages li:last-child { border-block-end: var(--edge); }
.passages .ends { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; min-inline-size: 0; }
.passages .ends a { color: inherit; text-decoration: none; border-block-end: 1px solid var(--edge-colour, currentColor); }
.passages .ends a:hover { color: var(--accent); }
/* The chain link. Drawn from a glyph that exists in every font rather than
   an emoji, for the same reason the flame on Burn is a sigil. */
.passages .link { color: var(--accent); font-size: var(--step-1); line-height: 1; }
.passages .answer { display: flex; gap: .4rem; align-items: center; }

/* ---- Ask the Vault (F67) ----------------------------------------------- */
.ask .said { text-wrap: pretty; }
/* The citation numbers the model writes into its own prose. Marked so the
   eye can follow one down to the receipt it names, and so an answer that
   cites nothing looks visibly different from one that does. */
.ask .big { font-family: var(--font-display); font-size: var(--step-1); }
.receipts { margin: .6rem 0 0; padding-inline-start: 1.6rem; }
.receipts li { margin-block-end: .55rem; }
.receipts li::marker { color: var(--accent); font-family: var(--font-mono); font-size: var(--step--2); }
.receipts a { color: inherit; text-decoration: none; border-block-end: 1px solid var(--edge-colour, currentColor); }
.receipts a:hover { color: var(--accent); }
.receipts .meta { display: block; color: var(--muted); font-size: var(--step--2); margin-block-start: .1rem; }

/* ---- The Shadow Menu (F47) ---------------------------------------------
 *
 * The ninja vocabulary: the keyboard, the work browser, the things you do
 * without looking. A <dialog>, so the focus trap, the inert page and
 * Escape-to-close are the platform's problem rather than ours.
 */
dialog.palette {
  inline-size: min(100% - 2rem, 34rem);
  /* Both, and the inline one is not redundant. The UA stylesheet centres a
     <dialog> with the `margin: auto` shorthand, and setting `margin-block-
     start` on its own replaces that shorthand's computed value for one side
     while leaving the others at their initial `0` - so the menu opened
     flush against the left edge of the screen. */
  margin-block-start: 12vh;
  margin-inline: auto;
  padding: 0; border: var(--edge); border-radius: var(--radius-lg);
  background: var(--background-lighter);
  color: var(--foreground);
  box-shadow: var(--bevel), 0 2rem 5rem -1rem rgb(0 0 0 / .6);
  overflow: hidden;
}
dialog.palette::backdrop {
  background: color-mix(in oklab, var(--background-darker) 72%, transparent);
  backdrop-filter: blur(2px);
}
.palette-form { margin: 0; }
.palette-field {
  inline-size: 100%; border: 0; border-block-end: var(--edge);
  background: none; color: inherit;
  font-family: var(--font-ui); font-size: var(--step-0);
  padding: .9rem 1rem;
}
.palette-field:focus { outline: none; }
.palette ul { list-style: none; margin: 0; padding: .35rem; max-block-size: 50vh; overflow-y: auto; }
.palette li a, .palette li button, .palette-fallback a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  inline-size: 100%; text-align: start;
  padding: .45rem .65rem; border-radius: var(--radius);
  color: inherit; text-decoration: none; background: none; border: 0;
  font: inherit; cursor: pointer; white-space: normal;
}
.palette .group { color: var(--muted); font-size: var(--step--2); }
/* aria-selected is the state, so it is also the style. One source of truth
   for "which row is current", and a screen reader reads the same thing the
   eye sees. */
.palette li[aria-selected="true"] > :is(a, form),
.palette-fallback.marked a {
  background: color-mix(in oklab, var(--accent) 18%, transparent);
}
.palette li[aria-selected="true"] .what, .palette-fallback.marked .what { color: var(--accent); }
.palette li form { margin: 0; border-radius: var(--radius); }
.palette-fallback { margin: 0; padding: .35rem; border-block-start: var(--edge); }
.palette-fallback .what { overflow-wrap: anywhere; }

/* ---- The Furnace (F15) -------------------------------------------------
 *
 * One treasure, filling the screen, with three ways out. Deliberately not a
 * list: a list invites you to scan and postpone, and a queue you scan is a
 * queue that grows. The Hourglass tells you what is waiting; this is where
 * you deal with it. */
.page.furnace { max-inline-size: min(100% - 2rem, 52rem); }
.furnace .remaining {
  color: var(--muted); font-size: var(--step--2);
  text-align: end; margin-block: 0 .6rem;
}
.forge-plate {
  background:
    linear-gradient(
      var(--background-lighter),
      color-mix(in oklab, var(--background-dark) 7%, var(--background-lighter)));
  border: var(--edge); border-radius: var(--radius-lg);
  border-inline-start: 3px solid var(--card-edge, var(--muted));
  border-block-start-color: color-mix(in oklab, var(--accent) 34%, transparent);
  box-shadow: var(--bevel), var(--contact),
              0 1.5rem 4rem -1.5rem color-mix(in oklab, var(--card-glow, var(--accent)) 35%, transparent);
  padding: 1.2rem 1.4rem;
  overflow: hidden;
}
.forge-plate .face {
  margin: -1.2rem -1.4rem 1rem;
  block-size: 260px; overflow: hidden; position: relative;
  border-block-end: 1px solid color-mix(in oklab, var(--background-darker) 60%, transparent);
}
.forge-plate .face img {
  inline-size: 100%; block-size: 100%; display: block;
  object-fit: cover; object-position: top center;
  /* Brighter than the wall's: here it is the only thing on the screen and
     nothing else is competing with it. */
  filter: saturate(.88) brightness(.84) contrast(1.03) sepia(.06);
}
.forge-plate h2 { font-family: var(--font-display); font-size: var(--step-2); margin-block: 0 .3rem; }
.forge-plate h2 a { color: inherit; text-decoration: none; }
.forge-plate h2 a:hover { color: var(--accent); }
.forge-plate .excerpt {
  font-family: var(--font-reading); font-size: var(--step-0);
  line-height: var(--leading-read); color: var(--foreground-dark);
  max-inline-size: var(--measure); text-wrap: pretty; hyphens: auto;
}
/* The keys, printed on the controls that use them. A shortcut nobody is
   told about is a shortcut for whoever wrote it. */
.ways-out { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-block-start: 1.2rem; }
.ways-out form { margin: 0; }
.ways-out kbd {
  font-family: var(--font-mono); font-size: var(--step--2);
  opacity: .6; margin-inline-start: .35rem;
}
.furnace .empty { text-align: center; padding-block: 4rem; }
.furnace .empty .big { font-family: var(--font-display); font-size: var(--step-2); }

/* ---- Living Dossiers (F69) --------------------------------------------- */
.dossiers { list-style: none; margin: 1rem 0 0; padding: 0; }
.dossiers li { border-block-start: var(--edge); padding-block: .6rem; }
.dossiers li:last-child { border-block-end: var(--edge); }
.dossiers a { color: inherit; text-decoration: none; font-family: var(--font-reading); }
.dossiers a:hover { color: var(--accent); }
/* The question, stated. The only way to tell a dossier that is empty because
   nothing matches from one whose rule is wrong. */
.dossiers .stated { display: block; color: var(--muted); font-size: var(--step--2); margin-block-start: .15rem; }
.ledger-tally form.inline { display: inline; }
.ledger-tally form.inline button { padding: 0; min-block-size: 0; font-size: inherit; }
/* Offered on a wall that is already asking something. */
.keep-question {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  max-inline-size: 1400px; margin: .5rem auto 0;
}
.keep-question input[type="text"] { flex: 1 1 14rem; min-inline-size: 0; }

/* ---- The Dragon's Eye and the Oath (F97, F113) -------------------------
 *
 * What the vault is doing, and whether it still keeps its word, on one
 * surface - because "the queue is backed up" and "capture must never block
 * on enrichment" are the same fact said twice, once as a number and once as
 * a promise. */
.tally {
  display: grid; gap: .8rem 2rem; margin-block: .8rem 2rem;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}
.tally > div { border-block-start: var(--edge); padding-block-start: .4rem; }
.tally dt { font-family: var(--font-mono); font-size: var(--step--2); color: var(--muted); }
.tally dd {
  margin: .1rem 0 0; font-family: var(--font-display);
  font-size: var(--step-2); font-variant-numeric: tabular-nums;
}
.tally .alarming dd { color: var(--red, var(--kind-video)); }

.oath { list-style: none; margin: .8rem 0 0; padding: 0; }
.oath li {
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .7rem;
  align-items: baseline;
  border-block-start: var(--edge); padding-block: .7rem;
}
.oath li:last-child { border-block-end: var(--edge); }
.oath .verdict-mark { display: block; }
.oath .verdict-mark .sigil-mark { inline-size: 1.25rem; block-size: 1.25rem; }
/* The verdict is the fill, and the word beside it says it too - the colour
   is never the only carrier. */
.oath .kept .verdict-mark { color: var(--green, var(--accent)); }
.oath .broken .verdict-mark { color: var(--red, var(--kind-video)); }
.oath .unchecked .verdict-mark { color: var(--muted); }
.oath .kept .sigil-duo { opacity: .18; }
.oath .broken .sigil-duo { opacity: .22; }
.oath .unchecked .sigil-duo { opacity: .12; }
.oath .what { display: block; font-family: var(--font-reading); text-wrap: pretty; }
/* What it actually found, which is the difference between a tick and a
   claim. A promise with no evidence under it is decoration. */
.oath .said { display: block; color: var(--muted); font-size: var(--step--2); margin-block-start: .15rem; }
.oath .broken .what { color: var(--foreground); font-weight: 600; }
/* The verdict in words for a screen reader, which cannot read a tick. */
.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* The Diff Lens (F102): what code has changed since a gem was sealed. */
.commits { list-style: none; margin: .5rem 0 0; padding: 0; font-size: var(--step--2); }
.commits li { color: var(--muted); padding-block: .15rem; overflow-wrap: anywhere; }

/* ---- The Constellation, mid zoom ---------------------------------------
 *
 * docs/PLAN.md's judges killed the standalone graph as "a screensaver
 * pretending to be navigation". The rule that saved it: a map you ARRIVE at
 * from what you were reading is navigation. So this is always anchored,
 * always has that treasure at its centre, and every point on it is a place
 * you can go.
 *
 * Laid out in rings rather than by a force simulation, which is also why it
 * can be a server-rendered SVG instead of an island: distance from the
 * centre MEANS one hop or two, and the same hoard draws the same picture
 * every time. A physics layout would look more alive and tell you less. */
.constellation .sky {
  display: block; inline-size: 100%; max-inline-size: 40rem;
  margin: 1rem auto 0; overflow: visible;
}
.sky .thread { stroke-width: 1.5; opacity: .5; }
/* Kind by colour AND by dash, so the four are told apart without relying on
   colour - and the reason is in a <title> on every one of them. */
.sky .thread-trail   { stroke: var(--accent); stroke-width: 2.5; opacity: .95; }
.sky .thread-runes   { stroke: var(--accent); opacity: .7; }
.sky .thread-meaning { stroke: var(--muted); stroke-dasharray: 5 4; }
.sky .thread-source  { stroke: var(--muted); stroke-dasharray: 1 5; opacity: .45; }

.sky .star circle {
  fill: var(--background-lighter);
  stroke: var(--card-edge, var(--muted)); stroke-width: 2;
  transition: fill .2s, stroke-width .2s;
}
.sky .star:hover circle, .sky .star:focus-visible circle {
  fill: color-mix(in oklab, var(--card-edge, var(--accent)) 45%, var(--background-lighter));
  stroke-width: 3;
}
.sky .here circle { fill: var(--accent); stroke: var(--accent); }
.sky .hop-2 circle { opacity: .75; }

/* The same graph in words. Not a fallback - an SVG of circles tells a
   screen reader nothing, and "this, because that" is what the picture is
   trying to say anyway. */
.constellation-list { list-style: none; margin: 1.5rem auto 0; padding: 0; max-inline-size: var(--measure-reading); }
.constellation-list li { border-block-start: var(--edge); padding-block: .6rem; }
.constellation-list li:last-child { border-block-end: var(--edge); }
.constellation-list a { color: inherit; text-decoration: none; font-family: var(--font-reading); }
.constellation-list a:hover { color: var(--accent); }
.constellation-list .verdict { display: block; margin-block-start: .1rem; }
.constellation-list .hop-2 { padding-inline-start: 1.4rem; opacity: .85; }
.kin h2 .zoom-out {
  font-family: var(--font-mono); font-size: var(--step--2);
  color: var(--accent); margin-inline-start: .8rem; text-transform: none;
  letter-spacing: 0; text-decoration: underline; text-underline-offset: .2em;
}

/* ---- Friction and petitions (F107, F106) -------------------------------- */
.petitions { list-style: none; margin: .8rem 0 0; padding: 0; }
.petitions li { border-block-start: var(--edge); padding-block: .9rem; }
.petitions li:last-child { border-block-end: var(--edge); }
.petitions .asks { margin: 0 0 .5rem; text-wrap: pretty; }
.petitions .plate { margin: 0; }
.friction .big, .hourglass .big { font-family: var(--font-display); font-size: var(--step-1); }
/* The way into the Shadow Menu for a device with no ⌘K. */
.masthead .summon {
  font: inherit; color: inherit; padding: 0; min-block-size: 0;
  text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.masthead .summon:hover { color: var(--accent); }
.masthead .summon kbd { font-family: var(--font-mono); opacity: .55; margin-inline-start: .3rem; }
@media (max-width: 40rem) { .masthead .summon kbd { display: none; } }
/* A dense table may scroll. The page may not. */
.scroller { overflow-x: auto; overscroll-behavior-x: contain; }
.scroller table { min-inline-size: 100%; }
