/* Public site and parent pages. The game has its own stylesheet (game/style.css);
   both share this palette so the product feels like one thing. */
:root {
  --wq-bg: #fff8e7;
  --wq-ink: #2b2b3a;
  --wq-muted: #5d5d70;
  --wq-green: #2e9e5b;
  --wq-green-dark: #1f7a44;
  --wq-orange: #ff7043;
  --wq-yellow: #f5b301;
  --wq-soft: #ffe7b3;
  --wq-sky: #e6f3fd;
  --wq-card: #ffffff;
  --wq-line: #f0e3c4;
  --wq-radius: 22px;
  --wq-shadow: 0 6px 0 rgba(0, 0, 0, 0.08);
  --bs-body-font-family: "Nunito", "Andika", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --bs-body-color: var(--wq-ink);
  --bs-body-bg: var(--wq-bg);
  --bs-link-color: var(--wq-green-dark);
  --bs-link-hover-color: var(--wq-green);
}

body.site { background: var(--wq-bg); color: var(--wq-ink); font-size: 1.05rem; line-height: 1.6; }
body.site h1, body.site h2, body.site h3, body.site .brand { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
body.site a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--wq-orange); outline-offset: 2px; }

/* ---- header ---- */
.site-header { background: var(--wq-bg); border-bottom: 2px solid var(--wq-line); position: sticky; top: 0; z-index: 30; }
.site-header .inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--wq-ink); text-decoration: none; font-size: 1.3rem; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand:hover { color: var(--wq-ink); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 0.3rem; }
.site-nav a.link { color: var(--wq-ink); text-decoration: none; padding: 0.55rem 0.8rem; border-radius: 12px; font-weight: 700; }
.site-nav a.link:hover { background: var(--wq-soft); }
@media (max-width: 640px) { .site-nav a.link.hide-sm { display: none; } }

/* ---- buttons ---- */
.btn { border-radius: 16px; font-weight: 800; padding: 0.65rem 1.3rem; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.btn-sm { min-height: 40px; padding: 0.35rem 0.9rem; border-radius: 12px; }
.btn-lg { min-height: 56px; padding: 0.8rem 1.8rem; font-size: 1.15rem; }
.btn-primary { --bs-btn-bg: var(--wq-green); --bs-btn-border-color: var(--wq-green-dark); --bs-btn-hover-bg: var(--wq-green-dark); --bs-btn-hover-border-color: var(--wq-green-dark); --bs-btn-active-bg: var(--wq-green-dark); --bs-btn-active-border-color: var(--wq-green-dark); --bs-btn-disabled-bg: var(--wq-green); box-shadow: 0 4px 0 var(--wq-green-dark); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--wq-green-dark); }
.btn-accent { background: var(--wq-orange); border: 2px solid #d9542f; color: #fff; box-shadow: 0 4px 0 #d9542f; }
.btn-accent:hover { background: #f4602f; color: #fff; }
.btn-outline-secondary { --bs-btn-color: var(--wq-ink); --bs-btn-border-color: var(--wq-ink); --bs-btn-hover-bg: var(--wq-ink); --bs-btn-hover-border-color: var(--wq-ink); }
.btn-outline-primary { --bs-btn-color: var(--wq-green-dark); --bs-btn-border-color: var(--wq-green); --bs-btn-hover-bg: var(--wq-green); --bs-btn-hover-border-color: var(--wq-green); }

/* ---- cards and forms ---- */
.wq-card { background: var(--wq-card); border: 3px solid var(--wq-line); border-radius: var(--wq-radius); padding: 1.4rem; box-shadow: var(--wq-shadow); }
.form-control, .form-select { border-radius: 14px; border: 2px solid var(--wq-line); min-height: 48px; padding: 0.6rem 0.9rem; font-size: 1.05rem; }
.form-control:focus, .form-select:focus { border-color: var(--wq-green); box-shadow: 0 0 0 4px rgba(46, 158, 91, 0.2); }
.form-label, .col-form-label { font-weight: 800; }
.form-check-input:checked { background-color: var(--wq-green); border-color: var(--wq-green); }
.alert { border-radius: 16px; border-width: 2px; }
.page { padding-block: 2rem 4rem; max-width: 760px; }
.page h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 0.4rem; }
.lead-muted { color: var(--wq-muted); }

/* ---- landing ---- */
.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section.alt { background: #fff; border-block: 2px solid var(--wq-line); }
.section h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin-bottom: 0.6rem; }
.section .sub { color: var(--wq-muted); max-width: 40rem; margin-bottom: 2rem; }
.hero { padding-block: clamp(2rem, 6vw, 4rem) clamp(2.5rem, 7vw, 4.5rem); background: radial-gradient(circle at 85% 10%, var(--wq-soft), transparent 45%), var(--wq-bg); overflow: hidden; }
.hero h1 { font-size: clamp(2.2rem, 6.5vw, 3.6rem); margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--wq-orange); }
.hero p.lead { font-size: 1.25rem; color: var(--wq-muted); max-width: 34rem; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; background: #fff; border: 2px solid var(--wq-line); border-radius: 99px; padding: 0.3rem 0.9rem; font-weight: 800; font-size: 0.9rem; margin-bottom: 1rem; }
.pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--wq-green); display: inline-block; }
.trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 1.4rem; padding: 0; list-style: none; color: var(--wq-muted); font-weight: 700; font-size: 0.95rem; }
.trust li::before { content: "✓"; color: var(--wq-green); font-weight: 900; margin-right: 0.35rem; }

