/* ==========================================================================
   content.css — shared styling for mishak.fun editorial pages
   (game guides, about, FAQ). Mirrors the hub / privacy design tokens so the
   whole site reads as one brand. Each content page sets its own --accent.
   ========================================================================== */

:root {
  --canvas: #FBF6EE;
  --canvas-2: #F4EADB;
  --surface: #FFFFFF;
  --surface-soft: #FBF4E8;
  --ink: #211A15;
  --ink-soft: #574C42;
  --ink-faint: #6f6558;
  --line: #EADFCC;
  --line-strong: #DDD0B8;
  --teal: #0f766e;
  --plum: #6d28d9;
  --amber: #b5541a;
  --rose: #be123c;
  --brand: #b5541a;
  --accent: var(--brand);
  --on-accent: #ffffff;
  --focus: #0f766e;
  --shadow-sm: 0 1px 2px rgba(33, 26, 21, .06), 0 2px 6px rgba(33, 26, 21, .05);
  --shadow-md: 0 6px 16px rgba(33, 26, 21, .10), 0 2px 6px rgba(33, 26, 21, .06);
  --shadow-lg: 0 18px 40px rgba(33, 26, 21, .14), 0 6px 14px rgba(33, 26, 21, .08);
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --text-h1: clamp(2rem, 1.4rem + 3vw, 3.2rem);
  --text-h2: clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem);
  --maxw: 860px;
  --dur: 320ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Rubik", "Heebo", "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #181310;
    --canvas-2: #211A15;
    --surface: #241D17;
    --surface-soft: #2A2119;
    --ink: #F5ECDF;
    --ink-soft: #C4B7A6;
    --ink-faint: #8F8474;
    --line: #382E24;
    --line-strong: #4A3D30;
    --teal: #4dd6c6;
    --plum: #b79bff;
    --amber: #e8945a;
    --rose: #fb7185;
    --brand: #e8945a;
    --on-accent: #1a1410;
    --focus: #4dd6c6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, .5);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);
  }
}

/* per-page accent themes (set class on <html>) */
.theme-teal { --accent: var(--teal); }
.theme-plum { --accent: var(--plum); }
.theme-amber { --accent: var(--amber); }
.theme-rose { --accent: var(--rose); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.75;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 40% at 92% -5%, color-mix(in oklab, var(--accent) 15%, transparent), transparent 70%),
    radial-gradient(50% 38% at 2% 4%, color-mix(in oklab, var(--teal) 12%, transparent), transparent 68%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--ink); color: var(--canvas);
  padding: .6rem 1rem; border-radius: 0 0 10px 0; z-index: 40; font-weight: 700;
}
.skip-link:focus { inset-inline-start: 0; }

/* header (shared look) */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in oklab, var(--canvas) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ink); box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.brand .mark .dots { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.brand .mark .dots span { display: block; width: 7px; height: 7px; border-radius: 50%; margin: 1.5px; }
.brand .mark .d1 { background: var(--teal); }
.brand .mark .d2 { background: var(--plum); }
.brand .mark .d3 { background: var(--amber); }
.brand .mark .d4 { background: var(--canvas); }
.brand-name b { color: var(--brand); }
.back-link { font-weight: 600; color: var(--ink-soft); }
.back-link:hover { color: var(--ink); text-decoration: none; }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .9rem; color: var(--ink-faint); margin: 0 0 1.4rem; }
.crumbs a { color: var(--ink-soft); font-weight: 600; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .6; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }

/* article head */
main { padding-block: clamp(2.2rem, 1.4rem + 3.5vw, 4.2rem); }
.doc-head { margin-bottom: 2rem; }
.kicker { display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
h1 { font-size: var(--text-h1); font-weight: 900; letter-spacing: -0.03em; margin: 0 0 .6rem; line-height: 1.1; }
.lede { color: var(--ink-soft); font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); margin: 0; max-width: 62ch; }
.updated { color: var(--ink-faint); font-weight: 600; margin: .8rem 0 0; font-size: .95rem; }

/* prose */
.prose h2 {
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 .8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 5rem;
}
.prose h3 { font-size: 1.15rem; font-weight: 800; margin: 1.8rem 0 .5rem; }
.prose p { margin: 0 0 1rem; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-inline-start: 1.3rem; color: var(--ink-soft); }
.prose li { margin-bottom: .55rem; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }

.intro {
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.8rem;
}
.intro p { color: var(--ink); }
.intro p:last-child { margin-bottom: 0; }

/* feature chip row */
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.badges li {
  display: inline-flex; align-items: center; gap: .4rem; margin: 0;
  font-size: .88rem; font-weight: 700; color: var(--ink-soft);
  background: var(--canvas-2); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: .35rem .85rem;
}

/* numbered how-to steps */
.steps { list-style: none; margin: 0 0 1.4rem; padding: 0; counter-reset: step; }
.steps > li {
  position: relative;
  margin: 0 0 .9rem;
  padding: 1rem 1.1rem 1rem 1.1rem;
  padding-inline-start: 3.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 1rem; top: 1rem;
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 10px;
  background: color-mix(in oklab, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-weight: 800; font-size: 1rem;
}
.steps > li strong { display: block; color: var(--ink); margin-bottom: .15rem; }

/* callout (tips / note) */
.callout {
  margin: 1.4rem 0;
  padding: 1.3rem 1.4rem;
  background: color-mix(in oklab, var(--accent) 7%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 26%, var(--line));
  border-radius: var(--radius);
}
.callout h3 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.callout ul { margin-bottom: 0; }
.callout p:last-child { margin-bottom: 0; }

/* worked-example board */
.demo {
  margin: 1.4rem 0;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.demo .demo-cap { color: var(--ink-faint); font-size: .9rem; margin: .9rem 0 0; }
.tiles { display: inline-flex; gap: .35rem; direction: rtl; }
.tiles + .tiles { margin-top: .35rem; }
.tile {
  width: 2.6rem; height: 2.6rem;
  display: inline-grid; place-items: center;
  border-radius: 8px; font-weight: 800; font-size: 1.2rem;
  border: 2px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
}
/* Wordle-style tile colours: fixed across themes; contrasts meet WCAG (large bold text). */
.tile.g { background: #3d7a46; border-color: #3d7a46; color: #fff; }
.tile.y { background: #c9a227; border-color: #c9a227; color: #241d17; }
.tile.x { background: #6f6559; border-color: #6f6559; color: #fff; }
.demo-row { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: .3rem 0; direction: rtl; }
.demo-row .rowlabel { font-weight: 700; color: var(--ink); }
.demo-row .rowmeta { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* mini FAQ (also used on the FAQ page) */
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  cursor: pointer; list-style: none;
  padding: 1.1rem .2rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 1.4rem; line-height: 1; flex: 0 0 auto; }
.qa details[open] summary::after { content: "\2013"; }
.qa summary:hover { color: var(--accent); }
.qa .qa-body { padding: 0 .2rem 1.2rem; color: var(--ink-soft); }
.qa .qa-body p:last-child { margin-bottom: 0; }

/* play CTA */
.play-cta {
  margin: 2.6rem 0 1rem;
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 14%, var(--surface)), var(--surface) 62%);
  border: 1px solid color-mix(in oklab, var(--accent) 24%, var(--line));
  box-shadow: var(--shadow-md);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.4rem;
}
.play-cta .pc-text { max-width: 42ch; }
.play-cta h2 { border: 0; padding: 0; margin: 0 0 .3rem; font-size: 1.35rem; }
.play-cta p { margin: 0; color: var(--ink-soft); }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 700; cursor: pointer;
  border-radius: var(--radius-pill); padding: .75rem 1.4rem;
  min-height: 48px; border: 1.5px solid transparent; white-space: nowrap;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .arw { transition: transform var(--dur) var(--ease); }
.btn:hover .arw { transform: translateX(-4px); }

/* related-guides grid */
.rel { margin-top: 2.6rem; padding-top: 1.7rem; border-top: 1px solid var(--line); }
.rel h2 { font-size: var(--text-h2); font-weight: 800; margin: 0 0 1rem; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }
.rel-card {
  display: block; padding: 1.1rem 1.2rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.rel-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.rel-card .rc-name { font-weight: 800; font-size: 1.05rem; display: block; margin-bottom: .2rem; }
.rel-card .rc-desc { color: var(--ink-soft); font-size: .92rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--canvas-2); padding-block: 2.4rem; margin-top: 3rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; }
.foot-links a { color: var(--ink-soft); font-weight: 600; }
.foot-links a:hover { color: var(--ink); }
.foot-copy { color: var(--ink-faint); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
