/* =========================
   Base Layout
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Hidden is hidden, whatever display a class gives: one rule for every page */
[hidden] {
  display: none !important;
}

/* The shell on top and at the bottom, the page in between, centered */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--page);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  overflow-x: hidden;
  /* Sliders, boxes and radios in the ink of the logo */
  accent-color: var(--accent);
}

.app {
  width: 100%;
  max-width: 600px;
}

/* The cards of the generator page one under the other, spaced and off the edges of the screen
   as on the other pages (.admin-app); a grid on a wide screen, see the end of this file */
.generator-app {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem 2rem;
}

/* =========================
   Card
========================= */
.card {
  /* The padding of the card, which the bar of the generator page covers to its edges */
  --card-pad: 2rem;
  background: var(--surface);
  padding: var(--card-pad);
  border-radius: 28px;
  box-shadow: 0 20px 40px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================
   Terminal
========================= */
/* The terminal grows with its words: the page scrolls, the latest word at the bottom */
.terminal {
  background: var(--terminal);
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: var(--size-2);
  padding: var(--space-4);
  border-radius: 12px;
  min-height: 200px;
  overflow-x: hidden;
}

/* The command line: the prompt, right after the last line written, in the window of the terminal,
   with its font, its colors and its left edge, as the lines above */
.command-line {
  display: flex;
  align-items: center;
}

/* The prompt keeps its spaces, as the one of the terminal */
.command-prompt {
  white-space: pre;
}

.command-line input[type="text"] {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  caret-color: var(--terminal-text);
}

/* The illustration of a word: at the top of its man page, centered, at most a square of 320 px,
   its mention under it */
.word-figure {
  margin: 0;
  text-align: center;
}

.word-image {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 8px;
}

/* The scene an image was drawn from, for the admin, and [ whole text ] under a card that cut its
   text: a command of the whole width, as [ share ], unfolding its text under it, read as the rest
   of the page; at 320 px under the card, the command was lost in the middle of the page and the
   scene read as a narrow column */
.image-scene,
.card-told-fold {
  display: flex;
  flex-wrap: wrap;
  margin: var(--space-2) 0 0;
}

.image-scene > .term-btn,
.card-told-fold > .term-btn {
  flex: 1 1 100%;
  min-height: 32px;
}

.image-scene-text {
  flex: 1 1 100%;
  margin: var(--space-2) 0 0;
  text-align: left;
}

/* A word being written, letter by letter, before it becomes its block */
.word-typing {
  font-size: var(--size-4);
  overflow-wrap: anywhere;
}

/* A word of the flux: its models, its commands, its detail and its man page under it */
.word-block {
  container: trace / inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-1) 0 var(--space-4);
  line-height: 1.5;
}

.word-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius);
  background: var(--terminal-raised);
  font-size: 12px;
}

/* The commands of the page, in words, as in a terminal */
.command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* The two clears go to the next line together, never one without the other: four commands do not
   hold one row of a phone (459 px of text at 360 px, 328 of room); then Generate and Lists above,
   the two clears under them, each row sharing its room */
.command-group {
  display: flex;
  flex: 1 1 auto;
  gap: inherit;
}

.command-group .cmd {
  flex: 1 1 auto;
}

/* The page about rs-gen: its text of a width that reads well on a wide screen, its four contacts
   of one width, one a row on a phone, too narrow for two */
.about-page .hint {
  max-width: 72ch;
}

.about-mails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16ch, 1fr));
}

/* The card of a word at the top of its page: the size of a card, the whole width on a phone */
.word-card {
  max-width: 380px;
  margin: 0 auto var(--space-4);
}

/* A card follows the round of its frame: the dark border drawn around it is a rectangle, its
   corners cut round, the same distance from the frame all around (the radius of the frame drawn,
   44, and the border, 16, over the 1 080 × 1 509 of the card: 60 / 1 080 and 60 / 1 509); its
   back too */
.word-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5.556% / 3.976%;
}

/* Over each part of a card, a zone with its tooltip, for the eye and the pointer: the text of its
   image and the page under it tell the same */
.word-card {
  position: relative;
}

.card-spot {
  position: absolute;
  cursor: help;
}

/* A corner turns a card over: its back, then its face again, a turn in the hand that stays still
   when the system asks for less motion; 32 px to the touch (2.5.8 asks 24) */
.card-flip {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--action-border);
  border-radius: var(--radius-pill);
  background: var(--action);
  color: var(--on-action);
  font: 700 var(--size-3) / 1 var(--font-mono);
  cursor: pointer;
}

.card-back-face {
  width: 100%;
  height: auto;
}

/* The back hidden until the card is turned: more precise than the images of a card (.word-card img,
   .card-example img), which show, and less than the back of a card turned */
figure > img.card-back-face {
  display: none;
}

.card-turned > img:not(.card-back-face),
.card-turned > .card-spot,
.card-turned > .card-mark {
  display: none;
}

.card-turned > .card-back-face {
  display: block;
}

/* The turn of a card narrows it on its own property, scale, beside the transform of its tilt: a
   transform of another form (perspective, rotations against a scale to 0) cannot be interpolated,
   and the card vanished then came back, unturned */
