*, ::after, ::before, ::backdrop, ::file-selector-button {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

::before, ::after {
  --en-content: '';
}

html, :host {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

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

b, strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

:-moz-focusring {
  outline: auto;
}

progress {
  vertical-align: baseline;
}

summary {
  display: list-item;
}

ol, ul, menu {
  list-style: none;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img, video {
  max-width: 100%;
  height: auto;
}

button, input, select, optgroup, textarea, ::file-selector-button {
  font: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  letter-spacing: inherit;
  color: inherit;
  border-radius: 0;
  background-color: transparent;
  opacity: 1;
}

:where(select:is([multiple], [size])) optgroup {
  font-weight: bolder;
}

:where(select:is([multiple], [size])) optgroup option {
  padding-inline-start: 20px;
}

::file-selector-button {
  margin-inline-end: 4px;
}

::placeholder {
  opacity: 1;
}

@supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or (contain-intrinsic-size: 1px) /* Safari 17+ */ {
  ::placeholder {
    color: color-mix(in oklab, currentcolor 50%, transparent);
  }
}

textarea {
  resize: vertical;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-date-and-time-value {
  min-height: 1lh;
  text-align: inherit;
}

::-webkit-datetime-edit {
  display: inline-flex;
}

::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
  padding-block: 0;
}

:-moz-ui-invalid {
  box-shadow: none;
}

button, input:where([type='button'], [type='reset'], [type='submit']), ::file-selector-button {
  appearance: button;
}

::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
  height: auto;
}

[hidden]:where(:not([hidden='until-found'])) {
  display: none !important;
}

*, ::before, ::after, ::backdrop, ::-webkit-backdrop {
  --en-border-spacing-x: 0;
  --en-border-spacing-y: 0;
  --en-translate-x: 0;
  --en-translate-y: 0;
  --en-translate-z: 0;
  --en-rotate-x: 0;
  --en-rotate-y: 0;
  --en-rotate-z: 0;
  --en-skew-x: 0;
  --en-skew-y: 0;
  --en-scale-x: 1;
  --en-scale-y: 1;
  --en-scale-z: 1;
  --en-pan-x: ;
  --en-pan-y: ;
  --en-pinch-zoom: ;
  --en-scroll-snap-strictness: proximity;
  --en-ordinal: ;
  --en-slashed-zero: ;
  --en-numeric-figure: ;
  --en-numeric-spacing: ;
  --en-numeric-fraction: ;
  --en-ring-inset: ;
  --en-ring-offset-width: 0px;
  --en-ring-offset-color: #fff;
  --en-ring-color: currentColor;
  --en-ring-offset-shadow: 0 0 #0000;
  --en-ring-shadow: 0 0 #0000;
  --en-shadow: 0 0 #0000;
  --en-shadow-colored: 0 0 #0000;
  --en-blur: ;
  --en-brightness: ;
  --en-contrast: ;
  --en-grayscale: ;
  --en-hue-rotate: ;
  --en-invert: ;
  --en-saturate: ;
  --en-sepia: ;
  --en-drop-shadow: ;
  --en-backdrop-blur: ;
  --en-backdrop-brightness: ;
  --en-backdrop-contrast: ;
  --en-backdrop-grayscale: ;
  --en-backdrop-hue-rotate: ;
  --en-backdrop-invert: ;
  --en-backdrop-opacity: ;
  --en-backdrop-saturate: ;
  --en-backdrop-sepia: ;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.relative {
  position: relative;
}

.static {
  position: static;
}

.top-0 {
  top: 0px;
}

.left-0 {
  left: 0px;
}

.mx-auto {
  margin-inline: auto;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.hidden {
  display: none;
}

.min-h-20 {
  min-height: 5rem;
}

.w-full {
  width: 100%;
}

.max-w-5xl {
  max-width: 64rem;
}

.flex-1 {
  flex: 1 1 0%;
}

.grow {
  flex-grow: 1;
}

.cursor-pointer {
  cursor: pointer;
}

.flex-col {
  flex-direction: column;
}

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

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.whitespace-pre-line {
  white-space: pre-line;
}

.p-1 {
  padding: 0.25rem;
}

.p-4 {
  padding: 1rem;
}

.px-4 {
  padding-inline: 1rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

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

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.lowercase {
  text-transform: lowercase;
}

:root {
  color-scheme: light;
  --color-bg: oklch(98% 0 0);
  --color-surface: oklch(96% 0.001 286.375);
  --color-border: oklch(88% 0.004 286.32);
  --color-text: oklch(21% 0.006 285.885);
  --color-muted: oklch(44% 0.017 285.786);
  --color-error: oklch(55% 0.241 354.308);
}

/* Without a theme cookie, follow the system setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: oklch(30.33% 0.016 252.42);
    --color-surface: oklch(25.26% 0.014 253.1);
    --color-border: oklch(40% 0.012 254.09);
    --color-text: oklch(97.807% 0.029 256.847);
    --color-muted: oklch(80% 0.02 256);
    --color-error: oklch(70% 0.2 17.585);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: oklch(30.33% 0.016 252.42);
  --color-surface: oklch(25.26% 0.014 253.1);
  --color-border: oklch(40% 0.012 254.09);
  --color-text: oklch(97.807% 0.029 256.847);
  --color-muted: oklch(80% 0.02 256);
  --color-error: oklch(70% 0.2 17.585);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Atkinson Hyperlegible", sans-serif;
}

a {
  text-decoration: underline;
}

.page-title {
  font-size: 2.25rem;
  line-height: 2.5rem;
  margin-top: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.5rem;
  line-height: 2rem;
  margin-top: 0.5rem;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown > summary {
  list-style: none;
  cursor: pointer;
  text-decoration: underline;
}

.dropdown > summary::-webkit-details-marker {
  display: none;
}

.dropdown-menu {
  position: absolute;
  z-index: 10;
  min-width: 13rem;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  font-size: 1.5rem;
}

.dropdown-menu a {
  display: block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: var(--color-border);
}

.problems {
  position: relative;
  display: inline-flex;
}

.problems-icon {
  display: inline-flex;
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--color-error);
  cursor: pointer;
}

.problems-panel {
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.75rem 2rem 0.75rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.5rem;
}

.problems-panel ul:has(> li + li) {
  list-style: disc;
  padding-left: 1.25rem;
}

.problems-panel li + li {
  margin-top: 0.5rem;
}

/* Tapped open, the panel sits in the top layer away from the icon, so pin it near the top. */
.problems-panel:popover-open {
  position: fixed;
  inset: 1rem auto auto 50%;
  margin: 0;
  transform: translateX(-50%);
}

.problems-close {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Hover only where a real pointer exists, so a tap doesn't half-open it on touch screens. */
@media (hover: hover) {
  .problems:hover > .problems-panel:not(:popover-open) {
    display: block;
    position: absolute;
    inset: 100% auto auto 0;
    z-index: 10;
    margin: 0;
  }

  .problems:hover > .problems-panel:not(:popover-open) .problems-close {
    display: none;
  }
}

.calendar-week {
  border-bottom: 1px solid var(--color-border);
}

.calendar-week:first-child {
  border-top: 1px solid var(--color-border);
}

.calendar-day {
  border-right: 1px solid var(--color-border);
}

.calendar-day:first-child {
  border-left: 1px solid var(--color-border);
}

.calendar-day.outside-month {
  color: var(--color-muted);
}

/* Both toggle buttons are rendered; show the one that switches away from the current theme. */
.theme-toggle button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

.theme-toggle .to-light {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .to-light {
  display: inline-flex;
}

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

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

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