:root {
  --bg: #F5F2EB;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --ink: #1F1D1A;
  --ink-2: #5B574F;
  --ink-3: #6E6A62; /* 4.5:1+ on cream and white (WCAG AA small text) */
  --line: rgba(31, 29, 26, .10);
  --line-2: rgba(31, 29, 26, .22);
  --accent: #E07A5F;
  --good: #277953; /* 4.5:1+ on cream and white */
  --felt: #1B5240;
  --felt-hi: #2E7A5E;
  --card: #FFFDF8;
  --suit-red: #C8402F;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --ad-gap: 150px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font-ui); overflow-x: hidden; }
a { color: inherit; }
[hidden] { display: none !important; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--gutter); max-width: 1440px; margin: 0 auto; }
.logo { font: 600 27px/1 var(--font-display); letter-spacing: -.01em; text-decoration: none; }
/* Logo E: "everythingle" with a four-colour dot on the i (one slice per game) and "le" in cyan */
.logo-le { color: #2AA0B0; }
.logo-i { display: inline-block; position: relative; width: .105em; height: .45em; margin: 0 .035em; background: currentColor; border-radius: .02em; }
.logo-i svg { position: absolute; left: 50%; bottom: .55em; width: .34em; height: .34em; transform: translateX(-50%); }
.issue { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.coffee-top { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); }
@media (max-width: 520px) {
  .nav a:not(.coffee) { display: none; }
}

/* Ad spots: fixed size per screen width so the page never jumps (same as the games) */
.ad-band { display: flex; justify-content: center; padding: 8px var(--gutter); }
.ad-band--top { margin-bottom: 8px; }
.ad-band--bottom { margin: 40px 0; }
.ad-slot { flex: none; position: relative; max-width: 100%; }
.ad-slot ins { display: block; width: 100%; height: 100%; }
.ad-slot.is-placeholder {
  display: grid; place-items: center;
  border: 1px dashed var(--line-2); border-radius: 8px;
  background: rgba(31, 29, 26, .035);
  color: var(--ink-3); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.ad-slot.is-placeholder::after { content: "Ad · " var(--ad-label); }
.ad-slot[data-spot="top"] { width: 320px; height: 100px; --ad-label: "320 × 100"; }
.ad-slot[data-spot="bottom"] { width: 300px; height: 250px; --ad-label: "300 × 250"; }
.ad-slot--inline { width: 300px; height: 250px; --ad-label: "300 × 250"; }
.ad-slot--rail { width: 160px; height: 600px; --ad-label: "160 × 600"; }
@media (min-width: 768px) {
  .ad-slot[data-spot="top"], .ad-slot[data-spot="bottom"] { width: 728px; height: 90px; --ad-label: "728 × 90"; }
}
@media (min-width: 1280px) {
  .ad-slot[data-spot="top"] { width: 970px; height: 90px; --ad-label: "970 × 90"; }
}
@media (min-width: 1440px) {
  .ad-slot--rail { width: 300px; --ad-label: "300 × 600"; }
}
.ad-inline { display: flex; justify-content: center; padding: 0 var(--gutter); margin: 24px 0 8px; }
/* Live site: a spot without an AdSense id is hidden instead of leaving a gap (js/ads.js). */
.no-ad-top .ad-band--top, .no-ad-bottom .ad-band--bottom, .no-ad-middle .rail, .no-ad-middle .ad-inline { display: none; }
@media (min-width: 1280px) { .no-ad-middle .stage { display: block; } }

/* Stage: rail + hub */
.stage { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.rail { display: none; }
@media (min-width: 1280px) {
  .stage { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--ad-gap); align-items: start; padding: 0 24px; }
  .rail { display: block; position: sticky; top: 24px; }
  .ad-inline { display: none; }
}

.hub { min-width: 0; }
.hub-date {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; margin: 16px 0 0;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.ghost-title {
  margin: 4px 0 26px;
  text-align: center;
  font: 400 clamp(44px, 7vw, 96px)/1 var(--font-display);
  letter-spacing: -.02em;
  color: rgba(31, 29, 26, .07);
  user-select: none;
}
@media (max-width: 767px) {
  .ad-band--top { margin-bottom: 0; }
  .hub-date { margin-top: 26px; }
  .ghost-title { font-size: 40px; margin: 10px 0 28px; }
}
@media (min-width: 768px) and (max-width: 1279px) {
  .ghost-title { margin-bottom: 34px; }
}

/* Game cards */
/* Three games: one column on phones, 2 + 1 on tablets, a row of three from about 1000px */
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 1100px; margin: 0 auto; }
.games > .game-card { flex: 1 1 280px; min-width: 0; }
@media (min-width: 720px) { .games > .game-card { max-width: 380px; } }
.game-card {
  display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden;
  background: var(--surface); color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(31, 29, 26, .05), 0 24px 48px -28px rgba(31, 29, 26, .35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(31, 29, 26, .05), 0 30px 56px -26px rgba(31, 29, 26, .42); }
.game-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.card-art { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-art--polyglotle { background: var(--surface-2); border-bottom: 1px solid var(--line); }
/* "Hello" in five scripts, as speech bubbles pointing at the globe */
.bubble {
  position: absolute; z-index: 1;
  padding: 4px 11px 5px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--c) 60%, #fff);
  background: #fff;
  box-shadow: 0 6px 14px -8px rgba(31, 29, 26, .35);
  font: 500 15px/1.35 "Literata", "Noto Serif", Georgia, serif;
  color: var(--ink);
  white-space: nowrap;
}
.bubble::after {
  content: ""; position: absolute; bottom: -6px;
  width: 9px; height: 9px;
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--c) 60%, #fff);
  border-top: 0; border-left: 0;
}
.bubble--l::after { right: 14px; transform: rotate(45deg) skew(10deg, 10deg); }
.bubble--r::after { left: 14px; transform: rotate(45deg) skew(10deg, 10deg); }
.bubble--l { transform: rotate(-2deg); }
.bubble--r { transform: rotate(2deg); }
.card-art--polyglotle > svg { position: relative; z-index: 0; }
.card-art--strategle { gap: 0; background: radial-gradient(120% 100% at 50% 30%, var(--felt-hi), var(--felt) 75%); }
.mini-card {
  display: grid; align-content: start; justify-items: start;
  width: 62px; height: 86px; padding: 7px 0 0 9px;
  border-radius: 8px; background: var(--card); color: var(--ink);
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .5);
  transform: rotate(-6deg);
}
.mini-card + .mini-card { margin-left: -12px; transform: rotate(5deg) translateY(4px); }
.mini-card.red { color: var(--suit-red); }
.mini-card b { font: 600 18px/1 var(--font-display); }
.mini-card svg { width: 26px; height: 26px; margin: 8px 0 0 6px; }
.felt-words { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 700 10px var(--font-ui); letter-spacing: .22em; text-transform: uppercase; color: rgba(233, 216, 166, .7); }

/* Mythle: a statement on graph paper and the two answer stamps */
.card-art--mythle {
  background-color: #FFFDF8;
  background-image: linear-gradient(rgba(47, 107, 200, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 107, 200, .1) 1px, transparent 1px);
  background-size: 20px 20px;
  border-bottom: 1px solid var(--line);
}
.mini-note {
  position: relative; display: grid; gap: 6px;
  width: 190px; padding: 10px 12px 12px 26px;
  border-radius: 10px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 29, 26, .1), 0 10px 18px -12px rgba(31, 29, 26, .5);
  font: 400 17px/1.25 var(--font-display); color: var(--ink);
  transform: rotate(-3deg);
}
.mini-note::before { content: ""; position: absolute; top: 0; bottom: 0; left: 16px; width: 1.5px; background: rgba(200, 64, 47, .4); }
.mini-note i { justify-self: start; font: 600 9px/1.4 var(--font-ui); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #1F6B57; background: #E6F4EF; padding: 1px 7px; border-radius: 999px; }
.mini-stamp { position: absolute; padding: 3px 9px; border: 3px double; border-radius: 7px; font: 700 12px/1 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; background: rgba(255, 253, 248, .8); }
.mini-stamp--s { right: 9%; bottom: 16%; color: #2F6BC8; border-color: #2F6BC8; transform: rotate(-9deg); }
.mini-stamp--f { left: 7%; top: 14%; color: #B04F95; border-color: #B04F95; transform: rotate(7deg); opacity: .45; }
/* Mythle's logo: "Myth" crossed out in red pen, then "le" */
.logo-myth { position: relative; display: inline-block; }
.logo-strike { position: absolute; left: -4%; top: 50%; width: 108%; height: 22%; overflow: visible; fill: none; stroke: #C8402F; stroke-width: 5; stroke-linecap: round; }

.card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.card-body > * { flex: none; }
.card-body .card-meta + * { margin-top: auto; } /* buttons line up at the bottom when the cards share a row */
.card-meta { margin-bottom: 4px; }
.card-streak + .card-cta { margin-top: 2px; }
.card-logo { display: inline-flex; align-items: center; font: 600 30px/1.1 var(--font-display); letter-spacing: -.01em; }
.logo-o { display: inline-block; width: .46em; height: .46em; margin: 0 .02em; vertical-align: -.01em; } /* the size of Fraunces' o: -0.01em to 0.451em */
.card-logo--inline { display: block; }
.logo-ace {
  display: inline-grid; align-content: start; justify-items: start;
  width: 20px; height: 28px; margin: 0 1px 0 2px; padding: 2px 0 0 3px;
  border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card);
  transform: rotate(-8deg) translateY(-1px);
}
.logo-ace b { font: 700 9px/1 var(--font-ui); }
.logo-ace svg { width: 11px; height: 11px; margin: 1px 0 0 1px; }
.card-tag { color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.card-meta { font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
.card-streak { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--good) 12%, #fff); color: var(--good); font-size: 12px; font-weight: 600; }
.card-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; height: 48px; padding: 0 16px;
  border-radius: 12px; background: var(--ink); color: #fff;
  font: 600 15px var(--font-ui);
}
.card-cta i { font-style: normal; }
.card-cta.done { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); }
.card-cta.done b { color: var(--good); }
@media (max-width: 719px) {
  .card-art { height: 124px; }
  .card-art--polyglotle > svg { width: 88px; height: 88px; }
  .bubble { font-size: 13px; padding: 3px 9px 4px; }
  .mini-card { width: 50px; height: 70px; padding: 6px 0 0 7px; }
  .mini-card b { font-size: 15px; }
  .mini-card svg { width: 20px; height: 20px; margin: 6px 0 0 5px; }
  .card-art--strategle { padding-bottom: 14px; }
  .mini-note { width: 170px; font-size: 15px; }
}

/* Text sections between the games and the lower ads */
.about { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); color: var(--ink-2); font-size: 15px; }
.about:first-of-type { margin-top: 96px; }
.about h2 { font: 400 24px/1.25 var(--font-display); color: var(--ink); margin: 0 0 8px; }
.about--second { margin-top: 40px; }
.about ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (min-width: 1280px) { .about:first-of-type { margin-top: 120px; } }

.footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; padding: 0 var(--gutter) 40px; font-size: 13px; color: var(--ink-3); }
.footer a { color: var(--ink-2); }

/* Privacy and 404 pages */
.legal { max-width: 680px; margin: 24px auto 64px; padding: 0 var(--gutter); color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.legal h1 { font: 400 clamp(34px, 6vw, 48px)/1.1 var(--font-display); color: var(--ink); margin: 0 0 6px; }
.legal h2 { font: 600 19px/1.3 var(--font-ui); color: var(--ink); margin: 32px 0 8px; }
.legal-updated { font-size: 13px; color: var(--ink-3); margin: 0 0 24px; }
.legal ul { padding-left: 20px; }
.legal a { color: #1F7F8C; }

/* Feedback page (feedback.html) */
.fb { display: grid; gap: 18px; margin-top: 24px; }
.fb-field { display: grid; gap: 6px; }
.fb-label { font: 600 15px var(--font-ui); color: var(--ink); }
.fb-label small { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.fb select, .fb textarea, .fb input {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: 400 16px/1.45 var(--font-ui); /* 16px keeps iPhones from zooming in */
}
.fb textarea { min-height: 150px; resize: vertical; }
.fb select:focus-visible, .fb textarea:focus-visible, .fb input:focus-visible { outline: 2px solid #2AA0B0; outline-offset: 1px; border-color: transparent; }
.fb-count { justify-self: end; font-size: 12px; color: var(--ink-3); }
.fb-ref { display: flex; align-items: center; gap: 8px; justify-self: start; margin: -6px 0 0; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.fb-ref[hidden] { display: none; }
.fb-ref-x { width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); font-size: 17px; line-height: 1; }
.fb-ref-x:hover { background: var(--line); color: var(--ink); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-error { margin: 0; min-height: 1.4em; color: #B3412A; font-size: 14px; }
.fb-error:empty { min-height: 0; margin-bottom: -18px; }
.fb-send { justify-self: start; height: 48px; padding: 0 30px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font: 600 15px var(--font-ui); cursor: pointer; }
.fb-send:hover { background: #33302b; }
.fb-send:disabled { opacity: .6; cursor: default; }
.fb-done { margin-top: 24px; }
.fb-done h2 { font: 400 30px/1.2 var(--font-display); margin: 0 0 8px; outline: none; }
.fb-done .linkish { border: 0; background: none; padding: 0; color: #1F7F8C; font: inherit; text-decoration: underline; cursor: pointer; }
.fb-note { margin-top: 32px; font-size: 13px; color: var(--ink-3); }
