/* Component styles. Design values (colors, fonts, sizes, spacing, radii, opacities,
   the logo) come from the active theme, which theme.css imports; see DESIGN.md.
   Don't put raw colors, font names, opacities or sizes over 3px here: add a token.
   Small optical nudges (1–3px) and breakpoints (media queries can't use tokens) are fine. */

* { box-sizing: border-box; }

/* Ruled paper: a faint paper grain over a thin --color-rule line at the bottom of every
   --rule-gap tile, scrolling with the page. Themes without ruling set --color-rule to
   transparent and --paper-texture to none. */
html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
  background-image: var(--paper-texture), linear-gradient(to bottom, transparent calc(100% - var(--border-width)), var(--color-rule) calc(100% - var(--border-width)));
  background-size: auto, 100% var(--rule-gap);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  border-top: var(--accent-bar-width) solid var(--color-slop);
  /* Fill the window so the margin line always reaches the bottom, and keep the
     footer at the bottom of short pages */
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }

/* Margin line: runs the full height of the page, --margin-gap before the page text, on the
   inline-start side so it mirrors in right-to-left languages. Sits behind the content.
   site.js sets --margin-x (a runtime value, not a theme token) to line it up with the
   "1." of the first chapter in the header; this fallback is the same place: the top bar's
   inline start plus the gutter. */
body::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: var(--margin-x, calc(max(0px, (100% - var(--topbar-width)) / 2) + var(--gutter)));
  width: var(--margin-line-width);
  background: var(--color-margin);
  z-index: -1;
  pointer-events: none;
}

/* Hidden until public/i18n.js has filled in the text, to avoid a flash of empty elements */
.i18n-pending { visibility: hidden; }

.wrap { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--gutter); }
/* The page column starts where the top bar does (not centred), so its text sits just
   --margin-gap after the margin line at every width, like writing on a notebook page */
main.wrap {
  margin-inline: max(0px, (100% - var(--topbar-width)) / 2) auto;
  padding-inline-start: calc(var(--gutter) + var(--margin-line-width) + var(--margin-gap));
}
/* Phones: the line moves in to half the gutter, so the text keeps as much width as it can */
@media (max-width: 639px) {
  main.wrap { padding-inline-start: calc(var(--gutter) / 2 + var(--margin-line-width) + var(--margin-gap)); }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-bold); color: var(--color-text); }
/* Small headings (card and step titles) use the title font, which may differ from the display font */
h3 { font-family: var(--font-title); }
h2 { font-size: var(--text-h2); margin: 0 0 var(--space-4); letter-spacing: var(--tracking-display); }

:focus-visible { outline: var(--focus-ring-width) solid var(--color-trust); outline-offset: 2px; }

/* Top bar: section nav, language picker and theme switcher; stays visible while scrolling */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-topbar);
  backdrop-filter: blur(var(--topbar-blur));
  border-bottom: var(--border-width) solid var(--color-border);
}
/* One row: logo and wordmark on the leading side, the nav chapters after them and the controls
   at the trailing end. Where the row runs out of room the nav drops to a second row of its own */
.topbar-inner { max-width: var(--topbar-width); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-7); padding-block: var(--space-3); }
.topbar-start { display: contents; }
.brand { order: 1; display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-bold); letter-spacing: var(--tracking-display); color: var(--color-text); text-decoration: none; }
.brand-mark {
  inline-size: var(--logo-size);
  block-size: var(--logo-size);
  flex: none;
  background: var(--logo-image) center / contain no-repeat;
}
/* Nav: the chapters in italic, each underlined with a faint rounded bar. The current chapter
   sits on a soft trust pill and its bar is inked in trust blue */
.site-nav { order: 2; flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-evenly; gap: var(--space-2) var(--space-6); counter-reset: chapter; }
/* Each link is a chapter: a muted number before its name, like a table of contents */
.site-nav a::before { counter-increment: chapter; content: counter(chapter) "."; margin-inline-end: var(--space-1); color: var(--color-muted); }
.site-nav a {
  position: relative;
  font-family: var(--font-display);
  font-style: var(--emphasis-style);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-1) var(--space-3);
  margin-block: var(--space-2);
  border-radius: var(--radius-lg);
  transition: background-color var(--duration-state) ease-out;
}
.site-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: calc(-1 * var(--space-2));
  block-size: var(--nav-bar-height);
  border-radius: var(--radius-pill);
  background: var(--color-border);
  transition: background-color var(--duration-state) ease-out;
}
.site-nav a:hover::after { background: var(--color-muted); }
.site-nav a.active { background: var(--color-trust-soft); }
.site-nav a.active::after { background: var(--color-trust); }

/* Settings: a gear button at the trailing end that opens a small menu with the languages and
   themes as flat lists of choices, at every width (on phones it ends the row, after the
   logo). site.js sets data-menu; without scripts the menu stays shut (neither works without them) */
