/* ==========================================================================
   Underwater Arcade Games — Core stylesheet
   Design system: deep-ocean gradients, bioluminescent accents, high contrast
   Author: site editorial team
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Ocean depth scale — darkest at the bottom, like real water columns */
  --abyss:        #030d1a;
  --deep:         #06182e;
  --midwater:     #0a2540;
  --shelf:        #0f3355;
  --surface:      #14456f;

  /* Bioluminescent accents */
  --glow:         #35e0d0;   /* primary — teal plankton glow */
  --glow-soft:    #7ef2e6;
  --coral:        #ff7a59;   /* secondary — warm coral, used sparingly */
  --sand:         #ffd48a;   /* tertiary — treasure / highlight */
  --kelp:         #4fd18b;   /* success */

  /* Text */
  --ink:          #eef7fb;
  --ink-muted:    #a9c2d4;
  --ink-dim:      #7d9ab0;

  /* Surfaces */
  --card:         #0b2036;
  --card-hi:      #103050;
  --line:         #1c4064;
  --line-soft:    #16334f;

  /* Typography */
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* Rhythm */
  --step--1: 0.875rem;
  --step-0:  1rem;
  --step-1:  1.2rem;
  --step-2:  1.45rem;
  --step-3:  1.8rem;
  --step-4:  2.25rem;
  --step-5:  2.9rem;

  --space-1: 0.35rem;
  --space-2: 0.7rem;
  --space-3: 1.1rem;
  --space-4: 1.7rem;
  --space-5: 2.6rem;
  --space-6: 4rem;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-1: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-2: 0 10px 34px rgba(0, 0, 0, .45);
  --ring:     0 0 0 3px rgba(53, 224, 208, .45);

  --wrap: 1180px;
  --wrap-narrow: 760px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* The [hidden] attribute must beat component display rules. Without this,
   `display: flex` on .card and .game-hud silently overrides the browser
   default of display:none, and JS that sets el.hidden = true does nothing. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--abyss);
  /* Static gradient instead of an animated background: no paint cost after load */
  background-image:
    radial-gradient(1200px 620px at 50% -180px, #123a5e 0%, rgba(18, 58, 94, 0) 70%),
    linear-gradient(180deg, #051426 0%, #030d1a 55%, #020913 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.22;
  margin: 0 0 var(--space-3);
  color: #fff;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); margin-top: var(--space-5); }
h3 { font-size: var(--step-2); margin-top: var(--space-4); }
h4 { font-size: var(--step-1); margin-top: var(--space-3); }

p { margin: 0 0 var(--space-3); }

a {
  color: var(--glow-soft);
  text-decoration-color: rgba(126, 242, 230, .4);
  text-underline-offset: 3px;
}
a:hover { color: #fff; text-decoration-color: currentColor; }

:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 2px;
  border-radius: 4px;
}

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }

ul, ol { padding-left: 1.3em; margin: 0 0 var(--space-3); }
li { margin-bottom: .45em; }

code, kbd {
  font-family: var(--font-mono);
  font-size: .9em;
}
kbd {
  background: var(--card-hi);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .12em .45em;
  color: var(--ink);
  white-space: nowrap;
}
code {
  background: rgba(53, 224, 208, .1);
  padding: .1em .35em;
  border-radius: 4px;
  color: var(--glow-soft);
}

blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--glow);
  background: rgba(53, 224, 208, .06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}
blockquote p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--step--1);
}
th, td {
  border: 1px solid var(--line);
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--card-hi); color: #fff; font-family: var(--font-head); }

/* Wide content must scroll inside itself, never the page body */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--space-5); }
.section-tight { padding-block: var(--space-4); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.section-head h2 { margin: 0; font-size: var(--step-3); }
.section-head .section-link {
  font-size: var(--step--1);
  font-family: var(--font-head);
  white-space: nowrap;
}
.section-sub {
  color: var(--ink-muted);
  margin: calc(var(--space-2) * -1) 0 var(--space-4);
  max-width: 68ch;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--glow);
  color: #032027;
  padding: .7rem 1.1rem;
  z-index: 200;
  font-family: var(--font-head);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 13, 26, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-size: 1.06rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand:hover { color: var(--glow-soft); }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.brand-name strong { display: block; line-height: 1.05; letter-spacing: -.02em; }
.brand-name span {
  display: block;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--glow);
  font-family: var(--font-body);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--card-hi);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--glow); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: .5rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-family: var(--font-head);
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: #fff; background: var(--card-hi); }
.site-nav a[aria-current="page"] {
  color: var(--glow);
  background: rgba(53, 224, 208, .1);
}

