/* Tessamere site (build_site.py copies this to site/css/site.css).
   House look: ink on stone paper, Marcellus (the wordmark's face) over Newsreader. The house has no color of its own:
   each set brings its own, scoped by .cs (The Conservatory) wherever that set appears. */

:root {
  --paper: #F2EFE8;
  --paper-2: #E7E3DA;
  --paper-3: #DDD8CD;
  --ink: #1D1C1A;
  --ink-soft: #57544E;
  --rule: #D3CEC3;
  --brand: var(--ink);            /* links, eyebrows, buttons, the symbol; a set swaps in its own inside .cs */
  --brand-hover: #3A3834;
  --dark: #1D1C1A;                /* the footer and other dark bands */
  --stone: #C9C1B2;               /* small labels and the symbol on dark grounds only */
  --face: #FAF9F5;                /* a plain teaching tile in house neutrals, face to back */
  --layer-2: #DDD8CD;
  --layer-3: #B3AC9F;
  --back: #6F695F;
  --display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* The Conservatory, wherever the set appears: its page, its band on the home page, its card, its tiles. */
.cs, .theme-conservatory main {
  --brand: #33553D;
  --brand-hover: #1F3427;
  --set-deep: #1F3427;
  --set-pale: #BFD3B5;
  --set-gold: #D0A662;
  --face: #F8F8F6;
  --layer-2: #C8C8C7;
  --layer-3: #9FA1A2;
  --back: #7D9474;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: clamp(1.08rem, .3vw + 1rem, 1.2rem);
  line-height: 1.62;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
body::before {                                   /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .33 0 0 0 0 .28 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brand-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.kicker {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .3em; font-size: .78rem;
  color: var(--brand); margin: 0 0 1.1rem;
}
.lede { font-size: 1.18em; color: var(--ink-soft); max-width: 46ch; }
.small { font-size: .9em; color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--paper); padding: .6rem 1rem; }
.skip:focus { left: 8px; }

/* buttons */
.btn {
  display: inline-block; font-family: var(--display); text-transform: uppercase; letter-spacing: .22em; font-size: .8rem;
  text-decoration: none; color: var(--paper); background: var(--brand); border: 1px solid var(--brand);
  padding: 1rem 1.7rem; transition: background .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--paper); transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--set-deep, var(--ink)); border-color: var(--paper); }
.btn-light:hover { background: var(--set-pale, var(--paper-2)); color: var(--set-deep, var(--ink)); }
.more {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .22em; font-size: .76rem; color: var(--brand);
}
.more::after { content: " \2192"; display: inline-block; transition: transform .3s var(--ease); }
.avail { font-family: var(--display); text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; color: var(--brand); }

