/* VV-Bot site and dashboard styles. Hand written, no framework, no external fonts.
   Colours are tokens on :root so tests can check contrast for both schemes
   (tests/web/test_accessibility.py parses the two blocks below). */

:root {
  color-scheme: light dark;

  --bg: #f5f2e9;
  --surface: #ffffff;
  --surface-2: #ebe6d6;
  --ink: #1b2420;
  --ink-soft: #46514b;
  --line: #d3ccb8;
  --line-strong: #6f7c74;
  --accent: #0b6b4c;
  --on-accent: #ffffff;
  --link: #0a5a40;
  --amber: #7a4a00;
  --amber-bg: #f6dc9b;
  --on-amber: #231600;
  --danger: #a1261c;
  --danger-bg: #fbe6e2;
  --ok: #14602f;
  --ok-bg: #e0f1e4;
  --warn: #75470a;
  --warn-bg: #fbefcf;
  --info: #1d4f6e;
  --info-bg: #e2eef5;
  --focus: #8f4300;
  --focus-band: #ffd98a;
  --band: #14352b;
  --on-band: #f1f6f2;
  --on-band-soft: #bcd2c6;
  --hero-btn: #f3c969;
  --on-hero-btn: #231600;

  --tile-0: #f0c05a;
  --tile-1: #8fd6b4;
  --tile-2: #f1a99a;
  --tile-3: #a7c9e8;
  --tile-4: #d8c3a0;
  --tile-5: #bfe08f;
  --on-tile: #101614;

  --cube-top: #7fd8ae;
  --cube-left: #0b6b4c;
  --cube-right: #064230;
  --cube-gold-top: #f0c05a;
  --cube-gold-left: #b5781a;
  --cube-gold-right: #7a4e0a;

  --radius: 6px;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Rockwell, "Roboto Slab", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101614;
    --surface: #18211e;
    --surface-2: #0c110f;
    --ink: #e9efe9;
    --ink-soft: #aab7af;
    --line: #2b3732;
    --line-strong: #84948b;
    --accent: #4fd6a0;
    --on-accent: #04140d;
    --link: #70e4b6;
    --amber: #f0b255;
    --amber-bg: #3b2a08;
    --on-amber: #fbe9c3;
    --danger: #ff9a90;
    --danger-bg: #3a1613;
    --ok: #7fdb9b;
    --ok-bg: #12301c;
    --warn: #f1c26b;
    --warn-bg: #352607;
    --info: #8fcbea;
    --info-bg: #10293a;
    --focus: #ffcf70;
    --focus-band: #ffd98a;
    --band: #0a1f18;
    --on-band: #eef5f0;
    --on-band-soft: #a9c4b6;

    --cube-top: #4fd6a0;
    --cube-left: #1d8f69;
    --cube-right: #0f5a42;
    --cube-gold-top: #f0b255;
    --cube-gold-left: #bd7e1b;
    --cube-gold-right: #7f510b;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.3em; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; max-width: 68ch; }
li { margin-bottom: 0.3em; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

code, kbd, samp, .mono { font-family: var(--font-mono); font-size: 0.92em; }
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  max-width: 100%;
}
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 46rem); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { top: 0.5rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- header --------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-block: 0.7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand svg { width: 2rem; height: 2rem; }
.brand-mark-tile { fill: var(--accent); }
.brand-mark-a { fill: var(--amber-bg); }
.brand-mark-b { fill: var(--on-accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.3rem; margin-left: auto; align-items: center; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.site-nav a:hover { background: var(--surface-2); }
/* The call-to-action in the nav keeps button colours (the generic nav link rule above is more specific than .btn). */
.site-nav a.btn { color: var(--on-accent); background: var(--accent); padding: 0.25rem 0.65rem; }
.site-nav a.btn:hover { background: var(--accent); filter: brightness(1.08); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.site-nav form { margin: 0; display: inline; }
.nav-user { color: var(--ink-soft); font-size: 0.9rem; padding-inline: 0.5rem; }

/* ---- buttons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--accent);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 0.5rem 1.05rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { border-bottom-width: 2px; transform: translateY(2px); }
.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn.small { padding: 0.25rem 0.65rem; font-size: 0.9rem; border-bottom-width: 3px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.linklike {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--link); text-decoration: underline; cursor: pointer;
}

/* ---- icons ---------------------------------------------------------- */
.icon {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.2em;
}

/* ---- hero and sections ---------------------------------------------- */
.hero { background: var(--band); color: var(--on-band); padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { color: var(--on-band); }
.hero p { color: var(--on-band-soft); font-size: 1.12rem; }
.hero .container { display: grid; gap: 2rem; align-items: center; }
.hero-art { width: min(100%, 22rem); justify-self: center; }
.hero .btn { background: var(--hero-btn); color: var(--on-hero-btn); border-color: var(--hero-btn); }
.hero .btn.secondary { background: transparent; color: var(--on-band); border-color: var(--on-band-soft); }
.hero :focus-visible { outline-color: var(--focus-band); }
.hero a:not(.btn) { color: var(--focus-band); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-band-soft);
  margin-bottom: 0.8rem;
}
.cube-top { fill: var(--cube-top); }
.cube-left { fill: var(--cube-left); }
.cube-right { fill: var(--cube-right); }
.cube-gold-top { fill: var(--cube-gold-top); }
.cube-gold-left { fill: var(--cube-gold-left); }
.cube-gold-right { fill: var(--cube-gold-right); }

@media (min-width: 52rem) {
  .hero .container { grid-template-columns: 1.35fr 1fr; }
}

.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section.alt { background: var(--surface-2); }
.lede { font-size: 1.12rem; color: var(--ink-soft); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card h2, .card h3 { margin-top: 0; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.card.plain { border-left-width: 1px; }
.card.amber { border-left-color: var(--amber); }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); max-width: none; }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 3.4rem;
  position: relative;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0.9rem; top: 0.9rem;
  width: 1.8rem; height: 1.8rem;
  display: grid; place-items: center;
  background: var(--amber-bg); color: var(--on-amber);
  font-family: var(--font-mono); font-weight: 700;
  border-radius: 4px;
}

/* ---- notices and badges --------------------------------------------- */
.notice {
  border: 1px solid var(--line-strong);
  border-left-width: 5px;
  border-radius: var(--radius);
  padding: 0.7rem 0.95rem;
  margin: 0 0 1rem;
  background: var(--surface);
  max-width: 68ch;
}
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.notice.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.notice.info { background: var(--info-bg); color: var(--info); border-color: var(--info); }
.notice p { margin: 0; }
.notice ul { margin: 0.3rem 0 0; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.05rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  vertical-align: middle;
  white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.badge.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info); }

/* ---- tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; max-width: 100%; }
table.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.table caption { text-align: left; padding: 0.4rem 0; font-weight: 700; }
.table th, .table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { background: var(--surface-2); border-bottom: 2px solid var(--line-strong); white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table code { white-space: normal; }

/* ---- forms ------------------------------------------------------------ */
form { margin: 0; }
.field { margin: 0 0 1.25rem; max-width: 40rem; }
.field > label, .field > .field-label, legend.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.field-help { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 0.4rem; }
.field-meta { color: var(--ink-soft); font-size: 0.85rem; margin: 0.3rem 0 0; }
.field-error { color: var(--danger); font-weight: 600; margin: 0.35rem 0 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--danger);
  border-width: 2px;
}
input[type="text"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  max-width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  font: inherit;
  min-height: 2.5rem;
}
textarea { min-height: 5rem; resize: vertical; }
input[type="color"] {
  width: 3rem; height: 2.5rem; padding: 0.15rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.color-row { display: flex; gap: 0.6rem; align-items: center; }
.color-row input[type="text"] { max-width: 12rem; }

.toggle { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 600; }
.toggle input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.9rem 0.9rem; margin: 0 0 1.25rem; max-width: 40rem; }
fieldset legend { padding-inline: 0.4rem; }
.checklist { max-height: 14rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem 0.7rem; background: var(--surface); }
.checklist label { display: flex; gap: 0.5rem; align-items: center; padding: 0.15rem 0; font-weight: 400; }
.checklist input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.checklist .filter { margin-bottom: 0.4rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 1rem; }
.inline-form { display: inline; }

.error-summary { border: 2px solid var(--danger); background: var(--danger-bg); color: var(--danger);
  border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 1.2rem; max-width: 40rem; }
.error-summary h2 { margin: 0 0 0.4rem; font-size: 1.1rem; color: var(--danger); }
.error-summary ul { margin: 0; }

/* ---- dashboard -------------------------------------------------------- */
.dash { display: grid; gap: 1.5rem; padding-block: 1.5rem 3rem; }
@media (min-width: 52rem) {
  .dash { grid-template-columns: 14.5rem minmax(0, 1fr); }
}
.dash-main { min-width: 0; }
.dash-nav { display: flex; flex-direction: column; gap: 0.15rem; align-content: flex-start; }
@media (min-width: 52rem) {
  .dash-nav {
    position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow-y: auto;
    /* Keep the width the same whether or not a scrollbar is needed, so the links never shift. */
    scrollbar-gutter: stable;
  }
}
/* On a phone every group except the one holding the current page starts folded. This is CSS
   only, so there is nothing to repaint after load; tapping a heading unfolds it (vv.js). */
@media (max-width: 51.99rem) {
  .nav-group:not(.is-expanded):not(:has([aria-current="page"])) > ul { display: none; }
}
.dash-nav a {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}
.dash-nav a:hover { background: var(--surface-2); }
.dash-nav a[aria-current="page"] { background: var(--surface); border-color: var(--line-strong); box-shadow: inset 4px 0 0 var(--accent); }
.dash-back { margin-bottom: 0.3rem; }
.nav-group { margin: 0; }
.nav-group summary {
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-radius: var(--radius);
}
.nav-group summary:hover { background: var(--surface-2); }
.nav-group ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.nav-group li { margin: 0; }
.breadcrumb { margin: 0 0 1rem; font-size: 0.9rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; margin: 0; padding: 0; max-width: none; }
.breadcrumb li { margin: 0; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--ink-soft); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.dash-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }

.tile {
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; flex: none;
  border-radius: 6px;
  font-family: var(--font-head); font-weight: 800;
  color: var(--on-tile);
}
.tile.t0 { background: var(--tile-0); }
.tile.t1 { background: var(--tile-1); }
.tile.t2 { background: var(--tile-2); }
.tile.t3 { background: var(--tile-3); }
.tile.t4 { background: var(--tile-4); }
.tile.t5 { background: var(--tile-5); }

.guild-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; max-width: none; }
.guild-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem 0.9rem; margin: 0;
}
.guild-list .name { font-weight: 700; flex: 1 1 12rem; overflow-wrap: anywhere; }
.guild-list .meta { color: var(--ink-soft); font-size: 0.9rem; }

.health { list-style: none; padding: 0; display: grid; gap: 0.6rem; max-width: none; }
.health li { margin: 0; }

.pager { display: flex; gap: 0.7rem; margin-top: 1rem; align-items: center; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---- dashboard components (round 2) ----------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.6rem 1.5rem; }
.page-head h1 { margin-bottom: 0.3em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: flex-end; margin: 0 0 1.2rem; }
.toolbar .field { margin: 0; max-width: 18rem; }
.toolbar .actions { margin: 0; }
.stat-row { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0 0 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; }
.stat .num { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.stat .what { color: var(--ink-soft); font-size: 0.9rem; }
.stat a { text-decoration: none; display: block; color: inherit; }
.empty-state { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.2rem; max-width: 46rem; }
.empty-state h2, .empty-state h3 { margin-top: 0; font-size: 1.1rem; }
.empty-state p:last-child { margin-bottom: 0; }
.cols-2 { display: grid; gap: 1.5rem; }
@media (min-width: 64rem) {
  .cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 1.2rem; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.table-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.table-actions form { margin: 0; }
.table td .field { margin: 0; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: flex-end; }
.inline-fields .field { margin: 0; flex: 1 1 11rem; max-width: 18rem; }
.code-box {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--surface-2);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  width: fit-content;
  max-width: 100%;
  user-select: all;
  overflow-wrap: anywhere;
}
.code-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin: 0 0 1rem; }
.prefix-preview { width: min(100%, 22rem); height: auto; display: block; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.prefix-preview.small { width: 9.5rem; }
.prefix-preview-bg { fill: var(--band); }
.swatch { display: inline-block; width: 1.1rem; height: 1.1rem; vertical-align: -0.2em; border: 1px solid var(--line-strong); border-radius: 3px; }
.embed-preview {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  max-width: 34rem;
}
.embed-preview .embed-title { font-weight: 700; margin: 0 0 0.3rem; overflow-wrap: anywhere; }
.embed-preview .embed-body { white-space: pre-wrap; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.embed-preview .embed-footer { color: var(--ink-soft); font-size: 0.85rem; margin: 0; }
.embed-preview .embed-content { white-space: pre-wrap; margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.status-line { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; margin: 0 0 1rem; }
.sync-table td, .sync-table th { font-size: 0.9rem; }
.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.danger-zone { border: 1px solid var(--danger); border-radius: var(--radius); padding: 0.8rem 1rem; margin: 1.5rem 0; background: var(--surface); }
.danger-zone h2, .danger-zone h3 { margin-top: 0; color: var(--danger); font-size: 1.1rem; }
/* Text that other people wrote (the chat logs): kept as they typed it, never wider than the page. */
.log-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; min-width: 10rem; max-width: 60ch; }
.table details { margin-top: 0.4rem; }
.table details summary { cursor: pointer; color: var(--link); }
.table details ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.log-focus th, .log-focus td { background: var(--surface-2); }
.log-focus td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.wizard-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1.4rem; max-width: none; }
.wizard-steps li { margin: 0; }
.wizard-steps a, .wizard-steps span {
  display: inline-block; padding: 0.3rem 0.7rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem;
}
.wizard-steps [aria-current="step"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.wizard-steps .done { box-shadow: inset 0 -3px 0 var(--ok); }

/* ---- footer ----------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 2rem; margin-top: 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.site-footer h2 { font-size: 0.95rem; margin: 0 0 0.5rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.25rem; }
.disclaimer { margin-top: 1.5rem; color: var(--ink-soft); font-size: 0.9rem; max-width: 80ch; }

.error-page { padding-block: 4rem; }
.error-code { font-family: var(--font-mono); color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn:active { transform: none; }
}
@media print {
  .site-header, .site-footer, .dash-nav, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
