/* Reading layouts use the palette, wordmarks and surfaces of each game's landing page. */
:root {
  font-family: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  color: #101b42;
  background: #fff9eb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
  font-weight: 500;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  --ink: #101b42;
  --paper: #fff9eb;
  --accent: #073bdc;
  --orange: #df390e;
  --yellow: #ffce32;
  --line: #101b4226;
  --muted: #53586d;
  --panel: #fffdf6;
  --focus: #073bdc;
  --outline: #101b42;
}
body.shakepop {
  font-family:
    Inter,
    ui-rounded,
    'SF Pro Rounded',
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
  color: #fff6dc;
  --ink: #fff6dc;
  --paper: #172b3a;
  --accent: #f0a34c;
  --orange: #f0a34c;
  --line: #fff6dc24;
  --muted: #fff6dcc7;
  --panel: #ffffff0e;
  --focus: #e6696a;
  --outline: #fff6dc24;
  background:
    radial-gradient(circle at 10% 2%, #5bbfda30, transparent 28rem),
    radial-gradient(circle at 92% 38%, #e6696a21, transparent 30rem), #172b3a;
}
a {
  color: var(--accent);
  text-underline-offset: 0.22em;
  -webkit-tap-highlight-color: transparent;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
header,
main,
footer {
  width: min(100% - 44px, 1076px);
  margin-inline: auto;
}
header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 1.8rem;
  letter-spacing: -0.065em;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.brand svg {
  height: 33px;
  width: 27px;
  color: var(--orange);
}
.brand-dot,
.brand-pop {
  color: var(--orange);
}
.shakepop .brand {
  font-size: 2.15rem;
  letter-spacing: -0.085em;
}
.header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--outline);
  border-radius: 9px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  background: var(--panel);
}
.shakepop .header-link {
  border-radius: 16px;
}
main > nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 0.75rem;
  line-height: 1.6;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
main > nav a {
  color: inherit;
}
article {
  padding: 0 0 16px;
}
.resource-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
  padding: 60px 0 80px;
}
.hero-copy {
  min-width: 0;
}
h1 {
  font-size: clamp(2.55rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1.02;
  margin: 16px 0 26px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin: 44px 0 18px;
  color: var(--ink);
}
h3 {
  line-height: 1.3;
  letter-spacing: -0.03em;
}
p {
  margin: 0 0 20px;
}
.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 850;
  line-height: 1.5;
  margin: 0;
}
.shakepop .eyebrow {
  color: var(--orange);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.intro {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 560px;
}
.shakepop .intro {
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin-inline: auto;
  border-top: 1.5px solid var(--line);
  padding-top: 8px;
}
.article-body > h2:first-child {
  margin-top: 32px;
}
.article-body li {
  margin-bottom: 8px;
}
.hero-art {
  width: 100%;
  max-width: 340px;
  justify-self: center;
}
.math-preview {
  border: 2px solid var(--ink);
  border-radius: 25px;
  background: #f3cc47;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(2deg);
}
.sticker {
  font-size: 0.6rem;
  background: var(--paper);
  padding: 7px 12px;
  border: 1px solid var(--ink);
  border-radius: 20px;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.preview-equation {
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.2;
  margin: 18px 0;
}
.preview-answer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: var(--paper);
  padding: 6px 16px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.5;
}
.preview-answer > span {
  color: var(--accent);
}
.preview-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  width: 100%;
  margin-top: 14px;
}
.preview-tiles > span {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 5px;
  display: grid;
  place-items: center;
  height: 38px;
  font-weight: 800;
}
.preview-tiles > span:last-child {
  background: var(--accent);
  color: var(--yellow);
}
.shake-preview {
  border: 1px solid #ffffff1f;
  border-radius: 32px;
  padding: 18px;
  background: radial-gradient(circle at 12% 4%, #5bbfda2e, transparent 35%), #172b3a;
  box-shadow:
    0 22px 0 #04121a33,
    0 28px 60px #04121a85;
  transform: rotate(2deg);
}
.preview-score {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  padding: 9px 12px;
  color: #172b3a;
  background: #fffffff0;
}
.preview-score span {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.preview-score strong {
  font-size: 1.2rem;
}
.preview-score em {
  border-radius: 999px;
  padding: 2px 8px;
  background: #5bbfda;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 950;
}
.preview-board {
  position: relative;
  aspect-ratio: 1;
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  border-radius: 18px;
  padding: 8px;
  background: #10232f;
  box-shadow: inset 0 3px 10px #00000047;
}
.preview-board > i {
  border-radius: 5px;
  background: #ffffff11;
}
.preview-board > i:not([class='']) {
  box-shadow:
    inset 0 3px 0 #ffffff3d,
    inset 0 -3px 0 #10232f2e,
    0 3px 0 #0512192e;
}
.preview-board .cyan {
  background: #5bbfda;
}
.preview-board .coral {
  background: #e6696a;
}
.preview-board .orange {
  background: #f0a34c;
}
.preview-board .green {
  background: #79bd87;
}
.preview-board .slate {
  background: #7c9aae;
}
.preview-board img {
  position: absolute;
  width: 44px;
  filter: drop-shadow(0 8px 10px #04121a57);
}
.preview-shake {
  top: 18%;
  right: 13%;
  transform: rotate(8deg);
}
.preview-popcorn {
  right: 10%;
  bottom: 12%;
  transform: rotate(-8deg);
}
.preview-tray {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 52px;
  padding-top: 8px;
}
.preview-tray span {
  display: flex;
  gap: 3px;
}
.preview-tray i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #e6696a;
  box-shadow:
    inset 0 3px 0 #ffffff57,
    0 3px 0 #05121938;
}
.preview-tray span:nth-child(2) i {
  background: #f0a34c;
}
.preview-tray span:last-child i {
  background: #5bbfda;
}
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.cards li {
  margin: 0;
}
.cards a {
  display: block;
  height: 100%;
  padding: 22px;
  border: 1.5px solid var(--outline);
  border-radius: 14px;
  background: var(--panel);
  font-weight: 850;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  line-height: 1.3;
  font-size: 1.1rem;
}
.cards a:hover {
  background: #e8edff;
}
.cards p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 12px 0 0;
  font-weight: 500;
  color: var(--muted);
}
.shakepop .cards a {
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 14px 30px #04121a33;
}
.shakepop .cards a:hover {
  background: #ffffff16;
}
.example,
details {
  background: var(--panel);
  border: 1.5px solid var(--outline);
  border-radius: 12px;
  padding: 22px;
  margin: 20px 0;
  box-shadow: 3px 3px 0 #101b422a;
}
.mathjolt .example {
  background: #f3cc47;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.1rem;
}
.example p:last-child,
details p:last-child {
  margin-bottom: 0;
}
summary {
  cursor: pointer;
  font-weight: 800;
}
details[open] summary {
  margin-bottom: 14px;
}
.facts {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: center;
}
th {
  background: #e8edff;
  font-weight: 800;
}
.shakepop th {
  background: #10232f;
}
caption {
  text-align: left;
  font-weight: 800;
  margin-bottom: 14px;
}
.table-scroll {
  overflow-x: auto;
  border-radius: 8px;
}
.chart {
  font-size: 0.86rem;
}
.chart th,
.chart td {
  padding: 7px;
  min-width: 34px;
}
.chart td.diagonal {
  font-weight: 900;
  background: var(--yellow);
}
.next,
.related {
  max-width: 760px;
  margin: 36px auto;
  padding: 30px;
  border: 1.5px solid var(--outline);
  border-radius: 20px;
  background: var(--panel);
}
.next h2,
.related h2 {
  margin-top: 0;
}
.mathjolt .next {
  background: #f3cc47;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.shakepop .next {
  padding: 36px;
  border-radius: 30px;
  background: radial-gradient(circle at 90% 12%, #5bbfda2e, transparent 50%), #10232fc7;
  box-shadow: 0 14px 30px #04121a33;
}
.shakepop .related {
  border-radius: 26px;
}
.button {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: white;
  background: var(--accent);
  padding: 14px 20px;
  border: 1.5px solid var(--outline);
  border-radius: 9px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--ink);
}
.button:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}
.shakepop .button {
  color: #172b3a;
  border: 0;
  border-radius: 16px;
  padding: 14px 22px;
  box-shadow: 0 7px 0 #be7330;
  font-weight: 950;
}
.shakepop .button:hover {
  background: #f5ae5b;
}
.shakepop .button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #be7330;
}
.related ul {
  padding-left: 20px;
  margin-bottom: 0;
}
.related li {
  margin-bottom: 8px;
}
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-size: 0.78rem;
  padding: 30px 0 42px;
  margin-top: 60px;
  border-top: 1px solid var(--line);
}
footer > a:not(.brand) {
  color: var(--muted);
}
.footer-brand,
.shakepop .footer-brand {
  font-size: 1.25rem;
  margin-right: auto;
}
.footer-brand svg {
  width: 19px;
  height: 24px;
}
.limpa-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.loaf {
  position: relative;
  width: 33px;
  height: 25px;
  display: inline-block;
  overflow: hidden;
  border-radius: 18px 18px 10px 10px;
  background: #f0a34c;
  box-shadow: inset 0 -5px 0 #703a192e;
}
.loaf i {
  position: absolute;
  top: 5px;
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: #fff6dcb3;
  transform: rotate(25deg);
}
.loaf i:nth-child(1) {
  left: 8px;
}
.loaf i:nth-child(2) {
  left: 16px;
}
.loaf i:nth-child(3) {
  left: 24px;
}
.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  background: var(--paper);
  padding: 12px;
  z-index: 5;
}
.skip:focus {
  top: 8px;
}
.boards {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 28px 0;
}
.boards figure {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-width: 280px;
  padding: 10px;
  background: #10232f;
  border: 1px solid #ffffff1f;
  border-radius: 18px;
  box-shadow:
    inset 0 3px 10px #00000047,
    0 8px 20px #04121a33;
}
.board i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #ffffff11;
}
.board i.filled {
  background: #5bbfda;
  box-shadow:
    inset 0 3px 0 #ffffff3d,
    inset 0 -2px 0 #10232f2e;
}
.board i.filled:nth-child(8n + 2),
.board i.filled:nth-child(8n + 3) {
  background: #e6696a;
}
.board i.filled:nth-child(8n + 4),
.board i.filled:nth-child(8n + 5) {
  background: #f0a34c;
}
.board i.filled:nth-child(8n + 6),
.board i.filled:nth-child(8n + 7) {
  background: #79bd87;
}
.board i.new {
  background: #f0a34c;
  box-shadow: inset 0 0 0 2px #fff6dc;
}
figcaption {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 14px 0 18px;
}
.note {
  border-left: 4px solid var(--accent);
  padding-left: 18px;
}
@media (max-width: 720px) {
  .resource-hero {
    grid-template-columns: 1fr;
    padding: 32px 0 58px;
    gap: 36px;
  }
  .hero-art {
    max-width: 260px;
  }
  .math-preview {
    padding: 20px;
  }
  .preview-equation {
    font-size: 3rem;
  }
  .preview-tiles > span {
    height: 30px;
  }
  .preview-score {
    padding: 7px 10px;
  }
  .shake-preview {
    padding: 14px;
  }
  h1 {
    max-width: 650px;
    font-size: clamp(2.25rem, 7vw, 3.6rem);
  }
}
@media (max-width: 480px) {
  header,
  main,
  footer {
    width: calc(100% - 36px);
  }
  header {
    min-height: 82px;
    gap: 12px;
  }
  .brand {
    font-size: 1.65rem;
  }
  .shakepop .brand {
    font-size: 1.9rem;
  }
  .header-link {
    padding-inline: 12px;
  }
  .next,
  .related,
  .shakepop .next {
    padding: 24px;
  }
  .facts th,
  .facts td {
    padding: 7px;
  }
  .chart th,
  .chart td {
    padding: 4px;
    min-width: 26px;
  }
  .boards {
    gap: 12px;
  }
  .button {
    gap: 12px;
    font-size: 0.95rem;
  }
  .footer-brand,
  .shakepop .footer-brand {
    flex-basis: 100%;
  }
}
@media print {
  @page {
    margin: 12mm;
  }
  header,
  main > nav,
  footer,
  .next,
  .related,
  .skip,
  .hero-art {
    display: none;
  }
  :root,
  body.mathjolt,
  body.shakepop {
    color: #101b42;
    background: white;
    --ink: #101b42;
    --muted: #333;
    --line: #ccc;
    --outline: #ccc;
  }
  main,
  article,
  .article-body,
  .resource-hero {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
  }
  h1 {
    font-size: 24pt;
    margin: 10px 0 18px;
  }
  h2 {
    break-after: avoid;
    font-size: 16pt;
    margin: 24px 0 12px;
  }
  p,
  li {
    font-size: 10pt;
  }
  .intro {
    font-size: 11pt;
    margin-bottom: 18px;
  }
  table,
  .example,
  details {
    break-inside: avoid;
    box-shadow: none;
  }
  a {
    color: inherit;
  }
  .table-scroll {
    overflow: visible;
  }
  .chart {
    width: 100%;
    font-size: 9pt;
  }
  .chart th,
  .chart td {
    min-width: 0;
    padding: 4px;
  }
  details:not([open]) > *:not(summary) {
    display: block;
  }
  details summary {
    margin-bottom: 10px;
  }
}