/* ---------------------------------------------------------------- header and menu */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); height: 74px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 38px; height: 38px; }
.wordmark { font-family: var(--display); letter-spacing: .36em; font-size: 1.02rem; color: var(--ink); margin: 0; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(1.2rem, 2.6vw, 2.4rem); }
.nav-list > li > a {
  position: relative; font-family: var(--display); text-transform: uppercase; letter-spacing: .2em; font-size: .8rem;
  color: var(--ink); text-decoration: none; padding: .5rem 0;
}
.nav-list > li > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .1rem; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-list > li > a:hover::after, .nav-list > li > a[aria-current]::after { transform: scaleX(1); }
.nav-list > li > a[aria-current] { color: var(--ink); }
.has-sub { position: relative; display: flex; align-items: center; gap: .15rem; }
.sub-toggle { background: none; border: 0; padding: .4rem .3rem; color: var(--ink-soft); cursor: pointer; line-height: 0; }
.sub-toggle svg { width: 11px; height: 8px; transition: transform .3s var(--ease); }
.has-sub.open .sub-toggle svg { transform: rotate(180deg); }
.sub {
  list-style: none; margin: 0; padding: 1.1rem 0 .7rem; position: absolute; top: calc(100% + 18px); left: -1.4rem;
  min-width: 250px; background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 18px 40px -18px rgba(29, 28, 26, .3);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.sub::before {                                   /* a tile's four-layer edge across the top of the mahjong menu */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 7px;
  background: linear-gradient(var(--face) 0 25%, var(--layer-2) 25% 50%, var(--layer-3) 50% 75%, var(--back) 75%);
}
.sub::after { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }   /* hover bridge */
.has-sub.open .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .has-sub:hover .sub { opacity: 1; visibility: visible; transform: none; } }
.sub li a { display: block; padding: .45rem 1.4rem; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.sub li a:hover { background: var(--paper-2); color: var(--ink); }
.sub .sub-label { font-family: var(--display); text-transform: uppercase; letter-spacing: .26em; font-size: .68rem; color: var(--ink-soft); padding: 0 1.4rem .3rem; }
.sub .sub-rule { border-top: 1px solid var(--rule); margin-top: .5rem; padding-top: .5rem; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: flex; align-items: center; gap: .6rem; background: none; border: 1px solid var(--rule); padding: .55rem .8rem;
    font-family: var(--display); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--ink); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 16px; height: 1px; background: var(--ink); position: relative; transition: transform .3s var(--ease); }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -5px; } .menu-bars::after { top: 5px; }
  .nav-open .menu-bars { background: transparent; }
  .nav-open .menu-bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-open .menu-bars::after { transform: translateY(-5px) rotate(-45deg); }
  #nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); display: none; }
  .nav-open #nav { display: block; }
  .no-js #nav { display: block; position: static; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.2rem; }
  .nav-list > li { border-bottom: 1px solid var(--rule); }
  .nav-list > li > a { display: block; padding: 1rem 0; font-size: .86rem; }
  .nav-list > li > a::after { display: none; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { display: none; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; min-width: 0; width: 100%; padding: 0 0 .8rem 1rem; background: none; }
  .sub::before, .sub::after, .sub .sub-label { display: none; }
  .sub .sub-rule { border: 0; margin: 0; padding: 0; }
  .sub li a { padding: .35rem 0; }
}

/* ---------------------------------------------------------------- tiles */
.tile {
  margin: 0; position: relative; border-radius: 9% / 6%; background: var(--face);
  box-shadow: 0 0 0 1px rgba(29, 28, 26, .06), 0 3px 0 0 var(--layer-2), 0 6px 0 0 var(--layer-3), 0 10px 0 0 var(--back),
              0 22px 26px -10px rgba(20, 19, 18, .36);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.tile img { width: 100%; border-radius: inherit; }
.tile-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 1.6rem .9rem; align-items: start; }
.tile-row .tile:hover { transform: translateY(-6px); }
.tile figcaption { text-align: center; font-size: .82rem; color: var(--ink-soft); margin-top: 1.3rem; line-height: 1.3; }
.tile-edge { display: flex; flex-direction: column; width: 76px; margin-bottom: 1.6rem; }
.tile-edge i { display: block; height: 5px; }
.tile-edge i:nth-child(1) { background: var(--face); box-shadow: inset 0 0 0 1px var(--rule); height: 6px; }
.tile-edge i:nth-child(2) { background: var(--layer-2); }
.tile-edge i:nth-child(3) { background: var(--layer-3); }
.tile-edge i:nth-child(4) { background: var(--back); height: 7px; }

/* fanned tiles (home and mahjong cards) */
.fan-tile { position: absolute; width: 30%; max-width: 132px; }
.fan-tile:nth-child(1) { transform: translate(-62%, 6%) rotate(-11deg); }
.fan-tile:nth-child(2) { transform: translate(0, -4%) rotate(0deg); z-index: 2; }
.fan-tile:nth-child(3) { transform: translate(62%, 6%) rotate(11deg); }
a:hover .fan-tile:nth-child(1) { transform: translate(-74%, 4%) rotate(-15deg); }
a:hover .fan-tile:nth-child(2) { transform: translate(0, -9%); }
a:hover .fan-tile:nth-child(3) { transform: translate(74%, 4%) rotate(15deg); }