.settings { order: 3; position: relative; }
.settings-panel {
  display: none;
  position: absolute;
  inset-block-start: calc(100% + var(--space-2));
  inset-inline-end: 0;
  z-index: 1;
  min-inline-size: 12em;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
}
[data-menu="open"] > .settings-panel { display: grid; }
.settings-title { margin: 0; font-family: var(--font-ui); font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--color-text); }
.settings-group { display: grid; gap: var(--space-1); }
.settings-label { margin: 0; font-size: var(--text-xs); color: var(--color-muted); }
.settings-icon { inline-size: 1em; text-align: center; }

/* Menu choices in the settings menu: each a full-width row (hover → soft trust). The
   current one is in text colour, bold, with a trust check mark in the leading slot, which is
   kept empty on the others so they line up */
.menu-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  inline-size: 100%;
  font: inherit;
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  text-align: start;
  padding: var(--control-padding-block) var(--space-3) var(--control-padding-block) var(--space-2);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: background-color var(--duration-state) ease-out, color var(--duration-state) ease-out;
}
.menu-option:hover { background: var(--color-trust-soft); color: var(--color-text); }
.menu-option[aria-pressed="true"] { color: var(--color-text); font-weight: var(--weight-bold); }
.menu-check { flex: none; inline-size: var(--icon-size); block-size: var(--icon-size); color: var(--color-trust); visibility: hidden; }
.menu-option[aria-pressed="true"] .menu-check { visibility: visible; }

/* Too narrow for one row (fixed breakpoint: no variables in media queries): the nav takes a
   second row of its own, from the leading edge */
@media (max-width: 819px) {
  .topbar-inner { padding-block-end: var(--space-2); }
  .site-nav { order: 4; flex-basis: 100%; justify-content: flex-start; }
}

/* A tighter top bar where it runs out of room (fixed breakpoint: no variables in media
   queries): the chapters closer together */
@media (max-width: 1279px) {
  .topbar .site-nav { column-gap: var(--space-4); }
}
/* Phones: the bar scrolls away with the page so it doesn't cover a fifth of the screen */
@media (max-width: 639px) {
  .topbar { position: static; }
}

/* Menu button: phones only, and only once site.js has set data-nav on the top bar, so
   without scripts the tabs stay visible */
.nav-toggle,
.settings-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--control-padding-block);
  background: var(--color-surface);
  color: var(--color-muted);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--duration-state) ease-out, color var(--duration-state) ease-out;
}
.settings-toggle { display: inline-flex; }
.nav-toggle svg,
.settings-toggle svg { inline-size: var(--icon-size); block-size: var(--icon-size); display: block; }
.nav-toggle:hover,
.settings-toggle:hover { color: var(--color-text); }
.nav-toggle[aria-expanded="true"],
.settings-toggle[aria-expanded="true"] { background: var(--color-trust); color: var(--color-on-trust); border-color: var(--color-trust); }
/* Phones: the nav folds away behind the menu button and opens as a list down the bar, one
   chapter per row, without the underline bars; the current one keeps its trust pill */
@media (max-width: 639px) {
  .topbar[data-nav] .nav-toggle { display: inline-flex; }
  /* One row: the button on the leading side, then the logo */
  .topbar[data-nav] .topbar-inner { column-gap: var(--space-2); }
  .topbar[data-nav] .brand { margin-inline-end: auto; font-size: var(--text-lg); }
  .topbar[data-nav="closed"] .site-nav { display: none; }
  .topbar[data-nav="open"] .site-nav { flex-direction: column; align-items: flex-start; gap: var(--space-2); padding-block: var(--space-2) 0; }
  .topbar[data-nav="open"] .site-nav a { margin-block: 0; }
  .topbar[data-nav="open"] .site-nav a::after { display: none; }
}

/* Page title: the h1 of every page except Mission */
.page-title {
  margin: 0 0 var(--space-4);
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

/* Sections */
.section { padding: var(--space-8) 0 var(--space-7); }
.section-intro { margin: 0 0 var(--space-6); color: var(--color-muted); max-width: var(--intro-width); font-family: var(--font-reading); font-size: var(--text-lg); line-height: var(--leading-reading); }

/* Chapter heading at the top of every page: a handwritten "Chapter N", then the page title */
.chapter-head { margin-bottom: var(--space-5); }
.chapter-label {
  margin: 0 0 var(--space-2);
  font-family: var(--font-hand);
  font-size: var(--text-lg);
  color: var(--color-slop);
}
.chapter-head .page-title { margin: 0; }

/* Mission */
.mission > p {
  max-width: var(--reading-width);
  margin: 0 0 var(--space-4);
  font-family: var(--font-reading);
  font-size: var(--text-lg);
  line-height: var(--leading-reading);
}
/* The mission's one-line summary, under the chapter title */
.mission > p.mission-lead {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  margin-bottom: var(--space-7);
}
.mission > p strong { color: var(--color-trust); }
.mission > p em {
  background: linear-gradient(transparent var(--highlight-start), var(--color-highlight) var(--highlight-start));
  font-style: var(--emphasis-style);
  padding-inline: 2px;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Why Slopspot? */
.why-grid {
  list-style: none;
  counter-reset: why;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
.why-grid li {
  counter-increment: why;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.why-grid li::before {
  content: counter(why, decimal-leading-zero);
  display: block;
  font-family: var(--font-hand);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-slop);
  margin-bottom: var(--space-1);
}
.why-grid h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.why-grid p { margin: 0; color: var(--color-muted); font-family: var(--font-reading); }

/* How Slopspot works */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: var(--intro-width); }
.steps li { counter-increment: step; position: relative; padding-block: 0 var(--space-6); padding-inline: calc(var(--step-marker-size) + var(--space-5)) 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: var(--step-marker-size);
  height: var(--step-marker-size);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-trust);
  color: var(--color-on-trust);
  font-family: var(--font-hand);
  font-weight: var(--weight-bold);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--step-marker-size) / 2 - 1px);
  top: calc(var(--step-marker-size) + var(--space-1));
  bottom: var(--space-1);
  width: 2px;
  background: var(--color-border);
}
.steps h3 { margin: var(--space-1) 0; font-size: var(--text-lg); }
.steps p { margin: 0; color: var(--color-muted); font-family: var(--font-reading); }
/* A second part of a chapter's page (Why Slopspot? under the mission, MCP under Try the API),
   after a hairline */
