/* NV Sudoku — a newspaper puzzle page: newsprint, black serif numerals, red-pencil notes. Fonts: IBM Plex (SIL OFL). */
@font-face { font-family: 'Plex Mono'; src: url('./fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url('./fonts/ibm-plex-sans-condensed-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url('./fonts/ibm-plex-sans-condensed-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
:root {
  --news: #f1ebdd; --news-2: #e8e0cd; --ink: #151412; --soft: #5f5a50; --rule: #151412; --thin: rgba(21, 20, 18, 0.28); --pencil: #b23b2a; --sel: #f3d77a; --peer: rgba(21, 20, 18, 0.06); --same: rgba(243, 215, 122, 0.55); --bad: #c0392b;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: 'Plex Condensed', 'Arial Narrow', system-ui, sans-serif; --mono: 'Plex Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 500 16px/1.45 var(--sans); background: #cfc6b2; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 2px; }
a { color: var(--pencil); }
.paper {
  width: min(600px, calc(100% - 24px)); margin: clamp(12px, 3vw, 32px) auto; padding: clamp(14px, 3vw, 28px); display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr);
  background: radial-gradient(rgba(21, 20, 18, 0.035) 1px, transparent 1px) 0 0 / 4px 4px, linear-gradient(var(--news), var(--news-2)); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}
.masthead { text-align: center; border-top: 4px double var(--ink); border-bottom: 1px solid var(--ink); padding: 8px 0; }
.brand { margin: 0; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--soft); }
.brand span { color: var(--ink); font-weight: 600; }
h1 { margin: 0; font: 700 clamp(40px, 10vw, 62px)/1 var(--serif); letter-spacing: 0.02em; }
.dateline { margin: 2px 0 0; font: italic 400 14px var(--serif); color: var(--soft); }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.acts { display: flex; gap: 8px; }
.acts select, .btn { min-height: 38px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 4px; background: transparent; cursor: pointer; font-weight: 600; }
.btn:hover:not(:disabled) { background: rgba(21, 20, 18, 0.06); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn--ink { background: var(--ink); color: var(--news); }
.btn--ink:hover:not(:disabled) { background: #33302b; }
.btn[aria-pressed='true'] { background: var(--pencil); border-color: var(--pencil); color: #fff; }
.clock { margin: 0; font: 400 18px var(--mono); }
.link { border: 0; background: none; text-decoration: underline; cursor: pointer; font: 500 14px var(--sans); color: var(--pencil); }
.board-wrap { position: relative; }
.board { display: grid; grid-template-columns: repeat(9, 1fr); aspect-ratio: 1; border: 3px solid var(--rule); background: #fbf8f0; user-select: none; }
.cell {
  position: relative; border: 0; border-right: 1px solid var(--thin); border-bottom: 1px solid var(--thin); background: transparent; padding: 0; cursor: pointer;
  display: grid; place-items: center; font: 600 clamp(20px, 6vw, 32px)/1 var(--serif); color: #2a4a8a;
}
.cell:nth-child(9n) { border-right: 0; }
.cell:nth-child(n + 73) { border-bottom: 0; }
.cell.br { border-right: 2px solid var(--rule); }
.cell.bb { border-bottom: 2px solid var(--rule); }
.cell.given { color: var(--ink); cursor: default; }
.cell.peer { background: var(--peer); }
.cell.same { background: var(--same); }
.cell.sel { background: var(--sel); }
.cell.bad { color: var(--bad); text-decoration: underline wavy var(--bad) 1px; text-underline-offset: 4px; }
.cell.hinted { color: #2f7a52; }
.notes { position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); font: 500 clamp(8px, 2vw, 12px)/1 var(--sans); color: var(--pencil); }
.notes span { display: grid; place-items: center; }
.veil { position: absolute; inset: 0; background: rgba(241, 235, 221, 0.96); display: grid; place-content: center; gap: 8px; text-align: center; padding: 16px; }
.veil p { margin: 0; font: 700 clamp(28px, 7vw, 40px) var(--serif); }
.veil .veil__sub { font: 500 16px var(--sans); color: var(--soft); }
.pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.pad button { min-height: 52px; border: 1px solid var(--ink); border-radius: 4px; background: #fbf8f0; cursor: pointer; display: grid; place-items: center; font: 700 clamp(20px, 5vw, 26px)/1 var(--serif); }
.pad button small { font: 500 10px var(--sans); color: var(--soft); }
.pad button:disabled { opacity: 0.35; cursor: default; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.tools b { font-weight: 600; }
.tog { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.tog input { accent-color: var(--pencil); width: 16px; height: 16px; }
.status { margin: 0; min-height: 1.45em; text-align: center; font: italic 400 16px var(--serif); }
.hint { margin: 0; text-align: center; font-size: 12px; color: var(--soft); }
kbd { font: 400 11px var(--mono); border: 1px solid var(--thin); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: #fbf8f0; }
.foot { text-align: center; font-size: 12px; color: var(--soft); border-top: 1px solid var(--ink); padding-top: 8px; }
