/* The site's one stylesheet. Plain on purpose: the look gets its own pass
   later, and until then every page should simply be easy to read and use. */

:root {
  color-scheme: light dark;
  --paper: #faf9f6;
  --ink: #17171b;
  --muted: #6a6a75;
  --line: #d9d7d0;
  --field: #ffffff;
  --accent: #17171b;
  --on-accent: #faf9f6;
  --danger: #b3261e;
  --notice: #efece4;
  /* Colours of code in the editor (frontend/editor/look.ts). */
  --code-keyword: #7c2d9c;
  --code-string: #a1361f;
  --code-number: #1e6b3a;
  --code-comment: #6a6a75;
  --code-name: #1d4ed8;
  --code-attribute: #8a5200;
  --code-property: #0f6b78;
  --code-selection: #cfd8ff;
  --code-match: #dfe7c8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121214;
    --ink: #f2f1ec;
    --muted: #9c9ca8;
    --line: #34343b;
    --field: #1b1b1f;
    --accent: #f2f1ec;
    --on-accent: #121214;
    --danger: #ff8a80;
    --notice: #1f1f24;
    --code-keyword: #d6a3f0;
    --code-string: #f2a48b;
    --code-number: #9ad6a8;
    --code-comment: #9c9ca8;
    --code-name: #8db4ff;
    --code-attribute: #e6c070;
    --code-property: #7fd0dc;
    --code-selection: #34406b;
    --code-match: #3d4a2a;
  }
}

* { box-sizing: border-box; }

/* "hidden" in the HTML always wins, whatever else styles the element. */
[hidden] { display: none !important; }

/* For headings that screen readers need and the eye does not. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

a { color: inherit; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

.site-header,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1rem;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
}

.site-name { font-weight: 700; text-decoration: none; }

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.site-header form { margin: 0; }
.site-footer { color: var(--muted); font-size: 0.875rem; margin-top: auto; }

main {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

main.wide { max-width: 44rem; }

main.centered {
  flex: 1;
  display: grid;
  place-content: center;
}

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.25rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.25rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.muted { color: var(--muted); }
section + section { border-top: 1px solid var(--line); margin-top: 1.5rem; }

/* Forms */

form { margin: 0 0 1rem; }
.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.25rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input:not([type]),
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.field-check { display: flex; align-items: flex-start; gap: 0.6rem; }
.field-check input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.field-check label { font-weight: 400; margin: 0; }

.help { color: var(--muted); font-size: 0.875rem; margin: 0.25rem 0 0; }
.help ul { margin: 0; }

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.5rem;
  color: var(--danger);
  font-size: 0.9rem;
}

