:root{font-family:system-ui,sans-serif;color:#253f36;background:#f7f3e9}*{box-sizing:border-box}body{margin:0}main{max-width:1100px;margin:auto;padding:clamp(18px,4vw,44px)}header{max-width:760px}.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-weight:700;color:#7c603e;font-size:.75rem}h1{font-family:Georgia,serif;font-size:clamp(2rem,5vw,3.3rem);line-height:1.05;margin:.3em 0}header p,.instructions{line-height:1.5}.instructions{background:#e6eee3;border-left:4px solid #6d8d6b;padding:.8rem 1rem;border-radius:4px}.layout{display:grid;grid-template-columns:minmax(290px,1fr) minmax(280px,1fr);gap:2rem;margin-top:1.5rem}.active-clue{font-weight:650;min-height:3em}.grid{display:grid;grid-template-columns:repeat(var(--cols),1fr);gap:2px;background:#244139;border:3px solid #244139;max-width:520px;aspect-ratio:var(--cols)/var(--rows)}.cell{position:relative;min-width:0;background:#fffdf7}.cell.block{background:#244139}.cell.selected{background:#d7e9cb}.cell.current{background:#f5dea5}.cell.wrong{background:#f3c5b8}.cell input{width:100%;height:100%;border:0;border-radius:0;background:transparent;text-transform:uppercase;text-align:center;font:700 clamp(14px,3vw,25px) system-ui,sans-serif;color:#233c31;padding:5px 0 0;outline-offset:-3px}.cell .num{position:absolute;top:1px;left:2px;font-size:clamp(8px,1vw,11px);line-height:1;pointer-events:none;color:#354039}.controls{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1rem}button{font:inherit;cursor:pointer} .controls button{border:1px solid #486b54;background:#fffdf7;color:#294437;border-radius:6px;padding:.55rem .8rem}.controls button:hover{background:#e6eee3}button:focus-visible,input:focus-visible{outline:3px solid #bc7a31;outline-offset:2px}.clues{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem}.clues h2{font-family:Georgia,serif;margin:.25rem 0 .5rem}.clues ol{list-style:none;margin:0;padding:0}.clues li{margin:.15rem 0}.clues button{text-align:left;border:0;border-radius:5px;padding:.5rem;background:transparent;color:inherit;line-height:1.35;width:100%}.clues button:hover,.clues button.selected{background:#e1ebd9}.clues strong{color:#466b4c}#status{min-height:1.5em}footer{border-top:1px solid #cad4c2;margin-top:2rem;padding-top:1rem;font-size:.85rem;color:#51665b}@media(max-width:720px){.layout{grid-template-columns:1fr}.grid{max-width:520px}.clues{gap:.5rem}}@media(max-width:380px){.clues{grid-template-columns:1fr}}

/* Windows contrast themes can replace backgrounds, so draw the grid with
   explicit system-color borders rather than relying on the gap color. */
@media (forced-colors: active) {
  .grid { gap: 0; background: Canvas; border: 2px solid CanvasText; }
  .cell { background: Canvas; border: 1px solid CanvasText; }
  .cell input { background: Canvas; color: CanvasText; }
  .cell .num { color: CanvasText; }
  .cell.block {
    forced-color-adjust: none;
    background: CanvasText;
    border-color: Canvas;
  }
  .cell.selected { border: 2px dashed Highlight; }
  .cell.wrong::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 2px dashed Highlight;
    pointer-events: none;
  }
  .cell.current { outline: 3px solid Highlight; outline-offset: -3px; z-index: 1; }
  .cell.current.wrong::after { inset: 6px; }
  .cell input:focus-visible { outline: 3px solid Highlight; outline-offset: -3px; }
}
