/* words-into-birds.html - 'Words Into Birds', the weekly crossword.
   Builds on bring-it-all-back.css (loaded first); only what's new lives here.
   Gold marks the square you're on and the answer it's in (fills and borders only, never words);
   red marks a wrong letter (a bar under it, never the letter itself). */

.wb-meta { font-size: 0.78rem; color: var(--muted2); font-variant-numeric: tabular-nums; }
.wb-meta span:first-child { color: var(--text); font-weight: 600; }

/* The clue you're on, stuck to the top of the screen while you scroll the grid */
.wb-cluebar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px; min-height: 58px; background: var(--bg3); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 10px; }
.wb-cluebar-text { flex: 1; font-size: 0.86rem; line-height: 1.35; color: var(--text); }
.wb-cluebar-text b { color: #fff; font-weight: 700; margin-right: 6px; white-space: nowrap; }
.wb-enum { color: var(--muted2); white-space: nowrap; }
.wb-nav { flex: none; width: 34px; height: 34px; background: none; border: 1px solid rgba(204, 162, 60, 0.6); border-radius: 8px; color: var(--text); font-family: 'Poppins', sans-serif; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.wb-nav:hover { background: rgba(204, 162, 60, 0.1); }
.wb-nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* The grid. --cs (square size) is set by the script to fit the screen. */
.wb-board-wrap { position: relative; margin-top: 12px; }
.wb-board { display: grid; width: max-content; max-width: 100%; margin: 0 auto; }
/* Rows are for screen readers only: no box of their own, so the squares stay grid items */
.wb-row { display: contents; }
.wb-sq { position: relative; width: var(--cs); height: var(--cs); }
.wb-sq.on { background: #16121f; border: 1px solid rgba(217, 217, 217, 0.35); margin: -0.5px; cursor: pointer; }
.wb-sq.on.word { background: #2a2338; }
.wb-sq.on.cur { background: rgba(204, 162, 60, 0.32); outline: 2px solid var(--gold); outline-offset: -2px; z-index: 2; }
.wb-sq.on.bad::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 9%; height: 2px; background: var(--red); }
/* A letter you were shown: a small gold bar across the top */
.wb-sq.on.shown::before { content: ''; position: absolute; left: 35%; right: 35%; top: 7%; height: 2px; background: var(--gold); }
.wb-n { position: absolute; top: 0; left: 2px; font-size: max(7px, calc(var(--cs) * 0.3)); line-height: 1.1; color: var(--muted2); pointer-events: none; }
.wb-l { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: calc(var(--cs) * 0.12); font-size: calc(var(--cs) * 0.56); font-weight: 600; color: #fff; pointer-events: none; }
.wb-board.solved .wb-sq.on { border-color: rgba(204, 162, 60, 0.8); }
.wb-board.done .wb-sq.on { cursor: default; }
/* The keyboard catcher: invisible, but focusable so phones bring up their keyboard.
   16px stops iPhones zooming in when it gets focus. */
.wb-keys { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; caret-color: transparent; }

.wb-controls { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.wb-controls .bia-btn { padding: 10px 14px; font-size: 0.74rem; }
.wb-controls .bia-btn.sure { border-color: var(--red); }
.wb-msg { text-align: center; }

/* Clue lists */
.wb-clues { margin-top: 22px; }
.wb-clues-h { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted2); padding-bottom: 6px; border-bottom: 1px solid var(--border); margin: 14px 0 4px; }
.wb-list { list-style: none; }
.wb-list li { display: flex; gap: 10px; padding: 7px 8px; border-left: 3px solid transparent; border-radius: 6px; font-size: 0.85rem; line-height: 1.4; color: var(--text); cursor: pointer; }
.wb-list li:hover { background: #16121f; }
.wb-list li.act { background: var(--bg3); border-left-color: var(--gold); }
.wb-list li.full { color: var(--muted2); }
.wb-list li.full .wb-cn { color: var(--muted2); }
.wb-cn { min-width: 22px; font-weight: 700; color: #fff; }
.wb-list li:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

@media (max-width: 420px) {
  .wb-cluebar { padding: 6px 8px; gap: 6px; }
  .wb-cluebar-text { font-size: 0.8rem; }
  .wb-nav { width: 30px; height: 30px; }
  .wb-controls .bia-btn { padding: 9px 11px; font-size: 0.7rem; }
}
