@font-face { font-family: Rubik; src: url(/fonts/rubik-hebrew.woff2) format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Rubik; src: url(/fonts/rubik-latin.woff2) format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+2000-200B, U+2011-206F, U+20AC; }
:root {
  --primary: #1D4ED8; --on-primary: #FFFFFF; --background: #FFF8F1; --surface: #FFFFFF; --border: #E2E8F0;
  --text: #17253B; --muted: #4B5563; --cold: #0369A1; --lukewarm: #7C3AED; --warm: #BE185D; --hot: #B91C1C;
  --cold-tint: #E0F2FE; --lukewarm-tint: #EDE9FE; --warm-tint: #FDF2F8; --hot-tint: #FEF2F2;
  --xs: 8px; --sm: 14px; --md: 18px; --lg: 32px;
}
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--background); color: var(--text); font: 400 17px/1.55 Rubik, sans-serif; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 700; }
.small { font-size: 14px; line-height: 1.5; }
.muted { color: var(--muted); }
.error { color: var(--hot); }
.center { text-align: center; }
.bold { font-weight: 700; }
.stack-xs { display: flex; flex-direction: column; gap: var(--xs); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sm); }
.page { min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 375px; margin: 0 auto; padding: var(--lg) var(--md); display: flex; flex-direction: column; justify-content: space-between; gap: var(--md); }
.page.start { justify-content: flex-start; gap: var(--lg); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: var(--md); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--md); background: var(--primary); color: var(--on-primary); border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; flex-shrink: 0; text-decoration: none; }
.primary:hover { opacity: .9; }
.primary:disabled { background: var(--surface); color: var(--muted); border: 1px solid var(--border); cursor: not-allowed; opacity: 1; }
.primary.wide { width: 100%; padding: 0 var(--lg); }

.hero { display: flex; flex-direction: column; align-items: center; gap: var(--sm); text-align: center; padding-top: var(--sm); }
.hero h1 { width: 100%; }
.hero img { width: 100%; max-width: 300px; height: auto; margin: 0 auto; mix-blend-mode: multiply; }
.hero p { text-wrap: pretty; }
.demo { display: flex; flex-direction: column; align-items: center; gap: var(--sm); }
.demo .gauge { width: 100%; max-width: 240px; }
.chip { padding: var(--xs) var(--md); border-radius: 10px; font-weight: 700; }
.chip.hot { color: var(--hot); background: var(--hot-tint); }

.arc { fill: none; stroke: url(#heat); stroke-width: 18; stroke-linecap: round; }
.needle { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.hub { fill: var(--text); }

.content { display: flex; flex-direction: column; gap: var(--md); }
.title { display: flex; flex-direction: column; align-items: center; gap: var(--xs); text-align: center; }
.board, .ask { display: flex; flex-direction: column; gap: var(--md); }
.clue { font-size: 40px; line-height: 1.3; font-weight: 700; text-align: center; padding: var(--xs) 0; overflow-wrap: anywhere; }
.row { display: flex; align-items: center; gap: var(--xs); }
input { flex: 1; min-width: 0; width: 100%; min-height: 48px; padding: 0 var(--md); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
input::placeholder { color: var(--muted); opacity: 1; }
input:focus { border-color: var(--primary); }
input[aria-invalid=true] { border-color: var(--hot); }
input:disabled { background: var(--background); color: var(--muted); cursor: not-allowed; }
input:disabled::placeholder { opacity: .6; }
.meter { display: flex; align-items: center; justify-content: space-between; gap: var(--md); padding: var(--sm) var(--md); }
.meter .gauge { width: 112px; flex-shrink: 0; }
.meter .arc { stroke-width: 20; }
.meter .needle { stroke-width: 5; }
.reading { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.reading .big { font-size: 32px; line-height: 1.2; font-weight: 700; color: var(--hot); }
.t-cold { color: var(--cold); } .t-lukewarm { color: var(--lukewarm); } .t-warm { color: var(--warm); } .t-hot { color: var(--hot); }
.meter.solved { padding: var(--md); }
.meter.solved .reading { gap: var(--xs); }
.meter.solved .gauge { width: 100px; }

.guesses { list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.guesses li { display: flex; align-items: center; justify-content: space-between; gap: var(--md); min-height: 48px; padding: var(--sm) var(--md); }
.guesses li + li { border-top: 1px solid var(--border); }
.guesses .word { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.guesses .end { display: flex; align-items: center; gap: var(--md); flex-shrink: 0; }
.guesses .label { font-weight: 500; }
.guesses .score { font-weight: 700; min-width: 3ch; text-align: end; }
.guesses .cold { color: var(--cold); background: var(--cold-tint); }
.guesses .lukewarm { color: var(--lukewarm); background: var(--lukewarm-tint); }
.guesses .warm { color: var(--warm); background: var(--warm-tint); }
.guesses .hot { color: var(--hot); background: var(--hot-tint); }
.guesses .solved { color: var(--on-primary); background: var(--hot); }
.guesses .solved .label { font-weight: 700; }

@media (min-width: 768px) {
  .page.puzzle { max-width: 790px; padding: var(--lg); gap: var(--lg); }
  .puzzle .content { gap: var(--lg); }
  .puzzle .title { flex-direction: row; align-items: baseline; justify-content: space-between; gap: var(--md); }
  .board { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lg); align-items: center; }
  .ask { gap: var(--md); }
  .clue { text-align: start; padding: 0; }
  .row .primary { padding: 0 var(--lg); }
  .meter:not(.solved) { flex-direction: column-reverse; justify-content: center; padding: var(--md); gap: var(--sm); }
  .meter:not(.solved) .gauge { width: 100%; max-width: 220px; }
  .meter:not(.solved) .arc { stroke-width: 18; }
  .meter:not(.solved) .needle { stroke-width: 4; }
  .meter:not(.solved) .hub { r: 7px; }
  .meter:not(.solved) .kicker { display: none; }
}
/* 8b: 790px of play area, without the page padding. */
@media (min-width: 854px) { .page.puzzle { max-width: 854px; } }
#notice { width: 100%; max-width: 339px; margin: 0 auto; }
.link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--sm); color: var(--muted); font-size: 14px; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; border-radius: 10px; }
.link:hover { color: var(--text); }
.reveal { display: flex; flex-direction: column; align-items: center; gap: var(--md); padding: var(--lg); text-align: center; }
.reveal .stack-xs { align-items: center; }
.reveal hr { width: 100%; border: 0; border-top: 1px solid var(--border); }
.tag { padding: var(--xs) var(--sm); border-radius: 10px; font-size: 14px; line-height: 1.5; font-weight: 700; }
.tag.cold { color: var(--cold); background: var(--cold-tint); }
.tag.hot { color: var(--hot); background: var(--hot-tint); }
.clues-old { font-size: 32px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.answer { font-size: 40px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.foot { padding-top: var(--sm); text-align: center; }
.credits { list-style: none; display: flex; flex-direction: column; gap: var(--sm); }
.credits a { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); text-underline-offset: 4px; }
/* Live regions stay rendered, and take no room in the layout while they are empty. */
.sr-only, #msg:empty, #notice-text:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#reading:focus, #reveal:focus { outline: none; }
#word:placeholder-shown { direction: rtl; }