.step { text-align: center; padding: 0.5rem 1rem; }
.step .num { width: 56px; height: 56px; border-radius: 50%; background: var(--wq-green); color: #fff; font-weight: 900; font-size: 1.5rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.8rem; box-shadow: 0 4px 0 var(--wq-green-dark); }
.step h3 { font-size: 1.3rem; }
.feature { height: 100%; }
.feature h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.feature p { margin: 0; color: var(--wq-muted); }

.band { text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.band .age { font-size: 1.5rem; font-weight: 900; }
.tag { display: inline-block; border-radius: 99px; padding: 0.15rem 0.8rem; font-size: 0.85rem; font-weight: 800; }
.tag.ready { background: #d9f2e3; color: var(--wq-green-dark); }
.tag.soon { background: var(--wq-soft); color: #8a5a00; }

.faq details { background: #fff; border: 2px solid var(--wq-line); border-radius: 16px; padding: 0.2rem 1.1rem; margin-bottom: 0.7rem; }
.faq summary { cursor: pointer; font-weight: 800; padding: 0.8rem 0; min-height: 48px; }
.faq details[open] { border-color: var(--wq-green); }
.faq details p { color: var(--wq-muted); }

.cta { background: var(--wq-green); color: #fff; border-radius: 28px; padding: clamp(1.8rem, 5vw, 3rem); text-align: center; box-shadow: 0 8px 0 var(--wq-green-dark); }
.cta h2 { color: #fff; }
.cta p { color: #e6f7ec; max-width: 34rem; margin-inline: auto; }
.cta .btn-accent { margin-top: 0.6rem; }

/* a drawn phone showing the game, so the page needs no screenshots to be accurate */
.phone { width: min(300px, 80vw); margin-inline: auto; background: #1d1d2b; border-radius: 40px; padding: 12px; box-shadow: 0 24px 40px rgba(43, 43, 58, 0.25); transform: rotate(3deg); }
.phone .screen { background: var(--wq-bg); border-radius: 30px; overflow: hidden; min-height: 440px; display: flex; flex-direction: column; font-size: 0.82rem; }
.phone .top { background: var(--wq-soft); padding: 0.7rem 0.9rem; display: flex; align-items: center; gap: 0.5rem; font-weight: 800; }
.phone .top b { flex: 1; font-size: 0.95rem; }
.phone .chip { background: #fff; border-radius: 99px; padding: 0.1rem 0.5rem; border: 2px solid var(--wq-soft); font-size: 0.75rem; }
.phone .body { padding: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.phone .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.phone .stat { background: #fff; border: 3px solid var(--wq-soft); border-radius: 18px; padding: 0.5rem; text-align: center; line-height: 1.2; }
.phone .stat.lit { border-color: var(--wq-orange); }
.phone .stat b { display: block; font-size: 1.5rem; }
.phone .ring { --p: 80%; width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 0.2rem; background: conic-gradient(var(--wq-green) var(--p), #eee 0); display: flex; align-items: center; justify-content: center; position: relative; font-weight: 900; }
.phone .ring::before { content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.phone .ring span { position: relative; }
.phone .go { background: var(--wq-green); color: #fff; border-radius: 16px; padding: 0.7rem; text-align: center; font-weight: 800; box-shadow: 0 4px 0 var(--wq-green-dark); font-size: 1rem; }
.phone .go small { display: block; font-weight: 600; opacity: 0.9; font-size: 0.7rem; }
.phone .rev { background: #fff3e0; border: 3px solid var(--wq-orange); border-radius: 16px; padding: 0.5rem 0.7rem; }
.phone .rev .chips { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.3rem; }
.phone .rev .chips span { background: #fff; border: 2px solid var(--wq-orange); border-radius: 99px; padding: 0 0.5rem; font-size: 0.75rem; }
.phone .tabs { display: flex; justify-content: space-around; background: #fff; border-top: 3px solid var(--wq-soft); padding: 0.4rem 0 0.6rem; font-size: 1.1rem; text-align: center; line-height: 1.1; }
.phone .tabs small { display: block; font-size: 0.55rem; font-weight: 800; }
.phone .tabs .on { color: var(--wq-orange); }


/* line icons (templates/includes/icons.html) */
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.2em; }
.tile { width: 56px; height: 56px; border-radius: 18px; display: inline-grid; place-items: center; margin-bottom: 0.8rem; }
.tile .icon { width: 28px; height: 28px; stroke-width: 1.8; }
.tile.green { background: #d9f2e3; color: #1f7a44; }
.tile.orange { background: #ffe3d6; color: #d9542f; }
.tile.blue { background: #dcecfb; color: #2f6fc9; }
.tile.purple { background: #ece2f7; color: #7a3a9a; }
.tile.yellow { background: #fff0c2; color: #9a6a00; }
.band .tile { margin-bottom: 0.3rem; }
.tick { color: var(--wq-green); stroke-width: 3; margin-right: 0.3rem; }
.phone .av { width: 26px; height: 26px; border-radius: 50%; background: var(--wq-green); color: #fff; display: inline-grid; place-items: center; font-size: 0.8rem; }
.phone .coin { width: 11px; height: 11px; border-radius: 50%; background: var(--wq-yellow); display: inline-block; margin-right: 0.25rem; vertical-align: -1px; }
.phone .stat .flame { width: 1.6rem; height: 1.6rem; color: var(--wq-orange); fill: #ffd2c2; display: block; margin: 0 auto 0.1rem; }
.phone .rev strong { display: flex; align-items: center; gap: 0.3rem; }
.phone .tabs .icon { width: 1.35rem; height: 1.35rem; display: block; margin: 0 auto 0.15rem; }

/* ---- footer ---- */
.site-footer { border-top: 2px solid var(--wq-line); padding-block: 2rem; color: var(--wq-muted); font-size: 0.95rem; }
.site-footer a { color: var(--wq-muted); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* ---- sign in / sign up ---- */
.entrance { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem 3rem; }
.entrance .brand { margin-bottom: 1.2rem; }
.entrance .wq-card { width: 100%; max-width: 26rem; }
.entrance h1 { font-size: 1.7rem; }

/* ---- children and picker ---- */
.child-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.child-card .face { font-size: 2.6rem; width: 64px; height: 64px; background: var(--wq-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.child-card .who { flex: 1; min-width: 10rem; }
.child-card .who strong { font-size: 1.2rem; display: block; }
.child-card .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; max-width: 640px; margin-inline: auto; }
.pick { background: #fff; border: 3px solid var(--wq-line); border-radius: 26px; padding: 1.2rem 0.6rem; text-align: center; width: 100%; font: inherit; color: inherit; box-shadow: var(--wq-shadow); min-height: 48px; }
button.pick { cursor: pointer; }
button.pick:hover { border-color: var(--wq-green); transform: translateY(-2px); }
.pick .face { font-size: 3.6rem; display: block; line-height: 1.1; }
.pick .name { font-size: 1.25rem; font-weight: 800; }
.pick.off { opacity: 0.6; }
.pick .sub { display: block; font-size: 0.85rem; color: var(--wq-muted); }
#div_id_age_band .form-check, #div_id_avatar .form-check { display: inline-flex; align-items: center; gap: 0.4rem; background: #fff; border: 2px solid var(--wq-line); border-radius: 14px; padding: 0.5rem 1rem 0.5rem 2.2rem; margin: 0 0.4rem 0.5rem 0; min-height: 48px; }
#div_id_age_band .form-check:has(input:checked), #div_id_avatar .form-check:has(input:checked) { border-color: var(--wq-green); background: #eaf7ef; }

/* keep the footer at the bottom of short pages */
body.site { display: flex; flex-direction: column; min-height: 100dvh; }
body.site > main { flex: 1; }
.pick-grid { margin-top: 1.5rem; }

.phone .top b { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .icon { width: 30px; height: 30px; }

/* parent progress page */
.page.wide { max-width: 920px; }
.back-link { display: inline-block; margin-bottom: 0.8rem; font-weight: 800; text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.stat-tile b { font-size: 2.1rem; line-height: 1.1; }
.stat-tile small { color: var(--wq-muted); }
.stat-tile .tile { margin-bottom: 0.5rem; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; align-items: end; height: 170px; margin-top: 0.6rem; }
.week .day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.25rem; }
.week .bar { width: 100%; max-width: 44px; background: var(--wq-line); border-radius: 10px 10px 4px 4px; min-height: 6px; }
.week .day.on .bar { background: var(--wq-green); }
.week .mins { font-weight: 800; font-size: 0.85rem; min-height: 1.2em; }
.week .lbl { font-size: 0.85rem; color: var(--wq-muted); font-weight: 700; }
.meter { margin-bottom: 1rem; }
.meter-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 0.25rem; }
.meter progress { width: 100%; height: 14px; border-radius: 99px; appearance: none; background: var(--wq-line); overflow: hidden; }
.meter progress::-webkit-progress-bar { background: var(--wq-line); border-radius: 99px; }
.meter progress::-webkit-progress-value { background: var(--wq-green); border-radius: 99px; }
.meter progress::-moz-progress-bar { background: var(--wq-green); border-radius: 99px; }
.rev-chip { background: #fff3e0; border: 2px solid var(--wq-orange); border-radius: 99px; padding: 0.15rem 0.9rem; font-weight: 800; }
.tip { background: var(--wq-bg); border-radius: 16px; padding: 0.8rem 1rem; margin-bottom: 0.6rem; }

/* monthly report */
.month-nav { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.report-list { padding-left: 1.2rem; }
.report-list li { margin-bottom: 0.4rem; }
@media print {
  .no-print, header.site-header, footer { display: none !important; }
  body.site { background: #fff; }
  .report-page { max-width: 100%; padding: 0; }
  .wq-card { box-shadow: none; break-inside: avoid; border: 1px solid var(--wq-line); }
}