.chapter-part { margin-top: var(--space-8); padding-top: var(--space-6); border-top: var(--border-width) solid var(--color-border); }

.api-example h2 { font-size: var(--text-xl); margin: 0 0 var(--space-2); }
.api-example-intro { margin: 0 0 var(--space-4); color: var(--color-muted); font-family: var(--font-reading); }
.api-example-controls { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-3); }
.api-example-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.api-example-choice legend {
  padding: 0;
  margin-bottom: var(--space-2);
  font-family: var(--font-hand);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-trust);
}
.api-example .choice > span { font-size: var(--text-sm); }
.api-example .choice code { font-family: var(--font-mono); font-size: var(--text-xs); }

/* Code sample: a header with the request and a Copy button, then the code */
/* MCP on For Developers: notes under the setup, and the tool list (tool name in mono, then
   what it lists) */
.mcp-note { margin: var(--space-3) 0 0; color: var(--color-muted); font-family: var(--font-reading); max-width: var(--intro-width); }
.mcp-note code, .mcp-tools code { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-text); }
.mcp-tools-title { margin: var(--space-6) 0 var(--space-2); font-size: var(--text-lg); }
.mcp-tools { margin: 0; padding: 0; list-style: none; }
.mcp-tools li { padding-block: var(--space-1); color: var(--color-muted); }
.mcp-tools li code { margin-inline-end: var(--space-2); }
.code-block { border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.code-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); background: var(--color-bg); }
.code-request { flex: 1 1 0; min-width: 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); overflow-wrap: anywhere; }
/* Expander: a chevron at the inline end of the head. It points down while the code is
   hidden and up while it's shown; screen readers get its label and aria-expanded */
.code-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-1);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: background-color var(--duration-state) ease-out, color var(--duration-state) ease-out;
}
.code-toggle:hover { color: var(--color-text); background: var(--color-trust-soft); }
.code-toggle svg { display: block; inline-size: var(--icon-size); block-size: var(--icon-size); transition: transform var(--duration-state) ease-out; }
.code-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Phones: the request line gets its own row above the Copy button and the expander */
@media (max-width: 639px) {
  .code-request { order: -1; flex-basis: 100%; }
  .code-toggle { margin-inline-start: auto; }
}
/* The hairline under the head belongs to the code, so a collapsed block is just its head */
.code-block pre { margin: 0; border-block-start: var(--border-width) solid var(--color-border); padding: var(--space-4); overflow-x: auto; font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-body); tab-size: 4; color: var(--color-text); }
.code-block pre:focus-visible { outline-offset: calc(-1 * var(--focus-ring-width)); }
.code-block pre code { font-family: inherit; }
.button-small { padding: var(--space-1) var(--space-3); font-size: var(--text-sm); }
.api-example-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); margin: var(--space-2) 0 0; font-size: var(--text-sm); }
.api-example-status { color: var(--color-credible); }
.api-example-foot a { color: var(--color-trust); text-decoration: underline; text-underline-offset: 3px; margin-inline-start: auto; }
[dir="rtl"] .api-example-foot .arrow { display: inline-block; transform: scaleX(-1); }
.steps code { font-family: var(--font-mono); font-size: 0.88em; background: var(--color-surface); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); padding: 0 var(--space-1); }

