:root {
  color-scheme: light;
  --yellow: #ffd83d;
  --orange: #ff6b21;
  --cyan: #00a9e8;
  --mint: #5ee38a;
  --purple: #9d55ff;
  --ink: #101014;
  --paper: #fff9df;
  --white: #fffef6;
  --line: #101014;
  --shadow: 8px 8px 0 rgba(16, 16, 20, 0.16);
  font-family: ui-rounded, "Arial Rounded MT Bold", "Avenir Next", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 169, 232, 0.18), transparent 22rem),
    radial-gradient(circle at 86% 12%, rgba(157, 85, 255, 0.16), transparent 18rem),
    linear-gradient(180deg, var(--yellow), #fff2a8 36rem, #fffef6 72rem);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 249, 223, 0.88);
  border-bottom: 3px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border: 3px solid var(--line);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--orange);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.25rem);
  font-size: 0.95rem;
  font-weight: 800;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: #6f2cff;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: min(760px, calc(86dvh - 68px));
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 5rem) 3rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 1rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  background: var(--mint);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
}

p {
  font-size: 1rem;
  line-height: 1.7;
}

.hero-text {
  max-width: 54ch;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1rem;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--line);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.button:hover,
button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
}

.button:active,
button:active {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 var(--line);
}

.primary {
  background: var(--orange);
}

.secondary {
  background: var(--cyan);
}

.inline-link {
  font-weight: 900;
  color: #5a22d1;
}

.hero-art {
  margin: 0;
  border: 4px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-art img {
  width: 100%;
  min-height: 390px;
  object-fit: cover;
}

.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-head {
  max-width: 760px;
}

.fact-grid,
.keyword-grid,
.tracker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.fact-grid article,
.keyword-grid a,
.tracker-card,
.answer-card,
.info-card {
  padding: 1rem;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.fact-grid span,
.keyword-grid span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 900;
  color: #604c00;
}

.fact-grid strong,
.keyword-grid strong {
  display: block;
  line-height: 1.35;
}

.source-strip,
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.source-strip a,
.related-links a {
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.start-path,
.tool-band,
.beatspell-panel,
.practice-tool {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
}

.step-list {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  border: 3px solid var(--line);
  border-radius: 8px;
}

.step-list span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  font-weight: 900;
  background: var(--purple);
  border: 3px solid var(--line);
  border-radius: 50%;
}

.step-list p {
  margin: 0;
  font-weight: 700;
}

.tool-band {
  width: 100%;
  max-width: none;
  padding-inline: max(1rem, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(90deg, rgba(0, 169, 232, 0.22), rgba(255, 107, 33, 0.18)),
    var(--paper);
  border-block: 4px solid var(--line);
}

.lag-tool,
.metronome {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 900;
}

select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem;
  color: var(--ink);
  font: inherit;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 8px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check input {
  width: 22px;
  min-height: 22px;
}

.lag-result {
  min-height: 72px;
  padding: 0.8rem;
  font-weight: 900;
  color: var(--ink);
  background: var(--mint);
  border: 3px solid var(--line);
  border-radius: 8px;
}

.search-box {
  margin: 1rem 0;
}

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 2px solid var(--line);
}

th {
  background: #ffe777;
}

td span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #5c4b05;
}

.beatspell-panel {
  width: min(1180px, calc(100% - 2rem));
}

.spell-ring {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  align-items: center;
  min-height: 220px;
  padding: 1rem;
  background: radial-gradient(circle, rgba(157, 85, 255, 0.32), transparent 58%), var(--white);
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.spell-ring span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  font-weight: 900;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 50%;
}

.tracker-card {
  display: grid;
  gap: 0.75rem;
}

.tracker-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.tracker-buttons button {
  min-height: 38px;
  padding: 0.5rem;
  font-size: 0.86rem;
  box-shadow: 3px 3px 0 var(--line);
}

.tracker-card[data-current-status="clear"] [data-status="clear"],
.tracker-card[data-current-status="medal"] [data-status="medal"],
.tracker-card[data-current-status="perfect"] [data-status="perfect"] {
  background: var(--mint);
}

.practice-tool {
  align-items: center;
}

.metronome {
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

.beat-dot {
  width: 44px;
  height: 44px;
  background: var(--orange);
  border: 3px solid var(--line);
  border-radius: 50%;
}

.beat-dot.pulse {
  animation: beat 180ms ease;
}

@keyframes beat {
  50% {
    transform: scale(1.25);
    background: var(--cyan);
  }
}

.keyword-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.keyword-grid a {
  min-height: 112px;
  text-decoration: none;
}

.keyword-grid a:hover {
  background: #ecfbff;
}

.faq details {
  padding: 1rem 0;
  border-bottom: 3px solid var(--line);
}

.faq summary {
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}

.subhero {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
}

.subhero h1 {
  max-width: 15ch;
  font-size: clamp(2.75rem, 4.8vw, 4.8rem);
}

.subhero p {
  max-width: 64ch;
  font-weight: 750;
}

.article-body {
  max-width: 860px;
  padding-top: 2rem;
}

.article-body p {
  font-size: 1.08rem;
}

.answer-card {
  margin-top: 1.25rem;
  background: #e9fff0;
}

.source-note {
  max-width: 900px;
}

.disclaimer {
  max-width: 920px;
  padding-bottom: 7rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 5vw, 4rem);
  color: var(--white);
  background: var(--ink);
  border-top: 4px solid var(--line);
}

.site-footer p {
  max-width: 70ch;
  margin: 0.4rem 0 0;
  color: #f8f0c0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-content: flex-start;
}

.site-footer a {
  color: var(--white);
  font-weight: 900;
}

@media (max-width: 900px) {
  .hero,
  .start-path,
  .tool-band,
  .beatspell-panel,
  .practice-tool {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-art img {
    min-height: 260px;
  }

  .fact-grid,
  .keyword-grid,
  .tracker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metronome {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  h1 {
    max-width: 100%;
    font-size: 2.75rem;
  }

  .hero {
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }

  .hero-art img {
    min-height: 175px;
  }

  .fact-grid,
  .keyword-grid,
  .tracker-grid,
  .tracker-buttons {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
