.suite-page { background: #f7f5ff; color: #201b3d; }
.suite-hero { padding: clamp(.75rem, 2vw, 1.35rem) 0 .35rem; text-align: center; }
.suite-hero .eyebrow { justify-content: center; }
.suite-hero h1 { margin: .25rem auto .35rem; max-width: 22ch; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.05; }
.suite-hero > p:last-child { max-width: 48rem; margin: 0 auto; color: #57506f; font-size: 1.05rem; }
.suite-game { position: relative; max-width: 920px; margin: .5rem auto 2.5rem; padding: clamp(.65rem, 2vw, 1.1rem); border: 1px solid #ddd7fa; border-radius: 28px; background: #fff; box-shadow: 0 20px 60px rgba(55, 41, 117, .13); }
.suite-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; padding: .3rem .35rem 1rem; }
.suite-toolbar h2 { margin: 0; font-size: 1.1rem; }
.suite-stats { display: flex; gap: .45rem; margin: 0; }
.suite-stats div { min-width: 68px; padding: .45rem .65rem; border-radius: 12px; background: #f2efff; text-align: center; }
.suite-stats dt { font-size: .68rem; color: #665f83; text-transform: uppercase; letter-spacing: .07em; }
.suite-stats dd { margin: .1rem 0 0; font-weight: 900; color: #3b2e7e; }
.suite-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-bottom: .85rem; }
.suite-levels-four { grid-template-columns: repeat(4, 1fr); }
.suite-levels button, .suite-options button, .suite-inputs button, .table-answer-grid button { min-height: 48px; border: 2px solid #e1dcf7; border-radius: 14px; background: #fff; color: #2b2552; font: inherit; font-weight: 800; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.suite-levels button:hover, .suite-options button:hover, .suite-inputs button:hover, .table-answer-grid button:hover { transform: translateY(-2px); border-color: #7868d8; }
.suite-levels button.is-active { border-color: #5847bd; background: #ebe7ff; color: #35268e; }
.suite-buddy { display: flex; min-height: 58px; align-items: center; gap: .65rem; margin: 0 0 .65rem; padding: .35rem .75rem; border: 1px solid #dfdaf8; border-radius: 16px; background: #faf9ff; }
.suite-buddy picture,.suite-buddy img { width: 54px; height: 54px; flex: 0 0 54px; object-fit: contain; }
.suite-buddy p { margin: 0; color: #4d456c; font-weight: 750; line-height: 1.35; }
.suite-board { padding: clamp(.85rem, 3vw, 1.6rem); border-radius: 22px; background: linear-gradient(145deg, #2f256f, #4d3ca0); color: #fff; }
.suite-machine { display: grid; grid-template-columns: 1fr auto 1.25fr auto 1fr; align-items: center; gap: .6rem; max-width: 620px; margin: 0 auto 1rem; text-align: center; }
.suite-number, .suite-machine-box { padding: .85rem .5rem; border-radius: 16px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.suite-number small, .suite-machine-box small { display: block; opacity: .8; font-size: .72rem; text-transform: uppercase; }
.suite-number strong, .suite-machine-box strong { display: block; margin-top: .15rem; font-size: 1.65rem; }
.suite-step { margin-top: .9rem; }
.suite-step h3 { margin: 0 0 .55rem; font-size: .95rem; }
.suite-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.suite-inputs button { background: #fff; color: #362c75; }
.suite-clues { display: flex; min-height: 44px; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .6rem; }
.suite-clue, .suite-empty { padding: .45rem .65rem; border-radius: 999px; background: rgba(255,255,255,.13); }
.suite-empty { opacity: .75; }
.suite-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; }
.suite-options button { background: #fff; color: #332876; font-size: 1.05rem; }
.suite-options button.is-wrong { border-color: #e79caa; background: #fff0f3; color: #8d2941; }
.suite-options button.is-correct { border-color: #6ecb9d; background: #eafff4; color: #166743; }
.suite-feedback { min-height: 48px; margin: .8rem 0 0; padding: .7rem .85rem; border-radius: 12px; background: #f1effa; color: #4c4568; font-weight: 700; }
.suite-board .suite-feedback { background: rgba(255,255,255,.12); color: #fff; }
.suite-feedback.is-success { background: #e8fff3; color: #13603e; }
.suite-feedback.is-error { background: #fff0f3; color: #8a2b40; }
.suite-feedback.is-notice { background: #fff4bf; color: #5b4300; }
.suite-board .suite-feedback.is-success { background: #dff9ec; color: #105f3b; }
.suite-board .suite-feedback.is-error { background: #ffe9ee; color: #85263d; }
.suite-actions { display: flex; justify-content: center; gap: .65rem; margin-top: .8rem; }
.suite-next { min-width: 180px; }
.suite-dialog { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 1rem; border-radius: inherit; background: rgba(26, 18, 66, .72); }
.suite-dialog[hidden] { display: none; }
.suite-dialog-card { width: min(430px, 100%); padding: 1.8rem; border-radius: 22px; background: #fff; color: #241c50; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.suite-dialog-card h2 { margin: .2rem 0 .5rem; }
.parent-result { margin: 1rem 0; padding: .7rem .8rem; border-radius: 12px; background: #f3f0ff; text-align: left; }
.parent-result summary { color: #3b2e7e; font-weight: 900; cursor: pointer; }
.parent-result p { margin: .55rem 0 0; color: #554e6c; line-height: 1.5; }
.suite-next-link { display: block; margin: .8rem 0; color: #4834b5; font-weight: 850; }
.suite-table-wrap { overflow-x: auto; }
.table-rule-callout { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: .8rem; margin: 0 0 .7rem; padding: .65rem .9rem; border: 3px solid #e6a700; border-radius: 18px; background: #fff4b8; box-shadow: 0 4px 0 #c98f00; }
.table-rule-callout picture,.table-rule-callout img { width: 60px; height: 60px; object-fit: contain; }
.table-rule-callout span { display: block; color: #5c4300; font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.table-rule-callout strong { display: inline-block; margin: .05rem .6rem .05rem 0; color: #39276f; font-size: 1.55rem; }
.table-rule-callout p { display: inline; margin: 0; color: #44330a; font-weight: 750; }
.table-rule-callout #table-buddy-message { display: block; margin-top: .12rem; color: #5c4a1b; font-size: .82rem; }
.practice-table { width: 100%; border-collapse: separate; border-spacing: 0 .5rem; }
.practice-table th, .practice-table td { padding: .55rem; text-align: center; }
.practice-table thead th { color: #61597c; font-size: .8rem; text-transform: uppercase; }
.practice-table tbody th { width: 25%; border-radius: 13px 0 0 13px; background: #ebe7ff; color: #352a81; font-size: 1.25rem; }
.practice-table tbody td { border-radius: 0 13px 13px 0; background: #f7f5ff; }
.practice-table tbody tr.needs-review th,.practice-table tbody tr.needs-review td { outline: 3px solid #e89048; outline-offset: -2px; }
.practice-table tbody tr.is-current th,.practice-table tbody tr.is-current td { box-shadow: inset 0 0 0 2px #8b78ec; }
.table-answer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.table-answer-grid button.is-selected { border-color: #5847bd; background: #e5e0ff; }
.rule-clues { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; max-width: 660px; margin: .75rem auto 1.1rem; padding: 0; list-style: none; }
.rule-clues li { display: flex; align-items: center; justify-content: space-around; min-height: 90px; border: 2px solid #e1dcf7; border-radius: 18px; background: #fff; color: #332876; }
.rule-clues li.is-match { border-color: #74caa0; background: #effcf5; }
.rule-clues li.is-conflict { border-color: #e47f93; background: #fff0f3; box-shadow: 0 0 0 3px rgba(228,127,147,.18); }
.rule-clues strong { font-size: 1.7rem; }
.rule-tier { margin: 0 0 .7rem; text-align: center; color: #ffdc7d; font-weight: 900; }
.suite-content { padding: clamp(2rem, 5vw, 4rem) 0; background: #fff; }
.suite-content-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); gap: clamp(1.5rem, 5vw, 4rem); }
.suite-content h2 { margin-top: 0; color: #2d246b; }
.suite-content h3 { margin: 1.5rem 0 .4rem; color: #3c3087; }
.suite-content p, .suite-content li { color: #554e6c; line-height: 1.75; }
.related-games { display: grid; gap: .7rem; }
.related-game { display: block; padding: 1rem; border: 1px solid #ded9f5; border-radius: 16px; color: #34297c; text-decoration: none; background: #faf9ff; }
.related-game strong { display: block; margin-bottom: .25rem; }
.related-game span { color: #625b79; font-size: .9rem; }
.suite-footer { padding: 1.5rem 0; background: #251c5a; color: #e9e5ff; text-align: center; }
.suite-footer a { color: #fff; }
@media (max-width: 620px) {
  .suite-page .header-inner { min-height: 52px; }
  .suite-hero { padding: .2rem .35rem .1rem; }
  .suite-hero .eyebrow,.suite-hero > p:last-child { display: none; }
  .suite-hero h1 { margin: 0 auto; font-size: 1.28rem; line-height: 1.15; }
  .suite-game { margin: .2rem .3rem 2rem; padding: .55rem; border-radius: 18px; }
  .suite-toolbar { justify-content: center; padding: 0 0 .25rem; }
  .suite-toolbar h2 { display: none; }
  .suite-stats { gap: .2rem; }
  .suite-stats div { min-width: 54px; padding: .18rem .3rem; }
  .suite-stats dt { font-size: .6rem; }
  .suite-stats dd { margin-top: 0; font-size: .88rem; }
  .suite-buddy { min-height: 36px; margin-bottom: .25rem; padding: .1rem .4rem; }
  .suite-buddy picture,.suite-buddy img { width: 32px; height: 32px; flex-basis: 32px; }
  .suite-buddy p { display: -webkit-box; overflow: hidden; font-size: .7rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .table-rule-callout { grid-template-columns: 32px 1fr; gap: .35rem; margin-bottom: .25rem; padding: .12rem .4rem; border-width: 2px; border-radius: 13px; box-shadow: 0 2px 0 #c98f00; }
  .table-rule-callout picture,.table-rule-callout img { width: 30px; height: 30px; }
  .table-rule-callout span { font-size: .58rem; }
  .table-rule-callout strong { margin-right: .35rem; font-size: 1.05rem; }
  .table-rule-callout p { font-size: .68rem; }
  .table-rule-callout #table-buddy-message { display: none; }
  .suite-levels { gap: .25rem; margin-bottom: .4rem; }
  .suite-levels-four { display: flex; overflow-x: auto; padding-bottom: .1rem; }
  .suite-levels-four button { min-width: 130px; }
  .suite-levels button { min-height: 42px; padding: .2rem; font-size: .72rem; }
  .suite-board { padding: .55rem; }
  .suite-machine { gap: .25rem; }
  .suite-machine { margin-bottom: .35rem; }
  .suite-number, .suite-machine-box { padding: .4rem .2rem; }
  .suite-number strong, .suite-machine-box strong { font-size: 1.25rem; }
  .suite-inputs { display: flex; overflow-x: auto; gap: .3rem; padding-bottom: .2rem; }
  .suite-inputs button { min-width: 44px; min-height: 44px; }
  .suite-clues { min-height: 0; margin-top: .3rem; }
  .suite-clues:has(.suite-empty) { display: none; }
  .suite-step { margin-top: .45rem; }
  .suite-step h3 { margin-bottom: .3rem; font-size: .82rem; }
  .suite-options { grid-template-columns: repeat(2, 1fr); }
  .suite-options button { min-height: 44px; }
  .suite-feedback { min-height: 40px; margin-top: .45rem; padding: .45rem .6rem; font-size: .82rem; }
  .suite-actions { margin-top: .2rem; }
  .suite-content-grid { grid-template-columns: 1fr; }
  .rule-clues { gap: .35rem; margin: .35rem auto .5rem; }
  .rule-clues li { min-height: 58px; }
  .rule-clues strong { font-size: 1.35rem; }
  .practice-table { border-spacing: 0 .25rem; }
  .practice-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
  .practice-table thead th { padding-block: .05rem; font-size: .62rem; }
  .practice-table th,.practice-table td { padding: .2rem; }
  .practice-table tbody th { font-size: 1rem; }
  .table-answer-grid { gap: .25rem; }
  .table-answer-grid button { min-width: 42px; min-height: 44px; padding: .1rem .2rem; }
}
@media (max-width: 620px) and (max-height: 600px) {
  .table-page .header-inner { min-height: 44px; }
  .table-page .suite-hero { padding: 0 .35rem; }
  .table-page .suite-hero h1 { font-size: 1rem; line-height: 1; }
  .table-page .suite-game { padding-block: .35rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
