/*
 * Material Design 3 — hand-rolled.
 *
 * No framework, no CDN, no build step: the page is served straight from GitHub Pages and must work
 * with nothing but the three files next to it. Tokens follow the M3 naming so the mapping back to
 * the spec stays obvious.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  --md-sys-color-primary: #0061a4;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d1e4ff;
  --md-sys-color-on-primary-container: #001d36;
  --md-sys-color-secondary: #535f70;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #d7e3f7;
  --md-sys-color-on-secondary-container: #101c2b;
  --md-sys-color-tertiary: #6b5778;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #f2daff;
  --md-sys-color-on-tertiary-container: #251431;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-surface: #fdfcff;
  --md-sys-color-on-surface: #1a1c1e;
  --md-sys-color-surface-variant: #dfe2eb;
  --md-sys-color-on-surface-variant: #43474e;
  --md-sys-color-outline: #73777f;
  --md-sys-color-outline-variant: #c3c7cf;
  --md-sys-color-inverse-surface: #2f3033;
  --md-sys-color-inverse-on-surface: #f1f0f4;
  --md-sys-color-inverse-primary: #9ecaff;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f7f9fc;
  --md-sys-color-surface-container: #f1f4f9;
  --md-sys-color-surface-container-high: #eceff4;
  --md-sys-color-surface-container-highest: #e6e8ee;

  --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);
  --md-sys-elevation-2: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 6px 2px rgba(0, 0, 0, .15);
  --md-sys-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .3);

  --md-sys-shape-sm: 8px;
  --md-sys-shape-md: 12px;
  --md-sys-shape-lg: 16px;
  --md-sys-shape-xl: 28px;

  --md-easing: cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
  :root:not([data-theme="light"]) {
    --md-sys-color-primary: #9ecaff;
    --md-sys-color-on-primary: #003258;
    --md-sys-color-primary-container: #00497d;
    --md-sys-color-on-primary-container: #d1e4ff;
    --md-sys-color-secondary: #bbc7db;
    --md-sys-color-on-secondary: #253140;
    --md-sys-color-secondary-container: #3b4858;
    --md-sys-color-on-secondary-container: #d7e3f7;
    --md-sys-color-tertiary: #d6bee4;
    --md-sys-color-on-tertiary: #3b2948;
    --md-sys-color-tertiary-container: #523f5f;
    --md-sys-color-on-tertiary-container: #f2daff;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-surface: #111416;
    --md-sys-color-on-surface: #e2e2e6;
    --md-sys-color-surface-variant: #43474e;
    --md-sys-color-on-surface-variant: #c3c7cf;
    --md-sys-color-outline: #8d9199;
    --md-sys-color-outline-variant: #43474e;
    --md-sys-color-inverse-surface: #e2e2e6;
    --md-sys-color-inverse-on-surface: #2f3033;
    --md-sys-color-inverse-primary: #0061a4;
    --md-sys-color-surface-container-lowest: #0c0e11;
    --md-sys-color-surface-container-low: #1a1c1e;
    --md-sys-color-surface-container: #1e2022;
    --md-sys-color-surface-container-high: #282a2d;
    --md-sys-color-surface-container-highest: #333537;
  }
}

/* Explicit toggle wins over the media query in both directions. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --md-sys-color-primary: #9ecaff;
  --md-sys-color-on-primary: #003258;
  --md-sys-color-primary-container: #00497d;
  --md-sys-color-on-primary-container: #d1e4ff;
  --md-sys-color-secondary: #bbc7db;
  --md-sys-color-on-secondary: #253140;
  --md-sys-color-secondary-container: #3b4858;
  --md-sys-color-on-secondary-container: #d7e3f7;
  --md-sys-color-tertiary: #d6bee4;
  --md-sys-color-on-tertiary: #3b2948;
  --md-sys-color-tertiary-container: #523f5f;
  --md-sys-color-on-tertiary-container: #f2daff;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-surface: #111416;
  --md-sys-color-on-surface: #e2e2e6;
  --md-sys-color-surface-variant: #43474e;
  --md-sys-color-on-surface-variant: #c3c7cf;
  --md-sys-color-outline: #8d9199;
  --md-sys-color-outline-variant: #43474e;
  --md-sys-color-inverse-surface: #e2e2e6;
  --md-sys-color-inverse-on-surface: #2f3033;
  --md-sys-color-inverse-primary: #0061a4;
  --md-sys-color-surface-container-lowest: #0c0e11;
  --md-sys-color-surface-container-low: #1a1c1e;
  --md-sys-color-surface-container: #1e2022;
  --md-sys-color-surface-container-high: #282a2d;
  --md-sys-color-surface-container-highest: #333537;
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
}

h1, h2, h3 { margin: 0; font-weight: 400; }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.icon-sm { width: 18px; height: 18px; }

.hidden { display: none !important; }

/* ---------------------------------------------------------------- top app bar */

