/* The look of the help of DovleEntry.
 *
 * It is the look of the application: its colors, the font of the system, the green bars of its
 * tables, the gold mark of the current tab, and the band of an account in its general ledger.
 * Titles are underlined the way a ledger underlines its totals: twice under the title of a page,
 * once under the title of a section.
 */

:root {
  --paper: #ffffff;
  --ink: #1c2733;
  --ink-soft: #5d6a72;
  --green-bar: #f1f6f0;
  --rule: #d3dad5;
  --chrome: #edf0ed;
  --chrome-dark: #dde2de;
  --band: #dce2dd;
  --leaf: #0a6e5a;
  --leaf-soft: #bfe0d2;
  --coin: #a86e00;
  --coin-text: #8a5a00;
  --coin-soft: #f7ead0;
  --tip-bg: #eef6f2;
  --tip-rule: #cfe5da;
  --note-bg: #f3f5f4;
  --note-rule: #dce2de;
  --important-bg: #fcf5e8;
  --important-rule: #eddcb8;
  --shadow: 0 14px 36px rgba(18, 44, 34, 0.16), 0 2px 6px rgba(18, 44, 34, 0.08);
  --backdrop: rgba(18, 30, 26, 0.72);

  --font-text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;

  --topbar: 56px;
  --sidebar: 272px;
  --measure: 720px;
  --wide: 1040px;

  color-scheme: light;
}

/* At night the ledger is green-black, not black */
:root[data-theme="dark"] {
  --paper: #141d1a;
  --ink: #e3ebe7;
  --ink-soft: #9aaba3;
  --green-bar: #18231f;
  --rule: #2d3b36;
  --chrome: #1b2622;
  --chrome-dark: #25322d;
  --band: #26342f;
  --leaf: #5cc8a6;
  --leaf-soft: #1d4237;
  --coin: #e2a73a;
  --coin-text: #e9b759;
  --coin-soft: #4a3712;
  --tip-bg: #16261f;
  --tip-rule: #24443a;
  --note-bg: #19221f;
  --note-rule: #2d3b36;
  --important-bg: #261f12;
  --important-rule: #4d3d1d;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  --backdrop: rgba(4, 8, 7, 0.8);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141d1a;
    --ink: #e3ebe7;
    --ink-soft: #9aaba3;
    --green-bar: #18231f;
    --rule: #2d3b36;
    --chrome: #1b2622;
    --chrome-dark: #25322d;
    --band: #26342f;
    --leaf: #5cc8a6;
    --leaf-soft: #1d4237;
    --coin: #e2a73a;
    --coin-text: #e9b759;
    --coin-soft: #4a3712;
    --tip-bg: #16261f;
    --tip-rule: #24443a;
    --note-bg: #19221f;
    --note-rule: #2d3b36;
    --important-bg: #261f12;
    --important-rule: #4d3d1d;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    --backdrop: rgba(4, 8, 7, 0.8);
    color-scheme: dark;
  }
}

/*--- The page */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--leaf);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--leaf) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--leaf);
  color: #fff;
  font-weight: 600;
}

.skip:focus {
  top: 10px;
}

.icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  vertical-align: -0.2em;
  flex: none;
}

/*--- The bar at the top */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar);
  padding: 0 14px 0 20px;
  background: var(--chrome);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(var(--sidebar) - 34px);
  flex: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  border-radius: 6px;
}

.topbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  cursor: pointer;
}

.topbar-button:hover {
  background: var(--chrome-dark);
}

.menu-button {
  display: none;
}

.version {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.875rem;
  white-space: nowrap;
}

.theme-button .icon-light {
  display: none;
}

:root[data-theme="dark"] .theme-button .icon-light {
  display: inline-block;
}

:root[data-theme="dark"] .theme-button .icon-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-button .icon-light {
    display: inline-block;
  }

  :root:not([data-theme="light"]) .theme-button .icon-dark {
    display: none;
  }
}

/*--- The search */

.topbar-search,
.home-search {
  position: relative;
}

.topbar-search {
  flex: 0 1 440px;
  min-width: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: text;
}

.search-box:focus-within {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 22%, transparent);
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
}

.search-input::placeholder {
  color: var(--ink-soft);
}

.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-key {
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink-soft);
  font: 600 0.75rem/1.4 var(--font-text);
}