/* Footer on every page: the invitation to the discussion group */
.site-footer {
  border-top: var(--border-width) solid var(--color-border);
  background: var(--color-topbar);
  padding-block: var(--space-5);
  color: var(--color-muted);
  font-family: var(--font-reading);
}
.site-footer p { margin: 0; }
/* Log out: only while signed in as admin, at the trailing end of the footer line */
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.footer-logout { font-family: var(--font-ui); }
/* The footer line starts on the margin line (same position and fallback as body::before) */
.site-footer .wrap {
  max-width: none;
  margin: 0;
  padding-inline: var(--margin-x, calc(max(0px, (100% - var(--topbar-width)) / 2) + var(--gutter))) var(--gutter);
}
.site-footer a { color: var(--color-trust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
.site-footer a:hover { text-decoration-thickness: 2px; }
[dir="rtl"] .site-footer .arrow { display: inline-block; transform: scaleX(-1); }

/* Directory page */
.directory-page { padding-block: var(--space-8); }

/* Directory page: the Map/List switch, then the search, then the filters (two groups of tabs) */
.controls { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-6); }

/* "Watch out for" (AI slop, red, warning sign) and "Rely on" (credible, green, shield), split
   by a dashed line. Colours below are slop; the credible group swaps them for credible */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4) var(--space-6); }
.filter-group + .filter-group { padding-inline-start: var(--space-6); border-inline-start: var(--border-width) dashed var(--color-border); }
.filter-group-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-family: var(--font-hand);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-slop);
}
.filter-group-label svg { inline-size: var(--icon-size); block-size: var(--icon-size); flex: none; }

/* Each group's tabs: one outlined strip in the group's colour, hairlines between the tabs; the
   selected tab is filled. Counts are small soft pills */
.tabs { display: flex; border: var(--border-width) solid var(--color-slop); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  padding: var(--space-2) var(--space-4);
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--duration-state) ease-out, color var(--duration-state) ease-out;
}
.tabs button + button { border-inline-start: var(--border-width) solid var(--color-border); }
.tabs button:hover { background: var(--color-slop-soft); }
.tabs button[aria-selected="true"] { background: var(--color-slop); color: var(--color-on-slop); font-weight: var(--weight-bold); }
.tabs button:focus-visible { outline-offset: calc(-1 * var(--focus-ring-width)); }
.tabs .count {
  min-inline-size: 1.6em;
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-slop-soft);
  color: var(--color-slop);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: var(--leading-body);
  text-align: center;
}
.tabs .count:empty { display: none; }
.tabs button[aria-selected="true"] .count { background: var(--color-on-slop); color: var(--color-slop); }
/* The credible group */
.is-credible .filter-group-label { color: var(--color-credible); }
.is-credible .tabs { border-color: var(--color-credible); }
.is-credible .tabs button:hover { background: var(--color-credible-soft); }
.is-credible .tabs button[aria-selected="true"] { background: var(--color-credible); color: var(--color-on-credible); }
.is-credible .tabs .count { background: var(--color-credible-soft); color: var(--color-credible); }
.is-credible .tabs button[aria-selected="true"] .count { background: var(--color-on-credible); color: var(--color-credible); }
/* Phones: the groups stack, and each group's tabs share its row evenly, wrapping their names */
@media (max-width: 639px) {
  .filters, .filter-group { inline-size: 100%; }
  .filter-group + .filter-group { padding-inline-start: 0; border-inline-start: 0; }
  .tabs button { flex: 1 1 0; white-space: normal; padding-inline: var(--space-2); font-size: var(--text-sm); line-height: var(--leading-tight); }
  .controls { align-items: stretch; }
}

/* Above the filters: full row on phones, up to --search-width wider */
.search { position: relative; inline-size: 100%; max-width: var(--search-width); }
.search-icon { inline-size: var(--icon-size); block-size: var(--icon-size); position: absolute; inset-inline-start: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }
.search input {
  width: 100%;
  font: inherit;
  padding-block: var(--space-2);
  padding-inline: calc(var(--space-3) + var(--icon-size) + var(--space-2)) var(--space-3);
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
@media (max-width: 639px) {
  .search { max-width: none; }
}

/* Map/List switch, first of the controls: drawn like the filter tabs, in trust blue (it
   changes how, not what). On phones its two buttons share the row */
.view-switch { display: flex; border: var(--border-width) solid var(--color-trust); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.view-switch button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  font-size: var(--text-md);
  padding: var(--space-2) var(--space-4);
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--duration-state) ease-out, color var(--duration-state) ease-out;
}
.view-switch button + button { border-inline-start: var(--border-width) solid var(--color-border); }
.view-switch button:hover { background: var(--color-trust-soft); }
.view-switch button[aria-pressed="true"] { background: var(--color-trust); color: var(--color-on-trust); font-weight: var(--weight-bold); }
.view-switch button:focus-visible { outline-offset: calc(-1 * var(--focus-ring-width)); }
.view-switch svg { inline-size: var(--icon-size); block-size: var(--icon-size); flex: none; }
@media (max-width: 639px) {
  .view-switch button { flex: 1 1 0; justify-content: center; }
}

/* Directory page, Map view: the topic map (map.js) and, beside it from 820px (under it below),
   the chosen topic's entries. Colours below are slop; on Reputable websites they're credible */
