*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.reduced-motion,
html.reduced-motion * {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 40;
  padding: 6px 12px;
  background: #111;
  color: #fff;
  transform: translateY(-250%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(12px);
}

.wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 64px);
  padding-right: clamp(20px, 5vw, 64px);
}

.site-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0;
  border-bottom: 1px solid currentColor;
}

.brand-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  opacity: 0.78;
}

.scheme-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 56px;
}

.scheme-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}

.scheme-nav a[aria-current="page"] {
  font-weight: 650;
  box-shadow: inset 0 -2px 0 currentColor;
}

.volume-dock button,
.quiz-block button,
.source-block button,
.reset-btn,
.ghost-btn,
.primary-btn {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.volume-dock button[aria-pressed="true"],
.quiz-block button[aria-pressed="true"] {
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 48px;
  border-top: 1px solid currentColor;
  font-size: 13px;
}

.volume-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.volume-panel {
  padding: 16px 0 8px;
}

.volume-panel h2,
.volume-panel h3 {
  margin: 4px 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.quiz-block {
  display: grid;
  gap: 10px;
}

.quiz-block button {
  text-align: left;
}

.quiz-feedback {
  min-height: 3em;
  padding: 8px 0;
}

.source-panel {
  padding: 8px 0 16px;
}

.source-panel[hidden] {
  display: none;
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.measure,
.dek,
.quiz-block > p,
.volume-panel p,
.source-panel p {
  max-width: 680px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .brand-kicker {
    display: none;
  }

  .site-header,
  .scheme-nav,
  .scheme-nav a {
    min-height: 40px;
  }

  .scheme-nav {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .scheme-nav a {
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .volume-panel h2,
  .volume-panel h3 {
    font-size: 24px;
  }
}