.search-box:focus-within .search-key {
  display: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: min(620px, calc(100vw - 28px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.search-results[hidden] {
  display: none;
}

.result {
  display: block;
  padding: 9px 12px 10px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.result:hover,
.result.active {
  background: var(--green-bar);
}

.result.active {
  box-shadow: inset 3px 0 0 var(--coin);
}

.result-title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.result-title .sep {
  margin: 0 0.35em;
  color: var(--ink-soft);
  font-weight: 400;
}

.result-section {
  font-weight: 400;
}

.result-text {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.result mark {
  border-radius: 2px;
  background: var(--coin-soft);
  color: var(--ink);
}

.no-results {
  margin: 0;
  padding: 12px;
  color: var(--ink-soft);
}

/*--- The contents, at the left */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar));
}

.sidebar {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 18px 12px 48px;
  background: var(--chrome);
  border-right: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar a {
  display: block;
  padding: 6px 12px 6px 11px;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  color: var(--ink);
  text-decoration: none;
}

.sidebar a:hover {
  background: var(--chrome-dark);
}

/* Like the current tab of the application: on paper, with its mark of gold */
.sidebar a[aria-current="page"] {
  border-left-color: var(--coin);
  background: var(--paper);
  font-weight: 600;
}

.nav-home {
  margin-bottom: 4px;
}

.nav-title {
  margin: 20px 0 6px 14px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

/*--- A page */

main {
  min-width: 0;
  padding: 44px 48px 72px;
}

.content {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.prose {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--wide);
}

.prose > * {
  max-width: var(--measure);
}

.prose > figure.wide,
.prose > .table.wide {
  max-width: var(--wide);
}

.prose h1,
.prose h2,
.prose h3 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* The title of the page is underlined twice, as a total is */
.prose h1 {
  display: inline-block;
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 3px double var(--ink);
  font-size: 2.25rem;
}

/* And the one of a section once, as a subtotal is */
.prose h2 {
  display: table;
  margin: 2.75rem 0 1rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.5rem;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.125rem;
}

.prose h1 + p {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.1875rem;
  line-height: 1.55;
}

.anchor {
  position: absolute;
  left: -1.35em;
  top: 0.1em;
  padding: 0 0.15em;
  color: var(--ink-soft);
  font-size: 0.85em;
  opacity: 0;
  text-decoration: none;
}

h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

.prose :target {
  animation: target 1.6s ease-out;
}

@keyframes target {
  from {
    background: var(--coin-soft);
  }
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li {
  margin: 0.3rem 0;
}

.prose li > ul,
.prose li > ol {
  margin: 0.3rem 0 0;
}

.prose li::marker {
  color: var(--ink-soft);
}

.prose ol > li::marker {
  font-weight: 600;
}

strong {
  font-weight: 600;
}

code {
  padding: 0.08em 0.38em;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--chrome);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--chrome);
  line-height: 1.5;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
}

/* What the application calls things: a menu and what is in it. A short name isn't cut */
.ui {
  color: var(--ink);
  font-weight: 600;
}

.ui.short {
  white-space: nowrap;
}

.sep {
  margin: 0 0.3em;
  color: var(--ink-soft);
}

/* Keys, as on the keyboard */
.keys {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
  vertical-align: 0.05em;
  font: inherit;
}

.keys > kbd {
  display: inline-block;
  min-width: 1.75em;
  padding: 2px 6px 1px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.78rem/1.35 var(--font-text);
  text-align: center;
}

.keys .plus {
  padding: 0 1px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

/* The icons of the application, in the text: its buttons look like buttons */
.prose .icon-add,
.prose .icon-remove,
.prose .icon-info,
.prose .icon-graph,
.prose .icon-pie,
.prose .icon-columns,
.prose .icon-print,
.prose .icon-previous,
.prose .icon-next {
  width: 1.45em;
  height: 1.45em;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--chrome);
  color: var(--ink);
  vertical-align: -0.38em;
}

.prose .icon-show-account,
.prose .icon-exclude,
.prose .icon-include,
.prose .icon-collapsed,
.prose .icon-expanded,
.prose .icon-unchecked {
  color: var(--ink-soft);
}

.prose .icon-scheduled,
.prose .icon-reconciled,
.prose .icon-budgeted,
.prose .icon-later,
.prose .icon-earlier,
.prose .icon-matched {
  color: var(--coin);
}

.prose .icon-checked {
  color: var(--leaf);
}

.prose [class*="icon-tab-"] {
  color: var(--coin);
}

/*--- Tables, ruled like the ones of the application */

.table {
  overflow-x: auto;
  margin: 1.5rem 0 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

th {
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--chrome);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 9px 14px;
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background: var(--green-bar);
}

th.num,
td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* A term that a row is about stays on one line */
td > strong:only-child {
  white-space: nowrap;
}

/*--- Notes in the margin of the text */

.callout {
  margin: 1.5rem 0;
  padding: 13px 18px 3px;
  border: 1px solid var(--note-rule);
  border-left: 4px solid var(--ink-soft);
  border-radius: 6px;
  background: var(--note-bg);
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px !important;
  font-weight: 600;
}

.callout-tip {
  border-color: var(--tip-rule);
  border-left-color: var(--leaf);
  background: var(--tip-bg);
}

.callout-tip .callout-title {
  color: var(--leaf);
}

.callout-important {
  border-color: var(--important-rule);
  border-left-color: var(--coin);
  background: var(--important-bg);
}

.callout-important .callout-title {
  color: var(--coin-text);
}

.callout-note .callout-title {
  color: var(--ink-soft);
}

/*--- Pictures of the application */

figure.shot {
  margin: 2rem 0 2.25rem;
}

figure.shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
}

/* A dialog brings its own edge and its round corners */
figure.shot.cutout img {
  border: 0;
  border-radius: 0;
  background: none;
}

figure.shot .missing {
  padding: 48px 16px;
  border: 2px dashed var(--rule);
  border-radius: 8px;
  color: var(--ink-soft);
  text-align: center;
}

figure.shot img.zoomable {
  cursor: zoom-in;
}

figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}

figure.diagram {
  margin: 2rem 0;
}

figure.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-text);
}

