:root {
  /* Look B "dark graphite and orange": always dark, it does not follow the device. */
  color-scheme: dark;
  --bg: #111317;
  --surface: #1a1d22;
  --surface-2: #15181c;
  --text: #e7e5e4;
  --text-2: #d6d3d1;
  --muted: #a8a29e;
  --border: #2d323a;
  --border-strong: #444b55;
  --accent: #fb923c;
  --on-accent: #1c0a00;
  --shadow: none;
  --header-bg: #1b1f24;
  --header-text: #f5f5f4;
  --header-line: rgb(255 255 255 / 0.25);
  --header-focus: #fcd34d;
  --header-accent: #f97316; /* the orange line under the title bar */
  --search-bg: #1a1e24;
  --search-text: #e7e5e4;
  --search-icon: #a8a29e;
  --search-border: #2d323a;
  --add-bg: #f97316;
  --add-text: #431407;
  --ok-bg: #14532d;
  --ok-text: #bbf7d0;
  --warn-bg: #422006;
  --warn-text: #fde68a;
  --warn-line: #f59e0b;
  --danger-bg: #7f1d1d;
  --danger-text: #fecaca;
  --code-bg: #000000; /* command boxes: black like the cmd window */
  --code-text: #e7e5e4;
  --code-border: #2d323a;
  --prompt: #86efac;
  --mark: #f59e0b;
  --teal: #5eead4;
  --teal-chip: #134e4a;
  --blue: #93c5fd;
  --blue-chip: #1e3a8a;
  --blue-chip-text: #dbeafe;
  --grey-chip: #2d323a;
  --amber: #fcd34d;
  --amber-chip: #78350f;
  --purple: #c4b5fd;
  --purple-chip: #4c1d95;
  --green: #86efac;
  --green-chip: #14532d;
  --fab-bg: #c2410c; /* the Ask AI button */
  --fab-hover: #9a3412;
  --pdf-bg: #7f1d1d;
  --pdf-text: #fecaca;
  --txt-bg: #312e81;
  --txt-text: #c7d2fe;
  --zip-bg: #581c87;
  --zip-text: #e9d5ff;
  --pic-bg: #134e4a;
  --pic-text: #99f6e4;
  --radius: 10px;
  --page: 728px; /* width of the reading column on a PC */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h2 { font-size: 1.25rem; font-weight: 650; margin: 12px 0 8px; }

button {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
}
button:hover { border-color: var(--border-strong); }
button:focus-visible, input:focus-visible, .result:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); color: var(--on-accent); border: none; font-weight: 600; }
.wide { width: 100%; margin-top: 16px; }

/* Header: title bar (stays at the top) and the search band below it, lined up with the reading column */
.topbar, .search-band {
  padding-left: max(16px, calc((100% - var(--page)) / 2));
  padding-right: max(16px, calc((100% - var(--page)) / 2));
  background: var(--header-bg);
  color: var(--header-text);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 3px solid var(--header-accent);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-bottom: 10px;
}
.topbar button:focus-visible, .search-box:focus-within { outline: 3px solid var(--header-focus); outline-offset: 2px; }
.logo { flex: none; width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2); }
.topbar h1 { flex: 1; margin: 0; font-size: 1.15rem; font-weight: 650; letter-spacing: 0.01em; }
.topbar .icon-button {
  min-width: 44px;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--header-text);
  background: transparent;
  border-color: var(--header-line);
}
.topbar .icon-button:hover { background: rgb(255 255 255 / 0.08); }
.add-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--add-bg);
  color: var(--add-text);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}
.search-band { padding-top: 2px; padding-bottom: 16px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  border-radius: 999px;
  color: var(--search-icon);
}
.search-box svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  font: inherit;
  font-size: 1.1rem;
  color: var(--search-text);
  background: transparent;
  border: none;
}
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: var(--search-icon); }

.text-size-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.text-size-label { min-width: 3.5em; text-align: center; font-weight: 600; }

