@font-face {
  font-family: Onest;
  src: url('/assets/onest-variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  -webkit-tap-highlight-color: transparent;
  --ground: #f4f6f7;
  --sheet: #fcfdfd;
  --ink: #302f2a;
  --muted: #68665e;
  --control: #e8ebed;
  --rule: #d1d6d8;
  --accent: #ac4029;
  --reverse: #fffefa;
  --down: #777568;
  --good: #427652;
  --bad: #a34639;
  --gutter: 5%;
  --line: var(--rule);
  --on: var(--reverse);
  --strong: var(--accent);
}

:root[data-tone=dark] {
  color-scheme: dark;
  --ground: #191c1e;
  --sheet: #222628;
  --ink: #f1efe5;
  --muted: #bcbab0;
  --control: #303538;
  --rule: #42484b;
  --accent: #fa9a7c;
  --reverse: #262620;
  --down: #aaa99b;
  --good: #a0c09c;
  --bad: #ed9989;
}

:focus { outline: none; }
a[href]:focus-visible, :is(button, summary):focus-visible,
label:has(> input:is([type=checkbox], [type=radio]):focus-visible) {
  text-decoration: underline 2px;
  text-underline-offset: .2em;
}
:is(input:not([type=checkbox], [type=radio]), select, textarea):focus-visible {
  box-shadow: inset 0 -2px var(--accent);
}
.theme-switch button:focus-visible svg { stroke-width: 3px; }
@media (forced-colors: active) {
  :is(input:not([type=checkbox], [type=radio]), select, textarea):focus-visible {
    border-bottom: 2px solid Highlight;
  }
}

.logo-symbol { display: inline-block; width: 36px; height: 36px; flex-shrink: 0; vertical-align: middle; background: var(--accent); mask: url('/assets/logo-fall.png') center / contain no-repeat; }
.brand { color: inherit; text-decoration: none; }
.theme-switch { display: inline-flex; gap: 3px; margin: 0; padding: 3px; border: 1px solid var(--rule); border-radius: 8px; }
.theme-switch button { display: grid; place-items: center; border: 0; width: 38px; height: 34px; min-height: 34px; padding: 0; color: var(--ink); background: transparent; border-radius: 5px; cursor: pointer; }
.theme-switch button[aria-pressed=true] { color: var(--reverse); background: var(--accent); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.session-link { min-height: 40px; display: inline-flex; align-items: center; padding: 3px; border: 0; font: inherit; color: var(--muted); background: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
[role=alert] { color: var(--bad); overflow-wrap: anywhere; }
[role=alert]:empty, [role=status]:empty, [hidden] { display: none !important; }
.logo-symbol + span { vertical-align: middle; }
.view-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px max(12px,3vw); border-bottom: 1px solid var(--rule); }
#mobile-menu-toggle, .mobile-menu { display: none; }
.view-switch .theme-switch { margin-inline-start: auto; }
.view-switch nav { display: flex; flex: 1; gap: 3px; }
.view-switch nav a:not([aria-current]) { margin-inline-start: auto; }
.view-switch a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border-radius: 5px; color: inherit; font: 14px/1.4 Onest,system-ui,sans-serif; text-decoration: none; }
.view-switch a[aria-current=page] { color: var(--reverse); background: var(--accent); }
.view-switch a:hover:not([aria-current]) { background: var(--control); }
.view-switch ~ .app { min-height: calc(100dvh - 57px); }

.select-with-chevron { position: relative; display: block; }
.select-with-chevron select { appearance: none; margin-top: 0; padding-inline-end: 36px; }
.select-with-chevron::after {
  content: ''; position: absolute; inset-inline-end: 12px; top: 50%;
  width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field > .select-with-chevron { margin-top: 6px; }