button,
.button {
  display: inline-block;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

button.quiet,
.button.quiet {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

button.danger,
.button.danger {
  color: var(--paper);
  background: var(--danger);
  border-color: var(--danger);
}

button.link {
  padding: 0;
  font-weight: 400;
  color: inherit;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.providers { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.providers form { margin: 0; }
.providers button { width: 100%; }

/* Notes from the site after an action, and standing notices. */

.messages { list-style: none; padding: 0; margin: 0 0 1.5rem; }

.messages li,
.notice {
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  background: var(--notice);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.messages li.error { border-color: var(--danger); }

/* Lists of settings, one row each. */

.rows { list-style: none; padding: 0; margin: 0; }

.rows li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.rows li:first-child { border-top: 0; }
.rows form { margin: 0; }

/* A switch: a button that sends its form, so it works without a script.
   Its state is aria-checked, which the page sets from the saved choice. */

/* The label shrinks and wraps, so the switch stays at the end of its row. */
.rows li.row-switch { flex-wrap: nowrap; align-items: center; }
.rows li.row-switch > span { flex: 1 1 0; min-width: 0; }

.switch-form { display: flex; align-items: center; gap: 0.6rem; }

button.switch {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 1.5rem;
  padding: 0;
  background: transparent;
  border-color: var(--muted);
  border-radius: 999px;
}

button.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.5rem - 6px);
  height: calc(1.5rem - 6px);
  background: var(--muted);
  border-radius: 50%;
}

button.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
button.switch[aria-checked="true"]::after { left: auto; right: 2px; background: var(--on-accent); }

table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.4rem 0.75rem 0.4rem 0; }
th { border-bottom: 1px solid var(--line); }

/* The QR code for an authenticator app is drawn in black, so it gets a white
   card of its own in the dark theme as well. */
img[src^="data:image/svg"] { background: #fff; padding: 0.5rem; border-radius: 6px; max-width: 14rem; }

mark { background: transparent; color: var(--danger); border-bottom: 1px dashed var(--danger); }

/* A choice between a few options, one per row. The whole row can be clicked. */

fieldset.choices { border: 0; padding: 0; min-width: 0; }
fieldset.choices legend { font-weight: 700; padding: 0; margin-bottom: 0.25rem; }
.choices-group { color: var(--muted); font-size: 0.875rem; margin: 0.5rem 0 0.25rem; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.5rem;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.choice input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.choice:has(input:checked) { border-color: var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* A member's own bits. */

.bit-list { list-style: none; padding: 0; margin: 1.5rem 0; }

.bit-list > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.bit-list-what { flex: 1 1 16rem; min-width: 0; }
.bit-list-title { font-weight: 700; overflow-wrap: anywhere; }
.bit-list p { margin: 0.15rem 0 0; font-size: 0.875rem; }
.bit-list-actions { display: flex; align-items: flex-start; gap: 1.25rem; }

.tags { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tags li {
  margin: 0;
  padding: 0.05rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pages { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }

/* The editor page (templates/bits/editor.html).

   It is the one page made for a wide screen: the code and the preview sit
   side by side. Below 900 pixels there is no room for both, and phones
   cannot be told apart from pasting (specs/4-bits-and-editor.md), so the
   page shows a notice in their place. The title and the tags stay. */

main.editor-page { max-width: 100rem; padding-top: 1rem; }

.bit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin-bottom: 1rem;
}

.save-status { margin-left: auto; text-align: right; color: var(--muted); }
.save-status[data-state="trouble"] { color: var(--danger); font-weight: 700; }
.save-status button { margin-left: 0.5rem; padding: 0.2rem 0.6rem; }

.bit-details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; }

.tag-suggestions { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag-suggestions li { margin: 0; }

.tag-suggestions button {
  padding: 0.05rem 0.6rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
  border-radius: 999px;
}

.workspace { display: none; }
.too-small h2 { margin-top: 0; }

@media (min-width: 900px) {
  .too-small { display: none; }
  .bit-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }
}

.pane { min-width: 0; }
/* The two panes sit side by side, so the line between stacked sections goes. */
.pane + .pane { border-top: 0; margin-top: 0; }

.pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
  margin-bottom: 0.5rem;
}

.pane-head h2 { margin: 0; }
.pane-head .muted { font-size: 0.875rem; }

.code-editor {
  height: clamp(22rem, calc(100vh - 21rem), 60rem);
  overflow: hidden;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.code-editor:focus-within { border-color: var(--ink); }
.code-editor .cm-editor { height: 100%; }
.paste-notice { margin: 0.5rem 0 0; }

/* Every web bit runs in a frame of 800 by 600 that is scaled, never reflowed
   (specs/5-web-preview.md). The stage is that fixed frame. The script keeps
   --preview-scale equal to the width of the box divided by 800, so the stage
   always fills the box exactly. */

.preview-frame {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 800 / 600;
  overflow: hidden;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.preview-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  transform-origin: 0 0;
  transform: scale(var(--preview-scale, 1));
}

.preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
}

/* The running bit. The iframe lies at the top left of the stage, and a second
   one lies exactly on top of it while a new run starts. Whatever is shown is
   on white and as in a light theme, whatever theme the site is in
   (specs/5-web-preview.md). The white belongs to the iframe: the box keeps the
   site's background for when it is empty or stopped. */

.preview-stage iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  border: 0;
  background: #fff;
  color-scheme: light;
}

.preview-notice {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  text-align: center;
  background: var(--field);
}

.preview-notice p { margin: 0; }

/* A card in a list of bits: the whole box is a link to the bit's page, over
   the running bit (templates/bits/stage.html). While the bit rests, a click
   beside its Run button opens the page too. */
.preview-link { position: absolute; inset: 0; }
.preview-link ~ .preview-empty { pointer-events: none; }
.preview-link ~ .preview-empty button { pointer-events: auto; }

.preview-status {
  margin: 0.5rem 0 0;
  max-width: 800px;
  color: var(--danger);
  overflow-wrap: anywhere;
}

/* The page of a bit (templates/bits/bit.html) and the publish page: the
   title, one muted line, then the box at its full 800 pixels. The page is as
   wide as the box and its padding, so that the code and the notices end
   where the box ends. */
main.bit-page { max-width: 52rem; }
main.bit-page .preview-frame { margin-bottom: 0.75rem; }
.bit-page-by { margin-top: 0; }
.bit-author-notice { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: baseline; }

/* The code of a bit, both as the plain <pre> and as the read-only view that
   frontend/code/main.ts puts in its place. */
.code-view {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 40rem;
  overflow: auto;
}

pre.code-view {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  font: 15px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre;
  tab-size: 2;
}

div.code-view { margin-bottom: 0.75rem; }
.code-view .cm-editor { max-height: 40rem; }
.code-view .cm-scroller { overflow: auto; }

/* The licence's text wraps, so that it fits a phone. */
.licence-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.875rem; }

/* The feed (templates/bits/feed.html): the views as a row of links, then the
   cards in a grid. */
main.feed-page { max-width: 72rem; }

.feed-views ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.feed-views li { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: baseline; }
.feed-views li li { font-size: 0.875rem; }
.feed-views a { text-decoration: none; }
.feed-views a:hover { text-decoration: underline; }
.feed-views a[aria-current="page"] { font-weight: 700; }
.feed-views { margin-bottom: 1.5rem; }

.feed {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.feed-card { margin: 0; min-width: 0; }
.feed-card .preview-frame { max-width: none; }
.feed-card-title { margin: 0.5rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }
.feed-card p { margin: 0.15rem 0 0; font-size: 0.875rem; }

/* The replay page (templates/bits/replay.html).

   Unlike the editor, the replay is for phones too: the code and the box sit
   side by side from 900 pixels and one above the other below that. */

main.replay-page { max-width: 100rem; padding-top: 1rem; }
.replay-by { margin-top: 0; }
.replay-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: baseline; }
.replay-problem { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.replay-problem p { margin: 0; }

.replay-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.replay-speed { display: flex; align-items: center; gap: 0.5rem; }
.replay-position { flex: 1 1 12rem; min-width: 8rem; accent-color: var(--accent); }
.replay-count { white-space: nowrap; }
.replay-note { min-height: 1.55em; margin: 0 0 0.75rem; }

.replay-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }

@media (min-width: 900px) {
  .replay-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.replay-code {
  height: clamp(16rem, 60vh, 40rem);
  overflow: hidden;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.replay-code .cm-editor { height: 100%; }
.replay-marks ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.replay-marks li { margin: 0; }

/* Area 8: profiles, likes, comments, remixes and the activity list. */

.new-mark { font-size: 0.75rem; font-weight: 700; color: var(--accent); margin-left: 0.25rem; }

.reactions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem; margin: 0.75rem 0; }
.reactions form { margin: 0; display: flex; align-items: baseline; gap: 0.5rem; }
.reactions button[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }

.chain, .credits { font-size: 0.875rem; color: var(--muted); margin: 0.25rem 0 1rem; padding-left: 1.5rem; }
.credits { list-style: none; padding-left: 0; margin-top: 0; }
.bit-remix-of { margin: 0 0 0.5rem; }

.comments { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.comments li { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.comment-head { margin: 0; font-size: 0.875rem; }
.comment-text { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.comment-quote { margin: 1rem 0; padding-left: 1rem; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.comment-quote p { margin: 0.25rem 0; }
#comments textarea { width: 100%; min-height: 7.5rem; }

.profile-counts { margin-top: 0; }
.profile-follow { margin: 0 0 1.25rem; }

.activity { list-style: none; padding: 0; margin: 0; }
.activity li { border-top: 1px solid var(--line); padding: 0.6rem 0; overflow-wrap: anywhere; }
.activity-day { white-space: nowrap; margin-left: 0.5rem; }

.site-header nav { flex-wrap: wrap; }

/* Reports and moderation (specs/9-reports-and-moderation.md). */

.report-page { max-width: 40rem; }
.report-reasons { border: 1px solid var(--line); padding: 0.75rem 1rem; margin: 1rem 0; }
.report-reasons legend { font-weight: 700; padding: 0 0.4rem; }
.reasons { list-style: none; padding: 0; margin: 0; }
.reasons li { margin: 0 0 0.75rem; }
.reasons label { font-weight: 700; display: flex; align-items: baseline; gap: 0.5rem; }
.reasons .help { margin-left: 1.6rem; }

.tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--line); margin: 1rem 0; }
.tabs a { padding: 0.4rem 0; text-decoration: none; }
.tabs a[aria-current="page"] { font-weight: 700; border-bottom: 2px solid var(--ink); }

.queue { list-style: none; padding: 0; margin: 1rem 0; }
.queue > li { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
.queue p { margin: 0.1rem 0; overflow-wrap: anywhere; }
.queue-state {
  font-size: 0.8rem;
  border: 1px solid var(--line);
  background: var(--notice);
  padding: 0 0.4rem;
}

.case-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.case-list > li { border-left: 2px solid var(--line); padding: 0.1rem 0 0.1rem 0.75rem; margin: 0 0 0.6rem; }
.case-list p { margin: 0.1rem 0; overflow-wrap: anywhere; }
.case-note { color: var(--muted); }

.case-action { border: 1px solid var(--line); padding: 0.75rem 1rem; margin: 0 0 1rem; max-width: 40rem; }
.case-action textarea, .case-action select { width: 100%; }
.case-danger { border-color: var(--danger); }
.case-danger button.danger { border-color: var(--danger); }
.removed-line { margin-top: 0.4rem; }

/* Competitions (specs/10-competition-lifecycle.md). */

.competition-section { border-top: 0; margin-top: 0; }
.competition-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.competition-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.competition-list li:first-child { border-top: 0; }
.competition-title { font-weight: 700; overflow-wrap: anywhere; }
.competition-when { flex-basis: 100%; overflow-wrap: anywhere; }

.stage-box {
  border: 1px solid var(--line);
  background: var(--notice);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}
.stage-box[data-stage="cancelled"] { border-color: var(--danger); }
.stage-line { margin: 0; overflow-wrap: anywhere; }
.stage-reason { margin-top: 0.5rem; overflow-wrap: anywhere; }
.stage-reason p { margin: 0 0 0.5rem; }
.countdown { margin: 0.5rem 0 0; font-size: 1.25rem; }
.countdown .muted { font-size: 1rem; }
.competition-text { overflow-wrap: anywhere; }
.competition-by { margin-top: 2rem; }
.competition-dates th { border-bottom: 0; white-space: nowrap; padding-right: 1.5rem; }
.competition-heading { overflow-wrap: anywhere; }

/* Entries, voting and results (specs/11-competition-entries-voting-results.md). */

.entry-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  max-width: 40rem;
}
.entry-box p { margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.entry-actions a { margin-right: 1rem; }
.entry-started { margin: 0 0 0.5rem; padding-left: 1.25rem; overflow-wrap: anywhere; }
.entry-line { overflow-wrap: anywhere; }

.vote-form { display: flex; align-items: center; gap: 0.5rem; margin: 0.4rem 0 0; }
.vote-form button { padding-top: 0.25rem; padding-bottom: 0.25rem; }

/* Medals say their word as well as showing a colour. */
.medal {
  display: inline-block;
  padding: 0 0.5rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  white-space: nowrap;
}
.medal-gold { background: #e8c547; color: #17171b; border-color: #8a6d00; }
.medal-silver { background: #cfd3d9; color: #17171b; border-color: #6a6f78; }
.medal-bronze { background: #d9a272; color: #17171b; border-color: #8a4e1c; }

.table-wrap { overflow-x: auto; max-width: 100%; margin: 0 0 1rem; }
.table-wrap table { margin: 0; }
.results-table th, .results-table td { padding-right: 1rem; overflow-wrap: anywhere; }
.results-table tbody tr { border-top: 1px solid var(--line); }
.review-table td a { margin-right: 0.75rem; }

.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { padding: 0.25rem 0; overflow-wrap: anywhere; }
.checks li[data-check="fail"] { color: var(--danger); font-weight: 700; }
.checks .check-mark { font-weight: 700; }

.profile-medals { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.75rem; }
.profile-entries { list-style: none; padding: 0; margin: 0 0 1rem; }
.profile-entries li { padding: 0.3rem 0; overflow-wrap: anywhere; }

/* User's voice (specs/12-users-voice.md) */
.suggestions { list-style: none; padding: 0; margin: 1rem 0; }
.suggestions > li { display: flex; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 0.75rem 0; }
.suggestion-body { min-width: 0; flex: 1; }
.suggestion-body p { margin: 0.1rem 0; overflow-wrap: anywhere; }
.suggestion-title { font-weight: 700; }
.vote-box { flex: none; width: 5.5rem; display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-start; }
.vote-box p, .vote-box form { margin: 0; }
.vote-count strong { font-size: 1.25rem; }
.vote-note { font-size: 0.875rem; }
.suggestion-page > .vote-box { flex-direction: row; align-items: center; width: auto; gap: 1rem; margin: 1rem 0; }
.suggestion-text { overflow-wrap: anywhere; }
.editor-box { border: 1px solid var(--line); background: var(--notice); padding: 0.5rem 1rem; margin: 1rem 0; }
.editor-box h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.similar:not(:empty) { margin-top: 0.5rem; padding: 0.5rem 0.75rem; border-left: 2px solid var(--line); }
.similar ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.duplicate-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.duplicate-pair section { border: 1px solid var(--line); padding: 0.5rem 1rem; min-width: 0; overflow-wrap: anywhere; }
.duplicate-pair h2 { font-size: 1rem; margin: 0 0 0.25rem; }
@media (max-width: 30rem) {
  .duplicate-pair { grid-template-columns: 1fr; }
  .vote-box { width: 4.5rem; }
}
fieldset.choices { margin-bottom: 1rem; }
.duplicate-pair { margin-bottom: 1rem; }
