html.lightpath-large-text { font-size: 125%; }
html.lightpath-underline-links a[href] { text-decoration-line: underline; text-underline-offset: .18em; }

.access-tools {
  --access-inset: max(12px, env(safe-area-inset-bottom));
  --access-surface: #101214;
  --access-text: #e3eaec;
  --access-accent: #adc5cd;
  color-scheme: dark;
}
.access-tools button {
  display: grid; place-items: center; box-sizing: border-box;
  width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0;
  background: var(--access-surface); color: var(--access-text);
  border: 2px solid var(--access-accent); border-radius: 50%; cursor: pointer;
}
.access-tools svg { width: 24px; height: 24px; fill: currentColor; }
.access-tools :is(.access-launch, .access-top) { border-color: rgb(173 197 205 / 61.8%); }
@media (prefers-contrast: more) {
  .access-tools :is(.access-launch, .access-top) { border-color: var(--access-accent); }
}
.access-launch, .access-top { position: fixed; bottom: var(--access-inset); z-index: 8; }
.access-launch { left: calc(max(12px, env(safe-area-inset-left)) + var(--page-gutter, 0px)); }
.access-top { right: calc(max(12px, env(safe-area-inset-right)) + var(--page-gutter, 0px)); }
@supports (height: 100dvh) {
  @media (hover: none) and (pointer: coarse) {
    /* Anchor to the top and let the toolbar resize the usable height. */
    .access-tools {
      position: fixed;
      inset: 0 0 auto;
      height: 100dvh;
      z-index: 8;
      pointer-events: none;
    }
    .access-launch, .access-top { position: absolute; pointer-events: auto; }
    #access-panel { pointer-events: auto; }
  }
}
.access-top[inert] { visibility: hidden; opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: no-preference) {
  .access-top { transition: opacity .16s ease-out, transform .16s ease-out; }
}
#access-panel {
  --panel-inset: clamp(16px, 4vw, 24px);
  position: fixed; inset: auto auto var(--access-inset) max(12px, env(safe-area-inset-left));
  box-sizing: border-box; width: min(25rem, calc(100% - 24px));
  max-height: min(85dvh, calc(100dvh - var(--access-inset) - env(safe-area-inset-top) - 12px));
  margin: 0; padding: var(--panel-inset) var(--panel-inset) calc(var(--panel-inset) + 20px);
  overflow: hidden; border: 1px solid var(--access-accent);
  border-radius: calc(22px + var(--panel-inset) + 1px);
  color: var(--access-text); background: var(--access-surface);
  font: 400 1.0625rem/1.5 "Noto Sans", sans-serif;
}
#access-panel[open] { display: flex; flex-direction: column; }
#access-panel::backdrop { background: rgb(4 8 10 / 65%); }
.access-heading {
  flex: none; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #52636c;
}
.access-heading button { flex: none; }
#access-title { font: 400 1.5rem/1.2 Cinzel, Georgia, serif; margin: 0; overflow-wrap: anywhere; }
.access-settings { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#access-instructions, #access-panel .access-help { margin:0; padding:16px 4px; color:inherit; font:inherit; }
#access-instructions { border-bottom:1px solid #52636c; }
#access-panel .access-help { border-top:1px solid #52636c; padding-bottom:0; }
#access-panel label {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center;
  gap: 12px; min-height: 48px; box-sizing: border-box; padding: 14px 4px;
  cursor: pointer; overflow-wrap: anywhere;
}
#access-panel label + label { border-top: 1px solid #52636c; }
#access-panel input { width: 20px; height: 20px; margin: 0; accent-color: var(--access-accent); }
#access-panel input:focus-visible { outline-offset: 1px; }
.access-tools :focus-visible { outline: 3px solid var(--access-accent); outline-offset: 2px; }
body:has(.access-tools) > footer { padding-bottom: max(64px, calc(env(safe-area-inset-bottom) + 56px)); }
body:has(.access-tools) .control-toggle { left: max(68px, calc(env(safe-area-inset-left) + 56px)); }
@media print { .access-tools { display: none; } }

html.lightpath-reading-space :is(p, li, dd, blockquote) {
  word-spacing: .12em;
  line-height: 1.8;
}
html.lightpath-strong-focus :focus-visible {
  outline: 3px solid #e3eaec !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 7px #101214 !important;
}
@media (forced-colors: active) {
  html.lightpath-strong-focus :focus-visible { outline-color: Highlight !important; }
}
html.edge-scrollbar.lightpath-still-gutters body { --page-gutter: 0px; }
@media (prefers-reduced-motion: reduce) {
  html.edge-scrollbar body { --page-gutter: 0px; }
}
@media (forced-colors: none) {
  ::selection { color: #070809; background-color: var(--wren-buff, #c0b3a2); text-shadow: none; }
}

html.lightpath-reduce-motion,
html.lightpath-reduce-motion *,
html.lightpath-reduce-motion ::before,
html.lightpath-reduce-motion ::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.edge-scrollbar.lightpath-reduce-motion body { --page-gutter: 0px; }

html.lightpath-reduce-motion details::details-content { transition: none !important; }
