/* Mossybook parents — prototype styles */
:root {
  color-scheme: light;
  --paper: #F7F8F5;
  --paper-2: #F0F3EE;
  --card: #FFFFFF;
  --ink: #182019;
  --ink-2: #4F5B53;
  --ink-3: #86918A;
  --line: #E3E8E1;
  --line-2: #EEF1EB;
  --moss: #22795A;
  --moss-ink: #175A42;
  --moss-tint: #DFF0E8;
  --moss-tint-2: #C8E4D6;
  --sky: #DCEAF7;   --sky-ink: #2A527A;
  --plum: #E9E0F4;  --plum-ink: #5B3F8C;
  --butter: #FBEFC6; --butter-ink: #7A5A0E;
  --rose: #F9DEDA;  --rose-ink: #A23A2E;
  --peach: #FCE6D3; --peach-ink: #8A4B14;
  --mint: #DDF0E4;  --mint-ink: #2F6B44;
  --crit: #B33A2E;
  --warn: #8A6414;
  --good: #22795A;
  --stage: #E6EAE3;
  --shadow: 0 1px 2px rgba(24,32,25,.04), 0 8px 24px rgba(24,32,25,.06);
  --r: 18px;
  --r-s: 12px;
  --font-ui: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--moss); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-s { width: 16px; height: 16px; flex: none; }

/* ---------- Stage & phone ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding-block: 28px;
  padding-inline: 16px;
}
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  background: var(--paper);
  border-radius: 46px;
  overflow: hidden;
  box-shadow: 0 0 0 11px #1B201C, 0 0 0 13px #464C47, 0 40px 90px rgba(24,32,25,.28);
  flex: none;
}
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; font-size: 14px; font-weight: 600; z-index: 5;
  pointer-events: none;
}
.statusbar .notch {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 118px; height: 32px; background: #1B201C; border-radius: 20px;
}
.statusbar .sig { display: flex; gap: 5px; align-items: center; }
.statusbar .sig i { display: inline-block; width: 16px; height: 9px; border: 1.5px solid var(--ink); border-radius: 3px; position: relative; }
.statusbar .sig i::after { content: ''; position: absolute; left: 1.5px; top: 1.5px; bottom: 1.5px; width: 9px; background: var(--ink); border-radius: 1px; }

.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: 48px;
  padding-bottom: 110px;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.no-tabs { padding-bottom: 40px; }
.screen.enter { animation: push .24s cubic-bezier(.2,.7,.2,1) both; }
.screen.enter-back { animation: pop .18s ease-out both; }
@keyframes push { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }

/* Side rail (desktop only) */
.side {
  width: 250px; flex: none; color: var(--ink-2);
}
.side .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; color: var(--ink); }
.side .brand strong { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.side p { font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.side h4 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 8px; font-weight: 600; }
.side .scene {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; text-align: left; color: var(--ink);
}
.side .scene:hover { background: rgba(255,255,255,.7); }
.side .scene.on { background: var(--card); box-shadow: var(--shadow); }
.side .scene .ico { width: 18px; height: 18px; color: var(--ink-3); }
.side .toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; font-size: 14px; color: var(--ink); }
.side .hint { font-size: 12px; color: var(--ink-3); margin-top: 16px; line-height: 1.5; }

