/* Epic Table Games — theme.
   Rob's palettes ONLY (eight colours, no others):
   Light: #F5F5F5 bg, #48CFCB accent, #229799 dark accent, #424242 text.
   Dark:  #000000 bg, #222222 surface, #1DCD9F accent, #169976 dark accent.
   Light text on dark is #F5F5F5; dark text on light is #424242.
   Shadows/backdrops are neutral black/white transparency only, not palette colours. */
:root{
  --bg:#F5F5F5; --surface:#F5F5F5; --text:#424242; --muted:#229799;
  --line:#48CFCB; --accent:#229799; --on-accent:#F5F5F5; --on-banner:#F5F5F5;
  --banner-a:#48CFCB; --banner-b:#229799;
  --shadow:rgba(66,66,66,.22); --logo-filter:none;
  box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#000000; --surface:#222222; --text:#F5F5F5; --muted:#1DCD9F;
    --line:#169976; --accent:#1DCD9F; --on-accent:#000000; --on-banner:#F5F5F5;
    --banner-a:#169976; --banner-b:#000000;
    --shadow:rgba(0,0,0,.5); --logo-filter:none;
  }
}
:root[data-theme="dark"]{
  --bg:#000000; --surface:#222222; --text:#F5F5F5; --muted:#1DCD9F;
  --line:#169976; --accent:#1DCD9F; --on-accent:#000000; --on-banner:#F5F5F5;
  --banner-a:#169976; --banner-b:#000000;
  --shadow:rgba(0,0,0,.5); --logo-filter:none;
}
/* v1.12.6: dark-theme edge treatment (Rob, 2026-11-30). A black
   shadow cannot be seen on Epic's pure-black dark background
   (#000000), so the sticky header and the banner get a subtle 1px
   light hairline on their bottom edge in dark mode only, and the
   existing shadow stays in place. Light mode is untouched: the
   0.22-alpha shadow reads fine on light backgrounds. The hairline
   uses the dark theme's light text colour (#F5F5F5) at low alpha —
   no new palette colour, no --bg/--surface change. It applies in
   both dark mechanisms (system preference and the manual toggle)
   and on every page, home and inner alike. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) header,:root:not([data-theme="light"]) .banner{border-bottom:1px solid rgba(245,245,245,.14)}
}
:root[data-theme="dark"] header,:root[data-theme="dark"] .banner{border-bottom:1px solid rgba(245,245,245,.14)}
html{scroll-padding-top:calc(72px + env(safe-area-inset-top,0px))}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.55 "Helvetica Neue",Arial,sans-serif}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);background:var(--bg);z-index:30}
.wrap{max-width:1080px;margin:0 auto;padding:0 20px}

/* header */
header{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;height:72px;background:var(--bg);box-shadow:0 2px 8px var(--shadow)}
header .wrap{height:100%;display:flex;align-items:center;gap:20px}
.brand{display:flex;align-items:center;gap:10px;margin-right:auto;color:var(--text);text-decoration:none;font-weight:800;letter-spacing:.02em}
.brand img{height:54px;width:auto;display:block;filter:var(--logo-filter)}
/* Logo theme swap: two real files, not a CSS filter. Light mode shows
   the #229799 accent logo, dark mode the white logo. */
