:root {
  color-scheme: light;
  --ink: #171821;
  --night: #10131b;
  --paper: #faf7ee;
  --panel: #f0ebde;
  --line: #d9d2c2;
  --muted: #5d5b57;
  --cream: #fbefb0;
  --red: #c52232;
  --red-hover: #a91626;
  --white: #fffdf7;
  --display: Inter, "Arial Black", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(18px, 5vw, 76px);
  --space: clamp(58px, 7.5vw, 112px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 900; line-height: 1.08; overflow-wrap: anywhere; }
h2 { font-size: clamp(2.1rem, 5vw, 4.5rem); letter-spacing: -.065em; }
h3 { font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: -.035em; }
p + p { margin-top: .9em; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #537dff; outline-offset: 4px; }
::selection { background: var(--cream); color: var(--night); }
.wrap { width: min(100% - 2 * var(--gutter), 1260px); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 8px; padding: 9px 16px; background: var(--cream); color: var(--night); z-index: 10; transform: translateY(-165%); }
.skip:focus { transform: none; }
.metrika-pixel { position: absolute; inset-inline-start: -9999px; }
.section { padding-block: var(--space); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 16px 44px; margin-bottom: clamp(24px, 4vw, 50px); }
.section-heading > p, .split > div > p:not(.eyebrow) { max-width: 55ch; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: var(--red); font: 700 .75rem/1.35 var(--mono); letter-spacing: .075em; text-transform: uppercase; }
.eyebrow span { width: 9px; height: 9px; background: currentColor; flex: 0 0 auto; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 11px 17px; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; font-weight: 780; line-height: 1.3; text-decoration: none; }
.button-small { min-height: 43px; padding: 8px 13px; }
.button-red { background: var(--red); color: #fff; }
.button-red:hover { background: var(--red-hover); }
.button-dark { background: var(--night); color: var(--white); }
.button-dark:hover { background: #333640; }
.button-outline { border-color: #737782; color: var(--white); }
.button-outline:hover { background: #282c38; }
.text-link { display: inline-block; padding: 9px 4px; font-weight: 750; }
.text-link:hover { color: var(--red); }

.site-header { background: var(--night); color: var(--white); border-bottom: 1px solid #ffffff24; }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 73px; }
.header-inner > .button { justify-self: end; }
.brand { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; }
.brand img { width: clamp(132px, 13vw, 176px); }
.site-nav { display: flex; gap: clamp(10px, 2.2vw, 32px); align-items: center; }
.site-nav a { display: inline-flex; align-items: center; font-size: .87rem; font-weight: 650; min-height: 43px; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--cream); }

.hero { position: relative; isolation: isolate; background: var(--night); color: var(--white); }
.hero::before { position: absolute; inset: 0; z-index: -1; content: ""; opacity: .4; background: linear-gradient(90deg, #10131b 3%, #10131b80 46%, #10131b12), linear-gradient(0deg, #10131b 0%, transparent 55%), url("images/city.webp") center 38% / cover; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 0 clamp(24px, 4vw, 62px); padding-top: clamp(38px, 6.3vw, 100px); align-items: center; }
.hero .eyebrow { color: var(--cream); }
.hero h1 { font-size: clamp(2.9rem, 6.8vw, 7rem); letter-spacing: -.08em; line-height: .94; }
.hero h1 em { color: var(--cream); font-style: normal; }
.hero-lead { max-width: 35ch; margin-top: 23px; color: #e4e3df; font-size: clamp(1.02rem, 1.5vw, 1.24rem); }
.hero-art { position: relative; min-width: 0; background-color: #232834; background-image: linear-gradient(#fff2 1px, transparent 1px), linear-gradient(90deg, #fff2 1px, transparent 1px), radial-gradient(ellipse at 55% 65%, #555358, transparent 70%); background-size: 28px 28px, 28px 28px, auto; border: 1px solid #828290; border-radius: 12px; padding: clamp(12px, 1.5vw, 21px); }
.art-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 650 clamp(.6rem, 1vw, .78rem)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.art-label span { padding: 5px 9px; background: var(--night); border-radius: 3px; }
.art-label span:last-child { background: var(--cream); color: var(--night); }
.art-label i { color: var(--red); font-style: normal; }
.board { width: 100%; aspect-ratio: 1.63; object-fit: contain; filter: drop-shadow(0 17px 14px #000a); }
.hero-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: clamp(35px, 5.5vw, 82px) 0 0; border-top: 1px solid #ffffff35; list-style: none; }
.hero-facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding: clamp(10px, 2vw, 23px); border-right: 1px solid #ffffff35; }
.hero-facts li:first-child { padding-left: 0; }
.hero-facts li:last-child { border-right: 0; }
.hero-facts strong { color: var(--cream); line-height: 1; font: 800 clamp(1.4rem, 3.4vw, 2.7rem)/1 var(--display); letter-spacing: -.055em; }
.hero-facts span { color: #dedee5; font-size: .86rem; }

.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; list-style: none; }
.stages li { display: flex; justify-content: space-between; align-items: center; padding: 13px clamp(7px, 2vw, 22px); border-right: 1px solid var(--line); font: 700 clamp(.76rem, 1.7vw, 1rem)/1.2 var(--mono); text-transform: uppercase; }
.stages li:not(:last-child)::after { content: "→" / ""; margin-left: 3px; color: var(--red); }
.stages li:last-child { border-right: 0; background: var(--cream); }
.features { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 19px 0 0; padding: 0; list-style: none; }
.features li { display: grid; align-content: start; gap: 11px; padding: 7px 7px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-align: center; font-size: .9rem; font-weight: 680; }
.features img { width: 100%; aspect-ratio: 196 / 236; border-radius: 6px; }
.features span { padding-inline: 4px; }
.modes-heading { margin-top: 36px; }
.modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 15px; }
.mode { padding: 17px 0 0; border-top: 2px solid var(--red); }
.mode h4 { font-size: 1.2rem; letter-spacing: -.02em; }
.mode p { margin-top: 7px; color: var(--muted); }

.catalog { background: var(--panel); border-block: 1px solid var(--line); }
.products { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(12px, 2vw, 25px); }
.product { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.product-image { display: grid; place-items: center; aspect-ratio: 900 / 779; overflow: hidden; background: #292333; }
.product-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.product-body { flex: 1; display: flex; flex-direction: column; padding: clamp(18px, 3vw, 32px); }
.product-type { margin-bottom: 8px; color: var(--red); font-size: .83rem; font-weight: 770; }
.product-description { margin: 14px 0 24px; color: var(--muted); }
.product-action { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 17px; border-top: 1px solid var(--line); }
.price { font-size: clamp(1.45rem,3vw,2.15rem); line-height: 1; letter-spacing: -.04em; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 30px clamp(26px, 6vw, 92px); align-items: center; }
.split h2 + p, .split p + .button { margin-top: 18px; }
.inventory { background: var(--night); color: var(--white); }
.inventory .eyebrow, .community .eyebrow { color: var(--cream); }
.inventory .split > div > p:not(.eyebrow), .community .split > div > p:not(.eyebrow) { color: #e0dfe2; }
.components { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0; margin-block: 23px; list-style: none; }
.components li { display: flex; gap: 11px; align-items: center; padding: 12px; border: 1px solid #494d58; background: #20232f; border-radius: 8px; }
.components img { width: 41px; height: 41px; object-fit: contain; flex: 0 0 auto; }
.components strong, .components span { display: block; }
.components strong { color: var(--cream); font-size: 1.55rem; line-height: 1.1; }
.components span { color: #eeeeed; font-size: .84rem; }
.unicorn, .community-art { display: grid; place-items: center; border: 1px solid #737782; border-radius: 12px; }
.unicorn { padding: 13px; aspect-ratio: 1.38; background: radial-gradient(ellipse at 50% 56%, #50485c, #232633 72%); }
/* Center the figure inside its uneven transparent margins. */
.unicorn img { height: clamp(210px, 29vw, 410px); width: auto; object-fit: contain; transform: translateX(-15.3%); }
.expansion { background: var(--cream); }
.expansion-art { border: 1px solid #bba975; border-radius: 12px; overflow: hidden; background: #e8d894; }
.expansion-art img { width: 100%; aspect-ratio: 1.28; object-fit: contain; }
.community { background: #232633; color: var(--white); }
.community-art {
  overflow: hidden;
  padding: clamp(12px, 3vw, 34px);
  background:
    radial-gradient(ellipse at 52% 45%, #e6ab6938, #15141dcc 90%),
    url("images/city.webp") center 64% / cover #373038;
}
.community-art img { width: 100%; filter: drop-shadow(0 14px 14px #000a); }
.rule-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.rule-links a { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; padding: clamp(14px,2.5vw,26px); text-decoration: none; border: 1px solid var(--line); background: var(--white); border-radius: 9px; }
.rule-links a:hover { border-color: var(--red); }
.rule-links strong { font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.22; }
.rule-links span { grid-row: 2; color: var(--muted); }
.rule-links i { grid-column: 2; grid-row: 1 / span 2; color: var(--red); font-size: 1.4rem; font-style: normal; }
.faq { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 24px 50px; align-items: start; }
.faq h2 { font-size: clamp(2rem, 4.7vw, 3.8rem); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { padding: 15px 4px; cursor: pointer; font-weight: 720; }
.faq summary::marker { color: var(--red); }
.faq details p { padding: 0 4px 16px; color: var(--muted); }
.closing { background: var(--cream); padding-block: clamp(30px, 5vw, 58px); }
.closing-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.closing h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); letter-spacing: -.045em; }
.closing p { margin-top: 7px; color: #4b4434; }

.site-footer { background: var(--night); color: var(--white); }
.footer-main { display: grid; grid-template-columns: auto 1fr auto; padding-block: 32px; align-items: start; gap: 20px 33px; }
.footer-main nav { display: flex; flex-wrap: wrap; gap: 3px 16px; }
.footer-main nav a { display: inline-flex; align-items: center; min-height: 38px; font-size: .86rem; }
.footer-main a:hover, .footer-bottom a:hover { color: var(--cream); }
.footer-main .social { color: var(--cream); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid #ffffff35; padding-block: 15px; color: #d4d3d8; font-size: .82rem; }

.manual-heading { background: var(--night); color: var(--white); padding-block: clamp(26px, 5vw, 65px); border-bottom: 5px solid var(--red); }
.manual-heading nav { display: flex; gap: 10px; color: var(--cream); font-size: .9rem; }
.manual-heading h1 { max-width: 25ch; margin: 13px 0; font-size: clamp(2rem, 5.2vw, 4.65rem); letter-spacing: -.065em; }
.manual-heading p { max-width: 64ch; color: #e5e4e8; }
.manual-grid { display: grid; grid-template-columns: minmax(180px, .31fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 84px); align-items: start; padding-block: clamp(26px, 5vw, 60px); }
.toc { border: 1px solid var(--line); border-radius: 9px; padding: 17px; background: var(--panel); }
.toc h2 { font-size: 1.2rem; letter-spacing: -.025em; }
.toc ol { padding-left: 1.4rem; }
.toc li + li { margin-top: 6px; }
.toc a { font-size: .91rem; }
.rules-copy { max-width: 75ch; }
.rules-copy section { margin-bottom: 36px; }
.rules-copy h2 { padding-bottom: 9px; border-bottom: 2px solid var(--red); font-size: clamp(1.65rem, 3vw, 2.7rem); letter-spacing: -.045em; }
.rules-copy h3 { margin: 18px 0 9px; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.rules-copy h2 + p, .rules-copy h2 + div { margin-top: 14px; }
.rules-copy li + li { margin-top: 5px; }
.rules-copy ul, .rules-copy ol { padding-inline-start: 1.5em; }
.rules-copy .highlight, .rules-copy .urgent { color: #9d1826; font-weight: 750; }
.rules-copy :is(.note, .example-box, .intro-block, .warning-box, .card-type, .stage-item) { padding: 16px; margin-block: 12px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 7px; background: var(--white); }
.rules-copy :is(.note,.warning-box,.intro-block) { background: var(--cream); }
.rules-copy :is(.stage-item,.card-type,.warning-box) h3:first-child { margin-top: 0; }
.rules-copy .intro-block { margin-bottom: 34px; }
.manual-end { display: flex; flex-wrap: wrap; gap: 12px 24px; font-weight: 720; }

@media (max-width: 960px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 2px 14px; padding-top: 7px; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; border-top: 1px solid #ffffff24; }
  .header-inner > .button { grid-row: 1; grid-column: 2; }
  .footer-main { grid-template-columns: 1fr; }
}
@media (max-width: 740px) {
  .section-heading, .split, .manual-grid, .hero-grid, .faq { grid-template-columns: 1fr; }
  .hero-grid { row-gap: 24px; }
  .hero h1 { font-size: clamp(3.05rem, 11vw, 5.2rem); }
  .hero-facts { margin-top: 0; }
  .hero-art { max-width: 560px; width: 100%; }
  .expansion .split > div { grid-row: 1; }
  .features { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .modes { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-nav { flex-wrap: wrap; column-gap: 12px; row-gap: 0; justify-content: flex-start; }
  .site-nav a { font-size: .8rem; min-height: 40px; }
  .hero-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-facts li:nth-child(2n) { border-right: 0; }
  .hero-facts li:nth-child(3) { padding-left: 0; }
  .hero-facts li:nth-child(n + 3) { border-top: 1px solid #ffffff35; }
  .products, .rule-links { grid-template-columns: 1fr; }
  .components li { gap: 8px; padding: 8px; }
  .components img { width: 29px; height: 29px; }
  .features { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .features li { font-size: .79rem; }
  .features li:last-child { grid-column: 1 / -1; width: calc((100% - 12px) / 2); justify-self: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .board { animation: board-enter 500ms ease-out; }
  .button { transition: background-color 180ms ease, transform 180ms ease; }
  .button:focus-visible { transform: translateY(-2px); }

  @media (hover: hover) {
    .features li { transition: transform 200ms ease, box-shadow 200ms ease; }
    .features li:hover { transform: translateY(-4px); box-shadow: 0 7px 15px #17182120; }
    .button:hover { transform: translateY(-2px); }
    .community-art img { transition: transform 300ms ease; }
    .community-art:hover img { transform: scale(1.035); }
  }

  @supports (animation-timeline: view()) {
    .features li, .unicorn img, .community-art img {
      animation: art-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }
  }
}

@keyframes board-enter {
  from { transform: translateY(10px); }
  to { transform: translateY(0); }
}

@keyframes art-enter {
  from { translate: 0 12px; }
  to { translate: 0 0; }
}