.topic-map { display: grid; gap: var(--space-6); }
@media (min-width: 820px) {
  .topic-map { grid-template-columns: minmax(0, 1fr) var(--map-panel-width); }
  .map-panel { padding-inline-start: var(--space-6); border-inline-start: var(--border-width) solid var(--color-border); }
}
.map-stage { min-inline-size: 0; }

/* Breadcrumb: the list, then each topic down to the chosen one */
.map-crumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); margin: 0 0 var(--space-3); padding: 0; list-style: none; font-size: var(--text-md); }
.map-crumbs li + li::before { content: "/"; margin-inline-end: var(--space-2); color: var(--color-muted); }
.map-crumbs button { font: inherit; padding: 0; border: 0; background: none; color: var(--color-trust); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.map-crumbs [aria-current] { color: var(--color-text); }

/* The map's window: the ruled paper shows through; drag to pan */
.map-viewport {
  position: relative;
  block-size: min(var(--map-height), 70vh);
  overflow: hidden;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.map-viewport.is-dragging { cursor: grabbing; }
.map-canvas { position: absolute; inset-block-start: 0; inset-inline-start: 0; transform-origin: 0 0; }
.map-links { position: absolute; inset-block-start: 0; inset-inline-start: 0; overflow: visible; pointer-events: none; }
[dir="rtl"] .map-links { transform: scaleX(-1); }
.map-links path { fill: none; stroke: var(--color-muted); stroke-width: var(--map-link-width); }
.map-links path.is-path { stroke: var(--color-trust); }
.map-nodes { margin: 0; padding: 0; list-style: none; }
.map-node-item { position: absolute; inline-size: var(--map-node-width); }

/* A topic: its name and, in a pill, how many entries are in it and under it. Topics on the
   way to the chosen one have a trust border; the chosen one is filled soft trust */
.map-node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  inline-size: 100%;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-size: var(--text-md);
  line-height: var(--leading-tight);
  text-align: start;
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: border-color var(--duration-state) ease-out, background-color var(--duration-state) ease-out;
}
.map-node:hover { border-color: var(--color-trust); }
.map-node.is-root { font-family: var(--font-title); font-size: var(--text-lg); font-weight: var(--weight-bold); }
.map-node.is-path { border-color: var(--color-trust); }
.map-node[aria-current="true"] { background: var(--color-trust-soft); border-color: var(--color-trust); box-shadow: 0 0 0 var(--border-width) var(--color-trust); }
.map-node.is-more { justify-content: center; color: var(--color-muted); font-style: var(--emphasis-style); border-style: dashed; box-shadow: none; }
.map-node-name { min-inline-size: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.map-node-count {
  flex: none;
  min-inline-size: 1.6em;
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-slop-soft);
  color: var(--color-slop);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: var(--leading-body);
  text-align: center;
}
/* Ports where the connectors meet: a dot on each topic's leading edge, and a hollow ring on
   the trailing edge of a topic whose subtopics are folded away (choose it to open them) */
.map-node:not(.is-root)::before,
.map-node.has-hidden::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inline-size: var(--map-port-size);
  block-size: var(--map-port-size);
  border-radius: var(--radius-pill);
  transform: translateY(-50%);
}
.map-node:not(.is-root)::before { inset-inline-start: calc(var(--map-port-size) / -2); background: var(--color-muted); }
.map-node.is-path::before, .map-node[aria-current="true"]::before { background: var(--color-trust); }
.map-node.has-hidden::after { inset-inline-end: calc(var(--map-port-size) / -2); background: var(--color-surface); border: var(--border-width) solid var(--color-trust); }

/* Zoom buttons, stacked at the bottom trailing corner */
.map-zoom { position: absolute; inset-block-end: var(--space-3); inset-inline-end: var(--space-3); display: flex; flex-direction: column; border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; box-shadow: var(--card-shadow); }
.map-zoom-button { display: grid; place-items: center; inline-size: var(--map-control-size); block-size: var(--map-control-size); padding: 0; border: 0; background: transparent; color: var(--color-text); cursor: pointer; }
.map-zoom-button + .map-zoom-button { border-block-start: var(--border-width) solid var(--color-border); }
.map-zoom-button:hover { background: var(--color-trust-soft); }
.map-zoom-button:focus-visible { outline-offset: calc(-1 * var(--focus-ring-width)); }
.map-zoom-button svg { inline-size: var(--icon-size); block-size: var(--icon-size); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-hint { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-muted); }

/* Phones: the map as an outline (map.js adds .is-outline below 640px). The window grows to
   fit the topics, which stack top to bottom at its full width; no panning or zooming, so the
   page scrolls as usual */
.topic-map.is-outline .map-viewport { block-size: auto; cursor: auto; touch-action: auto; user-select: auto; }
.topic-map.is-outline .map-canvas { position: relative; margin: var(--space-3); }
.topic-map.is-outline .map-zoom { display: none; }