/* The drawer carries its own search field for mobile, where .header-search is
   hidden. On desktop the header field is used instead, so hide this one. */
.site-nav .nav-search { display: none; }

.header-search {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.header-search form { display: flex; gap: .3rem; }
.header-search input {
  width: 150px;
  background: var(--deep);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: .48rem .7rem;
  font: inherit;
  font-size: .88rem;
}
.header-search input::placeholder { color: var(--ink-dim); }
.header-search input:focus { border-color: var(--glow); outline: none; box-shadow: var(--ring); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .65rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: .97rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--glow) 0%, #23b7c9 100%);
  color: #02222a;
  box-shadow: 0 6px 20px rgba(53, 224, 208, .22);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--glow-soft) 0%, var(--glow) 100%); color: #02222a; }

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--glow); color: #fff; background: rgba(53, 224, 208, .08); }

.btn-coral {
  background: linear-gradient(135deg, var(--coral) 0%, #e2543a 100%);
  color: #2a0d05;
}
.btn-coral:hover { color: #2a0d05; filter: brightness(1.08); }

.btn-sm { min-height: 38px; padding: .4rem .9rem; font-size: .87rem; }
.btn-block { display: flex; width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--line-soft);
}
.hero::before {
  /* Light-ray wash — a single static gradient, no animation */
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 130%;
  background:
    linear-gradient(105deg, rgba(126, 242, 230, .10) 0 3%, transparent 3% 12%),
    linear-gradient(98deg, rgba(126, 242, 230, .07) 0 2%, transparent 2% 20%),
    linear-gradient(112deg, rgba(126, 242, 230, .05) 0 4%, transparent 4% 26%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--space-5);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .74rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--glow);
  font-family: var(--font-head);
  margin-bottom: var(--space-2);
  padding: .3rem .8rem;
  border: 1px solid rgba(53, 224, 208, .3);
  border-radius: 999px;
  background: rgba(53, 224, 208, .07);
}

.hero h1 { margin-bottom: var(--space-3); }
.hero-sub {
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 56ch;
  margin-bottom: var(--space-4);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-soft);
}
.hero-stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: var(--step-2);
  color: var(--glow);
  line-height: 1.1;
}
.hero-stat span { font-size: .82rem; color: var(--ink-dim); }

.hero-art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  background: var(--deep);
}

/* --------------------------------------------------------------------------
   7. Cards & grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  border-color: var(--glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}

/* --- Game card ---------------------------------------------------------- */
.game-card { position: relative; }

.game-card .thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--midwater);
  overflow: hidden;
}
.game-card .thumb-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.game-card:hover .thumb-link img { transform: scale(1.04); }

.game-card .badge-row {
  position: absolute;
  top: .55rem; left: .55rem;
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  max-width: calc(100% - 4rem);
}

.badge {
  font-size: .68rem;
  font-family: var(--font-head);
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: rgba(3, 13, 26, .82);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  white-space: nowrap;
}
.badge-cat { color: var(--glow); border-color: rgba(53, 224, 208, .4); }
.badge-new { color: var(--sand); border-color: rgba(255, 212, 138, .45); }
.badge-featured { color: var(--coral); border-color: rgba(255, 122, 89, .45); }