.brand img.logo-dark{display:none}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .brand img.logo-dark{display:block}
  :root:not([data-theme="light"]) .brand img.logo-light{display:none}
}
:root[data-theme="dark"] .brand img.logo-dark{display:block}
:root[data-theme="dark"] .brand img.logo-light{display:none}
.brand-name{font-size:1.1rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}
nav ul{display:flex;gap:28px;list-style:none;margin:0;padding:0}
nav a{display:inline-flex;align-items:center;gap:8px;color:var(--text);text-decoration:none;font-weight:800;font-size:15px;text-transform:uppercase;padding:6px 0;border-bottom:3px solid transparent}
.i{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
nav a:hover,nav a[aria-current]{border-color:var(--accent)}
.menu-btn{display:none;background:none;border:2px solid var(--text);color:var(--text);border-radius:8px;width:44px;height:44px;font-size:20px;cursor:pointer}
.switch{position:relative;width:58px;height:32px;border-radius:16px;border:0;background:var(--line);cursor:pointer;flex:none;padding:0}
.knob{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;transition:transform .2s,background .2s}
.knob .i{width:16px;height:16px}
.knob .moon{display:none}
.switch[aria-checked="true"] .knob{transform:translateX(26px);background:#F5F5F5;color:#424242}
.switch[aria-checked="true"] .bulb{display:none}
.switch[aria-checked="true"] .moon{display:block}
a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* banner */
/* v1.12.0 Phase 4: no scrim over the banner image. In CSS background
   shorthand the first layer is on top, so the image layer comes
   FIRST and the bottom-to-top gradient SECOND (behind it), where it
   acts only as a fallback/backdrop. The headline and text stay
   rendered over the banner; a subtle text shadow keeps them legible. */
.banner{position:relative;z-index:1;box-shadow:0 10px 20px -8px var(--shadow);display:grid;place-items:center;text-align:center;min-height:clamp(220px,28vw,360px);padding:40px 20px;color:var(--on-banner);
  background:linear-gradient(135deg,var(--banner-a),var(--banner-b))}
.banner.banner-img{background:var(--banner-image) center/cover,linear-gradient(to top,rgba(0,0,0,.45),rgba(0,0,0,0))}
/* v1.11.4: home hero slideshow. Slides are stacked <img> elements;
   the active one fades in over ~1s while its Ken Burns zoom runs
   1.0 -> 1.05 over the ~7s hold (site.js advances .is-active).
   The headline and text sit above the slides, static. No arrows or
   dots. v1.12.0 Phase 4: the gradient sits BEHIND the slides as a
   backdrop (background layers are always behind content), never over
   them — the old ::after scrim on top of the slides is gone. */
.banner-slideshow{background:linear-gradient(to top,rgba(0,0,0,.45),rgba(0,0,0,0)),linear-gradient(135deg,var(--banner-a),var(--banner-b));overflow:hidden}
.banner-slideshow .hero-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transform:scale(1);transition:opacity 1s ease,transform 7s ease}
.banner-slideshow .hero-slide.is-active{opacity:1;transform:scale(1.05)}
.banner-slideshow .hero-content{position:relative;z-index:2}
/* v1.12.6: the hero banner text is left-aligned on EVERY page (Rob,
   inner pages included): the headline and the text below it sit left,
   on the slideshow hero and on the single-image banner alike. Both
   banner content wrappers carry the shared .banner-content class
   (the slideshow .hero-content and the static banner's inner <div>),
   so one rule covers home and inner pages identically. The old
   v1.12.3 :has scoping only matched home, because only home
   has a real <h1> (inner pages use div.h1) — that scoping was the
   bug. The content box is 1040px wide so its left edge lines up with
   .wrap (1080px including its 20px padding), and the hero paragraph
   keeps its 36rem measure but loses the auto margins that centred
   it. The .banner base rule above still centers by default;
   .banner-content overrides it. */
.banner .banner-content{justify-self:center;width:100%;max-width:1040px;text-align:left}
.banner .banner-content p{margin-left:0;margin-right:0}
@media (prefers-reduced-motion: reduce){
  .banner-slideshow .hero-slide{transition:none;transform:none}
  .banner-slideshow .hero-slide.is-active{transform:none}
}
.visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.banner h1{margin:0 0 10px;font-size:clamp(1.8rem,4.5vw,3rem);line-height:1.1;font-weight:800;text-shadow:0 1px 6px rgba(0,0,0,.35)}
.banner p{margin:0 auto;max-width:36rem;font-size:clamp(1rem,2vw,1.2rem);text-shadow:0 1px 6px rgba(0,0,0,.35)}

/* sections */
section{padding:44px 0 8px}
h2{margin:0 0 10px;font-size:1.5rem;text-transform:uppercase;font-weight:800;letter-spacing:.01em}
.rule{height:4px;border-radius:2px;background:var(--line);margin-bottom:24px}
.section-banner{height:200px;border-radius:4px;background-size:cover;background-position:center;box-shadow:0 8px 24px var(--shadow);margin-bottom:24px}
.sq-banner{background-image:url(../images/sidequests-banner.webp)}
.nl-banner{background-image:url(../images/newsletter-banner.webp)}
.sidequest p{max-width:62ch}
.sidequest .sq-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:start}
.sidequest .sq-text{min-width:0}
.sidequest .sq-player{min-width:0}
.sidequest .sq-player iframe{width:100%;border:0;border-radius:4px}
@media (max-width:760px){.sidequest .sq-grid{grid-template-columns:1fr}}
/* v1.13.7: Cobey article index. v1.13.6 shipped the 27 titles as
   default-blue underlined bullets; the section now reads as an
   article index in the Epic idiom: no bullets, teal links from
   var(--accent), dates in the muted .date style, and a thin
   var(--line) divider between rows. Twenty-seven full cards would
   triple the section height and fight the books grid, so the
   divider is the lighter treatment that still belongs with it. */
