/* The qa "discourse" skin (src/archetypes/qa/skins/discourse/Layout.astro): our own CSS, written to look like
   a Discourse forum in light mode. Nothing here is copied from Discourse (GPL): see docs/architecture.md,
   "Modelled on a site". The question list, the answers and the topics are the shared components, drawn by
   public/static/components/components.css; this file sets their tokens and draws the chrome around them. */

:root {
    /* Our own palette (not Discourse's): cool slate greys and an indigo blue. Every text colour, and every
       category colour, has at least 4.5:1 contrast on white. */
    --dq-text: #1f2933;
    --dq-muted: #5b6573;
    --dq-faint: #6b7480;
    --dq-line: #e6e9ef;
    --dq-line-strong: #d3d8e0;
    --dq-soft: #f4f6f9;
    --dq-hover: #ebeff7;
    --dq-bg: #fff;
    --dq-link: #3558c9;
    --dq-accent: #3558c9;
    --dq-accent-hover: #2a47a3;
    --dq-focus: rgba(53, 88, 201, 0.25);
    --dq-success: #1b7f4b;
    --dq-success-soft: #e6f4ec;
    --dq-danger: #b3261e;
    --dq-header-h: 60px;
    --dq-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* The shared components' tokens. */
    --c-border: var(--dq-line-strong);
    --c-border-subtle: var(--dq-line);
    --c-surface: var(--dq-soft);
    --c-card: var(--dq-bg);
    --c-muted: var(--dq-muted);
    --c-accent: var(--dq-accent);
    --c-on-accent: #fff;
    --c-title-bar: #e7ecf8;
    --c-group-bar: var(--dq-soft);
    --c-new-link: var(--dq-danger);
    --c-warning: var(--dq-danger);
    --c-input-border: var(--dq-line-strong);
    --c-space: 1rem;
    --c-inset: 0.75rem;
    --c-measure: none;
    --c-radius: 4px;
    --c-radius-large: 6px;
    --c-label-weight: 600;
    --c-small: 0.875em;
    /* Q&A components: the solved green, round avatars, dark titles, category colours. */
    --c-success: var(--dq-success);
    --c-on-success: #fff;
    --c-success-soft: var(--dq-success-soft);
    --c-tag: var(--dq-line);
    --c-tag-text: var(--dq-muted);
    --c-heading: var(--dq-text);
    --c-avatar-radius: 50%;
    --c-anchor-offset: calc(var(--dq-header-h) + 12px);
    --c-tone-0: #3558c9;
    --c-tone-1: #b24c17;
    --c-tone-2: #0e7490;
    --c-tone-3: #6b46c1;
    --c-tone-4: #b83280;
    --c-tone-5: #2a7a50;
    --c-tone-6: #975a16;
    --c-tone-7: #c53030;
    --c-tone-8: #4a5568;
    --c-tone-9: #2c7a7b;
    /* Content blocks: callouts as quote blocks with a coloured bar, soft step badges in the accent, the
       accent on the timeline's dots. */
    --c-callout-warning: #a15c07;
    --c-callout-tip: var(--dq-success);
    --c-callout-note: var(--dq-accent);
    --c-step-badge: var(--c-title-bar);
    --c-on-step-badge: var(--dq-accent);
    --c-checkbox: var(--dq-faint);
    --c-timeline-dot: var(--dq-accent);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--dq-header-h) + 12px); }
body { margin: 0; font: 15px/1.5 var(--dq-font); color: var(--dq-text); background: var(--dq-bg); overflow-wrap: break-word; }
a { color: var(--dq-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.dq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dq-skip { position: absolute; left: -9999px; }
.dq-skip:focus { left: 0.5rem; top: 0.5rem; z-index: 100; padding: 0.5rem 1rem; background: var(--dq-bg); }
.dq-icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.dq-muted { color: var(--dq-muted); }

/* Header: white, a soft shadow, sticky. */
.dq-header { position: sticky; top: 0; z-index: 30; height: var(--dq-header-h); background: var(--dq-bg); box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.18); }
/* The header's inner row has the same edges as the page below it at every width. Wide screens: the
   logo starts where the sidebar's links do (.dq-sidebar's 0.75rem) and the search box ends where the main
   column's content does (.dq-main-col: 240px sidebar + at most 1110px, then 1.5rem padding; 100% here is
   the header's width, so the max() is the space .dq-wrap leaves right of the main column). */
.dq-header-inner { display: flex; align-items: center; gap: 0.5rem; height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 calc(1.5rem + max(0px, min(100%, 1400px) - 1350px)) 0 0.75rem; }
.dq-brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--dq-text); font-size: 1.35rem; font-weight: 700; }
.dq-brand:hover { text-decoration: none; }
.dq-brand img { width: 32px; height: 32px; flex: none; }
.dq-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-header-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.dq-icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--dq-faint); font-size: 1.2rem; cursor: pointer; }
.dq-icon-btn:hover { background: var(--dq-soft); color: var(--dq-text); text-decoration: none; }
.dq-search { display: flex; align-items: center; width: 20rem; border: 1px solid var(--dq-line-strong); border-radius: 4px; }
.dq-search input { flex: 1; min-width: 0; height: 36px; padding: 0 0.6rem; border: 0; border-radius: 4px; font: inherit; color: var(--dq-text); background: none; }
.dq-search input:focus { outline: 0; }
.dq-search:focus-within { border-color: var(--dq-accent); box-shadow: 0 0 0 2px var(--dq-focus); }
.dq-search .dq-icon-btn { width: 36px; height: 36px; font-size: 1rem; }
.dq-search-link { display: none; }
.dq-search { position: relative; }
.dq-phone-search { display: none; }
.dq-menu-btn { display: none; }

