/* Game rule pages and guides (built by pages.py). Tokens match the site's lagoon look (site-blend):
   lagoon base with fine grain, Grandstander headings, foam cards, one coral band. No pills, no glows. */
@font-face { font-family: "Grandstander"; src: url("/fonts/grandstander-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Grandstander Fallback"; src: local("Arial Rounded MT Bold"), local("Arial"); size-adjust: 108%; ascent-override: 90%; descent-override: 28%; line-gap-override: 0%; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Figtree Fallback"; src: local("Arial"); size-adjust: 101%; ascent-override: 95%; descent-override: 25%; line-gap-override: 0%; }

:root {
  --deep: #071416; --deep2: #123033; --night: #040c0d; --pop: #ff6b5b;
  --coral: #ff6b5b; --sun: #ffcf4a; --mint: #6be3c3; --sky: #5cc0ff; --pink: #ff5fae;
  --paper: #f2fbf8; --ink: #0f2226; --ink2: #4a6266;
  --fg: #f2fbf8; --muted: #b3d6d3; --line: rgba(179,214,211,.2); --glass: rgba(242,251,248,.06);
  --display: "Grandstander", "Grandstander Fallback", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1240px; --read: 720px; --gutter: 20px;
  --grain: 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 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --shadow: 0 1px 2px rgba(1,22,25,.35), 0 18px 50px -12px rgba(1,22,25,.55);
  color-scheme: dark;
}
@media (min-width: 700px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: clamp(32px, 4vw, 64px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(1010px 640px at 78% -64px, rgba(255,107,91,.30), transparent 70%), radial-gradient(790px 480px at 0 0, rgba(255,95,174,.12), transparent 70%), var(--deep); color: var(--fg); font-family: var(--body); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.015em; font-weight: 900; line-height: 1.08; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--pop); color: var(--ink); padding: 12px 18px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

/* Header */
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 80px; }
.logo { display: inline-flex; flex: none; line-height: 0; }
.logo img { height: 48px; width: auto; }
@media (min-width: 900px) { .logo img { height: 56px; } }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; color: var(--muted); padding: 10px 0; white-space: nowrap; }
@media (hover: hover) { .nav a:hover { color: var(--fg); } }
@media (max-width: 520px) { .hide-sm { display: none; } .top .wrap { gap: 14px; } }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 24px; border-radius: 16px; border: 0; background: var(--pop); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 18px; text-decoration: none; text-align: center; box-shadow: 0 2px 0 rgba(1,22,25,.25); transition: transform .15s ease; }
.btn:active { transform: scale(.97); }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
.btn.sm { min-height: 44px; padding: 10px 18px; font-size: 16px; white-space: nowrap; }
.btn.ink { background: var(--ink); color: var(--paper); }

