/* Cluelogix site styles. Depends on tokens.css — load that first.
   Never hardcode a colour that exists as a token. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font-family: var(--font-body); }
img { max-width: 100%; }
a { color: inherit; }

/* ==========================================================================
   Base (continued)
   ========================================================================== */

html { scroll-behavior: smooth; }
a { text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

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

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes clx-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Used by the demo "solved" banner (Task 6 owns the markup). */
@keyframes clx-pop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Page shell & decorative layers
   ========================================================================== */

.clx-page {
  position: relative;
  /* `clip` contains the .clx-glow bleed WITHOUT becoming a scroll container,
     which `hidden` would do — that breaks .clx-header's position: sticky.
     `hidden` first as a fallback for browsers that don't support `clip`. */
  overflow-x: hidden;
  overflow-x: clip;
  min-height: 100vh;
}

/* Paper grain. Inline SVG noise, no network request. */
.clx-grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Warm ambient glow behind the top-right of the page. */
.clx-glow {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, var(--cell-hover), transparent 60%);
}

/* ==========================================================================
   Layout containers
   ========================================================================== */

.clx-section {
  position: relative;
  z-index: 1;
}

.clx-section-warm {
  background: var(--bg-warm);
  border-top: 1px solid var(--border-thin);
  border-bottom: 1px solid var(--border-thin);
}

.clx-section-dark {
  background: var(--bg-dark);
}

/* Section inner wrapper. The responsive block narrows its side padding. */
.clx-pad {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px 40px;
}

.clx-pad-narrow { max-width: 780px; }

.clx-section-head {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   Typography
   ========================================================================== */

.clx-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
}

.clx-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}

/* Buy-section heading: larger, and flush to the icon above it. */
.clx-h2-xl { font-size: 44px; margin-top: 0; }

/* Standalone heading with a terracotta rule down its left edge (how-to-play). */
.clx-h2-bar {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 var(--space-md);
  padding-left: var(--space-md);
  border-left: 3px solid var(--terracotta);
}

/* Standalone page title for how-to-play. Not a modifier of .clx-h1. */
.clx-page-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  margin: var(--space-lg) 0 0;
}

.clx-page-sub {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  margin: var(--space-sm) 0 0;
  padding-bottom: var(--space-lg);
}

.clx-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 30em;
  margin: 22px 0 0;
}

.clx-idea {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 20px 0 0;
  color: var(--text);
}

.clx-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Body copy inside the how-to-play article. */
.clx-prose {
  font-size: var(--text-base);
  font-weight: 350;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.clx-prose-gap { margin-top: var(--space-md); }

/* Accent colour utilities live at the end of the file — see "Utilities". */

/* ==========================================================================
   Buttons
   ========================================================================== */

.clx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              color var(--transition-base);
}

.clx-btn-primary {
  background: var(--teal);
  color: var(--bg);
  border-color: var(--teal);
}
.clx-btn-primary:hover { background: var(--teal-pressed); border-color: var(--teal-pressed); }

.clx-btn-secondary {
  background: transparent;
  border-color: var(--border-thick);
  color: var(--text);
}
.clx-btn-secondary:hover {
  background: var(--bg-warm);
  border-color: var(--text-secondary);
}

/* Size modifiers. */
.clx-btn-md {
  padding: 12px 40px;
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.clx-btn-lg {
  gap: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.clx-btn-xl {
  gap: 12px;
  padding: 17px 40px;
  font-size: 18px;
  font-weight: 600;
}

/* Teal glow, only on primary buttons. rgba() is --teal at alpha; no token. */
.clx-btn-primary.clx-btn-lg { box-shadow: 0 4px 20px rgba(42, 107, 98, 0.28); }
.clx-btn-primary.clx-btn-xl { box-shadow: 0 4px 24px rgba(42, 107, 98, 0.40); }
.clx-btn-primary.clx-btn-md:hover { box-shadow: 0 4px 16px rgba(42, 107, 98, 0.25); }

.clx-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ==========================================================================
   Header & navigation
   ========================================================================== */

.clx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  /* --bg at 82% so the blur reads through; no token for the alpha form. */
  background: rgba(248, 243, 235, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-thin);
}

.clx-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clx-logo-img {
  width: 34px;
  height: 34px;
  display: block;
}

.clx-wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.clx-wordmark-clue  { color: var(--teal); }
.clx-wordmark-logix { color: var(--text); }

.clx-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.clx-nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-base);
}
.clx-nav-link:hover { color: var(--terracotta); }