/* ---------------------------------------------------------------- home */
.hero-house { position: relative; min-height: min(84vh, 820px); display: grid; place-items: center; text-align: center; overflow: hidden; padding: 5rem 0 6rem; }
.lattice {                                     /* tesserae: a diamond lattice, the knot's own geometry */
  position: absolute; inset: -20%;
  background:
    repeating-linear-gradient(45deg, transparent 0 58px, rgba(29, 28, 26, .06) 58px 59px),
    repeating-linear-gradient(-45deg, transparent 0 58px, rgba(29, 28, 26, .06) 58px 59px);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
  animation: drift 60s linear infinite;
}
@keyframes drift { to { transform: translate(59px, 59px); } }
.hero-inner { position: relative; padding-inline: var(--gutter); max-width: 900px; }
.hero-mark { color: var(--ink); width: clamp(110px, 15vw, 172px); margin: 0 auto 2.4rem; }
.hero-mark svg { width: 100%; height: auto; }
.hero-house h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.hero-house h1 em { display: block; font-family: var(--text); font-style: italic; font-weight: 400; color: var(--ink); font-size: .86em; margin-top: .1em; }
.hero-sub { max-width: 40ch; margin: 1.6rem auto 2.4rem; color: var(--ink-soft); font-size: 1.12em; }

.games { padding: 6rem 0; border-top: 1px solid var(--rule); }
.game-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.6rem; margin-top: 2.4rem; }
.game-card { display: grid; grid-template-rows: 300px auto; border: 1px solid var(--rule); background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color .3s, box-shadow .4s var(--ease); }
a.game-card:hover { border-color: var(--ink); box-shadow: 0 26px 50px -30px rgba(29, 28, 26, .45); color: var(--ink); }
a.game-card:hover .more::after { transform: translateX(5px); }
.game-art { position: relative; display: grid; place-items: center; color: var(--ink); background: radial-gradient(ellipse at 50% 120%, var(--paper-3), var(--paper-2) 70%); overflow: hidden; }
.game-text { padding: 1.6rem 1.8rem 1.9rem; }
.game-text p { color: var(--ink-soft); }
.game-card.soon { border-style: dashed; background: transparent; }
.soon-art { background: none; color: var(--rule); }
.soon-art svg { width: 110px; height: 110px; }

