/* The site header: the title block and the links. Both pages load this one file,
   so the header cannot drift between them. */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.9rem 2rem; font-family: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif; }
.top a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.top a:hover { color: var(--link); }
.top nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.15rem; font-size: 1rem; font-weight: 500; line-height: 1.3; }
/* The page you are on carries a heavy blue bar, like a selected tab. The other is a plain link. */
.top nav .word { margin-inline-end: 1.1rem; padding-block: 0.3rem; text-decoration: none; color: var(--muted); border-block-end: 3px solid transparent; }
.top nav .word:hover { color: var(--link); border-block-end-color: var(--rule); }
.top nav .word[aria-current] { color: var(--ink); font-weight: 600; border-block-end-color: var(--link); }
.top .ico { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; color: inherit; background: none; border: 0; border-radius: 2px; cursor: pointer; opacity: 1; }
.top .ico svg { width: 1.3rem; height: 1.3rem; display: block; }
.top .ico:hover { color: var(--link); }
/* The theme switch is a control, not a destination: a rule sets it apart from the links. */
.top .theme-toggle { margin-inline-start: 0.5rem; padding-inline-start: 0.5rem; width: 3rem; border-inline-start: 1px solid var(--rule); border-radius: 0; }
.top .theme-toggle .sun, .top .theme-toggle[data-mode="dark"] .moon { display: none; }
.top .theme-toggle[data-mode="dark"] .sun { display: block; }
/* On a phone the links become a bar of their own above the title block, closed by a rule,
   so the links, the title block and the opening line read as three separate things. */
@media (max-width: 640px) {
  .top { gap: 1.1rem; }
  .top nav { order: -1; width: 100%; padding-block-end: 0.5rem; border-block-end: 1px solid var(--rule); }
  .top nav .word + .ico { margin-inline-start: auto; }
  .top .block { width: 100%; grid-template-columns: auto 1fr; }
}
.block { display: grid; grid-template-columns: auto minmax(0, auto); width: max-content; max-width: 100%; margin: 0; border: 1.5px solid var(--line); font: 500 0.9375rem/1.3 "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif; }
.block dt, .block dd { margin: 0; padding: 0.45rem 0.9rem; border-block-start: 1px solid var(--line); }
.block dt, .top .block dt { color: var(--muted); font-weight: 500; }
.block dd { border-inline-start: 1px solid var(--line); }
.block dt:first-of-type, .block dt:first-of-type + dd { border-block-start: 0; }
.block h1, .block .nm a { margin: 0; font: 600 1.125rem/1.3 "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif; text-decoration: none; }

/* The mark sits in a cell of its own at the left of the title block, as a logo cell does on a drawing. */
.top .id { display: flex; max-width: 100%; }
.top .id .mark { flex: none; box-sizing: content-box; width: 3.5rem; height: auto; padding: 0 1rem; border: 1.5px solid var(--line); border-inline-end: 0; }
@media (max-width: 640px) {
  .top .id { width: 100%; }
  .top .id .block { width: auto; flex: 1; }
  .top .id .mark { width: 3rem; padding: 0 0.8rem; }
}