.card-flipping {
  animation: card-flip 360ms ease-in-out;
}

@keyframes card-flip {
  50% {
    scale: 0 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-flipping {
    animation: none;
  }
}

/* The effects of a card (word-common.js): it tilts with the pointer or the gyroscope, at most by its
   rarity, and a reflection of its rarity crosses it as it moves, none at rest: a soft one for a
   common card, then silver, gold, iridescent; its back too, turned over. Flat when they are turned
   off in My account, and when the system asks for less motion. Its corners are the ones drawn on the
   card */
.card-tilt {
  --card-tilt-most: 4;
  transform: perspective(900px) rotateX(calc(var(--card-tilt-y, 0) * -1deg * var(--card-tilt-most))) rotateY(calc(var(--card-tilt-x, 0) * 1deg * var(--card-tilt-most)));
  transition: transform 120ms ease-out;
}

.card-tilt[data-rarity="uncommon"] {
  --card-tilt-most: 6;
}

.card-tilt[data-rarity="rare"] {
  --card-tilt-most: 8;
}

.card-tilt[data-rarity="mythic"] {
  --card-tilt-most: 10;
}

.card-tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 5.556% / 3.976%;
  pointer-events: none;
  background-size: 300% 300%;
  background-position: calc(50% + var(--card-tilt-x, 0) * 45%) calc(50% + var(--card-tilt-y, 0) * 45%);
  background-image: linear-gradient(115deg, transparent 40%, var(--card-shine-soft-edge) 48%, var(--card-shine-soft) 50%, var(--card-shine-soft-edge) 52%, transparent 60%);
  opacity: calc(var(--card-shine, 0) * 0.35);
  mix-blend-mode: screen;
}

.card-tilt[data-rarity="uncommon"]::after {
  opacity: calc(var(--card-shine, 0) * 0.6);
  background-image: linear-gradient(115deg, transparent 38%, var(--card-shine-silver-edge) 48%, var(--card-shine-silver) 50%, var(--card-shine-silver-edge) 52%, transparent 62%);
}

.card-tilt[data-rarity="rare"]::after {
  opacity: calc(var(--card-shine, 0) * 0.6);
  background-image: linear-gradient(115deg, transparent 34%, var(--card-shine-gold-edge) 46%, var(--card-shine-gold) 50%, var(--card-shine-gold-edge) 54%, transparent 66%);
}

.card-tilt[data-rarity="mythic"]::after {
  opacity: calc(var(--card-shine, 0) * 0.5);
  mix-blend-mode: color-dodge;
  background-image: linear-gradient(115deg, var(--card-mythic-1), var(--card-mythic-2), var(--card-mythic-3), var(--card-mythic-4), var(--card-mythic-5), var(--card-mythic-6), var(--card-mythic-1), var(--card-mythic-2), var(--card-mythic-3));
}

.card-effects-off .card-tilt {
  transform: none;
}

.card-effects-off .card-tilt::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .card-tilt {
    transform: none;
    transition: none;
  }

  .card-tilt::after {
    display: none;
  }
}

/* A card explained: the example beside its list on a wide screen, above it on a phone; each mark on
   the part it names, for the eye only */
.card-anatomy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: flex-start;
}

.card-example {
  position: relative;
  flex: 0 1 360px;
  margin: 0;
}

.card-example img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5.556% / 3.976%;
}

/* Its number over a part of the example: the tooltip of the part under it shows through */
.card-mark {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--surface);
  font: 700 12px / 22px var(--font-mono);
  text-align: center;
}

.card-legend {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding-left: 2em;
  max-width: 60ch;
}

.cmd {
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--action-border);
  border-radius: var(--radius);
  background: var(--action);
  color: var(--on-action);
  font-family: var(--font-mono);
  font-size: var(--size-2);
  white-space: nowrap;
  cursor: pointer;
}

/* A link drawn as a command: its words centered as on a button, across its width too when a phone
   stretches it, not underlined */
a.cmd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.cmd:hover:not(:disabled) {
  background: var(--action-hover);
}

/* The main command of a form, a dialog or a bar, in bold, and it alone: what a press of Enter does
   there; it takes the room left */
.cmd-main {
  flex: 1 1 auto;
  font-weight: 700;
}

/* A line of the terminal keeps its spaces and goes to the next line rather than being cut: at
   320 px, "Last login" lost its last 22 px under the edge of the terminal */
.terminal-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-muted {
  color: var(--terminal-muted);
  margin-bottom: 6px;
}

/* A command written with its prompt, as on the last line: the prompt keeps its spaces */
.terminal-prompt {
  margin-bottom: 6px;
}

.terminal-prompt .terminal-path {
  white-space: pre;
}

.terminal-user {
  color: var(--terminal-user);
  font-weight: 600;
}

.terminal-path {
  color: var(--terminal-path);
}

/* =========================
   Buttons
========================= */
/* WebKit gives the buttons the small font of the system (11 px), Chromium and Firefox
   13.333 px: every button gets the latter, the size of the links drawn as buttons */
button {
  font-size: 13.333px;
}

/* One family of commands on every page and in every dialog, as in a terminal: .cmd, 44 px high,
   the font of the terminal, its words in brackets in its text. A command that erases has its
   words in red */
