/* PrecisStudy Kids: same tokens, fonts and brand band as the main PrecisStudy site. */
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 500 700; font-display: swap; src: url('/fonts/fraunces-latin.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url('/fonts/atkinson-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url('/fonts/atkinson-700-latin.woff2') format('woff2'); }

:root {
  --bg: #eaecf1; --surface: #ffffff; --surface-2: #e1e3ea;
  --border: #c5c8d2; --border-strong: #acb0bc;
  --ink: #23293a; --ink-muted: #5a606f;
  --accent: #33529e; --accent-ink: #233a70; --accent-soft: #e6ebf7;
  --amber-soft: #faeee0; --success: #1c7a44; --success-soft: #e6f4ea;
  --brand-bg: #14302a; --brand-bg-deep: #0e231e; --brand-ink: #eef2ea; --brand-green: #4fbf85;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20,26,23,.05), 0 1px 1px rgba(20,26,23,.03);
  --shadow-md: 0 8px 24px rgba(20,26,23,.07);
  color-scheme: light dark;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141b30; --surface: #1b243d; --surface-2: #1a2238;
    --border: #2f3953; --border-strong: #3d4867;
    --ink: #eef0f5; --ink-muted: #b7bcc9;
    --accent: #8aa2f2; --accent-ink: #b7c5f9; --accent-soft: rgba(138,162,242,.14);
    --amber-soft: rgba(230,187,85,.14); --success: #7fc98f; --success-soft: rgba(79,191,133,.16);
    --shadow-sm: none; --shadow-md: none;
  }
}
* { box-sizing: border-box; }
html { font-size: 19px; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; line-height: 1.5; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--accent); z-index: 10; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Brand band (same green hero as the main site) */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: radial-gradient(120% 160% at 100% 0%, rgba(79,191,133,.22) 0%, transparent 55%), linear-gradient(180deg, var(--brand-bg), var(--brand-bg-deep)); border-bottom: 1px solid rgba(238,242,234,.14); padding: 16px 20px; }
.brand { display: inline-flex; align-items: baseline; gap: 0; text-decoration: none; color: var(--brand-ink); font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.5rem; }
.brand b { color: var(--brand-green); font-weight: 700; }
.brand small { margin-left: 8px; font-family: 'Inter', sans-serif; font-size: .65rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: rgba(238,242,234,.7); }

main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 20px 16px 8px; outline: none; }
h1 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 700; margin: 8px 0 6px; line-height: 1.15; }
h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(1.3rem, 4.5vw, 1.8rem); margin: 0 0 8px; line-height: 1.25; }
.q { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(1.3rem, 4.5vw, 1.8rem); margin: 0 0 8px; line-height: 1.25; }
.lead { font-size: 1.1rem; color: var(--ink-muted); margin: 0 0 14px; }

.bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bar-r { display: flex; flex-wrap: wrap; gap: 8px; }
.grade { display: flex; gap: 4px; }
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; touch-action: manipulation; box-shadow: var(--shadow-sm); }
button:hover:not(:disabled) { border-color: var(--border-strong); }
.pill { padding: 8px 16px; font-size: .8rem; font-weight: 600; min-height: 44px; color: var(--ink-muted); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn { padding: 12px 26px; font-size: 1rem; font-weight: 700; background: var(--accent); border-color: var(--accent); color: #fff; min-height: 52px; }
@media (prefers-color-scheme: dark) { .btn { color: #0e1530; } }
.btn.alt { background: var(--surface); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { padding: 8px 16px; font-size: .85rem; min-height: 44px; background: var(--surface); color: var(--ink); border-color: var(--border); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 130px; padding: 16px; border-radius: var(--radius); font-size: 1.05rem; font-weight: 700; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .12s ease; }
.tile.big { min-height: 180px; font-size: 1.3rem; }
.tile .ico { font-size: 2.8rem; line-height: 1.1; }
.tile.big .ico { font-size: 4rem; }
.tile small { font-size: .8rem; font-weight: 500; color: var(--ink-muted); }
.tile.slides { background: color-mix(in oklab, var(--brand-green) 18%, var(--surface)); }
.tile.reading, .tile.deck { background: var(--accent-soft); }
.tile.math { background: var(--amber-soft); }
.tile.science { background: var(--success-soft); }
.tile.stickers { background: var(--surface); }
.tile:hover { transform: translateY(-2px); }
.tile:active, .choice:active, .opt:active { transform: scale(.98); }

/* Quiz */
.dots { display: flex; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.dots i.done { background: var(--accent); border-color: var(--accent); }
.dots i.now { border-color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow-md); }
.big-show { font-size: clamp(2.2rem, 10vw, 4.2rem); line-height: 1.3; margin: 8px 0 12px; word-break: break-word; font-weight: 700; font-family: 'Atkinson Hyperlegible', sans-serif; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.opt { min-height: 110px; padding: 12px; border-radius: var(--radius); font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 700; line-height: 1.2; word-break: break-word; font-family: 'Atkinson Hyperlegible', sans-serif; }
.opt.wide { font-size: clamp(1.4rem, 5vw, 2rem); min-height: 130px; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.right, .choice.right { background: var(--success-soft); border: 2px solid var(--success); opacity: 1; }
.opt.tryagain, .choice.soft { opacity: .6; border-style: dashed; }
.opt:disabled, .choice:disabled { cursor: default; }
.opt.right:disabled, .choice.right:disabled { opacity: 1; }
.msg { min-height: 2rem; text-align: center; font-size: 1.3rem; font-weight: 700; margin: 12px 0 0; }

.done .stars { font-size: 2rem; letter-spacing: .1em; }
.new-sticker { font-size: 1.3rem; font-weight: 700; }
.sticker-pop { display: inline-block; font-size: 3.6rem; vertical-align: middle; animation: pop .5s ease-out; }
.row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }
ul.stickers { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
ul.stickers li { aspect-ratio: 1; display: grid; place-items: center; font-size: 2.8rem; border-radius: var(--radius); border: 2px dashed var(--border); background: var(--surface); }
ul.stickers li.have { border-style: solid; border-color: var(--border-strong); background: var(--amber-soft); }

/* Slides: a Google Slides style editor (filmstrip, stage, toolbar) */
.deck-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.deck-title { font-size: 1.4rem; margin: 0; }
.starcount { font-weight: 700; background: var(--amber-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; }
.editor { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: start; }
.strip { display: flex; flex-direction: column; gap: 10px; max-height: min(70vh, 640px); overflow: auto; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.thumb { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 4px; padding: 4px; border-radius: 8px; box-shadow: none; background: transparent; border: 2px solid transparent; text-align: left; }
.thumb .tn { font-size: .7rem; color: var(--ink-muted); font-weight: 600; text-align: center; }
.thumb .tc { display: grid; place-items: center; aspect-ratio: 16/10; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 1.3rem; line-height: 1; padding: 2px; }
.thumb .tc small { font-size: .55rem; font-weight: 600; color: var(--ink-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.main { min-width: 0; }
.stage { container-type: inline-size; aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); display: grid; place-items: center; }
.stage:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; }
.sl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; width: 100%; padding: 3cqw; text-align: center; }
.sl-title { gap: 2cqw; }
.eyebrow { margin: 0; font-size: max(2cqw, .8rem); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); }
.wordtitle { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(6cqw, 1.8rem); margin: 0; }
.sl-h { font-size: max(4cqw, 1.3rem); margin: 0; display: flex; align-items: center; gap: 1.5cqw; flex-wrap: wrap; justify-content: center; }
.sl-sub { font-size: max(2.6cqw, 1rem); color: var(--ink-muted); margin: 0; }
.pic { font-size: 18cqw; line-height: 1; }
.pic-sm { font-size: max(5cqw, 1.6rem); }
.word { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: 16cqw; line-height: 1; }
.sentence { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(8cqw, 1.8rem); line-height: 1.2; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 2cqw; justify-content: center; align-items: center; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 1.5cqw; font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(3cqw, 1rem); }
.step-ico { font-size: max(6cqw, 1.8rem); background: var(--accent-soft); border-radius: 12px; padding: 1cqw 1.6cqw; }
.arrow { color: var(--ink-muted); font-size: 3cqw; }
.choices { display: flex; gap: 3cqw; justify-content: center; flex-wrap: wrap; }
.choice { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(7cqw, 1.6rem); min-width: max(24cqw, 120px); padding: 2cqw 4cqw; border-radius: 16px; border: 2px solid var(--border-strong); }
.choice, .tile-btn { position: relative; }
.choice.prompt:not(:disabled), .tile-btn.prompt:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
/* the hint also carries a hand mark so it never depends on color alone */
.choice.prompt:not(:disabled)::after, .tile-btn.prompt:not(:disabled)::after { content: "👆"; position: absolute; right: -6px; bottom: -14px; font-size: 1.3rem; line-height: 1; }
.sentence.sm { font-size: max(4.5cqw, 1.2rem); font-weight: 400; color: var(--ink-muted); }
.builder { display: flex; flex-direction: column; align-items: center; gap: 2cqw; }
.slots, .tiles { display: flex; gap: 1.6cqw; justify-content: center; flex-wrap: wrap; }
.slot { width: max(8cqw, 2.6rem); height: max(10cqw, 3.2rem); border-bottom: 4px solid var(--border-strong); border-radius: 6px 6px 0 0; background: var(--surface-2); display: grid; place-items: center; font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(7cqw, 1.8rem); }
.slot.filled { background: var(--success-soft); border-bottom-color: var(--success); }
.tile-btn { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(6.5cqw, 1.6rem); width: max(9cqw, 3rem); height: max(10cqw, 3.4rem); border-radius: 12px; border: 2px solid var(--border-strong); padding: 0; }
.tile-btn:disabled { opacity: .25; }
.tile-btn.soft { opacity: .6; border-style: dashed; }
.decks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 12px; }
.deck-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.deck-card .ico { font-size: 2.4rem; }
.deck-card h2 { font-size: 1.2rem; font-family: 'Atkinson Hyperlegible', sans-serif; margin: 4px 0 10px; }
.stars-row { font-size: 6cqw; letter-spacing: .1em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.counter { color: var(--ink-muted); font-size: .85rem; font-weight: 600; }

footer { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; padding: 16px; font-size: .8rem; color: var(--ink-muted); }
footer a { color: var(--accent-ink); }

@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .tile:hover, .tile:active, .choice:active, .opt:active { transform: none; } }
@media (max-width: 720px) {
  html { font-size: 17px; }
  .editor { grid-template-columns: 1fr; }
  .strip { flex-direction: row; max-height: none; overflow-x: auto; }
  .thumb { grid-template-columns: 1fr; min-width: 64px; }
  .thumb .tn { display: none; }
  .stage { aspect-ratio: auto; min-height: 300px; }
  .opts { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; } .opt { min-height: 96px; padding: 8px; }
}
@media (forced-colors: active) { .choice.prompt:not(:disabled) { outline: 3px solid Highlight; } }

/* Sage the owl (animations from the main site's owl.js) */
.sage{overflow:visible}
.sage-idle .sage-eyes{transform-box:fill-box;transform-origin:center;animation:sageBlink 4.5s infinite}
.sage-bob{animation:sageBob 3.2s ease-in-out infinite}
.sage-hop{animation:sageHop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes sageBlink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.1)}}
@keyframes sageBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes sageHop{0%{transform:translateY(0) scale(1)}40%{transform:translateY(-10px) scale(1.04)}100%{transform:translateY(0) scale(1)}}
@media (prefers-reduced-motion: reduce){.sage-idle .sage-eyes,.sage-bob,.sage-hop{animation:none}}
.sage-wrap { display: grid; place-items: center; }
.hello { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hello h1 { margin-top: 0; }
.brand img { width: 30px; height: 30px; margin-right: 10px; align-self: center; }
.onboard { text-align: left; max-width: 640px; margin: 0 auto 14px; }
.onboard .sage-wrap { margin-bottom: 4px; }
.ob-h { text-align: center; font-size: clamp(1.5rem, 5vw, 2rem); margin: 4px 0 10px; }
.ob-body { font-size: 1.05rem; }
.ob-body ul { padding-left: 1.2em; margin: 8px 0; } .ob-body li { margin: 6px 0; }
.note { color: var(--ink-muted); font-size: .9rem; }
.big-choice { min-width: 11rem; }
.big-choice[aria-pressed="true"] { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .big-choice[aria-pressed="true"] { color: #0e1530; } }

/* Child profiles and parent review */
.who { margin-top: 6px; }
.kids { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.kid-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: var(--radius); }
.kid-card small { color: var(--ink-muted); font-size: .8rem; }
.kid-card[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.form { text-align: left; max-width: 640px; margin: 0 auto 14px; }
.form .sage-wrap { margin-bottom: 8px; }
.lbl { display: block; font-weight: 700; margin: 14px 0 6px; font-size: .95rem; }
.input { width: 100%; min-height: 52px; padding: 10px 16px; font: inherit; font-size: 1.15rem; color: var(--ink); background: var(--surface); border: 2px solid var(--border-strong); border-radius: 12px; }
.input:focus-visible { border-color: var(--accent); }
.acc-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.small[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .btn.small[aria-pressed="true"] { color: #0e1530; } }
.review { text-align: left; max-width: 720px; margin: 0 auto 14px; }
.review h2 { margin: 0; } .review h3 { font-size: 1rem; margin: 14px 0 6px; }
.rev-head { display: flex; align-items: center; gap: 12px; }
.chip { display: inline-block; margin: 0 6px 6px 0; padding: 4px 12px; border-radius: 999px; background: var(--amber-soft); border: 1px solid var(--border); font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; }
.log { padding-left: 1.2em; margin: 6px 0; font-size: .9rem; }
.btn.small.danger { color: #b23a3a; border-color: #b23a3a; }
@media (prefers-color-scheme: dark) { .btn.small.danger { color: #ff8a7a; border-color: #ff8a7a; } }
details summary { cursor: pointer; font-weight: 600; margin: 6px 0; min-height: 44px; display: flex; align-items: center; }

/* Parent account */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; line-height: 1.45; cursor: pointer; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.sync-note { margin: 0 0 10px; } .sync-note a { color: var(--accent-ink); }
.card.form a { color: var(--accent-ink); }

/* Start screen, kid welcome, onboarding children step */
.center { text-align: center; }
.kid-welcome { text-align: center; }
.kid-welcome .row { margin-top: 8px; }
.sub-h { font-size: 1.1rem; margin: 18px 0 4px; }
.kids.added .kid-card { flex-direction: row; text-align: left; gap: 10px; padding: 10px 14px; }
.kids.added .kid-card small { display: block; }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 16px; }
.focus-grid .check { margin: 6px 0; min-height: 44px; align-items: center; }

/* Week dots, up next, parent area, gate, print */
.week { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.week i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; }
.week i.on { background: var(--success); border-color: var(--success); }
.week .note { margin: 0 0 0 6px; }
.tile.upnext { background: color-mix(in oklab, var(--accent) 16%, var(--surface)); border: 2px solid var(--accent); }
.area-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.area-nav a.pill { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.area-nav a.pill[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.select { appearance: auto; width: auto; min-width: 14rem; }
.manage { margin: 10px 0; }
.manage summary { font-weight: 700; }
.gate-q { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: 2.4rem; margin: 6px 0 14px; }
.gate-opt { min-width: 5.5rem; font-size: 1.4rem; }
.sheet { max-width: 720px; margin: 0 auto; background: #fff; color: #111; padding: 24px; border-radius: var(--radius); }
.sheet h1 { color: #111; } .sheet .note { color: #444; }
.sheet-row { border-top: 1px solid #ccc; padding: 14px 0; display: grid; gap: 6px; }
.trace { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: 3.2rem; line-height: 1.1; color: transparent; -webkit-text-stroke: 1.5px #666; letter-spacing: .06em; display: inline-block; margin-right: 24px; }
.write-lines span { display: block; height: 2.4rem; border-bottom: 2px solid #888; }
.sheet-sent { margin: 4px 0 0; color: #333; font-size: .95rem; }
@media print {
  .hero, footer, .bar, .no-print, .skip, #live { display: none !important; }
  body { background: #fff; } main { padding: 0; max-width: none; } .sheet { padding: 0; border-radius: 0; }
}

/* The page area is focused programmatically on each screen change (for screen readers). It is not a
   control, so it must never draw a focus ring. Real buttons, links and fields keep theirs. */
main:focus, main:focus-visible, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

/* Sign-in push and password */
.card.push { border: 2px solid var(--accent); background: color-mix(in oklab, var(--accent) 9%, var(--surface)); }
.check.small { font-size: .9rem; margin: 6px 0; align-items: center; min-height: 44px; }
.check.small input { width: 20px; height: 20px; }

/* Settings gear: always in the top-right corner of the header */
.gear { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--brand-ink); border: 1px solid rgba(238,242,234,.28); text-decoration: none; }
.gear:hover { background: rgba(238,242,234,.12); }
.gear:focus-visible { outline: 3px solid var(--brand-green); }

/* Google sign-in button: white with the four-colour G, as in Google's branding guidelines */
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 10px 22px; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 999px; font-weight: 600; font-size: 1rem; }
.btn-google:hover { background: #f4f6fb; border-color: #4285f4; }
.btn-google .g-logo { display: inline-flex; }

/* ---- Improvements: read-along, tappable Sage, bounce, focus, big taps, time of day, easier font ---- */
.w { border-radius: 6px; padding: 0 .08em; }
.w.speaking { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent-ink); }
.sent-say { font-family: 'Atkinson Hyperlegible', sans-serif; font-weight: 700; font-size: max(3.4cqw, 1.1rem); color: var(--ink-muted); margin: 0; }
.sage-btn { background: none; border: 0; padding: 4px; border-radius: 18px; box-shadow: none; cursor: pointer; line-height: 0; }
.tile .clues { font-size: 1.5rem; letter-spacing: .25em; margin-top: 2px; line-height: 1.2; }

/* Playful hover on the big cards (never for people who asked for less motion) */
@media (prefers-reduced-motion: no-preference) {
  .tile:hover { animation: tileBounce .4s ease; }
}
@keyframes tileBounce { 0% { transform: translateY(0); } 40% { transform: translateY(-7px) scale(1.03); } 70% { transform: translateY(-1px); } 100% { transform: translateY(-2px); } }

/* A bigger, colourful focus ring for keyboard and switch users */
:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 24%, transparent); }
main:focus, main:focus-visible, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* Generous touch targets for small fingers */
.opt, .choice { min-height: 60px; }
.tile-btn { min-width: 56px; min-height: 56px; }
.btn.small, .pill { min-height: 48px; }

/* A calm background that follows the time of day (colour fades into the theme, so light and dark both work) */
body { background-repeat: no-repeat; }
body[data-tod="morning"] { background-image: linear-gradient(180deg, color-mix(in oklab, #ffd27a 16%, var(--bg)) 0, var(--bg) 360px); }
body[data-tod="day"] { background-image: linear-gradient(180deg, color-mix(in oklab, #8ec5ff 15%, var(--bg)) 0, var(--bg) 360px); }
body[data-tod="evening"] { background-image: linear-gradient(180deg, color-mix(in oklab, #ff9f6b 15%, var(--bg)) 0, var(--bg) 360px); }
body[data-tod="night"] { background-image: linear-gradient(180deg, color-mix(in oklab, #6d6bd6 18%, var(--bg)) 0, var(--bg) 360px); }

/* Easier-to-read font option (Settings) */
html[data-dys] body, html[data-dys] button, html[data-dys] input, html[data-dys] select, html[data-dys] h1, html[data-dys] h2, html[data-dys] h3, html[data-dys] .q { font-family: 'Atkinson Hyperlegible', Verdana, sans-serif !important; letter-spacing: .03em; word-spacing: .1em; }
html[data-dys] .brand { font-family: 'Fraunces', Georgia, serif !important; letter-spacing: 0; word-spacing: 0; }
