/*
 * MMORocks — light theme, ported from AdoptMe.Rocks (DESIGN-BRIEF.md §2-§4), re-keyed to MMORocks green.
 * Brand #66b850 is a fill/decoration colour only (2.46:1 on white); text uses the -ink shades below.
 * Same tokens, same sticker-layer / data-layer split, plain CSS (no build step).
 * Text/background pairs reuse AdoptMe.Rocks' contrast-checked "-ink" variants.
 */
:root {
    --font-sans: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Fredoka', 'Montserrat', ui-sans-serif, system-ui, sans-serif;
    --font-accent: 'Caveat', cursive;

    --page: #faf8f6;
    --card: #ffffff;
    --tint: #f5f1ea;
    --hairline: #e3e1de;
    --wash: #eef7ea;              /* hero band base */
    --washfill: #dcefd4;          /* selection, soft fills */

    --ink: #363636;
    --muted: #5d6374;

    --brand: #66b850;             /* MMORocks green: fills, doodles, dots, borders, favicon */
    --brand-large: #4c8a3c;       /* bold text >=18.66px (4.19:1): the logo */
    --action: #3f7231;            /* links, buttons, focus: 5.7:1 on white */
    --action-hover: #335c28;

    --sun: #f5b331;               /* secondary warm accent (fills, under ink text) */
    --sun-ink: #8a5a00;           /* warm accent as text: 5.9:1 */
    --teal: #0b6e7a;              /* tertiary: guide-type chips, white text 6.0:1 */
    --purple: #773dbd;
    --green: #00b451;
    --green-ink: #00753a;
    --yellow: #fdd756;
    --yellow-ink: #5c4a00;
    --amber-ink: #7d6300;
    --up-tint: #e7f7ee;
    --amber-tint: #fdf5dd;

    --radius-base: 14px;
    --radius-card: 20px;
    --radius-data: 10px;

    --shadow-soft: 0 8px 24px rgba(12, 23, 111, 0.08);
    --shadow-lift: 0 12px 28px rgba(12, 23, 111, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
    overflow-x: hidden;
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--page); color: var(--ink);
    font-family: var(--font-sans); font-size: 1rem; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; margin: 0; }
h1, h2 { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--action); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--washfill); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.narrow > * { max-width: 48rem; }  /* left-aligned like every other section, just a shorter line length */
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: .5rem; top: .5rem; z-index: 60; background: #fff; color: var(--ink); padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--hairline); font-weight: 600; }

/* ---------- Navigation ---------- */
.topnav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.topnav .container { display: flex; align-items: center; gap: .75rem; height: 4rem; }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.logo .a { color: var(--ink); }
.logo .b { color: var(--brand-large); }
.navlinks { display: none; gap: .25rem; margin-left: 1rem; font-size: .875rem; }
@media (min-width: 768px) { .navlinks { display: flex; } }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .75rem; border-radius: var(--radius-base); font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.nav-link:hover { background: rgba(12,23,111,.05); }
.nav-link--active { color: var(--action); border-bottom-color: var(--action); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--hairline); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 768px) { .tabbar { display: none; } }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 2px; font-size: .6875rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--action); }
.tabbar svg { width: 24px; height: 24px; }

/* ---------- Hero band (sticker layer) ---------- */
.hero-band {
    background-color: var(--wash); border-bottom: 1px solid var(--hairline); padding: 2.5rem 0 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%2366b850' stroke-width='2.5' stroke-linecap='round' opacity='0.45'%3E%3Crect x='30' y='26' width='24' height='24' rx='5' transform='rotate(12 42 38)'/%3E%3Cpath d='M186 52c-8-9 3-21 11-13 8-8 19 4 11 13l-11 10z'/%3E%3Cpath d='M120 118l4 9 10 1-7 7 2 10-9-5-9 5 2-10-7-7 10-1z'/%3E%3Ccircle cx='222' cy='170' r='12'/%3E%3Cpath d='M60 190v18M51 199h18'/%3E%3Crect x='148' y='214' width='22' height='22' rx='5' transform='rotate(-10 159 225)'/%3E%3Cpath d='M236 92v12M230 98h12'/%3E%3Cpath d='M24 130c-5-6 2-14 7-9 5-5 12 3 7 9l-7 6z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 260px 260px;
}
.hero-band .lead { font-size: 1.125rem; margin-top: .5rem; max-width: 42rem; }
.accent-script { font-family: var(--font-accent); color: var(--brand-large); font-size: 1.875rem; font-weight: 700; line-height: 1.2; }  /* 3.8:1 on the wash: passes as large bold text */
.trust { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; font-weight: 600; font-size: .9375rem; }
.trust span { display: inline-flex; align-items: center; gap: .375rem; }
.dot { width: .5rem; height: .5rem; border-radius: 9999px; background: var(--brand); display: inline-block; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.card-hover { transition: transform .15s ease-out, box-shadow .15s ease-out, border-color .15s ease-out; }
.card-hover:hover { border-color: var(--brand); }
@media (prefers-reduced-motion: no-preference) { .card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } }
.data-surface { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-data); overflow-x: auto; }