/* A drawing of accounts and of what moves between them, in the colors of the ledger */
.d-box {
  fill: var(--paper);
  stroke: var(--rule);
  stroke-width: 1.5;
}

.d-band {
  fill: var(--band);
}

.d-type {
  fill: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.d-name {
  fill: var(--ink);
  font-size: 19px;
  font-weight: 600;
}

.d-arrow {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2;
}

.d-head {
  fill: var(--leaf);
}

.d-amount {
  fill: var(--leaf);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.d-where {
  fill: var(--ink-soft);
  font-size: 13px;
}

details {
  margin: 1.5rem 0;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
}

summary {
  padding: 11px 0;
  font-weight: 600;
  cursor: pointer;
}

details[open] summary {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
}

.columns ul {
  columns: 3 13rem;
  column-gap: 2rem;
  padding-left: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.columns li {
  margin: 0 0 0.25rem;
  break-inside: avoid;
}

/*--- The previous and the next page */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 3.5rem;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.pager a {
  display: block;
  padding: 12px 16px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--leaf);
  background: var(--green-bar);
}

.pager-next {
  text-align: right;
}

.pager-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.pager-title {
  display: block;
  font-weight: 600;
}

/*--- What is on the page, at the right */

.toc {
  position: sticky;
  top: calc(var(--topbar) + 44px);
  flex: 0 0 210px;
  display: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.toc-title {
  margin: 0 0 10px;
  font-weight: 600;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--rule);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
}

.toc a[aria-current="true"] {
  border-left-color: var(--coin);
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 1400px) {
  .toc {
    display: block;
  }
}

/*--- The first page */

.home main {
  padding-top: 56px;
}

/* The first page has its own search, larger */
.home .topbar-search {
  visibility: hidden;
}

.home .content {
  display: block;
  max-width: 1120px;
}

.home-intro h1 {
  font-size: 2.75rem;
}

.home-intro h1 + p {
  max-width: 640px;
  color: var(--ink-soft);
}

.home-search {
  max-width: 640px;
  margin: 28px 0 0;
}

.home-search .search-box {
  height: 52px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 1.125rem;
}

.home-search .search-input {
  font-size: 1.0625rem;
}

/* Every page, as a ledger lists its accounts: in two leaves, with the binding between them */
.ledger {
  margin-top: 52px;
  columns: 2;
  column-gap: 64px;
  column-rule: 3px double var(--rule);
}

.ledger-section {
  margin: 0 0 32px;
  break-inside: avoid;
}

.ledger-band {
  margin: 0;
  padding: 7px 14px;
  border-radius: 4px 4px 0 0;
  background: var(--band);
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.ledger ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.ledger li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ledger li:nth-child(even) {
  background: var(--green-bar);
}

.ledger li a {
  flex: 1;
  min-width: 0;
  padding: 9px 14px 10px;
  color: var(--ink);
  text-decoration: none;
}

.ledger li a:hover .ledger-title {
  color: var(--leaf);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ledger-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.ledger-icon {
  color: var(--coin);
}

.ledger-description {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.ledger-keys {
  padding: 10px 14px 0 0;
  font-size: 0.875rem;
}

/*--- At the bottom */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding: 22px 48px 26px calc(var(--sidebar) + 48px);
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

/*--- A picture, larger */

.lightbox {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: auto;
}

.lightbox::backdrop {
  background: var(--backdrop);
}

.lightbox img {
  display: block;
  cursor: zoom-out;
}

.lightbox-close {
  position: sticky;
  top: 8px;
  float: right;
  margin: 8px 8px -44px 0;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.875rem var(--font-text);
  cursor: pointer;
}

/*--- Narrower windows */

@media (max-width: 1100px) {
  .ledger {
    columns: 1;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar: 288px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-button {
    display: inline-flex;
  }

  .brand {
    width: auto;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar);
    left: 0;
    z-index: 25;
    width: var(--sidebar);
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.18s ease-out, visibility 0s linear 0.18s;
  }

  .nav-open .sidebar {
    transform: none;
    visibility: visible;
    transition: transform 0.18s ease-out;
  }

  main {
    padding: 32px 24px 56px;
  }

  .footer {
    padding: 20px 24px;
  }
}

@media (max-width: 640px) {
  .brand-name,
  .version,
  .search-key {
    display: none;
  }

  .topbar {
    gap: 8px;
    padding-left: 8px;
  }

  .topbar-search {
    flex: 1;
  }

  .prose h1,
  .home-intro h1 {
    font-size: 1.875rem;
  }

  .prose h2 {
    font-size: 1.3125rem;
  }

  .pager {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/*--- On paper: the text, and what it shows */

@media print {
  .topbar,
  .sidebar,
  .toc,
  .pager,
  .footer,
  .anchor,
  .skip,
  .lightbox {
    display: none !important;
  }

  .layout {
    display: block;
  }

  main {
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  figure,
  .callout,
  .table {
    break-inside: avoid;
  }
}