.game-card .card-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-2);
}
.game-card h3 {
  margin: 0;
  font-size: var(--step-1);
}
.game-card h3 a { color: #fff; text-decoration: none; }
.game-card h3 a:hover { color: var(--glow-soft); }
.game-card p {
  margin: 0;
  font-size: .89rem;
  color: var(--ink-muted);
  flex: 1;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .9rem;
  font-size: .78rem;
  color: var(--ink-dim);
}
.meta-row span { display: inline-flex; align-items: center; gap: .3rem; }
.meta-row svg { width: 14px; height: 14px; opacity: .8; flex-shrink: 0; }

.card-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.card-actions .btn { flex: 1; }

/* Favorite toggle */
.fav-btn {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-hi);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.fav-btn:hover { color: var(--coral); border-color: var(--coral); }
.fav-btn svg { width: 19px; height: 19px; }
.fav-btn[aria-pressed="true"] { color: var(--coral); border-color: var(--coral); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

/* Corner favourite button used on thumbnails */
.fav-corner {
  position: absolute;
  top: .5rem; right: .5rem;
  z-index: 2;
  background: rgba(3, 13, 26, .78);
}

/* --- Post card (articles / guides) -------------------------------------- */
.post-card .card-body { padding: var(--space-3); }
.post-card h3 { font-size: var(--step-1); margin: 0 0 var(--space-2); }
.post-card h3 a { color: #fff; text-decoration: none; }
.post-card h3 a:hover { color: var(--glow-soft); }
.post-card p { font-size: .89rem; color: var(--ink-muted); margin: 0 0 var(--space-2); }
.post-card .post-meta {
  font-size: .76rem;
  color: var(--ink-dim);
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .7rem;
}
.post-card .kicker {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--glow);
  font-family: var(--font-head);
  margin-bottom: .45rem;
}

/* --- Category tile ------------------------------------------------------ */
.cat-tile {
  display: block;
  padding: var(--space-4);
  background: linear-gradient(160deg, var(--card-hi) 0%, var(--card) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.cat-tile:hover { border-color: var(--glow); transform: translateY(-3px); }
.cat-tile .cat-icon {
  width: 42px; height: 42px;
  color: var(--glow);
  margin-bottom: var(--space-2);
}
.cat-tile h3 { font-size: var(--step-1); margin: 0 0 .4rem; color: #fff; }
.cat-tile p { font-size: .87rem; color: var(--ink-muted); margin: 0 0 .6rem; }
.cat-tile .cat-count { font-size: .76rem; color: var(--glow); font-family: var(--font-head); }

/* --------------------------------------------------------------------------
   8. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  padding-block: var(--space-3) 0;
  font-size: .82rem;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .5rem;
  margin: 0;
  padding: 0;
  color: var(--ink-dim);
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: .5rem; }
.breadcrumbs li + li::before {
  content: "›";
  color: var(--line);
}
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--glow-soft); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* --------------------------------------------------------------------------
   9. Article / prose layout
   -------------------------------------------------------------------------- */
.page-head { padding-block: var(--space-4) var(--space-3); }
.page-head h1 { margin-bottom: var(--space-2); }
.page-head .lede {
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 68ch;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-5);
  align-items: start;
  padding-bottom: var(--space-6);
}

.prose { max-width: 72ch; font-size: 1.03rem; }
.prose h2 {
  margin-top: var(--space-5);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 80px;
}
.prose h3 { scroll-margin-top: 80px; }
.prose > ul, .prose > ol { margin-bottom: var(--space-4); }
.prose img { border-radius: var(--radius); margin-block: var(--space-4); }
.prose figure { margin: var(--space-4) 0; }
.prose figcaption {
  font-size: .82rem;
  color: var(--ink-dim);
  margin-top: .5rem;
  text-align: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .9rem;
  font-size: .84rem;
  color: var(--ink-dim);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}
.article-meta a { color: var(--ink-muted); }
.article-meta .dot { color: var(--line); }

/* Table of contents */
.toc {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--glow);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.toc h2 {
  font-size: .78rem !important;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 var(--space-2) !important;
  padding: 0 !important;
  border: 0 !important;
}
.toc ol { margin: 0; padding-left: 1.2em; font-size: .93rem; }
.toc li { margin-bottom: .3em; }
.toc a { color: var(--ink-muted); text-decoration: none; }
.toc a:hover { color: var(--glow-soft); text-decoration: underline; }

/* Key takeaways */
.takeaways {
  background: linear-gradient(160deg, rgba(53, 224, 208, .1), rgba(53, 224, 208, .03));
  border: 1px solid rgba(53, 224, 208, .3);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
}
.takeaways h2, .takeaways h3 {
  margin: 0 0 var(--space-2) !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: var(--step-1) !important;
  color: var(--glow-soft);
}
.takeaways ul { margin-bottom: 0; }

/* Callouts */
.callout {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin: var(--space-4) 0;
  background: var(--card);
  font-size: .95rem;
}
.callout strong:first-child { color: var(--glow-soft); }
.callout-fact { border-left: 4px solid var(--sand); }
.callout-fact strong:first-child { color: var(--sand); }
.callout-fiction { border-left: 4px solid var(--coral); }
.callout-fiction strong:first-child { color: var(--coral); }

/* Reference list */
.references { font-size: .88rem; color: var(--ink-muted); }
.references ol { padding-left: 1.4em; }

/* Author box */
.author-box {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin: var(--space-5) 0 var(--space-4);
}
.author-box img {
  width: 72px; height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--glow);
  background: var(--midwater);
}
.author-box h3 { margin: 0 0 .15rem; font-size: var(--step-1); }
.author-box .author-role {
  font-size: .8rem;
  color: var(--glow);
  font-family: var(--font-head);
  margin-bottom: .5rem;
}
.author-box p { font-size: .88rem; color: var(--ink-muted); margin: 0 0 .5rem; }

/* Sidebar */
.sidebar { position: sticky; top: 84px; display: grid; gap: var(--space-3); }
.widget {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.widget h2, .widget h3 {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 var(--space-2);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { margin-bottom: .55rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line-soft); }
.widget li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.widget a { color: var(--ink); text-decoration: none; font-size: .9rem; }
.widget a:hover { color: var(--glow-soft); }
.widget .widget-note { font-size: .78rem; color: var(--ink-dim); margin: 0; }

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq-list { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: var(--space-3);
  font-family: var(--font-head);
  font-size: 1.02rem;
  color: #fff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--glow);
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover { background: var(--card-hi); }
.faq-item .faq-answer { padding: 0 var(--space-3) var(--space-3); color: var(--ink-muted); }
.faq-item .faq-answer > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   11. Ad slots (placeholders — no ad code is loaded)
   -------------------------------------------------------------------------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-4) auto;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 37, 64, .35);
  color: var(--ink-dim);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  /* Reserved height prevents layout shift when a unit later fills the slot */
  min-height: 100px;
  width: 100%;
}
.ad-slot::before { content: "Advertisement"; }
.ad-top { min-height: 100px; max-width: 970px; }
.ad-content { min-height: 250px; }
.ad-sidebar { min-height: 600px; }
.ad-game-bottom { min-height: 250px; }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-6);
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(6, 24, 46, .6), rgba(2, 9, 19, 1));
  padding-block: var(--space-5) var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(130px, 1fr));
  gap: var(--space-4);
}
.footer-brand p {
  font-size: .87rem;
  color: var(--ink-muted);
  max-width: 40ch;
}
.footer-col h2 {
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 var(--space-2);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { font-size: .87rem; color: var(--ink-muted); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: .8rem;
  color: var(--ink-dim);
}
.footer-bottom p { margin: 0; }

/* --------------------------------------------------------------------------
   13. Misc components
   -------------------------------------------------------------------------- */
.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--sand);
  background: rgba(255, 212, 138, .07);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin: var(--space-3) 0;
  font-size: .92rem;
}
.notice > :last-child { margin-bottom: 0; }