.cobey-list{margin:0 0 1em;padding:0;list-style:none;columns:3;column-gap:32px}
.cobey-list li{margin:0;padding:14px 0 12px;border-bottom:1px solid var(--line);break-inside:avoid;line-height:1.35}
.cobey-list a{color:var(--accent);text-decoration:none;font-weight:700}
.cobey-list a:hover{text-decoration:underline}
.cobey-list .cobey-title{font-weight:700}
.cobey-list .date{display:block;margin:2px 0 0;color:var(--muted);font-size:.9rem}
@media (max-width:760px){.cobey-list{columns:1}}

/* carousel */
.carousel{position:relative}
.track{display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:8px;scrollbar-width:none;padding:4px 8px 24px;margin:0 -8px}
.track::-webkit-scrollbar{display:none}
.card{flex:0 0 calc((100% - 24px)/2);scroll-snap-align:start;display:grid;grid-template-columns:150px 1fr;grid-template-rows:1fr auto;gap:20px;background:var(--surface);border:2px solid var(--line);padding:18px;border-radius:6px;box-shadow:0 4px 14px var(--shadow)}
.cover{aspect-ratio:2/3;background:var(--line);border-radius:3px;display:grid;place-items:center;color:var(--text);font-size:13px;font-weight:700;text-align:center;padding:8px}
img.cover{display:block;width:100%;height:auto;object-fit:cover;padding:0}
.card h3{margin:0;font-size:1.4rem;line-height:1.2;font-weight:800}
.date{margin:4px 0 12px;color:var(--muted);font-size:.9rem}
.card p.syn{margin:0;font-size:1rem}
.btn{grid-column:1/-1;display:block;text-align:center;text-decoration:none;font-weight:800;font-size:1rem;padding:12px 16px;border-radius:4px;background:var(--accent);color:var(--on-accent);border:0;cursor:pointer}
.btn:hover{filter:brightness(1.08)}
.arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:44px;height:44px;border-radius:50%;border:0;background:var(--text);color:var(--bg);font-size:22px;cursor:pointer;box-shadow:0 2px 8px var(--shadow)}
.arrow[disabled]{opacity:.3;cursor:default}
.prev{left:-22px}.next{right:-22px}
.carousel.fits .arrow{display:none}

/* email */
.signup{padding:44px 0 64px}
.signup form{display:grid;gap:12px}
.signup input{font:inherit;padding:13px 14px;border-radius:4px;border:2px solid var(--line);background:var(--bg);color:var(--text)}
/* The email input sits inside .form__entry (a wrapper Brevo's script
   needs around the field). A bare <input> has a browser default width
   of ~20 characters, so without this it renders dinky while the button
   (a direct grid child) stretches full width. */
.signup .form__entry{min-width:0}
.signup .form__entry input{width:100%}
.signup p{margin:0 0 14px;color:var(--muted)}
.note{min-height:1.5em;font-size:.9rem;color:var(--muted)}

.compact .track{gap:16px}
.compact .card{flex-basis:calc((100% - 48px)/4);grid-template-columns:72px 1fr;gap:10px;padding:10px}
.compact .card h3{font-size:1rem}
.compact .date{font-size:.78rem;margin:2px 0 6px}
.compact .card p.syn{font-size:.82rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.compact .btn{font-size:.82rem;padding:8px 10px}
#field{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
footer{border-top:4px solid var(--line);padding:24px 0 32px;text-align:center;color:var(--muted);font-size:.9rem}
footer a{color:var(--text)}
.brand-i{width:28px;height:28px;fill:currentColor}
.social{display:flex;justify-content:center;gap:16px;margin-bottom:14px}
.social a{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--text);transition:color .15s,transform .15s}
.social a:hover{color:var(--accent);transform:translateY(-2px)}
.signup .follow{margin:18px 0 0}
.signup .follow a{color:var(--text)}