/* Current page marker in the nav (a <span>, not a link). */
.clx-nav-current {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* .clx-nav-features is a responsive hook only — pair it with .clx-nav-link.
   Its sole rule lives in the max-width: 700px block below (display: none). */

/* Size modifier for the nav buy pill. Pair with .clx-btn .clx-btn-primary. */
.clx-nav-buy {
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.clx-hero {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px 40px 72px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.clx-hero-copy { animation: clx-rise 0.6s ease both; }

.clx-hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-muted);
}

.clx-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--teal);
}

/* ==========================================================================
   Demo card chrome
   (The board, cells and clue list inside it belong to Task 6.)
   ========================================================================== */

.clx-democard {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px 28px 26px;
  box-shadow: var(--shadow-lg);
  animation: clx-rise 0.7s ease both;
}

.clx-accentbar {
  height: 2px;
  background: var(--accent-bar-4);
}

/* Demo card chrome — insets the accent bar into .clx-democard's top edge.
   Consumed by Task 6's demo markup; not dead code, do not strip. */
.clx-accentbar-inset {
  position: absolute;
  top: 0;
  left: var(--space-lg);
  right: var(--space-lg);
  border-radius: var(--radius-pill);
}

/* Demo card chrome — the four decorative corner brackets on .clx-democard.
   Consumed by Task 6's demo markup; not dead code, do not strip.
   --terracotta at 50%; no token for the alpha. */
.clx-corner {
  position: absolute;
  width: 14px;
  height: 14px;
}
.clx-corner-tl { top: 14px; left: 14px;  border-top: 1.5px solid rgba(176, 74, 58, 0.5); border-left: 1.5px solid rgba(176, 74, 58, 0.5); }
.clx-corner-tr { top: 14px; right: 14px; border-top: 1.5px solid rgba(176, 74, 58, 0.5); border-right: 1.5px solid rgba(176, 74, 58, 0.5); }
.clx-corner-bl { bottom: 14px; left: 14px;  border-bottom: 1.5px solid rgba(176, 74, 58, 0.5); border-left: 1.5px solid rgba(176, 74, 58, 0.5); }
.clx-corner-br { bottom: 14px; right: 14px; border-bottom: 1.5px solid rgba(176, 74, 58, 0.5); border-right: 1.5px solid rgba(176, 74, 58, 0.5); }

/* --- demo puzzle board (markup lives in index.html, behaviour in demo-puzzle.js) --- */

/* The card's kicker/question/divider are one centred block in the reference. */
.clx-demo-headblock { text-align: center; margin-bottom: var(--space-xs); }

/* 11px and 20px are literals: the type scale has no 11px step (--text-xs is
   12px) and no 20px step (--text-lg 17.6px / --text-xl 21.6px straddle it).
   Matching the reference exactly beats rounding to a near-miss token. */
.clx-demo-kicker   { font-size: 11px; font-weight: 600;
                     letter-spacing: 0.14em; text-transform: uppercase;
                     color: var(--text-muted); margin: 0; }
.clx-demo-question { font-family: var(--font-display); font-size: 20px;
                     margin: var(--space-xs) 0 0; }

/* The reference tinted this one divider teal where the page's general
   .clx-divider is terracotta. Written as a two-class selector so it
   out-cascades .clx-divider whatever the source order, and kept demo-scoped
   because the demo card is the only place the teal variant appears. */
.clx-divider.clx-demo-divider { background: var(--divider-teal); }
.clx-divider.clx-demo-divider .clx-divider-mark { color: var(--teal); }

/* Board geometry, from the reference: fixed 58px cell tracks flanked by a
   74px label column and a 74px empty track. That trailing track is a spacer
   with no content — it balances the label column so justify-content: center
   centres the block of *cells* in the card, not the label+cells assembly.
   Declaring the track is enough; it needs no element to hold it open. */
.clx-demo-grid { display: grid; gap: 0; margin: 20px auto 0; }
.clx-demo-row  { display: grid; grid-template-columns: 74px repeat(4, 58px) 74px;
                 justify-content: center; gap: 0; align-items: center; }