main { max-width: calc(var(--page) + 32px); margin: 0 auto; padding: 4px 16px 96px; } /* room below for the Ask AI button */

.status { margin: 12px 2px; color: var(--muted); font-size: 0.9rem; }
#status:empty { display: none; }
.banner {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--warn-line);
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-text);
}
.banner strong { display: block; }

/* Section headings with a small coloured icon */
.section-heading { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; font-size: 1rem; font-weight: 650; }
.heading-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}
.heading-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tone-teal { color: var(--teal); }
.tone-teal .heading-icon { background: var(--teal-chip); }
.tone-blue { color: var(--blue); }
.tone-blue .heading-icon { background: var(--blue-chip); }
.tone-amber { color: var(--amber); }
.tone-amber .heading-icon { background: var(--amber-chip); }
.tone-grey { color: var(--muted); }
.tone-grey .heading-icon { background: var(--grey-chip); }
.tone-purple { color: var(--purple); }
.tone-purple .heading-icon { background: var(--purple-chip); }
.tone-green { color: var(--green); }
.tone-green .heading-icon { background: var(--green-chip); }

/* Front screen (search box empty) */
.daily {
  margin: 12px 0 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--add-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.daily:hover { border-color: var(--border-strong); border-top-color: var(--add-bg); }
.daily:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.daily-label { margin: 0 0 2px; color: var(--amber); font-size: 0.8rem; font-weight: 650; letter-spacing: 0.02em; }
.home-note { margin: -6px 0 8px 34px; color: var(--muted); font-size: 0.8rem; }
.cmd-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.cmd-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 0;
  padding: 10px 14px;
  text-align: left;
  background: var(--surface);
  border: none;
  border-radius: 0;
}
.cmd-row:hover { background: var(--surface-2); }
.cmd-row:focus-visible { outline-offset: -3px; }
.cmd-name { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cmd-task { color: var(--muted); font-size: 0.85rem; }
.cmd-list:not(.expanded) .extra { display: none; }
.home-actions { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 8px 2px 0; }
.home-actions .lib-link, .chips .lib-link { min-height: 36px; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips .chip { overflow-wrap: anywhere; text-align: left; }
.chip.chip-example { background: var(--blue-chip); color: var(--blue-chip-text); border-color: transparent; }
.chip.chip-recent { border-style: dashed; border-color: var(--border-strong); }
.home-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 14px;
  text-align: left;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.home-tool .heading-icon { background: var(--blue-chip); color: var(--blue); }
.home-tool-text { flex: 1; min-width: 0; }
.home-tool strong { display: block; font-weight: 650; }
.home-tool small { display: block; color: var(--muted); font-size: 0.85rem; }
.home-tool .go { color: var(--accent); font-weight: 650; }

/* Show output checker */
.check-input {
  display: block;
  width: 100%;
  min-height: 12em;
  padding: 10px 12px;
  font: 0.85rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--code-text);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}
.check-input::placeholder { color: #7c8aa3; }
.check-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.knows { margin: 6px 2px 0; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.knows-list { margin: 8px 0 4px; padding: 8px 12px; }
.knows-list summary { color: var(--accent); font-size: 0.9rem; font-weight: 600; }
#check-results { scroll-margin-top: 80px; }
.check-tally { margin: -2px 0 6px; }
.finding {
  margin: 10px 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.finding > .badge:first-child { display: inline-block; }
.finding-title { margin: 6px 0 4px; font-size: 1.02rem; font-weight: 650; overflow-wrap: anywhere; }
.check-label { margin: 10px 0 2px; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.quote {
  margin: 4px 0;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.82em;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.finding-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.finding-links .lib-link { min-height: 32px; text-align: left; }
.finding-ok {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 8px 0;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.92rem;
}
.finding-ok strong { font-weight: 600; }
.finding-ok-text { flex-basis: 100%; color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.table-wrap { margin-top: 8px; overflow-x: auto; }
.check-read table { border-collapse: collapse; font-size: 0.85rem; }
.check-read th, .check-read td { padding: 4px 14px 4px 0; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
.check-read th { color: var(--muted); font-weight: 650; }

@media (min-width: 700px) {
  .cmd-list { grid-template-columns: 1fr 1fr; }
  .cmd-list:not(.expanded) .extra { display: flex; }
  .show-all { display: none; }
}

/* Lessons found by their name, above the page results */
.results-label { margin: 12px 2px 6px; color: var(--muted); font-size: 0.85rem; font-weight: 650; }
.lessons-found { margin: 0 0 6px; }
.lesson-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* long names wrap instead of widening the list */
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.lesson-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  text-align: left;
  background: var(--surface);
  border: none;
  border-radius: 0;
}
.lesson-row:hover { background: var(--surface-2); }
.lesson-row:focus-visible { outline-offset: -3px; }
.lesson-list:not(.expanded) .extra { display: none; }
.lesson-text { flex: 1; min-width: 0; }
.lesson-name { display: block; font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
.lesson-row small { display: block; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.lesson-row .tag { flex: none; }
.lesson-row .go { color: var(--accent); font-weight: 650; }
.lessons-found .lib-link { min-height: 36px; margin: 6px 2px 0; }

/* Results */
.result {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.result:hover { border-color: var(--border-strong); }
.result.partial { border-style: dashed; border-color: var(--muted); box-shadow: none; }
.source { margin: 0 0 6px; font-size: 1.05rem; font-weight: 650; color: var(--accent); overflow-wrap: anywhere; }
.detail-title { margin: 0 0 6px; font-size: 1.25rem; font-weight: 650; overflow-wrap: anywhere; }
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.badge { padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.warn { background: var(--warn-bg); color: var(--warn-text); }
.badge.danger { background: var(--danger-bg); color: var(--danger-text); }
.badge.user { background: var(--purple-chip); color: var(--text); }
/* An online answer searched outside the trusted sites, and the offer to search that way. */
.ask-wider { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); font-size: 0.9rem; }
.ask-wider-offer { margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 14px; }
.ask-wider-offer .status { margin: 0 0 8px; }
/* A ticket note or message in the helpdesk kit: plain text you copy, kept in its lines. */
.kit-text { margin: 8px 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.tag { padding: 1px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; }
.tag-pdf { background: var(--pdf-bg); color: var(--pdf-text); }
.tag-text { background: var(--txt-bg); color: var(--txt-text); }
.tag-zip { background: var(--zip-bg); color: var(--zip-text); }
.tag-picture { background: var(--pic-bg); color: var(--pic-text); }
/* Text read from a picture can be wrong: a quiet note says so, and the picture is shown above its text. */
.picture-note { display: flex; align-items: center; gap: 6px; margin: 8px 0; padding: 5px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--muted); font-size: 0.85rem; }
.picture-note svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
figure.picture { margin: 12px 0; }
figure.picture img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.picture-text-label { margin: 14px 0 4px; font-weight: 650; color: var(--text-2); }
.piece-body { margin-top: 8px; color: var(--text-2); }
.piece-body .text { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.code {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-border);
  border-radius: 10px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prompt { color: var(--prompt); }
.cut { margin: 0; color: var(--muted); line-height: 1; }
.slide-title { margin: 6px 0 4px; font-weight: 650; color: var(--text); }
.points { margin: 4px 0; padding-left: 1.2em; }
.points li { margin: 0 0 6px; padding-left: 2px; overflow-wrap: anywhere; }
.points li::marker { color: var(--muted); }
.piece-body .text, .points { max-width: 70ch; }
.more { margin: 6px 0 0; color: var(--accent); font-size: 0.875rem; font-weight: 600; }
mark { padding: 0; border-radius: 0; background: none; color: inherit; font-weight: 650; text-decoration: underline 2px var(--mark); text-underline-offset: 3px; }
.empty {
  margin-top: 16px;
  padding: 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Detail, summary and files views */
.back { margin: 4px 0 8px; color: var(--accent); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pager button:only-child { margin-left: auto; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.metric { padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.metric span { display: block; color: var(--muted); font-size: 0.85rem; }
.metric strong { font-size: 1.6rem; font-weight: 650; color: var(--accent); }
details {
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
summary { cursor: pointer; }
details li { font-size: 0.9rem; overflow-wrap: anywhere; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-info .meta { display: block; }
.file-info .tag { margin-right: 6px; }

/* Troubleshooting checklists */
.checklist {
  margin: 12px 0 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--add-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.checklist-heading { margin: 0; font-size: 1.1rem; }
.checklist-title { margin: 6px 0 8px; color: var(--muted); font-size: 0.95rem; }
.gk-note {
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.layer-name { margin: 14px 0 6px; color: var(--muted); font-size: 0.8rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.step { margin: 8px 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.step-title { margin: 0 0 4px; font-weight: 650; }
.step-device { margin: 0 0 4px; color: var(--muted); font-size: 0.85rem; }
.step-text { margin: 6px 0; font-size: 0.95rem; }
.step-warning { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: var(--danger-bg); color: var(--danger-text); font-size: 0.95rem; }
.lib-link {
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.show-more { width: 100%; margin-top: 6px; color: var(--accent); font-weight: 600; }
.disclaimer { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.others { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.chip { min-height: 36px; padding: 4px 12px; border-radius: 999px; font-size: 0.9rem; color: var(--text); }
.list-button { display: block; width: 100%; margin: 8px 0; padding: 12px 14px; text-align: left; border-radius: 12px; font-weight: 600; }
.list-button small { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }

/* Command reference */
.ref-card { margin: 10px 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.ref-task { margin: 0 0 4px; font-size: 1.05rem; font-weight: 650; }
.topic { padding: 0; }
.topic summary { padding: 12px 14px; font-weight: 650; }
.topic .list-button { width: calc(100% - 20px); margin: 6px 10px; font-weight: 500; }
.topic[open] { padding-bottom: 6px; }

/* The + menu */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(0 0 0 / 0.5);
}
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 20px 20px 0 0;
}
.sheet-handle { width: 40px; height: 4px; margin: 6px auto 10px; border-radius: 2px; background: var(--border-strong); }
.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 6px;
  text-align: left;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.sheet-item:last-child { border-bottom: none; }
.sheet-item small { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.sheet-item svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 20;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.95rem;
}

.update-banner {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 8px 8px 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.18);
}

/* Online answers (Claude, through your own helper) */
.ask-card {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--purple);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.ask-card .section-heading { margin: 0 0 4px; }
.ask-card-text { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; }
.ask-button { width: 100%; font-weight: 650; color: var(--purple); border-color: var(--purple); }
.ask-free { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 0.875rem; font-weight: 600; text-underline-offset: 3px; }
.banner .lib-link { display: block; min-height: 32px; margin-top: 6px; }

.ask-q { margin: 14px 0 6px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow-wrap: anywhere; }
.ask-q-label { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.answer { margin: 8px 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.answer p, .answer li { max-width: 70ch; }
.answer p { margin: 8px 0; }
.answer-heading { margin: 14px 0 4px; font-size: 1.05rem; font-weight: 650; }
.answer ul, .answer ol { margin: 6px 0; padding-left: 1.3em; }
.answer li { margin: 0 0 4px; }
.answer table { border-collapse: collapse; font-size: 0.9rem; }
.answer th, .answer td { padding: 4px 12px 4px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.answer a, .sources a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.inline-code { padding: 0 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em; }
.answer-code { margin: 8px 0 12px; }
.answer-code .code { margin-bottom: 6px; }
.copy-button { min-height: 32px; padding: 2px 10px; font-size: 0.85rem; }
.sources { margin: 14px 0 0; padding-top: 8px; border-top: 1px solid var(--border); }
.sources h3 { margin: 0 0 4px; font-size: 0.95rem; font-weight: 650; }
.sources ol { margin: 0; padding-left: 1.3em; }
.sources li { margin: 6px 0; }
.source-meta { display: block; color: var(--muted); font-size: 0.82rem; }
.badge.kind-official { background: var(--blue-chip); color: var(--blue-chip-text); }
.badge.kind-expert { background: var(--teal-chip); color: var(--teal); }
.badge.kind-community { background: var(--warn-bg); color: var(--warn-text); }
.badge.kind-other { background: var(--grey-chip); color: var(--muted); }
.ask-own { margin: 12px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.9rem; }
.ask-cost { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; }
.ask-wait { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; padding: 12px 14px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--muted); }
.ask-error { margin: 8px 0; padding: 12px 14px; border-left: 4px solid var(--warn-line); border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); }
.ask-error .check-actions { margin-bottom: 0; }

.followup { margin: 18px 0 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.followup > .section-heading { margin-top: 0; }
.field-label { display: block; margin: 12px 0 4px; font-size: 0.9rem; font-weight: 650; }
.followup textarea, .ask-compose textarea, .code-row input { width: 100%; padding: 8px 10px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; }
.followup .check-input { min-height: 8em; font: 0.85rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--code-text); background: var(--code-bg); border-color: var(--code-border); }
.suggest { margin: 8px 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.suggest summary { font-weight: 650; }
.suggest-label { margin: 10px 0 4px; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.suggest-row { display: flex; align-items: center; gap: 8px; }
.suggest-row .code { flex: 1; min-width: 0; margin: 4px 0; padding: 6px 10px; }
.free-check { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 0.92rem; }
.free-check-title { margin: 0 0 4px; font-size: 0.9rem; font-weight: 650; }
.free-check p { margin: 4px 0; }
.followup-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-top: 10px; color: var(--muted); font-size: 0.875rem; }
.followup-actions .lib-link { min-height: 36px; text-align: left; }
.field-error { margin: 6px 0 0; color: var(--danger-text); font-size: 0.875rem; }
.privacy-warning { margin: 4px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.85rem; }
.shield { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; }
.shield-title { margin: 0 0 6px; font-weight: 650; }
.shield-counts { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.shield .field-label { margin-top: 10px; }
.shield-legend { margin: 8px 0; padding: 6px 10px; }
.shield-legend summary { font-size: 0.9rem; }
.shield-tick { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; }
.shield-tick input { width: 22px; height: 22px; flex: none; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; min-height: 44px; }
.home-tool.ask-continue .heading-icon { background: var(--purple-chip); color: var(--purple); }
/* A long question shows two lines on the front page; the whole of it is on the AI screen. */
.home-tool.ask-continue small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ask-compose { margin: 4px 0 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--purple); border-radius: 16px; box-shadow: var(--shadow); }
.ask-compose .section-heading { margin-top: 0; }
.ask-compose .ask-button { margin-top: 8px; }
.ask-compose .status { margin: 6px 2px 0; }

/* Your solutions (write-ups of fixes) */
.home-tool.solutions-empty .heading-icon { background: var(--green-chip); color: var(--green); }
.home-tool.solutions-empty .go { color: var(--green); font-size: 1.3rem; }
.solutions-found { margin: 4px 0 12px; }
.solution-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* long titles shrink with "…" instead of widening the list */
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.solution-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 10px 14px;
  text-align: left;
  background: var(--surface);
  border: none;
  border-radius: 0;
}
.solution-row:hover { background: var(--surface-2); }
.solution-row:focus-visible { outline-offset: -3px; }
.solution-row.partial { background: var(--surface-2); }
.solution-row-text { flex: 1; min-width: 0; }
.solution-row-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.solution-row .badge, .solution-card-head .badge, .solution-head .badge { flex: none; }
.missing { display: block; color: var(--muted); font-size: 0.8rem; }
.solutions-tools { display: flex; gap: 8px; margin: 8px 0 12px; }
.solutions-tools input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; }
.solution-card {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 14px;
  text-align: left;
  border-left: 4px solid var(--green);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.solution-card.partial { border-style: dashed; border-left-style: solid; }
.solution-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
.solution-card .meta { margin-top: 4px; }
.solution-card-text { display: block; margin-top: 4px; color: var(--text-2); font-size: 0.9rem; overflow-wrap: anywhere; }
.badge.kind-claude { background: var(--purple-chip); color: var(--purple); }
.solution-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.solution-title { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
/* A solution as a knowledge-base article */
.kb-header { margin: 4px 0 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.kb-summary { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--green); background: var(--green-chip); color: var(--text); font-size: 0.95rem; overflow-wrap: anywhere; }
.kb-summary strong { color: var(--green); }
.kb-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 12px; }
.kb-section { margin: 0 0 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow-wrap: anywhere; }
.kb-heading { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--green); font-size: 0.95rem; font-weight: 700; }
.kb-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; background: var(--green-chip); }
.kb-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-section p, .kb-section li { max-width: 70ch; margin: 4px 0; }
.kb-section ul { margin: 4px 0; padding-left: 1.3em; }
.kb-steps { margin: 0; padding: 0; list-style: none; }
.kb-step { display: flex; gap: 10px; margin: 10px 0 0; }
.kb-step:first-child { margin-top: 4px; }
.kb-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-chip); color: var(--green); font-size: 0.8rem; font-weight: 700; }
.kb-step-body { flex: 1; min-width: 0; }
.kb-step-body p { margin: 2px 0 4px; }
.kb-mode { display: block; margin: 6px 0 -2px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.kb-step-body .answer-code { margin-bottom: 0; }
.kb-checks { margin: 4px 0 6px; }
.kb-checks li { margin: 4px 0; }
.kb-reference { margin: 0 0 12px; padding: 10px 14px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 14px; }
.kb-reference summary { color: var(--muted); font-weight: 600; cursor: pointer; }
.kb-reference .answer { margin: 10px 0 0; box-shadow: none; }
/* The resolution steps in the form */
.sol-step { margin: 0 0 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.sol-step-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.sol-step-head strong { flex: 1; }
.sol-step-head .lib-link { min-height: 36px; }
.sol-step textarea, .sol-step select { margin: 0 0 6px; }
.solution-form select { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; }
.solution-form input:not([type="radio"]), .solution-form textarea { width: 100%; padding: 8px 10px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; }
.solution-form input:not([type="radio"]) { min-height: 44px; }
.solution-form .sol-commands { font: 0.9rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--code-text); background: var(--code-bg); border-color: var(--code-border); }
.sol-status { margin: 12px 0 0; padding: 0; border: none; }
.sol-option { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: 18px; }
.sol-option input { width: 20px; height: 20px; }
.tidy-slot:not(:empty) { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--purple); border-radius: 12px; }
.tidy-hint { margin: 0 0 8px; color: var(--purple); font-size: 0.9rem; }
.tidy-done { margin: 8px 0; padding: 6px 10px; border-radius: 8px; background: var(--purple-chip); color: var(--purple); font-size: 0.9rem; }
.fixed-box { margin: 12px 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 14px; }
.fixed-question { margin: 0 0 6px; font-weight: 650; }
.fixed-box .check-actions { margin-bottom: 0; }
.fixed-box .status { margin: 6px 0 0; }

/* The floating Ask AI button (above the page, below the + menu, toast and update banner) */
.ask-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px 10px 14px;
  color: #ffffff;
  background: var(--fab-bg);
  border: none;
  border-radius: 999px;
  font-weight: 650;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.28);
}
.ask-fab:hover { background: var(--fab-hover); }
.ask-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-fab-dot { position: absolute; top: 2px; right: 4px; width: 13px; height: 13px; border: 2px solid #ffffff; border-radius: 50%; background: var(--add-bg); }
.update-banner:not([hidden]) ~ .ask-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }

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