/* Range & Reason — logic puzzles, playful edition.
   A night-sky arcade hero, a bright colour for every puzzle category,
   chunky press-down buttons and sticker-style chips. */
:root {
  --night: #2A1B17;
  --night-2: rgba(255,255,255,.28);
  --brand: #FF6B4A;
  --brand-2: #FF9A3D;
  --brand-grad: linear-gradient(120deg, #FF5E4A 0%, #FF7A45 45%, #FFA23D 100%);
  --on-brand: #2A1B17;
  --on-brand-2: #5A2414;
  --sky: #FFF6EF;
  --dot: #FBDCC9;
  --card: #FFFFFF;
  --ink: #2A1B17;
  --ink-2: #5B4740;
  --ink-3: #8A7670;
  --line: #F1DED2;
  --coral: #FF5D4F;
  --teal: #10B3A3;
  --amber: #FFB21E;
  --violet: #7C5CFF;
  --pink: #FF5FA8;
  --sun: #FFE04B;
  --ok: #10A060;
  --cross: #E5372B;
  --focus: #2E7BFF;
  --r-s: 10px;
  --r-m: 18px;
  --r-l: 26px;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #1C1310; --dot: #3A2620; --card: #2A1D18; --ink: #FFF3EC; --ink-2: #E9D3C8; --ink-3: #B89A8E; --line: #4A342B;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 17px/1.62 var(--body);
  background: var(--sky) radial-gradient(var(--dot) 1.4px, transparent 1.6px) 0 0 / 22px 22px;
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--violet); }
a:hover { text-decoration-color: var(--coral); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- masthead ---------- */
.mast { background: var(--brand-grad); color: var(--on-brand); position: sticky; top: 0; z-index: 20; box-shadow: 0 4px 0 var(--night); }
.mast__in { display: flex; align-items: center; gap: 24px; min-height: 66px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); text-decoration: none; color: var(--on-brand); letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; flex: none; transform: rotate(-6deg); transition: transform .3s; }
.brand:hover svg { transform: rotate(6deg) scale(1.08); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; font-size: 15px; font-weight: 700; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 99px; color: var(--on-brand); }
.nav a:hover { background: rgba(255,255,255,.35); }
.nav a[aria-current="page"] { background: var(--night); color: var(--sun); }
@media (max-width: 760px) {
  .mast { position: static; }
  .mast__in { padding: 10px 0; gap: 8px; }
  .nav { margin-left: -12px; width: calc(100% + 12px); font-size: 14px; gap: 2px; }
  .nav a { padding: 6px 10px; }
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; max-width: 15ch; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; margin-top: 1.5em; }
h3 { font-size: 1.22rem; font-weight: 800; margin-top: 1.4em; letter-spacing: -0.01em; }
p, li { max-width: var(--measure); }
.lede { font-size: clamp(1.08rem, 1.9vw, 1.28rem); color: var(--ink-2); max-width: 54ch; }
.muted { color: var(--ink-3); font-size: 15px; }
.prose { padding-block: 44px 72px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.crumbs { font-size: 14.5px; color: var(--ink-3); margin: 0 0 16px; font-weight: 700; }
.crumbs a { color: var(--violet); text-decoration: none; }
.updated { font-size: 14.5px; color: var(--ink-3); margin-top: -6px; }

/* ---------- buttons: chunky, press down ---------- */
.btn { --b: var(--night); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 15.5px/1 var(--display); letter-spacing: 0; padding: 13px 20px; border-radius: 99px; border: 2.5px solid var(--b); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 var(--b); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--b); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--b); }
.btn--solid { background: var(--violet); color: #fff; }
.btn--sun { background: var(--sun); color: var(--night); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { --b: #000; } }

/* ---------- hero: night sky arcade ---------- */
.hero { background: var(--brand-grad); color: var(--on-brand); position: relative; overflow: hidden; padding: 56px 0 120px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60px; background: var(--sky) radial-gradient(var(--dot) 1.4px, transparent 1.6px) 0 0 / 22px 22px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero h1 { color: var(--on-brand); margin-bottom: 14px; position: relative; z-index: 2; }
.hero h1 .mark { display: inline-block; background: var(--sun); color: var(--night); padding: 0 .18em; border-radius: 12px; transform: rotate(-2deg); box-shadow: 0 5px 0 var(--night); }
.hero .lede { color: var(--on-brand-2); position: relative; z-index: 2; font-weight: 700; }
.tiles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tile { position: absolute; width: var(--s, 64px); height: var(--s, 64px); border-radius: 16px; display: grid; place-items: center; font: 800 calc(var(--s, 64px) * .5)/1 var(--display); color: var(--night); box-shadow: 0 6px 0 rgba(0,0,0,.25); transform: rotate(var(--r, 0deg)); animation: bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@media (max-width: 860px) { .tile { opacity: .3; } }
@media (max-width: 640px) { .tile { display: none; } .tile:first-child { display: grid; --s: 52px !important; top: 18px !important; right: 14px !important; opacity: 1; } }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; position: relative; z-index: 2; }
.stat { background: rgba(255,255,255,.88); border: 2.5px solid var(--night); border-radius: var(--r-m); padding: 12px 18px; min-width: 132px; box-shadow: 0 4px 0 var(--night); }
.stat b { display: block; font: 800 1.9rem/1 var(--display); color: var(--brand); font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: #5B4740; font-weight: 700; }
.hero-board { margin-top: -96px; position: relative; z-index: 3; }

/* ---------- board ---------- */
.board { background: var(--card); border: 3px solid var(--night); border-radius: var(--r-l); padding: clamp(16px, 3vw, 30px); margin: 18px 0 30px; box-shadow: 0 10px 0 var(--night); position: relative; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .board { border-color: #000; box-shadow: 0 10px 0 #000; } }
.board__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 3px dotted var(--line); }
.board__title { font: 800 clamp(1.5rem, 2.8vw, 2rem)/1.05 var(--display); margin: 0; }
.board__meta { color: var(--ink-3); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.level { display: inline-block; font: 800 14px/1 var(--display); padding: 7px 12px; border-radius: 99px; color: var(--night); border: 2px solid var(--night); }
.level--easy { background: #8EF0C4; } .level--medium { background: var(--sun); } .level--hard { background: #FF9C92; }
.board__body { display: grid; grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.25fr); gap: 30px; align-items: start; }
@media (max-width: 880px) { .board__body { grid-template-columns: 1fr; } }
.board__body > * { min-width: 0; }

/* category colours */
.cat-c0 { --cc: var(--coral); --cc-soft: #FFE3E0; }
.cat-c1 { --cc: var(--teal); --cc-soft: #D5F6F2; }
.cat-c2 { --cc: var(--amber); --cc-soft: #FFF0CF; }
.cat-c3 { --cc: var(--violet); --cc-soft: #E8E2FF; }
.cat-c4 { --cc: var(--pink); --cc-soft: #FFE0EF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [class*="cat-c"] { --cc-soft: color-mix(in srgb, var(--cc) 22%, var(--card)); } }

.cast { margin: 0 0 14px; display: grid; gap: 7px; }
.cast__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cast__label { font: 800 13px/1 var(--display); color: #fff; background: var(--cc); padding: 6px 9px; border-radius: 8px; }
.chip { display: inline-block; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--cc-soft); color: var(--ink); border: 1.5px solid var(--cc); }

.clues { list-style: none; padding: 0; margin: 0; counter-reset: clue; }
.clues li { counter-increment: clue; position: relative; padding: 10px 12px 10px 48px; border-radius: var(--r-s); cursor: pointer; margin: 0 0 4px; max-width: none; transition: background .15s; }
.clues li::before { content: counter(clue); position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--night); color: var(--sun); text-align: center; font: 800 14px/28px var(--display); }
.clues li:hover { background: var(--sky); }
.clues li.is-used { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--cross); text-decoration-thickness: 2px; }
.clues li.is-used::before { content: "✓"; background: var(--ok); color: #fff; }
.clues-hint { font-size: 14px; color: var(--ink-3); margin: 10px 0 0; }

/* scratch grid */
.gridwrap { overflow-x: auto; padding-bottom: 6px; }
table.lg { border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.lg th { font-weight: 700; color: var(--ink-2); padding: 2px 6px; white-space: nowrap; }
table.lg thead th.itemhead { vertical-align: bottom; height: 112px; padding: 0 0 6px; }
table.lg thead th.itemhead span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; border-left: 3px solid var(--cc); padding-top: 4px; }
table.lg thead th.cathead { font: 800 13px/1 var(--display); color: #fff; background: var(--cc); text-align: center; padding: 7px 4px; border-radius: 10px 10px 0 0; }
table.lg tbody th { text-align: right; padding-right: 8px; }
table.lg tbody th.cathead { font: 800 13px/1 var(--display); color: #fff; background: var(--cc); writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; padding: 6px 7px; border-radius: 0 10px 10px 0; }
table.lg td { width: 32px; height: 32px; min-width: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: center; }
table.lg td.t1 { background: color-mix(in srgb, var(--teal) 7%, var(--card)); }
table.lg td.t2 { background: color-mix(in srgb, var(--amber) 9%, var(--card)); }
table.lg td.t3 { background: color-mix(in srgb, var(--violet) 7%, var(--card)); }
table.lg td.blk-r { border-right: 3px solid var(--night); }
table.lg tr.blk-b td { border-bottom: 3px solid var(--night); }
table.lg tbody tr:first-child td { border-top: 3px solid var(--night); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) table.lg td.blk-r { border-right-color: var(--ink-3); } :root:not([data-theme="light"]) table.lg tr.blk-b td, :root:not([data-theme="light"]) table.lg tbody tr:first-child td { border-color: var(--ink-3); } }
table.lg td button { all: unset; display: block; width: 100%; height: 32px; line-height: 32px; cursor: pointer; font: 800 17px/32px var(--display); transition: transform .12s; }
table.lg td button:hover { background: rgba(124, 92, 255, .14); }
table.lg td button:active { transform: scale(.85); }
table.lg td button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
table.lg td button.x { color: var(--cross); }
table.lg td button.x::after { content: "✕"; }
table.lg td button.o { background: var(--sun); color: var(--night); }
table.lg td button.o::after { content: "●"; }
.gridnote { font-size: 14px; color: var(--ink-3); margin: 8px 0 0; }

/* answers */
.answerswrap { overflow-x: auto; }
.answers { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 15.5px; }
.answers caption { text-align: left; font: 800 1.15rem/1.2 var(--display); margin-bottom: 10px; }
.answers th, .answers td { padding: 7px 5px; text-align: left; border-bottom: 1px solid var(--line); }
.answers tbody th { font-weight: 800; }
.answers select { font: 700 15px var(--body); padding: 8px 10px; border: 2px solid var(--line); border-radius: var(--r-s); background: var(--card); color: var(--ink); width: 100%; min-width: 108px; cursor: pointer; }
.answers select:hover { border-color: var(--violet); }
.answers select.is-right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); animation: right-pulse .5s ease-out; }
.answers select.is-wrong { border-color: var(--cross); background: color-mix(in srgb, var(--cross) 12%, var(--card)); animation: wobble .4s; }
@keyframes right-pulse { 40% { transform: scale(1.07); } }
@keyframes wobble { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 560px) { .answers select { min-width: 86px; padding: 7px 5px; } .clues li { padding-left: 42px; } .clues li::before { left: 4px; } }
.status { min-height: 1.6em; font-weight: 800; margin: 10px 0 0; }
.status.good { color: var(--ok); } .status.bad { color: var(--cross); }

/* generator controls */
.levelpick { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 0; }
.seg { display: inline-flex; gap: 6px; padding: 5px; background: var(--card); border: 2.5px solid var(--night); border-radius: 99px; box-shadow: 0 4px 0 var(--night); }
.seg button { font: 800 15px/1 var(--display); padding: 10px 16px; border: 0; border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; }
.seg button[data-level="easy"][aria-pressed="true"] { background: #8EF0C4; color: var(--night); }
.seg button[data-level="medium"][aria-pressed="true"] { background: var(--sun); color: var(--night); }
.seg button[data-level="hard"][aria-pressed="true"] { background: #FF9C92; color: var(--night); }

/* ---------- tool cards ---------- */
.band { padding: 10px 0 44px; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.tool { --tc: var(--violet); display: block; text-decoration: none; padding: 22px; border-radius: var(--r-m); background: var(--card); border: 2.5px solid var(--night); box-shadow: 0 6px 0 var(--tc); transition: transform .15s, box-shadow .15s; }
.tool:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 10px 0 var(--tc); }
.tool__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--tc); color: #fff; display: grid; place-items: center; font: 800 22px/1 var(--display); margin-bottom: 14px; transform: rotate(-5deg); }
.tool h3 { margin: 0 0 6px; font-size: 1.25rem; }
.tool p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.tool--coral { --tc: var(--coral); } .tool--teal { --tc: var(--teal); } .tool--amber { --tc: var(--amber); } .tool--pink { --tc: var(--pink); }
.tool--amber .tool__icon { color: var(--night); }

/* ---------- article bits ---------- */
.callout { border: 2.5px solid var(--night); background: var(--sun); color: #2A1B17; padding: 16px 20px; border-radius: var(--r-m); margin: 22px 0; max-width: var(--measure); box-shadow: 0 5px 0 var(--night); }
.callout p { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; margin-bottom: 16px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -3px; width: 36px; height: 36px; border-radius: 12px; background: var(--violet); color: #fff; text-align: center; font: 800 17px/36px var(--display); transform: rotate(-6deg); }
.steps li:nth-child(2)::before { background: var(--teal); } .steps li:nth-child(3)::before { background: var(--coral); } .steps li:nth-child(4)::before { background: var(--amber); color: var(--night); } .steps li:nth-child(5)::before { background: var(--pink); }
.tablewrap { overflow-x: auto; margin: 16px 0; border-radius: var(--r-m); border: 2.5px solid var(--night); }
table.data { border-collapse: collapse; background: var(--card); font-size: 15px; min-width: 100%; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
table.data th { font-family: var(--display); font-weight: 800; background: var(--night); color: #fff; }
table.data td.unique { background: color-mix(in srgb, var(--sun) 55%, var(--card)); font-weight: 800; }
.page-head { background: var(--brand-grad); color: var(--on-brand); padding: 40px 0 70px; position: relative; }
.page-head::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40px; background: var(--sky) radial-gradient(var(--dot) 1.4px, transparent 1.6px) 0 0 / 22px 22px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.page-head h1 { color: var(--on-brand); }
.page-head .lede { color: var(--on-brand-2); font-weight: 700; }
.page-head .crumbs a { color: var(--on-brand); text-decoration: underline; text-decoration-color: var(--sun); }
.page-head .crumbs { color: var(--on-brand-2); }
.page-head .updated { color: var(--on-brand-2); }

/* ---------- kakuro ---------- */
.kk-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.kk-controls label { font-weight: 800; }
.kk-controls select { font: 700 15px var(--body); padding: 10px; border: 2.5px solid var(--night); border-radius: var(--r-s); background: var(--card); color: var(--ink); }
.kkwrap { overflow-x: auto; padding: 4px 8px 12px 0; }
.kk { display: grid; gap: 3px; padding: 3px; border-radius: 14px; width: max-content; max-width: 100%; background: var(--night); box-shadow: 0 8px 0 var(--brand); }
.kk .c { width: 54px; height: 54px; position: relative; background: var(--card); border-radius: 8px; }
.kk .c.b { background: #3B2A24; }
.kk .c.w button.tog { all: unset; position: absolute; inset: 0; cursor: pointer; border-radius: 8px; }
.kk .c.w button.tog:hover { background: var(--sky); }
.kk .c .digit { position: absolute; inset: 0; display: grid; place-items: center; font: 800 26px/1 var(--display); color: var(--brand); pointer-events: none; animation: pop-in .35s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pop-in { from { transform: scale(.2); opacity: 0; } }
.kk .c.b::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(to top right, transparent calc(50% - 1px), #7A5A4E calc(50% - 1px), #7A5A4E calc(50% + 1px), transparent calc(50% + 1px)); }
.kk .c.b input { position: absolute; width: 25px; height: 21px; border: 0; background: transparent; color: var(--sun); font: 800 15px/1 var(--display); text-align: center; padding: 0; }
.kk .c.b input::placeholder { color: transparent; }
.kk .c.b input:focus::placeholder { color: #C9A595; }
.kk .c.b input.across { right: 2px; top: 5px; }
.kk .c.b input.down { left: 2px; bottom: 5px; }
.kk .c.b button.tog { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; border: 0; background: transparent; color: #C9A595; font-size: 11px; cursor: pointer; padding: 0; }
.kk .c.w button.tog:focus-visible, .kk .c.b input:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
@media (max-width: 560px) { .kk .c { width: 40px; height: 40px; } .kk .c .digit { font-size: 20px; } .kk .c.b input { width: 19px; font-size: 12.5px; } }
.kk-msg { font-weight: 800; margin: 14px 0 0; min-height: 1.5em; }
.kk-msg.good { color: var(--ok); } .kk-msg.bad { color: var(--cross); }
.kk-msg ul { font-weight: 400; margin: 6px 0 0; }

/* ---------- win panel ---------- */
.win { margin-top: 18px; padding: 20px 22px; border: 3px solid var(--night); border-radius: var(--r-m); background: var(--sun); color: #2A1B17; box-shadow: 0 6px 0 var(--night); animation: win-in .5s cubic-bezier(.2,1.5,.4,1) both; }
.win[hidden] { display: none; }
.win__big { font: 800 clamp(2.2rem, 6vw, 3.2rem)/1 var(--display); margin: 0 0 8px; letter-spacing: -0.03em; }
.win__line { margin: 4px 0; font-size: 1.06rem; }
.win .btn { --b: #2A1B17; }
.win .btn--solid { background: var(--violet); color: #fff; }
.win .btn:not(.btn--solid) { background: #fff; color: #2A1B17; }
@keyframes win-in { from { transform: scale(.8) rotate(-3deg); opacity: 0; } }

/* ---------- footer ---------- */
.foot { background: var(--brand-grad); color: var(--on-brand-2); padding: 40px 0 44px; margin-top: 30px; font-size: 15px; box-shadow: 0 -4px 0 var(--night); }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.foot h2 { font-size: 1.05rem; margin: 0 0 10px; color: var(--on-brand); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 5px 0; }
.foot a { color: var(--on-brand); text-decoration-color: rgba(42,27,23,.45); font-weight: 700; }
.foot p { margin: 0 0 8px; }
@media (max-width: 720px) { .foot__in { grid-template-columns: 1fr; } }

/* ---------- print: a clean puzzle sheet ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .mast, .foot, .btnrow, .levelpick, .noprint, .clues-hint, .gridnote, .status, .crumbs, .band, .prose-after, .tiles, .stats, .win { display: none !important; }
  .hero, .page-head { background: #fff; color: #000; padding: 0; } .hero::after, .page-head::after { display: none; }
  .hero h1, .hero .lede { display: none; } .hero-board { margin-top: 0; }
  .board { box-shadow: none; border: 1px solid #000; margin: 0; }
  .board__body { grid-template-columns: 1fr 1fr; }
  .answers select { border: 0; border-bottom: 1px solid #000; appearance: none; -webkit-appearance: none; color: transparent; background: none; }
  table.lg td button.o, table.lg td button.x { background: none; color: transparent; }
  table.lg td { background: #fff !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.page-head + .prose { padding-top: 6px; }
.page-head + .prose > h2:first-child, .page-head + .prose > .levelpick:first-child { margin-top: 0; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --on-brand: #2A1B17; --on-brand-2: #5A2414; } :root:not([data-theme="light"]) .stat span { color: #5B4740; } }

/* six-category grids (Zebra puzzle) */
.cat-c5 { --cc: var(--ok); --cc-soft: #D6F5E6; }
.t4 { background: color-mix(in srgb, var(--pink) 7%, var(--card)); }
.t5 { background: color-mix(in srgb, var(--coral) 6%, var(--card)); }
.hintlist details { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px 14px; margin: 10px 0; background: var(--card); }
.hintlist summary { cursor: pointer; font-weight: 700; }
.print-sheet { break-after: page; page-break-after: always; margin: 28px 0; }
.print-sheet table.blank { border-collapse: collapse; width: 100%; margin-top: 10px; }
.print-sheet table.blank th, .print-sheet table.blank td { border: 1px solid #999; padding: 8px 10px; text-align: left; min-width: 70px; height: 34px; }
@media print { .print-sheet { margin: 0; border: 0; } .answerkey { break-before: page; page-break-before: always; } .prose-after.keep-print { display: block !important; } }
.board--wide .board__body { grid-template-columns: 1fr; }
.board--wide .clues { columns: 2 320px; column-gap: 28px; }
.board--wide .clues li { break-inside: avoid; }
@media print { .board--wide .board__body { grid-template-columns: 1fr; } }
.castline { margin: 4px 0; }
.sheet-clues li { margin: 4px 0; }
.print-sheet { border-top: 3px dotted var(--line); padding-top: 18px; }
@media print {
  .answerkey { display: block; }
  body.print-one .print-sheet:not(.is-printing), body.print-one .answerkey, body.print-one .page-head { display: none !important; }
  body.print-one .print-sheet.is-printing { break-after: auto; page-break-after: auto; }
  .sheets table.lg td { width: 22px; height: 22px; min-width: 22px; border: 1px solid #999 !important; }
}
@media print {
  @page { margin: 12mm; }
  .sheets .print-sheet { font-size: 10pt; padding-top: 0; border: 0; }
  .sheets .print-sheet h2 { font-size: 15pt; margin: 0 0 4px; }
  .sheets .print-sheet h3 { font-size: 11pt; margin: 8px 0 2px; }
  .sheets .print-sheet p, .sheets .castline { margin: 2px 0; }
  .sheets .sheet-clues { margin: 6px 0; } .sheets .sheet-clues li { margin: 1px 0; }
  .sheets table.lg td { width: 18px; height: 18px; min-width: 18px; }
  .sheets table.lg th { font-size: 8pt; padding: 1px 3px; }
  .sheets table.blank th, .sheets table.blank td { height: 22px; padding: 3px 6px; }
}
@media print {
  .sheets .print-sheet { font-size: 9.5pt; }
  .sheets table.lg td { width: 16px; height: 16px; min-width: 16px; }
  .sheets table.blank th, .sheets table.blank td { height: 18px; padding: 2px 6px; }
  body.print-one main > :not(.sheets) { display: none !important; }
}
@media print {
  .sheet-work { display: flex; gap: 14px; align-items: flex-start; }
  .sheet-grid { flex: 0 0 auto; } .sheet-ans { flex: 1 1 auto; }
  .sheet-ans h3 { margin-top: 0 !important; }
}
@media print {
  .board--wide { font-size: 9.5pt; padding: 10px !important; }
  .board--wide .gridwrap { overflow: visible; }
  .board--wide table.lg td { width: 15px; height: 15px; min-width: 15px; }
  .board--wide table.lg th { font-size: 7.5pt; padding: 1px 2px; }
  .board--wide .clues { columns: 2; } .board--wide .clues li { margin: 1px 0; padding-top: 2px; padding-bottom: 2px; }
  .board--wide .cast__row { margin: 2px 0; }
  .board--wide .board__body > div:last-child { break-before: page; page-break-before: always; }
  .board--wide .answers { margin-top: 10px; }
}
@media print {
  .board--wide table.lg td { width: 19px; height: 17px; min-width: 19px; }
  .board--wide .answers th, .board--wide .answers td { padding: 3px 4px; }
  .board--wide .board__head { margin-bottom: 8px; padding-bottom: 6px; }
}