.cmd.danger {
  color: var(--on-action-danger);
}

/* Off, on every command: its words pale, its background kept, as a command of the terminal; an
   erasure off is no longer red */
.cmd:disabled,
.cmd[aria-disabled="true"],
.cmd.danger:disabled {
  color: var(--on-action-off);
  cursor: not-allowed;
}

/* A row of commands, on every page and in every dialog, takes its whole width: its commands share
   it by the length of their words, every line of the row full */
.button-row > *,
.volet-commands > *,
.trace-buttons > .term-btn,
.command-bar .cmd,
.ai-commands > .cmd,
.style-commands > .cmd,
.form-commands > .cmd,
.i18n-commands > .cmd {
  flex: 1 1 auto;
}

/* =========================
   Form Elements
========================= */
.input-group {
  margin-bottom: 1.2rem;
}

/* The groups of the weights, one gap between each: the sliders, Equal weights, the language,
   the start of the word */
.weights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#model-intensities > .input-group:last-child {
  margin-bottom: 0;
}

.label-title {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

/* A slider is a target of 24 px at least with a mouse (2.5.8), 44 px to the touch (below) */
input[type="range"] {
  width: 100%;
  min-height: 24px;
}

/* The fields of every page, in the colors of the theme rather than those of the browser */
input[type="number"],
input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
  background: var(--surface);
  color: var(--text);
}

/* As high as the commands next to them, in the font of the terminal; a field of several lines
   too, or it keeps the font, the size and the colors of the browser, as a field of the
   encyclopedia of the admin did */
input[type="number"],
input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--size-2);
}

/* Its lines spaced as the text of the page, its room above and under them */
textarea {
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
}

/* A field that only shows a value, as the name of a base entry: on the page, not a box to type
   in. Its text and its border keep their contrast on the page (CONTRASTS of the tests) */
input[type="text"][readonly] {
  background: var(--page);
  border-style: dashed;
  color: var(--muted);
}

/* A native list keeps its own small height in Safari on macOS: drawn here, as high as the fields,
   with its arrow in the colors of the theme */
