@font-face {
  font-family: "DM Serif Text";
  src: url("fonts/dm-serif-text.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --paper: #fff8ec;
  --ink: #172b51;
  --muted: #505a69;
  --rule: #d7cdbd;
  --orange: #ff9154;
  --display: "DM Serif Text", Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--ui);
  color: var(--ink);
  background: var(--paper);
  scrollbar-color: #948d80 var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { overflow-wrap: anywhere; font-family: var(--display); font-weight: 400; }
h1 { font-size: clamp(3.3rem, 6.6vw, 6rem); letter-spacing: -.04em; line-height: 1.02; }
h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); letter-spacing: -.03em; line-height: 1.12; }
p { line-height: 1.62; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #15549a;
  outline-offset: 4px;
}
::selection { background: #ffe0bb; color: var(--ink); }
.wrap { width: min(1248px, calc(100% - clamp(40px, 10vw, 152px))); margin-inline: auto; }
.sr, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: absolute; top: 10px; left: 12px; padding: 12px; background: var(--paper); z-index: 5; }

.masthead { border-bottom: 1px solid var(--rule); }
.main-nav { min-height: 86px; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(20px, 4vw, 64px); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; text-decoration: none; }
.studio-mark { width: 41px; height: 41px; flex: none; }
.wordmark > span { font-family: var(--display); font-size: 25px; line-height: .98; letter-spacing: -.035em; }
.wordmark-sub { display: block; white-space: nowrap; font: 600 11px/1.5 var(--ui); letter-spacing: .055em; text-transform: uppercase; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.8vw, 40px); list-style: none; padding: 0; margin: 0; }
.main-nav li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
}
.main-nav li a:is(:hover, [aria-current="page"]) { text-decoration: underline; text-decoration-thickness: 2px; }
.icon { width: 21px; height: 21px; flex: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 650;
}
.button:hover { background: #284772; }
.button .icon { transition: transform 180ms ease-out; }
.button:hover .icon { transform: translateX(3px); }

/* The studio introduction and the featured game's theme preview. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 4.8vw, 75px);
  padding-block: clamp(44px, 5.4vw, 82px);
}
.studio-intro h1 { font-size: clamp(3.5rem, 6.25vw, 5.9rem); }
.studio-intro p {
  max-width: 37ch;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.52vw, 1.33rem);
  margin: 23px 0 30px;
}
.game-preview, .screen-stage {
  --field: var(--orange);
  --motif: url("themes/citrus.png");
}
.game-preview {
  --sheet: #fff5e6;
  --cell: #fffaf0;
  --board-ink: #172b51;
  --minor: #aab0ad;
  --major: #394866;
  --peer: #e2eafb;
  --active: #bed6ff;
  --entry: #174988;
}
.game-preview:has(input[value="botanic"]:checked) {
  --field: #efbe4a;
  --motif: url("themes/botanic.png");
  --sheet: #eaf3e5;
  --cell: #f8fcf0;
  --board-ink: #153e35;
  --minor: #a6b8aa;
  --major: #345749;
  --peer: #cce7d6;
  --active: #a5d8bb;
  --entry: #155e49;
}
.game-preview:has(input[value="snow"]:checked) {
  --field: #bee2f2;
  --motif: url("themes/snow.png");
  --sheet: #eef7fb;
  --cell: #fff;
  --board-ink: #273957;
  --minor: #aebbc6;
  --major: #55677c;
  --peer: #ddeff8;
  --active: #bde0f2;
  --entry: #3a607e;
}
.game-preview:has(input[value="nightfall"]:checked) {
  --field: #3b3d54;
  --motif: url("themes/nightfall.png");
  --sheet: #0f111a;
  --cell: #181b27;
  --board-ink: #e5e1ed;
  --minor: #5b566d;
  --major: #9e98a9;
  --peer: #2b2c3d;
  --active: #3b3b50;
  --entry: #c3b4d6;
}
.tabletop, .screen-stage {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background-color: var(--field);
  border-radius: 16px;
}
.tabletop { aspect-ratio: 1.33; }
.art-corner, .art-edge, .screen-stage::before {
  position: absolute;
  z-index: -1;
  width: 55%;
  aspect-ratio: 1;
  background: var(--motif) top right / contain no-repeat;
}
.game-preview:has(input[value="snow"]:checked) .art-corner {
  inset: 0;
  width: auto;
  aspect-ratio: auto;
  background-size: cover;
  background-position: center;
}
.game-preview:has(input:is([value="nightfall"], [value="snow"]):checked) .art-edge { display: none; }
.art-corner { top: -4%; right: -6%; }
.art-edge { bottom: -20%; left: -10%; width: 46%; transform: rotate(180deg); }
.puzzle-sheet {
  color: var(--board-ink);
  background: var(--sheet);
  width: 55%;
  padding: 2.1% 2.7% 2.9%;
  border-radius: 2.5%;
  box-shadow: 0 2px 1px #38261138, 5px 12px 14px #37291832, 10px 24px 32px #49321d36;
  transform: rotate(-8deg);
}
.sheet-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 4%;
  font: 400 clamp(19px, 2.65vw, 39px)/1 var(--display);
  letter-spacing: -.035em;
}
.difficulty {
  display: inline-flex;
  align-items: center;
  gap: .36em;
  font: 600 clamp(.69rem, .8vw, .76rem)/1 var(--ui);
  letter-spacing: 0;
}
.bars { width: 1em; height: 1em; }
.board { width: 100%; display: block; }
.cells { fill: var(--cell); }
.peers { fill: var(--peer); }
.selected { fill: var(--active); }
.minor, .major, .outline, .cursor { fill: none; }
.minor { stroke: var(--minor); stroke-width: .16; }
.major, .outline { stroke: var(--major); stroke-width: .4; }
.cursor { stroke: var(--entry); stroke-width: .6; }
.digits { fill: currentColor; font: 600 5.9px var(--ui); font-variant-numeric: tabular-nums; }
.entry { fill: var(--entry); }

.theme-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0 0; }
.theme-caption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; font-size: .84rem; color: var(--muted); }
.theme-caption strong { color: var(--ink); font-weight: 650; }
.theme-name { display: none; }
.theme-name.citrus { display: inline; }
.game-preview:has(input:not([value="citrus"]):checked) .theme-name.citrus { display: none; }
.game-preview:has(input[value="botanic"]:checked) .theme-name.botanic,
.game-preview:has(input[value="snow"]:checked) .theme-name.snow,
.game-preview:has(input[value="nightfall"]:checked) .theme-name.nightfall { display: inline; }
.swatches { display: flex; gap: 1px; padding: 0; margin: 0; border: 0; }
.swatch { display: grid; place-items: center; width: 42px; height: 44px; cursor: pointer; }
.swatch.citrus { --hue: var(--orange); --motif-color: #b64717; }
.swatch.botanic { --hue: #a1c29e; --motif-color: #33684d; }
.swatch.snow { --hue: #bde0f2; --motif-color: #507d9b; }
.swatch.nightfall { --hue: #3b3d54; --motif-color: #c1afd5; }
.swatch input {
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  margin: 0;
  background: linear-gradient(135deg, var(--hue) 58%, var(--motif-color) 59%);
  border: 1px solid #172b5133;
  cursor: pointer;
}
.swatch input:checked { outline: 2px solid var(--ink); outline-offset: 3px; }
.swatch input:focus-visible { outline: 3px dashed #15549a; outline-offset: 4px; }
.swatch:hover input { border-color: var(--ink); }

.features {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 32px;
  border-top: 2px solid var(--ink);
  padding-block: clamp(30px, 3.6vw, 48px) clamp(42px, 5vw, 68px);
}
.game-facts { margin: 0; }
.game-facts > div { display: grid; grid-template-columns: minmax(7em, .42fr) 1fr; gap: 18px; padding-block: 17px; border-bottom: 1px solid var(--rule); }
.game-facts > div:first-child { padding-top: 2px; }
.game-facts > div:last-child { border: 0; padding-bottom: 0; }
.game-facts dt { font-size: 1.04rem; font-weight: 650; line-height: 1.55; }
.game-facts dd { margin: 0; color: var(--muted); line-height: 1.6; }

.product-layout, .reading-layout { display: grid; align-items: start; gap: clamp(40px, 7vw, 110px); padding-block: clamp(45px, 6vw, 90px); }
.product-layout { grid-template-columns: 1.1fr .9fr; }
.product-copy p, .reading-copy p, .reading-title p { color: var(--muted); font-size: 1.06rem; }
.product-copy h2, .reading-copy h2 { font-size: clamp(1.65rem, 2.2vw, 2.05rem); margin: 30px 0 8px; }
.not-found { padding-block: clamp(45px, 6vw, 90px); }
.not-found h1 { margin-bottom: 16px; }
.product-copy .intro-line { margin: 10px 0 14px; color: var(--ink); font-size: 1.4rem; }
.article-actions { display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap; margin-top: 27px; }
.screen-stage { padding: 34px 24px; }
.screen-stage::before { content: ""; top: 0; right: 0; }
.screen-stage img { display: block; width: min(58%, 248px); height: auto; border-radius: 10px; box-shadow: 2px 10px 30px #40271438; }
.game-screen figcaption { font-size: .85rem; color: var(--muted); margin-top: 12px; text-align: center; }

.reading-layout { grid-template-columns: minmax(0, .73fr) minmax(0, 1.27fr); }
.reading-title p { margin-top: 20px; max-width: 30ch; }
.reading-copy { max-width: 67ch; width: 100%; }
.reading-copy p + p { margin-top: 12px; }
.reading-copy a { color: #214a7e; }
.reading-copy > a { display: inline-block; margin-top: 16px; }
/* The policy keeps the supplied wording and groups publication details with its title. */
.policy-details { list-style: none; padding: 0; margin: 25px 0 0; font-size: .96rem; color: var(--muted); }
.policy-details li { margin-top: 12px; overflow-wrap: anywhere; }
.policy-details strong { display: block; color: var(--ink); }
.policy-copy h2:first-child { margin-top: 0; }
.policy-copy ul { padding-left: 1.3em; color: var(--muted); font-size: 1.06rem; line-height: 1.62; }
.policy-copy li + li { margin-top: 6px; }
.support-copy details { padding-block: 8px; border-bottom: 1px solid var(--rule); }
.support-copy details:first-child { border-top: 2px solid var(--ink); }
.support-copy summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 46px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.support-copy summary::-webkit-details-marker { display: none; }
.support-copy summary::after { content: ""; width: 8px; height: 8px; flex: none; margin-right: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.support-copy details[open] > summary::after { transform: rotate(225deg); }
.support-copy details p { padding-bottom: 12px; }
.footer { border-top: 1px solid var(--rule); }
.footrow { padding-block: 25px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.footrow p { font-size: .9rem; font-weight: 650; }
.footrow > div { display: flex; flex-wrap: wrap; gap: 22px; }
.footrow a { padding-block: 10px; font-size: .86rem; }

@media (max-width: 850px) {
  .home-hero { gap: 24px; }
  .studio-intro h1 { font-size: clamp(2.75rem, 6.15vw, 3.7rem); }
  .features { grid-template-columns: .62fr 1.38fr; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .main-nav { min-height: 70px; gap: 12px; }
  .main-nav ul { gap: 18px; }
  .studio-mark { width: 34px; height: 34px; }
  .wordmark > span { font-size: 21px; }
  .wordmark-sub { letter-spacing: .015em; }
  .home-hero, .product-layout, .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .home-hero { padding-block: 34px 27px; gap: 30px; }
  .studio-intro h1 { font-size: clamp(2.85rem, 10vw, 4.7rem); }
  .studio-intro p { margin: 16px 0 22px; max-width: 42ch; }
  .tabletop { aspect-ratio: 1.4; }
  .sheet-heading { font-size: clamp(22px, 5.2vw, 34px); }
  .difficulty { font-size: .69rem; }
  .features { grid-template-columns: 1fr; gap: 24px; }
  .game-facts > div { grid-template-columns: minmax(5.6em, .42fr) 1fr; gap: 14px; }
  .product-layout, .reading-layout { gap: 30px; }
  .screen-stage img { width: min(56%, 220px); }
  .wide-only { display: none; }
}
@media (max-width: 455px) {
  .main-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding-top: 12px;
  }
  .main-nav ul { gap: 0 24px; }
  .game-facts > div { display: block; }
  .game-facts dd { margin-top: 4px; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 28px); }
  .main-nav li a { font-size: .88rem; }
  .swatch { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .button .icon { transition: none; }
  .button:hover .icon { transform: none; }
}
@media (forced-colors: active) {
  .swatch input { appearance: auto; }
}