/* Side panel: the chosen topic, how many entries it holds, then those entries, newest first */
.map-panel { min-inline-size: 0; }
.map-summary { padding-block-end: var(--space-3); margin-block-end: var(--space-4); border-block-end: var(--border-width) solid var(--color-border); }
.map-panel-title { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); line-height: var(--leading-tight); overflow-wrap: anywhere; }
.map-panel-count { margin: var(--space-1) 0 0; font-size: var(--text-lg); color: var(--color-slop); }
.map-entries { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.map-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-inline-start: var(--card-edge-width) solid var(--color-slop);
  border-radius: var(--radius-md);
}
.map-entry-name { flex: 1 1 100%; font-family: var(--font-title); font-weight: var(--weight-semibold); color: var(--color-text); overflow-wrap: anywhere; }
a.map-entry-name { text-decoration: underline; text-decoration-color: var(--color-border); text-underline-offset: 2px; transition: color var(--duration-state) ease-out; }
a.map-entry-name:hover { color: var(--color-slop); }
.map-entry-detail { margin: 0; font-size: var(--text-sm); color: var(--color-muted); overflow-wrap: anywhere; }
.map-entry-topic { font-size: var(--text-xs); color: var(--color-slop); border: var(--border-width) var(--sign-border-style) var(--color-slop); border-radius: var(--radius-sm); padding: 0 var(--space-2); }
/* Reputable websites */
.topic-map.is-credible .map-node-count { background: var(--color-credible-soft); color: var(--color-credible); }
.topic-map.is-credible .map-panel-count { color: var(--color-credible); }
.topic-map.is-credible .map-entry { border-inline-start-color: var(--color-credible); }
.topic-map.is-credible a.map-entry-name:hover { color: var(--color-credible); }
.topic-map.is-credible .map-entry-topic { color: var(--color-credible); border-color: var(--color-credible); }

/* Directory page: the list as index cards, each with a slop edge, in two columns from 640px.
   Lists with categories (the websites lists) come as groups under a small handwritten heading:
   cards in a group sit close together, and groups sit further apart */