select {
  appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

input[type="radio"],
input[type="checkbox"] {
  transform: scale(1.1);
}

/* Slider inline */
.slider-inline {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.slider-inline input[type="range"] {
  flex: 1;
}

.slider-value {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
}



/* The title of the weights, and Equal weights on its right, or under it when there is no room */
.weights-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

/* The title of the panel without margins, as the other titles of the panels; the one of the
   settings dialog keeps the margins of the other titles of the dialog */
.weights-head h2 {
  margin: 0;
}

/* Equal weights and All to zero: the whole width under the title, as the commands of the volet;
   side by side when they fit, one under the other in a narrow column */
.weights-presets {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* One a line, of the whole width: three commands never wrap into a ragged row */
.weights-presets .cmd {
  flex: 1 1 100%;
}

/* Weights at random for each word: its own line, under the commands it holds back */
.random-each {
  flex: 1 1 100%;
}

/* Find a list: its name over its field, the whole width under the commands of the weights */
.list-filter {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-filter .label-title {
  margin: 0;
}

.list-filter .hint {
  margin: 0;
}

/* A group of the volet under the weights: its title, then its settings */
.volet-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sheet-settings select {
  width: 100%;
}

/* Shown on a wide screen, see the end of this file, and to a visitor on any screen: a visitor
   has no settings dialog, the weights are under the terminal */
/* The volet: a sheet on a phone, a column on a wide screen (see the end of this file) */
.weights-panel {
  display: none;
}

.volet {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.volet h3 {
  margin: 0;
  font-size: var(--size-3);
}

/* Close at the bottom right of the sheet, at hand */
/* [ close ], at the very bottom of the sheet, under the commands of the volet and of their width */
.sheet-close {
  align-self: flex-end;
}



/* The titles, three levels on every page: the title of a card, "$ man", in the font of the
   terminal, 16 px, bold; the title of a part, a dialog's included, 19 px; the title of a group, a
   legend's included, 16 px; they were 14 to 19 px, of four weights */
.panel-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--size-3);
  font-weight: 700;
}

.card h3:not(.article-word),
dialog h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.card h4,
.card legend,
dialog legend {
  font-size: var(--size-3);
  font-weight: 600;
}

/* The mode of the settings at the top of the volet: two commands side by side, a choice among
   them as a tab among tabs: its words muted, the one chosen in the color of the text, in bold and
   underlined in the accent, as the letters of the index */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mode-switch .cmd {
  border-color: transparent;
  border-bottom: 2px solid var(--card-border);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.mode-switch .cmd:hover:not(:disabled) {
  background: transparent;
  color: var(--text);
}

.mode-switch .cmd[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

.mode-hint {
  margin: 0;
  color: var(--muted);
}

/* The simple mode shows the weights, the start and the end of the word: every other setting waits
   at its value of the advanced mode. The sheets and the images are an account's, the images of one
   that may draw */
body.mode-simple .advanced-only,
body:not(.signed-in) .account-settings,
body:not(.draws) .draws-only {
  display: none;
}

/* Alone in the simple mode, the start of the word is its name over its field, without its choice,
   as the end of the word under it: the same name, the same field */
body.mode-simple .seed-option:not(.advanced-only) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

body.mode-simple #custom-seed-label {
  font-weight: 500;
}

body.mode-simple .weights-panel .seed-option:not(.advanced-only) {
  gap: 0.15rem;
}

body.mode-simple .weights-panel #custom-seed-label {
  font-size: 13px;
}

/* One line for each model: its name, cut when long, then its slider and its value; a list of a
   dozen models no longer runs down the page */
#model-intensities {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

#model-intensities .input-group {
  display: grid;
  grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  margin-bottom: 0;
}

/* The name of a model on two lines at most: cut on one line, "Prénoms masculins …" and
   "Prénoms féminins …" read the same */
#model-intensities .label-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.end-word {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* The tries under the end of the word: a note, as the one of the weights */
.end-word .hint {
  margin: 0;
  color: var(--muted);
}

.weights-panel .input-group {
  margin-bottom: 0.5rem;
}

.weights-panel .label-title {
  margin-bottom: 0.15rem;
  font-size: 13px;
}

.weights-panel .slider-value {
  min-width: 44px;
  font-size: 13px;
}

/* =========================
   How a word was made: the block of a word, in the terminal
========================= */
.trace-attempts {
  margin: 0;
  color: var(--terminal-muted);
}

.trace-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

/* What a word has, at the right of it, in the terminal and in My words: one sign a state, muted;
   a sign under way in the color of the prompt, underlined with dots, still: a wait of a minute
   never blinks (2.2.2) */
.word-marks {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--size-4);
  line-height: 1;
}

.word-sign {
  color: var(--terminal-muted);
  white-space: nowrap;
}

.word-sign-busy {
  color: var(--terminal-user);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.trace-word {
  width: fit-content;
  max-width: 100%;
  font-size: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The word chosen, marked alike at every width: its commands show over Generate, its detail and
   its man page in the third column of a very wide screen */
.word-block.word-current .trace-word {
  border-radius: var(--radius);
  background: var(--terminal-raised);
  box-shadow: -6px 0 0 var(--terminal-raised), 6px 0 0 var(--terminal-raised);
}

/* The letters given as the seed */
.trace-seed {
  color: var(--terminal-muted);
  text-decoration: underline;
}

.trace-key {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trace-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
}

.trace-pie {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.trace-pie circle {
  fill: none;
  stroke-width: 16;
}

/* Letter by letter: #, ch, model, n, context, p, event */
.trace-table {
  width: 100%;
  border-collapse: collapse;
}

.trace-table th {
  padding: 0 8px 4px 0;
  color: var(--terminal-muted);
  font-weight: normal;
  text-align: left;
  white-space: nowrap;
}

.trace-table td {
  padding: 1px 8px 1px 0;
  vertical-align: middle;
  white-space: nowrap;
}

/* Every column at the width of its content */
.trace-table th,
.trace-table td {
  width: 1%;
}

/* The i of each letter, at the right edge */
.trace-table .col-event {
  padding-right: 0;
  text-align: right;
}

/* What happened, unfolded under its letter by its i (hidden until then) */
.trace-table .event-row td {
  padding: 0 0 4px 0;
  white-space: normal;
}

/* An i in the color of its event: red, amber or quiet; a target of 24 px (2.5.8) */
.trace-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  font: 700 12px var(--font-mono);
  cursor: pointer;
}

.trace-i[aria-expanded="true"] {
  box-shadow: inset 0 0 0 2px currentColor;
}

.trace-table tbody tr:hover td {
  background: var(--terminal-border);
}

/* A narrow trace, as on a phone: the number gives way, and the name of the list is cut (the
   color of the letter tells it too), so that the i keeps its room: with names as long as
   "Mots [anglais]" and letters looked at as long as "^aerocha", 88 px pushed it 5 px out at
   393 px */
@container trace (max-width: 400px) {
  .col-index {
    display: none;
  }

  .trace-table .col-model {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Tighter, so that the five columns fit 280 px */
  .trace-table {
    font-size: 11px;
  }

  .trace-table th,
  .trace-table td {
    padding-right: 4px;
  }
}

/* The narrowest trace, as on a 320 px phone: the letters looked at give way too */
@container trace (max-width: 280px) {
  .col-context {
    display: none;
  }
}

.trace-muted {
  color: var(--terminal-muted);
}

.trace-warning {
  color: var(--terminal-warning);
}

.trace-danger {
  color: var(--terminal-danger);
}

.trace-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* [ image ], under the man page, and [ share ], under a page of man: the whole width, 32 px high
   as the other commands of a word */
.image-command .term-btn,
.share-command .term-btn {
  flex: 1 1 100%;
  min-height: 32px;
}

/* How to read a trace and the words refused, opened on demand by a command of the terminal alone
   on its line, as [ scene ]; 32 px high, 24 px being the minimum of WCAG 2.5.8 */
.trace-help,
.trace-refused,
.trace-advanced {
  display: flex;
  flex-wrap: wrap;
}

.trace-help > .term-btn,
.trace-refused > .term-btn,
.trace-advanced > .term-btn {
  flex: 1 1 100%;
  min-height: 32px;
  white-space: normal;
}

.trace-help > ul,
.trace-refused > .trace-refused-words,
.trace-advanced > .trace-settings {
  flex: 1 1 100%;
}

/* The settings of a word in its detail: those that shape it in view, the others folded under
   [ advanced settings ]; a name in bold, then its value */
.trace-settings-part {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trace-settings-title {
  margin: 0;
  font-weight: 700;
}

.trace-settings {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--terminal-muted);
}

.trace-setting-name {
  font-weight: 700;
}

.trace-refused p {
  margin: 4px 0 0;
}

.trace-help ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--terminal-muted);
}

/* The definition of a word asked with [ man ], drawn as a man page */
.trace-man {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trace-man p {
  margin: 0;
}

/* A button of the terminal: [ copy ] */
/* The commands of a word: as written in a terminal, framed lightly; at least 32 px high, 24 px
   being the minimum of WCAG 2.5.8 */
.term-btn {
  min-height: 32px;
  padding: 0 3px;
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: var(--size-2);
  cursor: pointer;
}

.term-btn:hover {
  background: var(--terminal-border);
}

/* An erasure, as the red commands of the page */
.term-btn.danger {
  color: var(--terminal-danger);
}

/* A command that is on, [ saved ] or [ published ]: its words say so, its border and its weight
   show it, as the letter chosen of the encyclopedia */
.term-btn[aria-pressed="true"] {
  border-color: var(--terminal-user);
  font-weight: 700;
}

/* Off, but reachable: its tooltip says why */
.term-btn[aria-disabled="true"],
.term-btn[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--terminal-muted);
  cursor: not-allowed;
}

/* The color of each model of a word: its letters, its swatch, its slice */
.model-1 { color: var(--model-1); }
.model-2 { color: var(--model-2); }
.model-3 { color: var(--model-3); }
.model-4 { color: var(--model-4); }
.model-5 { color: var(--model-5); }
.model-6 { color: var(--model-6); }
.model-7 { color: var(--model-7); }
.model-8 { color: var(--model-8); }

.swatch.model-1 { background: var(--model-1); }
.swatch.model-2 { background: var(--model-2); }
.swatch.model-3 { background: var(--model-3); }
.swatch.model-4 { background: var(--model-4); }
.swatch.model-5 { background: var(--model-5); }
.swatch.model-6 { background: var(--model-6); }
.swatch.model-7 { background: var(--model-7); }
.swatch.model-8 { background: var(--model-8); }

.slice.model-1 { stroke: var(--model-1); }
.slice.model-2 { stroke: var(--model-2); }
.slice.model-3 { stroke: var(--model-3); }
.slice.model-4 { stroke: var(--model-4); }
.slice.model-5 { stroke: var(--model-5); }
.slice.model-6 { stroke: var(--model-6); }
.slice.model-7 { stroke: var(--model-7); }
.slice.model-8 { stroke: var(--model-8); }

/* A start typed by hand: no list gave it, in the muted color of the letters typed */
.model-typed { color: var(--terminal-muted); }
.swatch.model-typed { background: var(--terminal-muted); }
.slice.model-typed { stroke: var(--terminal-muted); }

/* =========================
   Seed Options
========================= */
#seed-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.seed-option {
  display: grid;
  grid-template-columns: 24px 1fr minmax(50px, 1fr);
  align-items: center;
  gap: 10px;
}

.seed-option input[type="text"],
.seed-option input[type="number"] {
  width: 100%;
  min-width: 0;
}

/* The language of the man pages: two choices side by side */
.language-switch {
  margin: 0;
  padding: 0;
  border: 0;
}

.language-switch label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  margin-right: 16px;
  cursor: pointer;
}

