/* Header quick-menu + accessibility popovers (see gyj-header-menu.js).
   Text size / reduce motion / high contrast are opt-in overrides layered on
   top of the site's existing --color-* tokens and light/dark themes — see
   the --color-* definitions in app.css for what these replace. */

html[data-gyj-text="sm"] { font-size: 93.75%; }
html[data-gyj-text="lg"] { font-size: 112.5%; }

html.gyj-reduce-motion,
html.gyj-reduce-motion * {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

html.gyj-contrast {
  --color-bg: #fff;
  --color-fg: #000;
  --color-muted: #333;
  --color-subtle: #000;
  --color-surface: #fff;
  --color-elevated: #ececec;
  --color-border: #000;
  --color-border-strong: #000;
}
html.dark.gyj-contrast {
  --color-bg: #000;
  --color-fg: #fff;
  --color-muted: #dcdcdc;
  --color-subtle: #fff;
  --color-surface: #000;
  --color-elevated: #1c1c1c;
  --color-border: #fff;
  --color-border-strong: #fff;
}

.gyj-hm-panel {
  position: fixed;
  z-index: 90;
  width: 17rem;
}
.gyj-hm-seg {
  display: flex;
  border-radius: 9999px;
  background: var(--color-elevated);
  padding: .2rem;
}
.gyj-hm-seg button {
  flex: 1;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 500;
  padding: .35rem 0;
  color: var(--color-muted);
}
.gyj-hm-seg button[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.gyj-hm-switch {
  width: 2.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--color-elevated);
  position: relative;
  flex-shrink: 0;
  transition: background-color .15s ease-out;
}
.gyj-hm-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  transition: transform .15s ease-out;
}
.gyj-hm-switch[aria-checked="true"] {
  background: var(--color-primary);
}
.gyj-hm-switch[aria-checked="true"]::after {
  transform: translateX(1rem);
}