.clx-demo-head  { padding-bottom: var(--space-sm); }
.clx-demo-label { font-size: var(--text-sm); color: var(--text-secondary);
                  text-align: right; padding-right: 12px; }
/* 11px again for the reason given above the kicker: the scale has no 11px
   step. The reference hangs padding-bottom: 8px off each header cell; here
   that 8px comes from .clx-demo-head on the row, which renders identically. */
.clx-demo-col   { font-size: 11px; font-weight: 600; text-align: center;
                  letter-spacing: 0.06em; }

/* Each column header carries its own hue in the reference, not a uniform
   grey. "Red" is the heading's own word for the --terracotta swatch. */
.clx-demo-col-amber { color: var(--amber); }
.clx-demo-col-teal  { color: var(--teal); }
.clx-demo-col-red   { color: var(--terracotta); }
.clx-demo-col-plum  { color: var(--plum); }

/* Height is fixed at the reference's 54px; the width comes from the 58px
   track, so the cell restretches on its own when the tracks go fluid at
   480px. Square corners, like the reference: with gap: 0 the 1px borders of
   neighbouring cells meet, and a radius would notch every junction. */
.clx-demo-cell { background: transparent; border: 1px solid var(--border-thin);
                 font-size: 20px; line-height: 1; height: 54px;
                 cursor: pointer; color: var(--text);
                 transition: background var(--transition-fast); }
.clx-demo-cell:hover { background: var(--cell-hover); }
.clx-demo-cell:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.clx-demo-cell[data-state="eliminated"] { color: var(--cell-x); }
.clx-demo-cell[data-state="confirmed"]  { color: var(--cell-check);
                                          background: var(--cell-check-bg); }

/* The rule off the top edge is what separates the clues from the board —
   without it the list reads as another grid row. */
.clx-demo-clues       { margin-top: var(--space-lg);
                        border-top: 1px solid var(--border-thin);
                        padding-top: var(--space-md); }
/* 11px / 0.14em / 10px are literals matching the reference exactly, for the
   same reason as the kicker above: --text-xs is 12px and --space-sm is 8px,
   both near misses that would reintroduce drift. */
.clx-demo-clues-title { font-size: 11px; font-weight: 600;
                        letter-spacing: 0.14em; text-transform: uppercase;
                        color: var(--text-muted); margin: 0 0 10px; }

/* No list markers: the numerals are real <span>s in the markup so they can be
   drawn as tinted bubbles. The <ol> stays an <ol> — the content is still an
   ordered list, only the rendering of the marker changes. 14px is a literal
   for the same reason as 11px above: --text-sm (13.6px) is a near miss. */
.clx-demo-clues ol    { margin: 0; padding: 0; list-style: none;
                        display: flex; flex-direction: column;
                        gap: var(--space-sm); }
.clx-demo-clues li    { display: flex; gap: 10px; align-items: flex-start;
                        font-size: 14px; line-height: 1.4;
                        color: var(--text-secondary); }

/* --terracotta at 10%; no token holds that alpha (--terracotta-tint is 6%),
   same convention as the step numbers further down the page. */
.clx-clue-num    { flex: none; width: 20px; height: 20px;
                   display: flex; align-items: center; justify-content: center;
                   border-radius: var(--radius-pill);
                   background: rgba(176, 74, 58, 0.10); color: var(--terracotta);
                   font-size: 11px; font-weight: 700; }

/* A quiet underlined text link, not a pill — the reset is a way out, not a
   call to action, and a second pill would compete with the buy button. */
.clx-demo-resetrow { margin-top: 14px; text-align: center; }
.clx-demo-reset  { background: none; border: none; padding: 0;
                   font-family: inherit; font-size: var(--text-xs);
                   letter-spacing: 0.04em; color: var(--text-muted);
                   cursor: pointer;
                   text-decoration: underline; text-underline-offset: 3px; }

/* The wrapper exists only so `hidden` toggles the banner and its CTA as one
   unit; the reference's styling all lives on .clx-demo-solved-pill. A button
   cannot sit inside the pill without breaking its shape, so the CTA follows
   it as a sibling. */
.clx-demo-solved { text-align: center; }
.clx-demo-solved[hidden] { display: none; }

