:root {
  --navy: #10224f;
  --blue: #1f5fbf;
  --orange: #f26b1d;
  --gold: #ffb703;
  --cream: #fff8ef;
  --ink: #1c2430;
  --paper: #fffdfb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.18), transparent 28%),
    #1f5fbf;
  color: var(--ink);
  font-family: Verdana, "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  color: var(--navy);
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { top: 12px; }

.sheet {
  max-width: 1120px;
  margin: 18px auto;
  background: var(--cream);
  border: 5px solid var(--navy);
  border-radius: 26px;
}

.top {
  background: var(--navy);
  color: white;
  padding: 22px 22px 18px;
  border-radius: 20px 20px 0 0;
}

.brand {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 8px;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.tag {
  margin: 0;
  max-width: 42rem;
  color: #d7e4ff;
}

.count {
  margin: 10px 0 0;
  color: var(--gold);
  font-weight: 800;
}

.tools {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--cream);
  padding: 14px 18px 8px;
}

.tools.stuck {
  border-bottom: 3px solid var(--navy);
  box-shadow: 0 8px 16px rgba(16, 34, 79, 0.14);
}

.search input {
  width: 100%;
  font: inherit;
  color: var(--navy);
  background: white;
  border: 3px solid var(--navy);
  border-radius: 999px;
  padding: 10px 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.chip {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  background: white;
  border: 3px solid var(--navy);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--navy);
  color: white;
}

.problem,
.empty {
  margin: 12px 18px;
  padding: 12px 14px;
  border: 3px solid var(--navy);
  border-radius: 14px;
  background: #fff4e5;
  font-weight: 700;
}

.stage {
  margin: 16px 18px 4px;
  background: var(--paper);
  border: 3px solid var(--navy);
  border-radius: 18px;
  padding: 12px 12px 4px;
  scroll-margin-top: 12px;
}

.pics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding: 14px 12px 16px;
  scroll-snap-type: x proximity;
}

.pic {
  font: inherit;
  color: var(--navy);
  background: white;
  border: 3px solid var(--navy);
  border-radius: 14px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  scroll-snap-align: center;
}

.pic img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  background: #e7eef8;
  display: block;
}

.pic-word {
  display: block;
  margin-top: 8px;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.1;
}

.pic-mark {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.swipe-hint {
  margin: 0 8px 8px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.pic[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 7px var(--orange);
}

main { padding: 6px 18px 8px; }

.searching #words { padding-top: 2px; }

.group h2 {
  margin: 16px 0 8px;
  color: var(--blue);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word {
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  color: var(--navy);
  background: white;
  border: 3px solid var(--navy);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
}

.word[aria-pressed="true"] {
  background: var(--navy);
  color: white;
}

.meta {
  margin: -4px 0 12px;
  color: #526070;
  font-size: 16px;
}

.ends {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arrow {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ebfff, #ffb703 55%, #c4321a);
  position: relative;
}

.arrow::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -5px;
  border: 9px solid transparent;
  border-left-color: #c4321a;
}

.scale {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(112px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 16px 12px 18px;
  scroll-snap-type: x proximity;
}

.shade {
  font: inherit;
  min-height: 96px;
  border: 3px solid var(--navy);
  border-radius: 14px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  scroll-snap-align: center;
}

.mark {
  min-height: 1.1em;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.name {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.shade[aria-pressed="true"] {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 7px var(--orange);
  transform: translateY(-3px);
}

.detail {
  border: 3px solid var(--navy);
  border-radius: 16px;
  background: white;
  padding: 14px 16px 8px;
}

.kicker {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hear {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 2px 0 8px;
}

.detail h2 {
  margin: 0;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  color: var(--navy);
}

.listen {
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  background: white;
  border: 3px solid var(--navy);
  border-radius: 999px;
  min-height: 44px;
  padding: 6px 14px;
  cursor: pointer;
}

.listen[aria-pressed="true"] {
  background: var(--navy);
  color: white;
}

.place {
  margin: -4px 0 12px;
  color: #526070;
  font-weight: 700;
}

.lead {
  margin: 0 0 14px;
  font-size: 20px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 8px 20px 20px;
}

footer a {
  color: var(--blue);
  font-weight: 800;
}

footer a.bundle {
  margin-left: auto;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

footer a.logo {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: inherit;
}

footer a.logo svg {
  width: 32px;
  height: 32px;
  display: block;
}

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

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) { outline: none; }

.noscript {
  max-width: 40rem;
  margin: 16px auto;
  background: white;
  padding: 12px;
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .sheet { margin: 0; border-width: 0; border-radius: 0; }
  .top { border-radius: 0; }
  .lead { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .shade[aria-pressed="true"] { transform: none; }
}
