/* Theme (slice 3). Placeholder look from spec.md > Look and Feel until Yoav and Michael answer:
   swap the colour values here, and the guide in templates/includes/guide.html. Nothing else names a colour. */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
:root {
  --c-bg: #fff6e5;
  --c-surface: #ffffff;
  --c-ink: #1d2145;
  --c-muted: #474d70;
  --c-primary: #b82a22;
  --c-primary-ink: #ffffff;
  --c-accent: #12806f;
  --c-sun: #ffc93c;
  --c-line: #f0e2c8;
  --c-dot: #f6e3bf;
  /* Card icon circles, in turn: */
  --c-tint-1: #ffe1dc;
  --c-tint-2: #dff3ee;
  --c-tint-3: #fff0c2;
  --c-tint-4: #e3e6ff;
  /* The guide: */
  --guide-fur: #f08a3c;
  --guide-ear: #ffd7b0;
  --guide-belly: #fff1df;
  --guide-cheek: #ff9fa8;
  /* The finish celebration: */
  --confetti-1: #d8382e;
  --confetti-2: #ffc93c;
  --confetti-3: #12806f;
  --confetti-4: #5b5bd6;
  --confetti-5: #ff8fb1;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(29, 33, 69, .10), 0 10px 24px rgba(29, 33, 69, .08);
  --font: "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; background: var(--c-bg) radial-gradient(var(--c-dot) 2px, transparent 2.5px) 0 0 / 28px 28px; color: var(--c-ink); font-family: var(--font); line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--c-primary); }
h1 { font-size: 2.1rem; font-weight: 900; margin: .4em 0 .3em; letter-spacing: -.01em; }
h2 { font-weight: 900; }
h3 { margin: .3em 0; font-size: 1.25rem; }
.top { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .8rem 1.2rem; background: var(--c-surface); border-bottom: 6px solid var(--c-sun); }
.brand { display: inline-flex; align-items: center; gap: .4rem; font-weight: 900; font-size: 1.25rem; text-decoration: none; color: var(--c-ink); }
.guide { display: block; }
.guide.small { width: 2.2rem; height: 2.2rem; }
.guide.hero-guide { width: 9rem; height: 9rem; margin: 0 auto; }
.top-nav { display: flex; gap: 1rem; align-items: center; }
.top-nav a { color: var(--c-ink); text-decoration: none; font-weight: 700; }
.top-nav form { margin: 0; }
.page { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1rem 1.2rem 3rem; }
.foot { text-align: center; padding: 1rem; color: var(--c-muted); font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--c-muted); }
.hint { color: var(--c-muted); font-size: .9rem; }
.panel { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.narrow { max-width: 520px; margin: 1.5rem auto; }
.hero { text-align: center; padding: 2rem 1rem; }
.hero-mascot { font-size: 5rem; animation: bob 2.4s ease-in-out infinite; }
.hero-guide { animation: bob 2.4s ease-in-out infinite; }
.hero-guide.cheer { animation: cheer .7s ease-in-out 4, bob 2.4s ease-in-out 2.8s infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-6deg); } }
@keyframes cheer { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-34px) scale(1.08, .94); } 60% { transform: translateY(-34px) rotate(8deg); } }
.confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
@media (prefers-reduced-motion: reduce) { .hero-guide, .hero-mascot, .hero-guide.cheer { animation: none; } }
.btn { display: inline-block; border: 0; cursor: pointer; background: var(--c-primary); color: var(--c-primary-ink); font: inherit; font-weight: 800; padding: .7rem 1.4rem; border-radius: 999px; text-decoration: none; box-shadow: 0 5px 0 rgba(0,0,0,.18); transition: transform .1s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn:hover { filter: brightness(1.08); }
.btn.alt { background: var(--c-sun); color: var(--c-ink); }
.btn.big { font-size: 1.25rem; padding: .9rem 2rem; margin-top: .8rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--c-muted); text-decoration: underline; cursor: pointer; }
.messages { list-style: none; padding: 0; }
.msg { background: var(--c-sun); padding: .6rem 1rem; border-radius: 12px; margin-bottom: .5rem; }
.msg.error { background: #ffd4d1; }
.section-title { text-align: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; margin: 1rem 0; }
.card { position: relative; display: block; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; border: 4px solid transparent; }
.card:focus, .card:focus-within { outline: none; border-color: var(--c-accent); }
.card-emoji { display: inline-flex; align-items: center; justify-content: center; width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--c-tint-1); font-size: 2.4rem; line-height: 1; }
.card:nth-child(4n+2) .card-emoji { background: var(--c-tint-2); }
.card:nth-child(4n+3) .card-emoji { background: var(--c-tint-3); }
.card:nth-child(4n+4) .card-emoji { background: var(--c-tint-4); }
.card-emoji.big { width: 7rem; height: 7rem; font-size: 4rem; }
.card p { margin: .3em 0 0; }
.card img { width: 100%; border-radius: calc(var(--radius) - 8px); }
.badge { display: inline-block; background: var(--c-sun); color: var(--c-ink); border-radius: 999px; padding: .1rem .7rem; font-size: .8rem; font-weight: 800; margin-top: .5rem; }
.badge.muted { background: var(--c-line); color: var(--c-muted); }
.country.soon { border: 4px dashed var(--c-line); }
.country.soon .card-emoji { filter: grayscale(.5); }
.pick, .module { cursor: pointer; }
.pick input, .module input { position: absolute; opacity: 0; }
.pick:has(input:checked) { border-color: var(--c-primary); }
.module .switch { position: absolute; top: 1rem; right: 1rem; width: 52px; height: 30px; border-radius: 999px; background: var(--c-line); transition: background .15s; }
.module .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
.module:has(input:checked) { border-color: var(--c-accent); }
.module:has(input:checked) .switch { background: var(--c-accent); }
.module:has(input:checked) .switch::after { left: 25px; }
.module:has(input:focus-visible) { outline: 3px dashed var(--c-ink); }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 800; font-size: 1.15rem; }
.form label { font-weight: 800; display: block; margin-bottom: .3rem; }
.form input[type=text], .form input[type=email], .form input[type=date], .form input:not([type]) { font: inherit; font-size: 1.15rem; padding: .6rem .8rem; border-radius: 14px; border: 3px solid var(--c-line); width: 100%; max-width: 420px; background: #fff; }
.form input:focus { outline: none; border-color: var(--c-accent); }
.row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.errorlist { color: #b3261e; font-weight: 700; list-style: none; padding: 0; margin: .3rem 0; }
.progress { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem; color: var(--c-muted); font-weight: 700; }
.progress .bar { flex-basis: 100%; height: 12px; background: var(--c-line); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--c-accent); border-radius: 999px; transition: width .6s; }
.facts .fact { text-align: center; }
.done-form { text-align: center; margin-top: 1.5rem; }
@media (max-width: 600px) { h1 { font-size: 1.6rem; } .cards { grid-template-columns: 1fr; } }

/* TV mode (?tv=1 or a smart-TV browser): big type, big cards, one card in focus.
   Kept free of :has() because older webOS browsers do not support it. */
html.tv { font-size: 30px; }
.tv .page { max-width: 92vw; }
.tv .top { padding: .6rem 2rem; }
.tv .cards { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.4rem; }
.tv .card { transition: transform .15s, box-shadow .15s, opacity .15s; border-width: 8px; }
.tv .cards:focus-within .card { opacity: .85; }
.tv .cards .card:focus, .tv .cards .card:focus-within { opacity: 1; transform: scale(1.06); border-color: var(--c-accent); box-shadow: 0 0 0 6px var(--c-sun), var(--shadow); }
.tv a:focus, .tv .btn:focus, .tv .link:focus { outline: 6px solid var(--c-sun); outline-offset: 4px; }
.tv .card.open { position: fixed; top: 4vh; right: 6vw; bottom: 4vh; left: 6vw; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: none; opacity: 1; font-size: 1.5rem; }
.tv .card.open .card-emoji.big { width: 14rem; height: 14rem; font-size: 9rem; }
.tv .card.open h3 { font-size: 2.4rem; }
.tv .card.open img { max-height: 55vh; width: auto; }
.tv .shade { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; background: rgba(31, 35, 64, .6); }
.tv video, .tv iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.tv .tv-hint { text-align: center; color: var(--c-muted); font-size: .8rem; }