.empty-state {
  text-align: center;
  padding: var(--space-5) var(--space-3);
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state h3 { color: var(--ink); }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tag-list li { margin: 0; }
.tag-list a, .tag {
  display: inline-block;
  font-size: .78rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: var(--card-hi);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  text-decoration: none;
}
.tag-list a:hover { border-color: var(--glow); color: var(--glow-soft); }

/* Simple contact / search form styling */
.form-field { margin-bottom: var(--space-3); }
.form-field label {
  display: block;
  font-family: var(--font-head);
  font-size: .88rem;
  margin-bottom: .35rem;
  color: var(--ink);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
  font: inherit;
  min-height: 46px;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--glow);
  outline: none;
  box-shadow: var(--ring);
}
.form-hint { font-size: .8rem; color: var(--ink-dim); margin-top: .3rem; }

/* Two-column text block used on About / policy pages */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.stat-strip div {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  text-align: center;
}
.stat-strip strong {
  display: block;
  font-family: var(--font-head);
  font-size: var(--step-3);
  color: var(--glow);
  line-height: 1.1;
}
.stat-strip span { font-size: .82rem; color: var(--ink-dim); }

/* Sitemap page columns */
.sitemap-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}
.sitemap-cols h2 { margin-top: 0; font-size: var(--step-1); }
.sitemap-cols ul { list-style: none; padding: 0; }
.sitemap-cols li { margin-bottom: .35rem; }
.sitemap-cols a { font-size: .9rem; }
