/* Public learning guides share the tile art and felt palette of the table. */
.guide-page {
  --felt: #153f34;
  --ink: #193b32;
  --soft: #486057;
  --paper: #f7f5ee;
  --line: #c9d1c5;
  --gold: #efda9f;
  --display: 'Iowan Old Style', 'Baskerville', 'Songti SC', 'Noto Serif CJK SC', 'STSong', Georgia, serif;
  box-sizing: border-box;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-text-size-adjust: 100%;
}
.guide-page *, .guide-page *::before, .guide-page *::after { box-sizing: inherit; }
.guide-page h1, .guide-page h2, .guide-page h3, .guide-page p, .guide-page figure { margin: 0; }
.guide-page a { color: inherit; text-decoration: none; }
.guide-page a:focus-visible { outline: 3px solid #967327; outline-offset: 5px; }
.guide-wrap { width: min(1120px, calc(100% - 6rem)); margin-inline: auto; }
.guide-page .guide-skip { position: absolute; left: 1rem; top: -10rem; z-index: 2; padding: .6rem 1rem; background: var(--paper); color: var(--ink); }
.guide-page .guide-skip:focus { top: .6rem; }
.guide-top { color: #f5f1df; background: #13382f; }
.guide-top > div, .guide-footer > div, .guide-brand, .guide-nav, .guide-lang { display: flex; align-items: center; }
.guide-top > div, .guide-footer > div { justify-content: space-between; gap: 1rem; min-height: 4rem; }
.guide-brand { gap: .5rem; font: 650 1.5rem/1 var(--display); }
.guide-brand svg { color: var(--gold); }
.guide-nav { gap: 1.5rem; }
.guide-play, .guide-lang, .guide-back { font-size: .9rem; }
.guide-lang { gap: .55rem; }
.guide-lang > span[aria-hidden] { opacity: .55; }
.guide-lang [aria-current] { font-weight: 750; }
.guide-lang a, .guide-play, .guide-back { text-underline-offset: .3em; }
.guide-lang a:hover, .guide-play:hover, .guide-back:hover, .guide-footer a:hover { text-decoration: underline; }
.guide-hero, .guide-case {
  color: #fbf6e7;
  background: radial-gradient(ellipse at 88% 100%, #255544, transparent 68%), var(--felt);
}
.guide-hero { border-top: 1px solid #ffffff21; }
.guide-hero .guide-wrap { padding-block: clamp(2rem, 5vw, 4.5rem); }
.guide-hero h1 { font: 530 clamp(2.5rem, 5.2vw, 4.65rem)/1.08 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.guide-hero p { max-width: 44rem; margin-top: 1rem; color: #e1ebdd; font-size: clamp(1rem, 1.65vw, 1.16rem); }
.guide-hero .guide-back { display: inline-block; margin-bottom: 1.1rem; color: #e2e9db; }
.guide-hero .guide-back span { margin-inline-end: .25rem; }
.guide-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 29%); align-items: center; gap: 7%; }
.guide-detail-hero:has(> :only-child) { display: block; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.35rem; margin-top: 1.6rem; }
.guide-primary, .guide-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 640; }
.guide-page .guide-primary { background: var(--gold); color: #223a2e; padding: .55rem 1.15rem; border-radius: .35rem; }
.guide-primary:hover { background: #ffe8a9; }
.guide-secondary { text-decoration: underline !important; text-decoration-color: #d7e4d47a !important; text-underline-offset: .35em; }
.guide-language-note { display: block; margin-top: .6rem; color: #c6d8cd; font-size: .83rem; }
.guide-arrow { display: inline-block; font: 500 .98em/1.2 system-ui, sans-serif; margin-inline-start: .25em; }
.guide-rack { display: flex; align-items: flex-end; gap: .23em; padding-bottom: .25em; }
.guide-example .guide-rack { --mj-tile-width: clamp(52px, 5.4vw, 80px); --mj-tile-height: calc(var(--mj-tile-width) * 1.36); --mj-radius: 5px; --mj-edge: 4px; }
.guide-example figcaption { max-width: 22rem; margin-top: .85rem; font-size: .91rem; color: #dce7d7; }
.guide-home-body { padding-block: clamp(2rem, 4vw, 3.2rem) 3.5rem; }
.guide-section-title { font: 600 clamp(1.55rem, 2.6vw, 2.1rem)/1.25 var(--display); padding-bottom: 1.1rem; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.guide-rulecard { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding: 1.35rem 1.5rem 1.35rem 0; border-bottom: 1px solid var(--line); }
.guide-rulecard:nth-child(even) { padding-right: 0; padding-left: 1.5rem; border-left: 1px solid var(--line); }
.guide-rulecard h3 { font: 600 clamp(1.1rem, 2vw, 1.5rem)/1.2 var(--display); }
.guide-rulecard p, .guide-more p { font-size: .95rem; line-height: 1.55; }
.guide-rulecard p { color: var(--soft); margin-top: .3rem; }
.guide-rulecard .guide-rack { gap: 2px; --mj-tile-width: clamp(24px, 2.3vw, 32px); --mj-tile-height: calc(var(--mj-tile-width) * 1.36); --mj-edge: 2px; }
.guide-rulecard:hover h3, .guide-case:hover strong, .guide-method:hover strong { text-decoration: underline; text-underline-offset: .22em; }
.guide-more { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); gap: 1.2rem; }
.guide-home-body .guide-more { margin-top: 2.5rem; }
.guide-case, .guide-method { padding: clamp(1.25rem, 2.6vw, 2rem); border-radius: 4px; }
.guide-page .guide-case { color: #fff7e2; display: flex; gap: 1.3rem; justify-content: space-between; align-items: center; }
.guide-case .guide-rack { --mj-tile-width: clamp(27px, 2.8vw, 41px); --mj-tile-height: calc(var(--mj-tile-width) * 1.36); --mj-edge: 2px; gap: 2px; }
.guide-case .mj-tile:nth-child(3) { margin-inline-start: 2px; }
.guide-more h2 { font: 550 clamp(1.4rem, 2.5vw, 1.95rem)/1.2 var(--display); text-wrap: balance; }
.guide-more p { margin-block: .6rem; }
.guide-method { border: 1px solid var(--line); }
.guide-method p { color: var(--soft); }
.guide-more strong { font-size: .9rem; }
.guide-case strong { color: var(--gold); }
.guide-detail { display: grid; grid-template-columns: minmax(190px, 25%) minmax(0, 1fr); gap: 8%; margin-block: clamp(2rem, 5vw, 4.2rem); }
.guide-contents { display: grid; align-content: start; border-top: 1px solid var(--line); padding-top: .85rem; }
.guide-contents strong { font-size: .85rem; margin-bottom: .5rem; }
.guide-contents a { display: block; padding: .42rem 0; color: var(--soft); font-size: .95rem; line-height: 1.5; }
.guide-contents a:hover, .guide-sources a:hover { text-decoration: underline; }
.guide-topic { padding-block: clamp(1.3rem, 3vw, 2.2rem); border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.guide-topic:first-child { padding-top: 0; border-top: 0; }
.guide-topic h2, .guide-sources h2 { font: 600 clamp(1.45rem, 2.8vw, 2.05rem)/1.25 var(--display); text-wrap: balance; }
.guide-topic p { max-width: 74ch; margin-top: .8rem; line-height: 1.83; }
.guide-sources { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.guide-sources h2 { margin-bottom: .35rem; font-size: 1.15rem; }
.guide-sources a { display: inline-block; margin: .25rem 1rem .2rem 0; color: var(--soft); text-decoration: underline; text-underline-offset: .23em; }
.guide-related { padding-bottom: 3.5rem; }
.guide-footer { padding-block: .6rem; color: var(--soft); border-top: 1px solid var(--line); }
.guide-footer > div { min-height: 3rem; }
@media (max-width: 840px) {
  .guide-wrap { width: calc(100% - 3rem); }
  .guide-rulecard { gap: .7rem; }
  .guide-case { flex-wrap: wrap; }
  .guide-detail { gap: 5%; }
}
@media (max-width: 640px) {
  .guide-wrap { width: calc(100% - 2.25rem); }
  .guide-top > div { min-height: 3.5rem; }
  .guide-brand { gap: .2rem; font-size: 1.25rem; }
  .guide-brand svg { width: 28px; }
  .guide-nav { gap: .65rem; }
  .guide-play, .guide-lang { font-size: .8rem; }
  .guide-lang { gap: .3rem; }
  .guide-detail-hero, .guide-detail, .guide-grid, .guide-more { grid-template-columns: 1fr; }
  .guide-detail-hero { gap: 1.65rem; }
  .guide-example .guide-rack { --mj-tile-width: 43px; }
  .guide-example figcaption { max-width: none; }
  .guide-detail { gap: 1.75rem; }
  .guide-contents { padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
  .guide-rulecard, .guide-rulecard:nth-child(even) { padding: 1rem 0; border-left: 0; }
  .guide-rulecard .guide-rack { --mj-tile-width: 24px; }
  .guide-home-body .guide-more { margin-top: 1.6rem; }
  .guide-home-body, .guide-related { padding-bottom: 2rem; }
}

@media (max-width: 650px) {
  .guide-top > div, .guide-footer > div { flex-wrap: wrap; padding-block: .65rem; gap: .5rem; }
  .guide-top .guide-nav { flex-wrap: wrap; gap: .5rem 1rem; }
  .guide-lang { flex-wrap: wrap; gap: .35rem; }
}