.directory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) {
  .directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.entry {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-inline-start: var(--card-edge-width) solid var(--color-slop);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
}
.entry-group + .entry-group { margin-top: var(--space-8); }
.entry-group-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-hand);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  color: var(--color-text);
}
.entry-group-title .count { font-size: var(--text-md); color: var(--color-muted); }
/* Credible sources (the Reputable websites list) use the credible green instead of slop */
.entry.is-credible { border-inline-start-color: var(--color-credible); }
.entry.is-credible .badge { color: var(--color-credible); background: var(--color-credible-soft); }
.entry.is-credible .signs li { border-color: var(--color-credible); color: var(--color-credible); }
.entry.is-credible .url a:hover { color: var(--color-credible); }
/* The name and address take the room left by the badge, which stays at the top inline-end corner */
.entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.entry-title { flex: 1 1 0; min-width: 0; }
.entry-head .badge { flex: none; }
.entry-name { font-family: var(--font-title); margin: 0; font-size: var(--text-lg); letter-spacing: 0; }
.badge {
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-badge);
  text-transform: uppercase;
  color: var(--color-slop);
  background: var(--color-slop-soft);
  border-radius: var(--radius-sm);
  padding: 2px var(--space-2);
}
.entry .url { margin: var(--space-1) 0 0; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-muted); overflow-wrap: anywhere; }
.entry .url a { color: inherit; text-decoration: underline; text-underline-offset: 2px; transition: color var(--duration-state) ease-out; }
.entry .url a:hover { color: var(--color-slop); }
.entry .channel { margin: var(--space-2) 0 0; font-size: var(--text-md); color: var(--color-muted); }
.entry .desc { margin: var(--space-3) 0 0; font-family: var(--font-reading); font-size: var(--text-md); line-height: var(--leading-reading); }
.entry-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-top: auto; padding-top: var(--space-4); }
.entry .added { margin: 0; margin-inline-start: auto; font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.signs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.signs li { border: var(--border-width) var(--sign-border-style) var(--color-slop); color: var(--color-slop); border-radius: var(--radius-sm); padding: 1px var(--space-2); font-size: var(--text-xs); }

/* Directory page: link to the Report slop page, under the intro */
.report-prompt { margin: calc(-1 * var(--space-3)) 0 var(--space-6); color: var(--color-muted); font-family: var(--font-reading); }
.report-prompt a, .report-done-actions a { color: var(--color-trust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.report-prompt a:hover, .report-done-actions a:hover { text-decoration-thickness: 2px; }
[dir="rtl"] .report-prompt .arrow, [dir="rtl"] .report-done-actions .arrow { display: inline-block; transform: scaleX(-1); }

/* Report slop page: the form, on an index card like the Directory entries */
.report-form, .report-done {
  max-width: var(--intro-width);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-inline-start: var(--card-edge-width) solid var(--color-slop);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}
.report-form[hidden], .report-done[hidden] { display: none; }
.field { margin: 0 0 var(--space-5); padding: 0; border: 0; min-width: 0; }
.field-label { display: block; padding: 0; margin: 0 0 var(--space-2); font-family: var(--font-title); font-weight: var(--weight-bold); font-size: var(--text-lg); color: var(--color-text); }
.field input[type="text"], .field input[type="url"], .field input[type="email"], .field input[type="password"], .field textarea, .field select {
  width: 100%;
  font: inherit;
  font-family: var(--font-reading);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
}
.field input[type="url"] { font-family: var(--font-mono); font-size: var(--text-sm); }
.field textarea { resize: vertical; line-height: var(--leading-reading); }
.field [aria-invalid="true"] { border-color: var(--color-slop); }
.field-hint { margin: calc(-1 * var(--space-1)) 0 var(--space-2); color: var(--color-muted); font-size: var(--text-sm); max-width: var(--reading-width); }
.field-error { margin: var(--space-1) 0 0; color: var(--color-slop); font-size: var(--text-sm); }

/* Choice group: radio buttons drawn like the Directory filters, as one outlined strip with
   hairlines between the choices and the checked one filled. Trust blue by default (For
   Developers); on the report form, slop red or credible green for the kind being reported.
   When a strip wraps (phones), each choice's hairlines on its inline-start and top edges are
   shadows, so the ones on the strip's outer edge are clipped away and only the lines between
   choices show */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  inline-size: fit-content;
  max-inline-size: 100%;
  border: var(--border-width) solid var(--color-trust);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}
.choice { position: relative; flex: 1 1 auto; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  block-size: 100%;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text);
  font-size: var(--text-md);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: calc(-1 * var(--border-width)) 0 0 var(--color-border), 0 calc(-1 * var(--border-width)) 0 var(--color-border);
  transition: background-color var(--duration-state) ease-out, color var(--duration-state) ease-out;
}
[dir="rtl"] .choice > span { box-shadow: var(--border-width) 0 0 var(--color-border), 0 calc(-1 * var(--border-width)) 0 var(--color-border); }
.choice > span svg { inline-size: var(--icon-size); block-size: var(--icon-size); flex: none; }
.choice:hover > span { background: var(--color-trust-soft); }
.choice input:checked + span { background: var(--color-trust); color: var(--color-on-trust); font-weight: var(--weight-bold); }
.choice input:focus-visible + span { outline: var(--focus-ring-width) solid var(--color-trust); outline-offset: calc(-1 * var(--focus-ring-width)); }
/* The report form: AI slop in slop red, a credible website in credible green */
.report-form .choice-group { border-color: var(--color-slop); }
.report-form .choice:hover > span { background: var(--color-slop-soft); }
.report-form .choice input:checked + span { background: var(--color-slop); color: var(--color-on-slop); }
.report-form .choice input:focus-visible + span { outline-color: var(--color-slop); }
.report-form.is-credible .choice-group { border-color: var(--color-credible); }
.report-form.is-credible .choice:hover > span { background: var(--color-credible-soft); }
.report-form.is-credible .choice input:checked + span { background: var(--color-credible); color: var(--color-on-credible); }
.report-form.is-credible .choice input:focus-visible + span { outline-color: var(--color-credible); }
/* Phones: a strip's choices wrap their words rather than run past the screen */
@media (max-width: 639px) {
  .choice > span { white-space: normal; }
}

/* Signs: a checklist of tiles, two columns from 640px, in the form's colour like the choice
   groups above. Each tile has a square box at its inline start; ticked, the box fills with a
   "✓" and the tile takes the soft colour and a coloured border. Slop red, or credible green
   when reporting a credible website */
.sign-choices { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
@media (min-width: 640px) {
  .sign-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sign-choice { position: relative; }
.sign-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sign-choice span {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  block-size: 100%;
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  cursor: pointer;
  transition: background-color var(--duration-state) ease-out, border-color var(--duration-state) ease-out;
}
/* The box: --icon-size square, nudged down to sit on the first line of the label */
.sign-choice span::before {
  content: "";
  display: grid;
  place-items: center;
  flex: none;
  inline-size: var(--icon-size);
  block-size: var(--icon-size);
  margin-block-start: 2px;
  border: var(--border-width) solid var(--color-slop);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-on-slop);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  line-height: 1;
}
.sign-choice:hover span { background: var(--color-slop-soft); }
.sign-choice input:checked + span { border-color: var(--color-slop); background: var(--color-slop-soft); }
.sign-choice input:checked + span::before { content: "✓"; background: var(--color-slop); }
.sign-choice input:focus-visible + span { outline: var(--focus-ring-width) solid var(--color-slop); outline-offset: calc(-1 * var(--focus-ring-width)); }

/* Reporting a credible website (or editing a Reputable entry on the admin page): the card
   and the signs use the credible green */
.report-form.is-credible { border-inline-start-color: var(--color-credible); }
:is(.report-form, .entry).is-credible .sign-choice span::before { border-color: var(--color-credible); color: var(--color-on-credible); }
:is(.report-form, .entry).is-credible .sign-choice:hover span { background: var(--color-credible-soft); }
:is(.report-form, .entry).is-credible .sign-choice input:checked + span { border-color: var(--color-credible); background: var(--color-credible-soft); }
:is(.report-form, .entry).is-credible .sign-choice input:checked + span::before { background: var(--color-credible); }
:is(.report-form, .entry).is-credible .sign-choice input:focus-visible + span { outline-color: var(--color-credible); }
[data-kind][hidden] { display: none; }

/* Hidden field that only bots fill in; kept in the layout's flow but out of sight */
.bot-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.report-note { margin: 0 0 var(--space-4); color: var(--color-muted); font-size: var(--text-sm); }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding-top: var(--space-4); border-top: var(--border-width) solid var(--color-border); }
.report-actions .report-note { margin: 0; }
.form-error { margin: var(--space-4) 0 0; color: var(--color-slop); }

.button {
  font: inherit;
  font-weight: var(--weight-bold);
  padding: var(--control-padding-block) var(--space-5);
  border: var(--border-width) solid var(--color-trust);
  border-radius: var(--radius-pill);
  background: var(--color-trust);
  color: var(--color-on-trust);
  cursor: pointer;
  transition: opacity var(--duration-state) ease-out;
}
.button:hover { text-decoration: underline; }
.button:disabled { opacity: var(--count-opacity); cursor: progress; }
.button-quiet { background: transparent; color: var(--color-trust); }
.button-quiet:hover { background: var(--color-trust-soft); }
/* Destructive actions (reject, delete): slop outline and text, soft slop on hover */
.button-danger { border-color: var(--color-slop); background: transparent; color: var(--color-slop); }
.button-danger:hover { background: var(--color-slop-soft); }

/* After sending */
.report-done:focus { outline: none; }
.report-done-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.report-done h2 { margin: 0; font-size: var(--text-h2); }
.report-done > p { font-family: var(--font-reading); font-size: var(--text-lg); }
.badge.is-pending { color: var(--color-trust); background: var(--color-trust-soft); }
.badge.is-verified { color: var(--color-credible); background: var(--color-credible-soft); }
.report-done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin: var(--space-5) 0 0; }