.clx-demo-solved-pill { margin: 18px 0 0; padding: 12px;
                        border-radius: var(--radius-pill);
                        background: var(--cell-check-bg); color: var(--teal);
                        font-size: 14px; font-weight: 600;
                        letter-spacing: 0.02em;
                        animation: clx-pop 0.4s var(--ease-spring) both; }

.clx-demo-solved-cta { margin-top: 14px; }

/* ==========================================================================
   Gradient hairline divider with a ◆ mark
   ========================================================================== */

.clx-divider {
  position: relative;
  width: 120px;
  height: 1px;
  margin: 12px auto 0;
  background: var(--divider-terracotta);
}

.clx-divider-wide { width: 140px; margin-top: 28px; }
.clx-divider-soft { opacity: 0.5; }
.clx-divider-pull { margin-top: -12px; }

.clx-divider-abs {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

.clx-divider-mark {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1;
  color: var(--terracotta);
}

/* Mark sitting on the page background rather than floating on the rule. */
.clx-divider-mark-boxed {
  font-size: 8px;
  background: var(--bg);
  padding: 0 6px;
}

/* ==========================================================================
   Feature cards
   ========================================================================== */

.clx-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.clx-card {
  background: var(--bg-white);
  border: 1px solid var(--border-thin);
  border-left: 4px solid var(--border-thin);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
}

.clx-card-teal       { border-left-color: var(--teal); }
.clx-card-amber      { border-left-color: var(--amber); }
.clx-card-terracotta { border-left-color: var(--terracotta); }
.clx-card-plum       { border-left-color: var(--plum); }

.clx-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 10px;
}

.clx-card-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Three-step explainer
   ========================================================================== */

.clx-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.clx-step-num {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

/* Accent tints at the original alphas — the token tints sit lower (0.06–0.08). */
.clx-step-num-terracotta { background: rgba(176, 74, 58, 0.10);  color: var(--terracotta); }
.clx-step-num-amber      { background: rgba(139, 109, 46, 0.12); color: var(--amber); }
.clx-step-num-teal       { background: rgba(42, 107, 98, 0.10);  color: var(--teal); }

.clx-step-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: var(--space-sm);
}

.clx-step-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Screenshots
   ========================================================================== */

.clx-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.clx-shot {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-thin);
  box-shadow: var(--shadow-md);
  background: var(--bg-white);
}

/* `height: auto` is load-bearing, not tidiness: the markup carries a real
   height="" attribute (kept for layout-shift prevention), which otherwise
   supplies a used height and makes `aspect-ratio` a no-op — it only applies
   when one of the two dimensions is auto. Without it the shots render at
   their attribute height instead of 16:10. */
.clx-shot-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.clx-shot-img-top   { object-position: top center; }
.clx-shot-img-right { object-position: center right; }

/* Letterbox fill below, and the caption's border-top, were #EDE4D5 in the
   reference. That value has no token; mapped to --bg-warm (#F2EBDF), which is
   marginally lighter. This is the only colour substitution in the file. */
.clx-shot-img-fit   { object-fit: contain; object-position: center; background: var(--bg-warm); }

.clx-shot-cap {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 8px;
  border-top: 1px solid var(--bg-warm); /* was #EDE4D5 — see note above */
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Buy section (dark)
   ========================================================================== */

.clx-buy-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  margin: 0 auto var(--space-lg);
  display: block;
}

.clx-buy-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  margin: var(--space-md) 0 0;
}

/* 40% cream — sits between --text-on-dark-muted (55%) and -faint (30%). */
.clx-buy-sub {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(248, 243, 235, 0.40);
  margin: var(--space-sm) 0 0;
}

.clx-buy-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-top: 34px;
}

.clx-buy-note {
  font-size: 13px;
  color: var(--text-on-dark-muted);
}

.clx-buy-count {
  margin-top: var(--space-xl);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-on-dark-faint);
}

.clx-soon {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(248, 243, 235, 0.12);
}

.clx-soon-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-dark-faint);
  margin-bottom: 18px;
}

.clx-soon-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.clx-chip {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(248, 243, 235, 0.18);
  color: var(--text-on-dark-muted);
  font-size: 13px;
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.clx-footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--border-thin);
}

