html.larger-member-text { font-size: 125%; }

.header-actions .theme-toggle,
.text-size-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--chrome, var(--surface));
  color: var(--paper, var(--ink));
  font: 650 1rem/1 var(--site-font, var(--font, system-ui));
  cursor: pointer;
}

.header-actions .theme-toggle[hidden] { display: none; }
.header-actions .theme-toggle:hover, .text-size-toggle:hover,
.text-size-toggle[aria-pressed="true"] { border-color: currentColor; }
.header-actions .theme-toggle:focus-visible, .text-size-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

[data-theme-icon], [data-theme-icon] svg { display: block; inline-size: 18px; block-size: 18px; }
.appearance-status {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.installation-header { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.installation-header .text-size-toggle { order: 1; }

@media (prefers-reduced-motion: no-preference) {
  html.text-size-changing { transition: font-size 250ms cubic-bezier(.22,.61,.36,1); }
  html.theme-fading body, html.theme-fading body :not(video, iframe, canvas) {
    transition: color 320ms ease, background-color 320ms ease, border-color 320ms ease, box-shadow 320ms ease, fill 320ms ease, stroke 320ms ease !important;
  }
}

/* Keep header controls clear of the logo when the root text size changes. */
@media (max-width: 560px) {
  body > header .top { column-gap: 8px; }
  body > header .top .brand { min-width: 0; max-width: 100%; gap: 5px; font-size: 15px; }
  body > header .top .brand-symbol { flex: none; width: 34px; height: 34px; }
  body > header .top .brand-wordmark { flex: 0 1 68px; width: 68px; height: 18px; }
  body > header .top .header-actions { gap: 6px; }
  body > header .top .header-actions :is(.officials-help-button, .theme-toggle) {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }
  body > header .top .officials-help-button > span { display: none; }
}
@media (max-width: 360px) {
  body > header .top .brand > span[aria-hidden="true"] { display: none; }
}

:is(.header-back, .sector-back) {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  width: max(44px, 2.75rem);
  height: max(44px, 2.75rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--chrome);
  color: var(--paper);
  cursor: pointer;
}
:is(.header-back, .sector-back)[hidden] { display: none; }
:is(.header-back, .sector-back):hover { border-color: currentColor; }
:is(.header-back, .sector-back):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }


/* Native chooser with the same surface, focus and accent colors as the site. */
body input[type="file"] {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: .35rem;
  overflow: hidden;
  border: 1px solid var(--line, currentColor);
  border-radius: .75rem;
  background: var(--field, var(--surface, Canvas));
  color: var(--muted, CanvasText);
  font-size: .875rem;
  text-overflow: ellipsis;
  cursor: pointer;
}

body input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-inline-end: .6rem;
  padding: .35rem .7rem;
  border: 0;
  border-radius: .45rem;
  background: var(--accent, #891b22);
  color: var(--on-accent, #fff);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

body input[type="file"]:hover {
  border-color: var(--field-border, currentColor);
}

body input[type="file"]:focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 2px;
}