.grid { display: grid; gap: 1rem; }
.grid-games { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.grid-guides { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.game-card { display: flex; gap: .875rem; padding: 1rem; text-decoration: none; color: var(--ink); align-items: center; }
.game-card img, .game-icon { width: 64px; height: 64px; border-radius: var(--radius-base); flex-shrink: 0; background: var(--tint); }
.game-card .name { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; line-height: 1.25; }
.guide-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; text-decoration: none; color: var(--ink); }
.guide-card .title { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; line-height: 1.3; }

.section { padding: 2rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }

/* ---------- Chips & pills ---------- */
.chip { display: inline-flex; align-items: center; gap: .25rem; border-radius: 9999px; border: 2px solid transparent; padding: .125rem .625rem; font-weight: 600; font-size: .8125rem; line-height: 1.35; box-shadow: 0 2px 0 rgba(12,23,111,.10); white-space: nowrap; }
.chip--sky { background: var(--teal); color: #fff; border-color: #07525b; }
.chip--green { background: #00753a; color: #fff; border-color: #005229; }
.chip--yellow { background: var(--yellow); color: var(--yellow-ink); border-color: #e7ba15; }
.chip--purple { background: var(--purple); color: #fff; border-color: #5b2e93; }
.chip--neutral { background: var(--tint); color: var(--ink); border-color: var(--hairline); }
.chip--draft { background: var(--amber-tint); color: var(--amber-ink); border-color: #f0dc9a; }
.freshness-pill { display: inline-flex; align-items: center; gap: .375rem; border-radius: 9999px; background: var(--up-tint); border: 1px solid #b9e6cb; color: var(--green-ink); font-weight: 600; font-size: .875rem; padding: .25rem .75rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: var(--radius-base); font-weight: 600; min-height: 44px; padding: .5rem 1.25rem; text-decoration: none; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); }
.btn-quiet { background: var(--card); color: var(--ink); border: 2px solid var(--hairline); }
.btn-quiet:hover { background: rgba(12,23,111,.04); }

/* ---------- Game hub ---------- */
.game-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.game-head .game-icon { width: 96px; height: 96px; border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin-top: 1.25rem; }
.stat { padding: .875rem 1rem; }
.stat .num { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.375rem; }
.stat .lbl { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.thumbs img { border-radius: var(--radius-base); border: 1px solid var(--hairline); aspect-ratio: 16/9; object-fit: cover; width: 100%; }

/* ---------- Data tables (data layer) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: .9375rem; }
table.data th { text-align: left; font-size: .8125rem; text-transform: none; color: var(--muted); font-weight: 600; padding: .625rem .875rem; border-bottom: 1px solid var(--hairline); background: var(--tint); }
table.data td { padding: .625rem .875rem; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .item { display: flex; align-items: center; gap: .625rem; font-weight: 600; }
table.data .item img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: var(--tint); }

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 2rem 0 3rem; }
@media (min-width: 1024px) { .article-layout { grid-template-columns: minmax(0, 1fr) 18rem; } }
.prose { font-size: 1.0625rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.25rem; scroll-margin-top: 5.5rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li + li { margin-top: .375rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { border-left: 4px solid var(--action); margin-left: 0; padding-left: 1rem; color: var(--muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border-bottom: 1px solid var(--hairline); padding: .5rem; text-align: left; }
.prose strong { font-weight: 700; }
.toc { padding: 1.25rem; position: sticky; top: 5.5rem; }
.toc ol { margin: .5rem 0 0; padding-left: 1.25rem; font-size: .9375rem; }
.toc li + li { margin-top: .375rem; }
.faq details { padding: 1rem 1.25rem; }
.faq details + details { margin-top: .75rem; }
.faq summary { font-weight: 600; cursor: pointer; min-height: 28px; }
.faq summary + p { margin-top: .5rem; }
.breadcrumbs { font-size: .875rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .875rem; }

/* ---------- Footer ---------- */
footer.site { background: var(--tint); border-top: 1px solid var(--hairline); margin-top: auto; padding: 2rem 0 calc(5rem + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { footer.site { padding-bottom: 2rem; } }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-cols h3 { font-family: var(--font-sans); font-size: .875rem; margin-bottom: .5rem; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.footer-cols a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.footer-cols a:hover { color: var(--action); }
.footer-legal { border-top: 1px solid var(--hairline); padding-top: 1rem; text-align: center; font-size: .875rem; color: var(--muted); }

/* In-game screenshots in guides (cropped, names blurred by Playbot) */
.prose figure.shot { margin: 1.5rem 0; }
.prose figure.shot img { margin: 0 auto; max-height: 34rem; width: auto; border-radius: var(--radius-base); border: 1px solid var(--hairline); box-shadow: var(--shadow-soft); background: var(--tint); }
.prose figure.shot figcaption { text-align: center; font-size: .875rem; color: var(--muted); margin-top: .5rem; }

/* Cookie choice: Accept and Reject carry equal weight (UK Children's Code); above the mobile tab bar */
.consent { position: fixed; inset-inline: 0; z-index: 55; bottom: calc(3.5rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--hairline); box-shadow: var(--shadow-soft); padding: 1rem 0; }
@media (min-width: 768px) { .consent { bottom: 0; } }
.consent[hidden] { display: none; }
.consent-inner { display: flex; flex-direction: column; gap: .75rem; align-items: center; }
@media (min-width: 640px) { .consent-inner { flex-direction: row; justify-content: space-between; } }
.consent-buttons { display: flex; gap: .75rem; flex-shrink: 0; }
.consent-buttons .btn { width: 7rem; }
