/* Telisik. A reference work, not an app: paper, ink, one vermilion for footnote marks.
   Tokens first, then layout, then the two views. See design.md for the reasoning. */

:root {
  --bg: #fbfbf8;
  --surface: #f2f1ea;
  --ink: #16181d;
  --muted: #555a66;
  --rule: #d6d4ca;
  --link: #1a3fb0;
  --visited: #5b2a86;
  --accent: #c8321f;
  --warn: #8a5300;
  --mark-bg: #fbe7b5;
  --mark-ink: #16181d;
  --button-bg: #16181d;
  --button-ink: #fbfbf8;
  --backdrop: rgba(22, 24, 29, 0.45);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --gutter: 1rem;
  --margin-column: 0rem;
  --measure: 44rem;
  --control: 2.75rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318;
    --surface: #1a1d24;
    --ink: #e6e4de;
    --muted: #a3a7b2;
    --rule: #353a45;
    --link: #9db4ff;
    --visited: #c7a5e6;
    --accent: #ff7a66;
    --warn: #f0b860;
    --mark-bg: #4d3d0f;
    --mark-ink: #f6efd9;
    --button-bg: #e6e4de;
    --button-ink: #111318;
    --backdrop: rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --bg: #111318;
  --surface: #1a1d24;
  --ink: #e6e4de;
  --muted: #a3a7b2;
  --rule: #353a45;
  --link: #9db4ff;
  --visited: #c7a5e6;
  --accent: #ff7a66;
  --warn: #f0b860;
  --mark-bg: #4d3d0f;
  --mark-ink: #f6efd9;
  --button-bg: #e6e4de;
  --button-ink: #111318;
  --backdrop: rgba(0, 0, 0, 0.6);
}

