:root {
  color-scheme: dark;
  --ink: #eef8f6;
  --muted: #a9c2c1;
  --night: #081521;
  --deep: #0b1d2c;
  --surface: #102a39;
  --surface-2: #153645;
  --line: #275064;
  --teal: #42d6ce;
  --teal-dark: #163f49;
  --gold: #f0c36a;
  --paper: #f3efe2;
  --paper-ink: #183039;
  --max: 1180px;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font-size: 1rem; line-height: 1.65; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
img { max-width: 100%; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 99; padding: .7rem 1rem; background: var(--paper); color: var(--paper-ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(66,214,206,.16); background: rgba(8,21,33,.9); backdrop-filter: blur(16px); }
.header-inner, .footer-inner { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { border-radius: 8px; box-shadow: 0 0 18px rgba(66,214,206,.2); }
.main-nav { display: flex; gap: 1.4rem; align-items: center; }
.main-nav a { color: var(--muted); font-weight: 650; text-decoration: none; }
.main-nav a:hover { color: var(--teal); }
.main-nav .steam-link { padding: .48rem .82rem; border: 1px solid rgba(66,214,206,.55); border-radius: 999px; color: var(--ink); background: rgba(66,214,206,.09); }
.main-nav .steam-link:hover { border-color: var(--teal); background: rgba(66,214,206,.17); color: var(--teal); }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.12; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.7rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.45rem; }
.kicker, .eyebrow { color: var(--teal); font-size: .76rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }

.home-intro { width: min(var(--max), calc(100% - 40px)); min-height: 630px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); align-items: center; gap: 5vw; padding: 5rem 0; }
.intro-copy { position: relative; z-index: 2; }
.intro-copy h1 em { color: var(--gold); font-weight: 500; }
.lede { max-width: 720px; margin: 1.5rem 0 2rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.intro-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .75rem 1.15rem; border-radius: 999px; font-weight: 800; text-decoration: none; }
.button.primary { background: var(--teal); color: #062027; }
.button.primary:hover { background: #72ece4; }
.button.secondary { border: 1px solid var(--line); color: var(--ink); }
.button.secondary:hover { border-color: var(--teal); }

.game-visual { width: min(520px, 100%); margin: 0; justify-self: end; overflow: hidden; border: 1px solid rgba(66,214,206,.32); border-radius: 22px; background: var(--surface); box-shadow: 0 35px 80px rgba(0,0,0,.3), 0 0 0 7px rgba(66,214,206,.035); }
.game-visual img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; }
.game-visual figcaption { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem .9rem; color: var(--muted); font-size: .78rem; }
.game-visual figcaption a { color: var(--teal); font-weight: 750; text-decoration: none; }
.game-visual figcaption a:hover { color: var(--gold); }

.section-shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 4.5rem 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-heading p { max-width: 500px; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.category-tile { min-height: 240px; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface), rgba(12,33,47,.68)); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.category-tile:hover { transform: translateY(-4px); border-color: var(--teal); }
.category-count { display: grid; width: 52px; aspect-ratio: 1; margin-bottom: 2rem; place-items: center; border: 1px solid rgba(240,195,106,.55); border-radius: 50%; color: var(--gold); font-weight: 850; }
.category-tile p { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.guide-card { min-height: 285px; padding: 1.5rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.guide-card h2, .guide-card h3 { margin: .7rem 0 .9rem; font-size: 1.45rem; }
.guide-card h2 a, .guide-card h3 a { text-decoration: none; }
.guide-card h2 a:hover, .guide-card h3 a:hover { color: var(--gold); }
.guide-card p { color: var(--muted); }
.guide-card .text-link { margin-top: auto; }
.text-link { color: var(--teal); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.featured-section { padding: clamp(1.5rem, 4vw, 3.5rem); border: 1px solid rgba(66,214,206,.28); border-radius: 26px; background: linear-gradient(100deg, rgba(8,21,33,.95) 0%, rgba(8,21,33,.84) 52%, rgba(8,21,33,.78) 100%), url('/isle-of-reveries-rain-1280.webp') center / cover no-repeat; box-shadow: 0 32px 80px rgba(0,0,0,.24); }
.featured-section .guide-card { border-color: rgba(169,194,193,.28); background: rgba(10,29,43,.9); backdrop-filter: blur(8px); }
.featured-section .scene-credit { margin: 1.1rem 0 0; color: rgba(238,248,246,.68); font-size: .76rem; text-align: right; }
.featured-section .scene-credit a { color: var(--teal); font-weight: 750; text-decoration: none; }
.featured-section .scene-credit a:hover { color: var(--gold); }
.method-note { width: min(var(--max), calc(100% - 40px)); margin: 4rem auto 6rem; padding: 2.5rem; display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; border: 1px solid rgba(240,195,106,.42); border-radius: var(--radius); background: linear-gradient(125deg, rgba(240,195,106,.07), rgba(66,214,206,.05)); }
.method-note p { color: var(--muted); }

.listing-page, .article-shell, .not-found { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.listing-page { min-height: 70vh; padding: 2rem 0 6rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .55rem; padding: 1.2rem 0 2rem; color: var(--muted); font-size: .9rem; }
.breadcrumbs a { color: var(--teal); }
.listing-header { max-width: 760px; padding: 3rem 0; }
.listing-header h1 { font-size: clamp(3rem, 7vw, 5rem); }
.listing-header > p:last-child { color: var(--muted); font-size: 1.15rem; }
.filter-links { display: flex; gap: .75rem; margin-bottom: 2rem; }
.filter-links a { padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; }
.filter-links a.active, .filter-links a:hover { border-color: var(--teal); color: var(--ink); }

.article-shell { padding: 1rem 0 7rem; }
.article-layout { max-width: 1040px; margin: 0 auto; }
.article-header { padding: 3.5rem 0 3rem; }
.article-header h1 { max-width: 950px; margin: .7rem 0 1.3rem; font-size: clamp(2.6rem, 6vw, 5.1rem); }
.article-deck { max-width: 760px; color: var(--muted); font-size: 1.2rem; }
.scope-box { max-width: 780px; margin-top: 1.8rem; padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: rgba(240,195,106,.07); }
.scope-box strong { color: var(--gold); }
.scope-box p { margin: .25rem 0 0; color: var(--muted); }
.article-grid { display: grid; grid-template-columns: minmax(0, 720px) 250px; align-items: start; gap: 3rem; }
.article-content { padding: clamp(1.25rem, 4vw, 3.2rem); border-radius: var(--radius); background: var(--paper); color: var(--paper-ink); box-shadow: 0 30px 80px rgba(0,0,0,.22); }
.article-content h2 { margin: 2.4rem 0 1rem; font-size: clamp(1.65rem, 3.5vw, 2.25rem); scroll-margin-top: 100px; }
.article-content h2:first-child { margin-top: 0; }
.article-content p, .article-content li { font-size: 1.035rem; }
.article-content .quick-answer { margin: 0 0 1.8rem; padding: 1rem 1.2rem; border-left: 4px solid var(--teal); background: #e0ece8; font-weight: 650; }
.article-content a { color: #006d71; font-weight: 680; text-underline-offset: 3px; }
.article-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .95rem; }
.article-content th, .article-content td { padding: .8rem; border: 1px solid #b6c7c4; text-align: left; vertical-align: top; }
.article-content th { background: #dfeae6; }
.on-this-page { position: sticky; top: 100px; padding: 1.2rem; border-left: 1px solid var(--line); color: var(--muted); }
.on-this-page > p { color: var(--ink); font-weight: 850; }
.on-this-page ol { margin: 0; padding-left: 1.2rem; }
.on-this-page li { margin: .55rem 0; }
.on-this-page a { color: var(--muted); text-decoration: none; }
.on-this-page a:hover { color: var(--teal); }
.evidence-note { margin-top: 3rem; padding: 1.3rem; border: 1px solid #bdcfc9; border-radius: 12px; background: #e4ece8; }
.evidence-note h2 { margin-top: 0; font-size: 1.55rem; }
.evidence-note p { font-size: .9rem; }
.related-guides { margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid #bdcfc9; }
.related-guides h2 { margin-top: 0; font-size: 1.55rem; }
.related-guides ul { margin: 0; padding-left: 1.2rem; }
.related-guides li + li { margin-top: .6rem; }

.not-found { min-height: 72vh; display: grid; align-content: center; justify-items: start; padding: 4rem 0; }
.not-found h1 { max-width: 760px; }
.not-found > p:not(.kicker) { color: var(--muted); font-size: 1.2rem; }
.site-footer { border-top: 1px solid var(--line); background: #06101a; }
.footer-inner { align-items: flex-start; padding: 2.5rem 0; color: var(--muted); font-size: .9rem; }
.footer-inner p { max-width: 560px; margin: 0; }
.footer-inner strong { color: var(--ink); }
.footer-inner a { color: var(--teal); }

@media (max-width: 880px) {
  .home-intro { grid-template-columns: 1fr; min-height: 0; }
  .game-visual { width: min(520px, 100%); justify-self: center; order: -1; }
  .category-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: 1fr; }
  .on-this-page { position: static; order: -1; border-left: 0; border-bottom: 1px solid var(--line); }
  .method-note { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 620px) {
  .header-inner { width: min(100% - 24px, var(--max)); min-height: 64px; }
  .brand span { display: none; }
  .header-inner { gap: .65rem; }
  .main-nav { gap: .55rem; font-size: .78rem; }
  .main-nav .steam-link { padding: .4rem .58rem; }
  .home-intro, .section-shell, .listing-page, .article-shell, .not-found, .method-note { width: min(100% - 24px, var(--max)); }
  .home-intro { padding: 2rem 0 3rem; }
  .intro-copy h1 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .game-visual { width: 100%; border-radius: 16px; }
  .intro-actions .button { width: 100%; }
  .category-grid, .card-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; gap: .5rem; }
  .guide-card { min-height: 240px; }
  .article-header { padding: 2rem 0; }
  .article-header h1 { font-size: clamp(2.35rem, 12vw, 3.6rem); }
  .article-content { padding: 1.15rem; border-radius: 12px; }
  .article-content table { display: block; overflow-x: auto; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