.status { color: var(--color-muted); }
/* Room for the list before it arrives, so the footer doesn't jump (a layout shift) */
.directory-page #panel { min-height: var(--list-min-height); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The off-screen textarea Copy copies from when the Clipboard API is missing (api-example.js).
   Hidden like .visually-hidden, but keeping line breaks: the copy command copies the text as
   laid out, so nowrap would turn the code's newlines into spaces */
.copy-buffer { position: fixed; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: pre; }

/* Admin page (/admin): the login on a trust-edged form card, then Verify directory entries */
.login-form { border-inline-start-color: var(--color-trust); }
.login-form input[readonly] { color: var(--color-muted); }
.admin-session { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: calc(-1 * var(--space-3)) 0 var(--space-6); color: var(--color-muted); font-family: var(--font-reading); }
/* The two status tabs, in trust blue: they're about review, not slop or credible */
.admin-page .tabs { border-color: var(--color-trust); }
.admin-page .tabs button:hover { background: var(--color-trust-soft); }
.admin-page .tabs button[aria-selected="true"] { background: var(--color-trust); color: var(--color-on-trust); }
.admin-page .tabs .count { background: var(--color-trust-soft); color: var(--color-trust); }
.admin-page .tabs button[aria-selected="true"] .count { background: var(--color-on-trust); color: var(--color-trust); }
/* What the last action did (or why it failed); announced to screen readers */
.admin-message { margin: 0 0 var(--space-4); color: var(--color-muted); }
.admin-message:empty { display: none; }
/* Each card's actions, under a hairline at the bottom of the card */
.entry-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-width) solid var(--color-border); }
/* The status badge keeps its colour on Reputable cards too */
.entry .badge.is-pending { color: var(--color-trust); background: var(--color-trust-soft); }
.entry .badge.is-verified { color: var(--color-credible); background: var(--color-credible-soft); }
/* Reports filed on an entry waiting for review: when, the language, the reporter's email if
   they offered one, and what they wrote, under a hairline */
.entry-reports { margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-width) solid var(--color-border); }
.entry-reports-title { margin: 0 0 var(--space-2); font-family: var(--font-title); font-size: var(--text-md); }
.entry-reports ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.entry-report-meta { margin: 0; font-size: var(--text-xs); color: var(--color-muted); overflow-wrap: anywhere; }
.entry-report-meta a { color: var(--color-trust); }
.entry-report-text { margin: var(--space-1) 0 0; font-family: var(--font-reading); font-size: var(--text-sm); line-height: var(--leading-reading); }
.entry-reports > .entry-report-meta { margin-top: var(--space-3); }
/* Editing an entry: the card takes the full row and holds the form's fields. Translatable
   fields have one input per language, each under a small muted language name */
.entry.is-editing { grid-column: 1 / -1; }
.entry-edit { margin-top: var(--space-4); }
.field-lang { display: block; margin: var(--space-2) 0 var(--space-1); font-size: var(--text-sm); color: var(--color-muted); }