.clx-footpad {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.clx-foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clx-foot-logo {
  width: 26px;
  height: 26px;
  display: block;
}

.clx-foot-wordmark {
  font-size: 15px;
  font-weight: 600;
}

.clx-foot-links {
  display: flex;
  gap: var(--space-lg);
  font-size: 13px;
}

.clx-foot-link {
  color: var(--text-secondary);
  transition: color var(--transition-base);
}
.clx-foot-link:hover { color: var(--terracotta); }

.clx-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   How-to-play article
   ========================================================================== */

.clx-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
}

.clx-article {
  max-width: 650px;
  width: 100%;
  animation: clx-rise 0.6s ease both;
}

.clx-doc-section { margin-top: var(--space-2xl); }

/* Centred wrapper for a figure/table/legend. Scrolls rather than overflowing. */
.clx-figrow {
  margin: var(--space-lg) 0 var(--space-sm);
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.clx-endcta {
  position: relative;
  margin-top: var(--space-3xl);
  text-align: center;
  padding-top: var(--space-xl);
}

/* --- Category example card ------------------------------------------------ */

.clx-catcard {
  position: relative;
  background: var(--bg-white);
  border: 1px solid var(--border-thin);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  box-shadow: var(--shadow-sm);
  max-width: 340px;
  width: 100%;
}

/* Gradient order is deliberately amber -> terracotta -> teal, matching the
   Person/Pet/Drink column order below it. This is NOT --accent-bar-3
   (terracotta -> amber -> teal) — do not "correct" it to the token. */
.clx-catcard-bar {
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(to right, var(--amber), var(--terracotta), var(--teal));
  opacity: 0.35;
}

.clx-catcard-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding-bottom: var(--space-sm);
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border-thin);
}

.clx-catcard-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.clx-catcard-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding: 6px 0;
}

/* Same deliberate amber -> terracotta -> teal order as .clx-catcard-bar. */
.clx-catcard-rule {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, var(--amber), var(--terracotta), var(--teal));
  opacity: 0.2;
}

.clx-catcard-item {
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
  background: var(--bg-white);
  padding: 0 var(--space-xs);
}

/* --- Worked-example grid table -------------------------------------------- */

.clx-gridtable {
  border-collapse: collapse;
  border: 2px solid var(--border-thick);
}

.clx-gridtable th,
.clx-gridtable td {
  border: 1px solid var(--border-thin);
}

.clx-gridtable th {
  background: var(--bg-warm);
}

.clx-gridtable caption {
  caption-side: top;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-align: center;
  padding-bottom: var(--space-sm);
}

/* The thick-separator modifiers below MUST stay qualified by .clx-gridtable.
   Unqualified they are (0,1,0) and lose to `.clx-gridtable th` (0,1,1) above,
   which would silently collapse every 2px --border-thick rule back to 1px. */

/* Empty top-left corner cell. */
.clx-gridtable .clx-gt-corner {
  border-bottom: 2px solid var(--border-thick);
  border-right: 2px solid var(--border-thick);
}

/* Category banner (horizontal). */
.clx-gt-cat {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 5px var(--space-sm);
}

/* Category banner rotated down the left edge. */
.clx-gt-cat-v {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: var(--space-sm) var(--space-xs);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}

.clx-gridtable .clx-gt-col {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 6px;
  border-bottom: 2px solid var(--border-thick);
}

.clx-gridtable .clx-gt-row {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0 var(--space-sm);
  text-align: right;
  white-space: nowrap;
  border-right: 2px solid var(--border-thick);
}

.clx-gt-cell {
  width: 36px;
  height: 36px;
  text-align: center;
  background: var(--bg-white);
}

.clx-gt-check {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--teal);
  background: var(--cell-check-bg);
}

.clx-gt-x {
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--cell-x);
}

/* --- Mark legend (empty / ✗ / ✓) ------------------------------------------ */

