/* ───────────────────────────────────────────────────────────────────
   Quill: how the game's one markup looks on the web (docs/quill.md).
   ONE stylesheet for every web surface that shows Quill's HTML
   (rust/quill render.rs, the quill- classes):

     - the website's help pages and every other page with Quill text
       (/quill.css, after /site.css);
     - the Tera Tribune (quill-news-html: /quill.css, after /site.css);
     - the web client, /play/ (website/play/quill.css, a copy of this
       file kept identical by tools/web/quill-css-test.mjs and checked by
       tools/web/stamp-play.py: /play/ only ships what is under
       website/play/, so the live client keeps its own copy in lock-step
       with the live game).

   Edit THIS file (website/quill.css), then copy it over
   website/play/quill.css.

   What a surface sets is its theme, never the shapes: the tokens below
   (fonts, colours, the space between blocks) and the width it gives the
   text. Prose rhythm (the paragraph's own margin, line height, font size)
   is the surface's too. Everything else (sizes in em, margins, floats,
   rules, tables, pictures) is here, so a construct looks and behaves the
   same in help, the Tribune and the game.

   Tokens (each has a fallback, so the file works anywhere):
     --quill-prose     the body font            --quill-display  headings, labels
     --quill-mono      typed text, <pre>        --quill-script   <font role="script">
     --quill-mono-scale  fixed-width text's size against the prose (a number)
     --quill-text      typed text's colour      --quill-arg      a placeholder's
     --quill-muted     quiet text               --quill-rule     hairlines
     --quill-accent    the gold (quote rule)    --quill-accent-bright  syntax lines
     --quill-heading   <h>                      --quill-panel    syntax and <pre> ground
     --quill-ink / --quill-paper  the dark ground and the light text (<c type="reverse">)
     --quill-space     the space under a block
     --quill-table-size  a table's and a grid's text against the prose (.89em)
     --quill-black … --quill-white, --quill-black-b … --quill-white-b,
     --quill-bg-black … --quill-bg-white   the sixteen game colours and eight grounds
   A colour type (<c type="say">) takes the player's colour where the
   surface sets one (/play/: --qc on .quill-c-<type>, play.js), else the
   game's default colour for it (quill::codes::ansi_code).
   ─────────────────────────────────────────────────────────────────── */

/* ── Headings and aligned blocks (quill.md §3.1–3.2) ───────────────── */
.quill-h {
  font-family: var(--quill-display, "Marcellus", Georgia, serif);
  font-weight: 400;
  font-size: 1.25em;
  line-height: 1.25;
  color: var(--quill-heading, inherit);
  margin: 1.4em 0 .45em;
}
.quill-h:first-child { margin-top: 0; }
.quill-center { text-align: center; }
.quill-right { text-align: right; }

/* <p indent>, <quote indent right> (markup.md §4, owner 2026-11-12): a
   margin step is 5 telnet columns (quill-ml-K / quill-mr-K), 2.5em; a
   margin never takes more than a fifth of the column, so a phone keeps
   room to read. */
.quill-indent { margin-left: min(calc(var(--quill-l, 1) * 2.5em), 20%); }
.quill-ml-0 { --quill-l: 0; } .quill-ml-1 { --quill-l: 1; } .quill-ml-2 { --quill-l: 2; }
.quill-ml-3 { --quill-l: 3; } .quill-ml-4 { --quill-l: 4; } .quill-ml-5 { --quill-l: 5; }
.quill-ml-6 { --quill-l: 6; } .quill-ml-7 { --quill-l: 7; } .quill-ml-8 { --quill-l: 8; }
.quill-mr-0 { --quill-r: 0; } .quill-mr-1 { --quill-r: 1; } .quill-mr-2 { --quill-r: 2; }
.quill-mr-3 { --quill-r: 3; } .quill-mr-4 { --quill-r: 4; } .quill-mr-5 { --quill-r: 5; }
.quill-mr-6 { --quill-r: 6; } .quill-mr-7 { --quill-r: 7; } .quill-mr-8 { --quill-r: 8; }

/* <quote>: someone else's words, set in from both sides with a thin gold
   rule on a faint raised panel (owner 2026-11-12, 2026-11-15), in the
   normal text colour, upright (not a page's own muted italic blockquote).
   The panel is a tint of the text colour, so it lifts on every theme. */
