/* SPDX-FileCopyrightText: 2026 ceearrbee <hello@breve.im> */
/* SPDX-License-Identifier: AGPL-3.0-or-later */

/* The manual from yelp-build, on the tokens of style.css (loaded first). Yelp's own stylesheet
   is left out (manual-theme/site.xsl), so these rules cover the markup it writes. */
main { display: block; }
.pagewide { max-width: 48rem; margin-inline: auto; padding-inline: 20px; }
.clear { clear: both; }
div.page > header .trails { padding-top: 24px; font-size: .9375rem; opacity: var(--dim); }
div.trail { display: inline; }
a.trail { color: inherit; }
article { padding-bottom: 56px; }
article > div.hgroup h1 { font-size: clamp(2rem, calc(1.75rem + 2vw - 1rem), 2.5rem); margin-top: 6px; }
section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
section section { border-top: 0; padding-top: 0; margin-top: 20px; }
section h2 { font-size: 1.375rem; }
section h3 { font-size: 1.125rem; }
p.p, .region > ul, .region > ol, dl, div.note, div.media, div.code, div.screen, div.list, div.steps, div.table { margin-top: 12px; }
div.list ul, div.steps ol, .region > ul { margin: 0; padding-left: 1.3rem; }
li + li { margin-top: 4px; }
dl.terms dt { font-weight: 700; color: var(--strong); margin-top: 12px; }
dl.terms dd { margin: 2px 0 0 1.2rem; }
span.gui, span.guiseq { font-weight: 600; color: var(--strong); }
kbd, span.key { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--fillc); box-shadow: inset 0 -1px var(--line); color: var(--strong); font: 600 .875em/1.6 var(--ui); }
span.keyseq { white-space: nowrap; }
span.cmd, span.file, code, pre, div.code { font-family: "Adwaita Mono", "Source Code Pro", ui-monospace, monospace; font-size: .9375rem; }
div.code, div.screen, pre { background: var(--fillc); border-radius: 9px; padding: .6rem 1rem; overflow-x: auto; }
span.cmd { background: var(--fillc); border-radius: 6px; padding: 0 4px; }
span.em { font-style: italic; }
div.note { padding: 12px 16px; border-radius: 9px; background: var(--fillc); }
div.media img, img.media { border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
table { border-collapse: collapse; margin-top: 12px; }
th, td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--strong); }
/* Topic links: one row each, split by hairlines, as a list in the app. */
div.links { margin-top: 16px; }
div.links div.title h2 { font-size: 1.125rem; margin-top: 8px; }
div.links ul { list-style: none; margin: 8px 0 0; padding: 0; }
div.linkdiv, div.links li.links { border-bottom: 1px solid var(--line); margin: 0; }
a.linkdiv, div.links li.links > a { display: block; padding: 10px 12px; margin-inline: -12px; border-radius: 9px; text-decoration: none; }
a.linkdiv:hover { background: var(--fillc); }
a.linkdiv span.title { display: block; font-weight: 700; color: var(--strong); }
span.linkdiv-dash { display: none; }
a.linkdiv span.desc { display: block; color: var(--fg); opacity: var(--dim); font-size: .9375rem; }
div.links li.links { padding: 8px 0; }
div.links li.links > a { display: inline; padding: 0; margin: 0; font-weight: 600; }
div.links li.links span.desc { opacity: var(--dim); }
nav.prevnext { margin-top: 24px; }
nav.prevnext a { margin-right: 16px; font-weight: 600; text-decoration: none; }
div.page > footer:empty, div.page > footer .inner:empty { display: none; }
.ui-expander div.title { cursor: pointer; }
@media (forced-colors: active) { kbd, span.key, div.note, div.code, div.media img { border: 1px solid CanvasText; } }

/* Three columns: every page on the left, the page, its sections on the right. The side bars
   look like the buddy list: dim group headings, rows with a 9px neutral selection. */
main { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 0 40px; max-width: 1760px; margin-inline: auto; padding-inline: 24px; }
main > div.page { min-width: 0; }
/* The page takes the whole middle column; text stays at a readable line length, while
   pictures, tables and code use the full width. */
.pagewide { max-width: none; padding-inline: 0; }
p.p, .region > ul, .region > ol, dl, div.note, div.list, div.steps, div.links, nav.prevnext { max-width: 52rem; }
div.media img, img.media { max-width: min(100%, 46rem); }
.bar .wrap, footer .wrap { max-width: 1760px; padding-inline: 24px; }
aside.sidebar { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 72px); overflow-y: auto; padding-block: 20px; font-size: .9375rem; }
aside.sidebar div.title h2 { font-size: .8125rem; font-weight: 700; opacity: var(--dim); margin: 0 0 6px 8px; }
aside.sidebar ul { list-style: none; margin: 0; padding: 0; }
aside.sidebar li + li { margin-top: 0; }
aside.sidebar li.links-head { font-size: .8125rem; font-weight: 700; opacity: var(--dim); padding: 14px 8px 4px; }
aside.sidebar a { display: block; padding: 5px 8px; border-radius: 9px; color: var(--fg); text-decoration: none; }
aside.sidebar a:hover { background: var(--fillc); }
aside.sidebar a[aria-current] { background: color-mix(in srgb, var(--strong) 10%, transparent); color: var(--strong); font-weight: 600; }
aside.sidebar-right { order: 3; border-left: 1px solid var(--line); padding-left: 12px; }
aside.sidebar-left { order: 1; }
main > div.page { order: 2; }
article section { border-top: 0; padding-top: 0; margin-top: 36px; }
article > div.hgroup { padding-top: 0; }
div.page > header .trails { display: none; }
article > div.hgroup h1 { margin-top: 24px; }
a.anchor { margin-left: 8px; color: var(--ink); opacity: 0; text-decoration: none; font-weight: 400; }
h2:hover a.anchor, h3:hover a.anchor, a.anchor:focus { opacity: .7; }
/* The search field at the top of the contents, and its results in their place. */
form.search { padding: 0 0 8px; }
form.search input { width: 100%; min-height: 2.25rem; padding: 0 10px; border: 0; border-radius: 9px; background: var(--fillc); color: var(--strong); font: inherit; }
form.search input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
form.search .results { margin-top: 8px; }
form.search .results span { display: block; padding: 0 8px 4px; font-size: .8125rem; opacity: var(--dim); }
form.search .results li.none { padding: 5px 8px; opacity: var(--dim); }
@media (max-width: 1200px) {
  main { grid-template-columns: 230px minmax(0, 1fr); }
  aside.sidebar-right { display: none; }
}
@media (max-width: 800px) {
  main { display: block; }
  aside.sidebar-left { position: static; max-height: none; border-bottom: 1px solid var(--line); }
  aside.sidebar-left .sidebar-contents { display: none; }
}