.feature { padding: 6.5rem 0; background: linear-gradient(165deg, #172A1F 0%, var(--set-deep) 35%, #2D4B36 75%, var(--brand) 100%); color: var(--paper); position: relative; overflow: hidden; }
.feature .kicker { color: var(--set-pale); }
.feature .avail { color: var(--set-gold); }
.feature h2 { color: var(--paper); font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.feature p { color: color-mix(in srgb, var(--paper) 82%, transparent); max-width: 44ch; }
.feature .btn { background: var(--paper); color: var(--set-deep); border-color: var(--paper); }
.feature .btn:hover { background: var(--set-pale); border-color: var(--set-pale); color: var(--set-deep); }
.feature :focus-visible, .cons-hero :focus-visible { outline-color: var(--set-pale); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.feature-art { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: end; }
.feature-art .tile:nth-child(odd) { transform: translateY(-1.6rem); }
.feature-art .tile { box-shadow: 0 3px 0 0 var(--layer-2), 0 6px 0 0 var(--layer-3), 0 10px 0 0 var(--back), 0 26px 30px -10px rgba(0, 0, 0, .55); }

/* ---------------------------------------------------------------- page heads, mahjong */
.page-head { padding: 5rem 0 3rem; }
.page-head h1 { max-width: 18ch; }
.sets { padding: 1rem 0 5rem; }
.section-label { font-size: .8rem; font-family: var(--display); text-transform: uppercase; letter-spacing: .3em; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 2rem; display: flex; justify-content: space-between; }
.section-label span { color: var(--ink); }
.set-grid { display: grid; gap: 1.6rem; }
.set-card { display: grid; grid-template-columns: 1.15fr 1fr; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); background: var(--paper); transition: border-color .3s, box-shadow .4s var(--ease); }
.set-card:hover { border-color: var(--ink); box-shadow: 0 30px 60px -36px rgba(29, 28, 26, .5); color: var(--ink); }
.set-card:hover .more::after { transform: translateX(5px); }
.set-art { position: relative; min-height: 360px; display: grid; place-items: center; overflow: hidden; }
.conservatory-bg { background: radial-gradient(ellipse at 50% 110%, #3A5E45, var(--set-deep) 70%); }
.set-text { padding: 2.4rem 2.6rem; display: flex; flex-direction: column; justify-content: center; }
.set-text h3 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); }
.set-text p { color: var(--ink-soft); }
.facts { list-style: none; padding: 0; margin: .4rem 0 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.facts li { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; border: 1px solid var(--rule); padding: .4rem .7rem; }
.more-sets { margin-top: 1.4rem; color: var(--ink-soft); font-style: italic; }
.learn-callout { padding: 0 0 6rem; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding-block: 2.4rem; }
.callout h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: .3em; }
.callout p { margin: 0; color: var(--ink-soft); }

/* ---------------------------------------------------------------- the Conservatory */
.cons-hero { position: relative; overflow: hidden; color: var(--paper); padding: 5.5rem 0 6.5rem; background: linear-gradient(165deg, #172A1F 0%, var(--set-deep) 35%, #2D4B36 75%, var(--brand) 100%); }
.glasshouse { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(241, 239, 233, .1); }
.cons-hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; }
.cons-hero .kicker { color: var(--set-pale); }
.cons-hero h1 { color: var(--paper); font-size: clamp(2.8rem, 6vw, 5.2rem); }
.cons-hero p { color: color-mix(in srgb, var(--paper) 84%, transparent); max-width: 42ch; }
.cons-hero .welcome { font-style: italic; font-size: 1.45em; color: var(--set-pale); margin-bottom: .8em; }
.cons-hero .avail { color: var(--set-gold); }
.hero-tiles { position: relative; height: clamp(320px, 38vw, 470px); }
.hero-tile { position: absolute; width: 27%; box-shadow: 0 3px 0 0 var(--layer-2), 0 6px 0 0 var(--layer-3), 0 10px 0 0 var(--back), 0 30px 34px -12px rgba(0, 0, 0, .6); }
.hero-tile.t0 { left: 2%;  top: 26%; --r: -14deg; }
.hero-tile.t1 { left: 20%; top: 9%;  --r: -6deg; z-index: 2; }
.hero-tile.t2 { left: 38%; top: 2%;  --r: 0deg; z-index: 3; }
.hero-tile.t3 { left: 56%; top: 9%;  --r: 6deg; z-index: 2; }
.hero-tile.t4 { left: 73%; top: 26%; --r: 14deg; }
.hero-tile { transform: rotate(var(--r)); animation: deal 1.1s var(--ease) both; }
.hero-tile.t0 { animation-delay: .15s; } .hero-tile.t1 { animation-delay: .25s; } .hero-tile.t2 { animation-delay: .35s; }
.hero-tile.t3 { animation-delay: .45s; } .hero-tile.t4 { animation-delay: .55s; }
.hero-tile:hover { transform: rotate(var(--r)) translateY(-10px); }
@keyframes deal { from { opacity: 0; transform: translate(0, 40px) rotate(0deg); } to { opacity: 1; transform: rotate(var(--r)); } }

.suits { padding: 6rem 0 3rem; }
.suit { display: grid; grid-template-columns: 230px 1fr; gap: 2.4rem; padding: 2.6rem 0 3rem; border-top: 1px solid var(--rule); align-items: start; }
.suit h3 { font-size: 1.7rem; }
.suit p { color: var(--ink-soft); font-size: .95em; }
.suit .tile-row { grid-template-columns: repeat(9, minmax(0, 1fr)); }

.build { padding: 6rem 0; background: var(--paper-2); }
.build-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: center; }
.stack-figure { display: flex; align-items: center; justify-content: center; gap: 2.4rem; }
.stack-tile { width: min(210px, 42vw); transform: perspective(900px) rotateX(38deg) rotateZ(-10deg); }
.stack-face { box-shadow: 0 0 0 1px rgba(29, 28, 26, .06), 0 7px 0 0 var(--layer-2), 0 14px 0 0 var(--layer-3), 0 23px 0 0 var(--back), 0 48px 40px -14px rgba(20, 19, 18, .42); }
.stack-layers { display: flex; flex-direction: column; gap: .7rem; font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; }
.stack-layers span { display: flex; align-items: center; gap: .7rem; }
.stack-layers span::before { content: ""; width: 26px; height: 12px; border: 1px solid rgba(29, 28, 26, .15); }
.stack-layers .l1::before { background: var(--face); } .stack-layers .l2::before { background: var(--layer-2); }
.stack-layers .l3::before { background: var(--layer-3); } .stack-layers .l4::before { background: var(--back); }
.specs { margin: 2rem 0 0; display: grid; gap: 0; }
.specs div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--rule); }
.specs dt { font-family: var(--display); text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; padding-top: .35rem; color: var(--brand); }
.specs dd { margin: 0; }

.inbox { padding: 6rem 0; }
.box-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin: 2.4rem 0 2rem; }
.box-grid figure { margin: 0; }
.box-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.box-grid figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .7rem; }
.box-list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: .3rem 0; }
.box-list li { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; }
.box-list { gap: .5rem 1.6rem; }
.box-list li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--brand); transform: rotate(45deg); margin-right: .6rem; vertical-align: .15em; }
.note { font-size: .9rem; color: var(--ink-soft); max-width: 70ch; }