/* The legend and the first choice start on the edge of the other labels: the browser shifts
   them by a few pixels */
.language-switch legend {
  padding: 0;
}

.language-switch input {
  margin: 0;
}


/* =========================
   Modal
========================= */
/* A native <dialog> opened with showModal(): the page behind stops answering
   and Escape closes it. The dialog covers the screen and scrolls; its card is
   .modal-content, so a press outside the card lands on the dialog itself. */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
}

.modal::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--surface);
  padding: 1rem;
  border-radius: 28px;
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-x: hidden;
}

/* The parts that scroll on their own hold what is placed in them: the label of the prompt, out of
   sight at the bottom of the terminal, was placed against the page and made it as tall as the
   terminal, with a scrollbar of its own */
.terminal,
.weights-panel,
.word-panel {
  position: relative;
}

/* =========================
   Utilities
========================= */
.hidden {
  display: none;
}

/* Out of sight but still read by screen readers and password managers. An
   empty message takes it instead of .hidden: a live region removed with
   display: none is not announced when its text comes back. !important: the
   rules of the fields and of the messages must not give it a size again. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* The keyboard focus, drawn the same way on every control */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* An element focused by script only, such as the title a dialog opens on, is not a
   control: no ring. Safari would draw one even after a mouse click. */
[tabindex="-1"]:focus {
  outline: none;
}

/* The tooltips drawn by tooltip.js, over the page and over the dialogs */
.tooltip {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--tooltip);
  color: var(--on-tooltip);
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px var(--shadow);
  overflow-wrap: break-word;
}

