/* Shared look for every page on hasin.eu: tokens, page, title, buttons, credits line, footer.
   Values copied from the digit demo (public/index.html). Sizes are in rem with 1rem = 17px,
   so a page can scale the whole look by changing html font-size. */
:root {
  --paper: #fbfaf6;
  --sunk: #f4f2ea;
  --ink: #16150f;
  --muted: #6f6b61;
  --rule: #e2ded2;
  --answer: #1fa463;
  --positive: rgb(52, 199, 140);
  --negative: rgb(220, 64, 200);
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: inherit; }
.wrap { width: 100%; max-width: 48.5rem; margin: 0 auto; padding: 0 1.88rem; }
h1 {
  font-size: 1.97rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.94rem;
}
/* small bold label above a canvas box, like "You draw" */
.lbl { font-size: 0.82rem; font-weight: 600; line-height: 1.2; }
button, select {
  font: 550 0.82rem ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  padding: 0.29rem 1.06rem;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
select { padding-left: 0.5rem; padding-right: 0.3rem; }
button:hover, select:hover { background: var(--sunk); }
button:disabled { opacity: 0.4; cursor: default; }
.credits {
  margin: 1.41rem 0 0;
  padding-top: 0.94rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.735rem;
  line-height: 1.5;
}
footer { position: sticky; bottom: 0; z-index: 10; background: var(--ink); color: var(--paper); }
footer .wrap {
  padding-top: 0.94rem;
  padding-bottom: 0.94rem;
  display: flex;
  justify-content: space-between;
  gap: 0.59rem 1.41rem;
  flex-wrap: wrap;
  font-size: 0.853rem;
}
footer a { color: var(--paper); text-decoration: none; }
footer a:hover { opacity: .75; }
footer ul { list-style: none; display: flex; gap: 1.18rem; margin: 0; padding: 0; flex-wrap: wrap; }
footer strong { font-weight: 650; }
/* the car and digit demos: the credit left, the source link right, on one line on phones too (car3's layout counts on
   the footer's height) */
footer.demo-foot .wrap { align-items: center; flex-wrap: nowrap; white-space: nowrap; }
/* with Share (the car demo): Share in the middle, the source link right */
footer.demo-foot .wrap:has(> .share-btn) { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 12px; }
footer.demo-foot .wrap:has(> .share-btn) > ul { justify-self: end; }
@media (max-width: 720px) { footer.demo-foot .wrap { padding-left: 16px; padding-right: 16px; } }
