/* Notice board + notes. Same two faces, same ink, same paper as the game. */

@font-face {
  font-family: 'Patrick Hand';
  src: url('/assets/fonts/patrick-hand.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Anton';
  src: url('/assets/fonts/anton.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #1e3477;
  --ink-2: rgba(30, 52, 119, 0.7);
  --ink-3: rgba(30, 52, 119, 0.2);
  --red: #bf3b2b;
  --paper: #f3edde;
  --paper-hi: #fffaf0;
  --tin: #c4691a;
  --room: #565049;
  --board: #1b2a1c;
  --board-hi: #243526;
  --chalk: #e8e4d4;
  --wood: #6b4423;
  --wood-hi: #8a5a2b;
  --stamp: 'Anton', 'Arial Narrow', sans-serif;
  --hand: 'Patrick Hand', cursive;
  --body: 'Avenir Next', Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--ink);
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
}

a:hover { color: var(--red); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid #df9d2c;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

h1, h2, h3 { scroll-margin-top: 84px; }

.blog-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 240, 0.94);
  border-bottom: 1px solid var(--ink-3);
  backdrop-filter: blur(14px);
}

.blog-nav-inner,
.blog-foot-inner,
.site-inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.blog-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.blog-logo .mark { display: block; }

.blog-logo span {
  font-family: var(--body);
  font-size: 17px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}

.blog-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  font-family: var(--hand);
  font-size: 18px;
  font-weight: 400;
}

.blog-nav-links a { text-decoration: none; white-space: nowrap; }

.blog-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px 8px;
  border: 1px solid rgba(92, 24, 18, 0.35);
  border-radius: 8px;
  background: var(--red);
  color: #f6efe0 !important;
  font-family: var(--stamp);
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transform: none;
  box-shadow: 0 3px 0 rgba(120, 34, 25, 0.85), 0 8px 18px rgba(91, 34, 25, 0.16);
}

.blog-play:hover { color: #f6efe0 !important; }

.blog-play:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(120, 34, 25, 0.85);
}

/* Listing: the board fills the page */

body.board-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.48), transparent 25rem),
    linear-gradient(180deg, #ded1b9, #c9b897);
  box-shadow: none;
}

body.board-page .blog-nav {
  position: sticky;
  background: rgba(255, 250, 240, 0.94);
  border-bottom: 1px solid var(--ink-3);
}

body.board-page .blog-nav-inner {
  justify-content: space-between;
  max-width: 70rem;
  padding: 0 24px;
}

body.board-page .blog-logo svg g:first-child { fill: #1e2e64; }
body.board-page .blog-logo svg g:nth-child(2) { fill: #b0362a; }

.board-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 34px 24px 42px;
}

.board {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: 54px 48px 62px;
  border: 13px solid #71471f;
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.035) 0 1px, transparent 2px),
    radial-gradient(circle at 77% 64%, rgba(0, 0, 0, 0.09) 0 1px, transparent 2px),
    linear-gradient(145deg, #213b29, #173320 58%, #12291a);
  background-size: 24px 24px, 31px 31px, auto;
  box-shadow:
    0 2px 0 #a4733e inset,
    0 -2px 0 rgba(45, 24, 9, 0.62) inset,
    0 18px 45px rgba(46, 31, 17, 0.23);
}

.board::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 54px rgba(0, 0, 0, 0.18);
}

.board h1 {
  margin: 0 0 10px;
  color: #f1ecdc;
  font-family: var(--stamp);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 0.98;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
  text-wrap: balance;
}

.board .dek {
  max-width: 38rem;
  margin: 0 0 38px;
  color: rgba(241, 236, 220, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.notes {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-content: start;
}

.note {
  position: relative;
  min-width: 0;
  padding-top: 5px;
}

.note a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(30, 52, 119, 0.16);
  border-radius: 5px;
  background: var(--paper-hi);
  color: var(--ink);
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 9px 18px rgba(3, 17, 8, 0.28);
  transition: transform 180ms cubic-bezier(.23, 1, .32, 1), box-shadow 180ms ease, border-color 180ms ease;
}

.note img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #33281f;
  transition: transform 300ms cubic-bezier(.2,.7,.2,1), filter 300ms ease;
}