/* =========================
   Dialogs, messages and the share of a word, on every page
========================= */

/* A row of commands, in a dialog or on a page, the volet included: as many on a line as it holds,
   sharing the whole line by the length of their words, at every width, a phone included. Longer
   words, a text changed in the admin for one, widen their command rather than spill over its
   frame, and go to a second line only when wider than the row */
.button-row,
.volet-commands {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.button-row > * {
  width: auto;
  max-width: 100%;
  white-space: normal;
}

/* [ close ] of the sheet, a command alone, on the whole width */
.sheet-close {
  flex: 1 1 100%;
  width: 100%;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.message {
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

ul.message {
  padding-left: 28px;
}

.message-error {
  background: var(--error-surface);
  color: var(--error-text);
}

.message-warning {
  background: var(--warning-surface);
  color: var(--warning-text);
}

.message-success {
  background: var(--success-surface);
  color: var(--success-text);
}

/* The share of a word, from the generator page or My words: its text or its card, before it goes */
.share-text {
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--page);
  border-radius: 10px;
  font-size: 14px;
}

.share-image {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  border-radius: 10px;
}

/* The box of the etymology, under the choice of the form: on its own line, at reach of a finger */
.share-origin {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

/* A text or a card without a definition: off, until [ man ] writes it */
.share-off {
  opacity: 0.55;
}

/* =========================
   Responsive
========================= */
@media (max-width: 600px) {
  .card {
    --card-pad: 1rem;
  }

  /* As .admin-app on a phone */
  .generator-app {
    padding: 0 0.5rem 1rem;
  }

  /* The terminal nearly fills the phone: the four commands of a word keep one line at 375 px */
  .generator-card {
    --card-pad: var(--space-2);
  }

  .terminal {
    padding: var(--space-3);
  }

  .modal-content {
    padding: 1rem;
    max-width: 100%;
  }

  .seed-option {
    grid-template-columns: 24px 1fr minmax(40px, 1fr);
  }
}

/* A phone: the bar of the generator compact, Generate and Lists on a line, the two clears on the
   next, from 360 px, in the size of every command; up to 430 px, since an iPhone of 402 px put
   [ lists ] on a line of its own */
@media (max-width: 430px) {
  .generator-card .command-bar {
    gap: 4px;
  }

  .generator-card .command-bar .cmd {
    padding: 0 6px;
  }
}

/* A phone or a tablet: the commands stay at hand, at the bottom of the screen, while the words
   scroll; the focus is never hidden under them (2.4.11) */
@media (max-width: 1023px) {
  html {
    scroll-padding-bottom: 80px;
  }

  /* The terminal fills the phone, as a terminal window: the prompt right after the last line, the
     empty room under it, the commands at the bottom of the screen; the card no longer stops half
     way down with the page empty under it */
  .generator-app,
  .generator-card,
  .generator-card .terminal {
    flex: 1;
  }

  /* Only the terminal scrolls, as in an app: the page holds the screen, the bar of the app on top
     and the commands at the bottom stay */
  body.generator-page {
    height: 100dvh;
    overflow: hidden;
  }

  .generator-app,
  .generator-card {
    min-height: 0;
  }

  .generator-card .terminal {
    min-height: 0;
    overflow-y: auto;
  }

  /* The bar takes the whole width and the bottom of the card, and its rounded corners: no square
     corner of it shows past the card (seen on 2026-11-23 on an iPhone) */
  .generator-card .command-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: var(--space-3) calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad));
    padding: var(--space-2) var(--card-pad) var(--card-pad);
    border-radius: 0 0 28px 28px;
    background: var(--surface);
  }
}

/* A wide screen: the volet in a column, left of the terminal, always open; script.js moves it
   there at the same width. The generator page only: the admin page shares .app */
@media (min-width: 1024px) {
  .generator-app {
    max-width: 954px;
    padding: 0 0 2rem;
    display: grid;
    grid-template-columns: 330px 600px;
    grid-template-areas: "weights generator";
    gap: 24px;
    align-items: start;
  }

  .generator-card {
    grid-area: generator;
    padding: 1.5rem;
  }

  .weights-panel {
    display: flex;
    flex-direction: column;
    grid-area: weights;
    padding: 1.5rem;
    gap: var(--space-4);
  }

  /* Always open in its column: no command to open it */
  #open-settings {
    display: none;
  }

  /* Tall enough as well: the page holds still, the terminal and the volet scroll on their own,
     and the commands stay under the terminal, always at hand */
  @media (min-height: 600px) {
    body.generator-page {
      height: 100dvh;
    }

    .generator-app {
      flex: 1;
      min-height: 0;
      grid-template-rows: minmax(0, 1fr);
      align-items: stretch;
      padding-bottom: 1.5rem;
    }

    .generator-card,
    .weights-panel {
      min-height: 0;
    }

    .generator-card .terminal {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }

    .weights-panel,
    .word-panel {
      overflow-y: auto;
    }
  }
}