/* Article */
.doc { padding-bottom: 72px; }
.doc > .wrap > * { max-width: var(--read); }
.doc > .wrap > .related, .doc > .wrap > .doc-head { max-width: 900px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 12px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: .5; }
.crumbs a { text-decoration: none; font-weight: 600; }
@media (hover: hover) { .crumbs a:hover { text-decoration: underline; } }
.doc-head { display: grid; gap: 18px; padding: clamp(28px, 6vw, 64px) 0 clamp(24px, 4vw, 40px); }
.doc-head h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.4rem); line-height: 1; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--fg); max-width: 60ch; }
.byline { font-size: 14px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 8px 0 0; background: var(--paper); color: var(--ink); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.facts div { padding: 16px 20px; border-bottom: 1px solid rgba(15,34,38,.08); }
.facts dt { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.facts dd { margin: 4px 0 0; font-weight: 700; line-height: 1.3; }
.facts a { color: var(--ink); }

.toc { margin: 8px 0 32px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc p { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 10px 0 0; padding-left: 22px; columns: 2 240px; column-gap: 32px; }
.toc li { padding: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; font-weight: 600; }
@media (hover: hover) { .toc a:hover { text-decoration: underline; text-decoration-color: var(--pop); text-underline-offset: 4px; } }

.prose { display: grid; gap: 18px; }
.prose h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); margin-top: 36px; scroll-margin-top: 20px; }
.prose h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin-top: 14px; scroll-margin-top: 20px; }
.prose p, .prose li { color: #dcefeb; }
.prose strong { color: var(--fg); }
.prose a { color: var(--fg); font-weight: 700; text-decoration-color: var(--pop); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose ul, .prose ol { margin: 0; padding-left: 24px; display: grid; gap: 8px; }
.prose li::marker { color: var(--pop); font-weight: 800; }
.note { background: var(--glass); border-left: 4px solid var(--sun); padding: 14px 18px; border-radius: 0 14px 14px 0; }
.table { overflow-x: auto; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(15,34,38,.08); }
.table thead th { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); background: #e3f3ee; }
.table tbody th { font-family: var(--display); font-weight: 800; white-space: nowrap; }
.table td, .table td strong { color: var(--ink); }
.table a { color: var(--ink); }
.table tr:last-child > * { border-bottom: 0; }
@media (max-width: 560px) { .table table { font-size: 15px; } .table th, .table td { padding: 10px 12px; } .table tbody th { white-space: normal; min-width: 7.5em; } }

/* Coral call to action */
.cta { display: grid; gap: 18px; margin: 40px 0; padding: 26px; border-radius: 24px; background: var(--coral); color: var(--ink); box-shadow: var(--shadow); }
.cta .cta-t { font-family: var(--display); font-weight: 900; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.05; }
.cta p + p { margin-top: 8px; font-weight: 600; }
.cta a:not(.btn) { color: var(--ink); }
.prose .cta p, .prose .cta strong { color: var(--ink); }
@media (min-width: 720px) { .cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 30px 32px; } }

/* Play it safe */
.safe { margin: 40px 0 0; padding: 24px 26px; border-radius: 24px; background: rgba(4,12,13,.7); border: 1px solid var(--line); }
.safe h2 { font-size: 1.5rem; }
.safe ul { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; color: var(--muted); }
.safe strong { color: var(--fg); }
.safe a { color: var(--fg); text-underline-offset: 3px; }

/* Game list as stacked colour bands, like the app */
.bands { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; }
.bands li { margin-top: -16px; }
.bands li:first-child { margin-top: 0; }
.bands a { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; background: var(--bg); color: var(--ink); border-radius: 22px 22px 0 0; padding: 18px 22px 34px; text-decoration: none; box-shadow: 0 -8px 20px -6px rgba(1,22,25,.45); transition: transform .2s ease; }
.bands li:last-child a { border-radius: 22px; padding-bottom: 22px; }
.bands b { font-family: var(--display); font-weight: 900; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); text-transform: uppercase; line-height: 1; letter-spacing: -.01em; }
.bands span { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding-top: 4px; white-space: nowrap; }
@media (hover: hover) { .bands a:hover { transform: translateY(-6px); } }

/* Link cards */
.cards { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards a { display: grid; gap: 6px; height: 100%; padding: 20px 22px; border-radius: 22px; background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease; }
.cards b { font-family: var(--display); font-weight: 900; font-size: 1.25rem; line-height: 1.1; }
.cards span { font-size: 15px; line-height: 1.45; color: var(--ink2); }
@media (hover: hover) { .cards a:hover { transform: translateY(-4px) rotate(-.4deg); } }
.related { margin-top: 48px; display: grid; gap: 18px; }
.related h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); }

/* Footer */
footer { background: var(--night); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
footer .wrap { display: grid; gap: 28px; padding-block: 48px 40px; }
@media (min-width: 760px) { footer .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
footer .logo img { height: 60px; }
footer .tagline { color: var(--muted); margin-top: 12px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer nav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 6px 0; }
@media (hover: hover) { footer nav a:hover { color: var(--fg); } }
footer small { grid-column: 1 / -1; color: rgba(242,251,248,.56); font-size: 13px; padding-top: 20px; border-top: 1px solid var(--line); }
/* Logo and tagline keep their width; the links wrap and sit right */
@media (min-width: 760px) { footer .wrap { grid-template-columns: auto minmax(0, 1fr); } footer nav { justify-content: flex-end; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .top, .cta, footer { display: none; } body { background: #fff; color: #000; } }

/* In the app vs play it yourself. Plain words with a colour mark, no pills. */
.where { display: grid; gap: 14px; padding: 18px 20px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); border-left: 6px solid var(--mint); }
.where.diy { border-left-color: var(--sun); }
.where p { margin: 0; }
.where .where-k { font-family: var(--display); font-weight: 900; font-size: 1.35rem; line-height: 1.1; color: var(--mint); margin-bottom: 4px; }
.where.diy .where-k { color: var(--sun); }
@media (min-width: 640px) { .where.app { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.mark { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; vertical-align: .1em; }
.mark::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: currentColor; vertical-align: .05em; }
.mark.app { color: var(--mint); }
.mark.diy { color: var(--sun); }
.prose .mark { margin-left: 6px; }
.cards .mark { display: block; margin-bottom: 6px; }
.cards .mark.app { color: #0b7a66; }
.cards .mark.diy { color: #9a6a00; }
.group + .group { margin-top: 36px; }
.group-k { font-family: var(--display); font-weight: 900; font-size: 1.4rem; margin: 0; }
.group.app .group-k { color: var(--mint); }
.group.diy .group-k { color: var(--sun); }
.group-n { margin: 2px 0 14px; color: var(--muted); }
.mark.part { color: var(--sky); }
.note .mark { margin: 0 2px; }
.prose .bands, .prose .cards { padding-left: 0; }
