/* finals.css — dashboard (index.html) and Challenge rounds (challenge.html). Colors come from theme.css. */
@font-face { font-family: "Noto Serif Hebrew"; src: url("fonts/NotoSerifHebrew-Regular.ttf") format("truetype"); font-weight: 400; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif; line-height: 1.45; }
.wrap { width: min(880px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 72px; }
.eyebrow { margin: 0 0 6px; letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; color: var(--muted); }
h1 { margin: 0; font-weight: 500; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.02em; }
h2 { margin: 2rem 0 .7rem; font-weight: 500; font-size: 1.2rem; }
h3 { margin: 0 0 .3rem; font-weight: 600; font-size: 1rem; }
a { color: var(--accent); }
.lede, .muted { color: var(--muted); }
.lede { margin: 6px 0 0; max-width: 42rem; }
.he { font-family: "Noto Serif Hebrew", "SBL Hebrew", "Times New Roman", serif; direction: rtl; unicode-bidi: isolate; }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 7px 16px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn.sm { padding: 3px 11px; font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.kbd { font-family: ui-monospace, Consolas, monospace; font-size: .8em; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }

/* ---- Dashboard ---- */
.hub-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.count { text-align: right; }
.count b { display: block; font-size: 2.4rem; font-weight: 500; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.count span { color: var(--muted); font-size: .85rem; }
.count button { font: inherit; font-size: .78rem; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
.modes { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode { display: block; text-align: left; font: inherit; color: inherit; background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
.mode:hover, .mode:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.mode strong { display: block; font-size: 1.15rem; font-weight: 600; }
.mode span { display: block; margin-top: 3px; color: var(--muted); font-size: .9rem; }
.mode em { font-style: normal; color: var(--accent); }
.mode span .kbd { display: inline; margin: 0; color: var(--ink); }
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: 0; }
.plan input { width: 20px; height: 20px; accent-color: var(--accent); }
.plan li.done .what { text-decoration: line-through; color: var(--muted); }
.plan .what small { display: block; color: var(--muted); }
.weak { width: 100%; border-collapse: collapse; }
.weak td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.weak tr:first-child td { border-top: 0; }
.weak .t { width: 40%; }
.weak .bar-c { width: 22%; }
.weak .pct { width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }
.weak .go { text-align: right; white-space: nowrap; }
.weak .go a { margin-left: 4px; }
.weak tr.low .pct { color: var(--warn); font-weight: 600; }
.weak tr.nodata td { color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.weak tr.low .bar i { background: var(--warn); }
@media (max-width: 560px) { .weak .bar-c { display: none; } .weak .go a.opt2 { display: none; } }
.lib { display: grid; gap: 14px; }
@media (min-width: 700px) { .lib { grid-template-columns: 1fr 1fr; } }
.lib section { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.lib h3 { margin-bottom: 6px; }
.lib a { display: block; padding: 4px 0; text-decoration: none; }
.lib a:hover { text-decoration: underline; }
.lib a small { color: var(--muted); }
details.more { margin-top: 14px; }
details.more summary { cursor: pointer; color: var(--muted); }
details.more .cols { columns: 2 14rem; margin-top: 8px; }
details.more .cols a { display: block; padding: 2px 0; }
.foot { margin-top: 2rem; color: var(--muted); font-size: .88rem; }

/* ---- Challenge ---- */
.ch-setup .row { margin: 14px 0; }
.ch-setup .row > b { display: block; margin-bottom: 6px; font-weight: 600; }
.ch-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 8px; font-variant-numeric: tabular-nums; }
.ch-timer { border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; }
.ch-timer.low { color: var(--warn); border-color: var(--warn); }
.ch-prog { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.ch-prog i { display: block; height: 100%; background: var(--accent); }
.ch-q .topic { color: var(--muted); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.ch-q .heb { font-family: "Noto Serif Hebrew", serif; font-size: clamp(1.9rem, 6vw, 2.6rem); direction: rtl; unicode-bidi: isolate; text-align: center; margin: 12px 0 4px; line-height: 1.6; }
.ch-q .prompt { text-align: center; margin-bottom: 14px; }
.ch-opts { display: grid; gap: 8px; }
@media (min-width: 560px) { .ch-opts { grid-template-columns: 1fr 1fr; } }
.ch-opt { font: inherit; text-align: left; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; min-height: 48px; }
.ch-opt:hover:not(:disabled) { border-color: var(--accent); }
.ch-opt .n { color: var(--muted); margin-right: 8px; font-size: .85em; }
.ch-opt.ok { background: #2f6b3f; border-color: #2f6b3f; color: #fff; }
.ch-opt.no { background: #9b2f2f; border-color: #9b2f2f; color: #fff; }
.ch-opt.ok .n, .ch-opt.no .n { color: inherit; }
.ch-fb { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 6px; }
.ch-fb.bad { border-color: var(--warn); background: var(--warn-soft); }
.ch-next { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ch-res h2 { margin-top: 0; }
.ch-miss { border-top: 1px solid var(--line); padding: 10px 0; }
.ch-miss .heb { font-family: "Noto Serif Hebrew", serif; font-size: 1.5rem; direction: rtl; unicode-bidi: isolate; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---- Find (theme.js) is styled in theme.css ---- */
@media (max-width: 560px) {
  .hub-top { flex-direction: column; align-items: stretch; }
  .count { text-align: left; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
  .count b { font-size: 1.9rem; }
  .count br { display: none; }
  .plan li { grid-template-columns: 28px 1fr; }
  .plan .go { grid-column: 2; }
}