/* ---------------------------------------------------------------- how to play */
.learn-head .lede { max-width: 52ch; }
.head-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.learn-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 4rem; padding-bottom: 6rem; }
.toc { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc-h { font-family: var(--display); text-transform: uppercase; letter-spacing: .26em; font-size: .7rem; color: var(--ink-soft); }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: t; border-left: 1px solid var(--rule); }
.toc li { counter-increment: t; }
.toc a { display: block; padding: .32rem 0 .32rem 1rem; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--ink-soft); font-size: .95rem; line-height: 1.35; }
.toc a::before { content: counter(t) "  "; font-family: var(--display); color: var(--ink-soft); font-size: .8em; margin-right: .3rem; }
.toc a:hover, .toc a.here { color: var(--ink); border-left-color: var(--ink); }
.lessons { max-width: 720px; }
.lesson { padding: 3rem 0 1.5rem; border-top: 1px solid var(--rule); }
.lesson:first-child { border-top: 0; padding-top: 0; }
.lesson h2 { display: flex; align-items: center; gap: 1rem; font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 1.2rem; }
.lesson h2 .num {                               /* the section number on a little tile */
  flex: none; display: grid; place-items: center; width: 34px; height: 48px; font-size: 1.1rem; color: var(--ink);
  background: var(--face); border-radius: 4px; box-shadow: 0 0 0 1px rgba(29, 28, 26, .1), 0 2px 0 0 var(--layer-2), 0 4px 0 0 var(--layer-3), 0 6px 0 0 var(--back);
}
.lesson h3 { font-size: 1.3rem; margin: 1.8rem 0 .6rem; color: var(--ink); }
.lesson ul, .lesson ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.lesson li { margin-bottom: .55rem; padding-left: .2rem; }
.lesson li::marker { color: var(--ink-soft); font-family: var(--display); }
.video { margin: 0 0 2rem; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.video figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: .5rem; }
.video-frame {
  aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: .5rem; text-align: center; color: var(--paper);
  background:
    repeating-linear-gradient(45deg, transparent 0 34px, rgba(241, 239, 233, .05) 34px 35px),
    repeating-linear-gradient(-45deg, transparent 0 34px, rgba(241, 239, 233, .05) 34px 35px),
    linear-gradient(160deg, #141413, #3A3834);
}
.play { width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(241, 239, 233, .6); position: relative; margin-bottom: .6rem; }
.play::after { content: ""; position: absolute; left: 23px; top: 18px; border-left: 16px solid rgba(241, 239, 233, .9); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video-title { font-family: var(--display); font-size: 1.25rem; padding-inline: 1rem; }
.video-meta { font-family: var(--display); text-transform: uppercase; letter-spacing: .2em; font-size: .68rem; color: var(--stone); }
.rule-tiles { margin: 1.4rem 0 2rem; }
.row-label { font-family: var(--display); text-transform: uppercase; letter-spacing: .24em; font-size: .7rem; color: var(--ink-soft); margin-bottom: .9rem; }
.tile-row.small { grid-template-columns: repeat(9, minmax(0, 62px)); gap: 1.2rem .6rem; }
.rt { position: relative; }
.group-label { position: absolute; top: -1.35rem; left: 0; white-space: nowrap; font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .6rem; color: var(--ink-soft); }
.rule-tiles .tile { box-shadow: 0 0 0 1px rgba(29, 28, 26, .08), 0 2px 0 0 var(--layer-2), 0 4px 0 0 var(--layer-3), 0 6px 0 0 var(--back), 0 12px 14px -8px rgba(20, 19, 18, .36); }
.row-note { font-size: .9rem; color: var(--ink-soft); margin-top: 1.3rem; font-style: italic; }
.diagram { margin: 1.4rem 0 1.8rem; }
.diagram img { width: 100%; max-width: 460px; }
table.pay { width: 100%; border-collapse: collapse; margin: 1.6rem 0 2rem; font-size: .98rem; }
table.pay th { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; color: var(--ink); text-align: left; padding: .6rem .4rem .6rem 0; border-bottom: 1px solid var(--ink); }
table.pay td { padding: .7rem .4rem .7rem 0; border-bottom: 1px solid var(--rule); }
.glossary { margin: 0 0 1.6rem; }
.glossary div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.glossary dt { font-weight: 600; color: var(--ink); }
.glossary dd { margin: 0; }
.end-note { border-top: 1px solid var(--rule); padding-top: 1.4rem; margin-top: 1.5rem; }

/* ---------------------------------------------------------------- about, help */
.prose { padding: 0 0 6rem; }
.prose h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); margin-top: 2.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.values { list-style: none; padding: 0 !important; }
.values li { position: relative; padding-left: 1.8rem; margin-bottom: 1rem; }
.values li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: 8px; height: 8px; background: var(--brand); transform: rotate(45deg); }