.clx-marks {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.clx-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.clx-mark-box {
  width: 52px;
  height: 52px;
  border: 2px solid var(--border-thin);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

/* Tinted borders: --terracotta / --teal at alpha; no tokens at these levels. */
.clx-mark-box-x     { border-color: rgba(176, 74, 58, 0.25); color: var(--cell-x); }
.clx-mark-box-check { border-color: rgba(42, 107, 98, 0.30); color: var(--teal); background: var(--cell-check-bg); }

.clx-mark-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}

.clx-mark-desc {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
}

/* --- Clue examples --------------------------------------------------------- */

.clx-clues {
  margin: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.clx-clue {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px var(--space-md);
  border-left: 3px solid var(--amber);
  background: var(--amber-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.clx-clue-quote {
  font-size: var(--text-base);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
}

.clx-clue-note {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-muted);
}

/* --- Tips ------------------------------------------------------------------ */

.clx-tips {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.clx-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-thin);
}

.clx-tip-num {
  font-size: var(--text-lg);
  color: var(--terracotta);
  flex-shrink: 0;
  line-height: 1.5;
}

.clx-tip-text {
  font-size: var(--text-sm);
  font-weight: 350;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Tools list ------------------------------------------------------------ */

.clx-tools {
  display: flex;
  flex-direction: column;
}

.clx-tool {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: 10px 0;
  /* Neutral hairline, lighter than --border-thin by design. */
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.clx-tool:last-child { border-bottom: none; }

.clx-tool-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
  min-width: 100px;
}

.clx-tool-desc {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   List resets
   These containers are authored as <ul>/<ol> for semantics. Strip the marker
   and the UA's default margin/padding so they lay out as plain flex groups.
   ========================================================================== */

.clx-tips,
.clx-tools,
.clx-marks,
.clx-soon-list,
.clx-foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Utilities
   Last in the file on purpose: these are single-property overrides and must
   out-cascade equal-specificity component rules such as .clx-mark-name.
   ========================================================================== */

/* Inline medium-weight emphasis. The reference set font-weight: 500 on the
   difficulty names inside the feature cards; the accent utilities carry
   colour only, and no existing class carries weight on its own. */
.clx-medium { font-weight: 500; }

.clx-accent-terracotta { color: var(--terracotta); }
.clx-accent-amber      { color: var(--amber); }
.clx-accent-teal       { color: var(--teal); }
.clx-accent-x          { color: var(--cell-x); }
.clx-on-dark           { color: var(--bg); }

/* For section wrappers whose whole content is centred. */
.clx-center { text-align: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .clx-hero  { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .clx-h1    { font-size: 40px; }
  .clx-h2    { font-size: 30px; }
  .clx-pad   { padding-left: var(--space-lg); padding-right: var(--space-lg); }

  .clx-hero     { padding-left: var(--space-lg); padding-right: var(--space-lg); }
  .clx-h2-xl    { font-size: 34px; }
  .clx-idea     { font-size: 24px; }
  .clx-features { grid-template-columns: repeat(2, 1fr); }
  /* .clx-shots and .clx-steps stay multi-column here and collapse at 700px,
     matching the reference — a tablet keeps three screenshots side by side. */
}

@media (max-width: 700px) {
  .clx-header       { padding: 12px var(--space-md); }
  .clx-nav          { gap: 14px; }
  .clx-nav-features { display: none; }
  .clx-nav-buy      { padding: 11px 18px; }

  .clx-pad      { padding-top: 56px; padding-bottom: 56px; }
  .clx-hero     { padding: var(--space-2xl) var(--space-lg); }
  .clx-features { grid-template-columns: 1fr; }
  .clx-shots    { grid-template-columns: 1fr; }
  .clx-steps    { grid-template-columns: 1fr; gap: var(--space-xl); }
  .clx-idea     { font-size: 22px; }
  .clx-lead     { font-size: 16px; }
  .clx-marks    { gap: var(--space-lg); }
  .clx-content  { padding-left: var(--space-md); padding-right: var(--space-md); }
  .clx-footpad  { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .clx-h1         { font-size: 34px; }
  .clx-h2         { font-size: 26px; }
  .clx-h2-xl      { font-size: 28px; }
  .clx-page-title { font-size: var(--text-2xl); }
  .clx-democard   { padding: var(--space-lg) 12px 20px; }
  .clx-content    { padding: 40px var(--space-md) 56px; }

  /* The board's fixed tracks total 380px and cannot fit a 360px phone. Drop
     the trailing spacer and let the cells share the remaining width; the
     label column narrows to 3rem. Cells go fluid, height stays 54px. */
  .clx-demo-row   { grid-template-columns: 3rem repeat(4, 1fr); }
  .clx-catcard    { padding: var(--space-md) var(--space-lg); }
  .clx-btn-lg,
  .clx-btn-xl     { width: 100%; }
}