@media (min-width: 900px) {
  :root {
    --gutter: 1.5rem;
    --margin-column: 9rem;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--visited);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: max(0.75rem, 0.875em);
  background: var(--surface);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

mark {
  background: var(--mark-bg);
  color: var(--mark-ink);
  padding: 0 0.1em;
  border-radius: 1px;
}

sup {
  font-size: 0.75em;
  line-height: 0;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 0.9rem;
  background: var(--button-bg);
  color: var(--button-ink);
}

.skip-link:visited {
  color: var(--button-ink);
}

.skip-link:focus {
  top: 0.5rem;
}

.fine {
  font-size: 0.8125rem;
  color: var(--muted);
}

.minor-heading {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ shared controls */

.search {
  display: flex;
  width: 100%;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 3rem;
  padding: 0 0.85rem;
  border: 1.5px solid var(--ink);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  background: var(--bg);
  font-size: 1.0625rem;
  appearance: none;
  -webkit-appearance: none;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search input:focus-visible {
  outline-offset: -4px;
}

.search-button {
  min-width: 3rem;
  height: 3rem;
  padding: 0 1.15rem;
  border: 1.5px solid var(--button-bg);
  border-radius: 0 2px 2px 0;
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 600;
}

.label-narrow {
  display: none;
}

.plain-button {
  min-height: var(--control);
  padding: 0 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
}

.plain-button:hover,
.more-button:hover {
  background: var(--surface);
}

.text-button {
  min-height: var(--control);
  min-width: var(--control);
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.tap {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  min-width: var(--control);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.25rem;
}

.lenses {
  display: flex;
  flex-wrap: wrap;
}

.lens {
  min-height: var(--control);
  min-width: var(--control);
  padding: 0 0.6rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

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

.lens[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--control);
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.switch-hint {
  font-size: 0.8125rem;
  font-weight: 400;
}

.switch-box {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.switch[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}

.switch[aria-pressed="true"] .switch-box {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 2px var(--bg);
}

/* ------------------------------------------------------------------ wordmark */

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.wordmark a,
.wordmark a:visited {
  color: var(--ink);
  text-decoration: none;
}

.wordmark sup {
  margin-left: 0.08em;
  font-family: var(--sans);
  font-size: 0.3em;
  font-weight: 600;
  color: var(--accent);
  vertical-align: 1.9em;
}

/* ------------------------------------------------------------------ home view */

.is-home .masthead,
.is-home .controls,
.is-home main,
.is-home .footer {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.is-home .masthead {
  padding-top: clamp(2.5rem, 13vh, 8rem);
}

.is-home .wordmark {
  font-size: clamp(3.25rem, 13vw, 5rem);
}

.is-home .tagline {
  margin: 0.9rem 0 1.6rem;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 2.6vw, 1.25rem);
  font-style: italic;
  color: var(--muted);
}

.is-home .controls {
  margin-top: 0.5rem;
}

.home {
  padding-top: 2.25rem;
}

.examples,
.recent {
  margin-bottom: 2rem;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.example-list {
  margin-top: 0.35rem;
}

.example-list a {
  font-family: var(--serif);
  font-size: 1.125rem;
  min-height: var(--control);
}

.footnotes {
  position: relative;
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  counter-reset: footnote;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* The short rule that separates footnotes from body text in a printed book. */
.footnotes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 7rem;
  border-top: 1px solid var(--ink);
}

.footnotes li {
  position: relative;
  margin-bottom: 0.6rem;
  padding-left: 1.4rem;
  counter-increment: footnote;
}

.footnotes li::before {
  content: counter(footnote);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

/* ------------------------------------------------------------------ results view: header */

.is-results .masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.5rem var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.is-results .wordmark {
  font-size: 1.375rem;
}

.is-results .wordmark a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
}

.is-results .tagline,
.is-results .wordmark sup {
  display: none;
}

.is-results .search input,
.is-results .search-button {
  height: var(--control);
}

.is-results .search-button {
  padding: 0 0.8rem;
}

.is-results .label-wide {
  display: none;
}

.is-results .label-narrow {
  display: inline;
}

.is-results .controls {
  padding: 0.15rem var(--gutter) 0;
  border-bottom: 1px solid var(--rule);
}

.is-results .footer {
  padding-left: calc(var(--gutter) + var(--margin-column));
}

@media (min-width: 900px) {
  .is-results .masthead {
    grid-template-columns: var(--margin-column) minmax(0, var(--measure));
    column-gap: 0;
    padding-block: 0.75rem;
  }

  .is-results .wordmark {
    font-size: 1.75rem;
  }

  .is-results .label-wide {
    display: inline;
  }

  .is-results .label-narrow {
    display: none;
  }

  .is-results .search-button {
    padding: 0 1.15rem;
  }

  .is-results .controls {
    padding-left: calc(var(--gutter) + var(--margin-column) - 0.6rem);
  }
}

/* ------------------------------------------------------------------ results view: body */

.results-view {
  padding: 1rem var(--gutter) 3rem calc(var(--gutter) + var(--margin-column));
}

.column {
  max-width: var(--measure);
  min-width: 0;
}

.ledger {
  max-width: var(--measure);
  margin-bottom: 0.75rem;
}

.ledger-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.1rem;
  margin-top: 0.15rem;
}

.ledger-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: var(--control);
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.9375rem;
  line-height: var(--control);
  text-align: left;
}

.ledger-item.is-static {
  color: var(--muted);
}

button.ledger-item:hover .ledger-name {
  text-decoration: underline;
}

.ledger-item[aria-pressed="true"] .ledger-name {
  font-weight: 700;
  box-shadow: 0 2px 0 var(--accent);
}

.ledger-state {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.state-loading {
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
}

.state-empty {
  font-weight: 400;
  color: var(--muted);
}

.state-timeout,
.state-limit,
.state-error {
  font-weight: 400;
  color: var(--warn);
}

.ledger-saved {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

.ledger-toggle {
  display: none;
}

/* Phones: one line that says how many sources answered; it opens into the full index.
   The lenses and the Before AI switch share rows so six lenses do not cost a third line. */
@media (max-width: 699px) {
  .controls {
    column-gap: 0;
  }

  .lenses {
    display: contents;
  }

  .lens {
    padding: 0 0.5rem;
  }

  .switch {
    padding-left: 0.5rem;
  }

  .ledger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 1rem;
    margin-bottom: 0.35rem;
  }

  .ledger-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: var(--control);
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.9375rem;
  }

  .ledger-toggle-word {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
  }

  .ledger-list {
    display: none;
    flex-basis: 100%;
  }

  .ledger.is-open .ledger-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    column-gap: 1.5rem;
    margin-bottom: 0.25rem;
    border-top: 1px solid var(--rule);
  }

  .ledger-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    white-space: nowrap;
  }

  .ledger-notes {
    flex-basis: 100%;
  }
}

.ledger-notes {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.ledger-notes li {
  margin-bottom: 0.25rem;
}

.summary {
  font-size: 0.875rem;
  color: var(--muted);
}

.notice {
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 0.9375rem;
}

.suggestion {
  font-weight: 600;
}

.update-button {
  position: sticky;
  top: 4.25rem;
  z-index: 10;
  width: 100%;
  min-height: var(--control);
  margin-top: 0.75rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--mark-bg);
  color: var(--mark-ink);
  font-weight: 600;
  text-align: left;
}

/* Quotes */

.passages {
  margin-top: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.passage {
  margin-top: 0.9rem;
}

.passage blockquote {
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.5;
}

.passage .ref {
  margin-left: 0.15em;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--accent);
  vertical-align: super;
}

.attribution {
  gap: 0.5rem;
  align-items: baseline;
  margin-left: 1rem;
  padding: 0.2rem 0 0;
  border: 0;
  background: none;
  color: var(--link);
  font-size: 0.875rem;
  text-align: left;
}

.attribution cite {
  font-style: italic;
}

.attribution:hover cite {
  text-decoration: underline;
}

.attribution-number {
  font-weight: 600;
  color: var(--accent);
}

.passages .fine {
  margin-top: 0.4rem;
}

/* Result list */

.results {
  margin-top: 0.5rem;
}

.result {
  position: relative;
  padding: 1.1rem 0 0.9rem;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}

.result-number {
  float: left;
  margin-right: 0.6rem;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.kicker {
  font-size: 0.8125rem;
  line-height: 1.3rem;
  color: var(--muted);
}

.kicker span + span::before {
  content: "\00b7";
  margin: 0 0.45em;
}

.kind {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}

.result-title {
  clear: left;
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.3;
}

.title-link {
  display: inline-block;
  min-height: var(--control);
  padding: 0.5rem 0;
  text-decoration: none;
}

.title-link:hover {
  text-decoration: underline;
}

.result-url,
.byline {
  font-size: 0.8125rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.result-url {
  margin-top: -0.3rem;
}

.snippet {
  margin-top: 0.4rem;
}

.snippet.is-meta {
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.badges li + li::before {
  content: "\00b7";
  margin: 0 0.45em;
}

.why-line {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.1rem;
  margin-top: 0.15rem;
}

.action {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  min-width: var(--control);
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a.action:visited {
  color: var(--muted);
}

.action:hover,
.action[aria-expanded="true"] {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.panel {
  margin: 0.35rem 0 0.5rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--ink);
  background: var(--surface);
  font-size: 0.9375rem;
}

.why-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--rule);
}

.why-row dt {
  flex: 1 1 14rem;
  font-weight: 600;
}

.why-detail {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

.why-row dd {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.why-row:last-child {
  border-bottom: 0;
  border-top: 1px solid var(--ink);
  margin-top: -1px;
}

.why-row:last-child dd {
  font-weight: 700;
}

.why .fine {
  margin-top: 0.5rem;
}

.citation {
  margin-bottom: 0.6rem;
  font-family: var(--serif);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.copy-status {
  margin-left: 0.6rem;
}

.more-button {
  width: 100%;
  min-height: 3rem;
  margin-top: 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-weight: 600;
}

.empty {
  margin-top: 1.5rem;
}

.empty h2 {
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.25;
}

.tips {
  list-style: disc;
  padding-left: 1.2rem;
}

.empty-actions,
.empty > .plain-button {
  margin-top: 1rem;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.elsewhere {
  margin-top: 2.25rem;
}

.elsewhere-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
}

.elsewhere-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.elsewhere-list code {
  color: var(--muted);
}

/* Wide screens: the ledger moves into the right margin like an index column. */
@media (min-width: 1160px) {
  .results-view {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) 15rem;
    column-gap: 4rem;
    align-items: start;
  }

  .column {
    grid-column: 1;
    grid-row: 1;
  }

  .ledger {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 5.5rem;
    margin-bottom: 0;
  }

  .ledger-list {
    display: block;
    margin-top: 0.4rem;
  }

  .ledger-item {
    display: flex;
    width: 100%;
    min-height: 2rem;
    line-height: 2rem;
  }

  /* Dotted leader between a name and its count, as in a printed index. */
  .ledger-name {
    display: flex;
    flex: 1;
    align-items: baseline;
    gap: 0.4rem;
    white-space: nowrap;
  }

  .ledger-name::after {
    content: "";
    flex: 1;
    min-width: 1rem;
    border-bottom: 1px dotted var(--muted);
    transform: translateY(-0.2em);
  }

  .ledger-item[aria-pressed="true"] .ledger-name {
    box-shadow: none;
  }

  .ledger-item[aria-pressed="true"] {
    box-shadow: -3px 0 0 var(--accent);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
    width: calc(100% + 0.5rem);
  }
}

@media (min-width: 900px) {
  .result-number {
    float: none;
    position: absolute;
    left: -2.6rem;
    top: 1.1rem;
    width: 2rem;
    margin: 0;
    text-align: right;
  }

  .action,
  .ledger-item {
    min-height: 2rem;
  }

  .title-link {
    min-height: 0;
    padding: 0.2rem 0;
  }

  .example-list a {
    min-height: 2.25rem;
  }

  .result-url {
    margin-top: 0;
  }
}

/* ------------------------------------------------------------------ footer, settings */

.footer {
  padding: 1.25rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

.is-home .footer {
  margin-top: 2.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.25rem;
}

.sponsor {
  margin-bottom: 0.5rem;
}

.sponsor-label {
  margin-right: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings {
  width: min(26rem, calc(100vw - 2rem));
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
}

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

.settings-form {
  padding: 1.25rem;
}

.settings-form h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
}

.field {
  display: block;
  margin-top: 1rem;
}

.field span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.field select {
  width: 100%;
  height: var(--control);
  padding: 0 0.6rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--bg);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--control);
  margin-top: 0.5rem;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--accent);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 1.1rem 0 0.5rem;
}

.settings-actions .search-button {
  height: var(--control);
  border-radius: 2px;
}

.noscript {
  max-width: 42rem;
  margin: 1rem auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------ about page */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.page-head .site-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.page-head .site-name a,
.page-head .site-name a:visited {
  color: var(--ink);
  text-decoration: none;
}

.prose {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding: 2rem var(--gutter) 3rem;
}

.prose h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.prose .lede {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: 1.1875rem;
  color: var(--muted);
}

.prose h2 {
  margin-top: 2.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.25;
  scroll-margin-top: 1rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1rem;
}

.prose p,
.prose ul,
.prose ol,
.prose .table-wrap,
.prose pre {
  margin-top: 0.85rem;
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.prose ol {
  list-style: decimal;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.toc {
  columns: 2 14rem;
  column-gap: 2rem;
  margin-top: 1.5rem;
}

.prose ul.toc {
  list-style: none;
  padding-left: 0;
}

.toc a {
  min-height: var(--control);
}

@media (min-width: 900px) {
  .toc a {
    min-height: 2.25rem;
  }
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 0.45rem 0.75rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.formula {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

kbd {
  padding: 0.05em 0.4em;
  border: 1px solid var(--muted);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

@media print {
  .masthead,
  .controls,
  .ledger,
  .actions,
  .footer,
  .elsewhere,
  .update-button,
  .more-button {
    display: none !important;
  }
}