/* Buttons. */
.dq-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.85rem; border: 0; border-radius: 4px; font: inherit; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.dq-btn:hover { text-decoration: none; }
.dq-btn-primary { color: #fff; background: var(--dq-accent); }
.dq-btn-primary:hover { color: #fff; background: var(--dq-accent-hover); }

/* Page: sidebar and main column. */
.dq-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: 1400px; margin: 0 auto; }
.dq-sidebar { position: sticky; top: var(--dq-header-h); align-self: start; height: calc(100vh - var(--dq-header-h)); overflow-y: auto; padding: 1.25rem 0.75rem; border-right: 1px solid var(--dq-line); background: var(--dq-bg); }
.dq-sidebar ul { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.dq-sidebar a { display: flex; align-items: center; gap: 0.6rem; padding: calc(0.35rem - 1px) 0.6rem; margin-bottom: 2px; border-radius: 4px; color: var(--dq-text); font-size: 0.95rem; }
.dq-sidebar a:hover { background: var(--dq-hover); text-decoration: none; }
/* The current page, or on a question page its topics (aria-current="true"). */
.dq-sidebar a[aria-current] { background: var(--dq-hover); font-weight: 600; }
.dq-sidebar a .dq-icon { color: var(--dq-faint); }
.dq-sidebar-heading { margin: 0 0 0.25rem; padding: 0 0.6rem; color: var(--dq-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.dq-count { margin-left: auto; color: var(--dq-faint); font-size: 0.85rem; }
.dq-backdrop { display: none; }
.dq-main-col { min-width: 0; max-width: 1110px; padding: 1.25rem 1.5rem 0; }

/* Above a list: the "Latest" pill and the button. */
.dq-list-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.dq-pills { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.dq-pills a { display: block; padding: 0.45rem 0.85rem; border-radius: 4px; color: var(--dq-text); }
.dq-pills a[aria-current="page"] { color: #fff; background: var(--dq-accent); }
.dq-pills a:hover { text-decoration: none; }

/* The topic list (questionList: table). */
.dq .qa-questions-table th { padding-top: 0.25rem; }
.dq .qa-questions-table td.qa-t-num { color: var(--dq-muted); }
.dq .qa-questions-table td.qa-t-accepted { color: var(--dq-success); }
.dq .qa-questions-table .qa-t-activity { width: 9.5em; color: var(--dq-faint); white-space: nowrap; }
.dq .qa-questions-table .qa-q-title:visited { color: var(--dq-muted); }
.dq .qa-questions-table p.qa-summary { margin-bottom: 0; font-size: 0.9rem; line-height: 1.45; }
.dq .qa-badge:hover { color: var(--dq-text); }

/* A category page. */
.dq-category-head { margin-bottom: 1.25rem; }
.dq-category-head h1 { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0; font-size: 1.6rem; font-weight: 600; line-height: 1.25; }
.dq-category-head h1 .qa-badge-dot { width: 0.6em; height: 0.6em; }
.dq-category-head h1 .qa-topic-icon { width: 0.9em; height: 0.9em; }
.dq-category-head .dq-muted { margin: 0.25rem 0 0.75rem; }

/* A topic page: the title, the summary, the post stream and its timeline. */
.dq-topic-title { margin-bottom: 0.75rem; }
.dq-topic-title h1 { margin: 0.25rem 0 0.35rem; font-size: 1.75rem; font-weight: 500; line-height: 1.25; }
.dq-topic-body { display: grid; grid-template-columns: minmax(0, 46rem) 12rem; gap: 2.5rem; }
.dq-stream { min-width: 0; }
/* The summary sits in the posts' grid (components.css .qa-answer-post), in the text column. */
.dq-map-row { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 0.85em; }
.dq-map-row > .dq-map { grid-column: 2; }
.dq-map { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px solid var(--dq-line); border-radius: 6px; background: var(--dq-soft); font-size: 0.9rem; }
.dq-map-stats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 2rem; }
.dq-map-stats > div { display: flex; flex-direction: column; }
.dq-map-label { color: var(--dq-muted); font-size: 0.8rem; }
.dq-map-num { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.dq-map-avatars { display: flex; }
.dq-map { --c-avatar-ring: var(--dq-soft); }
.dq-map-solution { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.4rem; margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--dq-line); color: var(--dq-success); font-weight: 600; }
/* One link to the accepted answer, drawn like the sidebar's and the timeline's links: no underline. */
.dq-map-solution:hover { text-decoration: none; }
.dq-map-solution-sep, .dq-map-solution-by { color: var(--dq-muted); font-weight: 400; }
.dq-map-solution:hover .dq-map-solution-by { color: var(--dq-text); }
.dq .qa-answer-post .qa-post-head .qa-name { color: var(--dq-text); }
.dq .qa-answer-post .qa-job { color: var(--dq-faint); }
.dq-stream-end { display: flex; justify-content: flex-end; padding: 1rem 0; border-top: 1px solid var(--dq-line); }

.dq-timeline { position: sticky; top: calc(var(--dq-header-h) + 1.5rem); align-self: start; font-size: 0.85rem; }
.dq-tl-track { margin: 0; padding: 0; list-style: none; border-left: 3px solid var(--dq-line); }
.dq-tl-track a { display: flex; align-items: center; gap: 0.4rem; margin-left: -3px; padding: 0.3rem 0 0.3rem 0.65rem; border-left: 3px solid transparent; color: var(--dq-muted); }
.dq-tl-track a:hover { color: var(--dq-text); text-decoration: none; }
.dq-tl-track a[aria-current] { border-left-color: var(--dq-accent); color: var(--dq-text); font-weight: 600; }
.dq-tl-n { min-width: 1.1em; color: var(--dq-faint); font-weight: 400; }
.dq-tl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Each post: who wrote it, and the date under the name. */
.dq-tl-track a:has(.dq-tl-when) { align-items: baseline; }
.dq-tl-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dq-tl-when { color: var(--dq-faint); font-size: 0.75rem; font-weight: 400; }
.dq-tl-solved { display: inline-flex; color: var(--dq-success); }

.dq-related { margin-top: 2rem; }
.dq-related h2 { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 600; }

/* Site pages. */
.dq-page-title { margin: 0.25rem 0 1rem; font-size: 1.75rem; font-weight: 500; line-height: 1.25; }
.dq-page { max-width: 46rem; }

/* Post text (the shared Markdown pipeline's HTML), in posts and on pages. */
:is(.dq-cooked, .qa-answer-body) { line-height: 1.6; }
:is(.dq-cooked, .qa-answer-body) > :first-child { margin-top: 0; }
:is(.dq-cooked, .qa-answer-body) > :last-child { margin-bottom: 0; }
:is(.dq-page, .qa-answer-body) :is(p, ul, ol) { margin: 0 0 1em; }
:is(.dq-page, .qa-answer-body) :is(h2, h3, h4) { margin: 1.25em 0 0.5em; font-weight: 600; line-height: 1.3; }
:is(.dq-page, .qa-answer-body) h2 { font-size: 1.3rem; }
:is(.dq-page, .qa-answer-body) h3 { font-size: 1.15rem; }
:is(.dq-page, .qa-answer-body) code { padding: 0.1em 0.3em; border-radius: 3px; background: var(--dq-soft); font-size: 0.9em; }
:is(.dq-page, .qa-answer-body) pre { overflow-x: auto; padding: 0.75rem; border-radius: 4px; background: var(--dq-soft); }
:is(.dq-page, .qa-answer-body) pre code { padding: 0; background: none; }
:is(.dq-page, .qa-answer-body) blockquote { margin: 0 0 1em; padding: 0.5rem 1rem; border-left: 5px solid var(--dq-line); background: var(--dq-soft); }
:is(.dq-page, .qa-answer-body) table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 1em; }
:is(.dq-page, .qa-answer-body) :is(th, td) { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--dq-line); text-align: left; vertical-align: top; }
:is(.dq-page, .qa-answer-body) th { border-bottom-width: 2px; }
.dq .mw-editsection { display: none; }
.dq sup.reference { font-size: 0.75em; }
.dq ol.references { font-size: 0.875rem; }
.dq a.new, .dq .error { color: var(--dq-danger); }

/* The contact and question forms ({{contact form}}, {{question form}}, src/lib/templates.ts). */
.wiki-contact-form { display: grid; gap: 0.3rem; max-width: 34rem; margin-bottom: 1.5rem; }
.wiki-contact-form [hidden] { display: none !important; }
.wiki-contact-form label { margin-top: 0.6rem; font-weight: 600; }
.wiki-contact-form input:not([type="hidden"], [type="checkbox"]), .wiki-contact-form select, .wiki-contact-form textarea { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--dq-line-strong); border-radius: 4px; font: inherit; color: var(--dq-text); background: var(--dq-bg); }
.wiki-contact-form input:focus, .wiki-contact-form select:focus, .wiki-contact-form textarea:focus { outline: 0; border-color: var(--dq-accent); box-shadow: 0 0 0 2px var(--dq-focus); }
.wiki-contact-submit { justify-self: start; margin-top: 0.75rem; padding: 0.5rem 0.9rem; border: 0; border-radius: 4px; color: #fff; background: var(--dq-accent); font: inherit; font-weight: 500; cursor: pointer; }
.wiki-contact-submit:hover { background: var(--dq-accent-hover); }
.wiki-contact-optional, .wiki-contact-note, .wiki-contact-hint { color: var(--dq-muted); font-size: 0.875rem; font-weight: 400; }
.wiki-contact-hint { margin: 0; }
.wiki-contact-form label.wiki-contact-check { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.75rem; font-weight: 400; }
.wiki-contact-check input { flex: none; margin-top: 0.3rem; accent-color: var(--dq-accent); }
.wiki-contact-sent { padding: 0.75rem 1rem; border-radius: 4px; color: var(--dq-success); background: var(--dq-success-soft); }

/* Visible keyboard focus on the chrome's links and buttons. */
.dq :is(a, button, summary):focus-visible { outline: 2px solid var(--dq-accent); outline-offset: 1px; }
.dq-sidebar a:focus-visible { outline-offset: -2px; }

/* Search suggestions (src/scripts/typeahead.ts, data-typeahead-class="dq-typeahead"). */
.dq-typeahead { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; margin-top: 4px; max-height: 70vh; overflow-y: auto; padding: 0.25rem 0; background: var(--dq-bg); border: 1px solid var(--dq-line-strong); border-radius: 6px; box-shadow: 0 4px 12px rgba(31, 41, 51, 0.12); text-align: left; }
.dq-typeahead__item { display: block; padding: 0.4rem 0.75rem; color: var(--dq-text); line-height: 1.4; }
.dq-typeahead__item:hover, .dq-typeahead__item.is-active { background: var(--dq-hover); text-decoration: none; }
.dq-typeahead__title { display: block; }
.dq-typeahead mark { padding: 0; color: inherit; background: none; font-weight: 700; }
.dq-typeahead__via, .dq-typeahead__desc { display: block; color: var(--dq-muted); font-size: 0.85rem; }
.dq-typeahead__via { font-style: italic; }
.dq-typeahead__desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dq-typeahead__heading { margin-top: 0.25rem; padding: 0.5rem 0.75rem 0.15rem; border-top: 1px solid var(--dq-line); color: var(--dq-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.dq-typeahead__footer { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; border-top: 1px solid var(--dq-line); color: var(--dq-link); }
.dq-typeahead__icon { display: inline-flex; flex: none; }

/* The search page (src/components/search.ts renderFoundSearch). Its field is the header's (.dq-search: 1px
   border, 4px radius, the search button inside on the right, a normal-weight placeholder in the muted colour),
   larger. The results are the topic list (questionList: table) and keep its styles. */
.qa-search-page { display: flex; align-items: center; margin-bottom: 1rem; border: 1px solid var(--dq-line-strong); border-radius: 4px; background: var(--dq-bg); }
.qa-search-page:focus-within { border-color: var(--dq-accent); box-shadow: 0 0 0 2px var(--dq-focus); }
.qa-search-page > .qa-search-icon { display: none; }
.qa-search-page input { flex: 1; min-width: 0; height: 48px; padding: 0 0.85rem; border: 0; border-radius: 4px; color: var(--dq-text); background: none; font: inherit; font-size: 1.15rem; font-weight: 400; }
.qa-search-page input:focus { outline: 0; }
.qa-search-page input::placeholder { color: var(--dq-muted); opacity: 1; }
.qa-search-submit { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 4px; color: var(--dq-faint); background: none; font-size: 1.25rem; cursor: pointer; }
.qa-search-submit:hover { color: var(--dq-text); background: var(--dq-soft); }
.qa-search-submit .qa-search-icon { width: 1em; height: 1em; }
.qa-search-submit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qa-search-status { margin: 0 0 0.5rem; color: var(--dq-muted); }
.qa-search-status:empty { display: none; }
.qa-found-list mark { color: inherit; background: none; font-weight: 600; }
.qa-search-more button { padding: 0.5rem 0.85rem; border: 1px solid var(--dq-line-strong); border-radius: 4px; color: var(--dq-text); background: var(--dq-bg); font: inherit; cursor: pointer; }
.qa-search-more button:hover { background: var(--dq-soft); }

/* Footer. */
.dq-footer { margin-top: 3rem; padding: 1.25rem 0 2rem; border-top: 1px solid var(--dq-line); color: var(--dq-muted); font-size: 0.85rem; }
.dq-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 0.5rem; padding: 0; list-style: none; }
.dq-footer a { color: var(--dq-muted); }
.dq-footer p { margin: 0.25rem 0; }

/* Narrower screens: the sidebar becomes a drawer, the timeline goes. */
@media (max-width: 1000px) {
    .dq-wrap { display: block; }
    /* The main column alone: the header row takes its width and padding. The icon buttons are 40px around
       a 20px icon, so -10px puts the icon itself on the content's edge. */
    .dq-header-inner { max-width: 1110px; padding: 0 1.5rem; }
    .dq-menu-btn { display: inline-flex; margin-left: -10px; }
    .dq-sidebar { position: fixed; z-index: 40; top: var(--dq-header-h); left: 0; width: 280px; max-width: 85vw; height: calc(100vh - var(--dq-header-h)); transform: translateX(-100%); transition: transform 0.2s ease; visibility: hidden; border-right: 0; box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15); }
    /* Opened by the script (.dq-drawer-open), or without JavaScript by the menu link's #dq-sidebar (:target). */
    .dq-drawer-open .dq-sidebar, .dq-sidebar:target { transform: none; visibility: visible; }
    .dq-drawer-open .dq-backdrop, .dq-sidebar:target + .dq-backdrop { display: block; position: fixed; inset: var(--dq-header-h) 0 0 0; z-index: 35; background: rgba(0, 0, 0, 0.35); }
    .dq-main-col { margin: 0 auto; }
    .dq-topic-body { display: block; }
    .dq-timeline { display: none; }
}
@media (max-width: 720px) {
    .dq-search { display: none; }
    .dq-header-inner { padding: 0 0.75rem; }
    .dq-search-link { display: inline-flex; margin-right: -10px; }
    /* The search box the search icon opens, under the header. */
    /* !important: the suggestions script makes its form position: relative. */
    .dq-phone-search:not([hidden]) { display: flex; position: absolute !important; top: 100%; left: 0; right: 0; width: auto; margin: 0; padding: 0.5rem 0.75rem; border: 0; border-radius: 0; background: var(--dq-bg); box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.18); }
    .dq-phone-search:focus-within { box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.18); }
    .dq-phone-search input { height: 38px; border: 1px solid var(--dq-line-strong); }
    .dq-phone-search input:focus { border-color: var(--dq-accent); box-shadow: 0 0 0 2px var(--dq-focus); }
    .dq-phone-search .dq-typeahead { left: 0.75rem; right: 0.75rem; }
    .dq-main-col { padding: 1rem 0.75rem 0; }
    /* Phones: the page's h1 stays the most prominent text, well above the answers' titles. */
    .dq-topic-title h1, .dq-category-head h1, .dq-page-title { font-size: 1.7rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
    .dq-map-stats { gap: 0.6rem 1.25rem; }
    .dq-map-row { grid-template-columns: 32px minmax(0, 1fr); gap: 0.6em; }
}
@media (max-width: 400px) {
    .dq-brand { font-size: 1.1rem; }
    .dq-list-nav .dq-btn { padding: 0.45rem 0.65rem; }
}

/* A folded reference list's chevron (components.css draws it with borders): the skin's icon pack's chevron-down
   (Lucide chevron-down, as in src/components/icons/lucide.ts), as a mask in the text's colour, pointing right when closed. */
.mw-references-details > summary::before { width: 0.9em; height: 0.9em; border: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transform: rotate(-90deg); }
.mw-references-details[open] > summary::before { transform: none; }