/* newsletter: Brevo form, stripped to the essentials. Brevo's own
   stylesheet is NOT loaded, so these rules are the only styling the
   success/error panels, the loader, the honeypot and the field-error
   line get. Palette only; success and error differ by border (accent
   vs line) and copy, not by Brevo's green/red. Brevo's script toggles
   .sib-form-message-panel--active and sets the panel text from the
   server's reply; it shows .sib-loader (inline style) while submitting. */
.sib-form-message-panel{display:none;margin:0 0 14px;padding:14px 16px;border-radius:4px;background:var(--surface);border:2px solid var(--accent);color:var(--text)}
#success-message{border-color:var(--accent)}
#error-message{border-width:3px;border-color:var(--line)}
.sib-form-message-panel--active{display:block}
.sib-loader{display:none;width:26px;height:26px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.signup input.input--hidden{display:none;border:0;padding:0}
.signup .entry__error{display:none;margin-top:8px;font-size:.9rem;color:var(--text)}
.signup .form__entry.entry_errored input{border-color:var(--line)}
.g-recaptcha{min-height:0}

.search{position:relative;margin-bottom:12px}
.search .i{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--muted);pointer-events:none}
.search input{width:100%;font:inherit;font-size:1.05rem;padding:15px 16px 15px 46px;border-radius:6px;border:2px solid var(--line);background:var(--surface);color:var(--text);box-shadow:0 4px 14px var(--shadow)}
.count{margin:0 0 20px;color:var(--muted);font-size:.9rem}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:4px 0 24px}
.grid .card{min-width:0;grid-template-columns:100px 1fr;gap:14px;padding:14px}
.grid .card h3{font-size:1.2rem}
.grid .card p.syn{font-size:.92rem;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.more-wrap{text-align:center;padding-bottom:16px}
.more{display:inline-block;padding:12px 36px}
.more[hidden]{display:none}
.to-top{position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:25;width:48px;height:48px;border-radius:50%;border:0;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 14px var(--shadow);opacity:0;visibility:hidden;transform:translateY(12px);transition:opacity .2s,transform .2s,visibility .2s}
.to-top.show{opacity:1;visibility:visible;transform:none}
.to-top .i{width:22px;height:22px}
.crumb{display:inline-flex;align-items:center;gap:6px;color:var(--text);font-weight:700;margin-bottom:24px}
.crumb:hover{text-decoration:underline}
.bk{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:40px;align-items:start}
/* v1.12.4: the cover column stays put while the article scrolls.
   The rule sits on the .bk-side wrapper (the direct grid child),
   not on the img, so the whole column sticks. Top offset clears the
   72px sticky header. Below 760px the grid is single-column and the
   cover unsticks to sit above the article, scrolling normally. */
.bk-side{position:sticky;top:calc(72px + 24px)}
.bk-cover{display:grid;place-items:center;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:4px;box-shadow:0 8px 24px var(--shadow);background:var(--line);color:var(--text);font-weight:700}
.bk h1{margin:0;font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.1;font-weight:800}
.bk .meta{margin:8px 0 20px;color:var(--muted)}
.bk h2{font-size:1.1rem;margin:0 0 12px}
.bk-desc p{margin:0 0 1em;max-width:62ch}
.buy{background:var(--surface);border:2px solid var(--line);border-radius:6px;padding:20px;box-shadow:0 4px 14px var(--shadow);margin:24px 0 32px}
.buy-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.buy-links .btn{display:flex;align-items:center;justify-content:center;gap:8px}
.specs{display:grid;grid-template-columns:auto 1fr;gap:8px 24px;margin:0 0 24px}
.specs dt{font-weight:800}
.specs dd{margin:0;color:var(--muted)}
@media (max-width:860px){
  .card{flex-basis:100%}
  .prev{left:-8px}.next{right:-8px}
  .menu-btn{display:block}
  nav ul{display:none;position:absolute;top:72px;left:0;right:0;flex-direction:column;gap:0;background:var(--bg);box-shadow:0 6px 8px var(--shadow);padding:8px 20px 16px}
  nav ul.open{display:flex}
  nav a{padding:12px 0}
}
@media (max-width:480px){.card{grid-template-columns:110px 1fr;gap:14px}}
@media (max-width:860px){.compact .card{flex-basis:calc((100% - 16px)/2)}}
@media (max-width:520px){.compact .card{flex-basis:100%;grid-template-columns:96px 1fr}}
@media (max-width:980px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.grid{grid-template-columns:1fr}.grid .card{grid-template-columns:110px 1fr}}
@media (max-width:760px){.bk{grid-template-columns:1fr;gap:24px}.bk-cover{max-width:260px}.bk-side{position:static}}

/* ---- multi-page additions ---- */
.card[hidden]{display:none}
h1.pt{margin:0 0 10px;font-size:1.5rem;text-transform:uppercase;font-weight:800;letter-spacing:.01em}
.banner .h1{margin:0 0 10px;font-size:clamp(1.8rem,4.5vw,3rem);line-height:1.1;font-weight:800;text-shadow:0 1px 6px rgba(0,0,0,.35)}
.shots{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:0 0 32px}
.shot{padding:0;border:0;border-radius:4px;overflow:hidden;cursor:zoom-in;aspect-ratio:3/4;box-shadow:0 4px 14px var(--shadow);display:grid;place-items:center;background:var(--line);color:var(--text);font:inherit;font-weight:700;text-align:center}
.shot img{width:100%;height:100%;object-fit:cover;display:block}
#lb{border:0;padding:0;background:transparent;max-width:min(92vw,900px);width:100%;color:#F5F5F5;overflow:visible}
#lb::backdrop{background:rgba(0,0,0,.88)}
.lb-in{display:grid;gap:12px;justify-items:center}
.lb-img{max-width:100%;max-height:78vh;border-radius:4px;display:block}
.lb-ph{width:min(70vw,420px);aspect-ratio:3/4;background:var(--line);display:grid;place-items:center;color:var(--text);font-weight:700;border-radius:4px;text-align:center;padding:12px}
.lb-cap{margin:0;text-align:center}
.lb-btn{position:fixed;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;border:0;background:#F5F5F5;color:#424242;font-size:26px;line-height:1;cursor:pointer}
#lb-prev{left:14px}#lb-next{right:14px}
#lb-close{top:22px;right:14px;transform:none}
.prose{max-width:760px;margin:0 auto}
.prose h2{margin:40px 0 12px}
.prose p{margin:0 0 1.1em;font-size:1.05rem}
.prose figure{margin:28px 0}
/* v1.13.4 image-fit rule: no image may ever render wider than its slot, at
   whatever size it was imported at. Block figures already had width:100%;
   bare inline images inside prose had no rule at all and rendered at
   imported size. */
img{max-width:100%}
.prose img{max-width:100%;height:auto;display:block}
.prose figure img,.prose .ph{width:100%;max-width:100%;height:auto;display:block;border-radius:4px;box-shadow:0 6px 20px var(--shadow)}
.prose .ph{aspect-ratio:16/9;background:var(--line);display:grid;place-items:center;color:var(--text);font-weight:700;text-align:center;padding:12px}
.prose figcaption{margin-top:8px;color:var(--muted);font-size:.9rem;text-align:center}
.prose blockquote{margin:28px 0;padding:6px 0 6px 20px;border-left:4px solid var(--accent);font-size:1.25rem;font-style:italic}
.bk .prose{max-width:none;margin:24px 0 0}
.bk .prose h2{margin:24px 0 12px}
.cform{max-width:760px;margin:24px auto 0;display:grid;gap:14px}
.cform label{font-weight:800}
.cform input,.cform textarea{font:inherit;padding:13px 14px;border-radius:4px;border:2px solid var(--line);background:var(--surface);color:var(--text);width:100%}
.cform textarea{min-height:180px;resize:vertical}
.hp{position:absolute;left:-9999px}
@media (max-width:620px){.shots{grid-template-columns:repeat(2,1fr)}}
.seeall{margin:0 0 8px;font-weight:800}
.seeall a{color:var(--text)}
.seeall a:hover{text-decoration:underline}