.app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 8px 16px;
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.app-bar__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-bar__mark { color: var(--md-sys-color-primary); }
.app-bar__titles { min-width: 0; }
.app-bar__title { font-size: 22px; line-height: 28px; white-space: nowrap; }
.app-bar__subtitle {
  font-size: 12px;
  line-height: 16px;
  color: var(--md-sys-color-on-surface-variant);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-bar__spacer { flex: 1; }
.app-bar__actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 600px) {
  .app-bar__title { font-size: 18px; }
  .app-bar__subtitle { display: none; }
}

/* ---------------------------------------------------------------- layout */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  color: var(--md-sys-color-primary);
  transition: box-shadow .2s var(--md-easing), background-color .2s var(--md-easing);
}
.btn:has(> .icon:first-child) { padding-left: 16px; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity .15s var(--md-easing);
  pointer-events: none;
}
.btn:hover::after { opacity: .08; }
.btn:focus-visible::after { opacity: .1; }
.btn:active::after { opacity: .12; }
.btn:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }
.btn:disabled { cursor: default; opacity: .38; }
.btn:disabled::after { opacity: 0 !important; }

.btn--filled { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.btn--filled:hover { box-shadow: var(--md-sys-elevation-1); }
.btn--tonal { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.btn--outlined { border: 1px solid var(--md-sys-color-outline); }
.btn--text { padding: 0 12px; }
.btn--danger { color: var(--md-sys-color-error); }
.btn--danger.btn--filled { background: var(--md-sys-color-error); color: var(--md-sys-color-on-error); }

.icon-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
}
.icon-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity .15s var(--md-easing);
}
.icon-btn:hover::after { opacity: .08; }
.icon-btn:active::after { opacity: .12; }
.icon-btn:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: .16;
  animation: ripple .5s var(--md-easing) forwards;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ripple { display: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-md);
  padding: 20px;
}
.card--outlined { border: 1px solid var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface); }

.card__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.card__head .icon { color: var(--md-sys-color-primary); margin-top: 2px; }
.card__title { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .15px; }
.card__blurb {
  font-size: 12px;
  line-height: 16px;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 16px 36px;
}
.card__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.fields > .field--wide { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- text field (M3 filled) */

.textfield { display: flex; flex-direction: column; }

.textfield__box {
  position: relative;
  height: 56px;
  border-radius: 4px 4px 0 0;
  background: var(--md-sys-color-surface-container-highest);
  border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
  transition: background-color .15s var(--md-easing), border-color .15s var(--md-easing);
}
.textfield__box:hover { background: var(--md-sys-color-surface-container-high); }
.textfield__box:focus-within { border-bottom: 2px solid var(--md-sys-color-primary); }

.textfield input {
  width: 100%;
  height: 100%;
  padding: 24px 16px 8px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  outline: none;
  -moz-appearance: textfield;
}
.textfield input::-webkit-outer-spin-button,
.textfield input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.textfield--suffixed input { padding-right: 56px; }

.textfield__label {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: 16px;
  line-height: 24px;
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .15s var(--md-easing), color .15s var(--md-easing);
}
.textfield input:focus + .textfield__label,
.textfield input:not(:placeholder-shown) + .textfield__label {
  transform: translateY(-10px) scale(.75);
}
.textfield input:focus + .textfield__label { color: var(--md-sys-color-primary); }

.textfield__suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-2px);
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
}

.textfield__support {
  display: flex;
  gap: 8px;
  padding: 4px 16px 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--md-sys-color-on-surface-variant);
  min-height: 20px;
}

.textfield.is-invalid .textfield__box { border-bottom-color: var(--md-sys-color-error); }
.textfield.is-invalid .textfield__box:focus-within { border-bottom: 2px solid var(--md-sys-color-error); }
.textfield.is-invalid .textfield__label,
.textfield.is-invalid .textfield__support { color: var(--md-sys-color-error); }

.textfield.is-modified .textfield__box::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--md-sys-color-tertiary);
}

/* ---------------------------------------------------------------- switch */

.switchrow {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 4px;
}
.switchrow__text { flex: 1; }
.switchrow__label { font-size: 16px; }
.switchrow__support { font-size: 12px; color: var(--md-sys-color-on-surface-variant); }