/* ---------------------------------------------------------------- footer */
.site-foot { background: var(--dark); color: var(--paper); padding: 4.5rem 0 2rem; }
.site-foot :focus-visible { outline-color: var(--stone); }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; }
.foot-brand svg { width: 52px; height: 52px; color: var(--paper); margin-bottom: 1rem; }
.foot-brand .wordmark { color: var(--paper); font-size: 1rem; }
.foot-line { font-style: italic; color: color-mix(in srgb, var(--paper) 70%, transparent); margin-top: .4rem; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.foot-cols h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .28em; color: var(--stone); margin-bottom: 1rem; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { margin-bottom: .45rem; }
.foot-cols a { color: color-mix(in srgb, var(--paper) 85%, transparent); text-decoration: none; font-size: .98rem; word-break: break-word; }
.foot-cols a:hover { color: var(--paper); text-decoration: underline; }
.foot-legal { max-width: var(--wrap); margin: 3.5rem auto 0; padding: 1.4rem var(--gutter) 0; border-top: 1px solid rgba(241, 239, 233, .14); font-size: .82rem; color: color-mix(in srgb, var(--paper) 60%, transparent); }

/* ---------------------------------------------------------------- reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .12s; } .js .reveal.d2 { transition-delay: .24s; } .js .reveal.d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- narrow screens */
@media (max-width: 980px) {
  .game-grid, .feature-grid, .cons-hero-grid, .build-grid, .set-card { grid-template-columns: 1fr; }
  .suit { grid-template-columns: 1fr; gap: 1rem; }
  .learn-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; max-height: none; margin-bottom: 2.4rem; }
  .hero-tiles { height: clamp(280px, 62vw, 440px); }
  .foot-inner { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .tile-row, .suit .tile-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 92px; overflow-x: auto; padding: .4rem .2rem 1.6rem; scroll-snap-type: x mandatory; }
  .tile-row .tile { scroll-snap-align: start; }
  .tile-row.small { grid-auto-columns: 54px; }
  .box-grid { grid-template-columns: 1fr; }
  .feature-art { grid-template-columns: repeat(4, 1fr); gap: .6rem; }
  .callout { flex-direction: column; align-items: flex-start; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .glossary div, .specs div { grid-template-columns: 1fr; gap: .2rem; }
  .game-card { grid-template-rows: 240px auto; }
  .set-art { min-height: 280px; }
  .stack-figure { flex-direction: column; }
  .hero-house { min-height: 0; padding: 4rem 0 4.5rem; }
}

/* ---------------------------------------------------------------- before launch: tiles face down, plain labels */
/* A tile lying face down: its back on top, then its other layers showing below, back to face. */
.tile.back {
  background: var(--back);
  box-shadow: 0 0 0 1px rgba(29, 28, 26, .08), 0 3px 0 0 var(--layer-3), 0 6px 0 0 var(--layer-2), 0 10px 0 0 var(--face),
              0 22px 26px -10px rgba(20, 19, 18, .38);
}
.tile.back img { filter: saturate(1.05) contrast(1.04); }
.tile.back::after {                              /* polished acrylic catches the light */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, .08));
}
.feature-art .tile.back, .hero-tile.back {
  box-shadow: 0 3px 0 0 var(--layer-3), 0 6px 0 0 var(--layer-2), 0 10px 0 0 var(--face), 0 28px 32px -12px rgba(0, 0, 0, .55);
}
/* A plain tile carrying only its name (How to play, before launch). */
.tile-text { aspect-ratio: 25 / 38; display: grid; place-items: center; align-content: center; gap: .15rem; text-align: center; padding: .3rem; }
.tile-text .ti { font-family: var(--display); font-size: clamp(1rem, 2.2vw, 1.35rem); color: var(--brand); line-height: 1; }
.tile-text.long .ti { font-size: clamp(.72rem, 1.4vw, .9rem); letter-spacing: .02em; }
.tile-text .ts { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: .52rem; color: var(--ink-soft); }
.teaser .lede { max-width: 56ch; }
.teaser-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .9rem; margin: 2.6rem 0 3rem; }
.teaser-row .tile:nth-child(odd) { transform: translateY(-.6rem); }
.counts { list-style: none; padding: 1.6rem 0 0; margin: 0 0 3rem; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(8, 1fr); gap: 1rem; }
.counts li { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; color: var(--ink-soft); }
.counts span { display: block; font-size: 1.9rem; letter-spacing: 0; color: var(--brand); margin-bottom: .2rem; }
@media (max-width: 700px) {
  .teaser-row { grid-template-columns: repeat(5, 1fr); }
  .teaser-row .tile:nth-child(n+6) { display: none; }
  .counts { grid-template-columns: repeat(4, 1fr); }
}

/* ---------------------------------------------------------------- the house's own picture of the game */
.house-tiles { width: min(380px, 82%); height: auto; }
.house-tiles > g { transition: transform .5s var(--ease); transform-box: view-box; }
a:hover .house-tiles > g:nth-child(1) { transform: translateX(-10px); }
a:hover .house-tiles > g:nth-child(3) { transform: translateX(10px); }