.note .pin {
  position: absolute;
  top: -3px;
  left: 50%;
  z-index: 2;
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(92, 18, 13, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffd0c5 0 8%, #d95240 29%, #9e271d 74%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.44);
  transform: translateX(-50%);
}

.note-copy {
  display: block;
  min-height: 126px;
  padding: 19px 22px 22px;
  border-top: 3px solid rgba(30, 52, 119, 0.82);
}

.note:nth-child(3n + 2) .note-copy { border-top-color: rgba(191, 59, 43, 0.82); }
.note:nth-child(3n) .note-copy { border-top-color: rgba(196, 105, 26, 0.82); }

.note strong {
  display: block;
  margin: 0 0 4px;
  font-family: var(--body);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 760;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.note em {
  display: block;
  margin: 0;
  color: var(--ink-2);
  font-style: normal;
  font-size: 15px;
  line-height: 1.48;
  text-wrap: pretty;
}

/* Article: same layout, game colours */

.article-page {
  padding: 42px 0 96px;
}

.article-page .site-inner {
  max-width: 47rem;
  margin-left: auto;
  margin-right: auto;
}

.article-page .crumbs {
  margin: 0 0 26px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 620;
}

.article-page .crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.article-page .crumbs a:hover { color: var(--red); }

.article-page article { max-width: none; }

.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-page h1 {
  margin: 0 0 10px;
  font-family: var(--stamp);
  font-size: clamp(2.55rem, 6vw, 4.25rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.article-page .dek {
  margin: 0 0 10px;
  color: var(--ink-2);
  max-width: 43rem;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.article-page .meta {
  margin: 0 0 30px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.hero { margin: 0 0 34px; }

.hero img {
  display: block;
  width: 100%;
  background: var(--paper-hi);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
}

.article-page h2 {
  margin: 2.5rem 0 0.7rem;
  font-size: clamp(1.4rem, 3vw, 1.72rem);
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.article-page h3 {
  margin: 1.65rem 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 760;
}

.article-page p { margin: 0 0 1.08rem; }

.article-page ul,
.article-page ol {
  margin: 0 0 1.2rem;
  padding-left: 1.4em;
}

.article-page li { margin: 0 0 0.55rem; }

.article-page .answer {
  margin: 0 0 1.7rem;
  padding: 20px 22px;
  background: var(--paper-hi);
  border: 1px solid rgba(191, 59, 43, 0.18);
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(67, 47, 26, 0.06);
}

.article-page .answer p:last-child,
.article-page .source-note p:last-child { margin-bottom: 0; }

.article-page .source-note {
  margin: 2rem 0 0;
  padding: 17px 18px;
  border-top: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.article-page .checklist {
  list-style: none;
  padding-left: 0;
}

.article-page .checklist li {
  position: relative;
  padding-left: 1.15em;
}

.article-page .checklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--red);
}

.article-page .bracket {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  min-width: 520px;
  margin-bottom: 1rem;
}

.article-page .bracket section {
  padding: 10px 12px;
  background: var(--paper-hi);
}

.article-page .bracket h3 { margin-top: 0; }
.article-page .bracket p { margin-bottom: 0.35rem; }

.article-page .lang-switch {
  margin: 0 0 1rem;
  color: var(--ink-2);
  font-size: 16px;
}

.tablewrap {
  width: 100%;
  margin: 0 0 1.5rem;
  overflow-x: auto;
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--ink-3);
}

th { color: var(--ink); font-weight: 760; }

.article-page .toc {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.article-page .toc li { margin-bottom: 2px; }

.article-page .toc a { text-decoration-color: transparent; }

.cta {
  margin: 2.5rem 0 0;
  padding: 24px;
  border: 1px solid var(--ink-3);
  border-radius: 14px;
  background: var(--paper-hi);
}

.cta p { margin: 0 0 10px; }

.related {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-3);
}

.related h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.related ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related a {
  display: block;
  height: 100%;
  padding: 16px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--paper-hi);
  color: var(--ink);
  text-decoration: none;
}

.related a:hover { border-color: var(--ink-3); color: var(--red); }

.related a span {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 15px;
}

.blog-foot {
  border-top: 1px solid var(--ink-3);
  background: var(--paper-hi);
}

body.board-page .blog-foot {
  background: rgba(231, 220, 198, 0.72);
  border-top: 1px solid rgba(80, 57, 31, 0.2);
}

body.board-page .blog-foot a { color: var(--ink-2); }
body.board-page .blog-foot a:hover { color: var(--red); }

body.board-page .blog-foot-inner {
  justify-content: center;
  max-width: none;
  padding: 20px 24px 32px;
  color: var(--ink-2);
}

.blog-foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0 8px;
  padding: 18px 24px 36px;
  color: var(--ink-2);
  font-size: 16px;
}

.blog-foot a {
  color: var(--ink-2);
  text-decoration: none;
}

.blog-foot a:hover { color: var(--red); }

@media (max-width: 800px) {
  .notes { gap: 22px 18px; }
  .related ul { grid-template-columns: 1fr 1fr; }
  .blog-nav-inner,
  .blog-foot-inner,
  .site-inner { padding-left: 16px; padding-right: 16px; }
  .blog-nav-links {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-end;
    padding-bottom: 8px;
    font-size: 16px;
  }
  .blog-nav-links .hide-sm { display: none; }
  body.board-page .blog-nav-inner { padding: 0 16px; }
  .board-wrap { padding: 22px 14px 28px; }
  .board {
    padding: 42px 26px 50px;
    border-width: 9px;
  }
  .board .dek { margin-bottom: 28px; }
  .article-page { padding-top: 28px; }
}

@media (max-width: 520px) {
  .notes { grid-template-columns: 1fr; }
  .note-copy { min-height: 0; padding: 17px 18px 20px; }
  .note strong { font-size: 1.2rem; }
  .board-wrap { padding: 14px 8px 22px; }
  .board {
    padding: 34px 12px 38px;
    border-width: 7px;
    border-radius: 5px;
  }
  .board h1 { font-size: 2.7rem; }
  .article-page h1 { font-size: 2.55rem; }
  .article-page .site-inner { padding-left: 18px; padding-right: 18px; }
  .article-page .crumbs { overflow-wrap: anywhere; }
  .article-page .hero { margin-left: -18px; margin-right: -18px; }
  .hero img { border-radius: 0; }
  .article-page .answer { padding: 17px 18px; }
  .related ul { grid-template-columns: 1fr; }
  .blog-play { padding: 8px 15px 7px; }
}

@media (hover: hover) and (pointer: fine) {
  .note a:hover {
    border-color: rgba(191, 59, 43, 0.4);
    color: var(--ink);
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(3, 17, 8, 0.34);
  }

  .note a:hover img {
    transform: scale(1.025);
    filter: saturate(1.04) contrast(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .note a,
  .note img,
  .skip-link { transition: none; }
}
