:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #162332;
  background: #eaf0f7;
  font-synthesis: none;
  --accent: #075e53;
  --border: #cbd7e3;
  --muted: #496075;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 2rem 1rem 3rem; }
main { margin: 0 auto; width: min(100%, 40rem); }
.study-label { color: #2d4961; font-size: .95rem; font-weight: 750; margin: 0 0 .65rem .2rem; }
.card { border: 1px solid var(--border); border-radius: 1.15rem; background: #fff; padding: clamp(1rem, 4vw, 2rem); box-shadow: 0 9px 27px #172f4812; }
h1 { font-size: clamp(1.38rem, 4vw, 2.25rem); line-height: 1.15; margin: 0 0 .9rem; }
.lead, p { line-height: 1.55; }
.lead { color: #334a5f; }
.note { padding: .7rem .85rem; background: #e8f3ef; color: #254b44; border-radius: .5rem; }
details { margin: 1rem 0 1.3rem; border-block: 1px solid #dce4eb; padding: .75rem 0; }
summary { cursor: pointer; font-weight: 650; }
details p { margin-bottom: .2rem; color: var(--muted); }
label { display: flex; align-items: center; gap: .65rem; margin-bottom: .7rem; }
input[type="checkbox"] { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; accent-color: var(--accent); }
input[type="text"] { width: 5rem; min-height: 2.7rem; text-align: center; border: 1px solid #8ca2b4; border-radius: .45rem; font: inherit; }
button { cursor: pointer; font: inherit; font-weight: 675; border: 1px solid transparent; border-radius: .6rem; min-height: 2.8rem; padding: .6rem .9rem; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #1c710a; outline-offset: 3px; }
.primary { background: var(--accent); color: #fff; }
.primary:hover:not(:disabled) { background: #064c43; }
.secondary { color: #243d51; border-color: var(--border); background: #f6f9fc; }
.link { background: transparent; color: #425a6f; text-decoration: underline; margin-top: .55rem; }
.progress-label { display: flex; justify-content: space-between; gap: .8rem; font-size: .875rem; color: var(--muted); font-weight: 650; }
progress { display: block; width: 100%; height: .65rem; margin: .35rem 0 1.1rem; accent-color: var(--accent); }
.picture { position: relative; margin: .75rem auto 1rem; width: min(100%, 30rem); aspect-ratio: 1; background: #fafafa; border: 1px solid #d9e2e9; }
.picture img { display: block; width: 100%; height: 100%; }
#grid { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
#grid button { min-width: 0; min-height: 0; padding: 0; border: 1px solid #3a52615c; background: transparent; border-radius: 0; }
#grid button[aria-pressed="true"] { box-shadow: inset 0 0 0 4px #108371; background-color: #07796821; }
#grid button:focus-visible { outline-offset: -5px; z-index: 1; }
#selected { margin: 0 0 .4rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.count-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-bottom: .75rem; }
.count-options button { font-size: 1.15rem; }
.count-options button:hover:not(:disabled) { background: #e8f3ef; border-color: var(--accent); }
#error { color: #8e2018; background: #ffe9e5; padding: .7rem; border-radius: .5rem; }