/* A very wide screen: the word chosen in a third column, right of the terminal (script.js) */
@media (min-width: 1400px) {
  .generator-app {
    max-width: 1380px;
    grid-template-columns: 330px 600px minmax(0, 1fr);
    grid-template-areas: "weights generator word";
  }

  .word-panel {
    display: flex;
    flex-direction: column;
    grid-area: word;
    min-height: 0;
    padding: 1.5rem;
    gap: var(--space-3);
  }

  /* The detail lent by a block is drawn as in its block: the same container */
  .word-panel-body {
    container: trace / inline-size;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--size-2);
  }

  /* The detail and the man page show in the column only: those of the other words stay
     folded in the terminal, open or not, until their word is chosen again */
  .word-block > .word-detail,
  .word-block > .trace-man {
    display: none;
  }
}


.word-block:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* The commands of the word chosen, right under it in the terminal, as the output of a command: its
   five commands in columns of one width, 44 px high, in the colors of the terminal */
.word-commands {
  margin: var(--space-2) 0 var(--space-3);
}

/* The commands of a word, the same everywhere: under the word chosen, in My words, under its page
   man and in the admin, each as wide as its text at least, on as few rows as they need, one as
   long as they hold, each row full; 32 px high, 24 px being the minimum of WCAG 2.5.8 */
.trace-buttons:not(.image-command):not(.share-command) > .term-btn {
  width: auto;
  min-height: 32px;
  padding: 0 6px;
  white-space: nowrap;
}

/* A key or a command and what it does, in two columns, as a help printed in a terminal: the
   name on one line, never cut, in a column as wide as the longest one (gen-all, publish) */
.key-line {
  display: grid;
  grid-template-columns: 8ch 1fr;
  gap: var(--space-2);
}

.key-line > :first-child {
  white-space: nowrap;
}

/* A box and its sentence: a sentence on two lines stays beside its box, not under it */
label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

/* A touch screen: no field under 16 px, or iOS zooms on it as it takes the focus and the page
   slides under the finger (the terminal cut on its right, seen on 2026-11-23 on an iPhone). The
   rule wins over the size of every field, hence its !important. The terminal takes the same size,
   so that its prompt and its lines stay alike; a slider is 44 px high to the touch (2.5.8) */
@media (pointer: coarse) {
  input:not([type="checkbox"], [type="radio"], [type="range"]),
  select,
  textarea,
  .prompt-highlight {
    font-size: max(16px, 1em) !important;
  }

  .terminal {
    font-size: 16px;
  }

  input[type="range"] {
    min-height: 44px;
  }
}

/* The encyclopedia as a wiki: the letters, an index of one line a word (the word, its first
   sense cut to the line, its mark), then the page of a word */
.encyclo-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--space-2) 0;
}

/* Compact, the 27 of them on fewer rows: 30 px, 24 px being the minimum of WCAG 2.5.8. A choice
   among them, as a tab among tabs: its words muted, the one chosen in the color of the text,
   in bold and underlined in the accent, as the tabs of every page */