.quill-quote {
  margin: .4em min(calc(var(--quill-r, 1) * 2.5em), 20%) var(--quill-space, 1em) min(calc(var(--quill-l, 1) * 2.5em), 20%);
  padding: .5em .9em;
  border: 0;
  border-left: 3px solid var(--quill-accent, #c7a24b);
  border-radius: 2px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  color: inherit;
  font-style: normal;
}
.quill-quote > :last-child { margin-bottom: 0; }

/* ── Lists (§3.5) ──────────────────────────────────────────────────── */
.quill-list { margin: 0 0 var(--quill-space, 1em); padding-left: 1.3em; }
.quill-list li { margin: 0 0 .25em; }
/* a list nested in an item: under the item's text, no gap */
.quill-list li > .quill-list { margin: .2em 0 .1em; padding-left: 1.2em; }

/* ── Fixed width (§3.3, §4.3–4.6) ──────────────────────────────────── */
/* Anything the player types is fixed width and a little brighter: <kbd>,
   syntax lines, table terms, <pre> (markup.md §5). */
.quill-pre {
  margin: 0 0 var(--quill-space, 1em);
  padding: .7em .9em;
  overflow-x: auto;
  white-space: pre;
  font-family: var(--quill-mono, ui-monospace, monospace);
  font-size: calc(var(--quill-mono-scale, .86) * 1em);
  line-height: 1.45;
  color: inherit;
  background: var(--quill-panel, color-mix(in srgb, currentColor 5%, transparent));
  border: 1px solid var(--quill-rule, rgba(128, 128, 128, .25));
  border-radius: 2px;
}
.quill-kbd, .quill-code, .quill-c-examples, .quill-cmd-text {
  font-family: var(--quill-mono, ui-monospace, monospace);
  font-size: calc(var(--quill-mono-scale, .86) * 1em);
  font-style: normal;
  color: var(--quill-text, inherit);
}
/* In a fixed-width block every character must be one cell wide, so typed
   text, placeholders and keys inside keep the block's own size. */
:is(.quill-pre, .quill-term, .quill-syntax-line, .quill-kbd, .quill-code, .quill-c-examples) :is(.quill-kbd, .quill-code, .quill-c-examples, .quill-arg) { font-size: 1em; }
/* Typed input written in capitals reads in lower case (owner 2026-11-12):
   the fixed-width font sets it apart already. The HTML keeps the stored
   text; a placeholder keeps its own case. */
.quill-kbd-lower { text-transform: lowercase; }
.quill-kbd-lower .quill-arg { text-transform: none; }

/* <arg> (owner standing rules 2026-11-12/13): commands are fixed width;
   a fill-in is italic, fixed width, in the warm placeholder gold,
   wherever it stands, its brackets always shown (real text: copying gives
   <victim>, as telnet; in a <pre> they take telnet's columns) and faint:
   muted and upright, so the word stays the focus. */
.quill-arg {
  font-family: var(--quill-mono, ui-monospace, monospace);
  font-size: calc(var(--quill-mono-scale, .86) * 1em);
  font-style: italic;
  color: var(--quill-arg, #d1bb8a);
}
.quill-arg-mark { font-style: normal; color: var(--quill-muted, #8f8678); }

/* <key> (owner 2026-11-13): the key's name on a subtle key cap, fixed
   width, no brackets. Telnet prints <enter>. */
.quill-key {
  font-family: var(--quill-mono, ui-monospace, monospace);
  font-size: calc(var(--quill-mono-scale, .86) * .93em);
  font-style: normal;
  text-transform: none;
  color: var(--quill-text, inherit);
  border: 1px solid color-mix(in srgb, var(--quill-muted, #8f8678) 60%, transparent);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0 .3em;
  white-space: nowrap;
}
:is(.quill-pre, .quill-term, .quill-syntax-line, .quill-kbd) .quill-key { font-size: .92em; }

/* <note>: a remark about typed input reads as prose, even on a fixed-width
   line: the prose font at the prose size. */
.quill-note {
  font-family: var(--quill-prose, Georgia, serif);
  font-size: 1em;
  font-style: normal;
  color: var(--quill-muted, #8f8678);
}
:is(.quill-pre, .quill-term, .quill-syntax-line) .quill-note { font-size: calc(1em / var(--quill-mono-scale, .86)); }
/* In a <pre> a note starts at its column and its later lines line up
   under its first: a block from that column. */
.quill-pre .quill-note { display: inline-block; vertical-align: top; white-space: pre-line; }

/* ── Inline odds and ends (§4) ─────────────────────────────────────── */
.quill-web { overflow-wrap: anywhere; }
.quill-missing { color: var(--quill-muted, #8f8678); border-bottom: 1px dotted var(--quill-muted, #8f8678); }
.quill-time { white-space: nowrap; }
/* <icon/> (§4.17): a buff's or debuff's icon at text size, its colour the
   svg's own stroke, sat on the baseline like a letter. A class icon
   opening a paragraph is a small emblem the text wraps around. */
.quill-icon { vertical-align: -0.125em; }
p > .quill-icon-class:first-child { float: left; width: 2.6em; height: 2.6em; margin: .1em .65em .2em 0; }
.quill-font-body { font-family: var(--quill-prose, Georgia, serif); }
.quill-font-heading { font-family: var(--quill-display, "Marcellus", Georgia, serif); }
.quill-font-script { font-family: var(--quill-script, "IM FELL English", Georgia, serif); font-style: italic; }
.quill-font-mono { font-family: var(--quill-mono, ui-monospace, monospace); font-size: calc(var(--quill-mono-scale, .86) * 1em); }

/* An action link (<a cmd>, §6; owner 2026-11-14): a real button, not a web
   link's look: the text's own colour, a verdigris chevron before it and a
   dashed rule under it, a tint on hover. The command it runs shows fixed
   width (quill-cmd-text) when it has no words of its own. */
button.quill-cmd {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  color: inherit;
  font: inherit;
  border-radius: 3px;
  border-bottom: 1px dashed color-mix(in srgb, var(--quill-heading, #7fa06a) 70%, transparent);
  padding: 0 2px;
}
button.quill-cmd::before { content: "\203A"; color: var(--quill-heading, #7fa06a); margin-right: .3em; font-weight: 600; }
button.quill-cmd:hover { background: color-mix(in srgb, var(--quill-heading, #7fa06a) 16%, transparent); border-bottom-style: solid; }
button.quill-cmd:focus-visible { outline: 1px solid var(--quill-accent, #c7a24b); outline-offset: 1px; border-bottom-style: solid; }

/* ── <syntax> (help): the one raised plate of a help page ─────────── */
.quill-syntax {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.1em;
  margin: 0 0 calc(var(--quill-space, 1em) * 1.4);
  padding: .6em .9em;
  background: var(--quill-panel, color-mix(in srgb, currentColor 5%, transparent));
  border-left: 2px solid var(--quill-accent, #c7a24b);
  border-radius: 2px;
}
.quill-syntax-label {
  grid-row: 1 / span 99;
  font-family: var(--quill-display, "Marcellus", Georgia, serif);
  font-size: .9em;
  color: var(--quill-muted, #8f8678);
  padding-top: .1em;
}
.quill-syntax-line {
  display: block;
  font-family: var(--quill-mono, ui-monospace, monospace);
  font-size: calc(var(--quill-mono-scale, .86) * 1.07em);
  line-height: 1.75;
  color: var(--quill-accent-bright, #e3c072);
  overflow-wrap: anywhere;
}

/* ── <seealso> (help) ──────────────────────────────────────────────── */
.quill-seealso { margin: 1.5em 0 0; clear: both; }
.quill-seealso-label {
  font-family: var(--quill-display, "Marcellus", Georgia, serif);
  font-weight: 400;
  font-size: 1em;
  line-height: 1.4;
  color: var(--quill-muted, #8f8678);
  margin: 0 0 .35em;
}
.quill-seealso ul { list-style: none; padding: 0; margin: 0 0 var(--quill-space, 1em); display: flex; flex-wrap: wrap; gap: .2em 1.1em; }
.quill-seealso li { margin: 0; }
.quill-seealso li::before { content: none; }
.quill-seealso a { font-family: var(--quill-display, "Marcellus", Georgia, serif); letter-spacing: .03em; }

/* ── <table>: a term the player types and its description (§3.7) ─── */
/* The term column is fixed width and keeps to one line; the description
   is prose and wraps. In a narrow column (a phone, a narrow window) a row
   becomes a line that wraps: the description under its term. */
.quill-table { width: 100%; margin: 0 0 calc(var(--quill-space, 1em) * 1.2); border-collapse: collapse; font-size: var(--quill-table-size, .89em); }
.quill-table td {
  border: 0;
  border-top: 1px solid var(--quill-rule, rgba(128, 128, 128, .25));
  padding: .4em 1.1em .4em 0;
  vertical-align: top;
  text-align: left;
  background: none;
}
.quill-table td:last-child { padding-right: 0; }
.quill-table tbody tr:first-child td { border-top: 0; }
.quill-table :is(thead td, tr.quill-head td) {
  font-family: var(--quill-display, "Marcellus", Georgia, serif);
  font-size: .95em;
  letter-spacing: .03em;
  color: var(--quill-muted, #8f8678);
}
.quill-table thead td { border-top: 0; border-bottom: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); padding-bottom: .3em; }
.quill-term {
  width: 1%;
  white-space: nowrap;
  font-family: var(--quill-mono, ui-monospace, monospace);
  font-size: calc(var(--quill-mono-scale, .86) * 1em);
  line-height: 1.75;
  color: var(--quill-text, inherit);
}
/* A term in two typed parts (redit's `exit <dir> <to room> <EXITFLAGS>`)
   may break between them, never inside one. */
.quill-term:has(> .quill-kbd + .quill-kbd) { white-space: normal; }
.quill-term:has(> .quill-kbd + .quill-kbd) > .quill-kbd { white-space: nowrap; }
/* A term with no description runs on over the empty description cell
   rather than widening the term column. */
.quill-table tr:has(> .quill-desc:empty) > .quill-term { max-width: 0; overflow: visible; }
.quill-desc { font-family: var(--quill-prose, Georgia, serif); font-style: normal; line-height: 1.55; overflow-wrap: break-word; }

/* ── <grid>: tables of N columns (§3.10) ───────────────────────────── */
/* Prose cells, typed input fixed width (its own rule), every column but
   the last on one line; a grid wider than its column scrolls sideways in
   its own box. Numbers right-aligned or centred in tabular figures. */
.quill-grid-wrap { overflow-x: auto; max-width: 100%; margin: 0 0 calc(var(--quill-space, 1em) * 1.2); }
.quill-grid { border-collapse: collapse; width: auto; margin: 0; font-size: var(--quill-table-size, .89em); line-height: 1.55; }
.quill-grid :is(td, th) {
  border: 0;
  border-top: 1px solid var(--quill-rule, rgba(128, 128, 128, .25));
  padding: .35em 1.1em .35em 0;
  vertical-align: top;
  text-align: left;
  font-weight: normal;
  background: none;
}
.quill-grid :is(td, th):not(:last-child) { white-space: nowrap; }
.quill-grid :is(td, th):last-child { padding-right: 0; min-width: 12em; }
.quill-grid tbody tr:first-child > * { border-top: 0; }
.quill-grid th { font-family: var(--quill-display, "Marcellus", Georgia, serif); font-size: .95em; letter-spacing: .03em; color: var(--quill-muted, #8f8678); }
.quill-grid thead th { border-top: 0; border-bottom: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); vertical-align: bottom; padding-bottom: .3em; }
.quill-grid .quill-r { text-align: right; font-variant-numeric: tabular-nums; }
.quill-grid .quill-m { text-align: center; font-variant-numeric: tabular-nums; }
/* <grid compact lines labels> (owner 2026-11-14): a grid that lays things
   out. Compact: tight, as wide as its content; lines head / none: fewer
   rules; labels: the first column muted, in the body font. */
.quill-grid.quill-grid-compact :is(td, th) { padding: .1em .8em .1em 0; }
.quill-grid.quill-grid-compact :is(td, th):last-child { padding-right: 0; min-width: 0; }
.quill-grid.quill-grid-lines-none :is(td, th) { border: 0; }
.quill-grid.quill-grid-lines-head tbody :is(td, th) { border-top: 0; }
.quill-grid.quill-grid-labels tbody th[scope="row"] { font-family: inherit; font-size: inherit; letter-spacing: normal; color: var(--quill-muted, #8f8678); }
/* A tall grid a page at a time, with a filter box (/play/'s gridpager.js;
   the website runs it through help/grids.js; §3.10 *Paging*). The <filter>
   placeholder: italic gold, fixed width, faint brackets. */
.quill-grid-wrap:has(+ .quill-grid-pager) { margin-bottom: .5em; }
.quill-grid-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .9em; margin: 0 0 calc(var(--quill-space, 1em) * 1.2); font-family: var(--quill-display, "Marcellus", Georgia, serif); color: var(--quill-muted, #8f8678); }
.quill-grid-pager button { font: inherit; color: var(--quill-accent, #c7a24b); background: none; border: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); border-radius: 4px; padding: .1em .7em; cursor: pointer; }
.quill-grid-pager button:hover:not(:disabled) { border-color: var(--quill-accent, #c7a24b); color: var(--quill-accent-bright, #e3c072); }
.quill-grid-pager button:disabled { color: var(--quill-muted, #8f8678); opacity: .45; cursor: default; }
.quill-grid-pager button:focus-visible { outline: 1px solid var(--quill-accent, #c7a24b); outline-offset: 1px; }
.quill-grid-pager button[hidden] { display: none; }
.quill-grid-filter { position: relative; flex: 0 1 13em; min-width: 7em; display: inline-flex; align-self: stretch; }
.quill-grid-filter input { width: 100%; min-width: 0; box-sizing: border-box; font: .86em/1.6 var(--quill-mono, ui-monospace, monospace); color: inherit; background: none; border: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); border-radius: 4px; padding: .1em .5em; margin: 0; }
.quill-grid-filter input:hover { border-color: color-mix(in srgb, var(--quill-accent, #c7a24b) 50%, var(--quill-rule, transparent)); }
.quill-grid-filter input:focus { outline: none; border-color: var(--quill-accent, #c7a24b); }
.quill-grid-ph { position: absolute; left: calc(.5em + 1px); top: 50%; transform: translateY(-50%); pointer-events: none; white-space: nowrap; font: italic .86em/1.6 var(--quill-mono, ui-monospace, monospace); color: var(--quill-arg, #d1bb8a); }
.quill-grid-ph i { font-style: inherit; opacity: .45; }
.quill-grid-ph[hidden] { display: none; }

/* ── <img/>: a picture (§3.9) ──────────────────────────────────────── */
/* small = the thumb (128 px), medium = inline (480 px), large = full, each
   never wider than its column. align left / right: the text wraps around
   it on the other side; center: on its own, centred; none: on its own at
   the left. In a narrow column a medium or large picture stops floating
   and takes the column's width; a small one keeps its place. */
.quill-img { display: block; margin: .3em 0 var(--quill-space, 1em); padding: 0; max-width: 100%; width: fit-content; }
.quill-img img { display: block; max-width: 100%; height: auto; border: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); border-radius: 2px; }
.quill-img-small { max-width: min(128px, 100%); }
.quill-img-medium { max-width: min(480px, 100%); }
.quill-align-left { float: left; clear: left; max-width: min(50%, 480px); margin: .3em 1.2em .6em 0; }
.quill-align-right { float: right; clear: right; max-width: min(50%, 480px); margin: .3em 0 .6em 1.2em; }
.quill-img-small:is(.quill-align-left, .quill-align-right) { max-width: min(128px, 40%); }
.quill-align-center { margin-left: auto; margin-right: auto; }
/* What wraps around a picture never runs under it: a block with its own
   box (a quotation, a notice, a list's bullets) sits beside it or under it
   whole (tables, grids, <pre> and the syntax plate are such boxes already) */
.quill-quote, .quill-notice, .quill-list { display: flow-root; }

/* ── <notice> (§3.11): a notice from the game ─────────────────────── */
/* A strip between two thin rules in its colour type, a faint tint, a
   small line of bell, label in small capitals and sender, then the words
   larger and semibold. Its colour is its type's (.quill-c-<type>). */
.quill-notice {
  margin: .8em 0;
  padding: 6px 10px 7px;
  border-top: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  background: color-mix(in srgb, currentColor 6%, transparent);
  font-family: var(--quill-prose, Georgia, serif);
  white-space: normal;
}
.quill-notice-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; line-height: 1.3; }
.quill-notice-icon { width: 14px; height: 14px; flex: none; }
.quill-notice-label { font-family: var(--quill-display, "Marcellus", Georgia, serif); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.quill-notice-by { font-size: 12px; color: var(--quill-muted, #8f8678); }
.quill-notice-body { font-size: 1.14em; font-weight: 600; line-height: 1.3; margin-top: 1px; overflow-wrap: anywhere; }
.quill-notice-body > :is(p, ul, ol, h2, blockquote, pre) { margin: 0 0 .3em; }
.quill-notice-body > :last-child { margin-bottom: 0; }

/* ── <art> (§3.12): ASCII art and its painting in one box ──────────── */
/* The <pre> sets the box: one em of padding on every side and lines of
   1.25 em, the grid the paintings were made on (tools/art/splash_art.py),
   so the picture, stretched over the whole box, lies on the ASCII it was
   traced from. Which one shows: the reader's setting (<html data-art>,
   /play/'s art.js) and each figure's flip; with no setting, the painting.
   The flip button only where art.js runs (it sets data-art). */
.quill-art { position: relative; display: inline-block; margin: 0 0 var(--quill-space, 1em); vertical-align: top; width: max-content; max-width: 100%; }
.quill-art > .quill-art-ascii {
  margin: 0;
  padding: 1em;
  border: 0;
  background: none;
  line-height: 1.25;
  white-space: pre;
  tab-size: 8;
  overflow: hidden;
  font-family: var(--quill-mono, ui-monospace, monospace);
  /* wide art shrinks to fit its place (a column is about 0.6 em; the
     padding 2 em): the width of the nearest container (/play/'s
     .quill-splash), else the window */
  font-size: min(1em, calc((100cqi - 8px) / (var(--art-cols, 80) * 0.61 + 2)));
  transition: opacity .45s ease;
}
.quill-art > .quill-art-picture {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; opacity: 0; pointer-events: none; border-radius: 3px;
  transition: opacity .45s ease;
}
:root:not([data-art="ascii"]) .quill-art:not(.quill-art-flipped):not(.quill-art-nopic) > .quill-art-picture,
:root[data-art="ascii"] .quill-art.quill-art-flipped:not(.quill-art-nopic) > .quill-art-picture { opacity: 1; }
:root:not([data-art="ascii"]) .quill-art:not(.quill-art-flipped):not(.quill-art-nopic) > .quill-art-ascii,
:root[data-art="ascii"] .quill-art.quill-art-flipped:not(.quill-art-nopic) > .quill-art-ascii { opacity: 0; }
.quill-art > .quill-art-flip {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 6px;
  background: color-mix(in srgb, var(--quill-ink, #000) 70%, transparent);
  color: var(--quill-accent, #c7a24b);
  cursor: pointer; opacity: .6; transition: opacity .2s ease;
}
:root:not([data-art]) .quill-art > .quill-art-flip { display: none; }
.quill-art:hover > .quill-art-flip, .quill-art > .quill-art-flip:focus-visible { opacity: 1; }
.quill-art.quill-art-nopic > .quill-art-flip { display: none; }

/* ── <rune> (§4.10) ────────────────────────────────────────────────── */
/* One glyph per rune from /runes/v1/sprite.svg in the rune colour (the
   magic colour), then the letters small: what copying and screen readers
   get. (/play/'s game text hides the letters unless the player asks.)
   Inside a <pre> (quill-rune-cols) the letters keep their columns, unseen,
   and the glyphs are drawn centred over them. */
.quill-rune { position: relative; white-space: nowrap; }
.quill-rune-gs { display: inline-flex; align-items: center; vertical-align: -0.22em; color: var(--quill-rune, #c7a24b); }
.quill-rune-g { flex: none; overflow: visible; }
.quill-rune-sep { display: inline-block; min-width: .35em; text-align: center; color: var(--quill-muted, #8f8678); }
.quill-rune-text { font-family: var(--quill-mono, ui-monospace, monospace); font-size: .72em; color: var(--quill-muted, #8f8678); margin-left: .3em; letter-spacing: .02em; }
.quill-term .quill-rune-gs { font-size: 1.2em; }
.quill-term .quill-rune-text { font-size: .74em; }
.quill-rune-cols .quill-rune-gs { position: absolute; inset: 0; justify-content: center; vertical-align: 0; }
.quill-rune-cols .quill-rune-text { font: inherit; letter-spacing: 0; margin: 0; color: transparent; }

/* ── Colours (<c>, §4.7) ───────────────────────────────────────────── */
.quill-fg-black { color: var(--quill-black, #77707f); }   .quill-fg-black.quill-bright { color: var(--quill-black-b, #9a92a3); }
.quill-fg-red { color: var(--quill-red, #c8675c); }       .quill-fg-red.quill-bright { color: var(--quill-red-b, #e88f81); }
.quill-fg-green { color: var(--quill-green, #7fa06a); }   .quill-fg-green.quill-bright { color: var(--quill-green-b, #a7c98e); }
.quill-fg-yellow { color: var(--quill-yellow, #c9a457); } .quill-fg-yellow.quill-bright { color: var(--quill-yellow-b, #ecd07e); }
.quill-fg-blue { color: var(--quill-blue, #7f9bc7); }     .quill-fg-blue.quill-bright { color: var(--quill-blue-b, #a8c2ea); }
.quill-fg-purple { color: var(--quill-purple, #b98abf); } .quill-fg-purple.quill-bright { color: var(--quill-purple-b, #dcb2e0); }
.quill-fg-cyan { color: var(--quill-cyan, #72aaa3); }     .quill-fg-cyan.quill-bright { color: var(--quill-cyan-b, #9fd5cd); }
.quill-fg-white { color: var(--quill-white, #dad0be); }   .quill-fg-white.quill-bright { color: var(--quill-white-b, #f4eee2); }
.quill-bg-black { background: var(--quill-bg-black, #000); }    .quill-bg-red { background: var(--quill-bg-red, #5a2420); }
.quill-bg-green { background: var(--quill-bg-green, #24391f); } .quill-bg-yellow { background: var(--quill-bg-yellow, #4a3c1a); }
.quill-bg-blue { background: var(--quill-bg-blue, #1f2b4a); }   .quill-bg-purple { background: var(--quill-bg-purple, #3d2442); }
.quill-bg-cyan { background: var(--quill-bg-cyan, #1d3a37); }   .quill-bg-white { background: var(--quill-bg-white, #dad0be); color: var(--quill-ink, #0c0b14); }
.quill-blink, .quill-c.quill-c-blink { text-decoration: underline wavy; text-underline-offset: .2em; }
/* Colour types: the player's colour (--qc) where the surface has one.
   Only on Quill's own colour spans (.quill-c) and notices: a page may use
   a type's class for its --qc alone (/play/'s stat cards). */
:is(.quill-c, .quill-notice).quill-c-bold { font-weight: 600; color: var(--qc, var(--quill-white-b, #f4eee2)); }
:is(.quill-c, .quill-notice).quill-c-reverse { background: var(--quill-paper, #dad0be); color: var(--quill-ink, #0c0b14); }
:is(.quill-c, .quill-notice).quill-c-mprompt,
:is(.quill-c, .quill-notice).quill-c-pprompt,
:is(.quill-c, .quill-notice).quill-c-objects { color: var(--qc, var(--quill-green, #7fa06a)); }
:is(.quill-c, .quill-notice).quill-c-exits,
:is(.quill-c, .quill-notice).quill-c-clan { color: var(--qc, var(--quill-green-b, #a7c98e)); }
:is(.quill-c, .quill-notice).quill-c-title,
:is(.quill-c, .quill-notice).quill-c-gods { color: var(--qc, var(--quill-yellow-b, #ecd07e)); }
:is(.quill-c, .quill-notice).quill-c-track,
:is(.quill-c, .quill-notice).quill-c-characters { color: var(--qc, var(--quill-yellow, #c9a457)); }
:is(.quill-c, .quill-notice).quill-c-description,
:is(.quill-c, .quill-notice).quill-c-log { color: var(--qc, var(--quill-white, #dad0be)); }
:is(.quill-c, .quill-notice).quill-c-say { color: var(--qc, var(--quill-cyan-b, #9fd5cd)); }
:is(.quill-c, .quill-notice).quill-c-tell,
:is(.quill-c, .quill-notice).quill-c-wounded,
:is(.quill-c, .quill-notice).quill-c-danger { color: var(--qc, var(--quill-red-b, #e88f81)); }
:is(.quill-c, .quill-notice).quill-c-hit,
:is(.quill-c, .quill-notice).quill-c-combat { color: var(--qc, var(--quill-red, #c8675c)); }
:is(.quill-c, .quill-notice).quill-c-socials { color: var(--qc, var(--quill-purple, #b98abf)); }
:is(.quill-c, .quill-notice).quill-c-gossip,
:is(.quill-c, .quill-notice).quill-c-auction,
:is(.quill-c, .quill-notice).quill-c-shout,
:is(.quill-c, .quill-notice).quill-c-arena,
:is(.quill-c, .quill-notice).quill-c-battlefield,
:is(.quill-c, .quill-notice).quill-c-muse,
:is(.quill-c, .quill-notice).quill-c-think,
:is(.quill-c, .quill-notice).quill-c-ponder,
:is(.quill-c, .quill-notice).quill-c-reflect { color: var(--qc, var(--quill-purple-b, #dcb2e0)); }
:is(.quill-c, .quill-notice).quill-c-groups { color: var(--qc, var(--quill-blue-b, #a8c2ea)); }
:is(.quill-c, .quill-notice).quill-c-weather { color: var(--qc, var(--quill-blue, #7f9bc7)); }
:is(.quill-c, .quill-notice).quill-c-magic { color: var(--qc, var(--quill-rune, #c9a457)); }
:is(.quill-c, .quill-notice).quill-c-layer-frame { color: var(--qc, var(--quill-black-b, #9a92a3)); }
:is(.quill-c, .quill-notice).quill-c-examples { color: var(--qc, var(--quill-text, inherit)); }

/* ── Narrow columns (a phone, a narrow window) ─────────────────────── */
/* Measured on the text's own column: a surface makes the element that
   holds Quill's HTML a container (container-type: inline-size; the help
   page's .help-body, the Tribune's .gz-body, /play/'s help window and
   editor). Text outside any container keeps the wide layout. */
@container (max-width: 28em) {
  .quill-img-medium:is(.quill-align-left, .quill-align-right),
  .quill-img-large:is(.quill-align-left, .quill-align-right) { float: none; max-width: 100%; margin: .3em 0 var(--quill-space, 1em); }
  .quill-indent { margin-left: min(calc(var(--quill-l, 1) * 1.2em), 12%); }
  .quill-quote { margin-left: min(calc(var(--quill-l, 1) * 1.2em), 12%); margin-right: min(calc(var(--quill-r, 1) * 1.2em), 12%); padding-left: .7em; padding-right: .7em; }
  .quill-syntax { grid-template-columns: minmax(0, 1fr); }
  .quill-syntax-label { grid-row: auto; }
  .quill-table, .quill-table thead, .quill-table tbody { display: block; }
  .quill-table tr { display: block; border-top: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); padding: .35em 0; }
  .quill-table tbody tr:first-child, .quill-table thead tr { border-top: 0; }
  .quill-table thead tr { border-bottom: 1px solid var(--quill-rule, rgba(128, 128, 128, .25)); }
  .quill-table td, .quill-table thead td { display: block; border: 0; padding: 0; }
  .quill-table .quill-desc { padding-left: 1.2em; }
  .quill-term, .quill-table tr:has(> .quill-desc:empty) > .quill-term { width: auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .quill-grid { font-size: calc(var(--quill-table-size, .89em) * .95); }
  .quill-grid :is(td, th) { padding-right: .8em; }
  .quill-grid :is(td, th):last-child { min-width: 9em; }
}

@media (prefers-reduced-motion: reduce) {
  .quill-art > .quill-art-ascii, .quill-art > .quill-art-picture { transition: none; }
}