@media (max-width: 720px) {
  .stage { padding: 0; display: block; min-height: 100dvh; }
  .phone { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .statusbar { display: none; }
  .screen { padding-top: max(12px, env(safe-area-inset-top)); }
  .side { display: none; }
  .tabbar { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* ---------- Layout primitives ---------- */
.pad { padding-inline: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.stack-l { display: flex; flex-direction: column; gap: 22px; }
.hstack { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.strong { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Top bars */
.topbar {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding-inline: 12px; margin-bottom: 4px;
}
.topbar .title { flex: 1; text-align: center; font-weight: 600; font-size: 16px; }
.topbar .spacer { width: 40px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); background: transparent;
}
.iconbtn:hover { background: var(--paper-2); }
.iconbtn.raised { background: var(--card); border: 1px solid var(--line); }

.hero { padding-inline: 20px; padding-top: 10px; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.display {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; line-height: 1.12;
  font-variation-settings: 'SOFT' 60; text-wrap: balance;
}
.display-xl { font-size: 32px; }
.display-l { font-size: 27px; }
.display-m { font-size: 22px; }
.display-s { font-size: 19px; }
.lede { color: var(--ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }

/* Sections */
.section { padding-inline: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.section-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
.section-head .count { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--paper-2); border-radius: 99px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.section-head .link { font-size: 13px; color: var(--moss); font-weight: 600; }

/* Cards & rows */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px;
}
.card.tint { border-color: transparent; }
.card.flat { box-shadow: none; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-bottom: 1px solid var(--line-2); background: transparent;
  color: var(--ink);
}
.row:last-child { border-bottom: 0; }
.row:active { background: var(--paper-2); }
button.row:hover, tr[data-go]:hover { background: rgba(24,32,25,.035); }
.chev { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.row .lead {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.row .lead .ico { width: 20px; height: 20px; }
.row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.row .s { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.row .meta, .meta { font-size: 12px; color: var(--ink-3); display: block; line-height: 1.4; }
.meta .dot { display: inline-block; vertical-align: 1px; margin-right: 5px; }
.row .trail { flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.row .chev { width: 18px; height: 18px; color: var(--ink-3); }

.tint-peach { background: var(--peach); color: var(--peach-ink); }
.tint-butter { background: var(--butter); color: var(--butter-ink); }
.tint-rose { background: var(--rose); color: var(--rose-ink); }
.tint-sky { background: var(--sky); color: var(--sky-ink); }
.tint-plum { background: var(--plum); color: var(--plum-ink); }
.tint-mint { background: var(--mint); color: var(--mint-ink); }
.tint-moss { background: var(--moss-tint); color: var(--moss-ink); }
.tint-grey { background: var(--paper-2); color: var(--ink-2); }

/* Kid avatar: a photo (illustrated placeholder until a parent adds one) */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0;
  font-variation-settings: 'SOFT' 100; background: var(--paper-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 56px; height: 56px; font-size: 26px; }
.avatar.xl { width: 84px; height: 84px; font-size: 36px; }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.avatar-row { display: inline-flex; flex: none; }
.avatar-row .avatar { box-shadow: 0 0 0 2px var(--card); }
.avatar-row .avatar + .avatar { margin-left: -8px; }
.avatar-row .avatar.sm + .avatar.sm { margin-left: -6px; }

/* Brand logos */
.logo-img { height: 22px; width: auto; max-width: 150px; display: block; }
.logo-img.sm { height: 16px; max-width: 110px; }

/* Selects get a visible arrow */
.select-wrap { position: relative; }
.select-wrap select { padding-right: 40px; }
.select-wrap .ico { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-3); }

/* Compact freshness line on Today */
.fresh { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.fresh b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.fresh .marks { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fresh .bad { color: var(--crit); font-weight: 600; }
.fresh .ok { color: var(--good); }

/* Progress bar, stepper, link chips */
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--moss); border-radius: 99px; transition: width .5s ease; }
.progress.indet i { width: 40%; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.stepper button { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper .n { flex: 1; text-align: center; font-family: var(--font-display); font-size: 30px; font-weight: 600; font-variation-settings: 'SOFT' 40; }
.linkchips { display: flex; gap: 6px; flex-wrap: wrap; }
.linkchip { height: 30px; padding: 0 11px; border-radius: 9px; background: var(--paper-2); font-size: 12px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.linkchip:hover { background: var(--line); }
.linkchip.crit { background: var(--rose); color: var(--rose-ink); }
.linkchip.good { background: var(--moss-tint); color: var(--moss-ink); }
.kidcard .head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink); border-radius: 12px; }
.kidcard .head:hover { background: rgba(24,32,25,.035); }
.kidcard .learn { text-align: left; font-size: 13px; color: var(--ink-2); line-height: 1.4; border-radius: 8px; padding: 2px 4px; margin: 0 -4px; }
.kidcard .learn:hover { background: rgba(24,32,25,.035); }
.kidcard .grades .g:hover { background: var(--line); }
.match-list .row { padding: 10px 12px; }
.health { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.health .ring { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.chat-row .t { font-weight: 600; }

/* Pills / tags */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pill.crit { background: var(--rose); color: var(--rose-ink); }
.pill.warn { background: var(--butter); color: var(--butter-ink); }
.pill.good { background: var(--mint); color: var(--mint-ink); }
.pill.info { background: var(--sky); color: var(--sky-ink); }
.pill.neutral { background: var(--paper-2); color: var(--ink-2); }
.pill.outline { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.tag { font-size: 12px; color: var(--ink-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.crit { background: var(--crit); } .dot.grey { background: var(--ink-3); }

/* Chips (filters) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-inline: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding-inline: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; flex: none;
  border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600;
  color: var(--ink-2);
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on .avatar { box-shadow: 0 0 0 1.5px rgba(255,255,255,.6); }
.chip .avatar.sm { margin-left: -5px; }
.chip.soft { border-color: transparent; background: var(--paper-2); }
.chip.soft.on { background: var(--moss-tint); color: var(--moss-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .08s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-ink); }
.btn-primary:disabled { background: var(--moss-tint-2); color: var(--moss-ink); opacity: .7; cursor: default; }
.btn-secondary { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--moss); height: 40px; padding: 0 10px; }
.btn-danger { background: var(--rose); color: var(--rose-ink); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn .ico { width: 18px; height: 18px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.input {
  height: 52px; width: 100%; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); font-size: 16px; color: var(--ink); appearance: none; -webkit-appearance: none;
}
.input:focus { border-color: var(--moss); outline: 0; box-shadow: 0 0 0 3px var(--moss-tint); }
.input::placeholder { color: var(--ink-3); }
textarea.input { height: auto; padding: 12px 14px; resize: none; line-height: 1.45; }
select.input { background-image: none; padding-right: 36px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .suffix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.input-wrap .prefix-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.input-wrap .prefix-ico + .input { padding-left: 42px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.segmented { display: flex; background: var(--paper-2); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented button { flex: 1; height: 36px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.segmented button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(24,32,25,.08); }
.segmented.scroll { overflow-x: auto; scrollbar-width: none; }
.segmented.scroll button { flex: none; padding: 0 14px; }

.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch.on { background: var(--moss); }
.switch.on::after { transform: translateX(18px); }

/* OTP */
.otp { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp .cell {
  height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 26px; font-weight: 500;
  transition: border-color .1s;
}
.otp .cell.active { border-color: var(--moss); box-shadow: 0 0 0 3px var(--moss-tint); }
.otp .cell.filled { border-color: var(--ink-3); }
.otp input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 26px; letter-spacing: 2em; }

/* Banners & notes */
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  background: var(--butter); color: var(--butter-ink); font-size: 13px; line-height: 1.4;
}
.banner.crit { background: var(--rose); color: var(--rose-ink); }
.banner.info { background: var(--sky); color: var(--sky-ink); }
.banner.good { background: var(--mint); color: var(--mint-ink); }
.banner .ico { width: 18px; height: 18px; margin-top: 1px; }
.banner b { font-weight: 700; }
.banner .cta { margin-top: 6px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; display: inline-block; }
.note {
  font-size: 13px; color: var(--ink-2); line-height: 1.5; padding: 12px 14px; border-radius: 14px;
  background: var(--paper-2); border: 1px dashed var(--line);
}
.note b { color: var(--ink); }

/* Freshness rail */
.rail { display: flex; gap: 8px; overflow-x: auto; padding-inline: 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .src {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 9px;
  border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.rail .src .when { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rail .src.bad { border-color: var(--rose); background: var(--rose); color: var(--rose-ink); }
.rail .src.bad .when { color: var(--rose-ink); }
.rail .src.renew { border-color: var(--butter); background: var(--butter); color: var(--butter-ink); }
.rail .src.renew .when { color: var(--butter-ink); }

/* Big score */
.score-hero { display: flex; align-items: flex-end; gap: 14px; }
.score-hero .big { font-family: var(--font-display); font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-variation-settings: 'SOFT' 40; }
.score-hero .big.crit { color: var(--crit); }
.score-hero .big.warn { color: var(--warn); }
.score-hero .sub { padding-bottom: 6px; color: var(--ink-2); font-size: 14px; }

.grade-letter { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: -.02em; font-variation-settings: 'SOFT' 40; min-width: 44px; text-align: right; }
.grade-pct { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }

.quote { border-left: 3px solid var(--moss-tint-2); padding: 4px 0 4px 14px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.quote .who { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.checklist .ico { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.checklist .ok { color: var(--good); }
.checklist .no { color: var(--ink-3); }

/* Kid card on Today */
.kidcard { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-align: left; width: 100%; color: var(--ink); }
.kidcard .grades { display: flex; gap: 6px; flex-wrap: wrap; }
.kidcard .g { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 8px; border-radius: 8px; background: var(--paper-2); font-size: 12px; color: var(--ink-2); }
.kidcard .g b { font-family: var(--font-display); font-size: 14px; color: var(--ink); font-variation-settings: 'SOFT' 40; }
.kidcard .g.low { background: var(--rose); color: var(--rose-ink); } .kidcard .g.low b { color: var(--rose-ink); }

/* Sparkline */
.spark { width: 64px; height: 24px; }

/* Tab bar */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  padding: 8px 6px 22px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; border-radius: 12px; color: var(--ink-3); font-size: 11px; font-weight: 600; position: relative; }
.tabbar button .ico { width: 24px; height: 24px; }
.tabbar button.on { color: var(--moss-ink); }
.tabbar button.on .ico { color: var(--moss); }
.tabbar button .badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--crit); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Sheets */
.sheet-root { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.sheet-root.open { pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(24,32,25,.38); opacity: 0; transition: opacity .2s; }
.sheet-root.open .backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto;
  background: var(--paper); border-radius: 26px 26px 0 0; padding: 10px 20px 34px;
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.7,.2,1);
  scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }
.sheet-root.open .sheet { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.sheet .sub { color: var(--ink-2); font-size: 14px; line-height: 1.45; margin-bottom: 14px; }

/* Toast */
.toast-root { position: absolute; left: 0; right: 0; bottom: 100px; z-index: 30; display: flex; justify-content: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(24,32,25,.25); animation: toastin .25s ease both; max-width: 86%; text-align: center; display: flex; gap: 8px; align-items: center; }
.toast .ico { width: 16px; height: 16px; color: #9BD3AA; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Onboarding */
.steps { display: flex; gap: 6px; padding-inline: 20px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps i.done { background: var(--moss); }
.steps i.on { background: var(--moss); opacity: .55; }
.welcome-mark { width: 64px; height: 64px; border-radius: 20px 20px 20px 8px; background: var(--moss); color: #fff; display: flex; align-items: center; justify-content: center; }
.price-tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.price-tiles .tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; text-align: center; }
.price-tiles .tile .p { font-family: var(--font-display); font-size: 22px; font-weight: 600; font-variation-settings: 'SOFT' 40; }
.price-tiles .tile .l { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: 2px; }
.price-tiles .tile.on { border-color: var(--moss); background: var(--moss-tint); }
.total-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; }
.total-bar .amt { font-family: var(--font-display); font-size: 22px; font-weight: 600; font-variation-settings: 'SOFT' 40; font-variant-numeric: tabular-nums; }
.total-bar .d { font-size: 12px; opacity: .75; }

.source-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.source-card .logo { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; letter-spacing: -.02em; flex: none; }
.logo-ps { background: #1F3A8A; color: #fff; }
.logo-sc { background: #0B7A75; color: #fff; }
.logo-pq { background: #2C7A3F; color: #fff; }

.progress-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.progress-list li:last-child { border-bottom: 0; }
.progress-list .st { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.progress-list .st.todo { border: 1.5px solid var(--line); }
.progress-list .st.doing { border: 2px solid var(--moss); border-right-color: transparent; animation: spin .8s linear infinite; }
.progress-list .st.done { background: var(--moss); color: #fff; }
.progress-list .st.warn { background: var(--butter); color: var(--butter-ink); }
.progress-list .st .ico { width: 13px; height: 13px; }
.progress-list .l { font-size: 14px; font-weight: 600; }
.progress-list .d { font-size: 13px; color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--moss-tint-2); border-top-color: var(--moss); animation: spin .8s linear infinite; }

.email-preview { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.email-preview .eh { padding: 10px 14px; background: var(--paper-2); font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.email-preview .eb { padding: 14px; font-size: 14px; line-height: 1.5; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid .dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 4px 0; text-transform: uppercase; letter-spacing: .05em; }
.cal-grid .day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink); position: relative; }
.cal-grid .day.out { color: var(--ink-3); opacity: .5; }
.cal-grid .day.today { font-weight: 700; color: var(--moss-ink); }
.cal-grid .day.today::before { content: ''; position: absolute; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--moss); top: 50%; left: 50%; transform: translate(-50%, calc(-50% - 4px)); }
.cal-grid .day.sel { background: var(--ink); color: #fff; }
.cal-grid .day.sel::before { display: none; }
.cal-grid .dots { display: flex; gap: 2px; height: 5px; }
.cal-grid .dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-grid .day.sel .dots i { background: #fff !important; }

/* Ask */
.thread { display: flex; flex-direction: column; gap: 14px; padding-inline: 20px; }
.msg { max-width: 88%; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 18px 18px 4px 18px; font-size: 15px; line-height: 1.4; }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); padding: 14px; border-radius: 18px 18px 18px 4px; font-size: 15px; line-height: 1.5; display: flex; flex-direction: column; gap: 10px; }
.msg.bot p + p { margin-top: -2px; }
.msg.bot ul.bul { padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 4px; }
.msg.bot .cites { display: flex; flex-wrap: wrap; gap: 6px; }
.cite { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--paper-2); font-size: 12px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); }
.cite .ico { width: 13px; height: 13px; }
.gap { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--butter-ink); background: var(--butter); padding: 8px 10px; border-radius: 10px; line-height: 1.4; }
.gap .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.thinking { display: flex; gap: 4px; align-items: center; height: 18px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.askbar { position: absolute; left: 0; right: 0; bottom: 84px; z-index: 5; padding: 10px 14px; background: linear-gradient(to top, var(--paper) 70%, transparent); }
.askbar .box { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 4px 4px 16px; box-shadow: var(--shadow); }
.askbar input { flex: 1; border: 0; background: transparent; height: 40px; font-size: 15px; min-width: 0; }
.askbar input:focus { outline: 0; }
.askbar .send { width: 40px; height: 40px; border-radius: 50%; background: var(--moss); color: #fff; display: flex; align-items: center; justify-content: center; }
.suggest { display: flex; flex-direction: column; gap: 8px; padding-inline: 20px; }
.suggest button { text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.suggest button .ico { color: var(--moss); width: 18px; height: 18px; }

/* Worksheet paper */
.paper {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 22px;
  box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(24,32,25,.08);
  font-size: 12.5px; line-height: 1.45; color: #1a1a1a; font-family: var(--font-ui);
}
.paper .ph { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid #1a1a1a; padding-bottom: 6px; margin-bottom: 10px; gap: 8px; }
.paper .ph .pt { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.paper .ph .pm { font-size: 10.5px; color: #555; text-align: right; white-space: nowrap; }
.paper .nameline { display: flex; gap: 14px; font-size: 11px; color: #444; margin-bottom: 10px; }
.paper .nameline span { flex: 1; border-bottom: 1px solid #999; padding-bottom: 2px; }
.paper .brain { border: 1.5px solid #1a1a1a; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: #FAFAF7; }
.paper .brain h5 { margin: 0 0 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.paper .brain p { margin: 0 0 6px; }
.paper .diagram { margin: 8px 0 4px; }
.paper ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.paper ol li { padding-left: 2px; }
.paper .ans { display: block; height: 22px; border-bottom: 1px solid #bbb; margin-top: 4px; width: 60%; }
.paper .ans.long { width: 100%; height: 40px; }
.paper .foot { margin-top: 14px; font-size: 10px; color: #777; display: flex; justify-content: space-between; border-top: 1px solid #ddd; padding-top: 6px; }
.paper.key { background: #FFFDF5; }
.paper.key ol { gap: 4px; }

summary::-webkit-details-marker { display: none; }

/* Class detail grades table */
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table td { padding: 8px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table td.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.mini-table td.d { color: var(--ink-3); white-space: nowrap; padding-left: 10px; text-align: right; }

/* Standards bar (elementary) */
.std { display: flex; gap: 3px; }
.std i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.std i.on { background: var(--moss); }
.std i.on.low { background: var(--warn); }

/* Briefing */
.brief { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; font-size: 14.5px; line-height: 1.5; }
.brief h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.brief ul.bul { padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 6px; }
.brief a { font-weight: 600; }
.brief .kidh { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.brief .srcs { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }

/* Settings rows */
.setting-val { font-size: 13px; color: var(--ink-3); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Child card: quiet grade list and text links instead of chips */
.kidcard .ggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.kidcard .gcell { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 2px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); text-align: left; border-radius: 4px; }
.kidcard .gcell:hover { background: rgba(24,32,25,.035); }
.kidcard .gval { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); font-variation-settings: 'SOFT' 40; white-space: nowrap; }
.kidcard .gval.low { color: var(--crit); }
.kidcard .gval.none { color: var(--ink-3); font-family: var(--font-ui); font-weight: 500; }
.kidcard .tlinks { font-size: 13px; color: var(--ink-3); }
.kidcard .tlink { color: var(--moss); font-weight: 600; font-size: 13px; }
.kidcard .tlink:hover { text-decoration: underline; text-underline-offset: 2px; }
.kidcard .tlink.crit { color: var(--crit); }

/* Photo crop */
.crop-stage { position: relative; width: 260px; height: 260px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--paper-2); touch-action: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { display: block; width: 260px; height: 260px; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 400px rgba(247,248,245,.82); pointer-events: none; border: 1.5px solid rgba(24,32,25,.25); }
input[type=range] { accent-color: var(--moss); }

/* Tappable avatar with an add-photo hint */
.avatar-btn { position: relative; border-radius: 50%; flex: none; display: inline-flex; }
.avatar-btn .cam { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--card); }
.avatar-btn .cam .ico-s { width: 11px; height: 11px; }
.avatar-btn:hover .avatar { filter: brightness(.96); }

/* Calendar: week strip and agenda */
.wk { display: flex; align-items: center; gap: 2px; }
.wk .iconbtn { width: 30px; height: 48px; flex: none; }
.wk .wd { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 12px; color: var(--ink); min-width: 0; }
.wk .wd:hover { background: rgba(24,32,25,.035); }
.wk .wd .dw { font-size: 10px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.wk .wd .dn { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.wk .wd.today .dn { border: 1.5px solid var(--moss); color: var(--moss-ink); }
.wk .wd.sel .dn { background: var(--ink); color: #fff; border-color: var(--ink); }
.wk .wd .dots { display: flex; gap: 2px; height: 5px; }
.wk .wd .dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-grid.compact .day { aspect-ratio: auto; height: 40px; font-size: 13px; }
.cal-grid.compact .day.today::before { width: 26px; height: 26px; }

/* ---------- Desktop shell (900px and up). Sidebar nav, wider content, modal sheets. Mobile is untouched. ---------- */
.proto-btn { display: none; }
@media (min-width: 900px) {
  .stage { display: block; padding: 0; min-height: 100vh; }
  .phone { width: 100%; max-width: 1320px; height: 100vh; margin: 0 auto; border-radius: 0; box-shadow: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .statusbar { display: none; }
  .screen { padding-top: 28px; padding-bottom: 80px; padding-inline: 36px; }
  .screen > * { max-width: var(--content-max, 1080px); margin-left: auto; margin-right: auto; }
  .screen .hero, .screen .section, .screen .chips, .screen .thread, .screen .suggest, .screen .steps, .screen .topbar, .screen .rail { padding-inline: 0; }
  .phone.with-nav .screen { left: 232px; }
  .tabbar { top: 0; bottom: 0; left: 0; right: auto; width: 232px; display: flex; flex-direction: column; gap: 2px; padding: 28px 14px; border-top: 0; border-right: 1px solid var(--line); background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar::before { content: 'Mossybook'; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.01em; color: var(--ink); padding: 0 12px 22px; font-variation-settings: 'SOFT' 60; }
  .tabbar button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; border-radius: 10px; color: var(--ink-2); }
  .tabbar button:hover { background: var(--paper-2); }
  .tabbar button.on { background: var(--moss-tint); }
  .tabbar button .ico { width: 20px; height: 20px; }
  .tabbar button .badge { position: static; margin-left: auto; }
  .phone.with-nav .askbar { left: 232px; bottom: 20px; padding: 10px 36px; }
  .askbar .box { max-width: 800px; margin: 0 auto; }
  .phone.with-nav .toast-root { left: 232px; bottom: 32px; }
  .phone.with-nav .sheet-root { left: 232px; }
  .sheet { top: 50%; bottom: auto; left: 50%; width: min(560px, 92%); max-height: 86vh; border-radius: 24px; padding: 18px 28px 28px; transform: translate(-50%, -48%) scale(.98); opacity: 0; transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .18s; }
  .sheet-root.open .sheet { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet .grab { display: none; }
  .screen.route-welcome, .screen.route-signup, .screen.route-verify, .screen.route-plan, .screen.route-setup-kids, .screen.route-connect, .screen.route-gather { --content-max: 560px; }
  .screen.route-item, .screen.route-grade, .screen.route-upcoming, .screen.route-practice, .screen.route-briefing, .screen.route-briefings, .screen.route-subscription, .screen.route-connections, .screen.route-notifications, .screen.route-privacy, .screen.route-coverage, .screen.route-calendar-links { --content-max: 760px; }
  .screen.route-kid { --content-max: 880px; }
  .screen.route-ask { --content-max: 800px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .home-side > .section:first-child { margin-top: 24px; }
  .kids-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cal-toggle { display: none; }
  .cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 28px; align-items: start; }
  .cal-layout > [hidden] { display: block !important; }
  .cal-month .cal-daylist { display: none; }
  .cal-month { position: sticky; top: 0; }
  .more-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; }
  .side { position: fixed; right: 24px; bottom: 76px; width: 290px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 20px 50px rgba(24,32,25,.18); z-index: 50; display: none; }
  .side.open { display: block; }
  .proto-btn { position: fixed; right: 24px; bottom: 24px; z-index: 51; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(24,32,25,.25); }
}

/* ---------- Motion: small and purposeful. The reduced-motion rule below zeroes all of it. ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.screen.enter .stagger { animation: rise .32s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes iconpop { 0% { transform: scale(.85); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }
.tabbar button.on .ico { animation: iconpop .32s cubic-bezier(.2,.7,.2,1); }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(34,121,90,.35); } 55% { box-shadow: 0 0 0 5px rgba(34,121,90,0); } }
@keyframes breathe-crit { 0%, 100% { box-shadow: 0 0 0 0 rgba(179,58,46,.35); } 55% { box-shadow: 0 0 0 5px rgba(179,58,46,0); } }
.fresh .dot.good { animation: breathe 2.8s ease-out infinite; }
.fresh .dot.crit { animation: breathe-crit 2.2s ease-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.progress-list .st.done .ico path, .checklist .ok path, .toast .ico path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s ease-out .05s forwards; }
.spark polyline { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .9s ease-out .15s forwards; }
.spark circle { opacity: 0; animation: fadein .3s ease-out .95s forwards; }
@keyframes fadein { to { opacity: 1; } }
@keyframes nudge { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.impact-arrow { animation: nudge .5s ease-out .25s both; }
.impact-to { animation: rise .5s cubic-bezier(.2,.7,.2,1) .4s both; }
.progress:not(.indet) i { position: relative; overflow: hidden; }
.progress:not(.indet) i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: sheen 1.8s linear infinite; }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.btn { transition: transform .12s ease, box-shadow .16s ease, background .15s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34,121,90,.22); }
.btn-primary:active { transform: scale(.985); box-shadow: none; }
.row .chev, .kidcard .head .chev { transition: transform .15s ease; }
button.row:hover .chev, .kidcard .head:hover .chev { transform: translateX(2px); }
.avatar-btn .avatar { transition: transform .15s ease; }
.avatar-btn:hover .avatar { transform: scale(1.05); }
.backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes toastout { to { opacity: 0; transform: translateY(6px); } }
.toast.out { animation: toastout .25s ease forwards; }
@keyframes cellpop { from { transform: scale(.92); } to { transform: scale(1); } }
.otp .cell.filled { animation: cellpop .18s ease-out; }
@keyframes grow { from { opacity: 0; transform: scale(.7) rotate(-6deg); } to { opacity: 1; transform: none; } }
.welcome-mark { animation: grow .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(18deg) scale(1.18); } }
button.row:hover .lead.tint-moss .ico, button.row:hover .lead.tint-moss .glyph { animation: twinkle .6s ease-in-out; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.spot { animation: floaty 4.5s ease-in-out infinite; }
.chip, .segmented button, .linkchip, .tlink { transition: background .15s ease, color .15s ease; }
.switch::after { transition: transform .18s cubic-bezier(.2,.7,.2,1); }
.list .row { transition: background .12s ease; }
@media (prefers-reduced-motion: reduce) { .fresh .dot, .spot, .progress i::after { animation: none !important; } }

/* ---------- Custom art slots ---------- */
.welcome-hero { position: relative; }
.welcome-mark.art { background: transparent; width: 96px; height: 96px; border-radius: 0; }
.welcome-mark.art img { width: 100%; height: 100%; object-fit: contain; }
.welcome-spot, .spot-img { filter: saturate(.82); }
.welcome-spot { position: absolute; right: 12px; top: 36px; width: 140px; height: 140px; object-fit: contain; }
.spot-img { width: 104px; height: 104px; object-fit: contain; margin-bottom: 14px; }
.phone::after { content: ''; position: absolute; inset: 0; background: url(images/texture.png) center / 512px 512px repeat; opacity: .45; mix-blend-mode: multiply; pointer-events: none; z-index: 0; }
.screen { z-index: 1; }
.glyph { width: 26px; height: 26px; object-fit: contain; display: block; }
@media (min-width: 900px) { .tabbar::before { padding-left: 50px; background: url(images/mark.png) no-repeat 12px 1px / 28px 28px; } }

/* Navigation glyphs: ink line art used as masks so CSS colors them (inactive grey, active moss) */
.navico { width: 24px; height: 24px; display: block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; flex: none; }
.navico.sm { width: 16px; height: 16px; }
.tabbar button .navico { width: 24px; height: 24px; }
.tabbar button.on .navico { animation: iconpop .32s cubic-bezier(.2,.7,.2,1); }
@media (min-width: 900px) { .tabbar button .navico { width: 20px; height: 20px; } }

/* Briefing: a readable hierarchy. Section titles in the display face, quiet sub-labels, bold lead clause per line, demoted links. */
.brief { gap: 22px; padding: 20px 18px 18px; }
.brief .b-greet { font-size: 14px; color: var(--ink-2); }
.brief .b-sec { display: flex; flex-direction: column; gap: 6px; }
.brief .b-kid { padding-top: 18px; border-top: 1px solid var(--line-2); }
.brief .b-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; line-height: 1.15; color: var(--ink); font-variation-settings: 'SOFT' 60; margin-bottom: 4px; }
.brief .b-title.kidh { display: flex; align-items: center; gap: 10px; }
.brief .b-sub { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 8px; }
.brief .b-sub:first-of-type { margin-top: 2px; }
.brief ul.bul { list-style: none; padding-left: 0; gap: 8px; }
.brief .b-item { position: relative; padding-left: 14px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.brief .b-item::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--moss); }
.brief .b-item b { font-weight: 700; }
.brief .b-rest { color: var(--ink-2); }
.brief .b-link { font-size: 12.5px; font-weight: 600; color: var(--moss); text-decoration: none; white-space: nowrap; margin-left: 4px; }
.brief .b-link::after { content: ' ›'; }
.brief .b-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.brief .b-none { font-size: 13.5px; color: var(--ink-3); font-style: italic; }
.brief .srcs { font-size: 13px; margin-top: 4px; }
.brief .gap { margin-top: 10px; }