.encyclo-letters .cmd {
  min-width: 30px;
  min-height: 30px;
  padding: 0 6px;
  border-color: transparent;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.encyclo-letters .cmd:hover:not(:disabled) {
  background: transparent;
  color: var(--text);
}

.encyclo-letters .cmd[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

/* The index in the terminal, as a dictionary reads ("rends ça plus sexy, c'ets brouillon et un peu
   illisible"): the word, larger, the mark of a word typed, the number of its card and its marks as
   small labels on the same line; its first sense under them, on two lines at most, in the color of
   the text */
.encyclo-index {
  list-style: none;
  margin: 0;
}

.encyclo-index.terminal {
  min-height: 0;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.encyclo-index:empty {
  display: none;
}

.encyclo-line + .encyclo-line {
  border-top: 1px solid var(--terminal-border);
}

.encyclo-word {
  color: var(--terminal-text);
  overflow-wrap: break-word;
}

/* A mark in stars, wherever a mark is read: five stars outlined in the color of a hint, filled in
   gold up to the mark; the height of the text around */
.stars {
  display: inline-block;
  width: 5.5em;
  height: 1.1em;
  vertical-align: -0.2em;
}

.star-empty,
.star-full {
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.star-empty {
  fill: none;
  stroke: var(--terminal-muted);
}

.star-full {
  fill: var(--star);
  stroke: var(--star);
}

/* The translation of the pages as it goes, for the admin: a bar of the whole width in the accent,
   its words under it */
.translate-progress {
  margin: var(--space-2) 0 0;
}

.translate-progress progress {
  display: block;
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}

.translate-progress .hint {
  margin-top: var(--space-1);
}

/* A line of a list, one form for every list: its name in the font of the terminal and in
   bold, its labels, then what it tells; a thin line between two lines, the same room in each, no
   box (the styles, the texts and the lists of the catalogue were boxes); a line that folds says so
   on its right (▸ ▾), one that leads to a page is a link whole. The lines of the terminal draw
   their line in its colors */
.account-line,
.style-line,
.i18n-card,
.model-card,
.words-line,
.encyclo-line-link {
  padding: var(--space-3) var(--space-1);
}

/* A line that opens something, whole, reacts the same in every list: its name underlined under the
   pointer or the focus, the line tinted while it is pressed, the finger of a phone included */
.words-line:hover .words-name,
.account-line:hover .account-line-name,
.encyclo-line-link:hover .encyclo-word,
.encyclo-line-link:focus-visible .encyclo-word {
  text-decoration: underline;
}

.words-line:active,
.account-line:active,
.encyclo-line-link:active {
  background: var(--line-pressed);
}

.account-item + .account-item,
.style-line + .style-line,
.i18n-card + .i18n-card,
.model-card + .model-card {
  border-top: 1px solid var(--card-border);
}

.account-line-name,
.words-name,
.style-name,
.encyclo-word,
.model-card-head .model-name,
.i18n-key {
  font-family: var(--font-mono);
  font-size: var(--size-3);
  font-weight: 700;
}

/* A label next to a name, one form on every page: a word in a thin frame, light beside the
   words, in the colors of the page or of the terminal; a state takes a color, its words and its
   frame (a text to translate, a page waiting) */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.terminal .pill {
  border-color: var(--terminal-border);
  color: var(--terminal-muted);
}

.pill.pill-waiting {
  border-color: var(--warning-text);
  color: var(--warning-text);
}

/* The rarity of a word in a list: the name of its level, framed in the color of its level, as the
   frame of its card */
.pill.rarity-tag[data-rarity="common"] {
  border-color: var(--rarity-common);
}

.pill.rarity-tag[data-rarity="uncommon"] {
  border-color: var(--rarity-uncommon);
}

.pill.rarity-tag[data-rarity="rare"] {
  border-color: var(--rarity-rare);
}

.pill.rarity-tag[data-rarity="mythic"] {
  border-color: var(--rarity-mythic);
}

.terminal .pill.pill-waiting {
  border-color: var(--terminal-warning);
  color: var(--terminal-warning);
}

/* Its marks in stars, a label among the labels of its line */
.encyclo-rating {
  display: inline-flex;
  align-items: center;
}

.encyclo-sense {
  grid-area: sense;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: var(--terminal-text);
  line-height: 1.5;
}

/* The page of a word in the terminal too: its lists as a line of My words */
.encyclo-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
}

.encyclo-page p {
  margin: 0;
}

/* The page of a word as a dictionary reads it: the bar of its lists across the page, [ detail ]
   on its line */
.encyclo-composition {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.encyclo-composition .words-bar {
  flex: 1;
  width: auto;
  max-width: none;
  height: 8px;
  border-radius: 4px;
}

/* How it was made, unfolded under its bar: the detail of the generator (.word-detail), narrowed
   on a phone as in a word of the terminal: the same container */
.encyclo-creation {
  container: trace / inline-size;
}

/* The word as the title of its article, its pronunciation, its kind and its language in pills */
.article-word {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--terminal-text);
  overflow-wrap: anywhere;
}

.article-pron {
  color: var(--terminal-muted);
}

.article-labels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.article-senses {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding-left: 3ch;
}

.article-example {
  font-style: italic;
  color: var(--terminal-muted);
}

.article-title {
  font-weight: 700;
}

/* On the page of a word: the way back to the index, a page at random, the page before and after,
   side by side */
.encyclo-article .encyclo-nav {
  justify-content: flex-start;
  margin: 0 0 var(--space-3);
}

/* Its four commands, the navigation between the pages as the tabs: the same width from the
   start, each text on one line; two by two when the four do not hold on one line */
.encyclo-article .encyclo-nav > * {
  flex: 1 1 0;
  white-space: nowrap;
}

/* The wait of an AI, the same everywhere: a panel of the terminal, the step under way in words
   on top when there are several, a row per step (its mark, its name, its seconds on the right),
   the phrase under the step under way */
.ai-wait {
  margin: var(--space-2) 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  background: var(--terminal-raised);
  color: var(--terminal-muted);
  font-family: var(--font-mono);
  line-height: 1.5;
}

.ai-wait-title {
  margin: 0 0 var(--space-1);
  font-weight: 700;
}

.ai-wait-step {
  display: grid;
  grid-template-columns: 1.5em minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: baseline;
}

.ai-wait-now {
  color: var(--terminal-text);
  font-weight: 700;
}

.ai-wait-time {
  font-variant-numeric: tabular-nums;
}

.ai-wait-phrase {
  margin: var(--space-1) 0 0 calc(1.5em + var(--space-2));
  font-style: italic;
}

/* The one mention of AI under a man page, on every page */
.ai-mention {
  margin-top: var(--space-3);
}

/* The style of the drawing of a kept word: its name over its list, as the other fields */
.draw-style {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 24rem;
  margin: var(--space-2) 0;
}

/* The pages of a long list, the same everywhere: the page shown as the letter chosen */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: var(--space-2) 0;
}

/* A page among the pages, as a letter among the letters and a tab among the tabs: its words
   muted, the page shown in the color of the text, in bold and underlined in the accent */
.pager .pager-page {
  min-width: 32px;
  min-height: 32px;
  padding: 0 8px;
  border-color: transparent;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.pager .pager-page:hover:not(:disabled) {
  background: transparent;
  color: var(--text);
}

.pager .pager-page[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

.pager-gap {
  color: var(--muted);
}
