:root {
  --red: #c8142b;
  --red-dark: #9b0f20;
  --paper: #ffffff;
  --white: #ffffff;
  --blue: #174ea6;
  --yellow: #f4c400;
}

body.large-text { font-size: 1.25rem; }
body.low-stimulation {
  --red: #871628;
  --red-dark: #6f1220;
  --blue: #253f68;
  --yellow: #d2aa16;
}
body.focus-view .optional-content { display: none !important; }

.tio-utility {
  position: relative;
  z-index: 1100;
  background: #0b0b0d;
  color: #ffffff;
}
.tio-utility-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 44px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.tio-utility p { margin: 0; color: #ffffff; font-size: .875rem; line-height: 1.4; }
.tio-view-controls { position: relative; }
.tio-view-controls > summary {
  list-style: none;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
}
.tio-view-controls > summary::-webkit-details-marker { display: none; }
.tio-control-panel {
  position: absolute;
  z-index: 1200;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, calc(100vw - 30px));
  padding: 20px;
  color: #0b0b0d;
  background: #ffffff;
  border: 3px solid #0b0b0d;
  box-shadow: 8px 8px 0 var(--yellow);
}
.tio-control-panel h2 { margin: 0 0 8px; color: #0b0b0d; font-size: 1.25rem; line-height: 1.2; }
.tio-control-panel > p { margin: 0 0 18px; color: #0b0b0d; font-size: .9375rem; }
.tio-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid #0b0b0d;
}
.tio-control-row label { color: #0b0b0d; font-weight: 700; }
.tio-control-row input { width: 25px; height: 25px; accent-color: var(--blue); }
.tio-text-buttons { display: flex; gap: 5px; }
.tio-text-buttons button,
.tio-reset-button {
  color: #0b0b0d;
  background: #ffffff;
  border: 2px solid #0b0b0d;
  border-radius: 0;
  font-weight: 700;
}
.tio-text-buttons button { min-width: 44px; min-height: 40px; padding: 4px 8px; }
.tio-text-buttons button[aria-pressed="true"] { color: #ffffff; background: #0b0b0d; }
.tio-reset-button { width: 100%; margin-top: 15px; padding: 10px; }

.tio-site-header {
  position: sticky;
  inset: 0 0 auto;
  z-index: 1000;
  color: #0b0b0d;
  background: #ffffff;
  border-bottom: 2px solid #0b0b0d;
}
.tio-header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 84px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.tio-logo {
  width: 150px;
  flex: 0 0 150px;
  margin-right: auto;
  display: block;
  color: #0b0b0d;
  text-decoration: none;
}
.tio-logo img { display: block; width: 100%; height: auto; }
.tio-desktop-nav { display: flex; align-items: center; gap: 24px; white-space: nowrap; }
.tio-desktop-nav a {
  position: relative;
  color: #0b0b0d;
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
}
.tio-desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 3px;
  background: var(--red);
}
.tio-desktop-nav a:hover::after,
.tio-desktop-nav a:focus-visible::after,
.tio-desktop-nav a[aria-current="page"]::after { right: 0; }
.tio-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  padding: 9px 15px;
  color: #ffffff;
  background: var(--red);
  border: 2px solid #0b0b0d;
  border-radius: 0;
  font-size: .9375rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.tio-mobile-nav { display: none; color: #0b0b0d; }
.tio-mobile-nav summary {
  color: #0b0b0d;
  background: #ffffff;
  border: 2px solid #0b0b0d;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}
.tio-mobile-nav > div {
  position: absolute;
  z-index: 1050;
  left: 20px;
  right: 20px;
  top: calc(100% + 8px);
  padding: 16px;
  color: #0b0b0d;
  background: #ffffff;
  border: 3px solid #0b0b0d;
  box-shadow: 7px 7px 0 var(--yellow);
}
.tio-mobile-nav a {
  display: block;
  min-height: 48px;
  padding: 10px 4px;
  color: #0b0b0d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.tio-status-message {
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  padding: 10px 16px;
  color: #ffffff;
  background: #0b0b0d;
  border: 2px solid #ffffff;
  font-weight: 700;
}

@media (max-width: 1040px) {
  .tio-desktop-nav,
  .tio-header-cta { display: none; }
  .tio-mobile-nav { display: block; }
}

@media (max-width: 560px) {
  .tio-utility-inner,
  .tio-header-inner { width: min(1180px, calc(100% - 28px)); }
  .tio-utility-inner { min-height: 50px; }
  .tio-utility p { max-width: 205px; font-size: .75rem; }
  .tio-header-inner { min-height: 72px; }
  .tio-logo { width: 125px; flex-basis: 125px; }
}

@media (prefers-reduced-motion: reduce) {
  .tio-site-header { position: static; }
}