.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch__track {
  display: block;
  width: 52px;
  height: 32px;
  border-radius: 16px;
  background: var(--md-sys-color-surface-container-highest);
  border: 2px solid var(--md-sys-color-outline);
  transition: background-color .2s var(--md-easing), border-color .2s var(--md-easing);
  pointer-events: none;
}
.switch__thumb {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--md-sys-color-outline);
  transition: transform .2s var(--md-easing), width .2s var(--md-easing),
              height .2s var(--md-easing), margin .2s var(--md-easing), background-color .2s var(--md-easing);
  pointer-events: none;
}
.switch input:checked ~ .switch__track {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
}
.switch input:checked ~ .switch__thumb {
  width: 24px;
  height: 24px;
  margin-top: -12px;
  transform: translateX(16px);
  background: var(--md-sys-color-on-primary);
}
.switch input:focus-visible ~ .switch__track { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }
.switch input:disabled ~ .switch__track,
.switch input:disabled ~ .switch__thumb { opacity: .38; }

/* ---------------------------------------------------------------- segmented button */

.segmented { display: inline-flex; height: 40px; }
.segmented button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  padding: 0 16px;
  border: 1px solid var(--md-sys-color-outline);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.segmented button + button { border-left: none; }
.segmented button:first-child { border-radius: 20px 0 0 20px; }
.segmented button:last-child { border-radius: 0 20px 20px 0; }
.segmented button[aria-checked="true"] {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.segmented button:disabled { opacity: .38; cursor: default; }
.segmented button:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; z-index: 1; }

/* ---------------------------------------------------------------- data tables (composites) */

.subhead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
}
.subhead__note { font-weight: 400; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }

.gridtable { display: grid; gap: 8px 12px; align-items: center; }
.gridtable--delay { grid-template-columns: auto 1fr 1fr auto; }
.gridtable--ratios { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.gridtable__head {
  font-size: 12px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: none;
}
.gridtable__rowlabel { font-size: 13px; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.gridtable__derived { font-size: 12px; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.gridtable input:disabled { color: var(--md-sys-color-on-surface-variant); }

.composite__errors {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-sm);
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  font-size: 12px;
  list-style: none;
}
.composite__errors li + li { margin-top: 4px; }
.composite__actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.composite__hint { flex: 1; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }

/* ---------------------------------------------------------------- chips & banners */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--md-sys-color-outline-variant);
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
  background: var(--md-sys-color-surface);
}
.chip--on { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; }
.chip--warn { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); border-color: transparent; }
.chip--err { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); border-color: transparent; }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--md-sys-shape-md);
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}
.banner--warn { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.banner__body { flex: 1; }
.banner__title { font-weight: 500; margin-bottom: 4px; }
.banner__text { font-size: 13px; }
.banner__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.banner .btn { color: inherit; }

/* ---------------------------------------------------------------- connect panel */

.hero { text-align: center; padding: 40px 24px; }
.hero__mark { color: var(--md-sys-color-primary); width: 56px; height: 56px; }
.hero__title { font-size: 24px; line-height: 32px; margin: 12px 0 8px; }
.hero__text { max-width: 52ch; margin: 0 auto 24px; color: var(--md-sys-color-on-surface-variant); }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__foot { margin-top: 24px; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }

.support-list { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.support-list li { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 2px 0; }

/* ---------------------------------------------------------------- bottom bar */

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-2);
}
.bottom-bar__inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bottom-bar__status { flex: 1; font-size: 13px; color: var(--md-sys-color-on-surface-variant); }

/* ---------------------------------------------------------------- menu */

.menu-anchor { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 220px;
  padding: 8px 0;
  border-radius: var(--md-sys-shape-sm);
  background: var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-sys-elevation-2);
  z-index: 20;
}
.menu[hidden] { display: none; }
.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu button:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.menu button:disabled { opacity: .38; cursor: default; background: transparent; }
.menu hr { border: none; border-top: 1px solid var(--md-sys-color-outline-variant); margin: 8px 0; }
.menu .danger { color: var(--md-sys-color-error); }

/* ---------------------------------------------------------------- dialog */

dialog {
  border: none;
  border-radius: var(--md-sys-shape-xl);
  padding: 24px;
  max-width: 400px;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
dialog p { color: var(--md-sys-color-on-surface-variant); margin: 0 0 24px; }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------------------------------------------------------------- snackbar */

.snackbar {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 24px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-sm);
  background: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  box-shadow: var(--md-sys-elevation-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--md-easing), transform .2s var(--md-easing);
}
.snackbar.is-open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.snackbar__text { flex: 1; font-size: 14px; }
.snackbar--error { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }

/* ---------------------------------------------------------------- misc */

.device-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; }
.fact__key { font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.fact__val { font-size: 14px; word-break: break-word; }

.footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px 24px;
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
}
.footer a { color: var(--md-sys-color-primary); }

.busy { position: fixed; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; z-index: 40; }
.busy[hidden] { display: none; }
.busy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--md-sys-color-primary);
  transform-origin: left;
  animation: indeterminate 1.2s infinite var(--md-easing);
}
@keyframes indeterminate {
  0% { transform: translateX(-100%) scaleX(.4); }
  100% { transform: translateX(100%) scaleX(.4); }
}
